first commit
This commit is contained in:
27
resources/views/auth/forgot/create.blade.php
Normal file
27
resources/views/auth/forgot/create.blade.php
Normal file
@@ -0,0 +1,27 @@
|
||||
@extends('layouts.auth')
|
||||
|
||||
@section('title', trans('auth.reset_password'))
|
||||
@section('message', trans('auth.reset_password'))
|
||||
|
||||
@section('content')
|
||||
<form role="form" method="POST" action="{{ url('auth/forgot') }}">
|
||||
{{ csrf_field() }}
|
||||
|
||||
<div class="form-group has-feedback{{ $errors->has('email') ? ' has-error' : '' }}">
|
||||
<input name="email" type="email" class="form-control" placeholder="{{ trans('auth.enter_email') }}" required>
|
||||
<span class="glyphicon glyphicon-envelope form-control-feedback"></span>
|
||||
@if ($errors->has('email'))
|
||||
<span class="help-block">
|
||||
<strong>{{ $errors->first('email') }}</strong>
|
||||
</span>
|
||||
@endif
|
||||
</div>
|
||||
<div class="row">
|
||||
<!-- /.col -->
|
||||
<div class="col-sm-offset-8 col-sm-4">
|
||||
<button type="submit" class="btn btn-success btn-block btn-flat">{{ trans('general.send') }}</button>
|
||||
</div>
|
||||
<!-- /.col -->
|
||||
</div>
|
||||
</form>
|
||||
@endsection
|
||||
67
resources/views/auth/login/create.blade.php
Normal file
67
resources/views/auth/login/create.blade.php
Normal file
@@ -0,0 +1,67 @@
|
||||
@extends('layouts.auth')
|
||||
|
||||
@section('title', trans('auth.login'))
|
||||
@section('message', trans('auth.login_to'))
|
||||
|
||||
@section('content')
|
||||
<form role="form" method="POST" action="{{ url('auth/login') }}">
|
||||
{{ csrf_field() }}
|
||||
|
||||
<div class="form-group has-feedback{{ $errors->has('email') ? ' has-error' : '' }}">
|
||||
<input name="email" type="email" class="form-control" placeholder="{{ trans('general.email') }}" required autofocus>
|
||||
<span class="glyphicon glyphicon-envelope form-control-feedback"></span>
|
||||
@if ($errors->has('email'))
|
||||
<span class="help-block">
|
||||
<strong>{{ $errors->first('email') }}</strong>
|
||||
</span>
|
||||
@endif
|
||||
</div>
|
||||
<div class="form-group has-feedback{{ $errors->has('password') ? ' has-error' : '' }}">
|
||||
<input name="password" type="password" class="form-control" placeholder="{{ trans('auth.password.current') }}" required>
|
||||
<span class="glyphicon glyphicon-lock form-control-feedback"></span>
|
||||
@if ($errors->has('password'))
|
||||
<span class="help-block">
|
||||
<strong>{{ $errors->first('password') }}</strong>
|
||||
</span>
|
||||
@endif
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-8">
|
||||
<div class="checkbox icheck">
|
||||
<label>
|
||||
<input name="remember" type="checkbox" {{ old('remember') ? 'checked' : '' }}> {{ trans('auth.remember_me') }}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.col -->
|
||||
<div class="col-sm-4">
|
||||
<button type="submit" class="btn btn-success btn-block btn-flat">{{ trans('auth.login') }}</button>
|
||||
</div>
|
||||
<!-- /.col -->
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<a href="{{ url('auth/forgot') }}">{{ trans('auth.forgot_password') }}</a><br>
|
||||
@endsection
|
||||
|
||||
@section('js')
|
||||
<!-- iCheck -->
|
||||
<script src="{{ asset('vendor/almasaeed2010/adminlte/plugins/iCheck/icheck.min.js') }}"></script>
|
||||
@endsection
|
||||
|
||||
@section('css')
|
||||
<!-- iCheck -->
|
||||
<link rel="stylesheet" href="{{ asset('vendor/almasaeed2010/adminlte/plugins/iCheck/square/green.css') }}">
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
<script>
|
||||
$(function () {
|
||||
$('input').iCheck({
|
||||
checkboxClass: 'icheckbox_square-green',
|
||||
radioClass: 'iradio_square-green',
|
||||
increaseArea: '20%' // optional
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
25
resources/views/auth/permissions/create.blade.php
Normal file
25
resources/views/auth/permissions/create.blade.php
Normal file
@@ -0,0 +1,25 @@
|
||||
@extends('layouts.admin')
|
||||
|
||||
@section('title', trans('general.title.new', ['type' => trans_choice('general.permissions', 1)]))
|
||||
|
||||
@section('content')
|
||||
<!-- Default box -->
|
||||
<div class="box box-success">
|
||||
{!! Form::open(['url' => 'auth/permissions', 'role' => 'form']) !!}
|
||||
|
||||
<div class="box-body">
|
||||
{{ Form::textGroup('display_name', trans('general.name'), 'id-card-o') }}
|
||||
|
||||
{{ Form::textGroup('name', trans('general.code'), 'code') }}
|
||||
|
||||
{{ Form::textareaGroup('description', trans('general.description')) }}
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
|
||||
<div class="box-footer">
|
||||
{{ Form::saveButtons('auth/permissions') }}
|
||||
</div>
|
||||
<!-- /.box-footer -->
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
@endsection
|
||||
32
resources/views/auth/permissions/edit.blade.php
Normal file
32
resources/views/auth/permissions/edit.blade.php
Normal file
@@ -0,0 +1,32 @@
|
||||
@extends('layouts.admin')
|
||||
|
||||
@section('title', trans('general.title.edit', ['type' => trans_choice('general.permission', 1)]))
|
||||
|
||||
@section('content')
|
||||
<!-- Default box -->
|
||||
<div class="box box-success">
|
||||
{!! Form::model($permission, [
|
||||
'method' => 'PATCH',
|
||||
'url' => ['auth/permissions', $permission->id],
|
||||
'role' => 'form'
|
||||
]) !!}
|
||||
|
||||
<div class="box-body">
|
||||
{{ Form::textGroup('display_name', trans('general.name'), 'id-card-o') }}
|
||||
|
||||
{{ Form::textGroup('name', trans('general.code'), 'code') }}
|
||||
|
||||
{{ Form::textareaGroup('description', trans('general.description')) }}
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
|
||||
@permission('update-auth-permissions')
|
||||
<div class="box-footer">
|
||||
{{ Form::saveButtons('auth/permissions') }}
|
||||
</div>
|
||||
<!-- /.box-footer -->
|
||||
@endpermission
|
||||
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
@endsection
|
||||
62
resources/views/auth/permissions/index.blade.php
Normal file
62
resources/views/auth/permissions/index.blade.php
Normal file
@@ -0,0 +1,62 @@
|
||||
@extends('layouts.admin')
|
||||
|
||||
@section('title', trans_choice('general.permissions', 2))
|
||||
|
||||
@permission('update-auth-permissions')
|
||||
@section('new_button')
|
||||
<span class="new-button"><a href="{{ url('auth/permissions/create') }}" class="btn btn-success btn-sm"><span class="fa fa-plus"></span> {{ trans('general.add_new') }}</a></span>
|
||||
@endsection
|
||||
@endpermission
|
||||
|
||||
@section('content')
|
||||
<!-- Default box -->
|
||||
<div class="box box-success">
|
||||
<div class="box-header">
|
||||
{!! Form::open(['url' => 'auth/permissions', 'role' => 'form', 'method' => 'GET']) !!}
|
||||
<div class="pull-left">
|
||||
<span class="title-filter">{{ trans('general.search') }}:</span>
|
||||
{!! Form::text('search', request('search'), ['class' => 'form-control input-filter input-sm', 'placeholder' => trans('general.search_placeholder')]) !!}
|
||||
{!! Form::button('<span class="fa fa-filter"></span> ' . trans('general.filter'), ['type' => 'submit', 'class' => 'btn btn-sm btn-default btn-filter']) !!}
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<span class="title-filter">{{ trans('general.show') }}:</span>
|
||||
{!! Form::select('limit', $limits, request('limit', setting('general.list_limit', '25')), ['class' => 'form-control input-filter input-sm', 'onchange' => 'this.form.submit()']) !!}
|
||||
</div>
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div class="table table-responsive">
|
||||
<table class="table table-bordered table-striped table-hover" id="tbl-permissions">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>@sortablelink('display_name', trans('general.name'))</th>
|
||||
<th>@sortablelink('name', trans('general.code'))</th>
|
||||
<th>@sortablelink('description', trans('general.description'))</th>
|
||||
<th style="width: 15%;">{{ trans('general.actions') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($permissions as $item)
|
||||
<tr>
|
||||
<td><a href="{{ url('auth/permissions/' . $item->id . '/edit') }}">{{ $item->display_name }}</a></td>
|
||||
<td>{{ $item->name }}</td>
|
||||
<td>{{ $item->description }}</td>
|
||||
<td>
|
||||
<a href="{{ url('auth/permissions/' . $item->id . '/edit') }}" class="btn btn-primary btn-xs"><i class="fa fa-pencil-square-o" aria-hidden="true"></i> {{ trans('general.edit') }}</a>
|
||||
@permission('update-auth-permissions')
|
||||
{!! Form::deleteButton($item, 'auth/permissions', '', 'display_name') !!}
|
||||
@endpermission
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
<div class="box-footer">
|
||||
@include('partials.admin.pagination', ['items' => $permissions, 'type' => 'permissions'])
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box -->
|
||||
@endsection
|
||||
50
resources/views/auth/reset/create.blade.php
Normal file
50
resources/views/auth/reset/create.blade.php
Normal file
@@ -0,0 +1,50 @@
|
||||
@extends('layouts.auth')
|
||||
|
||||
@section('title', trans('auth.reset_password'))
|
||||
@section('message', trans('auth.reset_password'))
|
||||
|
||||
@section('content')
|
||||
<form role="form" method="POST" action="{{ url('auth/reset') }}">
|
||||
{{ csrf_field() }}
|
||||
|
||||
<input type="hidden" name="token" value="{{ $token }}">
|
||||
|
||||
<div class="form-group has-feedback{{ $errors->has('email') ? ' has-error' : '' }}">
|
||||
<input name="email" type="email" class="form-control" placeholder="{{ trans('auth.current_email') }}" value="{{ $email or old('email') }}" required autofocus>
|
||||
<span class="glyphicon glyphicon-envelope form-control-feedback"></span>
|
||||
@if ($errors->has('email'))
|
||||
<span class="help-block">
|
||||
<strong>{{ $errors->first('email') }}</strong>
|
||||
</span>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div class="form-group has-feedback{{ $errors->has('password') ? ' has-error' : '' }}">
|
||||
<input name="password" type="password" class="form-control" placeholder="{{ trans('auth.password.new') }}" required>
|
||||
<span class="glyphicon glyphicon-lock form-control-feedback"></span>
|
||||
@if ($errors->has('password'))
|
||||
<span class="help-block">
|
||||
<strong>{{ $errors->first('password') }}</strong>
|
||||
</span>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div class="form-group has-feedback{{ $errors->has('password_confirmation') ? ' has-error' : '' }}">
|
||||
<input name="password_confirmation" type="password" class="form-control" placeholder="{{ trans('auth.password.new_confirm') }}" required>
|
||||
<span class="glyphicon glyphicon-lock form-control-feedback"></span>
|
||||
@if ($errors->has('password_confirmation'))
|
||||
<span class="help-block">
|
||||
<strong>{{ $errors->first('password_confirmation') }}</strong>
|
||||
</span>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<!-- /.col -->
|
||||
<div class="col-sm-offset-8 col-sm-4">
|
||||
<button type="submit" class="btn btn-success btn-block btn-flat">{{ trans('auth.reset') }}</button>
|
||||
</div>
|
||||
<!-- /.col -->
|
||||
</div>
|
||||
</form>
|
||||
@endsection
|
||||
28
resources/views/auth/roles/create.blade.php
Normal file
28
resources/views/auth/roles/create.blade.php
Normal file
@@ -0,0 +1,28 @@
|
||||
@extends('layouts.admin')
|
||||
|
||||
@section('title', trans('general.title.new', ['type' => trans_choice('general.roles', 1)]))
|
||||
|
||||
@section('content')
|
||||
<!-- Default box -->
|
||||
<div class="box box-success">
|
||||
{!! Form::open(['url' => 'auth/roles', 'role' => 'form']) !!}
|
||||
|
||||
<div class="box-body">
|
||||
{{ Form::textGroup('display_name', trans('general.name'), 'id-card-o') }}
|
||||
|
||||
{{ Form::textGroup('name', trans('general.code'), 'code') }}
|
||||
|
||||
{{ Form::textareaGroup('description', trans('general.description')) }}
|
||||
|
||||
{{ Form::checkboxGroup('permissions', trans_choice('general.permissions', 2), $permissions, 'display_name') }}
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
|
||||
<div class="box-footer">
|
||||
{{ Form::saveButtons('auth/roles') }}
|
||||
</div>
|
||||
<!-- /.box-footer -->
|
||||
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
@endsection
|
||||
34
resources/views/auth/roles/edit.blade.php
Normal file
34
resources/views/auth/roles/edit.blade.php
Normal file
@@ -0,0 +1,34 @@
|
||||
@extends('layouts.admin')
|
||||
|
||||
@section('title', trans('general.title.edit', ['type' => trans_choice('general.roles', 1)]))
|
||||
|
||||
@section('content')
|
||||
<!-- Default box -->
|
||||
<div class="box box-success">
|
||||
{!! Form::model($role, [
|
||||
'method' => 'PATCH',
|
||||
'url' => ['auth/roles', $role->id],
|
||||
'role' => 'form'
|
||||
]) !!}
|
||||
|
||||
<div class="box-body">
|
||||
{{ Form::textGroup('display_name', trans('general.name'), 'id-card-o') }}
|
||||
|
||||
{{ Form::textGroup('name', trans('general.code'), 'code') }}
|
||||
|
||||
{{ Form::textareaGroup('description', trans('general.description')) }}
|
||||
|
||||
{{ Form::checkboxGroup('permissions', trans_choice('general.permissions', 2), $permissions, 'display_name') }}
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
|
||||
@permission('update-auth-roles')
|
||||
<div class="box-footer">
|
||||
{{ Form::saveButtons('auth/roles') }}
|
||||
</div>
|
||||
<!-- /.box-footer -->
|
||||
@endpermission
|
||||
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
@endsection
|
||||
62
resources/views/auth/roles/index.blade.php
Normal file
62
resources/views/auth/roles/index.blade.php
Normal file
@@ -0,0 +1,62 @@
|
||||
@extends('layouts.admin')
|
||||
|
||||
@section('title', trans_choice('general.roles', 2))
|
||||
|
||||
@permission('create-auth-roles')
|
||||
@section('new_button')
|
||||
<span class="new-button"><a href="{{ url('auth/roles/create') }}" class="btn btn-success btn-sm"><span class="fa fa-plus"></span> {{ trans('general.add_new') }}</a></span>
|
||||
@endsection
|
||||
@endpermission
|
||||
|
||||
@section('content')
|
||||
<!-- Default box -->
|
||||
<div class="box box-success">
|
||||
<div class="box-header">
|
||||
{!! Form::open(['url' => 'auth/roles', 'role' => 'form', 'method' => 'GET']) !!}
|
||||
<div class="pull-left">
|
||||
<span class="title-filter">{{ trans('general.search') }}:</span>
|
||||
{!! Form::text('search', request('search'), ['class' => 'form-control input-filter input-sm', 'placeholder' => trans('general.search_placeholder')]) !!}
|
||||
{!! Form::button('<span class="fa fa-filter"></span> ' . trans('general.filter'), ['type' => 'submit', 'class' => 'btn btn-sm btn-default btn-filter']) !!}
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<span class="title-filter">{{ trans('general.show') }}:</span>
|
||||
{!! Form::select('limit', $limits, request('limit', setting('general.list_limit', '25')), ['class' => 'form-control input-filter input-sm', 'onchange' => 'this.form.submit()']) !!}
|
||||
</div>
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div class="table table-responsive">
|
||||
<table class="table table-bordered table-striped table-hover" id="tbl-roles">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>@sortablelink('display_name', trans('general.name'))</th>
|
||||
<th>@sortablelink('name', trans('general.code'))</th>
|
||||
<th>@sortablelink('description', trans('general.description'))</th>
|
||||
<th style="width: 15%;">{{ trans('general.actions') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($roles as $item)
|
||||
<tr>
|
||||
<td><a href="{{ url('auth/roles/' . $item->id . '/edit') }}">{{ $item->display_name }}</a></td>
|
||||
<td>{{ $item->name }}</td>
|
||||
<td>{{ $item->description }}</td>
|
||||
<td>
|
||||
<a href="{{ url('auth/roles/' . $item->id . '/edit') }}" class="btn btn-primary btn-xs"><i class="fa fa-pencil-square-o" aria-hidden="true"></i> {{ trans('general.edit') }}</a>
|
||||
@permission('delete-auth-roles')
|
||||
{!! Form::deleteButton($item, 'auth/roles', '', 'display_name') !!}
|
||||
@endpermission
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
<div class="box-footer">
|
||||
@include('partials.admin.pagination', ['items' => $roles, 'type' => 'roles'])
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box -->
|
||||
@endsection
|
||||
71
resources/views/auth/users/create.blade.php
Normal file
71
resources/views/auth/users/create.blade.php
Normal file
@@ -0,0 +1,71 @@
|
||||
@extends('layouts.admin')
|
||||
|
||||
@section('title', trans('general.title.new', ['type' => trans_choice('general.users', 1)]))
|
||||
|
||||
@section('content')
|
||||
<!-- Default box -->
|
||||
<div class="box box-success">
|
||||
{!! Form::open(['url' => 'auth/users', 'files' => true, 'role' => 'form']) !!}
|
||||
|
||||
<div class="box-body">
|
||||
{{ Form::textGroup('name', trans('general.name'), 'id-card-o') }}
|
||||
|
||||
{{ Form::emailGroup('email', trans('general.email'), 'envelope') }}
|
||||
|
||||
{{ Form::passwordGroup('password', trans('auth.password.current'), 'key') }}
|
||||
|
||||
{{ Form::passwordGroup('password_confirmation', trans('auth.password.current_confirm'), 'key') }}
|
||||
|
||||
{{ Form::selectGroup('locale', trans_choice('general.languages', 1), 'flag', language()->allowed(), setting('general.default_locale')) }}
|
||||
|
||||
{{ Form::fileGroup('picture', trans_choice('general.pictures', 1)) }}
|
||||
|
||||
@permission('read-companies-companies')
|
||||
{{ Form::checkboxGroup('companies', trans_choice('general.companies', 2), $companies, 'company_name') }}
|
||||
@endpermission
|
||||
|
||||
@permission('read-auth-roles')
|
||||
{{ Form::checkboxGroup('roles', trans_choice('general.roles', 2), $roles, 'display_name') }}
|
||||
@endpermission
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
|
||||
<div class="box-footer">
|
||||
{{ Form::saveButtons('auth/users') }}
|
||||
</div>
|
||||
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('js')
|
||||
<script src="{{ asset('public/js/bootstrap-fancyfile.js') }}"></script>
|
||||
<script src="{{ asset('vendor/almasaeed2010/adminlte/plugins/iCheck/icheck.min.js') }}"></script>
|
||||
@endsection
|
||||
|
||||
@section('css')
|
||||
<link rel="stylesheet" href="{{ asset('public/css/bootstrap-fancyfile.css') }}">
|
||||
<link rel="stylesheet" href="{{ asset('vendor/almasaeed2010/adminlte/plugins/iCheck/square/green.css') }}">
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
$("#locale").select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.languages', 1)]) }}"
|
||||
});
|
||||
|
||||
$('#picture').fancyfile({
|
||||
text : '{{ trans('general.form.select.file') }}',
|
||||
style : 'btn-default',
|
||||
placeholder : '{{ trans('general.form.no_file_selected') }}'
|
||||
});
|
||||
|
||||
$('input').iCheck({
|
||||
checkboxClass: 'icheckbox_square-green',
|
||||
radioClass: 'iradio_square-green',
|
||||
increaseArea: '20%' // optional
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
79
resources/views/auth/users/edit.blade.php
Normal file
79
resources/views/auth/users/edit.blade.php
Normal file
@@ -0,0 +1,79 @@
|
||||
@extends('layouts.admin')
|
||||
|
||||
@section('title', trans('general.title.edit', ['type' => trans_choice('general.users', 1)]))
|
||||
|
||||
@section('content')
|
||||
<!-- Default box -->
|
||||
<div class="box box-success">
|
||||
{!! Form::model($user, [
|
||||
'method' => 'PATCH',
|
||||
'files' => true,
|
||||
'url' => ['auth/users', $user->id],
|
||||
'role' => 'form'
|
||||
]) !!}
|
||||
|
||||
<div class="box-body">
|
||||
{{ Form::textGroup('name', trans('general.name'), 'id-card-o') }}
|
||||
|
||||
{{ Form::emailGroup('email', trans('general.email'), 'envelope') }}
|
||||
|
||||
{{ Form::passwordGroup('password', trans('auth.password.current'), 'key', []) }}
|
||||
|
||||
{{ Form::passwordGroup('password_confirmation', trans('auth.password.current_confirm'), 'key', []) }}
|
||||
|
||||
{{ Form::selectGroup('locale', trans_choice('general.languages', 1), 'flag', language()->allowed()) }}
|
||||
|
||||
{{ Form::fileGroup('picture', trans_choice('general.pictures', 1)) }}
|
||||
|
||||
@permission('read-companies-companies')
|
||||
{{ Form::checkboxGroup('companies', trans_choice('general.companies', 2), $companies, 'company_name') }}
|
||||
@endpermission
|
||||
|
||||
@permission('read-auth-roles')
|
||||
{{ Form::checkboxGroup('roles', trans_choice('general.roles', 2), $roles, 'display_name') }}
|
||||
@endpermission
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
|
||||
@permission('update-auth-users')
|
||||
<div class="box-footer">
|
||||
{{ Form::saveButtons('auth/users') }}
|
||||
</div>
|
||||
<!-- /.box-footer -->
|
||||
@endpermission
|
||||
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('js')
|
||||
<script src="{{ asset('public/js/bootstrap-fancyfile.js') }}"></script>
|
||||
<script src="{{ asset('vendor/almasaeed2010/adminlte/plugins/iCheck/icheck.min.js') }}"></script>
|
||||
@endsection
|
||||
|
||||
@section('css')
|
||||
<link rel="stylesheet" href="{{ asset('public/css/bootstrap-fancyfile.css') }}">
|
||||
<link rel="stylesheet" href="{{ asset('vendor/almasaeed2010/adminlte/plugins/iCheck/square/green.css') }}">
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
$("#locale").select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.languages', 1)]) }}"
|
||||
});
|
||||
|
||||
$('#picture').fancyfile({
|
||||
text : '{{ trans('general.form.select.file') }}',
|
||||
style : 'btn-default',
|
||||
placeholder : '<?php echo $user->picture; ?>'
|
||||
});
|
||||
|
||||
$('input').iCheck({
|
||||
checkboxClass: 'icheckbox_square-green',
|
||||
radioClass: 'iradio_square-green',
|
||||
increaseArea: '20%' // optional
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
70
resources/views/auth/users/index.blade.php
Normal file
70
resources/views/auth/users/index.blade.php
Normal file
@@ -0,0 +1,70 @@
|
||||
@extends('layouts.admin')
|
||||
|
||||
@section('title', trans_choice('general.users', 2))
|
||||
|
||||
@permission('create-auth-users')
|
||||
@section('new_button')
|
||||
<span class="new-button"><a href="{{ url('auth/users/create') }}" class="btn btn-success btn-sm"><span class="fa fa-plus"></span> {{ trans('general.add_new') }}</a></span>
|
||||
@endsection
|
||||
@endpermission
|
||||
|
||||
@section('content')
|
||||
<!-- Default box -->
|
||||
<div class="box box-success">
|
||||
<div class="box-header">
|
||||
{!! Form::open(['url' => 'auth/users', 'role' => 'form', 'method' => 'GET']) !!}
|
||||
<div class="pull-left">
|
||||
<span class="title-filter">{{ trans('general.search') }}:</span>
|
||||
{!! Form::text('search', request('search'), ['class' => 'form-control input-filter input-sm', 'placeholder' => trans('general.search_placeholder')]) !!}
|
||||
{!! Form::select('role', $roles, request('role'), ['class' => 'form-control input-filter input-sm', 'placeholder' => trans('roles.all')]) !!}
|
||||
{!! Form::button('<span class="fa fa-filter"></span> ' . trans('general.filter'), ['type' => 'submit', 'class' => 'btn btn-sm btn-default btn-filter']) !!}
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<span class="title-filter">{{ trans('general.show') }}:</span>
|
||||
{!! Form::select('limit', $limits, request('limit', setting('general.list_limit', '25')), ['class' => 'form-control input-filter input-sm', 'onchange' => 'this.form.submit()']) !!}
|
||||
</div>
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
<div class="box-body">
|
||||
<div class="table table-responsive">
|
||||
<table class="table table-bordered table-striped table-hover" id="tbl-users">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>@sortablelink('name', trans('general.name'))</th>
|
||||
<th>@sortablelink('email', trans('general.email'))</th>
|
||||
<th>@sortablelink('roles', trans_choice('general.roles', 2))</th>
|
||||
<th style="width: 15%;">{{ trans('general.actions') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($users as $item)
|
||||
<tr>
|
||||
<td><a href="{{ url('auth/users/' . $item->id . '/edit') }}"><img src="{{ asset($item->picture) }}" class="users-image" alt="{{ $item->name }}" title="{{ $item->name }}"> {{ $item->name }}</a></td>
|
||||
<td>{{ $item->email }}</td>
|
||||
<td style="vertical-align: middle;">
|
||||
@foreach($item->roles as $role)
|
||||
<label class="label label-default">{{ $role->display_name }}</label>
|
||||
@endforeach
|
||||
</td>
|
||||
<td>
|
||||
<a href="{{ url('auth/users/' . $item->id . '/edit') }}" class="btn btn-primary btn-xs"><i class="fa fa-pencil-square-o" aria-hidden="true"></i> {{ trans('general.edit') }}</a>
|
||||
@permission('delete-auth-users')
|
||||
{!! Form::deleteButton($item, 'auth/users') !!}
|
||||
@endpermission
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
<div class="box-footer">
|
||||
@include('partials.admin.pagination', ['items' => $users, 'type' => 'users'])
|
||||
</div>
|
||||
<!-- /.box-footer -->
|
||||
</div>
|
||||
<!-- /.box -->
|
||||
@endsection
|
||||
|
||||
55
resources/views/banking/accounts/create.blade.php
Normal file
55
resources/views/banking/accounts/create.blade.php
Normal file
@@ -0,0 +1,55 @@
|
||||
@extends('layouts.admin')
|
||||
|
||||
@section('title', trans('general.title.new', ['type' => trans_choice('general.accounts', 1)]))
|
||||
|
||||
@section('content')
|
||||
<!-- Default box -->
|
||||
<div class="box box-success">
|
||||
{!! Form::open(['url' => 'banking/accounts', 'role' => 'form']) !!}
|
||||
|
||||
<div class="box-body">
|
||||
{{ Form::textGroup('name', trans('general.name'), 'id-card-o') }}
|
||||
|
||||
{{ Form::textGroup('number', trans('accounts.number'), 'pencil') }}
|
||||
|
||||
{{ Form::selectGroup('currency_code', trans_choice('general.currencies', 1), 'exchange', $currencies, setting('general.default_currency')) }}
|
||||
|
||||
{{ Form::textGroup('opening_balance', trans('accounts.opening_balance'), 'money', ['required' => 'required'], 0) }}
|
||||
|
||||
{{ Form::textGroup('bank_name', trans('accounts.bank_name'), 'university', []) }}
|
||||
|
||||
{{ Form::textGroup('bank_phone', trans('accounts.bank_phone'), 'phone', []) }}
|
||||
|
||||
{{ Form::textareaGroup('bank_address', trans('accounts.bank_address')) }}
|
||||
|
||||
{{ Form::radioGroup('default_account', trans('accounts.default_account')) }}
|
||||
|
||||
{{ Form::radioGroup('enabled', trans('general.enabled')) }}
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
|
||||
<div class="box-footer">
|
||||
{{ Form::saveButtons('banking/accounts') }}
|
||||
</div>
|
||||
<!-- /.box-footer -->
|
||||
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
<script type="text/javascript">
|
||||
var text_yes = '{{ trans('general.yes') }}';
|
||||
var text_no = '{{ trans('general.no') }}';
|
||||
|
||||
$(document).ready(function(){
|
||||
$('#enabled_1').trigger('click');
|
||||
|
||||
$('#name').focus();
|
||||
|
||||
$("#currency_code").select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.currencies', 1)]) }}"
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
57
resources/views/banking/accounts/edit.blade.php
Normal file
57
resources/views/banking/accounts/edit.blade.php
Normal file
@@ -0,0 +1,57 @@
|
||||
@extends('layouts.admin')
|
||||
|
||||
@section('title', trans('general.title.edit', ['type' => trans_choice('general.accounts', 1)]))
|
||||
|
||||
@section('content')
|
||||
<!-- Default box -->
|
||||
<div class="box box-success">
|
||||
{!! Form::model($account, [
|
||||
'method' => 'PATCH',
|
||||
'url' => ['banking/accounts', $account->id],
|
||||
'role' => 'form'
|
||||
]) !!}
|
||||
|
||||
<div class="box-body">
|
||||
{{ Form::textGroup('name', trans('general.name'), 'id-card-o') }}
|
||||
|
||||
{{ Form::textGroup('number', trans('accounts.number'), 'pencil') }}
|
||||
|
||||
{{ Form::selectGroup('currency_code', trans_choice('general.currencies', 1), 'exchange', $currencies) }}
|
||||
|
||||
{{ Form::textGroup('opening_balance', trans('accounts.opening_balance'), 'money') }}
|
||||
|
||||
{{ Form::textGroup('bank_name', trans('accounts.bank_name'), 'university', []) }}
|
||||
|
||||
{{ Form::textGroup('bank_phone', trans('accounts.bank_phone'), 'phone', []) }}
|
||||
|
||||
{{ Form::textareaGroup('bank_address', trans('accounts.bank_address')) }}
|
||||
|
||||
{{ Form::radioGroup('default_account', trans('accounts.default_account')) }}
|
||||
|
||||
{{ Form::radioGroup('enabled', trans('general.enabled')) }}
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
|
||||
@permission('update-accounts')
|
||||
<div class="box-footer">
|
||||
{{ Form::saveButtons('banking/accounts') }}
|
||||
</div>
|
||||
<!-- /.box-footer -->
|
||||
@endpermission
|
||||
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
<script type="text/javascript">
|
||||
var text_yes = '{{ trans('general.yes') }}';
|
||||
var text_no = '{{ trans('general.no') }}';
|
||||
|
||||
$(document).ready(function(){
|
||||
$("#currency_code").select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.currencies', 1)]) }}"
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
75
resources/views/banking/accounts/index.blade.php
Normal file
75
resources/views/banking/accounts/index.blade.php
Normal file
@@ -0,0 +1,75 @@
|
||||
@extends('layouts.admin')
|
||||
|
||||
@section('title', trans_choice('general.accounts', 2))
|
||||
|
||||
@permission('create-banking-accounts')
|
||||
@section('new_button')
|
||||
<span class="new-button"><a href="{{ url('banking/accounts/create') }}" class="btn btn-success btn-sm"><span class="fa fa-plus"></span> {{ trans('general.add_new') }}</a></span>
|
||||
@endsection
|
||||
@endpermission
|
||||
|
||||
@section('content')
|
||||
<!-- Default box -->
|
||||
<div class="box box-success">
|
||||
<div class="box-header">
|
||||
{!! Form::open(['url' => 'banking/accounts', 'role' => 'form', 'method' => 'GET']) !!}
|
||||
<div class="pull-left">
|
||||
<span class="title-filter">{{ trans('general.search') }}:</span>
|
||||
{!! Form::text('search', request('search'), ['class' => 'form-control input-filter input-sm', 'placeholder' => trans('general.search_placeholder')]) !!}
|
||||
{!! Form::button('<span class="fa fa-filter"></span> ' . trans('general.filter'), ['type' => 'submit', 'class' => 'btn btn-sm btn-default btn-filter']) !!}
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<span class="title-filter">{{ trans('general.show') }}:</span>
|
||||
{!! Form::select('limit', $limits, request('limit', setting('general.list_limit', '25')), ['class' => 'form-control input-filter input-sm', 'onchange' => 'this.form.submit()']) !!}
|
||||
</div>
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
|
||||
<div class="box-body">
|
||||
<div class="table table-responsive">
|
||||
<table class="table table-bordered table-striped table-hover" id="tbl-accounts">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>@sortablelink('name', trans('general.name'))</th>
|
||||
<th>@sortablelink('number', trans('accounts.number'))</th>
|
||||
<th>@sortablelink('opening_balance', trans('accounts.current_balance'))</th>
|
||||
<th>@sortablelink('enabled', trans('general.status'))</th>
|
||||
<th style="width: 15%;">{{ trans('general.actions') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($accounts as $item)
|
||||
<tr>
|
||||
<td><a href="{{ url('banking/accounts/' . $item->id . '/edit') }}">{{ $item->name }}</a></td>
|
||||
<td>{{ $item->number }}</td>
|
||||
<td>@money($item->balance, $item->currency_code, true)</td>
|
||||
<td>
|
||||
@if ($item->enabled)
|
||||
<span class="label label-success">{{ trans('general.enabled') }}</span>
|
||||
@else
|
||||
<span class="label label-danger">{{ trans('general.disabled') }}</span>
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
<a href="{{ url('banking/accounts/' . $item->id . '/edit') }}" class="btn btn-primary btn-xs"><i class="fa fa-pencil-square-o" aria-hidden="true"></i> {{ trans('general.edit') }}</a>
|
||||
@permission('delete-banking-accounts')
|
||||
{!! Form::deleteButton($item, 'banking/accounts') !!}
|
||||
@endpermission
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
|
||||
<div class="box-footer">
|
||||
@include('partials.admin.pagination', ['items' => $accounts, 'type' => 'accounts'])
|
||||
</div>
|
||||
<!-- /.box-footer -->
|
||||
</div>
|
||||
<!-- /.box -->
|
||||
@endsection
|
||||
|
||||
58
resources/views/banking/transactions/index.blade.php
Normal file
58
resources/views/banking/transactions/index.blade.php
Normal file
@@ -0,0 +1,58 @@
|
||||
@extends('layouts.admin')
|
||||
|
||||
@section('title', trans_choice('general.transactions', 2))
|
||||
|
||||
@section('content')
|
||||
<!-- Default box -->
|
||||
<div class="box box-success">
|
||||
<div class="box-header">
|
||||
{!! Form::open(['url' => 'banking/transactions', 'role' => 'form', 'method' => 'GET']) !!}
|
||||
<div class="pull-left">
|
||||
<span class="title-filter">{{ trans('general.search') }}:</span>
|
||||
{!! Form::text('search', request('search'), ['class' => 'form-control input-filter input-sm', 'placeholder' => trans('general.search_placeholder')]) !!}
|
||||
{!! Form::button('<span class="fa fa-filter"></span> ' . trans('general.filter'), ['type' => 'submit', 'class' => 'btn btn-sm btn-default btn-filter']) !!}
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<span class="title-filter">{{ trans('general.show') }}:</span>
|
||||
{!! Form::select('limit', $limits, request('limit', setting('general.list_limit', '25')), ['class' => 'form-control input-filter input-sm', 'onchange' => 'this.form.submit()']) !!}
|
||||
</div>
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
|
||||
<div class="box-body">
|
||||
<div class="table table-responsive">
|
||||
<table class="table table-bordered table-striped table-hover" id="tbl-transactions">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>@sortablelink('paid_at', trans('general.date'))</th>
|
||||
<th>@sortablelink('account.name', trans('accounts.account_name'))</th>
|
||||
<th>@sortablelink('type', trans_choice('general.types', 1))</th>
|
||||
<th>@sortablelink('category.name', trans_choice('general.categories', 1))</th>
|
||||
<th>@sortablelink('description', trans('general.description'))</th>
|
||||
<th>@sortablelink('amount', trans('general.amount'))</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($transactions as $item)
|
||||
<tr>
|
||||
<td>{{ Date::parse($item->paid_at)->format($date_format) }}</td>
|
||||
<td>{{ $item->account_name }}</td>
|
||||
<td>{{ $item->type }}</td>
|
||||
<td>{{ $item->category_name }}</td>
|
||||
<td>{{ $item->description }}</td>
|
||||
<td>@money($item->amount, $item->currency_code, true)</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
|
||||
<div class="box-footer">
|
||||
</div>
|
||||
<!-- /.box-footer -->
|
||||
</div>
|
||||
<!-- /.box -->
|
||||
@endsection
|
||||
66
resources/views/banking/transfers/create.blade.php
Normal file
66
resources/views/banking/transfers/create.blade.php
Normal file
@@ -0,0 +1,66 @@
|
||||
@extends('layouts.admin')
|
||||
|
||||
@section('title', trans('general.title.new', ['type' => trans_choice('general.transfers', 1)]))
|
||||
|
||||
@section('content')
|
||||
<!-- Default box -->
|
||||
<div class="box box-success">
|
||||
{!! Form::open(['url' => 'banking/transfers', 'role' => 'form']) !!}
|
||||
|
||||
<div class="box-body">
|
||||
{{ Form::selectGroup('from_account_id', trans('transfers.from_account'), 'university', $accounts) }}
|
||||
|
||||
{{ Form::selectGroup('to_account_id', trans('transfers.to_account'), 'university', $accounts) }}
|
||||
|
||||
{{ Form::textGroup('amount', trans('general.amount'), 'money') }}
|
||||
|
||||
{{ Form::textGroup('transferred_at', trans('general.date'), 'calendar',['id' => 'transferred_at', 'required' => 'required', 'data-inputmask' => '\'alias\': \'yyyy-mm-dd\'', 'data-mask' => ''], Date::now()->toDateString()) }}
|
||||
|
||||
{{ Form::textareaGroup('description', trans('general.description')) }}
|
||||
|
||||
{{ Form::selectGroup('payment_method', trans_choice('general.payment_methods', 1), 'credit-card', ['cash' => 'Cash', 'bank' => 'Bank Transfer', 'paypal' => 'PayPal'], setting('general.default_payment_method')) }}
|
||||
|
||||
{{ Form::textGroup('reference', trans('general.reference'), 'file-text-o', []) }}
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
|
||||
<div class="box-footer">
|
||||
{{ Form::saveButtons('banking/transfers') }}
|
||||
</div>
|
||||
<!-- /.box-footer -->
|
||||
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('js')
|
||||
<script src="{{ asset('vendor/almasaeed2010/adminlte/plugins/datepicker/bootstrap-datepicker.js') }}"></script>
|
||||
@endsection
|
||||
|
||||
@section('css')
|
||||
<link rel="stylesheet" href="{{ asset('vendor/almasaeed2010/adminlte/plugins/datepicker/datepicker3.css') }}">
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
//Date picker
|
||||
$('#transferred_at').datepicker({
|
||||
format: 'yyyy-mm-dd',
|
||||
autoclose: true
|
||||
});
|
||||
|
||||
$("#from_account_id").select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.accounts', 1)]) }}"
|
||||
});
|
||||
|
||||
$("#to_account_id").select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.accounts', 1)]) }}"
|
||||
});
|
||||
|
||||
$("#payment_method").select2({
|
||||
placeholder: "{{ trans_choice('general.payment_methods', 1) }}"
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
72
resources/views/banking/transfers/edit.blade.php
Normal file
72
resources/views/banking/transfers/edit.blade.php
Normal file
@@ -0,0 +1,72 @@
|
||||
@extends('layouts.admin')
|
||||
|
||||
@section('title', trans('general.title.edit', ['type' => trans_choice('general.transfers', 1)]))
|
||||
|
||||
@section('content')
|
||||
<!-- Default box -->
|
||||
<div class="box box-success">
|
||||
{!! Form::model($transfer, [
|
||||
'method' => 'PATCH',
|
||||
'url' => ['banking/transfers', $transfer->id],
|
||||
'role' => 'form'
|
||||
]) !!}
|
||||
|
||||
<div class="box-body">
|
||||
{{ Form::selectGroup('from_account_id', trans('transfers.from_account'), 'university', $accounts) }}
|
||||
|
||||
{{ Form::selectGroup('to_account_id', trans('transfers.to_account'), 'university', $accounts) }}
|
||||
|
||||
{{ Form::textGroup('amount', trans('general.amount'), 'money') }}
|
||||
|
||||
{{ Form::textGroup('transferred_at', trans('general.date'), 'calendar',['id' => 'transferred_at', 'required' => 'required', 'data-inputmask' => '\'alias\': \'yyyy-mm-dd\'', 'data-mask' => ''], Date::now()->toDateString()) }}
|
||||
|
||||
{{ Form::textareaGroup('description', trans('general.description')) }}
|
||||
|
||||
{{ Form::selectGroup('payment_method', trans_choice('general.payment_methods', 1), 'credit-card', ['cash' => 'Cash', 'bank' => 'Bank Transfer', 'paypal' => 'PayPal'], setting('general.default_payment_method')) }}
|
||||
|
||||
{{ Form::textGroup('reference', trans('general.reference'), 'file-text-o', []) }}
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
|
||||
@permission('update-banking-transfers')
|
||||
<div class="box-footer">
|
||||
{{ Form::saveButtons('banking/transfers') }}
|
||||
</div>
|
||||
<!-- /.box-footer -->
|
||||
@endpermission
|
||||
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('js')
|
||||
<script src="{{ asset('vendor/almasaeed2010/adminlte/plugins/datepicker/bootstrap-datepicker.js') }}"></script>
|
||||
@endsection
|
||||
|
||||
@section('css')
|
||||
<link rel="stylesheet" href="{{ asset('vendor/almasaeed2010/adminlte/plugins/datepicker/datepicker3.css') }}">
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
//Date picker
|
||||
$('#transferred_at').datepicker({
|
||||
format: 'yyyy-mm-dd',
|
||||
autoclose: true
|
||||
});
|
||||
|
||||
$("#from_account_id").select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.accounts', 1)]) }}"
|
||||
});
|
||||
|
||||
$("#to_account_id").select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.accounts', 1)]) }}"
|
||||
});
|
||||
|
||||
$("#payment_method").select2({
|
||||
placeholder: "{{ trans_choice('general.payment_methods', 1) }}"
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
62
resources/views/banking/transfers/index.blade.php
Normal file
62
resources/views/banking/transfers/index.blade.php
Normal file
@@ -0,0 +1,62 @@
|
||||
@extends('layouts.admin')
|
||||
|
||||
@section('title', trans_choice('general.transfers', 2))
|
||||
|
||||
@permission('create-banking-transfers')
|
||||
@section('new_button')
|
||||
<span class="new-button"><a href="{{ url('banking/transfers/create') }}" class="btn btn-success btn-sm"><span class="fa fa-plus"></span> {{ trans('general.add_new') }}</a></span>
|
||||
@endsection
|
||||
@endpermission
|
||||
|
||||
@section('content')
|
||||
<!-- Default box -->
|
||||
<div class="box box-success">
|
||||
<div class="box-header">
|
||||
{!! Form::open(['url' => 'banking/transfers', 'role' => 'form', 'method' => 'GET']) !!}
|
||||
<div class="pull-left">
|
||||
<span class="title-filter">{{ trans('general.search') }}:</span>
|
||||
{!! Form::select('from_account', $accounts, request('from_account'), ['class' => 'form-control input-filter input-sm', 'placeholder' => trans('accounts.all')]) !!}
|
||||
{!! Form::select('to_account', $accounts, request('to_account'), ['class' => 'form-control input-filter input-sm', 'placeholder' => trans('accounts.all')]) !!}
|
||||
{!! Form::button('<span class="fa fa-filter"></span> ' . trans('general.filter'), ['type' => 'submit', 'class' => 'btn btn-sm btn-default btn-filter']) !!}
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<span class="title-filter">{{ trans('general.show') }}:</span>
|
||||
{!! Form::select('limit', $limits, request('limit', setting('general.list_limit', '25')), ['class' => 'form-control input-filter input-sm', 'onchange' => 'this.form.submit()']) !!}
|
||||
</div>
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
|
||||
<div class="box-body">
|
||||
<div class="table table-responsive">
|
||||
<table class="table table-bordered table-striped table-hover" id="tbl-transfers">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>@sortablelink('payment.paid_at', trans('general.date'))</th>
|
||||
<th>@sortablelink('payment.name', trans('transfers.from_account'))</th>
|
||||
<th>@sortablelink('revenue.name', trans('transfers.to_account'))</th>
|
||||
<th>@sortablelink('payment.amount', trans('general.amount'))</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($transfers as $item)
|
||||
<tr>
|
||||
<td>{{ Date::parse($item->paid_at)->format($date_format) }}</td>
|
||||
<td>{{ $item->from_account }}</td>
|
||||
<td>{{ $item->to_account }}</td>
|
||||
<td>@money($item->amount, $item->currency_code, true)</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
|
||||
<div class="box-footer">
|
||||
@include('partials.admin.pagination', ['items' => $items, 'type' => 'transfers'])
|
||||
</div>
|
||||
<!-- /.box-footer -->
|
||||
</div>
|
||||
<!-- /.box -->
|
||||
@endsection
|
||||
55
resources/views/companies/companies/create.blade.php
Normal file
55
resources/views/companies/companies/create.blade.php
Normal file
@@ -0,0 +1,55 @@
|
||||
@extends('layouts.admin')
|
||||
|
||||
@section('title', trans('general.title.new', ['type' => trans_choice('general.companies', 1)]))
|
||||
|
||||
@section('content')
|
||||
<!-- Default box -->
|
||||
<div class="box box-success">
|
||||
{!! Form::open(['url' => 'companies/companies', 'files' => true, 'role' => 'form']) !!}
|
||||
<div class="box-body">
|
||||
{{ Form::textGroup('company_name', trans('general.name'), 'id-card-o') }}
|
||||
|
||||
{{ Form::textGroup('domain', trans('companies.domain'), 'globe') }}
|
||||
|
||||
{{ Form::emailGroup('company_email', trans('general.email'), 'envelope') }}
|
||||
|
||||
{{ Form::selectGroup('default_currency', trans_choice('general.currencies', 1), 'money', $currencies) }}
|
||||
|
||||
{{ Form::textareaGroup('company_address', trans('general.address')) }}
|
||||
|
||||
{{ Form::fileGroup('company_logo', trans('companies.logo')) }}
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
|
||||
<div class="box-footer">
|
||||
{{ Form::saveButtons('companies/companies') }}
|
||||
</div>
|
||||
<!-- /.box-footer -->
|
||||
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('js')
|
||||
<script src="{{ asset('public/js/bootstrap-fancyfile.js') }}"></script>
|
||||
@endsection
|
||||
|
||||
@section('css')
|
||||
<link rel="stylesheet" href="{{ asset('public/css/bootstrap-fancyfile.css') }}">
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
$("#default_currency").select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.currencies', 1)]) }}"
|
||||
});
|
||||
|
||||
$('#company_logo').fancyfile({
|
||||
text : '{{ trans('general.form.select.file') }}',
|
||||
style : 'btn-default',
|
||||
placeholder : '{{ trans('general.form.no_file_selected') }}'
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
63
resources/views/companies/companies/edit.blade.php
Normal file
63
resources/views/companies/companies/edit.blade.php
Normal file
@@ -0,0 +1,63 @@
|
||||
@extends('layouts.admin')
|
||||
|
||||
@section('title', trans('general.title.edit', ['type' => trans_choice('general.companies', 1)]))
|
||||
|
||||
@section('content')
|
||||
<!-- Default box -->
|
||||
<div class="box box-success">
|
||||
{!! Form::model($company, [
|
||||
'method' => 'PATCH',
|
||||
'url' => ['companies/companies', $company->id],
|
||||
'files' => true,
|
||||
'role' => 'form'
|
||||
]) !!}
|
||||
|
||||
<div class="box-body">
|
||||
{{ Form::textGroup('company_name', trans('general.name'), 'id-card-o') }}
|
||||
|
||||
{{ Form::textGroup('domain', trans('companies.domain'), 'globe') }}
|
||||
|
||||
{{ Form::emailGroup('company_email', trans('general.email'), 'envelope') }}
|
||||
|
||||
{{ Form::selectGroup('default_currency', trans_choice('general.currencies', 1), 'money', $currencies) }}
|
||||
|
||||
{{ Form::textareaGroup('company_address', trans('general.address')) }}
|
||||
|
||||
{{ Form::fileGroup('company_logo', trans('companies.logo')) }}
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
|
||||
@permission('update-companies-companies')
|
||||
<div class="box-footer">
|
||||
{{ Form::saveButtons('companies/companies') }}
|
||||
</div>
|
||||
<!-- /.box-footer -->
|
||||
@endpermission
|
||||
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('js')
|
||||
<script src="{{ asset('public/js/bootstrap-fancyfile.js') }}"></script>
|
||||
@endsection
|
||||
|
||||
@section('css')
|
||||
<link rel="stylesheet" href="{{ asset('public/css/bootstrap-fancyfile.css') }}">
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
$("#default_currency").select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.currencies', 1)]) }}"
|
||||
});
|
||||
|
||||
$('#company_logo').fancyfile({
|
||||
text : '{{ trans('general.form.select.file') }}',
|
||||
style : 'btn-default',
|
||||
placeholder : '<?php echo $company->company_logo; ?>'
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
64
resources/views/companies/companies/index.blade.php
Normal file
64
resources/views/companies/companies/index.blade.php
Normal file
@@ -0,0 +1,64 @@
|
||||
@extends('layouts.admin')
|
||||
|
||||
@section('title', trans_choice('general.companies', 2))
|
||||
|
||||
@permission('create-companies-companies')
|
||||
@section('new_button')
|
||||
<span class="new-button"><a href="{{ url('companies/companies/create') }}" class="btn btn-success btn-sm"><span class="fa fa-plus"></span> {{ trans('general.add_new') }}</a></span>
|
||||
@endsection
|
||||
@endpermission
|
||||
|
||||
@section('content')
|
||||
<!-- Default box -->
|
||||
|
||||
<div class="box box-success">
|
||||
<div class="box-header">
|
||||
{!! Form::open(['url' => 'companies/companies', 'role' => 'form', 'method' => 'GET']) !!}
|
||||
<div class="pull-left">
|
||||
<span class="title-filter">{{ trans('general.search') }}:</span>
|
||||
{!! Form::text('search', request('search'), ['class' => 'form-control input-filter input-sm', 'placeholder' => trans('general.search_placeholder')]) !!}
|
||||
{!! Form::button('<span class="fa fa-filter"></span> ' . trans('general.filter'), ['type' => 'submit', 'class' => 'btn btn-sm btn-default btn-filter']) !!}
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<span class="title-filter">{{ trans('general.show') }}:</span>
|
||||
{!! Form::select('limit', $limits, request('limit', setting('general.list_limit', '25')), ['class' => 'form-control input-filter input-sm', 'onchange' => 'this.form.submit()']) !!}
|
||||
</div>
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
|
||||
<div class="box-body">
|
||||
<div class="table table-responsive">
|
||||
<table class="table table-bordered table-striped table-hover" id="tbl-companies">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>@sortablelink('company_name', trans('general.name'))</th>
|
||||
<th>@sortablelink('domain', trans('companies.domain'))</th>
|
||||
<th>@sortablelink('company_email', trans('general.email'))</th>
|
||||
|
||||
<th style="width: 15%;">{{ trans('general.actions') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($companies as $item)
|
||||
<tr>
|
||||
<td><a href="{{ url('companies/companies/' . $item->id . '/edit') }}">{{ $item->company_name }}</a></td>
|
||||
<td>{{ $item->domain }}</td>
|
||||
<td>{{ $item->company_email }}</td>
|
||||
<td>
|
||||
<a href="{{ url('companies/companies/' . $item->id . '/edit') }}" class="btn btn-primary btn-xs"><i class="fa fa-pencil-square-o" aria-hidden="true"></i> {{ trans('general.edit') }}</a>
|
||||
@permission('delete-companies-companies')
|
||||
{!! Form::deleteButton($item, 'companies/companies', '', 'company_name') !!}
|
||||
@endpermission
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
</div>
|
||||
<!-- /.box -->
|
||||
@endsection
|
||||
|
||||
102
resources/views/customers/dashboard/index.blade.php
Normal file
102
resources/views/customers/dashboard/index.blade.php
Normal file
@@ -0,0 +1,102 @@
|
||||
@extends('layouts.customer')
|
||||
|
||||
@section('title', trans('general.dashboard'))
|
||||
|
||||
@section('content')
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<!-- Invoices List-->
|
||||
<div class="box box-success">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ trans_choice('general.invoices', 2) }}</h3>
|
||||
<div class="box-tools pull-right">
|
||||
<button type="button" class="btn btn-box-tool" data-widget="collapse">
|
||||
<i class="fa fa-minus"></i>
|
||||
</button>
|
||||
<button type="button" class="btn btn-box-tool" data-widget="remove"><i class="fa fa-times"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
@if ($user->invoices->count())
|
||||
<table class="table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ trans('invoices.invoice_number') }}</th>
|
||||
<th>{{ trans_choice('general.customers', 1) }}</th>
|
||||
<th>{{ trans('invoices.total_price') }}</th>
|
||||
<th>{{ trans('general.status') }}</th>
|
||||
<th>{{ trans('invoices.invoice_date') }}</th>
|
||||
<th style="width: 18%;">{{ trans('general.actions') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($user->invoices as $item)
|
||||
<tr>
|
||||
<td><a href="{{ url('customer/invoices/' . $item->id . '/edit') }}">{{ $item->invoice_number }}</a></td>
|
||||
<td>{{ $item->customer_name }}</td>
|
||||
<td>@money($item->amount, $item->currency_code, true)</td>
|
||||
<td>{{ $item->status->name }}</td>
|
||||
<td>{{ Date::parse($item->invoiced_at)->format($date_format) }}</td>
|
||||
<td>
|
||||
<a href="{{ url('customers/invoices/' . $item->id . '') }}" class="btn btn-info btn-xs"><i class="fa fa-eye" aria-hidden="true"></i> {{ trans('general.show') }}</a>
|
||||
<a href="{{ url('customers/invoices/' . $item->id . '/edit') }}" class="btn btn-primary btn-xs"><i class="fa fa-pencil-square-o" aria-hidden="true"></i> {{ trans('general.edit') }}</a>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
@else
|
||||
<h5 class="text-center">{{ trans('general.no_records') }}</h5>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<!-- Revenues List-->
|
||||
<div class="box box-success">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ trans_choice('general.payments', 2) }}</h3>
|
||||
<div class="box-tools pull-right">
|
||||
<button type="button" class="btn btn-box-tool" data-widget="collapse">
|
||||
<i class="fa fa-minus"></i>
|
||||
</button>
|
||||
<button type="button" class="btn btn-box-tool" data-widget="remove"><i class="fa fa-times"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
@if ($user->revenues->count())
|
||||
<table class="table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ trans('general.date') }}</th>
|
||||
<th>{{ trans('general.amount') }}</th>
|
||||
<th>{{ trans_choice('general.categories', 1) }}</th>
|
||||
<th>{{ trans_choice('general.accounts', 1) }}</th>
|
||||
<th style="width: 15%;">{{ trans('general.actions') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($user->revenues as $item)
|
||||
<tr>
|
||||
<td><a href="{{ url('customer/payments/' . $item->id . '') }}">{{ Date::parse($item->paid_at)->format($date_format) }}</a></td>
|
||||
<td>@money($item->amount, $item->currency_code, true)</td>
|
||||
<td>{{ $item->category->name }}</td>
|
||||
<td>{{ $item->account->name }}</td>
|
||||
<td>
|
||||
<a href="{{ url('customers/payments/' . $item->id . '') }}" class="btn btn-info btn-xs"><i class="fa fa-eye" aria-hidden="true"></i> {{ trans('general.show') }}</a>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
@else
|
||||
<h5 class="text-center">{{ trans('general.no_records') }}</h5>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
68
resources/views/customers/invoices/index.blade.php
Normal file
68
resources/views/customers/invoices/index.blade.php
Normal file
@@ -0,0 +1,68 @@
|
||||
@extends('layouts.customer')
|
||||
|
||||
@section('title', trans_choice('general.invoices', 2))
|
||||
|
||||
@permission('create-customers-invoices')
|
||||
@section('new_button')
|
||||
<span class="new-button"><a href="{{ url('customers/invoices/create') }}" class="btn btn-success btn-sm"><span class="fa fa-plus"></span> {{ trans('general.add_new') }}</a></span>
|
||||
@endsection
|
||||
@endpermission
|
||||
|
||||
@section('content')
|
||||
<!-- Default box -->
|
||||
<div class="box box-success">
|
||||
<div class="box-header">
|
||||
{!! Form::open(['url' => 'customers/invoices', 'role' => 'form', 'method' => 'GET']) !!}
|
||||
<div class="pull-left">
|
||||
<span class="title-filter">{{ trans('general.search') }}:</span>
|
||||
{!! Form::text('search', request('search'), ['class' => 'form-control input-filter input-sm', 'placeholder' => trans('general.search_placeholder')]) !!}
|
||||
{!! Form::select('status', $status, request('status'), ['class' => 'form-control input-filter input-sm', 'placeholder' => trans('status.all')]) !!}
|
||||
{!! Form::button('<span class="fa fa-filter"></span> ' . trans('general.filter'), ['type' => 'submit', 'class' => 'btn btn-sm btn-default btn-filter']) !!}
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<span class="title-filter">{{ trans('general.show') }}:</span>
|
||||
{!! Form::select('limit', $limits, request('limit', setting('general.list_limit', '25')), ['class' => 'form-control input-filter input-sm', 'onchange' => 'this.form.submit()']) !!}
|
||||
</div>
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
<div class="box-body">
|
||||
<div class="table table-responsive">
|
||||
<table class="table table-bordered table-striped table-hover" id="tbl-invoices">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>@sortablelink('invoice_number', trans('invoices.invoice_number'))</th>
|
||||
<th>@sortablelink('customer_name', trans_choice('general.customers', 1))</th>
|
||||
<th>@sortablelink('amount', trans('invoices.total_price'))</th>
|
||||
<th>@sortablelink('status.name', trans('general.status'))</th>
|
||||
<th>@sortablelink('invoiced_at', trans('invoices.invoice_date'))</th>
|
||||
<th>@sortablelink('due_at', trans('invoices.due_date'))</th>
|
||||
<th style="width: 18%;">{{ trans('general.actions') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($invoices as $item)
|
||||
<tr>
|
||||
<td><a href="{{ url('customers/invoices/' . $item->id . '/edit') }}">{{ $item->invoice_number }}</a></td>
|
||||
<td>{{ $item->customer_name }}</td>
|
||||
<td>@money($item->amount, $item->currency_code, true)</td>
|
||||
<td>{{ $item->status->name }}</td>
|
||||
<td>{{ Date::parse($item->invoiced_at)->format($date_format) }}</td>
|
||||
<td>{{ Date::parse($item->due_at)->format($date_format) }}</td>
|
||||
<td>
|
||||
<a href="{{ url('customers/invoices/' . $item->id . '') }}" class="btn btn-info btn-xs"><i class="fa fa-eye" aria-hidden="true"></i> {{ trans('general.show') }}</a>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
<div class="box-footer">
|
||||
@include('partials.admin.pagination', ['items' => $invoices, 'type' => 'invoices'])
|
||||
</div>
|
||||
<!-- /.box-footer -->
|
||||
</div>
|
||||
<!-- /.box -->
|
||||
@endsection
|
||||
141
resources/views/customers/invoices/invoice.blade.php
Normal file
141
resources/views/customers/invoices/invoice.blade.php
Normal file
@@ -0,0 +1,141 @@
|
||||
@extends('layouts.invoice')
|
||||
|
||||
@section('title', trans_choice('general.invoices', 1) . ': ' . $invoice->invoice_number)
|
||||
|
||||
@section('content')
|
||||
<section class="invoice">
|
||||
<div class="row invoice-header">
|
||||
<div class="col-xs-7">
|
||||
@if (setting('general.invoice_logo'))
|
||||
<img src="{{ asset(setting('general.invoice_logo')) }}" class="invoice-logo" />
|
||||
@else
|
||||
<img src="{{ asset(setting('general.company_logo')) }}" class="invoice-logo" />
|
||||
@endif
|
||||
</div>
|
||||
<div class="col-xs-5 invoice-company">
|
||||
<address>
|
||||
<strong>{{ setting('general.company_name') }}</strong><br>
|
||||
{{ setting('general.company_address') }}<br>
|
||||
@if (setting('general.company_tax_number'))
|
||||
{{ trans('general.tax_number') }}: {{ setting('general.company_tax_number') }}<br>
|
||||
@endif
|
||||
<br>
|
||||
@if (setting('general.company_phone'))
|
||||
{{ setting('general.company_phone') }}<br>
|
||||
@endif
|
||||
{{ setting('general.company_email') }}
|
||||
</address>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-7">
|
||||
{{ trans('invoices.bill_to') }}
|
||||
<address>
|
||||
<strong>{{ $invoice->customer_name }}</strong><br>
|
||||
{{ $invoice->customer_address }}<br>
|
||||
@if ($invoice->customer_tax_number)
|
||||
{{ trans('general.tax_number') }}: {{ $invoice->customer_tax_number }}<br>
|
||||
@endif
|
||||
<br>
|
||||
@if ($invoice->customer_phone)
|
||||
{{ $invoice->customer_phone }}<br>
|
||||
@endif
|
||||
{{ $invoice->customer_email }}
|
||||
</address>
|
||||
</div>
|
||||
<div class="col-xs-5">
|
||||
<div class="table-responsive">
|
||||
<table class="table no-border">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>{{ trans('invoices.invoice_number') }}:</th>
|
||||
<td class="text-right">{{ $invoice->invoice_number }}</td>
|
||||
</tr>
|
||||
@if ($invoice->order_number)
|
||||
<tr>
|
||||
<th>{{ trans('invoices.order_number') }}:</th>
|
||||
<td class="text-right">{{ $invoice->order_number }}</td>
|
||||
</tr>
|
||||
@endif
|
||||
<tr>
|
||||
<th>{{ trans('invoices.invoice_date') }}:</th>
|
||||
<td class="text-right">{{ Date::parse($invoice->invoiced_at)->format($date_format) }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{ trans('invoices.payment_due') }}:</th>
|
||||
<td class="text-right">{{ Date::parse($invoice->due_at)->format($date_format) }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-12 table-responsive">
|
||||
<table class="table table-striped">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>{{ trans_choice('general.items', 1) }}</th>
|
||||
<th class="text-center">{{ trans('invoices.quantity') }}</th>
|
||||
<th class="text-right">{{ trans('invoices.price') }}</th>
|
||||
<th class="text-right">{{ trans('invoices.total') }}</th>
|
||||
</tr>
|
||||
@foreach($invoice->items as $item)
|
||||
<tr>
|
||||
<td>
|
||||
{{ $item->name }}
|
||||
@if ($item->sku)
|
||||
<br><small>{{ trans('items.sku') }}: {{ $item->sku }}</small>
|
||||
@endif
|
||||
</td>
|
||||
<td class="text-center">{{ $item->quantity }}</td>
|
||||
<td class="text-right">@money($item->price, $invoice->currency_code, true)</td>
|
||||
<td class="text-right">@money($item->total - $item->tax, $invoice->currency_code, true)</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-7">
|
||||
@if ($invoice->notes)
|
||||
<p class="lead">{{ trans_choice('general.notes', 2) }}</p>
|
||||
|
||||
<p class="text-muted well well-sm no-shadow" style="margin-top: 10px;">
|
||||
{{ $invoice->notes }}
|
||||
</p>
|
||||
@endif
|
||||
</div>
|
||||
<div class="col-xs-5">
|
||||
<div class="table-responsive">
|
||||
<table class="table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th style="max-width: 214px">{{ trans('invoices.sub_total') }}:</th>
|
||||
<td class="text-right">@money($invoice->sub_total, $invoice->currency_code, true)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{ trans('invoices.tax_total') }}:</th>
|
||||
<td class="text-right">@money($invoice->tax_total, $invoice->currency_code, true)</td>
|
||||
</tr>
|
||||
@if($invoice->paid)
|
||||
<tr>
|
||||
<th>{{ trans('invoices.paid') }}:</th>
|
||||
<td class="text-right">@money('-' . $invoice->paid, $invoice->currency_code, true)</td>
|
||||
</tr>
|
||||
@endif
|
||||
<tr>
|
||||
<th>{{ trans('invoices.total') }}:</th>
|
||||
<td class="text-right">@money($invoice->grand_total, $invoice->currency_code, true)</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
@endsection
|
||||
449
resources/views/customers/invoices/show.blade.php
Normal file
449
resources/views/customers/invoices/show.blade.php
Normal file
@@ -0,0 +1,449 @@
|
||||
@extends('layouts.customer')
|
||||
|
||||
@section('title', trans_choice('general.invoices', 1) . ': ' . $invoice->invoice_number)
|
||||
|
||||
@section('content')
|
||||
<div class="box box-success">
|
||||
<section class="invoice">
|
||||
<span class="badge bg-aqua">{{ $invoice->status->name }}</span>
|
||||
|
||||
<div class="row invoice-header">
|
||||
<div class="col-xs-7">
|
||||
@if (setting('general.invoice_logo'))
|
||||
<img src="{{ asset(setting('general.invoice_logo')) }}" class="invoice-logo" />
|
||||
@else
|
||||
<img src="{{ asset(setting('general.company_logo')) }}" class="invoice-logo" />
|
||||
@endif
|
||||
</div>
|
||||
<div class="col-xs-5 invoice-company">
|
||||
<address>
|
||||
<strong>{{ setting('general.company_name') }}</strong><br>
|
||||
{{ setting('general.company_address') }}<br>
|
||||
@if (setting('general.company_tax_number'))
|
||||
{{ trans('general.tax_number') }}: {{ setting('general.company_tax_number') }}<br>
|
||||
@endif
|
||||
<br>
|
||||
@if (setting('general.company_phone'))
|
||||
{{ setting('general.company_phone') }}<br>
|
||||
@endif
|
||||
{{ setting('general.company_email') }}
|
||||
</address>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-7">
|
||||
{{ trans('invoices.bill_to') }}
|
||||
<address>
|
||||
<strong>{{ $invoice->customer_name }}</strong><br>
|
||||
{{ $invoice->customer_address }}<br>
|
||||
@if ($invoice->customer_tax_number)
|
||||
{{ trans('general.tax_number') }}: {{ $invoice->customer_tax_number }}<br>
|
||||
@endif
|
||||
<br>
|
||||
@if ($invoice->customer_phone)
|
||||
{{ $invoice->customer_phone }}<br>
|
||||
@endif
|
||||
{{ $invoice->customer_email }}
|
||||
</address>
|
||||
</div>
|
||||
<div class="col-xs-5">
|
||||
<div class="table-responsive">
|
||||
<table class="table no-border">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>{{ trans('invoices.invoice_number') }}:</th>
|
||||
<td class="text-right">{{ $invoice->invoice_number }}</td>
|
||||
</tr>
|
||||
@if ($invoice->order_number)
|
||||
<tr>
|
||||
<th>{{ trans('invoices.order_number') }}:</th>
|
||||
<td class="text-right">{{ $invoice->order_number }}</td>
|
||||
</tr>
|
||||
@endif
|
||||
<tr>
|
||||
<th>{{ trans('invoices.invoice_date') }}:</th>
|
||||
<td class="text-right">{{ Date::parse($invoice->invoiced_at)->format($date_format) }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{ trans('invoices.payment_due') }}:</th>
|
||||
<td class="text-right">{{ Date::parse($invoice->due_at)->format($date_format) }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-12 table-responsive">
|
||||
<table class="table table-striped">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>{{ trans_choice('general.items', 1) }}</th>
|
||||
<th class="text-center">{{ trans('invoices.quantity') }}</th>
|
||||
<th class="text-right">{{ trans('invoices.price') }}</th>
|
||||
<th class="text-right">{{ trans('invoices.total') }}</th>
|
||||
</tr>
|
||||
@foreach($invoice->items as $item)
|
||||
<tr>
|
||||
<td>
|
||||
{{ $item->name }}
|
||||
@if ($item->sku)
|
||||
<br><small>{{ trans('items.sku') }}: {{ $item->sku }}</small>
|
||||
@endif
|
||||
</td>
|
||||
<td class="text-center">{{ $item->quantity }}</td>
|
||||
<td class="text-right">@money($item->price, $invoice->currency_code, true)</td>
|
||||
<td class="text-right">@money($item->total - $item->tax, $invoice->currency_code, true)</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-7">
|
||||
@if ($invoice->notes)
|
||||
<p class="lead">{{ trans_choice('general.notes', 2) }}</p>
|
||||
|
||||
<p class="text-muted well well-sm no-shadow" style="margin-top: 10px;">
|
||||
{{ $invoice->notes }}
|
||||
</p>
|
||||
@endif
|
||||
</div>
|
||||
<div class="col-xs-5">
|
||||
<div class="table-responsive">
|
||||
<table class="table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>{{ trans('invoices.sub_total') }}:</th>
|
||||
<td class="text-right">@money($invoice->sub_total, $invoice->currency_code, true)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{ trans('invoices.tax_total') }}:</th>
|
||||
<td class="text-right">@money($invoice->tax_total, $invoice->currency_code, true)</td>
|
||||
</tr>
|
||||
@if ($invoice->paid)
|
||||
<tr>
|
||||
<th>{{ trans('invoices.paid') }}:</th>
|
||||
<td class="text-right">@money('-' . $invoice->paid, $invoice->currency_code, true)</td>
|
||||
</tr>
|
||||
@endif
|
||||
<tr>
|
||||
<th>{{ trans('invoices.total') }}:</th>
|
||||
<td class="text-right">@money($invoice->grand_total, $invoice->currency_code, true)</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="box-footer row no-print">
|
||||
<div class="col-md-12">
|
||||
<a href="{{ url('incomes/invoices/' . $invoice->id . '/print') }}" target="_blank" class="btn btn-default">
|
||||
<i class="fa fa-print"></i> {{ trans('general.print') }}
|
||||
</a>
|
||||
<button type="button" id="button-email" class="btn btn-default" data-toggle="tooltip" title="{{ trans('invoices.send_mail') }}">
|
||||
<i class="fa fa-envelope-o"></i> {{ trans('general.send') }}
|
||||
</button>
|
||||
<button type="button" id="button-pdf" class="btn btn-default" data-toggle="tooltip" title="{{ trans('invoices.download_pdf') }}">
|
||||
<i class="fa fa-file-pdf-o"></i> {{ trans('general.download') }}
|
||||
</button>
|
||||
<button type="button" id="button-payment" class="btn btn-success">
|
||||
<i class="fa fa-credit-card"></i> {{ trans('invoices.add_payment') }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<div class="col-xs-6 no-padding-left">
|
||||
<div class="box box-default collapsed-box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ trans('invoices.histories') }}</h3>
|
||||
|
||||
<div class="box-tools pull-right">
|
||||
<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-plus"></i></button>
|
||||
</div>
|
||||
<!-- /.box-tools -->
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div class="table-responsive">
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ trans('general.date') }}</th>
|
||||
<th>{{ trans('general.status') }}</th>
|
||||
<th>{{ trans('general.description') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($invoice->histories as $history)
|
||||
<tr>
|
||||
<td>{{ Date::parse($history->created_at)->format($date_format) }}</td>
|
||||
<td>{{ $history->status->name }}</td>
|
||||
<td>{{ $history->description }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-xs-6 no-padding-right">
|
||||
<div class="box box-default collapsed-box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ trans('invoices.payments') }}</h3>
|
||||
|
||||
<div class="box-tools pull-right">
|
||||
<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-plus"></i></button>
|
||||
</div>
|
||||
<!-- /.box-tools -->
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div class="table-responsive">
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ trans('general.date') }}</th>
|
||||
<th>{{ trans('general.amount') }}</th>
|
||||
<th>{{ trans_choice('general.accounts', 1) }}</th>
|
||||
<th style="width: 15%;">{{ trans('general.actions') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($invoice->payments as $payment)
|
||||
<tr>
|
||||
<td>{{ Date::parse($payment->paid_at)->format($date_format) }}</td>
|
||||
<td>@money($payment->amount, $payment->currency_code, true)</td>
|
||||
<td>{{ $payment->account->name }}</td>
|
||||
<td>
|
||||
<a href="{{ url('incomes/invoices/' . $payment->id . '') }}" class="btn btn-info btn-xs hidden"><i class="fa fa-eye" aria-hidden="true"></i> {{ trans('general.show') }}</a>
|
||||
<a href="{{ url('incomes/revenues/' . $payment->id . '/edit') }}" class="btn btn-primary btn-xs hidden"><i class="fa fa-pencil-square-o" aria-hidden="true"></i> {{ trans('general.edit') }}</a>
|
||||
{!! Form::open([
|
||||
'id' => 'invoice-payment-' . $payment->id,
|
||||
'method' => 'DELETE',
|
||||
'url' => ['incomes/invoices/paymentDestroy', $payment->id],
|
||||
'style' => 'display:inline'
|
||||
]) !!}
|
||||
{!! Form::button('<i class="fa fa-trash-o" aria-hidden="true"></i> ' . trans('general.delete'), array(
|
||||
'type' => 'button',
|
||||
'class' => 'btn btn-danger btn-xs',
|
||||
'title' => trans('general.delete'),
|
||||
'onclick' => 'confirmDelete("' . '#invoice-payment-' . $payment->id . '", "' . trans_choice('general.payments', 2) . '", "' . trans('general.delete_confirm', ['name' => '<strong>' . Date::parse($payment->paid_at)->format($date_format) . ' - ' . money($payment->amount, $payment->currency_code, true) . ' - ' . $payment->account->name . '</strong>', 'type' => strtolower(trans_choice('general.revenues', 1))]) . '", "' . trans('general.cancel') . '", "' . trans('general.delete') . '")'
|
||||
)) !!}
|
||||
{!! Form::close() !!}
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('js')
|
||||
<script src="{{ asset('vendor/almasaeed2010/adminlte/plugins/datepicker/bootstrap-datepicker.js') }}"></script>
|
||||
<script src="{{ asset('public/js/bootstrap-fancyfile.js') }}"></script>
|
||||
@endsection
|
||||
|
||||
@section('css')
|
||||
<link rel="stylesheet" href="{{ asset('vendor/almasaeed2010/adminlte/plugins/datepicker/datepicker3.css') }}">
|
||||
<link rel="stylesheet" href="{{ asset('public/css/bootstrap-fancyfile.css') }}">
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
$(document).on('click', '#button-payment', function (e) {
|
||||
$('#payment-modal').remove();
|
||||
|
||||
var html = '';
|
||||
|
||||
html += '<div class="modal fade" id="payment-modal" tabindex="-1" role="dialog" aria-labelledby="paymentModalLabel">';
|
||||
html += ' <div class="modal-dialog" role="document">';
|
||||
html += ' <div class="modal-content box box-success">';
|
||||
html += ' <div class="modal-header">';
|
||||
html += ' <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>';
|
||||
html += ' <h4 class="modal-title" id="paymentModalLabel">{{ trans('invoices.add_payment') }}</h4>';
|
||||
html += ' </div>';
|
||||
html += ' <div class="modal-body box-body">';
|
||||
html += ' <div class="form-group col-md-6 required">';
|
||||
html += ' {!! Form::label('paid_at', trans('general.date'), ['class' => 'control-label']) !!}';
|
||||
html += ' <div class="input-group">';
|
||||
html += ' <div class="input-group-addon"><i class="fa fa-calendar"></i></div>';
|
||||
html += ' {!! Form::text('paid_at', \Carbon\Carbon::now()->toDateString(), ['id' => 'paid_at', 'class' => 'form-control', 'required' => 'required', 'data-inputmask' => '\'alias\': \'yyyy-mm-dd\'', 'data-mask' => '']) !!}';
|
||||
html += ' </div>';
|
||||
html += ' </div>';
|
||||
html += ' <div class="form-group col-md-6 required">';
|
||||
html += ' {!! Form::label('amount', trans('general.amount'), ['class' => 'control-label']) !!}';
|
||||
html += ' <div class="input-group">';
|
||||
html += ' <div class="input-group-addon"><i class="fa fa-money"></i></div>';
|
||||
html += ' {!! Form::text('amount', $invoice->grand_total, ['class' => 'form-control', 'required' => 'required', 'placeholder' => trans('general.form.enter', ['field' => trans('general.amount')])]) !!}';
|
||||
html += ' </div>';
|
||||
html += ' </div>';
|
||||
html += ' <div class="form-group col-md-6 required">';
|
||||
html += ' {!! Form::label('account_id', trans_choice('general.accounts', 1), ['class' => 'control-label']) !!}';
|
||||
html += ' <div class="input-group">';
|
||||
html += ' <div class="input-group-addon"><i class="fa fa-university"></i></div>';
|
||||
html += ' {!! Form::select('account_id', $accounts, setting('general.default_account'), ['class' => 'form-control', 'required' => 'required', 'placeholder' => trans('general.form.select.field', ['field' => trans_choice('general.accounts', 1)])]) !!}';
|
||||
html += ' </div>';
|
||||
html += ' </div>';
|
||||
html += ' <div class="form-group col-md-6 required">';
|
||||
html += ' {!! Form::label('currency_code', trans_choice('general.currencies', 1), ['class' => 'control-label']) !!}';
|
||||
html += ' <div class="input-group">';
|
||||
html += ' <div class="input-group-addon"><i class="fa fa-exchange"></i></div>';
|
||||
html += ' {!! Form::text('currency', $currencies[$account_currency_code], ['id' => 'currency', 'class' => 'form-control', 'required' => 'required', 'disabled' => 'disabled']) !!}';
|
||||
html += ' {!! Form::hidden('currency_code', $account_currency_code, ['id' => 'currency_code', 'class' => 'form-control', 'required' => 'required']) !!}';
|
||||
html += ' </div>';
|
||||
html += ' </div>';
|
||||
html += ' <div class="form-group col-md-12">';
|
||||
html += ' {!! Form::label('description', trans('general.description'), ['class' => 'control-label']) !!}';
|
||||
html += ' {!! Form::textarea('description', null, ['class' => 'form-control', 'rows' => '3', 'placeholder' => trans('general.form.enter', ['field' => trans('general.description')])]) !!}';
|
||||
html += ' </div>';
|
||||
html += ' <div class="form-group col-md-6 required">';
|
||||
html += ' {!! Form::label('payment_method', trans_choice('general.payment_methods', 1), ['class' => 'control-label']) !!}';
|
||||
html += ' <div class="input-group">';
|
||||
html += ' <div class="input-group-addon"><i class="fa fa-folder-open-o"></i></div>';
|
||||
html += ' {!! Form::select('payment_method', $payment_methods, setting('general.default_payment_method'), ['class' => 'form-control', 'required' => 'required', 'placeholder' => trans('general.form.select.field', ['field' => trans_choice('general.payment_methods', 1)])]) !!}';
|
||||
html += ' </div>';
|
||||
html += ' </div>';
|
||||
html += ' <div class="form-group col-md-6">';
|
||||
html += ' {!! Form::label('reference', trans('general.reference'), ['class' => 'control-label']) !!}';
|
||||
html += ' <div class="input-group">';
|
||||
html += ' <div class="input-group-addon"><i class="fa fa-file-text-o"></i></div>';
|
||||
html += ' {!! Form::text('reference', null, ['class' => 'form-control', 'placeholder' => trans('general.form.enter', ['field' => trans('general.reference')])]) !!}';
|
||||
html += ' </div>';
|
||||
html += ' </div>';
|
||||
html += ' {!! Form::hidden('invoice_id', $invoice->id, ['id' => 'invoice_id', 'class' => 'form-control', 'required' => 'required']) !!}';
|
||||
html += ' </div>';
|
||||
html += ' <div class="modal-footer">';
|
||||
html += ' <button type="button" class="btn btn-default" data-dismiss="modal">{{ trans('general.cancel') }}</button>';
|
||||
html += ' <button type="button" onclick="addPayment();" class="btn btn-success">{{ trans('general.save') }}</button>';
|
||||
html += ' </div>';
|
||||
html += ' </div>';
|
||||
html += ' </div>';
|
||||
html += '</div>';
|
||||
|
||||
$('body').append(html);
|
||||
|
||||
$('#paid_at').datepicker({
|
||||
format: 'yyyy-mm-dd',
|
||||
autoclose: true
|
||||
});
|
||||
|
||||
$("#account_id").select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.accounts', 1)]) }}"
|
||||
});
|
||||
|
||||
$("#payment_method").select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.payment_methods', 1)]) }}"
|
||||
});
|
||||
|
||||
$('#payment-modal').modal('show');
|
||||
});
|
||||
|
||||
$(document).on('change', '#account_id', function (e) {
|
||||
$.ajax({
|
||||
url: '{{ url("settings/currencies/currency") }}',
|
||||
type: 'GET',
|
||||
dataType: 'JSON',
|
||||
data: 'account_id=' + $(this).val(),
|
||||
success: function(data) {
|
||||
$('#currency').val(data.currency_name);
|
||||
$('#currency_code').val(data.currency_code);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$(document).on('click', '#button-pdf', function (e) {
|
||||
location.href = "{{ url('incomes/invoices/' . $invoice->id . '/pdf') }}";
|
||||
});
|
||||
|
||||
$(document).on('click', '#button-email', function (e) {
|
||||
$('#email-modal').remove();
|
||||
|
||||
var html = '<div class="modal fade" id="email-modal" tabindex="-1" role="dialog" aria-labelledby="emailModalLabel">';
|
||||
html += ' <div class="modal-dialog" role="document">';
|
||||
html += ' <div class="modal-content">';
|
||||
html += ' <div class="modal-header">';
|
||||
html += ' <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>';
|
||||
html += ' <h4 class="modal-title" id="emailModalLabel">Overflowing text</h4>';
|
||||
html += ' </div>';
|
||||
html += ' <div class="modal-body">';
|
||||
html += ' N/A';
|
||||
html += ' </div>';
|
||||
html += ' <div class="modal-footer">';
|
||||
html += ' <button type="button" class="btn btn-default" data-dismiss="modal">{{ trans('general.cancel') }}</button>';
|
||||
html += ' <button type="button" class="btn btn-success">Save changes</button>';
|
||||
html += ' </div>';
|
||||
html += ' </div>';
|
||||
html += ' </div>';
|
||||
html += '</div>';
|
||||
|
||||
$('body').append(html);
|
||||
|
||||
$('#email-modal').modal('show');
|
||||
});
|
||||
});
|
||||
|
||||
function addPayment() {
|
||||
$('.help-block').remove();
|
||||
|
||||
$.ajax({
|
||||
url: '{{ url("incomes/invoices/payment") }}',
|
||||
type: 'POST',
|
||||
dataType: 'JSON',
|
||||
data: $('#payment-modal input[type=\'text\'], #payment-modal input[type=\'hidden\'], #payment-modal textarea, #payment-modal select'),
|
||||
headers: { 'X-CSRF-TOKEN': '{{ csrf_token() }}' },
|
||||
beforeSend: function() {
|
||||
$('#payment-modal .modal-content').append('<div id="loading" class="text-center"><i class="fa fa-spinner fa-spin fa-5x checkout-spin"></i></div>');
|
||||
},
|
||||
complete: function() {
|
||||
$('#loading').remove();
|
||||
},
|
||||
success: function(data) {
|
||||
$("#payment-modal").modal('hide');
|
||||
|
||||
location.reload();
|
||||
},
|
||||
error: function(data){
|
||||
var errors = data.responseJSON;
|
||||
|
||||
if (typeof errors !== 'undefined') {
|
||||
if (errors.paid_at) {
|
||||
$('#payment-modal #paid_at').parent().after('<p class="help-block">' + errors.paid_at + '</p>');
|
||||
}
|
||||
|
||||
if (errors.amount) {
|
||||
$('#payment-modal #amount').parent().after('<p class="help-block">' + errors.amount + '</p>');
|
||||
}
|
||||
|
||||
if (errors.account_id) {
|
||||
$('#payment-modal #account_id').parent().after('<p class="help-block">' + errors.account_id + '</p>');
|
||||
}
|
||||
|
||||
if (errors.currency_code) {
|
||||
$('#payment-modal #currency_code').parent().after('<p class="help-block">' + errors.currency_code + '</p>');
|
||||
}
|
||||
|
||||
if (errors.category_id) {
|
||||
$('#payment-modal #category_id').parent().after('<p class="help-block">' + errors.category_id + '</p>');
|
||||
}
|
||||
|
||||
if (errors.payment_method) {
|
||||
$('#payment-modal #payment_method').parent().after('<p class="help-block">' + errors.payment_method + '</p>');
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
@endsection
|
||||
64
resources/views/customers/payments/index.blade.php
Normal file
64
resources/views/customers/payments/index.blade.php
Normal file
@@ -0,0 +1,64 @@
|
||||
@extends('layouts.customer')
|
||||
|
||||
@section('title', trans_choice('general.payments', 1))
|
||||
|
||||
@permission('create-customers-revenues')
|
||||
@section('new_button')
|
||||
<span class="new-button"><a href="{{ url('incomes/revenues/create') }}" class="btn btn-success btn-sm"><span class="fa fa-plus"></span> {{ trans('general.add_new') }}</a></span>
|
||||
@endsection
|
||||
@endpermission
|
||||
|
||||
@section('content')
|
||||
<!-- Default box -->
|
||||
<div class="box box-success">
|
||||
<div class="box-header">
|
||||
{!! Form::open(['url' => 'customers/payments', 'role' => 'form', 'method' => 'GET']) !!}
|
||||
<div class="pull-left">
|
||||
<span class="title-filter">{{ trans('general.search') }}:</span>
|
||||
{!! Form::text('search', request('search'), ['class' => 'form-control input-filter input-sm', 'placeholder' => trans('general.search_placeholder')]) !!}
|
||||
{!! Form::select('category_id', $categories, request('category_id'), ['class' => 'form-control input-filter input-sm', 'placeholder' => trans('categories.all')]) !!}
|
||||
{!! Form::select('payment_method', $payment_methods, request('payment_method'), ['class' => 'form-control input-filter input-sm', 'placeholder' => trans_choice('general.payment_methods', 2)]) !!}
|
||||
{!! Form::button('<span class="fa fa-filter"></span> ' . trans('general.filter'), ['type' => 'submit', 'class' => 'btn btn-sm btn-default btn-filter']) !!}
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<span class="title-filter">{{ trans('general.show') }}:</span>
|
||||
{!! Form::select('limit', $limits, request('limit', setting('general.list_limit', '25')), ['class' => 'form-control input-filter input-sm', 'onchange' => 'this.form.submit()']) !!}
|
||||
</div>
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
<div class="box-body">
|
||||
<div class="table table-responsive">
|
||||
<table class="table table-bordered table-striped table-hover" id="tbl-revenues">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>@sortablelink('paid_at', trans('general.date'))</th>
|
||||
<th>@sortablelink('amount', trans('general.amount'))</th>
|
||||
<th>@sortablelink('category.name', trans_choice('general.categories', 1))</th>
|
||||
<th>@sortablelink('payment_method', trans_choice('general.payment_methods', 1))</th>
|
||||
<th style="width: 15%;">{{ trans('general.actions') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($payments as $item)
|
||||
<tr>
|
||||
<td><a href="{{ url('customers/payments/' . $item->id . '') }}">{{ Date::parse($item->paid_at)->format($date_format) }}</a></td>
|
||||
<td>@money($item->amount, $item->currency_code, true)</td>
|
||||
<td>{{ $item->category->name }}</td>
|
||||
<td>{{ $payment_methods[$item->payment_method] }}</td>
|
||||
<td>
|
||||
<a href="{{ url('customers/payments/' . $item->id . '') }}" class="btn btn-info btn-xs"><i class="fa fa-eye" aria-hidden="true"></i> {{ trans('general.show') }}</a>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
<div class="box-footer">
|
||||
@include('partials.admin.pagination', ['items' => $payments, 'type' => 'payments'])
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box -->
|
||||
@endsection
|
||||
107
resources/views/customers/payments/show.blade.php
Normal file
107
resources/views/customers/payments/show.blade.php
Normal file
@@ -0,0 +1,107 @@
|
||||
@extends('layouts.customer')
|
||||
|
||||
@section('title', trans_choice('general.invoices', 1))
|
||||
|
||||
@section('content')
|
||||
<div class="box box-success">
|
||||
<div class="invoice"><span class="badge" style="background-color : {{ $payment->category->color }}">{{ $payment->category->name }}</span>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<h2 class="page-header">
|
||||
<i class="fa fa-globe"></i> {{ $payment->customer->name }}
|
||||
<small class="pull-right">{{ trans('general.date') }}: {{ Date::parse($payment->paid_at)->format($date_format) }}</small>
|
||||
</h2>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row invoice-info">
|
||||
<div class="col-sm-4 invoice-col">
|
||||
{{ trans('general.from') }}
|
||||
<address>
|
||||
<strong>{{ setting('general.company_name') }}</strong><br>
|
||||
{{ setting('general.company_address') }}<br>
|
||||
{{ trans('general.phone') }}: (804) 123-5432<br>
|
||||
{{ trans('general.email') }}: {{ setting('general.company_email') }}
|
||||
</address>
|
||||
</div>
|
||||
<div class="col-sm-4 invoice-col">
|
||||
{{ trans('general.to') }}
|
||||
<address>
|
||||
<strong>{{ $payment->customer->name }}</strong><br>
|
||||
{{ $payment->customer->address }}<br>
|
||||
{{ trans('general.phone') }}: {{ $payment->customer->phone }}<br>
|
||||
{{ trans('general.email') }}: {{ $payment->customer->email }}
|
||||
</address>
|
||||
</div>
|
||||
<div class="col-sm-4 invoice-col">
|
||||
<b>{{ trans('invoices.payment_due') }}:</b> {{ Date::parse($payment->paid_at)->format($date_format) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-12 table-responsive">
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ trans_choice('general.categories', 1) }}</th>
|
||||
<th>{{ trans_choice('general.payment_methods', 1) }}</th>
|
||||
<th>{{ trans('general.reference') }}</th>
|
||||
<th>{{ trans('general.amount') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>{{ $payment->category->name }}</td>
|
||||
<td>{{ $payment_methods[$payment->payment_method] }}</td>
|
||||
<td>{{ $payment->reference }}</td>
|
||||
<td>@money($payment->amount, $payment->currency_code, true)</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
@if ($payment->description)
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<p class="lead">{{ trans('general.description') }}:</p>
|
||||
|
||||
<p class="text-muted well well-sm no-shadow" style="margin-top: 10px;">
|
||||
{{ $payment->description }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if ($payment->attachment)
|
||||
<div class="box-footer">
|
||||
<ul class="mailbox-attachments clearfix">
|
||||
@if (1)
|
||||
<li>
|
||||
<span class="mailbox-attachment-icon"><i class="fa fa-file-pdf-o"></i></span>
|
||||
|
||||
<div class="mailbox-attachment-info">
|
||||
<a href="#" class="mailbox-attachment-name"><i class="fa fa-paperclip"></i> {{ basename($payment->attachment) }}</a>
|
||||
<span class="mailbox-attachment-size">
|
||||
<a href="#" class="btn btn-default btn-xs pull-right"><i class="fa fa-cloud-download"></i></a>
|
||||
</span>
|
||||
</div>
|
||||
</li>
|
||||
@else
|
||||
<li>
|
||||
<span class="mailbox-attachment-icon has-img"><img src="{{ asset($payment->attachment) }}" alt="Attachment"></span>
|
||||
|
||||
<div class="mailbox-attachment-info">
|
||||
<a href="#" class="mailbox-attachment-name"><i class="fa fa-camera"></i> {{ basename($payment->attachment) }}</a>
|
||||
<span class="mailbox-attachment-size">
|
||||
<a href="#" class="btn btn-default btn-xs pull-right"><i class="fa fa-cloud-download"></i></a>
|
||||
</span>
|
||||
</div>
|
||||
</li>
|
||||
@endif
|
||||
</ul>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
56
resources/views/customers/transactions/index.blade.php
Normal file
56
resources/views/customers/transactions/index.blade.php
Normal file
@@ -0,0 +1,56 @@
|
||||
@extends('layouts.customer')
|
||||
|
||||
@section('title', trans_choice('general.transactions', 2))
|
||||
|
||||
@section('content')
|
||||
<!-- Default box -->
|
||||
<div class="box box-success">
|
||||
<div class="box-header">
|
||||
{!! Form::open(['url' => 'customers/transactions', 'role' => 'form', 'method' => 'GET']) !!}
|
||||
<div class="pull-left">
|
||||
<span class="title-filter">{{ trans('general.search') }}:</span>
|
||||
{!! Form::text('search', request('search'), ['class' => 'form-control input-filter input-sm', 'placeholder' => trans('general.search_placeholder')]) !!}
|
||||
{!! Form::button('<span class="fa fa-filter"></span> ' . trans('general.filter'), ['type' => 'submit', 'class' => 'btn btn-sm btn-default btn-filter']) !!}
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<span class="title-filter">{{ trans('general.show') }}:</span>
|
||||
{!! Form::select('limit', $limits, request('limit', setting('general.list_limit', '25')), ['class' => 'form-control input-filter input-sm', 'onchange' => 'this.form.submit()']) !!}
|
||||
</div>
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
<div class="box-body">
|
||||
<div class="table table-responsive">
|
||||
<table class="table table-bordered table-striped table-hover" id="tbl-transactions">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>@sortablelink('paid_at', trans('general.date'))</th>
|
||||
<th>@sortablelink('account.name', trans('accounts.account_name'))</th>
|
||||
<th>@sortablelink('type', trans_choice('general.types', 1))</th>
|
||||
<th>@sortablelink('category.name', trans_choice('general.categories', 1))</th>
|
||||
<th>@sortablelink('description', trans('general.description'))</th>
|
||||
<th>@sortablelink('amount', trans('general.amount'))</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($transactions as $item)
|
||||
<tr>
|
||||
<td>{{ Date::parse($item->date)->format($date_format) }}</td>
|
||||
<td>{{ $item->account }}</td>
|
||||
<td>{{ $item->type }}</td>
|
||||
<td>{{ $item->category }}</td>
|
||||
<td>{{ $item->description }}</td>
|
||||
<td>@money($item->amount, $item->currency_code, true)</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
<div class="box-footer">
|
||||
</div>
|
||||
<!-- /.box-footer -->
|
||||
</div>
|
||||
<!-- /.box -->
|
||||
@endsection
|
||||
467
resources/views/dashboard/dashboard/index.blade.php
Normal file
467
resources/views/dashboard/dashboard/index.blade.php
Normal file
@@ -0,0 +1,467 @@
|
||||
@extends('layouts.admin')
|
||||
|
||||
@section('title', trans('general.dashboard'))
|
||||
|
||||
@section('content')
|
||||
<div class="row">
|
||||
<!---Income-->
|
||||
<div class="col-md-4">
|
||||
<div class="info-box">
|
||||
<span class="info-box-icon bg-aqua"><i class="fa fa-money"></i></span>
|
||||
|
||||
<div class="info-box-content">
|
||||
<span class="info-box-text">{{ trans('dashboard.total_incomes') }}</span>
|
||||
<span class="info-box-number">@money($total_incomes['total'], setting('general.default_currency'), true)</span>
|
||||
<div class="progress-group" title="{{ trans('dashboard.open_invoices') }}: {{ $total_incomes['open_invoice'] }}<br>{{ trans('dashboard.overdue_invoices') }}: {{ $total_incomes['overdue_invoice'] }}" data-toggle="tooltip" data-html="true">
|
||||
<div class="progress sm">
|
||||
<div class="progress-bar progress-bar-aqua" style="width: {{ $total_incomes['progress'] }}%"></div>
|
||||
</div>
|
||||
<span class="progress-text">{{ trans('dashboard.receivables') }}</span>
|
||||
<span class="progress-number">{{ $total_incomes['open_invoice'] }} / {{ $total_incomes['overdue_invoice'] }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!---Expense-->
|
||||
<div class="col-md-4">
|
||||
<div class="info-box">
|
||||
<span class="info-box-icon bg-red"><i class="fa fa-shopping-cart"></i></span>
|
||||
|
||||
<div class="info-box-content">
|
||||
<span class="info-box-text">{{ trans('dashboard.total_expenses') }}</span>
|
||||
<span class="info-box-number">@money($total_expenses['total'], setting('general.default_currency'), true)</span>
|
||||
|
||||
<div class="progress-group" title="{{ trans('dashboard.open_bills') }}: {{ $total_expenses['open_bill'] }}<br>{{ trans('dashboard.overdue_bills') }}: {{ $total_expenses['overdue_bill'] }}" data-toggle="tooltip" data-html="true">
|
||||
<div class="progress sm">
|
||||
<div class="progress-bar progress-bar-red" style="width: {{ $total_expenses['progress'] }}%"></div>
|
||||
</div>
|
||||
<span class="progress-text">{{ trans('dashboard.payables') }}</span>
|
||||
<span class="progress-number">{{ $total_expenses['open_bill'] }} / {{ $total_expenses['overdue_bill'] }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!---Profit-->
|
||||
<div class="col-md-4">
|
||||
<div class="info-box">
|
||||
<span class="info-box-icon bg-green"><i class="fa fa-heart"></i></span>
|
||||
|
||||
<div class="info-box-content">
|
||||
<span class="info-box-text">{{ trans('dashboard.total_profit') }}</span>
|
||||
<span class="info-box-number">@money($total_profit['total'], setting('general.default_currency'), true)</span>
|
||||
|
||||
<div class="progress-group" title="{{ trans('dashboard.open_profit') }}: {{ $total_profit['open'] }}<br>{{ trans('dashboard.overdue_profit') }}: {{ $total_profit['overdue'] }}" data-toggle="tooltip" data-html="true">
|
||||
<div class="progress sm">
|
||||
<div class="progress-bar progress-bar-green" style="width: {{ $total_profit['progress'] }}%"></div>
|
||||
</div>
|
||||
<span class="progress-text">{{ trans('general.upcoming') }}</span>
|
||||
<span class="progress-number">{{ $total_profit['open'] }} / {{ $total_profit['overdue'] }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<!---Income, Expense and Profit Line Chart-->
|
||||
<div class="col-md-12">
|
||||
<div class="nav-tabs-custom">
|
||||
<ul class="nav nav-tabs pull-right ui-sortable-handle">
|
||||
<li class=""><a href="#monthly-chart" data-toggle="tab" aria-expanded="false">{{ trans('general.monthly') }}</a></li>
|
||||
<li class="active"><a href="#daily-chart" data-toggle="tab" aria-expanded="true">{{ trans('general.daily') }}</a></li>
|
||||
<li class="pull-left header" style="font-size: 18px;">{{ trans('dashboard.cash_flow') }}</li>
|
||||
</ul>
|
||||
|
||||
<div class="tab-content no-padding">
|
||||
<div class="chart tab-pane active" id="daily-chart" style="position: relative; height: 300px;">
|
||||
<div class="row">
|
||||
<div class="chart">
|
||||
<canvas id="cash_flow_daily" style="height: 246px; width: 1069px;" height="246" width="1069"></canvas>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row daily-footer">
|
||||
<div class="col-md-2">
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div id="sale"></div>
|
||||
</div>
|
||||
<div class="col-md-8 scp">
|
||||
{{ trans_choice('general.incomes', 1) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div id="cost"></div>
|
||||
</div>
|
||||
<div class="col-md-8 scp">
|
||||
{{ trans_choice('general.expenses', 1) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div id="profit"></div>
|
||||
</div>
|
||||
<div class="col-md-8 scp">
|
||||
{{ trans_choice('general.profits', 1) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="chart tab-pane" id="monthly-chart" style="position: relative; height: 300px;">
|
||||
@if ($cash_flow['monthly'])
|
||||
<div class="col-md-2">
|
||||
<div style="margin : 7px 0px; border-left: 3px solid #00c0ef; padding-left: 10px;">
|
||||
<p style="font-size: 16px; margin: 0px;">
|
||||
@money($total_incomes['total'], setting('general.default_currency'), true)
|
||||
</p>
|
||||
{{ trans_choice('general.incomes', 1) }}
|
||||
</div>
|
||||
<div style="margin : 7px 0px; border-left: 3px solid #C9302C; padding-left: 10px;">
|
||||
<p style="font-size: 16px; margin: 0px;">
|
||||
@money($total_expenses['total'], setting('general.default_currency'), true)
|
||||
</p>
|
||||
{{ trans_choice('general.expenses', 1) }}
|
||||
</div>
|
||||
<div style="margin : 7px 0px; border-left: 3px solid #00a65a; padding-left: 10px;">
|
||||
<p style="font-size: 16px; margin: 0px;">
|
||||
@money($total_incomes['total'] - $total_expenses['total'], setting('general.default_currency'), true)
|
||||
</p>
|
||||
{{ trans_choice('general.profits', 1) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-10">
|
||||
<div id="cash_flow_monthly" style="min-width: 800px; height: 300px; margin: 0 auto"></div>
|
||||
</div>
|
||||
@else
|
||||
<h5 class="text-center">{{ trans('dashboard.no_profit_loss') }}</h5>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
<div class="box box-success">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ trans('dashboard.incomes_by_category') }}</h3>
|
||||
<div class="box-tools pull-right">
|
||||
<button type="button" class="btn btn-box-tool" data-widget="collapse">
|
||||
<i class="fa fa-minus"></i>
|
||||
</button>
|
||||
<button type="button" class="btn btn-box-tool" data-widget="remove"><i class="fa fa-times"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
<div class="chart-responsive">
|
||||
<canvas id="income_category" height="155" width="328" style="width: 328px; height: 155px;"></canvas>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<ul class="chart-legend clearfix">
|
||||
@foreach ($incomes as $item)
|
||||
<li><i class="fa fa-circle" style="color:{{ $item['color'] }};"></i> {{ $item['amount'] . ' ' . $item['label'] }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="box box-success">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ trans('dashboard.expenses_by_category') }}</h3>
|
||||
<div class="box-tools pull-right">
|
||||
<button type="button" class="btn btn-box-tool" data-widget="collapse">
|
||||
<i class="fa fa-minus"></i>
|
||||
</button>
|
||||
<button type="button" class="btn btn-box-tool" data-widget="remove"><i class="fa fa-times"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
<div class="chart-responsive">
|
||||
<canvas id="expense_category" height="155" width="328" style="width: 328px; height: 155px;"></canvas>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<ul class="chart-legend clearfix">
|
||||
@foreach ($expenses as $item)
|
||||
<li><i class="fa fa-circle" style="color:{{ $item['color'] }};"></i> {{ $item['amount'] . ' ' . $item['label'] }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
<!-- Account Balance List-->
|
||||
<div class="box box-success">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ trans('dashboard.account_balance') }}</h3>
|
||||
<div class="box-tools pull-right">
|
||||
<button type="button" class="btn btn-box-tool" data-widget="collapse">
|
||||
<i class="fa fa-minus"></i>
|
||||
</button>
|
||||
<button type="button" class="btn btn-box-tool" data-widget="remove"><i class="fa fa-times"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
@if ($accounts->count())
|
||||
@foreach($accounts as $item)
|
||||
<div style="min-height: 30px;">
|
||||
<div style="width:60%;float: left;">
|
||||
<div>{{ $item->name }}</div>
|
||||
</div>
|
||||
<div style="width:40%;float: left;text-align: right;">
|
||||
@money($item->balance, $item->currency_code, true)
|
||||
</div>
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
@endforeach
|
||||
@else
|
||||
<h5 class="text-center">{{ trans('general.no_records') }}</h5>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Latest Incomes List-->
|
||||
<div class="box box-success">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ trans('dashboard.latest_incomes') }}</h3>
|
||||
<div class="box-tools pull-right">
|
||||
<button type="button" class="btn btn-box-tool" data-widget="collapse">
|
||||
<i class="fa fa-minus"></i>
|
||||
</button>
|
||||
<button type="button" class="btn btn-box-tool" data-widget="remove"><i class="fa fa-times"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
@if ($latest_incomes->count())
|
||||
<table class="table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-left">{{ trans('general.date') }}</th>
|
||||
<th class="text-left">{{ trans_choice('general.categories', 1) }}</th>
|
||||
<th class="text-right">{{ trans('general.amount') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($latest_incomes as $item)
|
||||
<tr>
|
||||
<td align="left">{{ Date::parse($item->paid_at)->format($date_format) }}</td>
|
||||
<td align="left">{{ $item->category ? $item->category->name : trans_choice('general.invoices', 2) }}</td>
|
||||
<td align="right">@money($item->amount, $item->currency_code, true)</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
@else
|
||||
<h5 class="text-center">{{ trans('general.no_records') }}</h5>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Latest Expenses List-->
|
||||
<div class="box box-success">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ trans('dashboard.latest_expenses') }}</h3>
|
||||
<div class="box-tools pull-right">
|
||||
<button type="button" class="btn btn-box-tool" data-widget="collapse">
|
||||
<i class="fa fa-minus"></i>
|
||||
</button>
|
||||
<button type="button" class="btn btn-box-tool" data-widget="remove"><i class="fa fa-times"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
@if ($latest_expenses->count())
|
||||
<table class="table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-left">{{ trans('general.date') }}</th>
|
||||
<th class="text-left">{{ trans_choice('general.categories', 1) }}</th>
|
||||
<th class="text-right">{{ trans('general.amount') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($latest_expenses as $item)
|
||||
<tr>
|
||||
<td align="left">{{ Date::parse($item->paid_at)->format($date_format) }}</td>
|
||||
<td align="left">{{ $item->category ? $item->category->name : trans_choice('general.bills', 2) }}</td>
|
||||
<td align="right">@money($item->amount, $item->currency_code, true)</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
@else
|
||||
<h5 class="text-center">{{ trans('general.no_records') }}</h5>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('js')
|
||||
<script src="{{ asset('vendor/almasaeed2010/adminlte/plugins/chartjs/Chart.min.js') }}"></script>
|
||||
<script src="{{ asset('public/js/highchart/highcharts.js') }}"></script>
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function () {
|
||||
var areaChartData = {
|
||||
labels: {!! $cash_flow['daily']['date'] !!},
|
||||
datasets: [
|
||||
{
|
||||
label: "{{ trans_choice('general.incomes', 1) }}",
|
||||
fillColor: "#00c0ef",
|
||||
strokeColor: "#00c0ef",
|
||||
pointColor: "#00c0ef",
|
||||
pointStrokeColor: "#00c0ef",
|
||||
pointHighlightFill: "#FFF",
|
||||
pointHighlightStroke: "#00c0ef",
|
||||
data: {!! $cash_flow['daily']['income'] !!}
|
||||
},
|
||||
{
|
||||
label: "{{ trans_choice('general.expenses', 1) }}",
|
||||
fillColor: "#F56954",
|
||||
strokeColor: "#F56954",
|
||||
pointColor: "#F56954",
|
||||
pointStrokeColor: "#F56954",
|
||||
pointHighlightFill: "#FFF",
|
||||
pointHighlightStroke: "#F56954",
|
||||
data: {!! $cash_flow['daily']['expense'] !!}
|
||||
},
|
||||
{
|
||||
label: "{{ trans_choice('general.profits', 1) }}",
|
||||
fillColor: "#6da252",
|
||||
strokeColor: "#6da252",
|
||||
pointColor: "#6da252",
|
||||
pointStrokeColor: "#6da252",
|
||||
pointHighlightFill: "#FFF",
|
||||
pointHighlightStroke: "#6da252",
|
||||
data: {!! $cash_flow['daily']['profit'] !!}
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
var areaChartOptions = {
|
||||
showScale: true,
|
||||
scaleShowGridLines: true,
|
||||
scaleGridLineColor: "rgba(0,0,0,.05)",
|
||||
scaleGridLineWidth: 1,
|
||||
scaleShowHorizontalLines: true,
|
||||
scaleShowVerticalLines: true,
|
||||
bezierCurve: true,
|
||||
bezierCurveTension: 0.3,
|
||||
pointDot: false,
|
||||
pointDotRadius: 4,
|
||||
pointDotStrokeWidth: 1,
|
||||
pointHitDetectionRadius: 20,
|
||||
datasetStroke: true,
|
||||
datasetStrokeWidth: 2,
|
||||
datasetFill: true,
|
||||
legendTemplate: '<ul class="<%=name.toLowerCase()%>-legend"><% for (var i=0; i<datasets.length; i++){%><li><span style="background-color:<%=datasets[i].lineColor%>"></span><%if(datasets[i].label){%><%=datasets[i].label%><%}%></li><%}%></ul>',
|
||||
maintainAspectRatio: true,
|
||||
responsive: true
|
||||
};
|
||||
|
||||
var cashFlowDailyCanvas = $("#cash_flow_daily").get(0).getContext("2d");
|
||||
var cashFlowDaily = new Chart(cashFlowDailyCanvas);
|
||||
var cashFlowDailyOptions = areaChartOptions;
|
||||
|
||||
cashFlowDailyOptions.datasetFill = false;
|
||||
cashFlowDaily.Line(areaChartData, cashFlowDailyOptions);
|
||||
|
||||
var income_category_canvas = $("#income_category").get(0).getContext("2d");
|
||||
var income_category_pie_chart = new Chart(income_category_canvas);
|
||||
var income_category_data = jQuery.parseJSON('{!! $income_graph !!}');
|
||||
|
||||
var income_category_options = {
|
||||
segmentShowStroke: true,
|
||||
segmentStrokeColor: "#fff",
|
||||
segmentStrokeWidth: 1,
|
||||
percentageInnerCutout: 50, // This is 0 for Pie charts
|
||||
animationSteps: 100,
|
||||
animationEasing: "easeOutBounce",
|
||||
animateRotate: true,
|
||||
animateScale: false,
|
||||
responsive: true,
|
||||
maintainAspectRatio: false,
|
||||
legendTemplate: "<ul class=\"<%=name.toLowerCase()%>-legend\"><% for (var i=0; i<segments.length; i++){%><li><span style=\"background-color:<%=segments[i].fillColor%>\"></span><%if(segments[i].label){%><%=segments[i].label%><%}%></li><%}%></ul>",
|
||||
tooltipTemplate: "<%=label%>"
|
||||
};
|
||||
|
||||
income_category_pie_chart.Doughnut(income_category_data, income_category_options);
|
||||
|
||||
var expense_category_canvas = $("#expense_category").get(0).getContext("2d");
|
||||
var expense_category_pie_chart = new Chart(expense_category_canvas);
|
||||
var expense_category_data = jQuery.parseJSON('{!! $expense_graph !!}');
|
||||
|
||||
var expense_category_options = {
|
||||
segmentShowStroke: true,
|
||||
segmentStrokeColor: "#fff",
|
||||
segmentStrokeWidth: 1,
|
||||
percentageInnerCutout: 50, // This is 0 for Pie charts
|
||||
animationSteps: 100,
|
||||
animationEasing: "easeOutBounce",
|
||||
animateRotate: true,
|
||||
animateScale: false,
|
||||
responsive: true,
|
||||
maintainAspectRatio: false,
|
||||
legendTemplate: "<ul class=\"<%=name.toLowerCase()%>-legend\"><% for (var i=0; i<segments.length; i++){%><li><span style=\"background-color:<%=segments[i].fillColor%>\"></span><%if(segments[i].label){%><%=segments[i].label%><%}%></li><%}%></ul>",
|
||||
tooltipTemplate: "<%=label%>"
|
||||
};
|
||||
|
||||
expense_category_pie_chart.Doughnut(expense_category_data, expense_category_options);
|
||||
|
||||
@if ($cash_flow['monthly'])
|
||||
Highcharts.chart('cash_flow_monthly', {
|
||||
chart: {
|
||||
type: 'column'
|
||||
},
|
||||
title: {
|
||||
text: ''
|
||||
},
|
||||
xAxis: {
|
||||
categories: {!! $cash_flow['monthly']['date'] !!}
|
||||
},
|
||||
credits: {
|
||||
enabled: false
|
||||
},
|
||||
series: [{
|
||||
name: '{{ trans_choice('general.incomes', 1) }}',
|
||||
data: {!! $cash_flow['monthly']['income'] !!}
|
||||
},{
|
||||
name: '{{ trans_choice('general.expenses', 1) }}',
|
||||
data: {!! $cash_flow['monthly']['expense'] !!}
|
||||
}, {
|
||||
name: '{{ trans_choice('general.profits', 1) }}',
|
||||
data: {!! $cash_flow['monthly']['profit'] !!}
|
||||
}]
|
||||
});
|
||||
@endif
|
||||
});
|
||||
|
||||
jQuery(document).on( 'shown.bs.tab', 'a[data-toggle="tab"]', function () {
|
||||
$('#cash_flow_monthly').each(function() {
|
||||
$(this).highcharts().reflow();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
13
resources/views/errors/403.blade.php
Normal file
13
resources/views/errors/403.blade.php
Normal file
@@ -0,0 +1,13 @@
|
||||
@extends('layouts.admin')
|
||||
|
||||
@section('title', 'Forbidden Access')
|
||||
|
||||
@section('content')
|
||||
<!-- Default box -->
|
||||
<div class="box box-success">
|
||||
<div class="box-body">
|
||||
<h1>You don't have permission.</h1>
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
</div>
|
||||
@endsection
|
||||
141
resources/views/expenses/bills/bill.blade.php
Normal file
141
resources/views/expenses/bills/bill.blade.php
Normal file
@@ -0,0 +1,141 @@
|
||||
@extends('layouts.bill')
|
||||
|
||||
@section('title', trans_choice('general.bills', 1) . ': ' . $bill->bill_number)
|
||||
|
||||
@section('content')
|
||||
<section class="bill">
|
||||
<div class="row invoice-header">
|
||||
<div class="col-xs-7">
|
||||
@if (setting('general.invoice_logo'))
|
||||
<img src="{{ asset(setting('general.invoice_logo')) }}" class="invoice-logo" />
|
||||
@else
|
||||
<img src="{{ asset(setting('general.company_logo')) }}" class="invoice-logo" />
|
||||
@endif
|
||||
</div>
|
||||
<div class="col-xs-5 invoice-company">
|
||||
<address>
|
||||
<strong>{{ setting('general.company_name') }}</strong><br>
|
||||
{{ setting('general.company_address') }}<br>
|
||||
@if (setting('general.company_tax_number'))
|
||||
{{ trans('general.tax_number') }}: {{ setting('general.company_tax_number') }}<br>
|
||||
@endif
|
||||
<br>
|
||||
@if (setting('general.company_phone'))
|
||||
{{ setting('general.company_phone') }}<br>
|
||||
@endif
|
||||
{{ setting('general.company_email') }}
|
||||
</address>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-7">
|
||||
{{ trans('bills.bill_from') }}
|
||||
<address>
|
||||
<strong>{{ $bill->vendor_name }}</strong><br>
|
||||
{{ $bill->vendor_address }}<br>
|
||||
@if ($bill->vendor_tax_number)
|
||||
{{ trans('general.tax_number') }}: {{ $bill->vendor_tax_number }}<br>
|
||||
@endif
|
||||
<br>
|
||||
@if ($bill->vendor_phone)
|
||||
{{ $bill->vendor_phone }}<br>
|
||||
@endif
|
||||
{{ $bill->vendor_email }}
|
||||
</address>
|
||||
</div>
|
||||
<div class="col-xs-5">
|
||||
<div class="table-responsive">
|
||||
<table class="table no-border">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>{{ trans('bills.bill_number') }}:</th>
|
||||
<td class="text-right">{{ $bill->bill_number }}</td>
|
||||
</tr>
|
||||
@if ($bill->order_number)
|
||||
<tr>
|
||||
<th>{{ trans('bills.order_number') }}:</th>
|
||||
<td class="text-right">{{ $bill->order_number }}</td>
|
||||
</tr>
|
||||
@endif
|
||||
<tr>
|
||||
<th>{{ trans('bills.bill_date') }}:</th>
|
||||
<td class="text-right">{{ Date::parse($bill->billed_at)->format($date_format) }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{ trans('bills.payment_due') }}:</th>
|
||||
<td class="text-right">{{ Date::parse($bill->due_at)->format($date_format) }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-12 table-responsive">
|
||||
<table class="table table-striped">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>{{ trans_choice('general.items', 1) }}</th>
|
||||
<th class="text-center">{{ trans('bills.quantity') }}</th>
|
||||
<th class="text-right">{{ trans('bills.price') }}</th>
|
||||
<th class="text-right">{{ trans('bills.total') }}</th>
|
||||
</tr>
|
||||
@foreach($bill->items as $item)
|
||||
<tr>
|
||||
<td>
|
||||
{{ $item->name }}
|
||||
@if ($item->sku)
|
||||
<br><small>{{ trans('items.sku') }}: {{ $item->sku }}</small>
|
||||
@endif
|
||||
</td>
|
||||
<td class="text-center">{{ $item->quantity }}</td>
|
||||
<td class="text-right">@money($item->price, $bill->currency_code, true)</td>
|
||||
<td class="text-right">@money($item->total - $item->tax, $bill->currency_code, true)</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-7">
|
||||
@if ($bill->notes)
|
||||
<p class="lead">{{ trans_choice('general.notes', 2) }}:</p>
|
||||
|
||||
<p class="text-muted well well-sm no-shadow" style="margin-top: 10px;">
|
||||
{{ $bill->notes }}
|
||||
</p>
|
||||
@endif
|
||||
</div>
|
||||
<div class="col-xs-5">
|
||||
<div class="table-responsive">
|
||||
<table class="table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th style="width:50%">{{ trans('bills.sub_total') }}:</th>
|
||||
<td class="text-right">@money($bill->sub_total, $bill->currency_code, true)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{ trans('bills.tax_total') }}:</th>
|
||||
<td class="text-right">@money($bill->tax_total, $bill->currency_code, true)</td>
|
||||
</tr>
|
||||
@if($bill->paid)
|
||||
<tr>
|
||||
<th>{{ trans('bills.paid') }}:</th>
|
||||
<td class="text-right">@money('-' . $bill->paid, $bill->currency_code, true)</td>
|
||||
</tr>
|
||||
@endif
|
||||
<tr>
|
||||
<th>{{ trans('bills.total') }}:</th>
|
||||
<td class="text-right">@money($bill->grand_total, $bill->currency_code, true)</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
@endsection
|
||||
264
resources/views/expenses/bills/create.blade.php
Normal file
264
resources/views/expenses/bills/create.blade.php
Normal file
@@ -0,0 +1,264 @@
|
||||
@extends('layouts.admin')
|
||||
|
||||
@section('title', trans('general.title.new', ['type' => trans_choice('general.bills', 1)]))
|
||||
|
||||
@section('content')
|
||||
<!-- Default box -->
|
||||
<div class="box box-success">
|
||||
{!! Form::open(['url' => 'expenses/bills', 'files' => true, 'role' => 'form']) !!}
|
||||
|
||||
<div class="box-body">
|
||||
{{ Form::selectGroup('vendor_id', trans_choice('general.vendors', 1), 'user', $vendors) }}
|
||||
|
||||
{{ Form::selectGroup('currency_code', trans_choice('general.currencies', 1), 'exchange', $currencies, setting('general.default_currency')) }}
|
||||
|
||||
{{ Form::textGroup('billed_at', trans('bills.bill_date'), 'calendar',['id' => 'billed_at', 'class' => 'form-control', 'required' => 'required', 'data-inputmask' => '\'alias\': \'yyyy/mm/dd\'', 'data-mask' => ''],Date::now()->toDateString()) }}
|
||||
|
||||
{{ Form::textGroup('due_at', trans('bills.due_date'), 'calendar',['id' => 'due_at', 'class' => 'form-control', 'required' => 'required', 'data-inputmask' => '\'alias\': \'yyyy/mm/dd\'', 'data-mask' => ''],Date::now()->toDateString()) }}
|
||||
|
||||
{{ Form::textGroup('bill_number', trans('bills.bill_number'), 'file-text-o') }}
|
||||
|
||||
{{ Form::textGroup('order_number', trans('bills.order_number'), 'shopping-cart',[]) }}
|
||||
|
||||
<div class="form-group col-md-12">
|
||||
{!! Form::label('items', trans_choice('general.items', 1), ['class' => 'control-label']) !!}
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered" id="items">
|
||||
<thead>
|
||||
<tr style="background-color: #f9f9f9;">
|
||||
<th width="5%" class="text-center">{{ trans('general.actions') }}</th>
|
||||
<th width="40%" class="text-left">{{ trans('general.name') }}</th>
|
||||
<th width="5%" class="text-center">{{ trans('bills.quantity') }}</th>
|
||||
<th width="10%" class="text-right">{{ trans('bills.price') }}</th>
|
||||
<th width="15%" class="text-right">{{ trans_choice('general.taxes', 1) }}</th>
|
||||
<th width="10%" class="text-right">{{ trans('bills.total') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php $item_row = 0; ?>
|
||||
<tr id="item-row-{{ $item_row }}">
|
||||
<td class="text-center" style="vertical-align: middle;">
|
||||
<button type="button" onclick="$(this).tooltip('destroy'); $('#item-row-{{ $item_row }}').remove(); totalItem();" data-toggle="tooltip" title="{{ trans('general.delete') }}" class="btn btn-xs btn-danger"><i class="fa fa-trash"></i></button>
|
||||
</td>
|
||||
<td>
|
||||
<input class="form-control typeahead" required="required" placeholder="{{ trans('general.form.enter', ['field' => trans_choice('bills.item_name', 1)]) }}" name="item[{{ $item_row }}][name]" type="text" id="item-name-{{ $item_row }}">
|
||||
<input name="item[{{ $item_row }}][item_id]" type="hidden" id="item-id-{{ $item_row }}">
|
||||
</td>
|
||||
<td>
|
||||
<input class="form-control text-center" required="required" name="item[{{ $item_row }}][quantity]" type="text" id="item-quantity-{{ $item_row }}">
|
||||
</td>
|
||||
<td>
|
||||
<input class="form-control text-right" required="required" name="item[{{ $item_row }}][price]" type="text" id="item-price-{{ $item_row }}">
|
||||
</td>
|
||||
<td>
|
||||
{!! Form::select('item[' . $item_row . '][tax]', $taxes, setting('general.default_tax'), ['id'=> 'item-tax-'. $item_row, 'class' => 'form-control select2', 'placeholder' => trans('general.form.select.field', ['field' => trans_choice('general.taxes', 1)])]) !!}
|
||||
</td>
|
||||
<td class="text-right" style="vertical-align: middle;">
|
||||
<span id="item-total-{{ $item_row }}">0</span>
|
||||
</td>
|
||||
</tr>
|
||||
<?php $item_row++; ?>
|
||||
<tr id="addItem">
|
||||
<td class="text-center"><button type="button" onclick="addItem();" data-toggle="tooltip" title="{{ trans('general.add') }}" class="btn btn-xs btn-primary" data-original-title="{{ trans('general.add') }}"><i class="fa fa-plus"></i></button></td>
|
||||
<td class="text-right" colspan="5"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-right" colspan="5"><strong>{{ trans('bills.sub_total') }}</strong></td>
|
||||
<td class="text-right"><span id="sub-total">0</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-right" colspan="5"><strong>{{ trans_choice('general.taxes', 1) }}</strong></td>
|
||||
<td class="text-right"><span id="tax-total">0</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-right" colspan="5"><strong>{{ trans('bills.total') }}</strong></td>
|
||||
<td class="text-right"><span id="grand-total">0</span></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
{{ Form::textareaGroup('notes', trans_choice('general.notes', 2)) }}
|
||||
|
||||
{{ Form::fileGroup('attachment', trans('general.attachment'),[]) }}
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
|
||||
<div class="box-footer">
|
||||
{{ Form::saveButtons('expenses/bills') }}
|
||||
</div>
|
||||
<!-- /.box-footer -->
|
||||
|
||||
{!! Form::close() !!}
|
||||
@endsection
|
||||
|
||||
@section('js')
|
||||
<script src="{{ asset('vendor/almasaeed2010/adminlte/plugins/datepicker/bootstrap-datepicker.js') }}"></script>
|
||||
<script src="{{ asset('public/js/bootstrap-fancyfile.js') }}"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-3-typeahead/4.0.1/bootstrap3-typeahead.min.js"></script>
|
||||
@endsection
|
||||
|
||||
@section('css')
|
||||
<link rel="stylesheet" href="{{ asset('vendor/almasaeed2010/adminlte/plugins/datepicker/datepicker3.css') }}">
|
||||
<link rel="stylesheet" href="{{ asset('public/css/bootstrap-fancyfile.css') }}">
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
<script type="text/javascript">
|
||||
var item_row = {{ $item_row }};
|
||||
|
||||
function addItem() {
|
||||
html = '<tr id="item-row-' + item_row + '">';
|
||||
html += ' <td class="text-center" style="vertical-align: middle;">';
|
||||
html += ' <button type="button" onclick="$(this).tooltip(\'destroy\'); $(\'#item-row-' + item_row + '\').remove(); totalItem();" data-toggle="tooltip" title="{{ trans('general.delete') }}" class="btn btn-xs btn-danger"><i class="fa fa-trash"></i></button>';
|
||||
html += ' </td>';
|
||||
html += ' <td>';
|
||||
html += ' <input class="form-control typeahead" required="required" placeholder="{{ trans('general.form.enter', ['field' => trans_choice('bills.item_name', 1)]) }}" name="item[' + item_row + '][name]" type="text" id="item-name-' + item_row + '">';
|
||||
html += ' <input name="item[' + item_row + '][item_id]" type="hidden" id="item-id-' + item_row + '">';
|
||||
html += ' </td>';
|
||||
html += ' <td>';
|
||||
html += ' <input class="form-control text-center" required="required" name="item[' + item_row + '][quantity]" type="text" id="item-quantity-' + item_row + '">';
|
||||
html += ' </td>';
|
||||
html += ' <td>';
|
||||
html += ' <input class="form-control text-right" required="required" name="item[' + item_row + '][price]" type="text" id="item-price-' + item_row + '">';
|
||||
html += ' </td>';
|
||||
html += ' <td>';
|
||||
html += ' <select class="form-control select2" name="item[' + item_row + '][tax]" id="item-tax-' + item_row + '">';
|
||||
html += ' <option selected="selected" value="">{{ trans('general.form.select.field', ['field' => trans_choice('general.taxes', 1)]) }}</option>';
|
||||
@foreach($taxes as $tax_key => $tax_value)
|
||||
html += ' <option value="{{ $tax_key }}">{{ $tax_value }}</option>';
|
||||
@endforeach
|
||||
html += ' </select>';
|
||||
html += ' </td>';
|
||||
html += ' <td class="text-right" style="vertical-align: middle;">';
|
||||
html += ' <span id="item-total-' + item_row + '">0</span>';
|
||||
html += ' </td>';
|
||||
|
||||
$('#items tbody #addItem').before(html);
|
||||
//$('[rel=tooltip]').tooltip();
|
||||
|
||||
$('[data-toggle="tooltip"]').tooltip('hide');
|
||||
|
||||
$('#item-row-' + item_row + ' .select2').select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.taxes', 1)]) }}"
|
||||
});
|
||||
|
||||
item_row++;
|
||||
}
|
||||
|
||||
$(document).ready(function(){
|
||||
//Date picker
|
||||
$('#billed_at').datepicker({
|
||||
format: 'yyyy-mm-dd',
|
||||
autoclose: true
|
||||
});
|
||||
|
||||
//Date picker
|
||||
$('#due_at').datepicker({
|
||||
format: 'yyyy-mm-dd',
|
||||
autoclose: true
|
||||
});
|
||||
|
||||
$(".select2").select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.taxes', 1)]) }}"
|
||||
});
|
||||
|
||||
$("#vendor_id").select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.vendors', 1)]) }}"
|
||||
});
|
||||
|
||||
$("#currency_code").select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.currencies', 1)]) }}"
|
||||
});
|
||||
|
||||
$('#attachment').fancyfile({
|
||||
text : '{{ trans('general.form.select.file') }}',
|
||||
style : 'btn-default',
|
||||
placeholder : '{{ trans('general.form.no_file_selected') }}'
|
||||
});
|
||||
|
||||
var autocomplete_path = "{{ url('items/items/autocomplete') }}";
|
||||
|
||||
$(document).on('click', '.form-control.typeahead', function() {
|
||||
input_id = $(this).attr('id').split('-');
|
||||
|
||||
item_id = parseInt(input_id[input_id.length-1]);
|
||||
|
||||
$(this).typeahead({
|
||||
minLength: 3,
|
||||
displayText:function (data) {
|
||||
return data.name;
|
||||
},
|
||||
source: function (query, process) {
|
||||
$.ajax({
|
||||
url: autocomplete_path,
|
||||
type: 'GET',
|
||||
dataType: 'JSON',
|
||||
data: 'query=' + query + '&type=bill¤cy_code=' + $('#currency_code').val(),
|
||||
success: function(data) {
|
||||
return process(data);
|
||||
}
|
||||
});
|
||||
},
|
||||
afterSelect: function (data) {
|
||||
$('#item-id-' + item_id).val(data.item_id);
|
||||
$('#item-quantity-' + item_id).val('1');
|
||||
$('#item-price-' + item_id).val(data.purchase_price);
|
||||
$('#item-tax-' + item_id).val(data.tax_id);
|
||||
|
||||
// This event Select2 Stylesheet
|
||||
$('#item-tax-' + item_id).trigger('change');
|
||||
|
||||
$('#item-total-' + item_id).html(data.total);
|
||||
|
||||
totalItem();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$(document).on('change', '#currency_code, #items tbody select', function(){
|
||||
totalItem();
|
||||
});
|
||||
|
||||
$(document).on('keyup', '#items tbody .form-control', function(){
|
||||
totalItem();
|
||||
});
|
||||
|
||||
$(document).on('change', '#vendor_id', function (e) {
|
||||
$.ajax({
|
||||
url: '{{ url("expenses/vendors/currency") }}',
|
||||
type: 'GET',
|
||||
dataType: 'JSON',
|
||||
data: 'vendor_id=' + $(this).val(),
|
||||
success: function(data) {
|
||||
$('#currency_code').val(data.currency_code);
|
||||
|
||||
// This event Select2 Stylesheet
|
||||
$('#currency_code').trigger('change');
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
function totalItem() {
|
||||
$.ajax({
|
||||
url: '{{ url("items/items/totalItem") }}',
|
||||
type: 'POST',
|
||||
dataType: 'JSON',
|
||||
data: $('#currency_code, #items input[type=\'text\'],#items input[type=\'hidden\'], #items textarea, #items select'),
|
||||
headers: { 'X-CSRF-TOKEN': '{{ csrf_token() }}' },
|
||||
success: function(data) {
|
||||
if (data) {
|
||||
$.each( data.items, function( key, value ) {
|
||||
$('#item-total-' + key).html(value);
|
||||
});
|
||||
|
||||
$('#sub-total').html(data.sub_total);
|
||||
$('#tax-total').html(data.tax_total);
|
||||
$('#grand-total').html(data.grand_total);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
@endsection
|
||||
294
resources/views/expenses/bills/edit.blade.php
Normal file
294
resources/views/expenses/bills/edit.blade.php
Normal file
@@ -0,0 +1,294 @@
|
||||
@extends('layouts.admin')
|
||||
|
||||
@section('title', trans('general.title.edit', ['type' => trans_choice('general.bills', 1)]))
|
||||
|
||||
@section('content')
|
||||
<!-- Default box -->
|
||||
<div class="box box-success">
|
||||
{!! Form::model($bill, ['method' => 'PATCH', 'files' => true, 'url' => ['expenses/bills', $bill->id], 'role' => 'form']) !!}
|
||||
|
||||
<div class="box-body">
|
||||
{{ Form::selectGroup('vendor_id', trans_choice('general.vendors', 1), 'user', $vendors) }}
|
||||
|
||||
{{ Form::selectGroup('currency_code', trans_choice('general.currencies', 1), 'exchange', $currencies) }}
|
||||
|
||||
{{ Form::textGroup('billed_at', trans('bills.bill_date'), 'calendar',['id' => 'billed_at', 'class' => 'form-control', 'required' => 'required', 'data-inputmask' => '\'alias\': \'yyyy/mm/dd\'', 'data-mask' => ''],Date::now()->toDateString()) }}
|
||||
|
||||
{{ Form::textGroup('due_at', trans('bills.due_date'), 'calendar',['id' => 'due_at', 'class' => 'form-control', 'required' => 'required', 'data-inputmask' => '\'alias\': \'yyyy/mm/dd\'', 'data-mask' => ''],Date::now()->toDateString()) }}
|
||||
|
||||
{{ Form::textGroup('bill_number', trans('bills.bill_number'), 'file-text-o') }}
|
||||
|
||||
{{ Form::textGroup('order_number', trans('bills.order_number'), 'shopping-cart',[]) }}
|
||||
|
||||
<div class="form-group col-md-12">
|
||||
{!! Form::label('items', trans_choice('general.items', 1), ['class' => 'control-label']) !!}
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered" id="items">
|
||||
<thead>
|
||||
<tr style="background-color: #f9f9f9;">
|
||||
<th width="5%" class="text-center">{{ trans('general.actions') }}</th>
|
||||
<th width="40%" class="text-left">{{ trans('general.name') }}</th>
|
||||
<th width="5%" class="text-center">{{ trans('bills.quantity') }}</th>
|
||||
<th width="10%" class="text-right">{{ trans('bills.price') }}</th>
|
||||
<th width="15%" class="text-right">{{ trans_choice('general.taxes', 1) }}</th>
|
||||
<th width="10%" class="text-right">{{ trans('bills.total') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php $item_row = 0; ?>
|
||||
@foreach($bill->items as $item)
|
||||
<tr id="item-row-{{ $item_row }}">
|
||||
<td class="text-center" style="vertical-align: middle;">
|
||||
<button type="button" onclick="$(this).tooltip('destroy'); $('#item-row-{{ $item_row }}').remove(); totalItem();" data-toggle="tooltip" title="Remove Item" class="btn btn-xs btn-danger"><i class="fa fa-trash"></i></button>
|
||||
</td>
|
||||
<td>
|
||||
<input value="{{ $item->name }}" class="form-control typeahead" required="required" placeholder="Enter Item Name" name="item[{{ $item_row }}][name]" type="text" id="item-name-{{ $item_row }}">
|
||||
<input value="{{ $item->item_id }}" name="item[{{ $item_row }}][item_id]" type="hidden" id="item-id-{{ $item_row }}">
|
||||
</td>
|
||||
<td>
|
||||
<input value="{{ $item->quantity }}" class="form-control text-center" required="required" name="item[{{ $item_row }}][quantity]" type="text" id="item-quantity-{{ $item_row }}">
|
||||
</td>
|
||||
<td>
|
||||
<input value="{{ $item->price }}" class="form-control text-right" required="required" name="item[{{ $item_row }}][price]" type="text" id="item-price-{{ $item_row }}">
|
||||
</td>
|
||||
<td>
|
||||
{!! Form::select('item[' . $item_row . '][tax]', $taxes, $item->tax, ['id'=> 'item-tax-'. $item_row, 'class' => 'form-control select2', 'placeholder' => trans('general.form.select.field', ['field' => trans_choice('general.taxes', 1)])]) !!}
|
||||
</td>
|
||||
<td class="text-right" style="vertical-align: middle;">
|
||||
<span id="item-total-{{ $item_row }}">@money($item->total, $bill->currency_code, true)</span>
|
||||
</td>
|
||||
</tr>
|
||||
<?php $item_row++; ?>
|
||||
@endforeach
|
||||
@if (empty($bill->items))
|
||||
<tr id="item-row-{{ $item_row }}">
|
||||
<td class="text-center" style="vertical-align: middle;">
|
||||
<button type="button" onclick="$(this).tooltip('destroy'); $('#item-row-{{ $item_row }}').remove(); totalItem();" data-toggle="tooltip" title="{{ trans('general.delete') }}" class="btn btn-xs btn-danger"><i class="fa fa-trash"></i></button>
|
||||
</td>
|
||||
<td>
|
||||
<input class="form-control typeahead" required="required" placeholder="{{ trans('general.form.enter', ['field' => trans_choice('bills.item_name', 1)]) }}" name="item[{{ $item_row }}][name]" type="text" id="item-name-{{ $item_row }}">
|
||||
<input name="item[{{ $item_row }}][item_id]" type="hidden" id="item-id-{{ $item_row }}">
|
||||
</td>
|
||||
<td>
|
||||
<input class="form-control text-center" required="required" name="item[{{ $item_row }}][quantity]" type="text" id="item-quantity-{{ $item_row }}">
|
||||
</td>
|
||||
<td>
|
||||
<input class="form-control text-right" required="required" name="item[{{ $item_row }}][price]" type="text" id="item-price-{{ $item_row }}">
|
||||
</td>
|
||||
<td>
|
||||
{!! Form::select('item[' . $item_row . '][tax]', $taxes, null, ['id'=> 'item-tax-'. $item_row, 'class' => 'form-control select2', 'placeholder' => trans('general.form.select.field', ['field' => trans_choice('general.taxes', 1)])]) !!}
|
||||
</td>
|
||||
<td class="text-right" style="vertical-align: middle;">
|
||||
<span id="item-total-{{ $item_row }}">0</span>
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
<?php $item_row++; ?>
|
||||
<tr id="addItem">
|
||||
<td class="text-center"><button type="button" onclick="addItem();" data-toggle="tooltip" title="{{ trans('general.add') }}" class="btn btn-xs btn-primary" data-original-title="{{ trans('general.add') }}"><i class="fa fa-plus"></i></button></td>
|
||||
<td class="text-right" colspan="5"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-right" colspan="5"><strong>{{ trans('bills.sub_total') }}</strong></td>
|
||||
<td class="text-right"><span id="sub-total">0</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-right" colspan="5"><strong>{{ trans_choice('general.taxes', 1) }}</strong></td>
|
||||
<td class="text-right"><span id="tax-total">0</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-right" colspan="5"><strong>{{ trans('bills.total') }}</strong></td>
|
||||
<td class="text-right"><span id="grand-total">0</span></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
{{ Form::textareaGroup('notes', trans_choice('general.notes', 2)) }}
|
||||
|
||||
{{ Form::fileGroup('attachment', trans('general.attachment'),[]) }}
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
|
||||
@permission('update-expenses-bills')
|
||||
<div class="box-footer">
|
||||
{{ Form::saveButtons('expenses/bills') }}
|
||||
</div>
|
||||
<!-- /.box-footer -->
|
||||
@endpermission
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('js')
|
||||
<script src="{{ asset('vendor/almasaeed2010/adminlte/plugins/datepicker/bootstrap-datepicker.js') }}"></script>
|
||||
<script src="{{ asset('public/js/bootstrap-fancyfile.js') }}"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-3-typeahead/4.0.1/bootstrap3-typeahead.min.js"></script>
|
||||
@endsection
|
||||
|
||||
@section('css')
|
||||
<link rel="stylesheet" href="{{ asset('vendor/almasaeed2010/adminlte/plugins/datepicker/datepicker3.css') }}">
|
||||
<link rel="stylesheet" href="{{ asset('public/css/bootstrap-fancyfile.css') }}">
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
<script type="text/javascript">
|
||||
var item_row = {{ $item_row }};
|
||||
|
||||
function addItem() {
|
||||
html = '<tr id="item-row-' + item_row + '">';
|
||||
html += ' <td class="text-center" style="vertical-align: middle;">';
|
||||
html += ' <button type="button" onclick="$(this).tooltip(\'destroy\'); $(\'#item-row-' + item_row + '\').remove(); totalItem();" data-toggle="tooltip" title="{{ trans('general.delete') }}" class="btn btn-xs btn-danger"><i class="fa fa-trash"></i></button>';
|
||||
html += ' </td>';
|
||||
html += ' <td>';
|
||||
html += ' <input class="form-control typeahead" required="required" placeholder="{{ trans('general.form.enter', ['field' => trans_choice('bills.item_name', 1)]) }}" name="item[' + item_row + '][name]" type="text" id="item-name-' + item_row + '">';
|
||||
html += ' <input name="item[' + item_row + '][item_id]" type="hidden" id="item-id-' + item_row + '">';
|
||||
html += ' </td>';
|
||||
html += ' <td>';
|
||||
html += ' <input class="form-control text-center" required="required" name="item[' + item_row + '][quantity]" type="text" id="item-quantity-' + item_row + '">';
|
||||
html += ' </td>';
|
||||
html += ' <td>';
|
||||
html += ' <input class="form-control text-right" required="required" name="item[' + item_row + '][price]" type="text" id="item-price-' + item_row + '">';
|
||||
html += ' </td>';
|
||||
html += ' <td>';
|
||||
html += ' <select class="form-control select2" name="item[' + item_row + '][tax]" id="item-tax-' + item_row + '">';
|
||||
html += ' <option selected="selected" value="">{{ trans('general.form.select.filed', ['field' => trans_choice('general.taxes', 1)]) }}</option>';
|
||||
@foreach($taxes as $tax_key => $tax_value)
|
||||
html += ' <option value="{{ $tax_key }}">{{ $tax_value }}</option>';
|
||||
@endforeach
|
||||
html += ' </select>';
|
||||
html += ' </td>';
|
||||
html += ' <td class="text-right" style="vertical-align: middle;">';
|
||||
html += ' <span id="item-total-' + item_row + '">0</span>';
|
||||
html += ' </td>';
|
||||
|
||||
$('#items tbody #addItem').before(html);
|
||||
//$('[rel=tooltip]').tooltip();
|
||||
|
||||
$('[data-toggle="tooltip"]').tooltip('hide');
|
||||
|
||||
$('#item-row-' + item_row + ' .select2').select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.taxes', 1)]) }}"
|
||||
});
|
||||
|
||||
item_row++;
|
||||
}
|
||||
|
||||
$(document).ready(function(){
|
||||
totalItem();
|
||||
|
||||
//Date picker
|
||||
$('#billed_at').datepicker({
|
||||
format: 'yyyy-mm-dd',
|
||||
autoclose: true
|
||||
});
|
||||
|
||||
//Date picker
|
||||
$('#due_at').datepicker({
|
||||
format: 'yyyy-mm-dd',
|
||||
autoclose: true
|
||||
});
|
||||
|
||||
$(".select2").select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.taxes', 1)]) }}"
|
||||
});
|
||||
|
||||
$("#vendor_id").select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.vendors', 1)]) }}"
|
||||
});
|
||||
|
||||
$("#currency_code").select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.currencies', 1)]) }}"
|
||||
});
|
||||
|
||||
$('#attachment').fancyfile({
|
||||
text : '{{ trans('general.form.select.file') }}',
|
||||
style : 'btn-default',
|
||||
placeholder : '<?php echo $bill->attachment; ?>'
|
||||
});
|
||||
|
||||
var autocomplete_path = "{{ url('items/items/autocomplete') }}";
|
||||
|
||||
$(document).on('click', '.form-control.typeahead', function() {
|
||||
input_id = $(this).attr('id').split('-');
|
||||
|
||||
item_id = parseInt(input_id[input_id.length-1]);
|
||||
|
||||
$(this).typeahead({
|
||||
minLength: 3,
|
||||
displayText:function (data) {
|
||||
return data.name;
|
||||
},
|
||||
source: function (query, process) {
|
||||
$.ajax({
|
||||
url: autocomplete_path,
|
||||
type: 'GET',
|
||||
dataType: 'JSON',
|
||||
data: 'query=' + query + '&type=bill¤cy_code=' + $('#currency_code').val(),
|
||||
success: function(data) {
|
||||
return process(data);
|
||||
}
|
||||
});
|
||||
},
|
||||
afterSelect: function (data) {
|
||||
$('#item-id-' + item_id).val(data.item_id);
|
||||
$('#item-quantity-' + item_id).val('1');
|
||||
$('#item-price-' + item_id).val(data.purchase_price);
|
||||
$('#item-tax-' + item_id).val(data.tax_id);
|
||||
|
||||
// This event Select2 Stylesheet
|
||||
$('#item-tax-' + item_id).trigger('change');
|
||||
|
||||
$('#item-total-' + item_id).html(data.total);
|
||||
|
||||
totalItem();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$(document).on('change', '#currency_code, #items tbody select', function(){
|
||||
totalItem();
|
||||
});
|
||||
|
||||
$(document).on('keyup', '#items tbody .form-control', function(){
|
||||
totalItem();
|
||||
});
|
||||
|
||||
$(document).on('change', '#vendor_id', function (e) {
|
||||
$.ajax({
|
||||
url: '{{ url("expenses/vendors/currency") }}',
|
||||
type: 'GET',
|
||||
dataType: 'JSON',
|
||||
data: 'vendor_id=' + $(this).val(),
|
||||
success: function(data) {
|
||||
$('#currency_code').val(data.currency_code);
|
||||
|
||||
// This event Select2 Stylesheet
|
||||
$('#currency_code').trigger('change');
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
function totalItem() {
|
||||
$.ajax({
|
||||
url: '{{ url("items/items/totalItem") }}',
|
||||
type: 'POST',
|
||||
dataType: 'JSON',
|
||||
data: $('#currency_code, #items input[type=\'text\'],#items input[type=\'hidden\'], #items textarea, #items select'),
|
||||
headers: { 'X-CSRF-TOKEN': '{{ csrf_token() }}' },
|
||||
success: function(data) {
|
||||
if (data) {
|
||||
$.each( data.items, function( key, value ) {
|
||||
$('#item-total-' + key).html(value);
|
||||
});
|
||||
|
||||
$('#sub-total').html(data.sub_total);
|
||||
$('#tax-total').html(data.tax_total);
|
||||
$('#grand-total').html(data.grand_total);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
@endsection
|
||||
75
resources/views/expenses/bills/index.blade.php
Normal file
75
resources/views/expenses/bills/index.blade.php
Normal file
@@ -0,0 +1,75 @@
|
||||
@extends('layouts.admin')
|
||||
|
||||
@section('title', trans_choice('general.bills', 2))
|
||||
|
||||
@permission('create-expenses-bills')
|
||||
@section('new_button')
|
||||
<span class="new-button"><a href="{{ url('expenses/bills/create') }}" class="btn btn-success btn-sm"><span class="fa fa-plus"></span> {{ trans('general.add_new') }}</a></span>
|
||||
@endsection
|
||||
@endpermission
|
||||
|
||||
@section('content')
|
||||
<!-- Default box -->
|
||||
<div class="box box-success">
|
||||
<div class="box-header">
|
||||
{!! Form::open(['url' => 'expenses/bills', 'role' => 'form', 'method' => 'GET']) !!}
|
||||
<div class="pull-left">
|
||||
<span class="title-filter">{{ trans('general.search') }}:</span>
|
||||
{!! Form::text('search', request('search'), ['class' => 'form-control input-filter input-sm', 'placeholder' => trans('general.search_placeholder')]) !!}
|
||||
{!! Form::select('status', $status, request('status'), ['class' => 'form-control input-filter input-sm', 'placeholder' => trans('status.all')]) !!}
|
||||
{!! Form::button('<span class="fa fa-filter"></span> ' . trans('general.filter'), ['type' => 'submit', 'class' => 'btn btn-sm btn-default btn-filter']) !!}
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<span class="title-filter">{{ trans('general.show') }}:</span>
|
||||
{!! Form::select('limit', $limits, request('limit', setting('general.list_limit', '25')), ['class' => 'form-control input-filter input-sm', 'onchange' => 'this.form.submit()']) !!}
|
||||
</div>
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
|
||||
<div class="box-body">
|
||||
<div class="table table-responsive">
|
||||
<table class="table table-bordered table-striped table-hover" id="tbl-bills">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-md-1">@sortablelink('bill_number', trans_choice('general.numbers', 1))</th>
|
||||
<th class="col-md-3">@sortablelink('vendor_name', trans_choice('general.vendors', 1))</th>
|
||||
<th class="col-md-1">@sortablelink('amount', trans('general.amount'))</th>
|
||||
<th class="col-md-1">@sortablelink('status.name', trans('general.status'))</th>
|
||||
<th>@sortablelink('billed_at', trans('bills.bill_date'))</th>
|
||||
<th>@sortablelink('due_at', trans('bills.due_date'))</th>
|
||||
<th class="col-md-3">{{ trans('general.actions') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($bills as $item)
|
||||
<tr>
|
||||
<td><a href="{{ url('expenses/bills/' . $item->id . ' ') }}">{{ $item->bill_number }}</a></td>
|
||||
<td>{{ $item->vendor_name }}</td>
|
||||
<td>@money($item->amount, $item->currency_code, true)</td>
|
||||
<td>{{ $item->status->name }}</td>
|
||||
<td>{{ Date::parse($item->billed_at)->format($date_format) }}</td>
|
||||
<td>{{ Date::parse($item->due_at)->format($date_format) }}</td>
|
||||
<td>
|
||||
<a href="{{ url('expenses/bills/' . $item->id) }}" class="btn btn-info btn-xs"><i class="fa fa-eye" aria-hidden="true"></i> {{ trans('general.show') }}</a>
|
||||
<a href="{{ url('expenses/bills/' . $item->id . '/edit') }}" class="btn btn-primary btn-xs"><i class="fa fa-pencil-square-o" aria-hidden="true"></i> {{ trans('general.edit') }}</a>
|
||||
@permission('delete-expenses-bills')
|
||||
{!! Form::deleteButton($item, 'expenses/bills') !!}
|
||||
@endpermission
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
|
||||
<div class="box-footer">
|
||||
@include('partials.admin.pagination', ['items' => $bills, 'type' => 'bills'])
|
||||
</div>
|
||||
<!-- /.box-footer -->
|
||||
</div>
|
||||
<!-- /.box -->
|
||||
@endsection
|
||||
|
||||
449
resources/views/expenses/bills/show.blade.php
Normal file
449
resources/views/expenses/bills/show.blade.php
Normal file
@@ -0,0 +1,449 @@
|
||||
@extends('layouts.admin')
|
||||
|
||||
@section('title', trans_choice('general.bills', 1) . ': ' . $bill->bill_number)
|
||||
|
||||
@section('content')
|
||||
<div class="box box-success">
|
||||
<div class="bill">
|
||||
<span class="badge bg-aqua">{{ $bill->status->name }}</span>
|
||||
|
||||
<div class="row invoice-header">
|
||||
<div class="col-xs-7">
|
||||
@if (setting('general.invoice_logo'))
|
||||
<img src="{{ asset(setting('general.invoice_logo')) }}" class="invoice-logo" />
|
||||
@else
|
||||
<img src="{{ asset(setting('general.company_logo')) }}" class="invoice-logo" />
|
||||
@endif
|
||||
</div>
|
||||
<div class="col-xs-5 invoice-company">
|
||||
<address>
|
||||
<strong>{{ setting('general.company_name') }}</strong><br>
|
||||
{{ setting('general.company_address') }}<br>
|
||||
@if (setting('general.company_tax_number'))
|
||||
{{ trans('general.tax_number') }}: {{ setting('general.company_tax_number') }}<br>
|
||||
@endif
|
||||
<br>
|
||||
@if (setting('general.company_phone'))
|
||||
{{ setting('general.company_phone') }}<br>
|
||||
@endif
|
||||
{{ setting('general.company_email') }}
|
||||
</address>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-7">
|
||||
{{ trans('bills.bill_from') }}
|
||||
<address>
|
||||
<strong>{{ $bill->vendor_name }}</strong><br>
|
||||
{{ $bill->vendor_address }}<br>
|
||||
@if ($bill->vendor_tax_number)
|
||||
{{ trans('general.tax_number') }}: {{ $bill->vendor_tax_number }}<br>
|
||||
@endif
|
||||
<br>
|
||||
@if ($bill->vendor_phone)
|
||||
{{ $bill->vendor_phone }}<br>
|
||||
@endif
|
||||
{{ $bill->vendor_email }}
|
||||
</address>
|
||||
</div>
|
||||
<div class="col-xs-5">
|
||||
<div class="table-responsive">
|
||||
<table class="table no-border">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>{{ trans('bills.bill_number') }}:</th>
|
||||
<td class="text-right">{{ $bill->bill_number }}</td>
|
||||
</tr>
|
||||
@if ($bill->order_number)
|
||||
<tr>
|
||||
<th>{{ trans('bills.order_number') }}:</th>
|
||||
<td class="text-right">{{ $bill->order_number }}</td>
|
||||
</tr>
|
||||
@endif
|
||||
<tr>
|
||||
<th>{{ trans('bills.bill_date') }}:</th>
|
||||
<td class="text-right">{{ Date::parse($bill->billed_at)->format($date_format) }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{ trans('bills.payment_due') }}:</th>
|
||||
<td class="text-right">{{ Date::parse($bill->due_at)->format($date_format) }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-12 table-responsive">
|
||||
<table class="table table-striped">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>{{ trans_choice('general.items', 1) }}</th>
|
||||
<th class="text-center">{{ trans('bills.quantity') }}</th>
|
||||
<th class="text-right">{{ trans('bills.price') }}</th>
|
||||
<th class="text-right">{{ trans('bills.total') }}</th>
|
||||
</tr>
|
||||
@foreach($bill->items as $item)
|
||||
<tr>
|
||||
<td>
|
||||
{{ $item->name }}
|
||||
@if ($item->sku)
|
||||
<br><small>{{ trans('items.sku') }}: {{ $item->sku }}</small>
|
||||
@endif
|
||||
</td>
|
||||
<td class="text-center">{{ $item->quantity }}</td>
|
||||
<td class="text-right">@money($item->price, $bill->currency_code, true)</td>
|
||||
<td class="text-right">@money($item->total - $item->tax, $bill->currency_code, true)</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-7">
|
||||
@if ($bill->notes)
|
||||
<p class="lead">{{ trans_choice('general.notes', 2) }}:</p>
|
||||
|
||||
<p class="text-muted well well-sm no-shadow" style="margin-top: 10px;">
|
||||
{{ $bill->notes }}
|
||||
</p>
|
||||
@endif
|
||||
</div>
|
||||
<div class="col-xs-5">
|
||||
<div class="table-responsive">
|
||||
<table class="table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th style="width:50%">{{ trans('bills.sub_total') }}:</th>
|
||||
<td class="text-right">@money($bill->sub_total, $bill->currency_code, true)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{ trans('bills.tax_total') }}:</th>
|
||||
<td class="text-right">@money($bill->tax_total, $bill->currency_code, true)</td>
|
||||
</tr>
|
||||
@if($bill->paid)
|
||||
<tr>
|
||||
<th>{{ trans('bills.paid') }}:</th>
|
||||
<td class="text-right">@money('-' . $bill->paid, $bill->currency_code, true)</td>
|
||||
</tr>
|
||||
@endif
|
||||
<tr>
|
||||
<th>{{ trans('bills.total') }}:</th>
|
||||
<td class="text-right">@money($bill->grand_total, $bill->currency_code, true)</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="box-footer row no-print">
|
||||
<div class="col-xs-12">
|
||||
<a href="{{ url('expenses/bills/' . $bill->id . '/edit') }}" class="btn btn-primary">
|
||||
<i class="fa fa-pencil-square-o"></i> {{ trans('general.edit') }}
|
||||
</a>
|
||||
<a href="{{ url('expenses/bills/' . $bill->id . '/print') }}" target="_blank" class="btn btn-default">
|
||||
<i class="fa fa-print"></i> {{ trans('general.print') }}
|
||||
</a>
|
||||
<button type="button" id="button-pdf" class="btn btn-default" data-toggle="tooltip" title="{{ trans('bills.download_pdf') }}">
|
||||
<i class="fa fa-file-pdf-o"></i> {{ trans('general.download') }}
|
||||
</button>
|
||||
<button type="button" id="button-payment" class="btn btn-success">
|
||||
<i class="fa fa-credit-card"></i> {{ trans('bills.add_payment') }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-xs-6 no-padding-left">
|
||||
<div class="box box-default collapsed-box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ trans('bills.histories') }}</h3>
|
||||
|
||||
<div class="box-tools pull-right">
|
||||
<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-plus"></i></button>
|
||||
</div>
|
||||
<!-- /.box-tools -->
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div class="table-responsive">
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ trans('general.date') }}</th>
|
||||
<th>{{ trans('general.status') }}</th>
|
||||
<th>{{ trans('general.description') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($bill->histories as $history)
|
||||
<tr>
|
||||
<td>{{ Date::parse($bill->created_at)->format($date_format) }}</td>
|
||||
<td>{{ $bill->status->name }}</td>
|
||||
<td>{{ $bill->description }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-xs-6 no-padding-right">
|
||||
<div class="box box-default collapsed-box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ trans('bills.payments') }}</h3>
|
||||
|
||||
<div class="box-tools pull-right">
|
||||
<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-plus"></i></button>
|
||||
</div>
|
||||
<!-- /.box-tools -->
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div class="table-responsive">
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ trans('general.date') }}</th>
|
||||
<th>{{ trans('general.amount') }}</th>
|
||||
<th>{{ trans_choice('general.accounts', 1) }}</th>
|
||||
<th style="width: 15%;">{{ trans('general.actions') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($bill->payments as $payment)
|
||||
<tr>
|
||||
<td>{{ Date::parse($payment->paid_at)->format($date_format) }}</td>
|
||||
<td>@money($payment->amount, $payment->currency_code, true)</td>
|
||||
<td>{{ $payment->account->name }}</td>
|
||||
<td>
|
||||
<a href="{{ url('expenses/bills/' . $payment->id) }}" class="btn btn-info btn-xs hidden"><i class="fa fa-eye" aria-hidden="true"></i> {{ trans('general.show') }}</a>
|
||||
<a href="{{ url('expenses/bills/' . $payment->id . '/edit') }}" class="btn btn-primary btn-xs hidden"><i class="fa fa-pencil-square-o" aria-hidden="true"></i> {{ trans('general.edit') }}</a>
|
||||
{!! Form::open([
|
||||
'id' => 'bill-payment-' . $payment->id,
|
||||
'method' => 'DELETE',
|
||||
'url' => ['expenses/bills/paymentDestroy', $payment->id],
|
||||
'style' => 'display:inline'
|
||||
]) !!}
|
||||
{!! Form::button('<i class="fa fa-trash-o" aria-hidden="true"></i> ' . trans('general.delete'), array(
|
||||
'type' => 'button',
|
||||
'class' => 'btn btn-danger btn-xs',
|
||||
'title' => trans('general.delete'),
|
||||
'onclick' => 'confirmDelete("' . '#bill-payment-' . $payment->id . '", "' . trans_choice('general.payments', 2) . '", "' . trans('general.delete_confirm', ['name' => '<strong>' . Date::parse($payment->paid_at)->format($date_format) . ' - ' . money($payment->amount, $payment->currency_code, true) . ' - ' . $payment->account->name . '</strong>', 'type' => strtolower(trans_choice('general.revenues', 1))]) . '", "' . trans('general.cancel') . '", "' . trans('general.delete') . '")'
|
||||
)) !!}
|
||||
{!! Form::close() !!}
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('js')
|
||||
<script src="{{ asset('vendor/almasaeed2010/adminlte/plugins/datepicker/bootstrap-datepicker.js') }}"></script>
|
||||
<script src="{{ asset('public/js/bootstrap-fancyfile.js') }}"></script>
|
||||
@endsection
|
||||
|
||||
@section('css')
|
||||
<link rel="stylesheet" href="{{ asset('vendor/almasaeed2010/adminlte/plugins/datepicker/datepicker3.css') }}">
|
||||
<link rel="stylesheet" href="{{ asset('public/css/bootstrap-fancyfile.css') }}">
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
$(document).on('click', '#button-payment', function (e) {
|
||||
$('#payment-modal').remove();
|
||||
|
||||
var html = '';
|
||||
|
||||
html += '<div class="modal fade" id="payment-modal" tabindex="-1" role="dialog" aria-labelledby="paymentModalLabel">';
|
||||
html += ' <div class="modal-dialog" role="document">';
|
||||
html += ' <div class="modal-content box box-success">';
|
||||
html += ' <div class="modal-header">';
|
||||
html += ' <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>';
|
||||
html += ' <h4 class="modal-title" id="paymentModalLabel">{{ trans('bills.add_payment') }}</h4>';
|
||||
html += ' </div>';
|
||||
html += ' <div class="modal-body box-body">';
|
||||
html += ' <div class="form-group col-md-6 required">';
|
||||
html += ' {!! Form::label('paid_at', trans('general.date'), ['class' => 'control-label']) !!}';
|
||||
html += ' <div class="input-group">';
|
||||
html += ' <div class="input-group-addon"><i class="fa fa-calendar"></i></div>';
|
||||
html += ' {!! Form::text('paid_at', \Date::now()->toDateString(), ['id' => 'paid_at', 'class' => 'form-control', 'required' => 'required', 'data-inputmask' => '\'alias\': \'yyyy-mm-dd\'', 'data-mask' => '']) !!}';
|
||||
html += ' </div>';
|
||||
html += ' </div>';
|
||||
html += ' <div class="form-group col-md-6 required">';
|
||||
html += ' {!! Form::label('amount', trans('general.amount'), ['class' => 'control-label']) !!}';
|
||||
html += ' <div class="input-group">';
|
||||
html += ' <div class="input-group-addon"><i class="fa fa-money"></i></div>';
|
||||
html += ' {!! Form::text('amount', $bill->grand_total, ['class' => 'form-control', 'required' => 'required', 'placeholder' => trans('general.form.enter', ['field' => trans('general.amount')])]) !!}';
|
||||
html += ' </div>';
|
||||
html += ' </div>';
|
||||
html += ' <div class="form-group col-md-6 required">';
|
||||
html += ' {!! Form::label('account_id', trans_choice('general.accounts', 1), ['class' => 'control-label']) !!}';
|
||||
html += ' <div class="input-group">';
|
||||
html += ' <div class="input-group-addon"><i class="fa fa-university"></i></div>';
|
||||
html += ' {!! Form::select('account_id', $accounts, setting('general.default_account'), ['class' => 'form-control', 'required' => 'required', 'placeholder' => trans('general.form.select.field', ['field' => trans_choice('general.accounts', 1)])]) !!}';
|
||||
html += ' </div>';
|
||||
html += ' </div>';
|
||||
html += ' <div class="form-group col-md-6 required">';
|
||||
html += ' {!! Form::label('currency_code', trans_choice('general.currencies', 1), ['class' => 'control-label']) !!}';
|
||||
html += ' <div class="input-group">';
|
||||
html += ' <div class="input-group-addon"><i class="fa fa-exchange"></i></div>';
|
||||
html += ' {!! Form::text('currency', $currencies[$account_currency_code], ['id' => 'currency', 'class' => 'form-control', 'required' => 'required', 'disabled' => 'disabled']) !!}';
|
||||
html += ' {!! Form::hidden('currency_code', $account_currency_code, ['id' => 'currency_code', 'class' => 'form-control', 'required' => 'required']) !!}';
|
||||
html += ' </div>';
|
||||
html += ' </div>';
|
||||
html += ' <div class="form-group col-md-12">';
|
||||
html += ' {!! Form::label('description', trans('general.description'), ['class' => 'control-label']) !!}';
|
||||
html += ' {!! Form::textarea('description', null, ['class' => 'form-control', 'rows' => '3', 'placeholder' => trans('general.form.enter', ['field' => trans('general.description')])]) !!}';
|
||||
html += ' </div>';
|
||||
html += ' <div class="form-group col-md-6 required">';
|
||||
html += ' {!! Form::label('payment_method', trans_choice('general.payment_methods', 1), ['class' => 'control-label']) !!}';
|
||||
html += ' <div class="input-group">';
|
||||
html += ' <div class="input-group-addon"><i class="fa fa-folder-open-o"></i></div>';
|
||||
html += ' {!! Form::select('payment_method', $payment_methods, setting('general.default_payment_method'), ['class' => 'form-control', 'required' => 'required', 'placeholder' => trans('general.form.select.field', ['field' => trans_choice('general.payment_methods', 1)])]) !!}';
|
||||
html += ' </div>';
|
||||
html += ' </div>';
|
||||
html += ' <div class="form-group col-md-6">';
|
||||
html += ' {!! Form::label('reference', trans('general.reference'), ['class' => 'control-label']) !!}';
|
||||
html += ' <div class="input-group">';
|
||||
html += ' <div class="input-group-addon"><i class="fa fa-file-text-o"></i></div>';
|
||||
html += ' {!! Form::text('reference', null, ['class' => 'form-control', 'placeholder' => trans('general.form.enter', ['field' => trans('general.reference')])]) !!}';
|
||||
html += ' </div>';
|
||||
html += ' </div>';
|
||||
html += ' {!! Form::hidden('bill_id', $bill->id, ['id' => 'bill_id', 'class' => 'form-control', 'required' => 'required']) !!}';
|
||||
html += ' </div>';
|
||||
html += ' <div class="modal-footer">';
|
||||
html += ' <button type="button" class="btn btn-default" data-dismiss="modal">{{ trans('general.cancel') }}</button>';
|
||||
html += ' <button type="button" onclick="addPayment();" class="btn btn-success">{{ trans('general.save') }}</button>';
|
||||
html += ' </div>';
|
||||
html += ' </div>';
|
||||
html += ' </div>';
|
||||
html += '</div>';
|
||||
|
||||
$('body').append(html);
|
||||
|
||||
$('#paid_at').datepicker({
|
||||
format: 'yyyy-mm-dd',
|
||||
autoclose: true
|
||||
});
|
||||
|
||||
$("#account_id").select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.accounts', 1)]) }}"
|
||||
});
|
||||
|
||||
$("#payment_method").select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.payment_methods', 1)]) }}"
|
||||
});
|
||||
|
||||
$('#payment-modal').modal('show');
|
||||
});
|
||||
|
||||
$(document).on('change', '#account_id', function (e) {
|
||||
$.ajax({
|
||||
url: '{{ url("settings/currencies/currency") }}',
|
||||
type: 'GET',
|
||||
dataType: 'JSON',
|
||||
data: 'account_id=' + $(this).val(),
|
||||
success: function(data) {
|
||||
$('#currency').val(data.currency_name);
|
||||
$('#currency_code').val(data.currency_code);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$(document).on('click', '#button-pdf', function (e) {
|
||||
location.href = "{{ url('expenses/bills/' . $bill->id . '/pdf') }}";
|
||||
});
|
||||
|
||||
$(document).on('click', '#button-email', function (e) {
|
||||
$('#email-modal').remove();
|
||||
|
||||
var html = '<div class="modal fade" id="email-modal" tabindex="-1" role="dialog" aria-labelledby="emailModalLabel">';
|
||||
html += ' <div class="modal-dialog" role="document">';
|
||||
html += ' <div class="modal-content">';
|
||||
html += ' <div class="modal-header">';
|
||||
html += ' <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>';
|
||||
html += ' <h4 class="modal-title" id="emailModalLabel">Overflowing text</h4>';
|
||||
html += ' </div>';
|
||||
html += ' <div class="modal-body">';
|
||||
html += ' N/A';
|
||||
html += ' </div>';
|
||||
html += ' <div class="modal-footer">';
|
||||
html += ' <button type="button" class="btn btn-default" data-dismiss="modal">{{ trans('general.cancel') }}</button>';
|
||||
html += ' <button type="button" class="btn btn-success">Save changes</button>';
|
||||
html += ' </div>';
|
||||
html += ' </div>';
|
||||
html += ' </div>';
|
||||
html += '</div>';
|
||||
|
||||
$('body').append(html);
|
||||
|
||||
$('#email-modal').modal('show');
|
||||
});
|
||||
});
|
||||
|
||||
function addPayment() {
|
||||
$('.help-block').remove();
|
||||
|
||||
$.ajax({
|
||||
url: '{{ url("expenses/bills/payment") }}',
|
||||
type: 'POST',
|
||||
dataType: 'JSON',
|
||||
data: $('#payment-modal input[type=\'text\'], #payment-modal input[type=\'hidden\'], #payment-modal textarea, #payment-modal select'),
|
||||
headers: { 'X-CSRF-TOKEN': '{{ csrf_token() }}' },
|
||||
beforeSend: function() {
|
||||
$('#payment-modal .modal-content').append('<div id="loading" class="text-center"><i class="fa fa-spinner fa-spin fa-5x checkout-spin"></i></div>');
|
||||
},
|
||||
complete: function() {
|
||||
$('#loading').remove();
|
||||
},
|
||||
success: function(data) {
|
||||
$("#payment-modal").modal('hide');
|
||||
|
||||
location.reload();
|
||||
},
|
||||
error: function(data){
|
||||
var errors = data.responseJSON;
|
||||
|
||||
if (typeof errors !== 'undefined') {
|
||||
if (errors.paid_at) {
|
||||
$('#payment-modal #paid_at').parent().after('<p class="help-block">' + errors.paid_at + '</p>');
|
||||
}
|
||||
|
||||
if (errors.amount) {
|
||||
$('#payment-modal #amount').parent().after('<p class="help-block">' + errors.amount + '</p>');
|
||||
}
|
||||
|
||||
if (errors.account_id) {
|
||||
$('#payment-modal #account_id').parent().after('<p class="help-block">' + errors.account_id + '</p>');
|
||||
}
|
||||
|
||||
if (errors.currency_code) {
|
||||
$('#payment-modal #currency_code').parent().after('<p class="help-block">' + errors.currency_code + '</p>');
|
||||
}
|
||||
|
||||
if (errors.category_id) {
|
||||
$('#payment-modal #category_id').parent().after('<p class="help-block">' + errors.category_id + '</p>');
|
||||
}
|
||||
|
||||
if (errors.payment_method) {
|
||||
$('#payment-modal #payment_method').parent().after('<p class="help-block">' + errors.payment_method + '</p>');
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
@endsection
|
||||
105
resources/views/expenses/payments/create.blade.php
Normal file
105
resources/views/expenses/payments/create.blade.php
Normal file
@@ -0,0 +1,105 @@
|
||||
@extends('layouts.admin')
|
||||
|
||||
@section('title', trans('general.title.new', ['type' => trans_choice('general.payments', 1)]))
|
||||
|
||||
@section('content')
|
||||
<!-- Default box -->
|
||||
<div class="box box-success">
|
||||
{!! Form::open(['url' => 'expenses/payments', 'files' => true, 'role' => 'form']) !!}
|
||||
|
||||
<div class="box-body">
|
||||
{{ Form::textGroup('paid_at', trans('general.date'), 'calendar',['id' => 'paid_at', 'class' => 'form-control', 'required' => 'required', 'data-inputmask' => '\'alias\': \'yyyy-mm-dd\'', 'data-mask' => ''], Date::now()->toDateString()) }}
|
||||
|
||||
{{ Form::textGroup('amount', trans('general.amount'), 'money', ['required' => 'required', 'autofocus' => 'autofocus']) }}
|
||||
|
||||
{{ Form::selectGroup('account_id', trans_choice('general.accounts', 1), 'university', $accounts, setting('general.default_account')) }}
|
||||
|
||||
<div class="form-group col-md-6 {{ $errors->has('currency_code') ? 'has-error' : ''}}">
|
||||
{!! Form::label('currency_code', trans_choice('general.currencies', 1), ['class' => 'control-label']) !!}
|
||||
<div class="input-group">
|
||||
<div class="input-group-addon"><i class="fa fa-exchange"></i></div>
|
||||
{!! Form::text('currency', $currencies[$account_currency_code], ['id' => 'currency', 'class' => 'form-control', 'required' => 'required', 'disabled' => 'disabled']) !!}
|
||||
{!! Form::hidden('currency_code', $account_currency_code, ['id' => 'currency_code', 'class' => 'form-control', 'required' => 'required']) !!}
|
||||
</div>
|
||||
{!! $errors->first('currency_code', '<p class="help-block">:message</p>') !!}
|
||||
</div>
|
||||
|
||||
{{ Form::textareaGroup('description', trans('general.description')) }}
|
||||
|
||||
{{ Form::selectGroup('category_id', trans_choice('general.categories', 1), 'folder-open-o', $categories) }}
|
||||
|
||||
{{ Form::selectGroup('vendor_id', trans_choice('general.vendors', 1), 'user', $vendors, null, []) }}
|
||||
|
||||
{{ Form::selectGroup('payment_method', trans_choice('general.payment_methods', 1), 'credit-card',['cash' => trans('general.cash'), 'bank' => trans('general.bank'), 'paypal' => trans('general.paypal')], setting('general.default_payment_method')) }}
|
||||
|
||||
{{ Form::textGroup('reference', trans('general.reference'), 'file-text-o',[]) }}
|
||||
|
||||
{{ Form::fileGroup('attachment', trans('general.attachment')) }}
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
|
||||
<div class="box-footer">
|
||||
{{ Form::saveButtons('expenses/payments') }}
|
||||
</div>
|
||||
<!-- /.box-footer -->
|
||||
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('js')
|
||||
<script src="{{ asset('vendor/almasaeed2010/adminlte/plugins/datepicker/bootstrap-datepicker.js') }}"></script>
|
||||
<script src="{{ asset('public/js/bootstrap-fancyfile.js') }}"></script>
|
||||
@endsection
|
||||
|
||||
@section('css')
|
||||
<link rel="stylesheet" href="{{ asset('vendor/almasaeed2010/adminlte/plugins/datepicker/datepicker3.css') }}">
|
||||
<link rel="stylesheet" href="{{ asset('public/css/bootstrap-fancyfile.css') }}">
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
//Date picker
|
||||
$('#paid_at').datepicker({
|
||||
format: 'yyyy-mm-dd',
|
||||
autoclose: true
|
||||
});
|
||||
|
||||
$("#account_id").select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.accounts', 1)]) }}"
|
||||
});
|
||||
|
||||
$("#category_id").select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.categories', 1)]) }}"
|
||||
});
|
||||
|
||||
$("#vendor_id").select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.vendors', 1)]) }}"
|
||||
});
|
||||
|
||||
$("#payment_method").select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.payment_methods', 1)]) }}"
|
||||
});
|
||||
|
||||
$('#attachment').fancyfile({
|
||||
text : '{{ trans('general.form.select.file') }}',
|
||||
style : 'btn-default',
|
||||
placeholder : '{{ trans('general.form.no_file_selected') }}'
|
||||
});
|
||||
|
||||
$(document).on('change', '#account_id', function (e) {
|
||||
$.ajax({
|
||||
url: '{{ url("settings/currencies/currency") }}',
|
||||
type: 'GET',
|
||||
dataType: 'JSON',
|
||||
data: 'account_id=' + $(this).val(),
|
||||
success: function(data) {
|
||||
$('#currency').val(data.currency_name);
|
||||
$('#currency_code').val(data.currency_code);
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
112
resources/views/expenses/payments/edit.blade.php
Normal file
112
resources/views/expenses/payments/edit.blade.php
Normal file
@@ -0,0 +1,112 @@
|
||||
@extends('layouts.admin')
|
||||
|
||||
@section('title', trans('general.title.edit', ['type' => trans_choice('general.payments', 1)]))
|
||||
|
||||
@section('content')
|
||||
<!-- Default box -->
|
||||
<div class="box box-success">
|
||||
{!! Form::model($payment, [
|
||||
'method' => 'PATCH',
|
||||
'files' => true,
|
||||
'url' => ['expenses/payments', $payment->id],
|
||||
'role' => 'form'
|
||||
]) !!}
|
||||
|
||||
<div class="box-body">
|
||||
{{ Form::textGroup('paid_at', trans('general.date'), 'calendar') }}
|
||||
|
||||
{{ Form::textGroup('amount', trans('general.amount'), 'money', ['required' => 'required', 'autofocus' => 'autofocus']) }}
|
||||
|
||||
{{ Form::selectGroup('account_id', trans_choice('general.accounts', 1), 'university', $accounts, setting('general.default_account')) }}
|
||||
|
||||
<div class="form-group col-md-6 {{ $errors->has('currency_code') ? 'has-error' : ''}}">
|
||||
{!! Form::label('currency_code', trans_choice('general.currencies', 1), ['class' => 'control-label']) !!}
|
||||
<div class="input-group">
|
||||
<div class="input-group-addon"><i class="fa fa-exchange"></i></div>
|
||||
{!! Form::text('currency', $currencies[$account_currency_code], ['id' => 'currency', 'class' => 'form-control', 'required' => 'required', 'disabled' => 'disabled']) !!}
|
||||
{!! Form::hidden('currency_code', $account_currency_code, ['id' => 'currency_code', 'class' => 'form-control', 'required' => 'required']) !!}
|
||||
</div>
|
||||
{!! $errors->first('currency_code', '<p class="help-block">:message</p>') !!}
|
||||
</div>
|
||||
|
||||
{{ Form::textareaGroup('description', trans('general.description')) }}
|
||||
|
||||
{{ Form::selectGroup('category_id', trans_choice('general.categories', 1), 'folder-open-o', $categories) }}
|
||||
|
||||
{{ Form::selectGroup('vendor_id', trans_choice('general.vendors', 1), 'user', $vendors, null, []) }}
|
||||
|
||||
{{ Form::selectGroup('payment_method', trans_choice('general.payment_methods', 1), 'credit-card',['cash' => 'Cash', 'bank' => 'Bank Transfer', 'paypal' => 'PayPal'], setting('general.default_payment_method')) }}
|
||||
|
||||
{{ Form::textGroup('reference', trans('general.reference'), 'file-text-o',[]) }}
|
||||
|
||||
{{ Form::fileGroup('attachment', trans('general.attachment')) }}
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
|
||||
@permission('update-expenses-payments')
|
||||
<div class="box-footer">
|
||||
{{ Form::saveButtons('expenses/payments') }}
|
||||
</div>
|
||||
<!-- /.box-footer -->
|
||||
@endpermission
|
||||
</div>
|
||||
|
||||
{!! Form::close() !!}
|
||||
@endsection
|
||||
|
||||
@section('js')
|
||||
<script src="{{ asset('vendor/almasaeed2010/adminlte/plugins/datepicker/bootstrap-datepicker.js') }}"></script>
|
||||
<script src="{{ asset('public/js/bootstrap-fancyfile.js') }}"></script>
|
||||
@endsection
|
||||
|
||||
@section('css')
|
||||
<link rel="stylesheet" href="{{ asset('vendor/almasaeed2010/adminlte/plugins/datepicker/datepicker3.css') }}">
|
||||
<link rel="stylesheet" href="{{ asset('public/css/bootstrap-fancyfile.css') }}">
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
//Date picker
|
||||
$('#paid_at').datepicker({
|
||||
format: 'yyyy-mm-dd',
|
||||
autoclose: true
|
||||
});
|
||||
|
||||
$("#account_id").select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.accounts', 1)]) }}"
|
||||
});
|
||||
|
||||
$("#category_id").select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.categories', 1)]) }}"
|
||||
});
|
||||
|
||||
$("#vendor_id").select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.vendors', 1)]) }}"
|
||||
});
|
||||
|
||||
$("#payment_method").select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.payment_methods', 1)]) }}"
|
||||
});
|
||||
|
||||
$('#attachment').fancyfile({
|
||||
text : '{{ trans('general.form.select.file') }}',
|
||||
style : 'btn-default',
|
||||
placeholder : '<?php echo ($payment->attachment) ? $payment->attachment : trans('general.form.no_file_selected'); ?>'
|
||||
});
|
||||
|
||||
$(document).on('change', '#account_id', function (e) {
|
||||
$.ajax({
|
||||
url: '{{ url("settings/currencies/currency") }}',
|
||||
type: 'GET',
|
||||
dataType: 'JSON',
|
||||
data: 'account_id=' + $(this).val(),
|
||||
success: function(data) {
|
||||
$('#currency').val(data.currency_name);
|
||||
$('#currency_code').val(data.currency_code);
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
70
resources/views/expenses/payments/index.blade.php
Normal file
70
resources/views/expenses/payments/index.blade.php
Normal file
@@ -0,0 +1,70 @@
|
||||
@extends('layouts.admin')
|
||||
|
||||
@section('title', trans_choice('general.payments', 2))
|
||||
|
||||
@permission('create-expenses-payments')
|
||||
@section('new_button')
|
||||
<span class="new-button"><a href="{{ url('expenses/payments/create') }}" class="btn btn-success btn-sm"><span class="fa fa-plus"></span> {{ trans('general.add_new') }}</a></span>
|
||||
@endsection
|
||||
@endpermission
|
||||
|
||||
@section('content')
|
||||
<!-- Default box -->
|
||||
<div class="box box-success">
|
||||
<div class="box-header">
|
||||
{!! Form::open(['url' => 'expenses/payments', 'role' => 'form', 'method' => 'GET']) !!}
|
||||
<div class="pull-left">
|
||||
<span class="title-filter">{{ trans('general.search') }}:</span>
|
||||
{!! Form::text('search', request('search'), ['class' => 'form-control input-filter input-sm', 'placeholder' => trans('general.search_placeholder')]) !!}
|
||||
{!! Form::select('category', $categories, request('category'), ['class' => 'form-control input-filter input-sm', 'placeholder' => trans('categories.all')]) !!}
|
||||
{!! Form::select('account', $accounts, request('account'), ['class' => 'form-control input-filter input-sm', 'placeholder' => trans('accounts.all')]) !!}
|
||||
{!! Form::button('<span class="fa fa-filter"></span> ' . trans('general.filter'), ['type' => 'submit', 'class' => 'btn btn-sm btn-default btn-filter']) !!}
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<span class="title-filter">{{ trans('general.show') }}:</span>
|
||||
{!! Form::select('limit', $limits, request('limit', setting('general.list_limit', '25')), ['class' => 'form-control input-filter input-sm', 'onchange' => 'this.form.submit()']) !!}
|
||||
</div>
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
|
||||
<div class="box-body">
|
||||
<div class="table table-responsive">
|
||||
<table class="table table-bordered table-striped table-hover" id="tbl-payments">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>@sortablelink('paid_at', trans('general.date'))</th>
|
||||
<th>@sortablelink('amount', trans('general.amount'))</th>
|
||||
<th>@sortablelink('category.name', trans_choice('general.categories', 1))</th>
|
||||
<th>@sortablelink('account.name', trans_choice('general.accounts', 1))</th>
|
||||
<th style="width: 15%;">{{ trans('general.actions') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($payments as $item)
|
||||
<tr>
|
||||
<td><a href="{{ url('expenses/payments/' . $item->id . '/edit') }}">{{ Date::parse($item->paid_at)->format($date_format) }}</a></td>
|
||||
<td>@money($item->amount, $item->currency_code, true)</td>
|
||||
<td>{{ $item->category->name }}</td>
|
||||
<td>{{ $item->account->name }}</td>
|
||||
<td>
|
||||
<a href="{{ url('expenses/payments/' . $item->id . '/edit') }}" class="btn btn-primary btn-xs"><i class="fa fa-pencil-square-o" aria-hidden="true"></i> {{ trans('general.edit') }}</a>
|
||||
@permission('delete-expenses-payments')
|
||||
{!! Form::deleteButton($item, 'expenses/payments') !!}
|
||||
@endpermission
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
|
||||
<div class="box-footer">
|
||||
@include('partials.admin.pagination', ['items' => $payments, 'type' => 'payments'])
|
||||
</div>
|
||||
<!-- /.box-footer -->
|
||||
</div>
|
||||
<!-- /.box -->
|
||||
@endsection
|
||||
|
||||
53
resources/views/expenses/vendors/create.blade.php
vendored
Normal file
53
resources/views/expenses/vendors/create.blade.php
vendored
Normal file
@@ -0,0 +1,53 @@
|
||||
@extends('layouts.admin')
|
||||
|
||||
@section('title', trans('general.title.new', ['type' => trans_choice('general.vendors', 1)]))
|
||||
|
||||
@section('content')
|
||||
<!-- Default box -->
|
||||
<div class="box box-success">
|
||||
{!! Form::open(['url' => 'expenses/vendors', 'role' => 'form']) !!}
|
||||
|
||||
<div class="box-body">
|
||||
{{ Form::textGroup('name', trans('general.name'), 'id-card-o') }}
|
||||
|
||||
{{ Form::textGroup('email', trans('general.email'), 'envelope') }}
|
||||
|
||||
{{ Form::textGroup('tax_number', trans('general.tax_number'), 'percent', []) }}
|
||||
|
||||
{{ Form::selectGroup('currency_code', trans_choice('general.currencies', 1), 'exchange', $currencies, setting('general.default_currency')) }}
|
||||
|
||||
{{ Form::textGroup('phone', trans('general.phone'), 'phone', []) }}
|
||||
|
||||
{{ Form::textGroup('website', trans('general.website'), 'globe',[]) }}
|
||||
|
||||
{{ Form::textareaGroup('address', trans('general.address')) }}
|
||||
|
||||
{{ Form::radioGroup('enabled', trans('general.enabled')) }}
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
|
||||
<div class="box-footer">
|
||||
{{ Form::saveButtons('expenses/vendors') }}
|
||||
</div>
|
||||
<!-- /.box-footer -->
|
||||
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
<script type="text/javascript">
|
||||
var text_yes = '{{ trans('general.yes') }}';
|
||||
var text_no = '{{ trans('general.no') }}';
|
||||
|
||||
$(document).ready(function(){
|
||||
$('#enabled_1').trigger('click');
|
||||
|
||||
$('#name').focus();
|
||||
|
||||
$("#currency_code").select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.currencies', 1)]) }}"
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
54
resources/views/expenses/vendors/edit.blade.php
vendored
Normal file
54
resources/views/expenses/vendors/edit.blade.php
vendored
Normal file
@@ -0,0 +1,54 @@
|
||||
@extends('layouts.admin')
|
||||
|
||||
@section('title', trans('general.title.edit', ['type' => trans_choice('general.vendors', 1)]))
|
||||
|
||||
@section('content')
|
||||
<!-- Default box -->
|
||||
<div class="box box-success">
|
||||
{!! Form::model($vendor, [
|
||||
'method' => 'PATCH',
|
||||
'url' => ['expenses/vendors', $vendor->id],
|
||||
'role' => 'form'
|
||||
]) !!}
|
||||
|
||||
<div class="box-body">
|
||||
{{ Form::textGroup('name', trans('general.name'), 'id-card-o') }}
|
||||
|
||||
{{ Form::textGroup('email', trans('general.email'), 'envelope') }}
|
||||
|
||||
{{ Form::textGroup('tax_number', trans('general.tax_number'), 'percent', []) }}
|
||||
|
||||
{{ Form::selectGroup('currency_code', trans_choice('general.currencies', 1), 'exchange', $currencies) }}
|
||||
|
||||
{{ Form::textGroup('phone', trans('general.phone'), 'phone', []) }}
|
||||
|
||||
{{ Form::textGroup('website', trans('general.website'), 'globe',[]) }}
|
||||
|
||||
{{ Form::textareaGroup('address', trans('general.address')) }}
|
||||
|
||||
{{ Form::radioGroup('enabled', trans('general.enabled')) }}
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
|
||||
@permission('update-expenses-vendors')
|
||||
<div class="box-footer">
|
||||
{{ Form::saveButtons('expenses/vendors') }}
|
||||
</div>
|
||||
<!-- /.box-footer -->
|
||||
@endpermission
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
<script type="text/javascript">
|
||||
var text_yes = '{{ trans('general.yes') }}';
|
||||
var text_no = '{{ trans('general.no') }}';
|
||||
|
||||
$(document).ready(function(){
|
||||
$("#currency_code").select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.currencies', 1)]) }}"
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
73
resources/views/expenses/vendors/index.blade.php
vendored
Normal file
73
resources/views/expenses/vendors/index.blade.php
vendored
Normal file
@@ -0,0 +1,73 @@
|
||||
@extends('layouts.admin')
|
||||
|
||||
@section('title', trans_choice('general.vendors', 2))
|
||||
|
||||
@permission('create-expenses-vendors')
|
||||
@section('new_button')
|
||||
<span class="new-button"><a href="{{ url('expenses/vendors/create') }}" class="btn btn-success btn-sm"><span class="fa fa-plus"></span> {{ trans('general.add_new') }}</a></span>
|
||||
@endsection
|
||||
@endpermission
|
||||
|
||||
@section('content')
|
||||
<!-- Default box -->
|
||||
<div class="box box-success">
|
||||
<div class="box-header">
|
||||
{!! Form::open(['url' => 'expenses/vendors', 'role' => 'form', 'method' => 'GET']) !!}
|
||||
<div class="pull-left">
|
||||
<span class="title-filter">{{ trans('general.search') }}:</span>
|
||||
{!! Form::text('search', request('search'), ['class' => 'form-control input-filter input-sm', 'placeholder' => trans('general.search_placeholder')]) !!}
|
||||
{!! Form::button('<span class="fa fa-filter"></span> ' . trans('general.filter'), ['type' => 'submit', 'class' => 'btn btn-sm btn-default btn-filter']) !!}
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<span class="title-filter">{{ trans('general.show') }}:</span>
|
||||
{!! Form::select('limit', $limits, request('limit', setting('general.list_limit', '25')), ['class' => 'form-control input-filter input-sm', 'onchange' => 'this.form.submit()']) !!}
|
||||
</div>
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
|
||||
<div class="box-body">
|
||||
<div class="table table-responsive">
|
||||
<table class="table table-bordered table-striped table-hover" id="tbl-vendors">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>@sortablelink('name', trans('general.name'))</th>
|
||||
<th>@sortablelink('email', trans('general.email'))</th>
|
||||
<th>@sortablelink('phone', trans('general.phone'))</th>
|
||||
<th>@sortablelink('enabled', trans('general.status'))</th>
|
||||
<th style="width: 15%;">{{ trans('general.actions') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($vendors as $item)
|
||||
<tr>
|
||||
<td><a href="{{ url('expenses/vendors/' . $item->id . '/edit') }}">{{ $item->name }}</a></td>
|
||||
<td>{{ $item->email }}</td>
|
||||
<td>{{ $item->phone }}</td>
|
||||
<td>
|
||||
@if ($item->enabled)
|
||||
<span class="label label-success">{{ trans('general.enabled') }}</span>
|
||||
@else
|
||||
<span class="label label-danger">{{ trans('general.disabled') }}</span>
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
<a href="{{ url('expenses/vendors/' . $item->id . '/edit') }}" class="btn btn-primary btn-xs"><i class="fa fa-pencil-square-o" aria-hidden="true"></i> {{ trans('general.edit') }}</a>
|
||||
@permission('delete-expenses-vendors')
|
||||
{!! Form::deleteButton($item, 'expenses/vendors') !!}
|
||||
@endpermission
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
<div class="box-footer">
|
||||
@include('partials.admin.pagination', ['items' => $vendors, 'type' => 'vendors'])
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box-footer -->
|
||||
@endsection
|
||||
|
||||
88
resources/views/incomes/customers/create.blade.php
Normal file
88
resources/views/incomes/customers/create.blade.php
Normal file
@@ -0,0 +1,88 @@
|
||||
@extends('layouts.admin')
|
||||
|
||||
@section('title', trans('general.title.new', ['type' => trans_choice('general.customers', 1)]))
|
||||
|
||||
@section('content')
|
||||
<!-- Default box -->
|
||||
<div class="box box-success">
|
||||
{!! Form::open(['url' => 'incomes/customers', 'role' => 'form']) !!}
|
||||
|
||||
<div class="box-body">
|
||||
{{ Form::textGroup('name', trans('general.name'), 'id-card-o') }}
|
||||
|
||||
{{ Form::textGroup('email', trans('general.email'), 'envelope') }}
|
||||
|
||||
{{ Form::textGroup('tax_number', trans('general.tax_number'), 'percent', []) }}
|
||||
|
||||
{{ Form::selectGroup('currency_code', trans_choice('general.currencies', 1), 'exchange', $currencies, setting('general.default_currency')) }}
|
||||
|
||||
{{ Form::textGroup('phone', trans('general.phone'), 'phone', []) }}
|
||||
|
||||
{{ Form::textGroup('website', trans('general.website'), 'globe', []) }}
|
||||
|
||||
{{ Form::textareaGroup('address', trans('general.address')) }}
|
||||
|
||||
{{ Form::radioGroup('enabled', trans('general.enabled')) }}
|
||||
|
||||
<div class="form-group col-md-12">
|
||||
{!! Form::label('create_user', trans('general.create_user'), ['class' => 'control-label']) !!}
|
||||
<br/>
|
||||
<div class="col-md-12">
|
||||
{{ Form::checkbox('create_user', '1') }} {{ trans('general.create_user') }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{ Form::passwordGroup('password', trans('auth.password.current'), 'key', [], null, 'col-md-6 password hidden') }}
|
||||
|
||||
{{ Form::passwordGroup('password_confirmation', trans('auth.password.current_confirm'), 'key', [], null, 'col-md-6 password hidden') }}
|
||||
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
|
||||
<div class="box-footer">
|
||||
{{ Form::saveButtons('incomes/customers') }}
|
||||
</div>
|
||||
<!-- /.box-footer -->
|
||||
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('js')
|
||||
<script src="{{ asset('vendor/almasaeed2010/adminlte/plugins/iCheck/icheck.min.js') }}"></script>
|
||||
@endsection
|
||||
|
||||
@section('css')
|
||||
<link rel="stylesheet" href="{{ asset('vendor/almasaeed2010/adminlte/plugins/iCheck/square/green.css') }}">
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
<script type="text/javascript">
|
||||
var text_yes = '{{ trans('general.yes') }}';
|
||||
var text_no = '{{ trans('general.no') }}';
|
||||
|
||||
$(document).ready(function(){
|
||||
$('#enabled_1').trigger('click');
|
||||
|
||||
$('#name').focus();
|
||||
|
||||
$("#currency_code").select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.currencies', 1)]) }}"
|
||||
});
|
||||
|
||||
$('#create_user').iCheck({
|
||||
checkboxClass: 'icheckbox_square-green',
|
||||
radioClass: 'iradio_square-green',
|
||||
increaseArea: '20%' // optional
|
||||
});
|
||||
|
||||
$('#create_user').on('ifClicked', function (event) {
|
||||
if ($(this).prop('checked')) {
|
||||
$('.col-md-6.password').addClass('hidden');
|
||||
} else {
|
||||
$('.col-md-6.password').removeClass('hidden');
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
93
resources/views/incomes/customers/edit.blade.php
Normal file
93
resources/views/incomes/customers/edit.blade.php
Normal file
@@ -0,0 +1,93 @@
|
||||
@extends('layouts.admin')
|
||||
|
||||
@section('title', trans('general.title.edit', ['type' => trans_choice('general.customers', 1)]))
|
||||
|
||||
@section('content')
|
||||
<!-- Default box -->
|
||||
<div class="box box-success">
|
||||
{!! Form::model($customer, [
|
||||
'method' => 'PATCH',
|
||||
'url' => ['incomes/customers', $customer->id],
|
||||
'role' => 'form'
|
||||
]) !!}
|
||||
|
||||
<div class="box-body">
|
||||
{{ Form::textGroup('name', trans('general.name'), 'id-card-o') }}
|
||||
|
||||
{{ Form::textGroup('email', trans('general.email'), 'envelope') }}
|
||||
|
||||
{{ Form::textGroup('tax_number', trans('general.tax_number'), 'percent', []) }}
|
||||
|
||||
{{ Form::selectGroup('currency_code', trans_choice('general.currencies', 1), 'exchange', $currencies) }}
|
||||
|
||||
{{ Form::textGroup('phone', trans('general.phone'), 'phone', []) }}
|
||||
|
||||
{{ Form::textGroup('website', trans('general.website'), 'globe',[]) }}
|
||||
|
||||
{{ Form::textareaGroup('address', trans('general.address')) }}
|
||||
|
||||
{{ Form::radioGroup('enabled', trans('general.enabled')) }}
|
||||
|
||||
<div class="form-group col-md-12">
|
||||
{!! Form::label('create_user', trans('general.create_user'), ['class' => 'control-label']) !!}
|
||||
<br/>
|
||||
<div class="col-md-12">
|
||||
@if ($customer->user_id)
|
||||
{{ Form::checkbox('create_user', '1', 1, array('disabled')) }} {{ trans('general.created_user') }}
|
||||
@else
|
||||
{{ Form::checkbox('create_user', '1') }} {{ trans('general.create_user') }}
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{ Form::textGroup('password', trans('auth.password.current'), 'key', [], null, 'col-md-6 password hidden') }}
|
||||
|
||||
{{ Form::textGroup('password_confirmation', trans('auth.password.current_confirm'), 'key', [], null, 'col-md-6 password hidden') }}
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
|
||||
@permission('update-incomes-customers')
|
||||
<div class="box-footer">
|
||||
{{ Form::saveButtons('incomes/customers') }}
|
||||
</div>
|
||||
<!-- /.box-footer -->
|
||||
@endpermission
|
||||
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('js')
|
||||
<script src="{{ asset('vendor/almasaeed2010/adminlte/plugins/iCheck/icheck.min.js') }}"></script>
|
||||
@endsection
|
||||
|
||||
@section('css')
|
||||
<link rel="stylesheet" href="{{ asset('vendor/almasaeed2010/adminlte/plugins/iCheck/square/green.css') }}">
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
<script type="text/javascript">
|
||||
var text_yes = '{{ trans('general.yes') }}';
|
||||
var text_no = '{{ trans('general.no') }}';
|
||||
|
||||
$(document).ready(function(){
|
||||
$("#currency_code").select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.currencies', 1)]) }}"
|
||||
});
|
||||
|
||||
$('#create_user').iCheck({
|
||||
checkboxClass: 'icheckbox_square-green',
|
||||
radioClass: 'iradio_square-green',
|
||||
increaseArea: '20%' // optional
|
||||
});
|
||||
|
||||
$('#create_user').on('ifClicked', function (event) {
|
||||
if ($(this).prop('checked')) {
|
||||
$('.col-md-6.password').addClass('hidden');
|
||||
} else {
|
||||
$('.col-md-6.password').removeClass('hidden');
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
75
resources/views/incomes/customers/index.blade.php
Normal file
75
resources/views/incomes/customers/index.blade.php
Normal file
@@ -0,0 +1,75 @@
|
||||
@extends('layouts.admin')
|
||||
|
||||
@section('title', trans_choice('general.customers', 2))
|
||||
|
||||
@permission('create-incomes-customers')
|
||||
@section('new_button')
|
||||
<span class="new-button"><a href="{{ url('incomes/customers/create') }}" class="btn btn-success btn-sm"><span class="fa fa-plus"></span> {{ trans('general.add_new') }}</a></span>
|
||||
@endsection
|
||||
@endpermission
|
||||
|
||||
@section('content')
|
||||
<!-- Default box -->
|
||||
<div class="box box-success">
|
||||
<div class="box-header">
|
||||
{!! Form::open(['url' => 'incomes/customers', 'role' => 'form', 'method' => 'GET']) !!}
|
||||
<div class="pull-left">
|
||||
<span class="title-filter">{{ trans('general.search') }}:</span>
|
||||
{!! Form::text('search', request('search'), ['class' => 'form-control input-filter input-sm', 'placeholder' => trans('general.search_placeholder')]) !!}
|
||||
{!! Form::button('<span class="fa fa-filter"></span> ' . trans('general.filter'), ['type' => 'submit', 'class' => 'btn btn-sm btn-default btn-filter']) !!}
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<span class="title-filter">{{ trans('general.show') }}:</span>
|
||||
{!! Form::select('limit', $limits, request('limit', setting('general.list_limit', '25')), ['class' => 'form-control input-filter input-sm', 'onchange' => 'this.form.submit()']) !!}
|
||||
</div>
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
|
||||
<div class="box-body">
|
||||
<div class="table table-responsive">
|
||||
<table class="table table-bordered table-striped table-hover" id="tbl-customers">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>@sortablelink('name', trans('general.name'))</th>
|
||||
<th>@sortablelink('email', trans('general.email'))</th>
|
||||
<th>@sortablelink('phone', trans('general.phone'))</th>
|
||||
<th>@sortablelink('enabled', trans('general.status'))</th>
|
||||
<th style="width: 15%;">{{ trans('general.actions') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($customers as $item)
|
||||
<tr>
|
||||
<td><a href="{{ url('incomes/customers/' . $item->id . '/edit') }}">{{ $item->name }}</a></td>
|
||||
<td>{{ $item->email }}</td>
|
||||
<td>{{ $item->phone }}</td>
|
||||
<td>
|
||||
@if ($item->enabled)
|
||||
<span class="label label-success">{{ trans('general.enabled') }}</span>
|
||||
@else
|
||||
<span class="label label-danger">{{ trans('general.disabled') }}</span>
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
<a href="{{ url('incomes/customers/' . $item->id . '/edit') }}" class="btn btn-primary btn-xs"><i class="fa fa-pencil-square-o" aria-hidden="true"></i> {{ trans('general.edit') }}</a>
|
||||
|
||||
@permission('delete-incomes-customers')
|
||||
{!! Form::deleteButton($item, 'incomes/customers') !!}
|
||||
@endpermission
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
<div class="box-footer">
|
||||
@include('partials.admin.pagination', ['items' => $customers, 'type' => 'customers'])
|
||||
</div>
|
||||
<!-- /.box-footer -->
|
||||
</div>
|
||||
<!-- /.box -->
|
||||
@endsection
|
||||
|
||||
265
resources/views/incomes/invoices/create.blade.php
Normal file
265
resources/views/incomes/invoices/create.blade.php
Normal file
@@ -0,0 +1,265 @@
|
||||
@extends('layouts.admin')
|
||||
|
||||
@section('title', trans('general.title.new', ['type' => trans_choice('general.invoices', 1)]))
|
||||
|
||||
@section('content')
|
||||
<!-- Default box -->
|
||||
<div class="box box-success">
|
||||
{!! Form::open(['url' => 'incomes/invoices', 'files' => true, 'role' => 'form']) !!}
|
||||
|
||||
<div class="box-body">
|
||||
{{ Form::selectGroup('customer_id', trans_choice('general.customers', 1), 'user', $customers) }}
|
||||
|
||||
{{ Form::selectGroup('currency_code', trans_choice('general.currencies', 1), 'exchange', $currencies, setting('general.default_currency')) }}
|
||||
|
||||
{{ Form::textGroup('invoiced_at', trans('invoices.invoice_date'), 'calendar',['id' => 'invoiced_at', 'class' => 'form-control', 'required' => 'required', 'data-inputmask' => '\'alias\': \'yyyy/mm/dd\'', 'data-mask' => ''], Date::now()->toDateString()) }}
|
||||
|
||||
{{ Form::textGroup('due_at', trans('invoices.due_date'), 'calendar',['id' => 'due_at', 'class' => 'form-control', 'required' => 'required', 'data-inputmask' => '\'alias\': \'yyyy/mm/dd\'', 'data-mask' => '']) }}
|
||||
|
||||
{{ Form::textGroup('invoice_number', trans('invoices.invoice_number'), 'file-text-o') }}
|
||||
|
||||
{{ Form::textGroup('order_number', trans('invoices.order_number'), 'shopping-cart',[]) }}
|
||||
|
||||
<div class="form-group col-md-12">
|
||||
{!! Form::label('items', 'Items', ['class' => 'control-label']) !!}
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered" id="items">
|
||||
<thead>
|
||||
<tr style="background-color: #f9f9f9;">
|
||||
<th width="5%" class="text-center">{{ trans('general.actions') }}</th>
|
||||
<th width="40%" class="text-left">{{ trans('general.name') }}</th>
|
||||
<th width="5%" class="text-center">{{ trans('invoices.quantity') }}</th>
|
||||
<th width="10%" class="text-right">{{ trans('invoices.price') }}</th>
|
||||
<th width="15%" class="text-right">{{ trans_choice('general.taxes', 1) }}</th>
|
||||
<th width="10%" class="text-right">{{ trans('invoices.total') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php $item_row = 0; ?>
|
||||
<tr id="item-row-{{ $item_row }}">
|
||||
<td class="text-center" style="vertical-align: middle;">
|
||||
<button type="button" onclick="$(this).tooltip('destroy'); $('#item-row-{{ $item_row }}').remove(); totalItem();" data-toggle="tooltip" title="{{ trans('general.delete') }}" class="btn btn-xs btn-danger"><i class="fa fa-trash"></i></button>
|
||||
</td>
|
||||
<td>
|
||||
<input class="form-control typeahead" required="required" placeholder="{{ trans('general.form.enter', ['field' => trans_choice('invoices.item_name', 1)]) }}" name="item[{{ $item_row }}][name]" type="text" id="item-name-{{ $item_row }}">
|
||||
<input name="item[{{ $item_row }}][item_id]" type="hidden" id="item-id-{{ $item_row }}">
|
||||
</td>
|
||||
<td>
|
||||
<input class="form-control text-center" required="required" name="item[{{ $item_row }}][quantity]" type="text" id="item-quantity-{{ $item_row }}">
|
||||
</td>
|
||||
<td>
|
||||
<input class="form-control text-right" required="required" name="item[{{ $item_row }}][price]" type="text" id="item-price-{{ $item_row }}">
|
||||
</td>
|
||||
<td>
|
||||
{!! Form::select('item[' . $item_row . '][tax]', $taxes, setting('general.default_tax'), ['id'=> 'item-tax-'. $item_row, 'class' => 'form-control select2', 'placeholder' => trans('general.form.select.field', ['field' => trans_choice('general.taxes', 1)])]) !!}
|
||||
</td>
|
||||
<td class="text-right" style="vertical-align: middle;">
|
||||
<span id="item-total-{{ $item_row }}">0</span>
|
||||
</td>
|
||||
</tr>
|
||||
<?php $item_row++; ?>
|
||||
<tr id="addItem">
|
||||
<td class="text-center"><button type="button" onclick="addItem();" data-toggle="tooltip" title="{{ trans('general.add') }}" class="btn btn-xs btn-primary" data-original-title="{{ trans('general.add') }}"><i class="fa fa-plus"></i></button></td>
|
||||
<td class="text-right" colspan="5"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-right" colspan="5"><strong>{{ trans('invoices.sub_total') }}</strong></td>
|
||||
<td class="text-right"><span id="sub-total">0</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-right" colspan="5"><strong>{{ trans_choice('general.taxes', 1) }}</strong></td>
|
||||
<td class="text-right"><span id="tax-total">0</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-right" colspan="5"><strong>{{ trans('invoices.total') }}</strong></td>
|
||||
<td class="text-right"><span id="grand-total">0</span></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
{{ Form::textareaGroup('label',trans_choice('general.notes', 2)) }}
|
||||
|
||||
{{ Form::fileGroup('attachment', trans('general.attachment')) }}
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
|
||||
<div class="box-footer">
|
||||
{{ Form::saveButtons('incomes/invoices') }}
|
||||
</div>
|
||||
<!-- /.box-footer -->
|
||||
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('js')
|
||||
<script src="{{ asset('vendor/almasaeed2010/adminlte/plugins/datepicker/bootstrap-datepicker.js') }}"></script>
|
||||
<script src="{{ asset('public/js/bootstrap-fancyfile.js') }}"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-3-typeahead/4.0.1/bootstrap3-typeahead.min.js"></script>
|
||||
@endsection
|
||||
|
||||
@section('css')
|
||||
<link rel="stylesheet" href="{{ asset('vendor/almasaeed2010/adminlte/plugins/datepicker/datepicker3.css') }}">
|
||||
<link rel="stylesheet" href="{{ asset('public/css/bootstrap-fancyfile.css') }}">
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
<script type="text/javascript">
|
||||
var item_row = '{{ $item_row }}';
|
||||
|
||||
function addItem() {
|
||||
html = '<tr id="item-row-' + item_row + '">';
|
||||
html += ' <td class="text-center" style="vertical-align: middle;">';
|
||||
html += ' <button type="button" onclick="$(this).tooltip(\'destroy\'); $(\'#item-row-' + item_row + '\').remove(); totalItem();" data-toggle="tooltip" title="{{ trans('general.delete') }}" class="btn btn-xs btn-danger"><i class="fa fa-trash"></i></button>';
|
||||
html += ' </td>';
|
||||
html += ' <td>';
|
||||
html += ' <input class="form-control typeahead" required="required" placeholder="{{ trans('general.form.enter', ['field' => trans_choice('invoices.item_name', 1)]) }}" name="item[' + item_row + '][name]" type="text" id="item-name-' + item_row + '">';
|
||||
html += ' <input name="item[' + item_row + '][item_id]" type="hidden" id="item-id-' + item_row + '">';
|
||||
html += ' </td>';
|
||||
html += ' <td>';
|
||||
html += ' <input class="form-control text-center" required="required" name="item[' + item_row + '][quantity]" type="text" id="item-quantity-' + item_row + '">';
|
||||
html += ' </td>';
|
||||
html += ' <td>';
|
||||
html += ' <input class="form-control text-right" required="required" name="item[' + item_row + '][price]" type="text" id="item-price-' + item_row + '">';
|
||||
html += ' </td>';
|
||||
html += ' <td>';
|
||||
html += ' <select class="form-control select2" name="item[' + item_row + '][tax]" id="item-tax-' + item_row + '">';
|
||||
html += ' <option selected="selected" value="">{{ trans('general.form.select.field', ['field' => trans_choice('general.taxes', 1)]) }}</option>';
|
||||
@foreach($taxes as $tax_key => $tax_value)
|
||||
html += ' <option value="{{ $tax_key }}">{{ $tax_value }}</option>';
|
||||
@endforeach
|
||||
html += ' </select>';
|
||||
html += ' </td>';
|
||||
html += ' <td class="text-right" style="vertical-align: middle;">';
|
||||
html += ' <span id="item-total-' + item_row + '">0</span>';
|
||||
html += ' </td>';
|
||||
|
||||
$('#items tbody #addItem').before(html);
|
||||
//$('[rel=tooltip]').tooltip();
|
||||
|
||||
$('[data-toggle="tooltip"]').tooltip('hide');
|
||||
|
||||
$('#item-row-' + item_row + ' .select2').select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.taxes', 1)]) }}"
|
||||
});
|
||||
|
||||
item_row++;
|
||||
}
|
||||
|
||||
$(document).ready(function(){
|
||||
//Date picker
|
||||
$('#invoiced_at').datepicker({
|
||||
format: 'yyyy-mm-dd',
|
||||
autoclose: true
|
||||
});
|
||||
|
||||
//Date picker
|
||||
$('#due_at').datepicker({
|
||||
format: 'yyyy-mm-dd',
|
||||
autoclose: true
|
||||
});
|
||||
|
||||
$(".select2").select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.taxes', 1)]) }}"
|
||||
});
|
||||
|
||||
$("#customer_id").select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.customers', 1)]) }}"
|
||||
});
|
||||
|
||||
$("#currency_code").select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.currencies', 1)]) }}"
|
||||
});
|
||||
|
||||
$('#attachment').fancyfile({
|
||||
text : '{{ trans('general.form.select.file') }}',
|
||||
style : 'btn-default',
|
||||
placeholder : '{{ trans('general.form.no_file_selected') }}'
|
||||
});
|
||||
|
||||
var autocomplete_path = "{{ url('items/items/autocomplete') }}";
|
||||
|
||||
$(document).on('click', '.form-control.typeahead', function() {
|
||||
input_id = $(this).attr('id').split('-');
|
||||
|
||||
item_id = parseInt(input_id[input_id.length-1]);
|
||||
|
||||
$(this).typeahead({
|
||||
minLength: 3,
|
||||
displayText:function (data) {
|
||||
return data.name;
|
||||
},
|
||||
source: function (query, process) {
|
||||
$.ajax({
|
||||
url: autocomplete_path,
|
||||
type: 'GET',
|
||||
dataType: 'JSON',
|
||||
data: 'query=' + query + '&type=invoice¤cy_code=' + $('#currency_code').val(),
|
||||
success: function(data) {
|
||||
return process(data);
|
||||
}
|
||||
});
|
||||
},
|
||||
afterSelect: function (data) {
|
||||
$('#item-id-' + item_id).val(data.item_id);
|
||||
$('#item-quantity-' + item_id).val('1');
|
||||
$('#item-price-' + item_id).val(data.sale_price);
|
||||
$('#item-tax-' + item_id).val(data.tax_id);
|
||||
|
||||
// This event Select2 Stylesheet
|
||||
$('#item-tax-' + item_id).trigger('change');
|
||||
|
||||
$('#item-total-' + item_id).html(data.total);
|
||||
|
||||
totalItem();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$(document).on('change', '#currency_code, #items tbody select', function(){
|
||||
totalItem();
|
||||
});
|
||||
|
||||
$(document).on('keyup', '#items tbody .form-control', function(){
|
||||
totalItem();
|
||||
});
|
||||
|
||||
$(document).on('change', '#customer_id', function (e) {
|
||||
$.ajax({
|
||||
url: '{{ url("incomes/customers/currency") }}',
|
||||
type: 'GET',
|
||||
dataType: 'JSON',
|
||||
data: 'customer_id=' + $(this).val(),
|
||||
success: function(data) {
|
||||
$('#currency_code').val(data.currency_code);
|
||||
|
||||
// This event Select2 Stylesheet
|
||||
$('#currency_code').trigger('change');
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
function totalItem() {
|
||||
$.ajax({
|
||||
url: '{{ url("items/items/totalItem") }}',
|
||||
type: 'POST',
|
||||
dataType: 'JSON',
|
||||
data: $('#currency_code, #items input[type=\'text\'],#items input[type=\'hidden\'], #items textarea, #items select'),
|
||||
headers: { 'X-CSRF-TOKEN': '{{ csrf_token() }}' },
|
||||
success: function(data) {
|
||||
if (data) {
|
||||
$.each( data.items, function( key, value ) {
|
||||
$('#item-total-' + key).html(value);
|
||||
});
|
||||
|
||||
$('#sub-total').html(data.sub_total);
|
||||
$('#tax-total').html(data.tax_total);
|
||||
$('#grand-total').html(data.grand_total);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
@endsection
|
||||
293
resources/views/incomes/invoices/edit.blade.php
Normal file
293
resources/views/incomes/invoices/edit.blade.php
Normal file
@@ -0,0 +1,293 @@
|
||||
@extends('layouts.admin')
|
||||
|
||||
@section('title', trans('general.title.edit', ['type' => trans_choice('general.invoices', 1)]))
|
||||
|
||||
@section('content')
|
||||
<!-- Default box -->
|
||||
<div class="box box-success">
|
||||
{!! Form::model($invoice, ['method' => 'PATCH', 'files' => true, 'url' => ['incomes/invoices', $invoice->id], 'role' => 'form']) !!}
|
||||
|
||||
<div class="box-body">
|
||||
{{ Form::selectGroup('customer_id', trans_choice('general.customers', 1), 'user', $customers, config('general.customers')) }}
|
||||
|
||||
{{ Form::selectGroup('currency_code', trans_choice('general.currencies', 1), 'exchange', $currencies) }}
|
||||
|
||||
{{ Form::textGroup('invoiced_at', trans('invoices.invoice_date'), 'calendar',['id' => 'invoiced_at', 'class' => 'form-control', 'required' => 'required', 'data-inputmask' => '\'alias\': \'yyyy/mm/dd\'', 'data-mask' => ''], Date::now()->toDateString()) }}
|
||||
|
||||
{{ Form::textGroup('due_at', trans('invoices.due_date'), 'calendar',['id' => 'due_at', 'class' => 'form-control', 'required' => 'required', 'data-inputmask' => '\'alias\': \'yyyy/mm/dd\'', 'data-mask' => '']) }}
|
||||
|
||||
{{ Form::textGroup('invoice_number', trans('invoices.invoice_number'), 'file-text-o') }}
|
||||
|
||||
{{ Form::textGroup('order_number', trans('invoices.order_number'), 'shopping-cart',[]) }}
|
||||
<div class="form-group col-md-12">
|
||||
{!! Form::label('items', 'Items', ['class' => 'control-label']) !!}
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered" id="items">
|
||||
<thead>
|
||||
<tr style="background-color: #f9f9f9;">
|
||||
<th width="5%" class="text-center">{{ trans('general.actions') }}</th>
|
||||
<th width="40%" class="text-left">{{ trans('general.name') }}</th>
|
||||
<th width="5%" class="text-center">{{ trans('invoices.quantity') }}</th>
|
||||
<th width="10%" class="text-right">{{ trans('invoices.price') }}</th>
|
||||
<th width="15%" class="text-right">{{ trans_choice('general.taxes', 1) }}</th>
|
||||
<th width="10%" class="text-right">{{ trans('invoices.total') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php $item_row = 0; ?>
|
||||
@foreach($invoice->items as $item)
|
||||
<tr id="item-row-{{ $item_row }}">
|
||||
<td class="text-center" style="vertical-align: middle;">
|
||||
<button type="button" onclick="$(this).tooltip('destroy'); $('#item-row-{{ $item_row }}').remove(); totalItem();" data-toggle="tooltip" title="{{ trans('general.delete') }}" class="btn btn-xs btn-danger"><i class="fa fa-trash"></i></button>
|
||||
</td>
|
||||
<td>
|
||||
<input value="{{ $item->name }}" class="form-control typeahead" required="required" placeholder="{{ trans('general.form.enter', ['field' => trans_choice('invoices.item_name', 1)]) }}" name="item[{{ $item_row }}][name]" type="text" id="item-name-{{ $item_row }}">
|
||||
<input value="{{ $item->item_id }}" name="item[{{ $item_row }}][item_id]" type="hidden" id="item-id-{{ $item_row }}">
|
||||
</td>
|
||||
<td>
|
||||
<input value="{{ $item->quantity }}" class="form-control text-center" required="required" name="item[{{ $item_row }}][quantity]" type="text" id="item-quantity-{{ $item_row }}">
|
||||
</td>
|
||||
<td>
|
||||
<input value="{{ $item->price }}" class="form-control text-right" required="required" name="item[{{ $item_row }}][price]" type="text" id="item-price-{{ $item_row }}">
|
||||
</td>
|
||||
<td>
|
||||
{!! Form::select('item[' . $item_row . '][tax]', $taxes, $item->tax_id, ['id'=> 'item-tax-'. $item_row, 'class' => 'form-control select2', 'placeholder' => trans('general.form.enter', ['field' => trans_choice('general.taxes', 1)])]) !!}
|
||||
</td>
|
||||
<td class="text-right" style="vertical-align: middle;">
|
||||
<span id="item-total-{{ $item_row }}">@money($item->total, $invoice->currency_code, true)</span>
|
||||
</td>
|
||||
</tr>
|
||||
<?php $item_row++; ?>
|
||||
@endforeach
|
||||
@if (empty($invoice->items))
|
||||
<tr id="item-row-{{ $item_row }}">
|
||||
<td class="text-center" style="vertical-align: middle;">
|
||||
<button type="button" onclick="$(this).tooltip('destroy'); $('#item-row-{{ $item_row }}').remove(); totalItem();" data-toggle="tooltip" title="{{ trans('general.delete') }}" class="btn btn-xs btn-danger"><i class="fa fa-trash"></i></button>
|
||||
</td>
|
||||
<td>
|
||||
<input class="form-control typeahead" required="required" placeholder="{{ trans('general.form.enter', ['field' => trans_choice('invoices.item_name', 1)]) }}" name="item[{{ $item_row }}][name]" type="text" id="item-name-{{ $item_row }}">
|
||||
<input name="item[{{ $item_row }}][item_id]" type="hidden" id="item-id-{{ $item_row }}">
|
||||
</td>
|
||||
<td>
|
||||
<input class="form-control text-center" required="required" name="item[{{ $item_row }}][quantity]" type="text" id="item-quantity-{{ $item_row }}">
|
||||
</td>
|
||||
<td>
|
||||
<input class="form-control text-right" required="required" name="item[{{ $item_row }}][price]" type="text" id="item-price-{{ $item_row }}">
|
||||
</td>
|
||||
<td>
|
||||
{!! Form::select('item[' . $item_row . '][tax]', $taxes, null, ['id'=> 'item-tax-'. $item_row, 'class' => 'form-control select2', 'placeholder' => trans('general.form.select.field', ['field' => trans_choice('general.taxes', 1)])]) !!}
|
||||
</td>
|
||||
<td class="text-right" style="vertical-align: middle;">
|
||||
<span id="item-total-{{ $item_row }}">0</span>
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
<?php $item_row++; ?>
|
||||
<tr id="addItem">
|
||||
<td class="text-center"><button type="button" onclick="addItem();" data-toggle="tooltip" title="{{ trans('general.add') }}" class="btn btn-xs btn-primary" data-original-title="{{ trans('general.add') }}"><i class="fa fa-plus"></i></button></td>
|
||||
<td class="text-right" colspan="5"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-right" colspan="5"><strong>{{ trans('invoices.sub_total') }}</strong></td>
|
||||
<td class="text-right"><span id="sub-total">0</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-right" colspan="5"><strong>{{ trans_choice('general.taxes', 1) }}</strong></td>
|
||||
<td class="text-right"><span id="tax-total">0</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-right" colspan="5"><strong>{{ trans('invoices.total') }}</strong></td>
|
||||
<td class="text-right"><span id="grand-total">0</span></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
{{ Form::textareaGroup('label',trans_choice('general.notes', 2)) }}
|
||||
|
||||
{{ Form::fileGroup('attachment', trans('general.attachment')) }}
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
|
||||
@permission('update-incomes-invoices')
|
||||
<div class="box-footer">
|
||||
{{ Form::saveButtons('incomes/invoices') }}
|
||||
</div>
|
||||
<!-- /.box-footer -->
|
||||
@endpermission
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('js')
|
||||
<script src="{{ asset('vendor/almasaeed2010/adminlte/plugins/datepicker/bootstrap-datepicker.js') }}"></script>
|
||||
<script src="{{ asset('public/js/bootstrap-fancyfile.js') }}"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-3-typeahead/4.0.1/bootstrap3-typeahead.min.js"></script>
|
||||
@endsection
|
||||
|
||||
@section('css')
|
||||
<link rel="stylesheet" href="{{ asset('vendor/almasaeed2010/adminlte/plugins/datepicker/datepicker3.css') }}">
|
||||
<link rel="stylesheet" href="{{ asset('public/css/bootstrap-fancyfile.css') }}">
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
<script type="text/javascript">
|
||||
var item_row = '{{ $item_row }}';
|
||||
|
||||
function addItem() {
|
||||
html = '<tr id="item-row-' + item_row + '">';
|
||||
html += ' <td class="text-center" style="vertical-align: middle;">';
|
||||
html += ' <button type="button" onclick="$(this).tooltip(\'destroy\'); $(\'#item-row-' + item_row + '\').remove(); totalItem();" data-toggle="tooltip" title="{{ trans('general.delete') }}" class="btn btn-xs btn-danger"><i class="fa fa-trash"></i></button>';
|
||||
html += ' </td>';
|
||||
html += ' <td>';
|
||||
html += ' <input class="form-control typeahead" required="required" placeholder="{{ trans('general.form.enter', ['field' => trans_choice('invoices.item_name', 1)]) }}" name="item[' + item_row + '][name]" type="text" id="item-name-' + item_row + '">';
|
||||
html += ' <input name="item[' + item_row + '][item_id]" type="hidden" id="item-id-' + item_row + '">';
|
||||
html += ' </td>';
|
||||
html += ' <td>';
|
||||
html += ' <input class="form-control text-center" required="required" name="item[' + item_row + '][quantity]" type="text" id="item-quantity-' + item_row + '">';
|
||||
html += ' </td>';
|
||||
html += ' <td>';
|
||||
html += ' <input class="form-control text-right" required="required" name="item[' + item_row + '][price]" type="text" id="item-price-' + item_row + '">';
|
||||
html += ' </td>';
|
||||
html += ' <td>';
|
||||
html += ' <select class="form-control select2" name="item[' + item_row + '][tax]" id="item-tax-' + item_row + '">';
|
||||
html += ' <option selected="selected" value="">{{ trans('general.form.select.field', ['field' => trans_choice('general.taxes', 1)]) }}</option>';
|
||||
@foreach($taxes as $tax_key => $tax_value)
|
||||
html += ' <option value="{{ $tax_key }}">{{ $tax_value }}</option>';
|
||||
@endforeach
|
||||
html += ' </select>';
|
||||
html += ' </td>';
|
||||
html += ' <td class="text-right" style="vertical-align: middle;">';
|
||||
html += ' <span id="item-total-' + item_row + '">0</span>';
|
||||
html += ' </td>';
|
||||
|
||||
$('#items tbody #addItem').before(html);
|
||||
//$('[rel=tooltip]').tooltip();
|
||||
|
||||
$('[data-toggle="tooltip"]').tooltip('hide');
|
||||
|
||||
$('#item-row-' + item_row + ' .select2').select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.taxes', 1)]) }}"
|
||||
});
|
||||
|
||||
item_row++;
|
||||
}
|
||||
|
||||
$(document).ready(function(){
|
||||
totalItem();
|
||||
|
||||
//Date picker
|
||||
$('#invoiced_at').datepicker({
|
||||
format: 'yyyy-mm-dd',
|
||||
autoclose: true
|
||||
});
|
||||
|
||||
//Date picker
|
||||
$('#due_at').datepicker({
|
||||
format: 'yyyy-mm-dd',
|
||||
autoclose: true
|
||||
});
|
||||
|
||||
$(".select2").select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.taxes', 1)]) }}"
|
||||
});
|
||||
|
||||
$("#customer_id").select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.customers', 1)]) }}"
|
||||
});
|
||||
|
||||
$("#currency_code").select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.currencies', 1)]) }}"
|
||||
});
|
||||
|
||||
$('#attachment').fancyfile({
|
||||
text : '{{ trans('general.form.select.file') }}',
|
||||
style : 'btn-default',
|
||||
placeholder : '<?php echo $invoice->attachment; ?>'
|
||||
});
|
||||
|
||||
var autocomplete_path = "{{ url('items/items/autocomplete') }}";
|
||||
|
||||
$(document).on('click', '.form-control.typeahead', function() {
|
||||
input_id = $(this).attr('id').split('-');
|
||||
|
||||
item_id = parseInt(input_id[input_id.length-1]);
|
||||
|
||||
$(this).typeahead({
|
||||
minLength: 3,
|
||||
displayText:function (data) {
|
||||
return data.name;
|
||||
},
|
||||
source: function (query, process) {
|
||||
$.ajax({
|
||||
url: autocomplete_path,
|
||||
type: 'GET',
|
||||
dataType: 'JSON',
|
||||
data: 'query=' + query + '&type=invoice¤cy_code=' + $('#currency_code').val(),
|
||||
success: function(data) {
|
||||
return process(data);
|
||||
}
|
||||
});
|
||||
},
|
||||
afterSelect: function (data) {
|
||||
$('#item-id-' + item_id).val(data.item_id);
|
||||
$('#item-quantity-' + item_id).val('1');
|
||||
$('#item-price-' + item_id).val(data.sale_price);
|
||||
$('#item-tax-' + item_id).val(data.tax_id);
|
||||
|
||||
// This event Select2 Stylesheet
|
||||
$('#item-tax-' + item_id).trigger('change');
|
||||
|
||||
$('#item-total-' + item_id).html(data.total);
|
||||
|
||||
totalItem();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$(document).on('change', '#currency_code, #items tbody select', function(){
|
||||
totalItem();
|
||||
});
|
||||
|
||||
$(document).on('keyup', '#items tbody .form-control', function(){
|
||||
totalItem();
|
||||
});
|
||||
|
||||
$(document).on('change', '#customer_id', function (e) {
|
||||
$.ajax({
|
||||
url: '{{ url("incomes/customers/currency") }}',
|
||||
type: 'GET',
|
||||
dataType: 'JSON',
|
||||
data: 'customer_id=' + $(this).val(),
|
||||
success: function(data) {
|
||||
$('#currency_code').val(data.currency_code);
|
||||
|
||||
// This event Select2 Stylesheet
|
||||
$('#currency_code').trigger('change');
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
function totalItem() {
|
||||
$.ajax({
|
||||
url: '{{ url("items/items/totalItem") }}',
|
||||
type: 'POST',
|
||||
dataType: 'JSON',
|
||||
data: $('#currency_code, #items input[type=\'text\'],#items input[type=\'hidden\'], #items textarea, #items select'),
|
||||
headers: { 'X-CSRF-TOKEN': '{{ csrf_token() }}' },
|
||||
success: function(data) {
|
||||
if (data) {
|
||||
$.each( data.items, function( key, value ) {
|
||||
$('#item-total-' + key).html(value);
|
||||
});
|
||||
|
||||
$('#sub-total').html(data.sub_total);
|
||||
$('#tax-total').html(data.tax_total);
|
||||
$('#grand-total').html(data.grand_total);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
@endsection
|
||||
74
resources/views/incomes/invoices/index.blade.php
Normal file
74
resources/views/incomes/invoices/index.blade.php
Normal file
@@ -0,0 +1,74 @@
|
||||
@extends('layouts.admin')
|
||||
|
||||
@section('title', trans_choice('general.invoices', 2))
|
||||
|
||||
@permission('create-incomes-invoices')
|
||||
@section('new_button')
|
||||
<span class="new-button"><a href="{{ url('incomes/invoices/create') }}" class="btn btn-success btn-sm"><span class="fa fa-plus"></span> {{ trans('general.add_new') }}</a></span>
|
||||
@endsection
|
||||
@endpermission
|
||||
|
||||
@section('content')
|
||||
<!-- Default box -->
|
||||
<div class="box box-success">
|
||||
<div class="box-header">
|
||||
{!! Form::open(['url' => 'incomes/invoices', 'role' => 'form', 'method' => 'GET']) !!}
|
||||
<div class="pull-left">
|
||||
<span class="title-filter">{{ trans('general.search') }}:</span>
|
||||
{!! Form::text('search', request('search'), ['class' => 'form-control input-filter input-sm', 'placeholder' => trans('general.search_placeholder')]) !!}
|
||||
{!! Form::select('status', $status, request('status'), ['class' => 'form-control input-filter input-sm', 'placeholder' => trans('status.all')]) !!}
|
||||
{!! Form::button('<span class="fa fa-filter"></span> ' . trans('general.filter'), ['type' => 'submit', 'class' => 'btn btn-sm btn-default btn-filter']) !!}
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<span class="title-filter">{{ trans('general.show') }}:</span>
|
||||
{!! Form::select('limit', $limits, request('limit', setting('general.list_limit', '25')), ['class' => 'form-control input-filter input-sm', 'onchange' => 'this.form.submit()']) !!}
|
||||
</div>
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
<div class="box-body">
|
||||
<div class="table table-responsive">
|
||||
<table class="table table-bordered table-striped table-hover" id="tbl-invoices">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-md-1">@sortablelink('invoice_number', trans_choice('general.numbers', 1))</th>
|
||||
<th class="col-md-3">@sortablelink('customer_name', trans_choice('general.customers', 1))</th>
|
||||
<th class="col-md-1">@sortablelink('amount', trans('general.amount'))</th>
|
||||
<th class="col-md-1">@sortablelink('status.name', trans('general.status'))</th>
|
||||
<th>@sortablelink('invoiced_at', trans('invoices.invoice_date'))</th>
|
||||
<th>@sortablelink('due_at', trans('invoices.due_date'))</th>
|
||||
<th class="col-md-3">{{ trans('general.actions') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($invoices as $item)
|
||||
<tr>
|
||||
<td><a href="{{ url('incomes/invoices/' . $item->id . ' ') }}">{{ $item->invoice_number }}</a></td>
|
||||
<td>{{ $item->customer_name }}</td>
|
||||
<td>@money($item->amount, $item->currency_code, true)</td>
|
||||
<td>{{ $item->status->name }}</td>
|
||||
<td>{{ Date::parse($item->invoiced_at)->format($date_format) }}</td>
|
||||
<td>{{ Date::parse($item->due_at)->format($date_format) }}</td>
|
||||
<td>
|
||||
<a href="{{ url('incomes/invoices/' . $item->id) }}" class="btn btn-info btn-xs"><i class="fa fa-eye" aria-hidden="true"></i> {{ trans('general.show') }}</a>
|
||||
<a href="{{ url('incomes/invoices/' . $item->id . '/edit') }}" class="btn btn-primary btn-xs"><i class="fa fa-pencil-square-o" aria-hidden="true"></i> {{ trans('general.edit') }}</a>
|
||||
@permission('delete-incomes-invoices')
|
||||
{!! Form::deleteButton($item, 'incomes/invoices') !!}
|
||||
@endpermission
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
|
||||
<div class="box-footer">
|
||||
@include('partials.admin.pagination', ['items' => $invoices, 'type' => 'invoices'])
|
||||
</div>
|
||||
<!-- /.box-footer -->
|
||||
</div>
|
||||
<!-- /.box -->
|
||||
@endsection
|
||||
|
||||
141
resources/views/incomes/invoices/invoice.blade.php
Normal file
141
resources/views/incomes/invoices/invoice.blade.php
Normal file
@@ -0,0 +1,141 @@
|
||||
@extends('layouts.invoice')
|
||||
|
||||
@section('title', trans_choice('general.invoices', 1) . ': ' . $invoice->invoice_number)
|
||||
|
||||
@section('content')
|
||||
<section class="invoice">
|
||||
<div class="row invoice-header">
|
||||
<div class="col-xs-7">
|
||||
@if (setting('general.invoice_logo'))
|
||||
<img src="{{ asset(setting('general.invoice_logo')) }}" class="invoice-logo" />
|
||||
@else
|
||||
<img src="{{ asset(setting('general.company_logo')) }}" class="invoice-logo" />
|
||||
@endif
|
||||
</div>
|
||||
<div class="col-xs-5 invoice-company">
|
||||
<address>
|
||||
<strong>{{ setting('general.company_name') }}</strong><br>
|
||||
{{ setting('general.company_address') }}<br>
|
||||
@if (setting('general.company_tax_number'))
|
||||
{{ trans('general.tax_number') }}: {{ setting('general.company_tax_number') }}<br>
|
||||
@endif
|
||||
<br>
|
||||
@if (setting('general.company_phone'))
|
||||
{{ setting('general.company_phone') }}<br>
|
||||
@endif
|
||||
{{ setting('general.company_email') }}
|
||||
</address>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-7">
|
||||
{{ trans('invoices.bill_to') }}
|
||||
<address>
|
||||
<strong>{{ $invoice->customer_name }}</strong><br>
|
||||
{{ $invoice->customer_address }}<br>
|
||||
@if ($invoice->customer_tax_number)
|
||||
{{ trans('general.tax_number') }}: {{ $invoice->customer_tax_number }}<br>
|
||||
@endif
|
||||
<br>
|
||||
@if ($invoice->customer_phone)
|
||||
{{ $invoice->customer_phone }}<br>
|
||||
@endif
|
||||
{{ $invoice->customer_email }}
|
||||
</address>
|
||||
</div>
|
||||
<div class="col-xs-5">
|
||||
<div class="table-responsive">
|
||||
<table class="table no-border">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>{{ trans('invoices.invoice_number') }}:</th>
|
||||
<td class="text-right">{{ $invoice->invoice_number }}</td>
|
||||
</tr>
|
||||
@if ($invoice->order_number)
|
||||
<tr>
|
||||
<th>{{ trans('invoices.order_number') }}:</th>
|
||||
<td class="text-right">{{ $invoice->order_number }}</td>
|
||||
</tr>
|
||||
@endif
|
||||
<tr>
|
||||
<th>{{ trans('invoices.invoice_date') }}:</th>
|
||||
<td class="text-right">{{ Date::parse($invoice->invoiced_at)->format($date_format) }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{ trans('invoices.payment_due') }}:</th>
|
||||
<td class="text-right">{{ Date::parse($invoice->due_at)->format($date_format) }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-12 table-responsive">
|
||||
<table class="table table-striped">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>{{ trans_choice('general.items', 1) }}</th>
|
||||
<th class="text-center">{{ trans('invoices.quantity') }}</th>
|
||||
<th class="text-right">{{ trans('invoices.price') }}</th>
|
||||
<th class="text-right">{{ trans('invoices.total') }}</th>
|
||||
</tr>
|
||||
@foreach($invoice->items as $item)
|
||||
<tr>
|
||||
<td>
|
||||
{{ $item->name }}
|
||||
@if ($item->sku)
|
||||
<br><small>{{ trans('items.sku') }}: {{ $item->sku }}</small>
|
||||
@endif
|
||||
</td>
|
||||
<td class="text-center">{{ $item->quantity }}</td>
|
||||
<td class="text-right">@money($item->price, $invoice->currency_code, true)</td>
|
||||
<td class="text-right">@money($item->total - $item->tax, $invoice->currency_code, true)</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-7">
|
||||
@if ($invoice->notes)
|
||||
<p class="lead">{{ trans_choice('general.notes', 2) }}</p>
|
||||
|
||||
<p class="text-muted well well-sm no-shadow" style="margin-top: 10px;">
|
||||
{{ $invoice->notes }}
|
||||
</p>
|
||||
@endif
|
||||
</div>
|
||||
<div class="col-xs-5">
|
||||
<div class="table-responsive">
|
||||
<table class="table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th style="max-width: 214px">{{ trans('invoices.sub_total') }}:</th>
|
||||
<td class="text-right">@money($invoice->sub_total, $invoice->currency_code, true)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{ trans('invoices.tax_total') }}:</th>
|
||||
<td class="text-right">@money($invoice->tax_total, $invoice->currency_code, true)</td>
|
||||
</tr>
|
||||
@if($invoice->paid)
|
||||
<tr>
|
||||
<th>{{ trans('invoices.paid') }}:</th>
|
||||
<td class="text-right">@money('-' . $invoice->paid, $invoice->currency_code, true)</td>
|
||||
</tr>
|
||||
@endif
|
||||
<tr>
|
||||
<th>{{ trans('invoices.total') }}:</th>
|
||||
<td class="text-right">@money($invoice->grand_total, $invoice->currency_code, true)</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
@endsection
|
||||
452
resources/views/incomes/invoices/show.blade.php
Normal file
452
resources/views/incomes/invoices/show.blade.php
Normal file
@@ -0,0 +1,452 @@
|
||||
@extends('layouts.admin')
|
||||
|
||||
@section('title', trans_choice('general.invoices', 1) . ': ' . $invoice->invoice_number)
|
||||
|
||||
@section('content')
|
||||
<div class="box box-success">
|
||||
<section class="invoice">
|
||||
<span class="badge bg-aqua">{{ $invoice->status->name }}</span>
|
||||
|
||||
<div class="row invoice-header">
|
||||
<div class="col-xs-7">
|
||||
@if (setting('general.invoice_logo'))
|
||||
<img src="{{ asset(setting('general.invoice_logo')) }}" class="invoice-logo" />
|
||||
@else
|
||||
<img src="{{ asset(setting('general.company_logo')) }}" class="invoice-logo" />
|
||||
@endif
|
||||
</div>
|
||||
<div class="col-xs-5 invoice-company">
|
||||
<address>
|
||||
<strong>{{ setting('general.company_name') }}</strong><br>
|
||||
{{ setting('general.company_address') }}<br>
|
||||
@if (setting('general.company_tax_number'))
|
||||
{{ trans('general.tax_number') }}: {{ setting('general.company_tax_number') }}<br>
|
||||
@endif
|
||||
<br>
|
||||
@if (setting('general.company_phone'))
|
||||
{{ setting('general.company_phone') }}<br>
|
||||
@endif
|
||||
{{ setting('general.company_email') }}
|
||||
</address>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-7">
|
||||
{{ trans('invoices.bill_to') }}
|
||||
<address>
|
||||
<strong>{{ $invoice->customer_name }}</strong><br>
|
||||
{{ $invoice->customer_address }}<br>
|
||||
@if ($invoice->customer_tax_number)
|
||||
{{ trans('general.tax_number') }}: {{ $invoice->customer_tax_number }}<br>
|
||||
@endif
|
||||
<br>
|
||||
@if ($invoice->customer_phone)
|
||||
{{ $invoice->customer_phone }}<br>
|
||||
@endif
|
||||
{{ $invoice->customer_email }}
|
||||
</address>
|
||||
</div>
|
||||
<div class="col-xs-5">
|
||||
<div class="table-responsive">
|
||||
<table class="table no-border">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>{{ trans('invoices.invoice_number') }}:</th>
|
||||
<td class="text-right">{{ $invoice->invoice_number }}</td>
|
||||
</tr>
|
||||
@if ($invoice->order_number)
|
||||
<tr>
|
||||
<th>{{ trans('invoices.order_number') }}:</th>
|
||||
<td class="text-right">{{ $invoice->order_number }}</td>
|
||||
</tr>
|
||||
@endif
|
||||
<tr>
|
||||
<th>{{ trans('invoices.invoice_date') }}:</th>
|
||||
<td class="text-right">{{ Date::parse($invoice->invoiced_at)->format($date_format) }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{ trans('invoices.payment_due') }}:</th>
|
||||
<td class="text-right">{{ Date::parse($invoice->due_at)->format($date_format) }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-12 table-responsive">
|
||||
<table class="table table-striped">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>{{ trans_choice('general.items', 1) }}</th>
|
||||
<th class="text-center">{{ trans('invoices.quantity') }}</th>
|
||||
<th class="text-right">{{ trans('invoices.price') }}</th>
|
||||
<th class="text-right">{{ trans('invoices.total') }}</th>
|
||||
</tr>
|
||||
@foreach($invoice->items as $item)
|
||||
<tr>
|
||||
<td>
|
||||
{{ $item->name }}
|
||||
@if ($item->sku)
|
||||
<br><small>{{ trans('items.sku') }}: {{ $item->sku }}</small>
|
||||
@endif
|
||||
</td>
|
||||
<td class="text-center">{{ $item->quantity }}</td>
|
||||
<td class="text-right">@money($item->price, $invoice->currency_code, true)</td>
|
||||
<td class="text-right">@money($item->total - $item->tax, $invoice->currency_code, true)</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-7">
|
||||
@if ($invoice->notes)
|
||||
<p class="lead">{{ trans_choice('general.notes', 2) }}</p>
|
||||
|
||||
<p class="text-muted well well-sm no-shadow" style="margin-top: 10px;">
|
||||
{{ $invoice->notes }}
|
||||
</p>
|
||||
@endif
|
||||
</div>
|
||||
<div class="col-xs-5">
|
||||
<div class="table-responsive">
|
||||
<table class="table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>{{ trans('invoices.sub_total') }}:</th>
|
||||
<td class="text-right">@money($invoice->sub_total, $invoice->currency_code, true)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{ trans('invoices.tax_total') }}:</th>
|
||||
<td class="text-right">@money($invoice->tax_total, $invoice->currency_code, true)</td>
|
||||
</tr>
|
||||
@if ($invoice->paid)
|
||||
<tr>
|
||||
<th>{{ trans('invoices.paid') }}:</th>
|
||||
<td class="text-right">@money('-' . $invoice->paid, $invoice->currency_code, true)</td>
|
||||
</tr>
|
||||
@endif
|
||||
<tr>
|
||||
<th>{{ trans('invoices.total') }}:</th>
|
||||
<td class="text-right">@money($invoice->grand_total, $invoice->currency_code, true)</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="box-footer row no-print">
|
||||
<div class="col-md-12">
|
||||
<a href="{{ url('incomes/invoices/' . $invoice->id . '/edit') }}" class="btn btn-primary">
|
||||
<i class="fa fa-pencil-square-o"></i> {{ trans('general.edit') }}
|
||||
</a>
|
||||
<a href="{{ url('incomes/invoices/' . $invoice->id . '/print') }}" target="_blank" class="btn btn-default">
|
||||
<i class="fa fa-print"></i> {{ trans('general.print') }}
|
||||
</a>
|
||||
<button type="button" id="button-email" class="btn btn-default" data-toggle="tooltip" title="{{ trans('invoices.send_mail') }}">
|
||||
<i class="fa fa-envelope-o"></i> {{ trans('general.send') }}
|
||||
</button>
|
||||
<button type="button" id="button-pdf" class="btn btn-default" data-toggle="tooltip" title="{{ trans('invoices.download_pdf') }}">
|
||||
<i class="fa fa-file-pdf-o"></i> {{ trans('general.download') }}
|
||||
</button>
|
||||
<button type="button" id="button-payment" class="btn btn-success">
|
||||
<i class="fa fa-credit-card"></i> {{ trans('invoices.add_payment') }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<div class="col-xs-6 no-padding-left">
|
||||
<div class="box box-default collapsed-box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ trans('invoices.histories') }}</h3>
|
||||
|
||||
<div class="box-tools pull-right">
|
||||
<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-plus"></i></button>
|
||||
</div>
|
||||
<!-- /.box-tools -->
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div class="table-responsive">
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ trans('general.date') }}</th>
|
||||
<th>{{ trans('general.status') }}</th>
|
||||
<th>{{ trans('general.description') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($invoice->histories as $history)
|
||||
<tr>
|
||||
<td>{{ Date::parse($history->created_at)->format($date_format) }}</td>
|
||||
<td>{{ $history->status->name }}</td>
|
||||
<td>{{ $history->description }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-xs-6 no-padding-right">
|
||||
<div class="box box-default collapsed-box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ trans('invoices.payments') }}</h3>
|
||||
|
||||
<div class="box-tools pull-right">
|
||||
<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-plus"></i></button>
|
||||
</div>
|
||||
<!-- /.box-tools -->
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div class="table-responsive">
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ trans('general.date') }}</th>
|
||||
<th>{{ trans('general.amount') }}</th>
|
||||
<th>{{ trans_choice('general.accounts', 1) }}</th>
|
||||
<th style="width: 15%;">{{ trans('general.actions') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($invoice->payments as $payment)
|
||||
<tr>
|
||||
<td>{{ Date::parse($payment->paid_at)->format($date_format) }}</td>
|
||||
<td>@money($payment->amount, $payment->currency_code, true)</td>
|
||||
<td>{{ $payment->account->name }}</td>
|
||||
<td>
|
||||
<a href="{{ url('incomes/invoices/' . $payment->id . '') }}" class="btn btn-info btn-xs hidden"><i class="fa fa-eye" aria-hidden="true"></i> {{ trans('general.show') }}</a>
|
||||
<a href="{{ url('incomes/revenues/' . $payment->id . '/edit') }}" class="btn btn-primary btn-xs hidden"><i class="fa fa-pencil-square-o" aria-hidden="true"></i> {{ trans('general.edit') }}</a>
|
||||
{!! Form::open([
|
||||
'id' => 'invoice-payment-' . $payment->id,
|
||||
'method' => 'DELETE',
|
||||
'url' => ['incomes/invoices/paymentDestroy', $payment->id],
|
||||
'style' => 'display:inline'
|
||||
]) !!}
|
||||
{!! Form::button('<i class="fa fa-trash-o" aria-hidden="true"></i> ' . trans('general.delete'), array(
|
||||
'type' => 'button',
|
||||
'class' => 'btn btn-danger btn-xs',
|
||||
'title' => trans('general.delete'),
|
||||
'onclick' => 'confirmDelete("' . '#invoice-payment-' . $payment->id . '", "' . trans_choice('general.payments', 2) . '", "' . trans('general.delete_confirm', ['name' => '<strong>' . Date::parse($payment->paid_at)->format($date_format) . ' - ' . money($payment->amount, $payment->currency_code, true) . ' - ' . $payment->account->name . '</strong>', 'type' => strtolower(trans_choice('general.revenues', 1))]) . '", "' . trans('general.cancel') . '", "' . trans('general.delete') . '")'
|
||||
)) !!}
|
||||
{!! Form::close() !!}
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('js')
|
||||
<script src="{{ asset('vendor/almasaeed2010/adminlte/plugins/datepicker/bootstrap-datepicker.js') }}"></script>
|
||||
<script src="{{ asset('public/js/bootstrap-fancyfile.js') }}"></script>
|
||||
@endsection
|
||||
|
||||
@section('css')
|
||||
<link rel="stylesheet" href="{{ asset('vendor/almasaeed2010/adminlte/plugins/datepicker/datepicker3.css') }}">
|
||||
<link rel="stylesheet" href="{{ asset('public/css/bootstrap-fancyfile.css') }}">
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
$(document).on('click', '#button-payment', function (e) {
|
||||
$('#payment-modal').remove();
|
||||
|
||||
var html = '';
|
||||
|
||||
html += '<div class="modal fade" id="payment-modal" tabindex="-1" role="dialog" aria-labelledby="paymentModalLabel">';
|
||||
html += ' <div class="modal-dialog" role="document">';
|
||||
html += ' <div class="modal-content box box-success">';
|
||||
html += ' <div class="modal-header">';
|
||||
html += ' <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>';
|
||||
html += ' <h4 class="modal-title" id="paymentModalLabel">{{ trans('invoices.add_payment') }}</h4>';
|
||||
html += ' </div>';
|
||||
html += ' <div class="modal-body box-body">';
|
||||
html += ' <div class="form-group col-md-6 required">';
|
||||
html += ' {!! Form::label('paid_at', trans('general.date'), ['class' => 'control-label']) !!}';
|
||||
html += ' <div class="input-group">';
|
||||
html += ' <div class="input-group-addon"><i class="fa fa-calendar"></i></div>';
|
||||
html += ' {!! Form::text('paid_at', \Carbon\Carbon::now()->toDateString(), ['id' => 'paid_at', 'class' => 'form-control', 'required' => 'required', 'data-inputmask' => '\'alias\': \'yyyy-mm-dd\'', 'data-mask' => '']) !!}';
|
||||
html += ' </div>';
|
||||
html += ' </div>';
|
||||
html += ' <div class="form-group col-md-6 required">';
|
||||
html += ' {!! Form::label('amount', trans('general.amount'), ['class' => 'control-label']) !!}';
|
||||
html += ' <div class="input-group">';
|
||||
html += ' <div class="input-group-addon"><i class="fa fa-money"></i></div>';
|
||||
html += ' {!! Form::text('amount', $invoice->grand_total, ['class' => 'form-control', 'required' => 'required', 'placeholder' => trans('general.form.enter', ['field' => trans('general.amount')])]) !!}';
|
||||
html += ' </div>';
|
||||
html += ' </div>';
|
||||
html += ' <div class="form-group col-md-6 required">';
|
||||
html += ' {!! Form::label('account_id', trans_choice('general.accounts', 1), ['class' => 'control-label']) !!}';
|
||||
html += ' <div class="input-group">';
|
||||
html += ' <div class="input-group-addon"><i class="fa fa-university"></i></div>';
|
||||
html += ' {!! Form::select('account_id', $accounts, setting('general.default_account'), ['class' => 'form-control', 'required' => 'required', 'placeholder' => trans('general.form.select.field', ['field' => trans_choice('general.accounts', 1)])]) !!}';
|
||||
html += ' </div>';
|
||||
html += ' </div>';
|
||||
html += ' <div class="form-group col-md-6 required">';
|
||||
html += ' {!! Form::label('currency_code', trans_choice('general.currencies', 1), ['class' => 'control-label']) !!}';
|
||||
html += ' <div class="input-group">';
|
||||
html += ' <div class="input-group-addon"><i class="fa fa-exchange"></i></div>';
|
||||
html += ' {!! Form::text('currency', $currencies[$account_currency_code], ['id' => 'currency', 'class' => 'form-control', 'required' => 'required', 'disabled' => 'disabled']) !!}';
|
||||
html += ' {!! Form::hidden('currency_code', $account_currency_code, ['id' => 'currency_code', 'class' => 'form-control', 'required' => 'required']) !!}';
|
||||
html += ' </div>';
|
||||
html += ' </div>';
|
||||
html += ' <div class="form-group col-md-12">';
|
||||
html += ' {!! Form::label('description', trans('general.description'), ['class' => 'control-label']) !!}';
|
||||
html += ' {!! Form::textarea('description', null, ['class' => 'form-control', 'rows' => '3', 'placeholder' => trans('general.form.enter', ['field' => trans('general.description')])]) !!}';
|
||||
html += ' </div>';
|
||||
html += ' <div class="form-group col-md-6 required">';
|
||||
html += ' {!! Form::label('payment_method', trans_choice('general.payment_methods', 1), ['class' => 'control-label']) !!}';
|
||||
html += ' <div class="input-group">';
|
||||
html += ' <div class="input-group-addon"><i class="fa fa-folder-open-o"></i></div>';
|
||||
html += ' {!! Form::select('payment_method', $payment_methods, setting('general.default_payment_method'), ['class' => 'form-control', 'required' => 'required', 'placeholder' => trans('general.form.select.field', ['field' => trans_choice('general.payment_methods', 1)])]) !!}';
|
||||
html += ' </div>';
|
||||
html += ' </div>';
|
||||
html += ' <div class="form-group col-md-6">';
|
||||
html += ' {!! Form::label('reference', trans('general.reference'), ['class' => 'control-label']) !!}';
|
||||
html += ' <div class="input-group">';
|
||||
html += ' <div class="input-group-addon"><i class="fa fa-file-text-o"></i></div>';
|
||||
html += ' {!! Form::text('reference', null, ['class' => 'form-control', 'placeholder' => trans('general.form.enter', ['field' => trans('general.reference')])]) !!}';
|
||||
html += ' </div>';
|
||||
html += ' </div>';
|
||||
html += ' {!! Form::hidden('invoice_id', $invoice->id, ['id' => 'invoice_id', 'class' => 'form-control', 'required' => 'required']) !!}';
|
||||
html += ' </div>';
|
||||
html += ' <div class="modal-footer">';
|
||||
html += ' <button type="button" class="btn btn-default" data-dismiss="modal">{{ trans('general.cancel') }}</button>';
|
||||
html += ' <button type="button" onclick="addPayment();" class="btn btn-success">{{ trans('general.save') }}</button>';
|
||||
html += ' </div>';
|
||||
html += ' </div>';
|
||||
html += ' </div>';
|
||||
html += '</div>';
|
||||
|
||||
$('body').append(html);
|
||||
|
||||
$('#paid_at').datepicker({
|
||||
format: 'yyyy-mm-dd',
|
||||
autoclose: true
|
||||
});
|
||||
|
||||
$("#account_id").select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.accounts', 1)]) }}"
|
||||
});
|
||||
|
||||
$("#payment_method").select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.payment_methods', 1)]) }}"
|
||||
});
|
||||
|
||||
$('#payment-modal').modal('show');
|
||||
});
|
||||
|
||||
$(document).on('change', '#account_id', function (e) {
|
||||
$.ajax({
|
||||
url: '{{ url("settings/currencies/currency") }}',
|
||||
type: 'GET',
|
||||
dataType: 'JSON',
|
||||
data: 'account_id=' + $(this).val(),
|
||||
success: function(data) {
|
||||
$('#currency').val(data.currency_name);
|
||||
$('#currency_code').val(data.currency_code);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$(document).on('click', '#button-pdf', function (e) {
|
||||
location.href = "{{ url('incomes/invoices/' . $invoice->id . '/pdf') }}";
|
||||
});
|
||||
|
||||
$(document).on('click', '#button-email', function (e) {
|
||||
$('#email-modal').remove();
|
||||
|
||||
var html = '<div class="modal fade" id="email-modal" tabindex="-1" role="dialog" aria-labelledby="emailModalLabel">';
|
||||
html += ' <div class="modal-dialog" role="document">';
|
||||
html += ' <div class="modal-content">';
|
||||
html += ' <div class="modal-header">';
|
||||
html += ' <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>';
|
||||
html += ' <h4 class="modal-title" id="emailModalLabel">Overflowing text</h4>';
|
||||
html += ' </div>';
|
||||
html += ' <div class="modal-body">';
|
||||
html += ' N/A';
|
||||
html += ' </div>';
|
||||
html += ' <div class="modal-footer">';
|
||||
html += ' <button type="button" class="btn btn-default" data-dismiss="modal">{{ trans('general.cancel') }}</button>';
|
||||
html += ' <button type="button" class="btn btn-success">Save changes</button>';
|
||||
html += ' </div>';
|
||||
html += ' </div>';
|
||||
html += ' </div>';
|
||||
html += '</div>';
|
||||
|
||||
$('body').append(html);
|
||||
|
||||
$('#email-modal').modal('show');
|
||||
});
|
||||
});
|
||||
|
||||
function addPayment() {
|
||||
$('.help-block').remove();
|
||||
|
||||
$.ajax({
|
||||
url: '{{ url("incomes/invoices/payment") }}',
|
||||
type: 'POST',
|
||||
dataType: 'JSON',
|
||||
data: $('#payment-modal input[type=\'text\'], #payment-modal input[type=\'hidden\'], #payment-modal textarea, #payment-modal select'),
|
||||
headers: { 'X-CSRF-TOKEN': '{{ csrf_token() }}' },
|
||||
beforeSend: function() {
|
||||
$('#payment-modal .modal-content').append('<div id="loading" class="text-center"><i class="fa fa-spinner fa-spin fa-5x checkout-spin"></i></div>');
|
||||
},
|
||||
complete: function() {
|
||||
$('#loading').remove();
|
||||
},
|
||||
success: function(data) {
|
||||
$("#payment-modal").modal('hide');
|
||||
|
||||
location.reload();
|
||||
},
|
||||
error: function(data){
|
||||
var errors = data.responseJSON;
|
||||
|
||||
if (typeof errors !== 'undefined') {
|
||||
if (errors.paid_at) {
|
||||
$('#payment-modal #paid_at').parent().after('<p class="help-block">' + errors.paid_at + '</p>');
|
||||
}
|
||||
|
||||
if (errors.amount) {
|
||||
$('#payment-modal #amount').parent().after('<p class="help-block">' + errors.amount + '</p>');
|
||||
}
|
||||
|
||||
if (errors.account_id) {
|
||||
$('#payment-modal #account_id').parent().after('<p class="help-block">' + errors.account_id + '</p>');
|
||||
}
|
||||
|
||||
if (errors.currency_code) {
|
||||
$('#payment-modal #currency_code').parent().after('<p class="help-block">' + errors.currency_code + '</p>');
|
||||
}
|
||||
|
||||
if (errors.category_id) {
|
||||
$('#payment-modal #category_id').parent().after('<p class="help-block">' + errors.category_id + '</p>');
|
||||
}
|
||||
|
||||
if (errors.payment_method) {
|
||||
$('#payment-modal #payment_method').parent().after('<p class="help-block">' + errors.payment_method + '</p>');
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
@endsection
|
||||
105
resources/views/incomes/revenues/create.blade.php
Normal file
105
resources/views/incomes/revenues/create.blade.php
Normal file
@@ -0,0 +1,105 @@
|
||||
@extends('layouts.admin')
|
||||
|
||||
@section('title', trans('general.title.new', ['type' => trans_choice('general.revenues', 1)]))
|
||||
|
||||
@section('content')
|
||||
<!-- Default box -->
|
||||
<div class="box box-success">
|
||||
{!! Form::open(['url' => 'incomes/revenues', 'files' => true, 'role' => 'form']) !!}
|
||||
|
||||
<div class="box-body">
|
||||
{{ Form::textGroup('paid_at', trans('general.date'), 'calendar',['id' => 'paid_at', 'class' => 'form-control', 'required' => 'required', 'data-inputmask' => '\'alias\': \'yyyy-mm-dd\'', 'data-mask' => ''], Date::now()->toDateString()) }}
|
||||
|
||||
{{ Form::textGroup('amount', trans('general.amount'), 'money', ['required' => 'required', 'autofocus' => 'autofocus']) }}
|
||||
|
||||
{{ Form::selectGroup('account_id', trans_choice('general.accounts', 1), 'university', $accounts, setting('general.accounts', 1)) }}
|
||||
|
||||
<div class="form-group col-md-6 {{ $errors->has('currency_code') ? 'has-error' : ''}}">
|
||||
{!! Form::label('currency_code', trans_choice('general.currencies', 1), ['class' => 'control-label']) !!}
|
||||
<div class="input-group">
|
||||
<div class="input-group-addon"><i class="fa fa-exchange"></i></div>
|
||||
{!! Form::text('currency', $currencies[$account_currency_code], ['id' => 'currency', 'class' => 'form-control', 'required' => 'required', 'disabled' => 'disabled']) !!}
|
||||
{!! Form::hidden('currency_code', $account_currency_code, ['id' => 'currency_code', 'class' => 'form-control', 'required' => 'required']) !!}
|
||||
</div>
|
||||
{!! $errors->first('currency_code', '<p class="help-block">:message</p>') !!}
|
||||
</div>
|
||||
|
||||
{{ Form::textareaGroup('description', trans('general.description')) }}
|
||||
|
||||
{{ Form::selectGroup('category_id', trans_choice('general.categories', 1), 'folder-open-o', $categories) }}
|
||||
|
||||
{{ Form::selectGroup('customer_id', trans_choice('general.customers', 1), 'user', $customers, null, []) }}
|
||||
|
||||
{{ Form::selectGroup('payment_method', trans_choice('general.payment_methods', 1), 'credit-card', $payment_methods, setting('general.default_payment_method')) }}
|
||||
|
||||
{{ Form::textGroup('reference', trans('general.reference'), 'file-text-o', []) }}
|
||||
|
||||
{{ Form::fileGroup('attachment', trans('general.attachment')) }}
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
|
||||
<div class="box-footer">
|
||||
{{ Form::saveButtons('incomes/revenues') }}
|
||||
</div>
|
||||
<!-- /.box-footer -->
|
||||
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('js')
|
||||
<script src="{{ asset('vendor/almasaeed2010/adminlte/plugins/datepicker/bootstrap-datepicker.js') }}"></script>
|
||||
<script src="{{ asset('public/js/bootstrap-fancyfile.js') }}"></script>
|
||||
@endsection
|
||||
|
||||
@section('css')
|
||||
<link rel="stylesheet" href="{{ asset('vendor/almasaeed2010/adminlte/plugins/datepicker/datepicker3.css') }}">
|
||||
<link rel="stylesheet" href="{{ asset('public/css/bootstrap-fancyfile.css') }}">
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
//Date picker
|
||||
$('#paid_at').datepicker({
|
||||
format: 'yyyy-mm-dd',
|
||||
autoclose: true
|
||||
});
|
||||
|
||||
$("#account_id").select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.accounts', 1)]) }}"
|
||||
});
|
||||
|
||||
$("#category_id").select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.categories', 1)]) }}"
|
||||
});
|
||||
|
||||
$("#customer_id").select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.customers', 1)]) }}"
|
||||
});
|
||||
|
||||
$("#payment_method").select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.payment_methods', 1)]) }}"
|
||||
});
|
||||
|
||||
$('#attachment').fancyfile({
|
||||
text : '{{ trans('general.form.select.file') }}',
|
||||
style : 'btn-default',
|
||||
placeholder : '{{ trans('general.form.no_file_selected') }}'
|
||||
});
|
||||
|
||||
$(document).on('change', '#account_id', function (e) {
|
||||
$.ajax({
|
||||
url: '{{ url("settings/currencies/currency") }}',
|
||||
type: 'GET',
|
||||
dataType: 'JSON',
|
||||
data: 'account_id=' + $(this).val(),
|
||||
success: function(data) {
|
||||
$('#currency').val(data.currency_name);
|
||||
$('#currency_code').val(data.currency_code);
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
112
resources/views/incomes/revenues/edit.blade.php
Normal file
112
resources/views/incomes/revenues/edit.blade.php
Normal file
@@ -0,0 +1,112 @@
|
||||
@extends('layouts.admin')
|
||||
|
||||
@section('title', trans('general.title.edit', ['type' => trans_choice('general.revenues', 1)]))
|
||||
|
||||
@section('content')
|
||||
<!-- Default box -->
|
||||
<div class="box box-success">
|
||||
{!! Form::model($revenue, [
|
||||
'method' => 'PATCH',
|
||||
'files' => true,
|
||||
'url' => ['incomes/revenues', $revenue->id],
|
||||
'role' => 'form'
|
||||
]) !!}
|
||||
|
||||
<div class="box-body">
|
||||
{{ Form::textGroup('paid_at', trans('general.date'), 'calendar',['id' => 'paid_at', 'class' => 'form-control', 'required' => 'required', 'data-inputmask' => '\'alias\': \'yyyy-mm-dd\'', 'data-mask' => ''],Date::now()->toDateString()) }}
|
||||
|
||||
{{ Form::textGroup('amount', trans('general.amount'), 'money', ['required' => 'required', 'autofocus' => 'autofocus']) }}
|
||||
|
||||
{{ Form::selectGroup('account_id', trans_choice('general.accounts', 1), 'university', $accounts, setting('general.accounts', 1)) }}
|
||||
|
||||
<div class="form-group col-md-6 {{ $errors->has('currency_code') ? 'has-error' : ''}}">
|
||||
{!! Form::label('currency_code', trans_choice('general.currencies', 1), ['class' => 'control-label']) !!}
|
||||
<div class="input-group">
|
||||
<div class="input-group-addon"><i class="fa fa-exchange"></i></div>
|
||||
{!! Form::text('currency', $currencies[$account_currency_code], ['id' => 'currency', 'class' => 'form-control', 'required' => 'required', 'disabled' => 'disabled']) !!}
|
||||
{!! Form::hidden('currency_code', $account_currency_code, ['id' => 'currency_code', 'class' => 'form-control', 'required' => 'required']) !!}
|
||||
</div>
|
||||
{!! $errors->first('currency_code', '<p class="help-block">:message</p>') !!}
|
||||
</div>
|
||||
|
||||
{{ Form::textareaGroup('description', trans('general.description')) }}
|
||||
|
||||
{{ Form::selectGroup('category_id', trans_choice('general.categories', 1), 'folder-open-o', $categories) }}
|
||||
|
||||
{{ Form::selectGroup('customer_id', trans_choice('general.customers', 1), 'user', $customers, null, []) }}
|
||||
|
||||
{{ Form::selectGroup('payment_method', trans_choice('general.payment_methods', 1), 'credit-card', $payment_methods, null) }}
|
||||
|
||||
{{ Form::textGroup('reference', trans('general.reference'), 'file-text-o',[]) }}
|
||||
|
||||
{{ Form::fileGroup('attachment', trans('general.attachment')) }}
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
|
||||
@permission('update-incomes-revenues')
|
||||
<div class="box-footer">
|
||||
{{ Form::saveButtons('incomes/revenues') }}
|
||||
</div>
|
||||
<!-- /.box-footer -->
|
||||
@endpermission
|
||||
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('js')
|
||||
<script src="{{ asset('vendor/almasaeed2010/adminlte/plugins/datepicker/bootstrap-datepicker.js') }}"></script>
|
||||
<script src="{{ asset('public/js/bootstrap-fancyfile.js') }}"></script>
|
||||
@endsection
|
||||
|
||||
@section('css')
|
||||
<link rel="stylesheet" href="{{ asset('vendor/almasaeed2010/adminlte/plugins/datepicker/datepicker3.css') }}">
|
||||
<link rel="stylesheet" href="{{ asset('public/css/bootstrap-fancyfile.css') }}">
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
//Date picker
|
||||
$('#paid_at').datepicker({
|
||||
format: 'yyyy-mm-dd',
|
||||
autoclose: true
|
||||
});
|
||||
|
||||
$("#account_id").select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.accounts', 1)]) }}"
|
||||
});
|
||||
|
||||
$("#category_id").select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.categories', 1)]) }}"
|
||||
});
|
||||
|
||||
$("#customer_id").select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.customers', 1)]) }}"
|
||||
});
|
||||
|
||||
$("#payment_method").select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.payment_methods', 1)]) }}"
|
||||
});
|
||||
|
||||
$('#attachment').fancyfile({
|
||||
text : '{{ trans('general.form.select.file') }}',
|
||||
style : 'btn-default',
|
||||
placeholder : '<?php echo $revenue->attachment; ?>'
|
||||
});
|
||||
|
||||
$(document).on('change', '#account_id', function (e) {
|
||||
$.ajax({
|
||||
url: '{{ url("settings/currencies/currency") }}',
|
||||
type: 'GET',
|
||||
dataType: 'JSON',
|
||||
data: 'account_id=' + $(this).val(),
|
||||
success: function(data) {
|
||||
$('#currency').val(data.currency_name);
|
||||
$('#currency_code').val(data.currency_code);
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
72
resources/views/incomes/revenues/index.blade.php
Normal file
72
resources/views/incomes/revenues/index.blade.php
Normal file
@@ -0,0 +1,72 @@
|
||||
@extends('layouts.admin')
|
||||
|
||||
@section('title', trans_choice('general.revenues', 2))
|
||||
|
||||
@permission('create-incomes-revenues')
|
||||
@section('new_button')
|
||||
<span class="new-button"><a href="{{ url('incomes/revenues/create') }}" class="btn btn-success btn-sm"><span class="fa fa-plus"></span> {{ trans('general.add_new') }}</a></span>
|
||||
@endsection
|
||||
@endpermission
|
||||
|
||||
@section('content')
|
||||
<!-- Default box -->
|
||||
<div class="box box-success">
|
||||
<div class="box-header">
|
||||
{!! Form::open(['url' => 'incomes/revenues', 'role' => 'form', 'method' => 'GET']) !!}
|
||||
<div class="pull-left">
|
||||
<span class="title-filter">{{ trans('general.search') }}:</span>
|
||||
{!! Form::select('customer', $customers, request('customer'), ['class' => 'form-control input-filter input-sm', 'placeholder' => trans('customers.all')]) !!}
|
||||
{!! Form::select('category', $categories, request('category'), ['class' => 'form-control input-filter input-sm', 'placeholder' => trans('categories.all')]) !!}
|
||||
{!! Form::select('account', $accounts, request('account'), ['class' => 'form-control input-filter input-sm', 'placeholder' => trans('accounts.all')]) !!}
|
||||
{!! Form::button('<span class="fa fa-filter"></span> ' . trans('general.filter'), ['type' => 'submit', 'class' => 'btn btn-sm btn-default btn-filter']) !!}
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<span class="title-filter">{{ trans('general.show') }}:</span>
|
||||
{!! Form::select('limit', $limits, request('limit', setting('general.list_limit', '25')), ['class' => 'form-control input-filter input-sm', 'onchange' => 'this.form.submit()']) !!}
|
||||
</div>
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
<div class="box-body">
|
||||
<div class="table table-responsive">
|
||||
<table class="table table-bordered table-striped table-hover" id="tbl-revenues">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>@sortablelink('paid_at', trans('general.date'))</th>
|
||||
<th>@sortablelink('amount', trans('general.amount'))</th>
|
||||
<th>@sortablelink('customer.name', trans_choice('general.customers', 1))</th>
|
||||
<th>@sortablelink('category.name', trans_choice('general.categories', 1))</th>
|
||||
<th>@sortablelink('account.name', trans_choice('general.accounts', 1))</th>
|
||||
<th style="width: 15%;">{{ trans('general.actions') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($revenues as $item)
|
||||
<tr>
|
||||
<td><a href="{{ url('incomes/revenues/' . $item->id . '/edit') }}">{{ Date::parse($item->paid_at)->format($date_format) }}</a></td>
|
||||
<td>@money($item->amount, $item->currency_code, true)</td>
|
||||
<td>{{ !empty($item->customer->name) ? $item->customer->name : 'N/A'}}</td>
|
||||
<td>{{ $item->category->name }}</td>
|
||||
<td>{{ $item->account->name }}</td>
|
||||
<td>
|
||||
<a href="{{ url('incomes/revenues/' . $item->id . '/edit') }}" class="btn btn-primary btn-xs"><i class="fa fa-pencil-square-o" aria-hidden="true"></i> {{ trans('general.edit') }}</a>
|
||||
@permission('delete-incomes-revenues')
|
||||
{!! Form::deleteButton($item, 'incomes/revenues') !!}
|
||||
@endpermission
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
|
||||
<div class="box-footer">
|
||||
@include('partials.admin.pagination', ['items' => $revenues, 'type' => 'revenues'])
|
||||
</div>
|
||||
<!-- /.box-footer -->
|
||||
</div>
|
||||
<!-- /.box -->
|
||||
@endsection
|
||||
|
||||
37
resources/views/install/database/create.blade.php
Normal file
37
resources/views/install/database/create.blade.php
Normal file
@@ -0,0 +1,37 @@
|
||||
@extends('layouts.install')
|
||||
|
||||
@section('header', trans('install.steps.database'))
|
||||
|
||||
@section('content')
|
||||
{{ Form::textGroup('hostname', trans('install.database.hostname'), 'server', ['required' => 'required'], old('hostname', 'localhost'), 'col-md-12') }}
|
||||
|
||||
{{ Form::textGroup('username', trans('install.database.username'), 'user', ['required' => 'required'], old('username'), 'col-md-12') }}
|
||||
|
||||
{{ Form::passwordGroup('password', trans('install.database.password'), 'key', [], old('password'), 'col-md-12') }}
|
||||
|
||||
{{ Form::textGroup('database', trans('install.database.name'), 'database', ['required' => 'required'], old('database'), 'col-md-12') }}
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
$('#next-button').attr('disabled', true);
|
||||
|
||||
$('#hostname, #username, #database').keyup(function() {
|
||||
inputCheck();
|
||||
});
|
||||
});
|
||||
|
||||
function inputCheck() {
|
||||
hostname = $('#hostname').val();
|
||||
username = $('#username').val();
|
||||
database = $('#database').val();
|
||||
|
||||
if (hostname != '' && username != '' && database != '') {
|
||||
$('#next-button').attr('disabled', false);
|
||||
} else {
|
||||
$('#next-button').attr('disabled', true);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@endsection
|
||||
15
resources/views/install/language/create.blade.php
Normal file
15
resources/views/install/language/create.blade.php
Normal file
@@ -0,0 +1,15 @@
|
||||
@extends('layouts.install')
|
||||
|
||||
@section('header', trans('install.steps.language'))
|
||||
|
||||
@section('content')
|
||||
<div class="form-group">
|
||||
<div class="col-md-12">
|
||||
<select name="lang" id="lang" size="17" class="form-control">
|
||||
@foreach (language()->allowed() as $code => $name)
|
||||
<option value="{{ $code }}" @if ($code == 'en-GB') {{ 'selected="selected"' }} @endif>{{ $name }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
3
resources/views/install/requirements/show.blade.php
Normal file
3
resources/views/install/requirements/show.blade.php
Normal file
@@ -0,0 +1,3 @@
|
||||
@extends('layouts.install')
|
||||
|
||||
@section('header', trans('install.steps.requirements'))
|
||||
38
resources/views/install/settings/create.blade.php
Normal file
38
resources/views/install/settings/create.blade.php
Normal file
@@ -0,0 +1,38 @@
|
||||
@extends('layouts.install')
|
||||
|
||||
@section('header', trans('install.steps.settings'))
|
||||
|
||||
@section('content')
|
||||
{{ Form::textGroup('company_name', trans('install.settings.company_name'), 'id-card-o', ['required' => 'required'], old('company_name'), 'col-md-12') }}
|
||||
|
||||
{{ Form::textGroup('company_email', trans('install.settings.company_email'), 'envelope', ['required' => 'required'], old('company_email'), 'col-md-12') }}
|
||||
|
||||
{{ Form::textGroup('user_email', trans('install.settings.admin_email'), 'envelope', ['required' => 'required'], old('user_email'), 'col-md-12') }}
|
||||
|
||||
{{ Form::passwordGroup('user_password', trans('install.settings.admin_password'), 'key', ['required' => 'required'], old('user_password'), 'col-md-12') }}
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
$('#next-button').attr('disabled', true);
|
||||
|
||||
$('#company_name, #company_email, #user_email, #user_password').keyup(function() {
|
||||
inputCheck();
|
||||
});
|
||||
});
|
||||
|
||||
function inputCheck() {
|
||||
company_name = $('#company_name').val();
|
||||
company_email = $('#company_email').val();
|
||||
user_email = $('#user_email').val();
|
||||
user_password = $('#user_password').val();
|
||||
|
||||
if (company_name != '' && company_email != '' && user_email != '' && user_password != '') {
|
||||
$('#next-button').attr('disabled', false);
|
||||
} else {
|
||||
$('#next-button').attr('disabled', true);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@endsection
|
||||
68
resources/views/install/updates/index.blade.php
Normal file
68
resources/views/install/updates/index.blade.php
Normal file
@@ -0,0 +1,68 @@
|
||||
@extends('layouts.admin')
|
||||
|
||||
@section('title', trans_choice('general.updates', 2))
|
||||
|
||||
@section('content')
|
||||
<!-- Default box -->
|
||||
<div class="box box-success">
|
||||
<div class="box-header with-border">
|
||||
<i class="fa fa-gear"></i>
|
||||
<h3 class="box-title">Akaunting</h3>
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
|
||||
<div class="box-body">
|
||||
@if (empty($core))
|
||||
{{ trans('updates.latest_core') }}
|
||||
@else
|
||||
{{ trans('updates.new_core') }}
|
||||
<a href="{{ url('install/updates/update', ['alias' => 'core', 'version' => $core]) }}" data-toggle="tooltip" title="{{ trans('updates.update', ['version' => '1.5.2']) }}" class="btn btn-warning btn-xs"><i class="fa fa-refresh"></i> {{ trans('updates.update', ['version' => $core]) }}</a>
|
||||
<a href="{{ url('install/updates/changelog') }}" data-toggle="tooltip" title="{{ trans('updates.changelog') }}" class="btn btn-default btn-xs popup"><i class="fa fa-exchange"></i> {{ trans('updates.changelog') }}</a>
|
||||
@endif
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
|
||||
</div>
|
||||
<!-- /.box -->
|
||||
|
||||
<!-- Default box -->
|
||||
<div class="box box-success">
|
||||
<div class="box-header with-border">
|
||||
<i class="fa fa-rocket"></i>
|
||||
<h3 class="box-title">{{ trans_choice('general.modules', 2) }}</h3>
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
|
||||
<div class="box-body">
|
||||
<div class="table table-responsive">
|
||||
<table class="table table-bordered table-striped table-hover" id="tbl-translations">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-md-4">{{ trans('general.name') }}</th>
|
||||
<th class="col-md-2">{{ trans_choice('general.categories', 1) }}</th>
|
||||
<th class="col-md-2">{{ trans('updates.installed_version') }}</th>
|
||||
<th class="col-md-2">{{ trans('updates.latest_version') }}</th>
|
||||
<th class="col-md-2">{{ trans('general.actions') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($modules as $module)
|
||||
<tr>
|
||||
<td>{{ $module->name }}</td>
|
||||
<td>{{ $module->category }}</td>
|
||||
<td>{{ $module->installed }}</td>
|
||||
<td>{{ $module->latest }}</td>
|
||||
<td>
|
||||
<a href="{{ url('install/updates/update/' . $module->alias . '/' . $module->latest) }}" class="btn btn-warning btn-xs"><i class="fa fa-refresh" aria-hidden="true"></i> {{ trans_choice('general.updates', 1) }}</a>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
|
||||
</div>
|
||||
<!-- /.box -->
|
||||
@endsection
|
||||
75
resources/views/items/items/create.blade.php
Normal file
75
resources/views/items/items/create.blade.php
Normal file
@@ -0,0 +1,75 @@
|
||||
@extends('layouts.admin')
|
||||
|
||||
@section('title', trans('general.title.new', ['type' => trans_choice('general.items', 1)]))
|
||||
|
||||
@section('content')
|
||||
<!-- Default box -->
|
||||
<div class="box box-success">
|
||||
{!! Form::open(['url' => 'items/items', 'files' => true, 'role' => 'form']) !!}
|
||||
|
||||
<div class="box-body">
|
||||
{{ Form::textGroup('name', trans('general.name'), 'id-card-o') }}
|
||||
|
||||
{{ Form::textGroup('sku', trans('items.sku'), 'key') }}
|
||||
|
||||
{{ Form::textareaGroup('description', trans('general.description')) }}
|
||||
|
||||
{{ Form::textGroup('sale_price', trans('items.sales_price'), 'money') }}
|
||||
|
||||
{{ Form::textGroup('purchase_price', trans('items.purchase_price'), 'money') }}
|
||||
|
||||
{{ Form::textGroup('quantity', trans_choice('items.quantities', 1), 'cubes', ['required' => 'required'], '1') }}
|
||||
|
||||
{{ Form::selectGroup('tax_id', trans_choice('general.taxes', 1), 'percent', $taxes, setting('general.default_tax', '')) }}
|
||||
|
||||
{{ Form::selectGroup('category_id', trans_choice('general.categories', 1), 'folder-open-o', $categories) }}
|
||||
|
||||
{{ Form::fileGroup('picture', trans_choice('general.pictures', 1)) }}
|
||||
|
||||
{{ Form::radioGroup('enabled', trans('general.enabled')) }}
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
|
||||
<div class="box-footer">
|
||||
{{ Form::saveButtons('items/items') }}
|
||||
</div>
|
||||
<!-- /.box-footer -->
|
||||
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('js')
|
||||
<script src="{{ asset('public/js/bootstrap-fancyfile.js') }}"></script>
|
||||
@endsection
|
||||
|
||||
@section('css')
|
||||
<link rel="stylesheet" href="{{ asset('public/css/bootstrap-fancyfile.css') }}">
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
<script type="text/javascript">
|
||||
var text_yes = '{{ trans('general.yes') }}';
|
||||
var text_no = '{{ trans('general.no') }}';
|
||||
|
||||
$(document).ready(function(){
|
||||
$('#enabled_1').trigger('click');
|
||||
|
||||
$('#name').focus();
|
||||
|
||||
$("#tax_id").select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.taxes', 1)]) }}"
|
||||
});
|
||||
|
||||
$("#category_id").select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.categories', 1)]) }}"
|
||||
});
|
||||
|
||||
$('#picture').fancyfile({
|
||||
text : '{{ trans('general.form.select.file') }}',
|
||||
style : 'btn-default',
|
||||
placeholder : '{{ trans('general.form.no_file_selected') }}'
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
77
resources/views/items/items/edit.blade.php
Normal file
77
resources/views/items/items/edit.blade.php
Normal file
@@ -0,0 +1,77 @@
|
||||
@extends('layouts.admin')
|
||||
|
||||
@section('title', trans('general.title.edit', ['type' => trans_choice('general.items', 1)]))
|
||||
|
||||
@section('content')
|
||||
<!-- Default box -->
|
||||
<div class="box box-success">
|
||||
{!! Form::model($item, [
|
||||
'method' => 'PATCH',
|
||||
'files' => true,
|
||||
'url' => ['items/items', $item->id],
|
||||
'role' => 'form'
|
||||
]) !!}
|
||||
|
||||
<div class="box-body">
|
||||
{{ Form::textGroup('name', trans('general.name'), 'id-card-o') }}
|
||||
|
||||
{{ Form::textGroup('sku', trans('items.sku'), 'key') }}
|
||||
|
||||
{{ Form::textareaGroup('description', trans('general.description')) }}
|
||||
|
||||
{{ Form::textGroup('sale_price', trans('items.sales_price'), 'money') }}
|
||||
|
||||
{{ Form::textGroup('purchase_price', trans('items.purchase_price'), 'money') }}
|
||||
|
||||
{{ Form::textGroup('quantity', trans_choice('items.quantities', 1), 'cubes') }}
|
||||
|
||||
{{ Form::selectGroup('tax_id', trans_choice('general.taxes', 1), 'percent', $taxes, setting('general.default_tax', '')) }}
|
||||
|
||||
{{ Form::selectGroup('category_id', trans_choice('general.categories', 1), 'folder-open-o', $categories) }}
|
||||
|
||||
{{ Form::fileGroup('picture', trans_choice('general.pictures', 1)) }}
|
||||
|
||||
{{ Form::radioGroup('enabled', trans('general.enabled')) }}
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
|
||||
@permission('update-items-items')
|
||||
<div class="box-footer">
|
||||
{{ Form::saveButtons('items/items') }}
|
||||
</div>
|
||||
<!-- /.box-footer -->
|
||||
@endpermission
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('js')
|
||||
<script src="{{ asset('public/js/bootstrap-fancyfile.js') }}"></script>
|
||||
@endsection
|
||||
|
||||
@section('css')
|
||||
<link rel="stylesheet" href="{{ asset('public/css/bootstrap-fancyfile.css') }}">
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
<script type="text/javascript">
|
||||
var text_yes = '{{ trans('general.yes') }}';
|
||||
var text_no = '{{ trans('general.no') }}';
|
||||
|
||||
$(document).ready(function(){
|
||||
$("#tax_id").select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.taxes', 1)]) }}"
|
||||
});
|
||||
|
||||
$("#category_id").select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.categories', 1)]) }}"
|
||||
});
|
||||
|
||||
$('#picture').fancyfile({
|
||||
text : '{{ trans('general.form.select.file') }}',
|
||||
style : 'btn-default',
|
||||
placeholder : '<?php echo $item->picture; ?>'
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
81
resources/views/items/items/index.blade.php
Normal file
81
resources/views/items/items/index.blade.php
Normal file
@@ -0,0 +1,81 @@
|
||||
@extends('layouts.admin')
|
||||
|
||||
@section('title', trans_choice('general.items', 2))
|
||||
|
||||
@permission('create-items-items')
|
||||
@section('new_button')
|
||||
<span class="new-button"><a href="{{ url('items/items/create') }}" class="btn btn-success btn-sm"><span class="fa fa-plus"></span> {{ trans('general.add_new') }}</a></span>
|
||||
@endsection
|
||||
@endpermission
|
||||
|
||||
@section('content')
|
||||
<!-- Default box -->
|
||||
<div class="box box-success">
|
||||
<div class="box-header">
|
||||
{!! Form::open(['url' => 'items/items', 'role' => 'form', 'method' => 'GET']) !!}
|
||||
<div class="pull-left">
|
||||
<span class="title-filter">{{ trans('general.search') }}:</span>
|
||||
{!! Form::text('search', request('search'), ['class' => 'form-control input-filter input-sm', 'placeholder' => trans('general.search_placeholder')]) !!}
|
||||
{!! Form::select('category', $categories, request('category'), ['class' => 'form-control input-filter input-sm', 'placeholder' => trans('categories.all')]) !!}
|
||||
{!! Form::button('<span class="fa fa-filter"></span> ' . trans('general.filter'), ['type' => 'submit', 'class' => 'btn btn-sm btn-default btn-filter']) !!}
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<span class="title-filter">{{ trans('general.show') }}:</span>
|
||||
{!! Form::select('limit', $limits, request('limit', setting('general.list_limit', '25')), ['class' => 'form-control input-filter input-sm', 'onchange' => 'this.form.submit()']) !!}
|
||||
</div>
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
|
||||
<div class="box-body">
|
||||
<div class="table table-responsive">
|
||||
<table class="table table-bordered table-striped table-hover" id="tbl-items">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-md-1">{{ trans_choice('general.pictures', 1) }}</th>
|
||||
<th class="col-md-3">@sortablelink('name', trans('general.name'))</th>
|
||||
<th class="col-md-1">@sortablelink('category.name', trans_choice('general.categories', 1))</th>
|
||||
<th class="col-md-1">@sortablelink('quantity', trans_choice('items.quantities', 1))</th>
|
||||
<th>@sortablelink('sale_price', trans('items.sales_price'))</th>
|
||||
<th>@sortablelink('purchase_price', trans('items.purchase_price'))</th>
|
||||
<th class="col-md-1">@sortablelink('enabled', trans('general.status'))</th>
|
||||
<th class="col-md-2">{{ trans('general.actions') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($items as $item)
|
||||
<tr>
|
||||
<td><img src="{{ asset($item->picture) }}" class="img-thumbnail" width="50" alt="{{ $item->name }}"></td>
|
||||
<td><a href="{{ url('items/items/' . $item->id . '/edit') }}">{{ $item->name }}</a></td>
|
||||
<td>{{ $item->category ? $item->category->name : trans('general.na') }}</td>
|
||||
<td>{{ $item->quantity }}</td>
|
||||
<td>{{ money($item->sale_price, setting('general.default_currency'), true) }}</td>
|
||||
<td>{{ money($item->purchase_price, setting('general.default_currency'), true) }}</td>
|
||||
<td>
|
||||
@if ($item->enabled)
|
||||
<span class="label label-success">{{ trans('general.enabled') }}</span>
|
||||
@else
|
||||
<span class="label label-danger">{{ trans('general.disabled') }}</span>
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
<a href="{{ url('items/items/' . $item->id . '/edit') }}" class="btn btn-primary btn-xs"><i class="fa fa-pencil-square-o" aria-hidden="true"></i> {{ trans('general.edit') }}</a>
|
||||
@permission('delete-items-items')
|
||||
{!! Form::deleteButton($item, 'items/items') !!}
|
||||
@endpermission
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
|
||||
<div class="box-footer">
|
||||
@include('partials.admin.pagination', ['items' => $items, 'type' => 'items'])
|
||||
</div>
|
||||
<!-- /.box-footer -->
|
||||
</div>
|
||||
<!-- /.box -->
|
||||
@endsection
|
||||
16
resources/views/layouts/admin.blade.php
Normal file
16
resources/views/layouts/admin.blade.php
Normal file
@@ -0,0 +1,16 @@
|
||||
<html>
|
||||
@include('partials.admin.head')
|
||||
|
||||
<body class="hold-transition {{ setting('general.admin_theme', 'skin-green-light') }} sidebar-mini fixed">
|
||||
<!-- Site wrapper -->
|
||||
<div class="wrapper">
|
||||
@include('partials.admin.header')
|
||||
|
||||
@include('partials.admin.menu')
|
||||
|
||||
@include('partials.admin.content')
|
||||
|
||||
@include('partials.admin.footer')
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
21
resources/views/layouts/auth.blade.php
Normal file
21
resources/views/layouts/auth.blade.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<html>
|
||||
@include('partials.auth.head')
|
||||
|
||||
<body class="hold-transition login-page">
|
||||
<div class="login-box">
|
||||
<div class="login-logo">
|
||||
<img src="{{ asset('public/img/akaunting-logo-white.png') }}" alt="Akaunting" />
|
||||
</div>
|
||||
<!-- /.login-logo -->
|
||||
|
||||
<div class="login-box-body">
|
||||
<p class="login-box-msg">@yield('message')</p>
|
||||
|
||||
@include('flash::message')
|
||||
|
||||
@yield('content')
|
||||
</div>
|
||||
<!-- /.login-box-body -->
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
11
resources/views/layouts/bill.blade.php
Normal file
11
resources/views/layouts/bill.blade.php
Normal file
@@ -0,0 +1,11 @@
|
||||
<html>
|
||||
@include('partials.bill.head')
|
||||
|
||||
<body onload="window.print();">
|
||||
<!-- Content Wrapper. Contains page content -->
|
||||
<div class="wrapper" style="margin-left: 0; page-break-after: always;">
|
||||
@yield('content')
|
||||
</div>
|
||||
<!-- /.content-wrapper -->
|
||||
</body>
|
||||
</html>
|
||||
16
resources/views/layouts/customer.blade.php
Normal file
16
resources/views/layouts/customer.blade.php
Normal file
@@ -0,0 +1,16 @@
|
||||
<html>
|
||||
@include('partials.customer.head')
|
||||
|
||||
<body class="hold-transition skin-green-light sidebar-mini fixed">
|
||||
<!-- Site wrapper -->
|
||||
<div class="wrapper">
|
||||
@include('partials.customer.header')
|
||||
|
||||
@include('partials.customer.menu')
|
||||
|
||||
@include('partials.customer.content')
|
||||
|
||||
@include('partials.customer.footer')
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
62
resources/views/layouts/install.blade.php
Normal file
62
resources/views/layouts/install.blade.php
Normal file
@@ -0,0 +1,62 @@
|
||||
<html>
|
||||
@include('partials.install.head')
|
||||
|
||||
<body class="hold-transition">
|
||||
<div class="install-image"></div>
|
||||
|
||||
<div class="install-content">
|
||||
<div class="install-logo">
|
||||
<img src="{{ asset('public/img/akaunting-logo-white.png') }}" alt="Akaunting" />
|
||||
</div>
|
||||
|
||||
<div class="box box-success box-solid">
|
||||
<div class="box-header">
|
||||
<div class="col-md-12">
|
||||
<h3 class="box-title">@yield('header')</h3>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
|
||||
<div id="install-form">
|
||||
{!! Form::open(['url' => url()->current(), 'role' => 'form']) !!}
|
||||
|
||||
<div class="box-body">
|
||||
<div id="install-loading"></div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-md-12">
|
||||
@include('flash::message')
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@yield('content')
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
|
||||
<div class="box-footer">
|
||||
<div class="form-group">
|
||||
<div class="col-md-4 col-md-offset-8 text-right">
|
||||
@if (Request::is('install/requirements'))
|
||||
<a href="{{ url('install/requirements') }}" class="btn btn-success"> {{ trans('install.refresh') }} <i class="fa fa-refresh"></i></a>
|
||||
@else
|
||||
{!! Form::button(trans('install.next') . ' <i class="fa fa-arrow-right"></i>', ['type' => 'submit', 'id' => 'next-button', 'class' => 'btn btn-success']) !!}
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
$('div.alert').not('.alert-important').delay(3000).fadeOut(350);
|
||||
|
||||
$('#next-button').on('click', function() {
|
||||
$('#install-loading').html('<span class="install-loading-bar"><span class="install-loading-spin"><i class="fa fa-spinner fa-spin"></i></span></span>');
|
||||
$('.install-loading-bar').css({"height": $('#install-form').height() - 12});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
11
resources/views/layouts/invoice.blade.php
Normal file
11
resources/views/layouts/invoice.blade.php
Normal file
@@ -0,0 +1,11 @@
|
||||
<html>
|
||||
@include('partials.invoice.head')
|
||||
|
||||
<body onload="window.print();">
|
||||
<!-- Content Wrapper. Contains page content -->
|
||||
<div class="wrapper" style="margin-left: 0; page-break-after: always;">
|
||||
@yield('content')
|
||||
</div>
|
||||
<!-- /.content-wrapper -->
|
||||
</body>
|
||||
</html>
|
||||
16
resources/views/layouts/modules.blade.php
Normal file
16
resources/views/layouts/modules.blade.php
Normal file
@@ -0,0 +1,16 @@
|
||||
<html>
|
||||
@include('partials.modules.head')
|
||||
|
||||
<body class="hold-transition {{ setting('general.admin_theme', 'skin-green-light') }} sidebar-mini fixed">
|
||||
<!-- Site wrapper -->
|
||||
<div class="wrapper">
|
||||
@include('partials.admin.header')
|
||||
|
||||
@include('partials.admin.menu')
|
||||
|
||||
@include('partials.admin.content')
|
||||
|
||||
@include('partials.admin.footer')
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
37
resources/views/modules/home/index.blade.php
Normal file
37
resources/views/modules/home/index.blade.php
Normal file
@@ -0,0 +1,37 @@
|
||||
@extends('layouts.modules')
|
||||
|
||||
@section('title', trans_choice('general.modules', 2))
|
||||
|
||||
@section('content')
|
||||
@include('partials.modules.bar')
|
||||
|
||||
<div class="col-md-12 no-padding-left">
|
||||
<div class="content-header no-padding-left">
|
||||
<h3>{{ trans('modules.top_paid') }}</h3>
|
||||
</div>
|
||||
|
||||
@foreach ($paid as $module)
|
||||
@include('partials.modules.item')
|
||||
@endforeach
|
||||
</div>
|
||||
|
||||
<div class="col-md-12 no-padding-left">
|
||||
<div class="content-header no-padding-left">
|
||||
<h3>{{ trans('modules.new') }}</h3>
|
||||
</div>
|
||||
|
||||
@foreach ($new as $module)
|
||||
@include('partials.modules.item')
|
||||
@endforeach
|
||||
</div>
|
||||
|
||||
<div class="col-md-12 no-padding-left">
|
||||
<div class="content-header no-padding-left">
|
||||
<h3>{{ trans('modules.top_free') }}</h3>
|
||||
</div>
|
||||
|
||||
@foreach ($free as $module)
|
||||
@include('partials.modules.item')
|
||||
@endforeach
|
||||
</div>
|
||||
@endsection
|
||||
252
resources/views/modules/item/show.blade.php
Normal file
252
resources/views/modules/item/show.blade.php
Normal file
@@ -0,0 +1,252 @@
|
||||
@extends('layouts.modules')
|
||||
|
||||
@section('title', trans_choice('general.modules', 2))
|
||||
|
||||
@section('content')
|
||||
@include('partials.modules.bar')
|
||||
|
||||
<div class="col-md-12 no-padding-left">
|
||||
<div class="col-md-8 no-padding-left">
|
||||
<div class="content-header no-padding-left">
|
||||
<h3>{{ $module->name }}</h3>
|
||||
</div>
|
||||
|
||||
<div class="box box-success">
|
||||
<div class="box-body">
|
||||
<div>
|
||||
<img src="{{ $module->cover->path_string }}" class="item-image" alt="{{ $module->name }}" width="800" height="140"/>
|
||||
</div>
|
||||
<div class="nav-tabs-custom">
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active"><a href="#description" data-toggle="tab" aria-expanded="true">{{ trans('general.description') }}</a></li>
|
||||
<li class=""><a href="#faq" data-toggle="tab" aria-expanded="false">{{ trans('modules.faq') }}</a></li>
|
||||
<li class=""><a href="#changelog" data-toggle="tab" aria-expanded="false">{{ trans('modules.changelog') }}</a></li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane active" id="description">
|
||||
{!! $module->description !!}
|
||||
</div>
|
||||
<!-- /.tab-pane -->
|
||||
<div class="tab-pane" id="faq">
|
||||
{!! $module->faq !!}
|
||||
</div>
|
||||
<!-- /.tab-pane -->
|
||||
<div class="tab-pane" id="changelog">
|
||||
{!! $module->changelog !!}
|
||||
</div>
|
||||
<!-- /.tab-pane -->
|
||||
</div>
|
||||
<!-- /.tab-content -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
</div>
|
||||
<!-- /.box -->
|
||||
</div>
|
||||
|
||||
<div class="col-md-4 no-padding-right">
|
||||
<div class="content-header no-padding-left">
|
||||
<h3>Action</h3>
|
||||
</div>
|
||||
|
||||
<div class="box box-success">
|
||||
<div class="box-body">
|
||||
<table class="table table-striped">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>Price</th>
|
||||
<td>
|
||||
@if ($module->price == '0.0000')
|
||||
{{ trans('modules.free') }}
|
||||
@else
|
||||
{{ $module->price }}
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
|
||||
<div class="box-footer">
|
||||
@if ($installed)
|
||||
<a href="{{ url('modules/item/' . $module->slug . '/uninstall') }}" class="btn btn-block btn-danger">{{ trans('modules.button.uninstall') }}</a>
|
||||
@if ($enable)
|
||||
<a href="{{ url('modules/item/' . $module->slug . '/disabled') }}" class="btn btn-block btn-warning">{{ trans('modules.button.disable') }}</a>
|
||||
@else
|
||||
<a href="{{ url('modules/item/' . $module->slug . '/enabled') }}" class="btn btn-block btn-success">{{ trans('modules.button.enable') }}</a>
|
||||
@endif
|
||||
@else
|
||||
<a href="{{ $module->action_url }}" class="btn btn-success btn-block" <?php echo ($module->install) ? 'id="install-module"' : 'target="_blank"'; ?>>
|
||||
@if ($module->install)
|
||||
{{ trans('modules.install') }}
|
||||
@else
|
||||
{{ trans('modules.buy_now') }}
|
||||
@endif
|
||||
</a>
|
||||
@endif
|
||||
</div>
|
||||
<!-- /.box-footer -->
|
||||
</div>
|
||||
<!-- /.box -->
|
||||
|
||||
<div class="content-header no-padding-left">
|
||||
<h3>About</h3>
|
||||
</div>
|
||||
|
||||
<div class="box box-success">
|
||||
<div class="box-body">
|
||||
<table class="table table-striped">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>Vendor</th>
|
||||
<td><a href="{{ url('modules/vendor/' . $module->vendor->id) }}">{{ $module->vendor->first_name . ' ' . $module->vendor->last_name }}</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Version</th>
|
||||
<td>{{ $module->version }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Added</th>
|
||||
<td>{{ Date::parse($module->created_at)->format($date_format) }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Updated</th>
|
||||
<td>{{ Date::parse($module->updated_at)->diffForHumans() }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Compatibility</th>
|
||||
<td>{{ $module->compatibility }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Category</th>
|
||||
<td><a href="{{ url('modules/category/' . $module->category->slug) }}">{{ $module->category->name }}</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
</div>
|
||||
<!-- /.box -->
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('js')
|
||||
<script type="text/javascript">
|
||||
var step = new Array();
|
||||
var total = 0;
|
||||
var path = '';
|
||||
|
||||
$(document).ready(function() {
|
||||
$('#install-module').on('click', function(e) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
|
||||
path = $(this).attr('href');
|
||||
|
||||
startInstallation();
|
||||
|
||||
$.ajax({
|
||||
url: '{{ url("modules/item/steps") }}',
|
||||
type: 'post',
|
||||
dataType: 'json',
|
||||
data: {name: '{{ $module->name }}', version: '{{ $module->version }}'},
|
||||
headers: { 'X-CSRF-TOKEN': '{{ csrf_token() }}' },
|
||||
success: function(json) {
|
||||
if (json['errorr']) {
|
||||
$('#progress-bar').addClass('progress-bar-danger');
|
||||
$('#progress-text').html('<div class="text-danger">' + json['error'] + '</div>');
|
||||
}
|
||||
|
||||
if (json['step']) {
|
||||
step = json['step'];
|
||||
total = step.length;
|
||||
|
||||
next();
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
function next() {
|
||||
data = step.shift();
|
||||
|
||||
if (data) {
|
||||
$('#progress-bar').css('width', (100 - (step.length / total) * 100) + '%');
|
||||
$('#progress-text').html('<span class="text-info">' + data['text'] + '</span>');
|
||||
|
||||
setTimeout(function() {
|
||||
$.ajax({
|
||||
url: data.url,
|
||||
type: 'post',
|
||||
dataType: 'json',
|
||||
data: {path: path, version: '{{ $module->version }}'},
|
||||
headers: { 'X-CSRF-TOKEN': '{{ csrf_token() }}' },
|
||||
success: function(json) {
|
||||
if (json['errors']) {
|
||||
$('#progress-bar').addClass('progress-bar-danger');
|
||||
$('#progress-text').html('<div class="text-danger">' + json['errors'] + '</div>');
|
||||
}
|
||||
|
||||
if (json['success']) {
|
||||
$('#progress-bar').removeClass('progress-bar-danger');
|
||||
$('#progress-bar').addClass('progress-bar-success');
|
||||
}
|
||||
|
||||
if (json['data']['path']) {
|
||||
path = json['data']['path'];
|
||||
}
|
||||
|
||||
if (!json['errors'] && !json['installed']) {
|
||||
next();
|
||||
}
|
||||
|
||||
if (json['installed']) {
|
||||
window.location = '{{ url("modules/item/" . $module->slug) }}';
|
||||
}
|
||||
},
|
||||
error: function(xhr, ajaxOptions, thrownError) {
|
||||
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
|
||||
}
|
||||
});
|
||||
}, 800);
|
||||
}
|
||||
}
|
||||
|
||||
function startInstallation() {
|
||||
$('#modal-installation').remove();
|
||||
|
||||
modal = '<div class="modal fade" id="modal-installation" style="display: none;">';
|
||||
modal += ' <div class="modal-dialog">';
|
||||
modal += ' <div class="modal-content">';
|
||||
modal += ' <div class="modal-header">';
|
||||
modal += ' <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>';
|
||||
modal += ' <h4 class="modal-title">{{ trans('modules.installation.header') }}</h4>';
|
||||
modal += ' </div>';
|
||||
modal += ' <div class="modal-body">';
|
||||
modal += ' <p><span class="message">{{ trans("modules.installation.start", ['module' => $module->name]) }}</span></p>';
|
||||
modal += ' <p></p>';
|
||||
modal += ' <p>';
|
||||
modal += ' <div class="progress">';
|
||||
modal += ' <div id="progress-bar" class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width: 0%">';
|
||||
modal += ' <span class="sr-only">{{ trans('modules.installation.start', ['module' => $module->name]) }}</span>';
|
||||
modal += ' </div>';
|
||||
modal += ' </div>';
|
||||
modal += ' <div id="progress-text"></div>';
|
||||
modal += ' </p>';
|
||||
modal += ' </div>';
|
||||
modal += ' <div class="modal-footer">';
|
||||
modal += ' <button type="button" class="btn btn-default pull-left" data-dismiss="modal">Close</button>';
|
||||
modal += ' </div>';
|
||||
modal += ' </div>';
|
||||
modal += ' </div>';
|
||||
modal += '</div>';
|
||||
|
||||
$('body').append(modal);
|
||||
|
||||
$('#modal-installation').modal('show');
|
||||
}
|
||||
</script>
|
||||
@endsection
|
||||
17
resources/views/modules/tiles/index.blade.php
Normal file
17
resources/views/modules/tiles/index.blade.php
Normal file
@@ -0,0 +1,17 @@
|
||||
@extends('layouts.modules')
|
||||
|
||||
@section('title', trans_choice('general.modules', 2))
|
||||
|
||||
@section('content')
|
||||
@include('partials.modules.bar')
|
||||
|
||||
<div class="col-md-12 no-padding-left">
|
||||
<div class="content-header no-padding-left">
|
||||
<h3>{{ $title }}</h3>
|
||||
</div>
|
||||
|
||||
@foreach ($modules as $module)
|
||||
@include('partials.modules.item')
|
||||
@endforeach
|
||||
</div>
|
||||
@endsection
|
||||
33
resources/views/modules/token/create.blade.php
Normal file
33
resources/views/modules/token/create.blade.php
Normal file
@@ -0,0 +1,33 @@
|
||||
@extends('layouts.modules')
|
||||
|
||||
@section('title', trans_choice('general.modules', 2))
|
||||
|
||||
@section('content')
|
||||
<div class="box box-success">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ trans('modules.enter_api_token') }}</h3>
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
|
||||
<!-- form start -->
|
||||
{!! Form::open(['url' => 'modules/token', 'files' => true, 'role' => 'form']) !!}
|
||||
|
||||
<div class="box-body">
|
||||
<div class="form-group required {{ $errors->has('api_token') ? 'has-error' : ''}}">
|
||||
{!! Form::label('sale_price', trans('modules.api_token'), ['class' => 'control-label']) !!}
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon"><i class="fa fa-key"></i></span>
|
||||
{!! Form::text('api_token', null, ['class' => 'form-control', 'required' => 'required', 'placeholder' => trans('general.form.enter', ['field' => trans('modules.api_token')])]) !!}
|
||||
</div>
|
||||
{!! $errors->first('api_token', '<p class="help-block">:message</p>') !!}
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
|
||||
<div class="box-footer">
|
||||
{{ Form::saveButtons('modules/token') }}
|
||||
</div>
|
||||
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
@endsection
|
||||
23
resources/views/partials/admin/content.blade.php
Normal file
23
resources/views/partials/admin/content.blade.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<!-- Content Wrapper. Contains page content -->
|
||||
<div class="content-wrapper">
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header content-center">
|
||||
<h1>
|
||||
@yield('title')
|
||||
@yield('new_button')
|
||||
</h1>
|
||||
</section>
|
||||
|
||||
<!-- Main content -->
|
||||
<section class="content content-center">
|
||||
@include('flash::message')
|
||||
|
||||
@yield('content')
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<!-- /.content-wrapper -->
|
||||
|
||||
<script type="text/javascript">
|
||||
$('div.alert').not('.alert-important').delay(3000).fadeOut(350);
|
||||
</script>
|
||||
6
resources/views/partials/admin/footer.blade.php
Normal file
6
resources/views/partials/admin/footer.blade.php
Normal file
@@ -0,0 +1,6 @@
|
||||
<footer class="main-footer">
|
||||
<div class="pull-right hidden-xs">
|
||||
<b>{{ trans('footer.version') }}</b> {{ version('short') }}
|
||||
</div>
|
||||
<strong>{{ trans('footer.powered') }}</strong>: <a href="https://akaunting.com">{{ trans('footer.software') }}</a>
|
||||
</footer>
|
||||
68
resources/views/partials/admin/head.blade.php
Normal file
68
resources/views/partials/admin/head.blade.php
Normal file
@@ -0,0 +1,68 @@
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<!-- Tell the browser to be responsive to screen width -->
|
||||
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
|
||||
|
||||
<title>@yield('title') - @setting('general.company_name')</title>
|
||||
|
||||
<!-- Tell the browser to be responsive to screen width -->
|
||||
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
|
||||
<!-- Bootstrap 3.3.6 -->
|
||||
<link rel="stylesheet" href="{{ asset('vendor/almasaeed2010/adminlte/bootstrap/css/bootstrap.min.css') }}">
|
||||
<!-- Font Awesome -->
|
||||
<link rel="stylesheet" href="{{ asset('public/css/font-awesome.min.css') }}">
|
||||
<!-- Ionicons -->
|
||||
<link rel="stylesheet" href="{{ asset('public/css/ionicons.min.css') }}">
|
||||
<!-- Theme style -->
|
||||
<link rel="stylesheet" href="{{ asset('vendor/almasaeed2010/adminlte/dist/css/AdminLTE.min.css') }}">
|
||||
<!-- AdminLTE Skins -->
|
||||
@if (setting('general.admin_theme', 'skin-green-light') == 'skin-green-light')
|
||||
<link rel="stylesheet" href="{{ asset('vendor/almasaeed2010/adminlte/dist/css/skins/skin-green-light.min.css') }}">
|
||||
@else
|
||||
<link rel="stylesheet" href="{{ asset('vendor/almasaeed2010/adminlte/dist/css/skins/skin-black.min.css') }}">
|
||||
<link rel="stylesheet" href="{{ asset('public/css/skin-black.css?v=1.0') }}">
|
||||
@endif
|
||||
<!-- Select2 -->
|
||||
<link rel="stylesheet" href="{{ asset('vendor/almasaeed2010/adminlte/plugins/select2/select2.min.css') }}">
|
||||
<!-- App style -->
|
||||
<link rel="stylesheet" href="{{ asset('public/css/app.css?v=1.0') }}">
|
||||
<link rel="stylesheet" href="{{ asset('public/css/akaunting-green.css?v=1.0') }}">
|
||||
|
||||
<link rel="shortcut icon" href="{{ asset('public/img/favicon.ico') }}">
|
||||
|
||||
@yield('css')
|
||||
|
||||
@yield('stylesheet')
|
||||
|
||||
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
|
||||
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
|
||||
<!--[if lt IE 9]>
|
||||
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
|
||||
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
|
||||
<!-- jQuery 2.2.3 -->
|
||||
<script src="{{ asset('vendor/almasaeed2010/adminlte/plugins/jQuery/jquery-2.2.3.min.js') }}"></script>
|
||||
<!-- Bootstrap 3.3.6 -->
|
||||
<script src="{{ asset('vendor/almasaeed2010/adminlte/bootstrap/js/bootstrap.min.js') }}"></script>
|
||||
<!-- SlimScroll -->
|
||||
<script src="{{ asset('vendor/almasaeed2010/adminlte/plugins/slimScroll/jquery.slimscroll.min.js') }}"></script>
|
||||
<!-- FastClick -->
|
||||
<script src="{{ asset('vendor/almasaeed2010/adminlte/plugins/fastclick/fastclick.js') }}"></script>
|
||||
<!-- AdminLTE App -->
|
||||
<script src="{{ asset('vendor/almasaeed2010/adminlte/dist/js/app.min.js') }}"></script>
|
||||
|
||||
<!-- Select2 -->
|
||||
<script src="{{ asset('vendor/almasaeed2010/adminlte/plugins/select2/select2.min.js') }}"></script>
|
||||
|
||||
<script src="{{ asset('public/js/app.js?v=1.0') }}"></script>
|
||||
|
||||
<script type="text/javascript"><!--
|
||||
var url_search = '{{ url("search/search/search") }}';
|
||||
//--></script>
|
||||
|
||||
@yield('js')
|
||||
|
||||
@yield('scripts')
|
||||
</head>
|
||||
214
resources/views/partials/admin/header.blade.php
Normal file
214
resources/views/partials/admin/header.blade.php
Normal file
@@ -0,0 +1,214 @@
|
||||
<header class="main-header">
|
||||
<!-- Logo -->
|
||||
<a href="#" class="logo">
|
||||
@if (setting('general.admin_theme', 'skin-green-light') == 'skin-green-light')
|
||||
<!-- mini logo for sidebar mini 50x50 pixels -->
|
||||
<span class="logo-mini"><img src="{{ asset('public/img/akaunting-logo-white.png') }}" class="logo-image-mini" width="25" alt="Akaunting Logo"></span>
|
||||
<!-- logo for regular state and mobile devices -->
|
||||
<span class="logo-lg"><img src="{{ asset('public/img/akaunting-logo-white.png') }}" class="logo-image-lg" width="25" alt="Akaunting Logo"> <b>Akaunting</b></span>
|
||||
@else
|
||||
<!-- mini logo for sidebar mini 50x50 pixels -->
|
||||
<span class="logo-mini"><img src="{{ asset('public/img/akaunting-logo-green.png') }}" class="logo-image-mini" width="25" alt="Akaunting Logo"></span>
|
||||
<!-- logo for regular state and mobile devices -->
|
||||
<span class="logo-lg"><img src="{{ asset('public/img/akaunting-logo-green.png') }}" class="logo-image-lg" width="25" alt="Akaunting Logo"> <b>Akaunting</b></span>
|
||||
@endif
|
||||
</a>
|
||||
<!-- Header Navbar: style can be found in header.less -->
|
||||
<nav class="navbar navbar-static-top">
|
||||
<!-- Sidebar toggle button-->
|
||||
<a href="#" class="sidebar-toggle" data-toggle="offcanvas" role="button">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</a>
|
||||
<ul class="add-new nav navbar-nav pull-left">
|
||||
<!-- Notifications: style can be found in dropdown.less -->
|
||||
<li class="dropdown add-new-menu">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
|
||||
<i class="fa fa-plus"></i>
|
||||
</a>
|
||||
<div class="dropdown-menu">
|
||||
<ul class="list-inline">
|
||||
<li>
|
||||
<ul class="list-unstyled">
|
||||
<li class="header"><i class="fa fa-money"></i> <span style="font-weight: 600;">{{ trans_choice('general.incomes', 1) }}</span></li>
|
||||
<li>
|
||||
<ul class="menu">
|
||||
@permission('create-incomes-invoices')
|
||||
<li><a href="{{ url('incomes/invoices/create') }}">{{ trans_choice('general.invoices', 1) }}</a></li>
|
||||
@endpermission
|
||||
@permission('create-incomes-revenues')
|
||||
<li><a href="{{ url('incomes/revenues/create') }}">{{ trans_choice('general.revenues', 1) }}</a></li>
|
||||
@endpermission
|
||||
@permission('create-incomes-customers')
|
||||
<li><a href="{{ url('incomes/customers/create') }}">{{ trans_choice('general.customers', 1) }}</a></li>
|
||||
@endpermission
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<ul class="list-unstyled">
|
||||
<li class="header"><i class="fa fa-shopping-cart"></i> <span style="font-weight: 600;">{{ trans_choice('general.expenses', 1) }}</span></li>
|
||||
<li>
|
||||
<ul class="menu">
|
||||
@permission('create-expenses-bills')
|
||||
<li><a href="{{ url('expenses/bills/create') }}">{{ trans_choice('general.bills', 1) }}</a></li>
|
||||
@endpermission
|
||||
@permission('create-expenses-payments')
|
||||
<li><a href="{{ url('expenses/payments/create') }}">{{ trans_choice('general.payments', 1) }}</a></li>
|
||||
@endpermission
|
||||
@permission('create-expenses-vendors')
|
||||
<li><a href="{{ url('expenses/vendors/create') }}">{{ trans_choice('general.vendors', 1) }}</a></li>
|
||||
@endpermission
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<ul class="list-unstyled">
|
||||
<li class="header"><i class="fa fa-university"></i> <span style="font-weight: 600;">{{ trans('general.banking') }}</span></li>
|
||||
<li>
|
||||
<ul class="menu">
|
||||
@permission('create-banking-accounts')
|
||||
<li><a href="{{ url('banking/accounts/create') }}">{{ trans_choice('general.accounts', 1) }}</a></li>
|
||||
@endpermission
|
||||
@permission('create-banking-transfers')
|
||||
<li><a href="{{ url('banking/transfers/create') }}">{{ trans_choice('general.transfers', 1) }}</a></li>
|
||||
@endpermission
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="navbar-custom-menu">
|
||||
<ul class="nav navbar-nav">
|
||||
@permission('read-notifications')
|
||||
<!-- Notifications: style can be found in dropdown.less -->
|
||||
<li class="dropdown notifications-menu">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
|
||||
<i class="fa fa-bell-o"></i>
|
||||
@if ($notifications)
|
||||
<span class="label label-warning">{{ $notifications }}</span>
|
||||
@endif
|
||||
</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li class="header">{{ trans_choice('header.notifications.counter', count($notifications), ['count' => count($notifications)]) }}</li>
|
||||
<li>
|
||||
<!-- inner menu: contains the actual data -->
|
||||
<ul class="menu">
|
||||
@if (count($bills))
|
||||
<li>
|
||||
<a href="{{ url('auth/users/' . $user->id . '/read-bills') }}">
|
||||
<i class="fa fa-shopping-cart text-red"></i> {{ trans_choice('header.notifications.upcoming_bills', count($bills), ['count' => count($bills)]) }}
|
||||
</a>
|
||||
</li>
|
||||
@endif
|
||||
@if (count($invoices))
|
||||
<li>
|
||||
<a href="{{ url('auth/users/' . $user->id . '/read-invoices') }}">
|
||||
<i class="fa fa-money text-green"></i> {{ trans_choice('header.notifications.overdue_invoices', count($invoices), ['count' => count($invoices)]) }}
|
||||
</a>
|
||||
</li>
|
||||
@endif
|
||||
</ul>
|
||||
</li>
|
||||
<li class="footer"><a href="#">{{ trans('header.notifications.view_all') }}</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
@endpermission
|
||||
<!-- Tasks: style can be found in dropdown.less -->
|
||||
<li class="dropdown tasks-menu">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
|
||||
<i class="fa fa-flag-o"></i>
|
||||
</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li class="header">{{ trans('header.change_language') }}</li>
|
||||
<li>
|
||||
<!-- inner menu: contains the actual data -->
|
||||
{!! language()->flags() !!}
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
@permission('read-install-updates')
|
||||
<!-- Updates: style can be found in dropdown.less -->
|
||||
<li>
|
||||
<a href="{{ url('install/updates') }}" title="{{ $updates }} Updates Available">
|
||||
<i class="fa fa-refresh"></i>
|
||||
</a>
|
||||
</li>
|
||||
@endpermission
|
||||
<!-- Updates: style can be found in dropdown.less -->
|
||||
<li class="hidden-xs">
|
||||
<a href="{{ url('https://akaunting.com/docs') }}" target="_blank" title="{{ trans('general.help') }}">
|
||||
<i class="fa fa-life-ring"></i>
|
||||
</a>
|
||||
</li>
|
||||
<!-- User Account: style can be found in dropdown.less -->
|
||||
<li class="dropdown user user-menu">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
|
||||
@if ($user->picture)
|
||||
<img src="{{ asset($user->picture) }}" class="user-image" alt="User Image">
|
||||
@else
|
||||
<i class="fa fa-user-o"></i>
|
||||
@endif
|
||||
@if (!empty($user->name))
|
||||
<span class="hidden-xs">{{ $user->name }}</span>
|
||||
@endif
|
||||
</a>
|
||||
<ul class="dropdown-menu">
|
||||
<!-- User image -->
|
||||
<li class="user-header">
|
||||
@if ($user->picture)
|
||||
<img src="{{ asset($user->picture) }}" class="img-circle" alt="User Image">
|
||||
@else
|
||||
<i class="fa fa-4 fa-user-o" style="color: #fff; font-size: 7em;"></i>
|
||||
@endif
|
||||
<p>
|
||||
{{ $user->name }}
|
||||
<small>{{ trans('header.last_login', ['time' => $user->last_logged_in_at]) }}</small>
|
||||
</p>
|
||||
</li>
|
||||
<!-- Menu Body -->
|
||||
<li class="user-body">
|
||||
<div class="row">
|
||||
@permission('read-auth-users')
|
||||
<div class="col-xs-4 text-center">
|
||||
<a href="{{ url('auth/users') }}">{{ trans_choice('general.users', 2) }}</a>
|
||||
</div>
|
||||
@endpermission
|
||||
@permission('read-auth-roles')
|
||||
<div class="col-xs-4 text-center">
|
||||
<a href="{{ url('auth/roles') }}">{{ trans_choice('general.roles', 2) }}</a>
|
||||
</div>
|
||||
@endpermission
|
||||
@permission('read-auth-permissions')
|
||||
<div class="col-xs-4 text-center">
|
||||
<a href="{{ url('auth/permissions') }}">{{ trans_choice('general.permissions', 2) }}</a>
|
||||
</div>
|
||||
@endpermission
|
||||
</div>
|
||||
<!-- /.row -->
|
||||
</li>
|
||||
<!-- Menu Footer-->
|
||||
<li class="user-footer">
|
||||
@permission('read-auth-profile')
|
||||
<div class="pull-left">
|
||||
<a href="{{ url('auth/users/' . $user->id . '/edit') }}" class="btn btn-default btn-flat">{{ trans('auth.profile') }}</a>
|
||||
</div>
|
||||
@endpermission
|
||||
<div class="pull-right">
|
||||
<a href="{{ url('auth/logout') }}" class="btn btn-default btn-flat">{{ trans('auth.logout') }}</a>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
</header>
|
||||
39
resources/views/partials/admin/menu.blade.php
Normal file
39
resources/views/partials/admin/menu.blade.php
Normal file
@@ -0,0 +1,39 @@
|
||||
<aside class="main-sidebar">
|
||||
<!-- sidebar: style can be found in sidebar.less -->
|
||||
<section class="sidebar">
|
||||
<!-- Sidebar user panel -->
|
||||
<div class="user-panel">
|
||||
<div class="pull-left image">
|
||||
<img src="{{ asset(setting('general.company_logo', 'public/img/company.png')) }}" class="img-circle" alt="@setting('general.company_name')">
|
||||
</div>
|
||||
<div class="pull-left info">
|
||||
<p>{{ str_limit(setting('general.company_name'), 22) }}</p>
|
||||
@permission('read-companies-companies')
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><span class="caret"></span> {{ trans('general.change') }}</a>
|
||||
<ul class="dropdown-menu">
|
||||
@foreach($companies as $com)
|
||||
<li><a href="{{ url('companies/companies/'. $com->id .'/set') }}">{{ str_limit($com->company_name, 20) }}</a></li>
|
||||
@endforeach
|
||||
@permission('update-companies-companies')
|
||||
<li role="separator" class="divider"></li>
|
||||
<li><a href="{{ url('companies/companies') }}">{{ trans('companies.manage') }}</a></li>
|
||||
@endpermission
|
||||
</ul>
|
||||
@endpermission
|
||||
</div>
|
||||
</div>
|
||||
<!-- search form -->
|
||||
<form action="#" method="get" id="form-search" class="sidebar-form">
|
||||
<div id="search" class="input-group">
|
||||
<input type="text" name="search" value="<?php //echo $search; ?>" id="input-search" class="form-control" placeholder="Search...">
|
||||
<span class="input-group-btn">
|
||||
<button type="submit" name="search" id="search-btn" class="btn btn-flat"><i class="fa fa-search"></i></button>
|
||||
</span>
|
||||
</div>
|
||||
</form>
|
||||
<!-- /.search form -->
|
||||
<!-- sidebar menu: : style can be found in sidebar.less -->
|
||||
{!! Menu::get('AdminMenu') !!}
|
||||
</section>
|
||||
<!-- /.sidebar -->
|
||||
</aside>
|
||||
12
resources/views/partials/admin/pagination.blade.php
Normal file
12
resources/views/partials/admin/pagination.blade.php
Normal file
@@ -0,0 +1,12 @@
|
||||
@if ($items->firstItem())
|
||||
<div class="pull-left" style="margin-top: 7px;">
|
||||
<small>{{ trans('pagination.showing', ['first' => $items->firstItem(), 'last' => $items->lastItem(), 'total' => $items->total(), 'type' => strtolower(trans_choice('general.' . $type, 2))]) }}</small>
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
{!! $items->appends(request()->except('page'))->links() !!}
|
||||
</div>
|
||||
@else
|
||||
<div class="pull-left">
|
||||
<small>{{ trans('general.no_records') }}</small>
|
||||
</div>
|
||||
@endif
|
||||
52
resources/views/partials/auth/head.blade.php
Normal file
52
resources/views/partials/auth/head.blade.php
Normal file
@@ -0,0 +1,52 @@
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<!-- Tell the browser to be responsive to screen width -->
|
||||
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
|
||||
|
||||
<title>@yield('title') - @setting('general.company_name')</title>
|
||||
|
||||
<!-- Tell the browser to be responsive to screen width -->
|
||||
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
|
||||
<!-- Bootstrap 3.3.6 -->
|
||||
<link rel="stylesheet" href="{{ asset('vendor/almasaeed2010/adminlte/bootstrap/css/bootstrap.min.css') }}">
|
||||
<!-- Font Awesome -->
|
||||
<link rel="stylesheet" href="{{ asset('public/css/font-awesome.min.css') }}">
|
||||
<!-- Ionicons -->
|
||||
<link rel="stylesheet" href="{{ asset('public/css/ionicons.min.css') }}">
|
||||
<!-- Theme style -->
|
||||
<link rel="stylesheet" href="{{ asset('vendor/almasaeed2010/adminlte/dist/css/AdminLTE.min.css') }}">
|
||||
<!-- AdminLTE Skins -->
|
||||
<link rel="stylesheet" href="{{ asset('vendor/almasaeed2010/adminlte/dist/css/skins/skin-green-light.min.css') }}">
|
||||
<!-- App style -->
|
||||
<link rel="stylesheet" href="{{ asset('public/css/app.css') }}">
|
||||
<link rel="stylesheet" href="{{ asset('public/css/akaunting-green.css') }}">
|
||||
|
||||
<link rel="shortcut icon" href="{{ asset('public/img/favicon.ico') }}">
|
||||
|
||||
@yield('css')
|
||||
|
||||
@yield('stylesheet')
|
||||
|
||||
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
|
||||
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
|
||||
<!--[if lt IE 9]>
|
||||
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
|
||||
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
|
||||
<!-- jQuery 2.2.3 -->
|
||||
<script src="{{ asset('vendor/almasaeed2010/adminlte/plugins/jQuery/jquery-2.2.3.min.js') }}"></script>
|
||||
<!-- Bootstrap 3.3.6 -->
|
||||
<script src="{{ asset('vendor/almasaeed2010/adminlte/bootstrap/js/bootstrap.min.js') }}"></script>
|
||||
<!-- SlimScroll -->
|
||||
<script src="{{ asset('vendor/almasaeed2010/adminlte/plugins/slimScroll/jquery.slimscroll.min.js') }}"></script>
|
||||
<!-- AdminLTE App -->
|
||||
<script src="{{ asset('vendor/almasaeed2010/adminlte/dist/js/app.min.js') }}"></script>
|
||||
|
||||
<script src="{{ asset('public/js/app.js') }}"></script>
|
||||
|
||||
@yield('js')
|
||||
|
||||
@yield('scripts')
|
||||
</head>
|
||||
50
resources/views/partials/bill/head.blade.php
Normal file
50
resources/views/partials/bill/head.blade.php
Normal file
@@ -0,0 +1,50 @@
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<!-- Tell the browser to be responsive to screen width -->
|
||||
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
|
||||
|
||||
<title>@yield('title') - @setting('general.company_name')</title>
|
||||
|
||||
<!-- Tell the browser to be responsive to screen width -->
|
||||
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
|
||||
<!-- Bootstrap 3.3.6 -->
|
||||
<link rel="stylesheet" href="{{ asset('vendor/almasaeed2010/adminlte/bootstrap/css/bootstrap.min.css') }}">
|
||||
<!-- Font Awesome -->
|
||||
<link rel="stylesheet" href="{{ asset('public/css/font-awesome.min.css') }}">
|
||||
<!-- Ionicons -->
|
||||
<link rel="stylesheet" href="{{ asset('public/css/ionicons.min.css') }}">
|
||||
<!-- Theme style -->
|
||||
<link rel="stylesheet" href="{{ asset('vendor/almasaeed2010/adminlte/dist/css/AdminLTE.min.css') }}">
|
||||
<!-- AdminLTE Skins. Choose a skin from the css/skins
|
||||
folder instead of downloading all of them to reduce the load. -->
|
||||
<link rel="stylesheet" href="{{ asset('vendor/almasaeed2010/adminlte/dist/css/skins/_all-skins.min.css') }}">
|
||||
<!-- App style -->
|
||||
<link rel="stylesheet" href="{{ asset('public/css/app.css') }}">
|
||||
|
||||
@yield('css')
|
||||
|
||||
@yield('stylesheet')
|
||||
|
||||
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
|
||||
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
|
||||
<!--[if lt IE 9]>
|
||||
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
|
||||
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
|
||||
<!-- jQuery 2.2.3 -->
|
||||
<script src="{{ asset('vendor/almasaeed2010/adminlte/plugins/jQuery/jquery-2.2.3.min.js') }}"></script>
|
||||
<!-- Bootstrap 3.3.6 -->
|
||||
<script src="{{ asset('vendor/almasaeed2010/adminlte/bootstrap/js/bootstrap.min.js') }}"></script>
|
||||
<!-- SlimScroll -->
|
||||
<script src="{{ asset('vendor/almasaeed2010/adminlte/plugins/slimScroll/jquery.slimscroll.min.js') }}"></script>
|
||||
<!-- AdminLTE App -->
|
||||
<script src="{{ asset('vendor/almasaeed2010/adminlte/dist/js/app.min.js') }}"></script>
|
||||
|
||||
<script src="{{ asset('public/js/app.js') }}"></script>
|
||||
|
||||
@yield('js')
|
||||
|
||||
@yield('scripts')
|
||||
</head>
|
||||
23
resources/views/partials/customer/content.blade.php
Normal file
23
resources/views/partials/customer/content.blade.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<!-- Content Wrapper. Contains page content -->
|
||||
<div class="content-wrapper">
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header content-center">
|
||||
<h1>
|
||||
@yield('title')
|
||||
@yield('new_button')
|
||||
</h1>
|
||||
</section>
|
||||
|
||||
<!-- Main content -->
|
||||
<section class="content content-center">
|
||||
@include('flash::message')
|
||||
|
||||
@yield('content')
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<!-- /.content-wrapper -->
|
||||
|
||||
<script type="text/javascript">
|
||||
$('div.alert').not('.alert-important').delay(3000).fadeOut(350);
|
||||
</script>
|
||||
3
resources/views/partials/customer/footer.blade.php
Normal file
3
resources/views/partials/customer/footer.blade.php
Normal file
@@ -0,0 +1,3 @@
|
||||
<footer class="main-footer">
|
||||
<strong>{{ trans('footer.powered') }}</strong>: <a href="https://akaunting.com">{{ trans('footer.software') }}</a>
|
||||
</footer>
|
||||
74
resources/views/partials/customer/head.blade.php
Normal file
74
resources/views/partials/customer/head.blade.php
Normal file
@@ -0,0 +1,74 @@
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<!-- Tell the browser to be responsive to screen width -->
|
||||
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
|
||||
|
||||
<title>@yield('title') - @setting('general.company_name')</title>
|
||||
|
||||
<!-- Tell the browser to be responsive to screen width -->
|
||||
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
|
||||
<!-- Bootstrap 3.3.6 -->
|
||||
<link rel="stylesheet" href="{{ asset('vendor/almasaeed2010/adminlte/bootstrap/css/bootstrap.min.css') }}">
|
||||
<!-- Font Awesome -->
|
||||
<link rel="stylesheet" href="{{ asset('public/css/font-awesome.min.css') }}">
|
||||
<!-- Ionicons -->
|
||||
<link rel="stylesheet" href="{{ asset('public/css/ionicons.min.css') }}">
|
||||
<!-- Theme style -->
|
||||
<link rel="stylesheet" href="{{ asset('vendor/almasaeed2010/adminlte/dist/css/AdminLTE.min.css') }}">
|
||||
<!-- AdminLTE Skins -->
|
||||
@if (setting('general.admin_theme', 'skin-green-light') == 'skin-green-light')
|
||||
<link rel="stylesheet" href="{{ asset('vendor/almasaeed2010/adminlte/dist/css/skins/skin-green-light.min.css') }}">
|
||||
@else
|
||||
<link rel="stylesheet" href="{{ asset('vendor/almasaeed2010/adminlte/dist/css/skins/skin-black.min.css') }}">
|
||||
<link rel="stylesheet" href="{{ asset('public/css/skin-black.css') }}">
|
||||
@endif
|
||||
<!-- Data Tables -->
|
||||
<link rel="stylesheet" href="{{ asset('vendor/almasaeed2010/adminlte/plugins/datatables/dataTables.bootstrap.css') }}">
|
||||
<!-- App style -->
|
||||
<link rel="stylesheet" href="{{ asset('public/css/app.css') }}">
|
||||
<link rel="stylesheet" href="{{ asset('public/css/akaunting-green.css') }}">
|
||||
|
||||
<!-- Select2 -->
|
||||
<link rel="stylesheet" href="{{ asset('vendor/almasaeed2010/adminlte/plugins/select2/select2.min.css') }}">
|
||||
|
||||
<link rel="shortcut icon" href="{{ asset('public/img/favicon.ico') }}">
|
||||
|
||||
@yield('css')
|
||||
|
||||
@yield('stylesheet')
|
||||
|
||||
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
|
||||
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
|
||||
<!--[if lt IE 9]>
|
||||
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
|
||||
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
|
||||
<!-- jQuery 2.2.3 -->
|
||||
<script src="{{ asset('vendor/almasaeed2010/adminlte/plugins/jQuery/jquery-2.2.3.min.js') }}"></script>
|
||||
<!-- Bootstrap 3.3.6 -->
|
||||
<script src="{{ asset('vendor/almasaeed2010/adminlte/bootstrap/js/bootstrap.min.js') }}"></script>
|
||||
<!-- SlimScroll -->
|
||||
<script src="{{ asset('vendor/almasaeed2010/adminlte/plugins/slimScroll/jquery.slimscroll.min.js') }}"></script>
|
||||
<!-- FastClick -->
|
||||
<script src="{{ asset('vendor/almasaeed2010/adminlte/plugins/fastclick/fastclick.js') }}"></script>
|
||||
<!-- Data Tables -->
|
||||
<script src="{{ asset('vendor/almasaeed2010/adminlte/plugins/datatables/jquery.dataTables.min.js') }}"></script>
|
||||
<script src="{{ asset('vendor/almasaeed2010/adminlte/plugins/datatables/dataTables.bootstrap.min.js') }}"></script>
|
||||
<!-- AdminLTE App -->
|
||||
<script src="{{ asset('vendor/almasaeed2010/adminlte/dist/js/app.min.js') }}"></script>
|
||||
|
||||
<!-- Select2 -->
|
||||
<script src="{{ asset('vendor/almasaeed2010/adminlte/plugins/select2/select2.min.js') }}"></script>
|
||||
|
||||
<script src="{{ asset('public/js/app.js') }}"></script>
|
||||
|
||||
<script type="text/javascript"><!--
|
||||
var url_search = '{{ url("search/search/search") }}';
|
||||
//--></script>
|
||||
|
||||
@yield('js')
|
||||
|
||||
@yield('scripts')
|
||||
</head>
|
||||
97
resources/views/partials/customer/header.blade.php
Normal file
97
resources/views/partials/customer/header.blade.php
Normal file
@@ -0,0 +1,97 @@
|
||||
<header class="main-header">
|
||||
<!-- Logo -->
|
||||
<a href="#" class="logo">
|
||||
<!-- mini logo for sidebar mini 50x50 pixels -->
|
||||
<span class="logo-mini"><img src="{{ asset($company->company_logo) }}" class="logo-image-lg" width="25" alt="{{ $company->company_name }}"></span>
|
||||
<!-- logo for regular state and mobile devices -->
|
||||
<span class="logo-lg"><img src="{{ asset($company->company_logo) }}" class="logo-image-lg" width="25" alt="{{ $company->company_name }}"> <b>{{ $company->company_name }}</b></span>
|
||||
</a>
|
||||
<!-- Header Navbar: style can be found in header.less -->
|
||||
<nav class="navbar navbar-static-top">
|
||||
<!-- Sidebar toggle button-->
|
||||
<a href="#" class="sidebar-toggle" data-toggle="offcanvas" role="button">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</a>
|
||||
|
||||
<div class="navbar-custom-menu">
|
||||
<ul class="nav navbar-nav">
|
||||
<!-- Notifications: style can be found in dropdown.less -->
|
||||
<li class="dropdown notifications-menu">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
|
||||
<i class="fa fa-bell-o"></i>
|
||||
@if ($notifications)
|
||||
<span class="label label-warning">{{ $notifications }}</span>
|
||||
@endif
|
||||
</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li class="header">{{ trans_choice('header.notifications.counter', count($notifications), ['count' => count($notifications)]) }}</li>
|
||||
<li>
|
||||
<!-- inner menu: contains the actual data -->
|
||||
<ul class="menu">
|
||||
@if (count($bills))
|
||||
<li>
|
||||
<a href="{{ url('auth/users/' . $user->id . '/read-bills') }}">
|
||||
<i class="fa fa-shopping-cart text-red"></i> {{ trans_choice('header.notifications.upcoming_bills', count($bills), ['count' => count($bills)]) }}
|
||||
</a>
|
||||
</li>
|
||||
@endif
|
||||
@if (count($invoices))
|
||||
<li>
|
||||
<a href="{{ url('auth/users/' . $user->id . '/read-invoices') }}">
|
||||
<i class="fa fa-money text-green"></i> {{ trans_choice('header.notifications.overdue_invoices', count($invoices), ['count' => count($invoices)]) }}
|
||||
</a>
|
||||
</li>
|
||||
@endif
|
||||
</ul>
|
||||
</li>
|
||||
<li class="footer"><a href="#">{{ trans('header.notifications.view_all') }}</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<!-- Tasks: style can be found in dropdown.less -->
|
||||
<li class="dropdown tasks-menu">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
|
||||
{!! language()->flag() !!}
|
||||
</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li class="header">{{ trans('header.change_language') }}</li>
|
||||
<li>
|
||||
<!-- inner menu: contains the actual data -->
|
||||
{!! language()->flags() !!}
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<!-- User Account: style can be found in dropdown.less -->
|
||||
<li class="dropdown user user-menu">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
|
||||
<img src="{{ asset($user->picture) }}" class="user-image" alt="User Image">
|
||||
<span class="hidden-xs">{{ $user->name }}</span>
|
||||
</a>
|
||||
<ul class="dropdown-menu">
|
||||
<!-- User image -->
|
||||
<li class="user-header">
|
||||
<img src="{{ asset($user->picture) }}" class="img-circle" alt="User Image">
|
||||
<p>
|
||||
{{ $user->name }}
|
||||
<small>{{ trans('header.last_login', ['time' => $user->last_logged_in_at]) }}</small>
|
||||
</p>
|
||||
</li>
|
||||
<!-- Menu Footer-->
|
||||
<li class="user-footer">
|
||||
@permission('read-customers-profile')
|
||||
<div class="pull-left">
|
||||
<a href="{{ url('auth/users/' . $user->id . '/edit') }}" class="btn btn-default btn-flat">{{ trans('auth.profile') }}</a>
|
||||
</div>
|
||||
@endpermission
|
||||
<div class="pull-right">
|
||||
<a href="{{ url('customers/logout') }}" class="btn btn-default btn-flat">{{ trans('auth.logout') }}</a>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
</header>
|
||||
39
resources/views/partials/customer/menu.blade.php
Normal file
39
resources/views/partials/customer/menu.blade.php
Normal file
@@ -0,0 +1,39 @@
|
||||
<aside class="main-sidebar">
|
||||
<!-- sidebar: style can be found in sidebar.less -->
|
||||
<section class="sidebar">
|
||||
<!-- Sidebar user panel -->
|
||||
<div class="user-panel">
|
||||
<div class="pull-left image">
|
||||
<img src="{{ asset($customer->picture) }}" class="img-circle" alt="{{ $customer->name }}">
|
||||
</div>
|
||||
<div class="pull-left info">
|
||||
<p>{{ $customer->name }}</p>
|
||||
@permission('read-companies-companies')
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><span class="caret"></span> {{ trans('general.change') }}</a>
|
||||
<ul class="dropdown-menu">
|
||||
@foreach($companies as $com)
|
||||
<li><a href="{{ url('companies/companies/'. $com->id .'/set') }}">{{ $com->company_name }}</a></li>
|
||||
@endforeach
|
||||
@permission('update-companies-companies')
|
||||
<li role="separator" class="divider"></li>
|
||||
<li><a href="{{ url('companies/companies') }}">{{ trans('companies.manage') }}</a></li>
|
||||
@endpermission
|
||||
</ul>
|
||||
@endpermission
|
||||
</div>
|
||||
</div>
|
||||
<!-- search form -->
|
||||
<form action="#" method="get" id="form-search" class="sidebar-form">
|
||||
<div id="customer-search" class="input-group">
|
||||
<input type="text" name="main_search" value="<?php //echo $search; ?>" id="input-main-search" class="form-control" placeholder="Search...">
|
||||
<span class="input-group-btn">
|
||||
<button type="submit" name="main_search" id="search-btn" class="btn btn-flat"><i class="fa fa-search"></i></button>
|
||||
</span>
|
||||
</div>
|
||||
</form>
|
||||
<!-- /.search form -->
|
||||
<!-- sidebar menu: : style can be found in sidebar.less -->
|
||||
{!! Menu::get('CustomerMenu') !!}
|
||||
</section>
|
||||
<!-- /.sidebar -->
|
||||
</aside>
|
||||
6
resources/views/partials/customer/pagination.blade.php
Normal file
6
resources/views/partials/customer/pagination.blade.php
Normal file
@@ -0,0 +1,6 @@
|
||||
<div class="pull-left" style="margin-top: 7px;">
|
||||
<small>{{ trans('pagination.showing', ['first' => $items->firstItem(), 'last' => $items->lastItem(), 'total' => $items->total(), 'type' => strtolower(trans_choice('general.' . $type, 2))]) }}</small>
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
{!! $items->appends(request()->except('page'))->links() !!}
|
||||
</div>
|
||||
10
resources/views/partials/form/checkbox_group.blade.php
Normal file
10
resources/views/partials/form/checkbox_group.blade.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<div class="form-group {{ $col }} {{ isset($attributes['required']) ? 'required' : '' }} {{ $errors->has($name) ? 'has-error' : '' }}">
|
||||
{!! Form::label($name, $text, ['class' => 'control-label']) !!}
|
||||
<br/>
|
||||
@foreach($items as $item)
|
||||
<div class="col-md-3">
|
||||
{{ Form::checkbox($name . '[]', $item->$id) }} {{ $item->$value }}
|
||||
</div>
|
||||
@endforeach
|
||||
{!! $errors->first($name, '<p class="help-block">:message</p>') !!}
|
||||
</div>
|
||||
18
resources/views/partials/form/delete_button.blade.php
Normal file
18
resources/views/partials/form/delete_button.blade.php
Normal file
@@ -0,0 +1,18 @@
|
||||
@php
|
||||
$page = explode('/', $url)[1];
|
||||
$text = $text ? $text : $page;
|
||||
@endphp
|
||||
|
||||
{!! Form::open([
|
||||
'id' => str_singular($page) . '-' . $item->$id,
|
||||
'method' => 'DELETE',
|
||||
'url' => [$url, $item->$id],
|
||||
'style' => 'display:inline'
|
||||
]) !!}
|
||||
{!! Form::button('<i class="fa fa-trash-o" aria-hidden="true"></i> ' . trans('general.delete'), array(
|
||||
'type' => 'button',
|
||||
'class' => 'btn btn-danger btn-xs',
|
||||
'title' => trans('general.delete'),
|
||||
'onclick' => 'confirmDelete("' . '#' . str_singular($page) . '-' . $item->$id . '", "' . trans_choice('general.' . $text, 2) . '", "' . trans('general.delete_confirm', ['name' => '<strong>' . $item->$value . '</strong>', 'type' => strtolower(trans_choice('general.' . $text, 1))]) . '", "' . trans('general.cancel') . '", "' . trans('general.delete') . '")'
|
||||
)) !!}
|
||||
{!! Form::close() !!}
|
||||
8
resources/views/partials/form/email_group.blade.php
Normal file
8
resources/views/partials/form/email_group.blade.php
Normal file
@@ -0,0 +1,8 @@
|
||||
<div class="form-group {{ $col }} {{ isset($attributes['required']) ? 'required' : '' }} {{ $errors->has($name) ? 'has-error' : '' }}">
|
||||
{!! Form::label($name, $text, ['class' => 'control-label']) !!}
|
||||
<div class="input-group">
|
||||
<div class="input-group-addon"><i class="fa fa-{{ $icon }}"></i></div>
|
||||
{!! Form::email($name, $value, array_merge(['class' => 'form-control', 'placeholder' => trans('general.form.enter', ['field' => $text])], $attributes)) !!}
|
||||
</div>
|
||||
{!! $errors->first($name, '<p class="help-block">:message</p>') !!}
|
||||
</div>
|
||||
5
resources/views/partials/form/file_group.blade.php
Normal file
5
resources/views/partials/form/file_group.blade.php
Normal file
@@ -0,0 +1,5 @@
|
||||
<div class="form-group {{ $col }} {{ isset($attributes['required']) ? 'required' : '' }} {{ $errors->has($name) ? 'has-error' : '' }}" style="min-height: 59px">
|
||||
{!! Form::label($name, $text, ['class' => 'control-label']) !!}
|
||||
{!! Form::file($name, null, array_merge(['class' => 'form-control'], $attributes)) !!}
|
||||
{!! $errors->first($name, '<p class="help-block">:message</p>') !!}
|
||||
</div>
|
||||
8
resources/views/partials/form/password_group.blade.php
Normal file
8
resources/views/partials/form/password_group.blade.php
Normal file
@@ -0,0 +1,8 @@
|
||||
<div class="form-group {{ $col }} {{ isset($attributes['required']) ? 'required' : '' }} {{ $errors->has($name) ? 'has-error' : '' }}">
|
||||
{!! Form::label($name, $text, ['class' => 'control-label']) !!}
|
||||
<div class="input-group">
|
||||
<div class="input-group-addon"><i class="fa fa-{{ $icon }}"></i></div>
|
||||
{!! Form::password($name, array_merge(['class' => 'form-control', 'placeholder' => trans('general.form.enter', ['field' => $text])], $attributes)) !!}
|
||||
</div>
|
||||
{!! $errors->first($name, '<p class="help-block">:message</p>') !!}
|
||||
</div>
|
||||
16
resources/views/partials/form/radio_group.blade.php
Normal file
16
resources/views/partials/form/radio_group.blade.php
Normal file
@@ -0,0 +1,16 @@
|
||||
<div class="form-group {{ $col }} {{ isset($attributes['required']) ? 'required' : '' }} {{ $errors->has($name) ? 'has-error' : '' }}">
|
||||
{!! Form::label($name, $text, ['class' => 'control-label']) !!}
|
||||
<div class="input-group">
|
||||
<div class="btn-group radio-inline" data-toggle="buttons">
|
||||
<label id="{{ $name }}_1" class="btn btn-default">
|
||||
{!! Form::radio($name, '1') !!}
|
||||
<span class="radiotext">{{ trans('general.yes') }}</span>
|
||||
</label>
|
||||
<label id="{{ $name }}_0" class="btn btn-default">
|
||||
{!! Form::radio($name, '0', true) !!}
|
||||
<span class="radiotext">{{ trans('general.no') }}</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
{!! $errors->first($name, '<p class="help-block">:message</p>') !!}
|
||||
</div>
|
||||
6
resources/views/partials/form/save_buttons.blade.php
Normal file
6
resources/views/partials/form/save_buttons.blade.php
Normal file
@@ -0,0 +1,6 @@
|
||||
<div class="{{ $col }}">
|
||||
<div class="form-group no-margin">
|
||||
{!! Form::button('<span class="fa fa-save"></span> ' . trans('general.save'), ['type' => 'submit', 'class' => 'btn btn-success']) !!}
|
||||
<a href="{{ url($cancel) }}" class="btn btn-default"><span class="fa fa-times-circle"></span> {{ trans('general.cancel') }}</a>
|
||||
</div>
|
||||
</div>
|
||||
8
resources/views/partials/form/select_group.blade.php
Normal file
8
resources/views/partials/form/select_group.blade.php
Normal file
@@ -0,0 +1,8 @@
|
||||
<div class="form-group {{ $col }} {{ isset($attributes['required']) ? 'required' : '' }} {{ $errors->has($name) ? 'has-error' : ''}}">
|
||||
{!! Form::label($name, $text, ['class' => 'control-label']) !!}
|
||||
<div class="input-group">
|
||||
<div class="input-group-addon"><i class="fa fa-{{ $icon }}"></i></div>
|
||||
{!! Form::select($name, $values, $selected, array_merge(['class' => 'form-control', 'placeholder' => trans('general.form.select.field', ['field' => $text])], $attributes)) !!}
|
||||
</div>
|
||||
{!! $errors->first($name, '<p class="help-block">:message</p>') !!}
|
||||
</div>
|
||||
8
resources/views/partials/form/text_group.blade.php
Normal file
8
resources/views/partials/form/text_group.blade.php
Normal file
@@ -0,0 +1,8 @@
|
||||
<div class="form-group {{ $col }} {{ isset($attributes['required']) ? 'required' : '' }} {{ $errors->has($name) ? 'has-error' : '' }}">
|
||||
{!! Form::label($name, $text, ['class' => 'control-label']) !!}
|
||||
<div class="input-group">
|
||||
<div class="input-group-addon"><i class="fa fa-{{ $icon }}"></i></div>
|
||||
{!! Form::text($name, $value, array_merge(['class' => 'form-control', 'placeholder' => trans('general.form.enter', ['field' => $text])], $attributes)) !!}
|
||||
</div>
|
||||
{!! $errors->first($name, '<p class="help-block">:message</p>') !!}
|
||||
</div>
|
||||
5
resources/views/partials/form/textarea_group.blade.php
Normal file
5
resources/views/partials/form/textarea_group.blade.php
Normal file
@@ -0,0 +1,5 @@
|
||||
<div class="form-group {{ $col }} {{ isset($attributes['required']) ? 'required' : '' }} {{ $errors->has($name) ? 'has-error' : '' }}">
|
||||
{!! Form::label($name, $text, ['class' => 'control-label']) !!}
|
||||
{!! Form::textarea($name, $value, array_merge(['class' => 'form-control', 'placeholder' => trans('general.form.enter', ['field' => $text])], $attributes)) !!}
|
||||
{!! $errors->first($name, '<p class="help-block">:message</p>') !!}
|
||||
</div>
|
||||
52
resources/views/partials/install/head.blade.php
Normal file
52
resources/views/partials/install/head.blade.php
Normal file
@@ -0,0 +1,52 @@
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<!-- Tell the browser to be responsive to screen width -->
|
||||
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
|
||||
|
||||
<title>Akaunting</title>
|
||||
|
||||
<!-- Tell the browser to be responsive to screen width -->
|
||||
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
|
||||
<!-- Bootstrap 3.3.6 -->
|
||||
<link rel="stylesheet" href="{{ asset('vendor/almasaeed2010/adminlte/bootstrap/css/bootstrap.min.css') }}">
|
||||
<!-- Font Awesome -->
|
||||
<link rel="stylesheet" href="{{ asset('public/css/font-awesome.min.css') }}">
|
||||
<!-- Ionicons -->
|
||||
<link rel="stylesheet" href="{{ asset('public/css/ionicons.min.css') }}">
|
||||
<!-- Theme style -->
|
||||
<link rel="stylesheet" href="{{ asset('vendor/almasaeed2010/adminlte/dist/css/AdminLTE.min.css') }}">
|
||||
<!-- AdminLTE Skins -->
|
||||
<link rel="stylesheet" href="{{ asset('vendor/almasaeed2010/adminlte/dist/css/skins/skin-green-light.min.css') }}">
|
||||
<!-- App style -->
|
||||
<link rel="stylesheet" href="{{ asset('public/css/install.css') }}">
|
||||
<link rel="stylesheet" href="{{ asset('public/css/akaunting-green.css') }}">
|
||||
|
||||
<link rel="shortcut icon" href="{{ asset('public/img/favicon.ico') }}">
|
||||
|
||||
@yield('css')
|
||||
|
||||
@yield('stylesheet')
|
||||
|
||||
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
|
||||
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
|
||||
<!--[if lt IE 9]>
|
||||
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
|
||||
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
|
||||
<!-- jQuery 2.2.3 -->
|
||||
<script src="{{ asset('vendor/almasaeed2010/adminlte/plugins/jQuery/jquery-2.2.3.min.js') }}"></script>
|
||||
<!-- Bootstrap 3.3.6 -->
|
||||
<script src="{{ asset('vendor/almasaeed2010/adminlte/bootstrap/js/bootstrap.min.js') }}"></script>
|
||||
<!-- SlimScroll -->
|
||||
<script src="{{ asset('vendor/almasaeed2010/adminlte/plugins/slimScroll/jquery.slimscroll.min.js') }}"></script>
|
||||
<!-- AdminLTE App -->
|
||||
<script src="{{ asset('vendor/almasaeed2010/adminlte/dist/js/app.min.js') }}"></script>
|
||||
|
||||
<script src="{{ asset('public/js/app.js') }}"></script>
|
||||
|
||||
@yield('js')
|
||||
|
||||
@yield('scripts')
|
||||
</head>
|
||||
50
resources/views/partials/invoice/head.blade.php
Normal file
50
resources/views/partials/invoice/head.blade.php
Normal file
@@ -0,0 +1,50 @@
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<!-- Tell the browser to be responsive to screen width -->
|
||||
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
|
||||
|
||||
<title>@yield('title') - @setting('general.company_name')</title>
|
||||
|
||||
<!-- Tell the browser to be responsive to screen width -->
|
||||
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
|
||||
<!-- Bootstrap 3.3.6 -->
|
||||
<link rel="stylesheet" href="{{ asset('vendor/almasaeed2010/adminlte/bootstrap/css/bootstrap.min.css') }}">
|
||||
<!-- Font Awesome -->
|
||||
<link rel="stylesheet" href="{{ asset('public/css/font-awesome.min.css') }}">
|
||||
<!-- Ionicons -->
|
||||
<link rel="stylesheet" href="{{ asset('public/css/ionicons.min.css') }}">
|
||||
<!-- Theme style -->
|
||||
<link rel="stylesheet" href="{{ asset('vendor/almasaeed2010/adminlte/dist/css/AdminLTE.min.css') }}">
|
||||
<!-- AdminLTE Skins. Choose a skin from the css/skins
|
||||
folder instead of downloading all of them to reduce the load. -->
|
||||
<link rel="stylesheet" href="{{ asset('vendor/almasaeed2010/adminlte/dist/css/skins/_all-skins.min.css') }}">
|
||||
<!-- App style -->
|
||||
<link rel="stylesheet" href="{{ asset('public/css/app.css') }}">
|
||||
|
||||
@yield('css')
|
||||
|
||||
@yield('stylesheet')
|
||||
|
||||
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
|
||||
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
|
||||
<!--[if lt IE 9]>
|
||||
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
|
||||
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
|
||||
<!-- jQuery 2.2.3 -->
|
||||
<script src="{{ asset('vendor/almasaeed2010/adminlte/plugins/jQuery/jquery-2.2.3.min.js') }}"></script>
|
||||
<!-- Bootstrap 3.3.6 -->
|
||||
<script src="{{ asset('vendor/almasaeed2010/adminlte/bootstrap/js/bootstrap.min.js') }}"></script>
|
||||
<!-- SlimScroll -->
|
||||
<script src="{{ asset('vendor/almasaeed2010/adminlte/plugins/slimScroll/jquery.slimscroll.min.js') }}"></script>
|
||||
<!-- AdminLTE App -->
|
||||
<script src="{{ asset('vendor/almasaeed2010/adminlte/dist/js/app.min.js') }}"></script>
|
||||
|
||||
<script src="{{ asset('public/js/app.js') }}"></script>
|
||||
|
||||
@yield('js')
|
||||
|
||||
@yield('scripts')
|
||||
</head>
|
||||
23
resources/views/partials/modules/bar.blade.php
Normal file
23
resources/views/partials/modules/bar.blade.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<div class="col-md-12 no-padding-left">
|
||||
<div class="box box-success">
|
||||
<div class="box-header with-border">
|
||||
|
||||
<div class="pull-left">
|
||||
{!! Form::select('category', $categories, request('category'), ['class' => 'form-control input-sm', 'style' => 'display:inline;width:inherit;']) !!}
|
||||
<a href="{{ url('modules/paid') }}" class="btn btn-sm btn-default btn-flat margin" style="margin-left: 20px;">Top Paid</a>
|
||||
<a href="{{ url('modules/new') }}" class="btn btn-sm btn-default btn-flat margin">New</a>
|
||||
<a href="{{ url('modules/free') }}" class="btn btn-sm btn-default btn-flat margin">Top Free</a>
|
||||
</div>
|
||||
|
||||
<div class="pull-right">
|
||||
<div class="has-feedback">
|
||||
{!! Form::open(['url' => 'modules/search', 'role' => 'form']) !!}
|
||||
<input type="text" class="form-control input-sm" style="margin-top: 10px;" placeholder="Search Apps">
|
||||
<span class="glyphicon glyphicon-search form-control-feedback"></span>
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
87
resources/views/partials/modules/head.blade.php
Normal file
87
resources/views/partials/modules/head.blade.php
Normal file
@@ -0,0 +1,87 @@
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<!-- Tell the browser to be responsive to screen width -->
|
||||
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
|
||||
|
||||
<title>@yield('title') - @setting('general.company_name')</title>
|
||||
|
||||
<!-- Tell the browser to be responsive to screen width -->
|
||||
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
|
||||
<!-- Bootstrap 3.3.6 -->
|
||||
<link rel="stylesheet" href="{{ asset('vendor/almasaeed2010/adminlte/bootstrap/css/bootstrap.min.css') }}">
|
||||
<!-- Font Awesome -->
|
||||
<link rel="stylesheet" href="{{ asset('public/css/font-awesome.min.css') }}">
|
||||
<!-- Ionicons -->
|
||||
<link rel="stylesheet" href="{{ asset('public/css/ionicons.min.css') }}">
|
||||
<!-- Theme style -->
|
||||
<link rel="stylesheet" href="{{ asset('vendor/almasaeed2010/adminlte/dist/css/AdminLTE.min.css') }}">
|
||||
<!-- AdminLTE Skins -->
|
||||
@if (setting('general.admin_theme', 'skin-green-light') == 'skin-green-light')
|
||||
<link rel="stylesheet" href="{{ asset('vendor/almasaeed2010/adminlte/dist/css/skins/skin-green-light.min.css') }}">
|
||||
@else
|
||||
<link rel="stylesheet" href="{{ asset('vendor/almasaeed2010/adminlte/dist/css/skins/skin-black.min.css') }}">
|
||||
<link rel="stylesheet" href="{{ asset('public/css/skin-black.css?v=1.0') }}">
|
||||
@endif
|
||||
<!-- Select2 -->
|
||||
<link rel="stylesheet" href="{{ asset('vendor/almasaeed2010/adminlte/plugins/select2/select2.min.css') }}">
|
||||
<!-- App style -->
|
||||
<link rel="stylesheet" href="{{ asset('public/css/app.css?v=1.0') }}">
|
||||
<link rel="stylesheet" href="{{ asset('public/css/akaunting-green.css?v=1.0') }}">
|
||||
<link rel="stylesheet" href="{{ asset('public/css/addons.css?v=1.0') }}">
|
||||
|
||||
<link rel="shortcut icon" href="{{ asset('public/img/favicon.ico') }}">
|
||||
|
||||
@yield('css')
|
||||
|
||||
@yield('stylesheet')
|
||||
|
||||
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
|
||||
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
|
||||
<!--[if lt IE 9]>
|
||||
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
|
||||
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
|
||||
<!-- jQuery 2.2.3 -->
|
||||
<script src="{{ asset('vendor/almasaeed2010/adminlte/plugins/jQuery/jquery-2.2.3.min.js') }}"></script>
|
||||
<!-- Bootstrap 3.3.6 -->
|
||||
<script src="{{ asset('vendor/almasaeed2010/adminlte/bootstrap/js/bootstrap.min.js') }}"></script>
|
||||
<!-- SlimScroll -->
|
||||
<script src="{{ asset('vendor/almasaeed2010/adminlte/plugins/slimScroll/jquery.slimscroll.min.js') }}"></script>
|
||||
<!-- FastClick -->
|
||||
<script src="{{ asset('vendor/almasaeed2010/adminlte/plugins/fastclick/fastclick.js') }}"></script>
|
||||
<!-- AdminLTE App -->
|
||||
<script src="{{ asset('vendor/almasaeed2010/adminlte/dist/js/app.min.js') }}"></script>
|
||||
|
||||
<!-- Select2 -->
|
||||
<script src="{{ asset('vendor/almasaeed2010/adminlte/plugins/select2/select2.min.js') }}"></script>
|
||||
|
||||
<script src="{{ asset('public/js/app.js?v=1.0') }}"></script>
|
||||
|
||||
<script type="text/javascript"><!--
|
||||
var url_search = '{{ url("search/search/search") }}';
|
||||
//--></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
$('select[name=\'category\']').on('change', function() {
|
||||
url = '{{ url('modules/category') }}';
|
||||
|
||||
var value = $(this).val();
|
||||
|
||||
if (value) {
|
||||
url += '/' + encodeURIComponent(value);
|
||||
} else {
|
||||
url = '{{ url('modules/home') }}';
|
||||
}
|
||||
|
||||
location = url;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
@yield('js')
|
||||
|
||||
@yield('scripts')
|
||||
</head>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user