renamed income/expense
This commit is contained in:
55
resources/views/purchases/vendors/create.blade.php
vendored
Normal file
55
resources/views/purchases/vendors/create.blade.php
vendored
Normal file
@@ -0,0 +1,55 @@
|
||||
@extends('layouts.admin')
|
||||
|
||||
@section('title', trans('general.title.new', ['type' => trans_choice('general.vendors', 1)]))
|
||||
|
||||
@section('content')
|
||||
<div class="card">
|
||||
{!! Form::open([
|
||||
'route' => 'vendors.store',
|
||||
'id' => 'vendor',
|
||||
'@submit.prevent' => 'onSubmit',
|
||||
'@keydown' => 'form.errors.clear($event.target.name)',
|
||||
'files' => true,
|
||||
'role' => 'form',
|
||||
'class' => 'form-loading-button needs-validation',
|
||||
'novalidate' => 'true'
|
||||
]) !!}
|
||||
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
{{ Form::textGroup('name', trans('general.name'), 'user') }}
|
||||
|
||||
{{ 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-alt', $currencies, setting('default.currency')) }}
|
||||
|
||||
{{ Form::textGroup('phone', trans('general.phone'), 'phone', []) }}
|
||||
|
||||
{{ Form::textGroup('website', trans('general.website'), 'globe', []) }}
|
||||
|
||||
{{ Form::textareaGroup('address', trans('general.address')) }}
|
||||
|
||||
{{ Form::fileGroup('logo', trans_choice('general.pictures', 1)) }}
|
||||
|
||||
{{ Form::textGroup('reference', trans('general.reference'), 'file', []) }}
|
||||
|
||||
{{ Form::radioGroup('enabled', trans('general.enabled'), true) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card-footer">
|
||||
<div class="row float-right">
|
||||
{{ Form::saveButtons('purchases/vendors') }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{ Form::hidden('type', 'vendor') }}
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('scripts_start')
|
||||
<script src="{{ asset('public/js/purchases/vendors.js?v=' . version('short')) }}"></script>
|
||||
@endpush
|
||||
58
resources/views/purchases/vendors/edit.blade.php
vendored
Normal file
58
resources/views/purchases/vendors/edit.blade.php
vendored
Normal file
@@ -0,0 +1,58 @@
|
||||
@extends('layouts.admin')
|
||||
|
||||
@section('title', trans('general.title.edit', ['type' => trans_choice('general.vendors', 1)]))
|
||||
|
||||
@section('content')
|
||||
<div class="card">
|
||||
{!! Form::model($vendor, [
|
||||
'id' => 'vendor',
|
||||
'method' => 'PATCH',
|
||||
'route' => ['vendors.update', $vendor->id],
|
||||
'@submit.prevent' => 'onSubmit',
|
||||
'@keydown' => 'form.errors.clear($event.target.name)',
|
||||
'files' => true,
|
||||
'role' => 'form',
|
||||
'class' => 'form-loading-button',
|
||||
'novalidate' => true
|
||||
]) !!}
|
||||
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
{{ Form::textGroup('name', trans('general.name'), 'user') }}
|
||||
|
||||
{{ 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-alt', $currencies, $vendor->currency_code) }}
|
||||
|
||||
{{ Form::textGroup('phone', trans('general.phone'), 'phone', []) }}
|
||||
|
||||
{{ Form::textGroup('website', trans('general.website'), 'globe',[]) }}
|
||||
|
||||
{{ Form::textareaGroup('address', trans('general.address')) }}
|
||||
|
||||
{{ Form::fileGroup('logo', trans_choice('general.logos', 1)) }}
|
||||
|
||||
{{ Form::textGroup('reference', trans('general.reference'), 'file', []) }}
|
||||
|
||||
{{ Form::radioGroup('enabled', trans('general.enabled'), $vendor->enabled) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@permission('update-purchases-vendors')
|
||||
<div class="card-footer">
|
||||
<div class="float-right">
|
||||
{{ Form::saveButtons('purchases/vendors') }}
|
||||
</div>
|
||||
</div>
|
||||
@endpermission
|
||||
|
||||
{{ Form::hidden('type', 'vendor') }}
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('scripts_start')
|
||||
<script src="{{ asset('public/js/purchases/vendors.js?v=' . version('short')) }}"></script>
|
||||
@endpush
|
||||
115
resources/views/purchases/vendors/index.blade.php
vendored
Normal file
115
resources/views/purchases/vendors/index.blade.php
vendored
Normal file
@@ -0,0 +1,115 @@
|
||||
@extends('layouts.admin')
|
||||
|
||||
@section('title', trans_choice('general.vendors', 2))
|
||||
|
||||
@section('new_button')
|
||||
@permission('create-purchases-vendors')
|
||||
<span><a href="{{ route('vendors.create') }}" class="btn btn-success btn-sm header-button-top"><span class="fa fa-plus"></span> {{ trans('general.add_new') }}</a></span>
|
||||
<span><a href="{{ url('common/import/purchases/vendors') }}" class="btn btn-white btn-sm header-button-top"><span class="fa fa-upload"></span> {{ trans('import.import') }}</a></span>
|
||||
@endpermission
|
||||
<span><a href="{{ route('vendors.export', request()->input()) }}" class="btn btn-white btn-sm header-button-top"><span class="fa fa-download"></span> {{ trans('general.export') }}</a></span>
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
@if ($vendors->count())
|
||||
<div class="card">
|
||||
<div class="card-header border-bottom-0" v-bind:class="[bulk_action.show ? 'bg-gradient-primary' : '']">
|
||||
{!! Form::open([
|
||||
'url' => 'purchases/vendors',
|
||||
'role' => 'form',
|
||||
'method' => 'GET',
|
||||
'class' => 'mb-0'
|
||||
]) !!}
|
||||
<div class="row" v-if="!bulk_action.show">
|
||||
<div class="col-12 d-flex align-items-center">
|
||||
<span class="font-weight-400 d-none d-lg-block mr-2">{{ trans('general.search') }}:</span>
|
||||
<akaunting-search></akaunting-search>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{ Form::bulkActionRowGroup('general.vendors', $bulk_actions, 'purchases/vendors') }}
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-flush table-hover">
|
||||
<thead class="thead-light">
|
||||
<tr class="row table-head-line">
|
||||
<th class="col-sm-2 col-md-1 col-lg-1 col-xl-1 d-none d-sm-block">{{ Form::bulkActionAllGroup() }}</th>
|
||||
<th class="col-xs-4 col-sm-3 col-md-3 col-lg-3 col-xl-3">@sortablelink('name', trans('general.name'), ['filter' => 'active, visible'], ['class' => 'col-aka', 'rel' => 'nofollow'])</th>
|
||||
<th class="col-md-2 col-lg-2 col-xl-2 d-none d-md-block">@sortablelink('email', trans('general.email'))</th>
|
||||
<th class="col-sm-3 col-md-2 col-lg-2 col-xl-2 d-none d-sm-block">@sortablelink('phone', trans('general.phone'))</th>
|
||||
<th class="col-lg-2 col-xl-2 text-right d-none d-lg-block">@sortablelink('unpaid', trans('general.unpaid'))</th>
|
||||
<th class="col-xs-4 col-sm-2 col-md-2 col-lg-1 col-xl-1">@sortablelink('enabled', trans('general.enabled'))</th>
|
||||
<th class="col-xs-4 col-sm-2 col-md-2 col-lg-1 col-xl-1 text-center">{{ trans('general.actions') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
@foreach($vendors as $item)
|
||||
<tr class="row align-items-center border-top-1">
|
||||
<td class="col-sm-2 col-md-1 col-lg-1 col-xl-1 d-none d-sm-block">
|
||||
{{ Form::bulkActionGroup($item->id, $item->name) }}
|
||||
</td>
|
||||
<td class="col-xs-4 col-sm-3 col-md-3 col-lg-3 col-xl-3">
|
||||
<a class="col-aka text-success " href="{{ route('vendors.show', $item->id) }}">{{ $item->name }}</a>
|
||||
</td>
|
||||
<td class="col-md-2 col-lg-2 col-xl-2 d-none d-md-block long-texts">
|
||||
{{ !empty($item->email) ? $item->email : trans('general.na') }}
|
||||
</td>
|
||||
<td class="col-sm-3 col-md-2 col-lg-2 col-xl-2 d-none d-sm-block long-texts">
|
||||
{{ $item->phone }}
|
||||
</td>
|
||||
<td class="col-lg-2 col-xl-2 text-right d-none d-lg-block long-texts">
|
||||
@money($item->unpaid, setting('default.currency'), true)
|
||||
</td>
|
||||
<td class="col-xs-4 col-sm-2 col-md-2 col-lg-1 col-xl-1">
|
||||
@if (user()->can('update-purchases-vendors'))
|
||||
{{ Form::enabledGroup($item->id, $item->name, $item->enabled) }}
|
||||
@else
|
||||
@if ($item->enabled)
|
||||
<badge rounded type="success">{{ trans('general.enabled') }}</badge>
|
||||
@else
|
||||
<badge rounded type="danger">{{ trans('general.disabled') }}</badge>
|
||||
@endif
|
||||
@endif
|
||||
</td>
|
||||
<td class="col-xs-4 col-sm-2 col-md-2 col-lg-1 col-xl-1 text-center">
|
||||
<div class="dropdown">
|
||||
<a class="btn btn-neutral btn-sm text-light items-align-center py-2" href="#" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
<i class="fa fa-ellipsis-h text-muted"></i>
|
||||
</a>
|
||||
<div class="dropdown-menu dropdown-menu-right dropdown-menu-arrow">
|
||||
<a class="dropdown-item" href="{{ route('vendors.show', $item->id) }}">{{ trans('general.show') }}</a>
|
||||
<a class="dropdown-item" href="{{ route('vendors.edit', $item->id) }}">{{ trans('general.edit') }}</a>
|
||||
@permission('create-purchases-vendors')
|
||||
<div class="dropdown-divider"></div>
|
||||
<a class="dropdown-item" href="{{ route('vendors.duplicate', $item->id) }}">{{ trans('general.duplicate') }}</a>
|
||||
@endpermission
|
||||
@permission('delete-purchases-vendors')
|
||||
<div class="dropdown-divider"></div>
|
||||
{!! Form::deleteLink($item, 'purchases/vendors') !!}
|
||||
@endpermission
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="card-footer table-action">
|
||||
<div class="row">
|
||||
@include('partials.admin.pagination', ['items' => $vendors])
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@else
|
||||
@include('partials.admin.empty_page', ['page' => 'vendors', 'docs_path' => 'purchases/vendors'])
|
||||
@endif
|
||||
@endsection
|
||||
|
||||
@push('scripts_start')
|
||||
<script src="{{ asset('public/js/purchases/vendors.js?v=' . version('short')) }}"></script>
|
||||
@endpush
|
||||
186
resources/views/purchases/vendors/show.blade.php
vendored
Normal file
186
resources/views/purchases/vendors/show.blade.php
vendored
Normal file
@@ -0,0 +1,186 @@
|
||||
@extends('layouts.admin')
|
||||
|
||||
@section('title', $vendor->name)
|
||||
|
||||
@section('content')
|
||||
<div class="row">
|
||||
<div class="col-xl-3">
|
||||
<div class="card">
|
||||
<div class="card-header border-bottom-0 show-transaction-card-header">
|
||||
<a class="text-sm">{{ trans_choice('general.bills', 2) }}</a> <a class="float-right text-xs">{{ $counts['bills'] }}</a>
|
||||
</div>
|
||||
|
||||
<div class="card-footer show-transaction-card-footer">
|
||||
<a class="text-sm">{{ trans_choice('general.transactions', 2) }}</a> <a class="float-right text-xs">{{ $counts['transactions'] }}</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h4 class="mb-0">{{ trans('auth.profile') }}</h4>
|
||||
</div>
|
||||
|
||||
<div class="card-body d-grid">
|
||||
<a class="text-sm font-weight-600">{{ trans('general.email') }}</a> <a class="text-xs long-texts">{{ $vendor->email }}</a>
|
||||
<div class="dropdown-divider"></div>
|
||||
<a class="text-sm font-weight-600">{{ trans('general.phone') }}</a> <a class="text-xs long-texts">{{ $vendor->phone }}</a>
|
||||
<div class="dropdown-divider"></div>
|
||||
<a class="text-sm font-weight-600">{{ trans('general.website') }}</a> <a class="text-xs long-texts">{{ $vendor->website }}</a>
|
||||
<div class="dropdown-divider"></div>
|
||||
<a class="text-sm font-weight-600">{{ trans('general.tax_number') }}</a> <a class="text-xs long-texts">{{ $vendor->tax_number }}</a>
|
||||
@if ($vendor->reference)
|
||||
<div class="dropdown-divider"></div>
|
||||
<a class="text-sm font-weight-600">{{ trans('general.reference') }}</a> <a class="text-xs long-texts">{{ $vendor->reference }}</a>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h4 class="mb-0">{{ trans('general.address') }}</h4>
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<a class="text-xs m-0">
|
||||
{{ $vendor->address }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a href="{{ url('purchases/vendors/' . $vendor->id . '/edit') }}" class="btn btn-default btn-block edit-sv"><i class="fas fa-edit"></i><b>{{ trans('general.edit') }}</b></a>
|
||||
</div>
|
||||
|
||||
<div class="col-xl-9">
|
||||
<div class="row mb--3">
|
||||
<div class="col-md-4">
|
||||
<div class="card bg-gradient-success border-0">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<h5 class="text-uppercase text-muted mb-0 text-white">{{ trans('general.paid') }}</h5>
|
||||
<div class="dropdown-divider"></div>
|
||||
<span class="h2 font-weight-bold mb-0 text-white">@money($amounts['paid'], setting('default.currency'), true)</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
<div class="card bg-gradient-warning border-0">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<h5 class="text-uppercase text-muted mb-0 text-white">{{ trans('dashboard.open_bills') }}</h5>
|
||||
<div class="dropdown-divider"></div>
|
||||
<span class="h2 font-weight-bold mb-0 text-white">@money($amounts['open'], setting('default.currency'), true)</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
<div class="card bg-gradient-danger border-0">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<h5 class="text-uppercase text-muted mb-0 text-white">{{ trans('dashboard.overdue_bills') }}</h5>
|
||||
<div class="dropdown-divider"></div>
|
||||
<span class="h2 font-weight-bold mb-0 text-white">@money($amounts['overdue'], setting('default.currency'), true)</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="nav-wrapper">
|
||||
<ul class="nav nav-pills nav-fill flex-column flex-md-row" id="tabs-icons-text" role="tablist">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link mb-sm-3 mb-md-0 active" id="tabs-icons-text-1-tab" data-toggle="tab" href="#tabs-icons-text-1" role="tab" aria-controls="tabs-icons-text-1" aria-selected="true"><i class="fas fa-hand-holding-usd mr-2"></i>{{ trans_choice('general.transactions', 2) }}</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link mb-sm-3 mb-md-0" id="tabs-icons-text-2-tab" data-toggle="tab" href="#tabs-icons-text-2" role="tab" aria-controls="tabs-icons-text-2" aria-selected="false"><i class="fa fa-shopping-cart mr-2"></i>{{ trans_choice('general.bills', 2) }}</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="card shadow">
|
||||
<div class="tab-content" id="myTabContent">
|
||||
<div class="tab-pane fade show active" id="tabs-icons-text-1" role="tabpanel" aria-labelledby="tabs-icons-text-1-tab">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-flush" id="tbl-transactions">
|
||||
<thead class="thead-light">
|
||||
<tr class="row table-head-line">
|
||||
<th class="col-xs-6 col-sm-3">{{ trans('general.date') }}</th>
|
||||
<th class="col-xs-6 col-sm-2">{{ trans('general.amount') }}</th>
|
||||
<th class="col-sm-4 d-none d-sm-none">{{ trans_choice('general.categories', 1) }}</th>
|
||||
<th class="col-sm-3 d-none d-sm-none">{{ trans_choice('general.accounts', 1) }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($transactions as $item)
|
||||
<tr class="row align-items-center border-top-1">
|
||||
<td class="col-xs-6 col-sm-3">@date($item->paid_at)</td>
|
||||
<td class="col-xs-6 col-sm-2">@money($item->amount, $item->currency_code, true)</td>
|
||||
<td class="col-sm-4 d-none d-sm-none">{{ $item->category ? $item->category->name : trans('general.na') }}</td>
|
||||
<td class="col-sm-3 d-none d-sm-none">{{ $item->account->name }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="card-footer py-4 table-action">
|
||||
<div class="row">
|
||||
@include('partials.admin.pagination', ['items' => $transactions, 'type' => 'transactions'])
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="tab-pane fade" id="tabs-icons-text-2" role="tabpanel" aria-labelledby="tabs-icons-text-2-tab">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-flush" id="tbl-bills">
|
||||
<thead class="thead-light">
|
||||
<tr class="row table-head-line">
|
||||
<th class="col-xs-4 col-sm-3">{{ trans_choice('general.numbers', 1) }}</th>
|
||||
<th class="col-xs-4 col-sm-3">{{ trans('general.amount') }}</th>
|
||||
<th class="col-sm-2 d-none d-sm-none">{{ trans('bills.bill_date') }}</th>
|
||||
<th class="col-sm-2 d-none d-sm-none">{{ trans('bills.due_date') }}</th>
|
||||
<th class="col-xs-4 col-sm-2">{{ trans_choice('general.statuses', 1) }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($bills as $item)
|
||||
<tr class="row align-items-center border-top-1">
|
||||
<td class="col-xs-4 col-sm-3"><a href="{{ url('purchases/bills/' . $item->id . ' ') }}">{{ $item->bill_number }}</a></td>
|
||||
<td class="col-xs-4 col-sm-3">@money($item->amount, $item->currency_code, true)</td>
|
||||
<td class="col-sm-2 d-none d-sm-none">@date($item->billed_at)</td>
|
||||
<td class="col-sm-2 d-none d-sm-none">@date($item->due_at)</td>
|
||||
<td class="col-xs-4 col-sm-2"><span class="badge badge-pill badge-{{ $item->status->label }}">{{ trans('bills.status.' . $item->status->code) }}</span></td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="card-footer py-4 table-action">
|
||||
<div class="row">
|
||||
@include('partials.admin.pagination', ['items' => $bills, 'type' => 'bills'])
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('scripts_start')
|
||||
<script src="{{ asset('public/js/purchases/vendors.js?v=' . version('short')) }}"></script>
|
||||
@endpush
|
||||
Reference in New Issue
Block a user