akaunting 3.0 (the last dance)
This commit is contained in:
@ -1,93 +1,17 @@
|
||||
@extends('layouts.admin')
|
||||
<x-layouts.admin>
|
||||
<x-slot name="title">
|
||||
{{ trans('general.title.new', ['type' => trans_choice('general.customers', 1)]) }}
|
||||
</x-slot>
|
||||
|
||||
@section('title', trans('general.title.new', ['type' => trans_choice('general.customers', 1)]))
|
||||
<x-slot name="favorite"
|
||||
title="{{ trans('general.title.new', ['type' => trans_choice('general.customers', 1)]) }}"
|
||||
icon="person"
|
||||
route="customers.create"
|
||||
></x-slot>
|
||||
|
||||
@section('content')
|
||||
<div class="card">
|
||||
{!! Form::open([
|
||||
'route' => 'customers.store',
|
||||
'id' => 'customer',
|
||||
'@submit.prevent' => 'onSubmit',
|
||||
'@keydown' => 'form.errors.clear($event.target.name)',
|
||||
'files' => true,
|
||||
'role' => 'form',
|
||||
'autocomplete' => "off",
|
||||
'class' => 'form-loading-button needs-validation',
|
||||
'novalidate' => 'true'
|
||||
]) !!}
|
||||
<x-slot name="content">
|
||||
<x-contacts.form.content type="customer" hide-logo />
|
||||
</x-slot>
|
||||
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
{{ Form::textGroup('name', trans('general.name'), 'user') }}
|
||||
|
||||
{{ Form::textGroup('email', trans('general.email'), 'envelope', ['autocomplete' => 'off']) }}
|
||||
|
||||
{{ Form::textGroup('tax_number', trans('general.tax_number'), 'percent', []) }}
|
||||
|
||||
{{ Form::selectAddNewGroup('currency_code', trans_choice('general.currencies', 1), 'exchange-alt', $currencies, setting('default.currency'), ['required' => 'required', 'path' => route('modals.currencies.create'), 'field' => ['key' => 'code', 'value' => 'name']]) }}
|
||||
|
||||
{{ Form::textGroup('phone', trans('general.phone'), 'phone', []) }}
|
||||
|
||||
{{ Form::textGroup('website', trans('general.website'), 'globe', []) }}
|
||||
|
||||
{{ Form::textareaGroup('address', trans('general.address'), '', '', ['rows' => '2', 'v-model' => 'form.address']) }}
|
||||
|
||||
{{ Form::textGroup('city', trans_choice('general.cities', 1), 'city', []) }}
|
||||
|
||||
{{ Form::textGroup('zip_code', trans('general.zip_code'), 'mail-bulk', []) }}
|
||||
|
||||
{{ Form::textGroup('state', trans('general.state'), 'city', []) }}
|
||||
|
||||
{{ Form::selectGroup('country', trans_choice('general.countries', 1), 'globe-americas', trans('countries'), setting('company.country'), ['model' => 'form.country']) }}
|
||||
|
||||
{{ Form::textGroup('reference', trans('general.reference'), 'file', []) }}
|
||||
|
||||
{{ Form::radioGroup('enabled', trans('general.enabled'), true) }}
|
||||
|
||||
@stack('create_user_input_start')
|
||||
<div id="customer-create-user" class="form-group col-md-12 margin-top">
|
||||
<div class="custom-control custom-checkbox">
|
||||
{{ Form::checkbox('create_user', '1', null, [
|
||||
'v-model' => 'form.create_user',
|
||||
'id' => 'create_user',
|
||||
'class' => 'custom-control-input',
|
||||
'@input' => 'onCanLogin($event)'
|
||||
]) }}
|
||||
|
||||
<label class="custom-control-label" for="create_user">
|
||||
<strong>{{ trans('customers.can_login') }}</strong>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
@stack('create_user_input_end')
|
||||
|
||||
<div v-if="can_login" class="row col-md-12">
|
||||
{{Form::passwordGroup('password', trans('auth.password.current'), 'key', ['required' => 'required'], 'col-md-6 password')}}
|
||||
|
||||
{{Form::passwordGroup('password_confirmation', trans('auth.password.current_confirm'), 'key', ['required' => 'required'], 'col-md-6 password')}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card-footer">
|
||||
<div class="row save-buttons">
|
||||
{{ Form::saveButtons('customers.index') }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{ Form::hidden('type', 'customer') }}
|
||||
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('scripts_start')
|
||||
<script>
|
||||
var can_login_errors = {
|
||||
valid: '{!! trans('validation.required', ['attribute' => 'email']) !!}',
|
||||
email: '{{ trans('customers.error.email') }}'
|
||||
};
|
||||
</script>
|
||||
|
||||
<script src="{{ asset('public/js/sales/customers.js?v=' . version('short')) }}"></script>
|
||||
@endpush
|
||||
<x-contacts.script type="customer" />
|
||||
</x-layouts.admin>
|
||||
|
@ -1,106 +1,11 @@
|
||||
@extends('layouts.admin')
|
||||
<x-layouts.admin>
|
||||
<x-slot name="title">
|
||||
{{ trans('general.title.edit', ['type' => trans_choice('general.customers', 1)]) }}
|
||||
</x-slot>
|
||||
|
||||
@section('title', trans('general.title.edit', ['type' => trans_choice('general.customers', 1)]))
|
||||
<x-slot name="content">
|
||||
<x-contacts.form.content type="customer" :model="$customer" hide-logo />
|
||||
</x-slot>
|
||||
|
||||
@section('content')
|
||||
<div class="card">
|
||||
{!! Form::model($customer, [
|
||||
'method' => 'PATCH',
|
||||
'route' => ['customers.update', $customer->id],
|
||||
'role' => 'form',
|
||||
'id' => 'customer',
|
||||
'@submit.prevent' => 'onSubmit',
|
||||
'@keydown' => 'form.errors.clear($event.target.name)',
|
||||
'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::selectAddNewGroup('currency_code', trans_choice('general.currencies', 1), 'exchange-alt', $currencies, $customer->currency_code, ['required' => 'required', 'path' => route('modals.currencies.create'), 'field' => ['key' => 'code', 'value' => 'name']]) }}
|
||||
|
||||
{{ Form::textGroup('phone', trans('general.phone'), 'phone', []) }}
|
||||
|
||||
{{ Form::textGroup('website', trans('general.website'), 'globe',[]) }}
|
||||
|
||||
{{ Form::textareaGroup('address', trans('general.address'), '', $customer->address, ['rows' => '2', 'v-model' => 'form.address']) }}
|
||||
|
||||
{{ Form::textGroup('city', trans_choice('general.cities', 1), 'city', []) }}
|
||||
|
||||
{{ Form::textGroup('zip_code', trans('general.zip_code'), 'mail-bulk', []) }}
|
||||
|
||||
{{ Form::textGroup('state', trans('general.state'), 'city', []) }}
|
||||
|
||||
{{ Form::selectGroup('country', trans_choice('general.countries', 1), 'globe-americas', trans('countries'), $customer->country, ['model' => 'form.country']) }}
|
||||
|
||||
{{ Form::textGroup('reference', trans('general.reference'), 'file', []) }}
|
||||
|
||||
{{ Form::radioGroup('enabled', trans('general.enabled'), $customer->enabled) }}
|
||||
|
||||
@stack('create_user_input_start')
|
||||
<div id="customer-create-user" class="form-group col-md-12 margin-top">
|
||||
<div class="custom-control custom-checkbox">
|
||||
@if ($customer->user_id)
|
||||
{{ Form::checkbox('create_user', '1', 1, [
|
||||
'id' => 'create_user',
|
||||
'class' => 'custom-control-input',
|
||||
'disabled' => 'true'
|
||||
]) }}
|
||||
|
||||
<label class="custom-control-label" for="create_user">
|
||||
<strong>{{ trans('customers.user_created') }}</strong>
|
||||
</label>
|
||||
@else
|
||||
{{ Form::checkbox('create_user', '1', null, [
|
||||
'v-model' => 'form.create_user',
|
||||
'id' => 'create_user',
|
||||
'class' => 'custom-control-input',
|
||||
'@input' => 'onCanLogin($event)'
|
||||
]) }}
|
||||
|
||||
<label class="custom-control-label" for="create_user">
|
||||
<strong>{{ trans('customers.can_login') }}</strong>
|
||||
</label>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
@stack('create_user_input_end')
|
||||
|
||||
<div v-if="can_login" class="row col-md-12">
|
||||
{{Form::passwordGroup('password', trans('auth.password.current'), 'key', ['required' => 'required'], 'col-md-6 password')}}
|
||||
|
||||
{{Form::passwordGroup('password_confirmation', trans('auth.password.current_confirm'), 'key', ['required' => 'required'], 'col-md-6 password')}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@can('update-sales-customers')
|
||||
<div class="card-footer">
|
||||
<div class="row save-buttons">
|
||||
{{ Form::saveButtons('customers.index') }}
|
||||
</div>
|
||||
</div>
|
||||
@endcan
|
||||
|
||||
{{ Form::hidden('type', 'customer') }}
|
||||
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('scripts_start')
|
||||
<script>
|
||||
var can_login_errors = {
|
||||
valid: '{!! trans('validation.required', ['attribute' => 'email']) !!}',
|
||||
email: '{{ trans('customers.error.email') }}'
|
||||
};
|
||||
</script>
|
||||
|
||||
<script src="{{ asset('public/js/sales/customers.js?v=' . version('short')) }}"></script>
|
||||
@endpush
|
||||
<x-contacts.script type="customer" />
|
||||
</x-layouts.admin>
|
||||
|
@ -1,131 +1,23 @@
|
||||
@extends('layouts.admin')
|
||||
<x-layouts.admin>
|
||||
<x-slot name="title">{{ trans_choice('general.customers', 2) }}</x-slot>
|
||||
|
||||
@section('title', trans_choice('general.customers', 2))
|
||||
<x-slot name="favorite"
|
||||
title="{{ trans_choice('general.customers', 2) }}"
|
||||
icon="person"
|
||||
route="customers.index"
|
||||
></x-slot>
|
||||
|
||||
@section('new_button')
|
||||
@can('create-sales-customers')
|
||||
<a href="{{ route('customers.create') }}" class="btn btn-success btn-sm">{{ trans('general.add_new') }}</a>
|
||||
<a href="{{ route('import.create', ['group' => 'sales', 'type' => 'customers']) }}" class="btn btn-white btn-sm">{{ trans('import.import') }}</a>
|
||||
@endcan
|
||||
<a href="{{ route('customers.export', request()->input()) }}" class="btn btn-white btn-sm">{{ trans('general.export') }}</a>
|
||||
@endsection
|
||||
<x-slot name="buttons">
|
||||
<x-contacts.index.buttons type="customer" />
|
||||
</x-slot>
|
||||
|
||||
@section('content')
|
||||
@if ($customers->count() || request()->get('search', false))
|
||||
<div class="card">
|
||||
<div class="card-header border-bottom-0" :class="[{'bg-gradient-primary': bulk_action.show}]">
|
||||
{!! Form::open([
|
||||
'method' => 'GET',
|
||||
'route' => 'customers.index',
|
||||
'role' => 'form',
|
||||
'class' => 'mb-0'
|
||||
]) !!}
|
||||
<div class="align-items-center" v-if="!bulk_action.show">
|
||||
<x-search-string model="App\Models\Common\Contact" />
|
||||
</div>
|
||||
<x-slot name="moreButtons">
|
||||
<x-contacts.index.more-buttons type="customer" />
|
||||
</x-slot>
|
||||
|
||||
{{ Form::bulkActionRowGroup('general.customers', $bulk_actions, ['group' => 'sales', 'type' => 'customers']) }}
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
<x-slot name="content">
|
||||
<x-contacts.index.content type="customer" :contacts="$customers" />
|
||||
</x-slot>
|
||||
|
||||
<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-4 col-lg-3 col-xl-3">@sortablelink('name', trans('general.name'), ['filter' => 'active, visible'], ['class' => 'col-aka', 'rel' => 'nofollow'])</th>
|
||||
<th class="col-md-3 col-lg-3 col-xl-3 d-none d-md-block">@sortablelink('email', trans('general.email'))</th>
|
||||
<th class="col-lg-2 col-xl-2 d-none d-lg-block text-right">@sortablelink('unpaid', trans('general.unpaid'))</th>
|
||||
<th class="col-xs-4 col-sm-2 col-md-2 col-lg-2 col-xl-2 text-center">@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($customers 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-4 col-lg-3 col-xl-3">
|
||||
<a class="col-aka long-texts d-block" href="{{ route('customers.show', $item->id) }}">{{ $item->name }}</a>
|
||||
</td>
|
||||
|
||||
<td class="col-md-3 col-lg-3 col-xl-3 d-none d-md-block long-texts">
|
||||
<el-tooltip content="{{ !empty($item->phone) ? $item->phone : trans('general.na') }}"
|
||||
effect="dark"
|
||||
placement="top">
|
||||
<span>{{ !empty($item->email) ? $item->email : trans('general.na') }}</span>
|
||||
</el-tooltip>
|
||||
</td>
|
||||
|
||||
<td class="col-lg-2 col-xl-2 d-none d-lg-block text-right long-texts">
|
||||
@money($item->unpaid, setting('default.currency'), true)
|
||||
</td>
|
||||
|
||||
<td class="col-xs-4 col-sm-2 col-md-2 col-lg-2 col-xl-2 text-center">
|
||||
@if (user()->can('update-sales-customers'))
|
||||
{{ Form::enabledGroup($item->id, $item->name, $item->enabled) }}
|
||||
@else
|
||||
@if ($item->enabled)
|
||||
<badge rounded type="success" class="mw-60 d-inline-block">{{ trans('general.yes') }}</badge>
|
||||
@else
|
||||
<badge rounded type="danger" class="mw-60 d-inline-block">{{ trans('general.no') }}</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('customers.show', $item->id) }}">
|
||||
{{ trans('general.show') }}
|
||||
</a>
|
||||
|
||||
@can('update-sales-customers')
|
||||
<a class="dropdown-item" href="{{ route('customers.edit', $item->id) }}">
|
||||
{{ trans('general.edit') }}
|
||||
</a>
|
||||
@endcan
|
||||
|
||||
<div class="dropdown-divider"></div>
|
||||
|
||||
@can('create-sales-customers')
|
||||
<a class="dropdown-item" href="{{ route('customers.duplicate', $item->id) }}">
|
||||
{{ trans('general.duplicate') }}
|
||||
</a>
|
||||
|
||||
<div class="dropdown-divider"></div>
|
||||
@endcan
|
||||
|
||||
@can('delete-sales-customers')
|
||||
{!! Form::deleteLink($item, 'customers.destroy') !!}
|
||||
@endcan
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="card-footer table-action">
|
||||
<div class="row">
|
||||
@include('partials.admin.pagination', ['items' => $customers])
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@else
|
||||
<x-empty-page group="sales" page="customers" />
|
||||
@endif
|
||||
@endsection
|
||||
|
||||
@push('scripts_start')
|
||||
<script src="{{ asset('public/js/sales/customers.js?v=' . version('short')) }}"></script>
|
||||
@endpush
|
||||
<x-contacts.script type="customer" />
|
||||
</x-layouts.admin>
|
||||
|
@ -1,285 +1,31 @@
|
||||
@extends('layouts.admin')
|
||||
<x-layouts.admin>
|
||||
<x-slot name="title">
|
||||
{{ $customer->name }}
|
||||
</x-slot>
|
||||
|
||||
@section('title', $customer->name)
|
||||
<x-slot name="status">
|
||||
@if (! $customer->enabled)
|
||||
<x-index.disable text="{{ trans_choice('general.customers', 1) }}" />
|
||||
@endif
|
||||
</x-slot>
|
||||
|
||||
@section('new_button')
|
||||
<div class="dropup header-drop-top">
|
||||
<button type="button" id="more_actions_cus_show" class="btn btn-white btn-sm" data-toggle="dropdown" aria-expanded="false">
|
||||
<i class="fa fa-chevron-down"></i> {{ trans('general.more_actions') }}
|
||||
</button>
|
||||
<x-slot name="favorite"
|
||||
title="{{ $customer->name }}"
|
||||
icon="person"
|
||||
:route="['customers.show', $customer->id]"
|
||||
></x-slot>
|
||||
|
||||
<div class="dropdown-menu" role="menu">
|
||||
@stack('button_dropdown_start')
|
||||
<x-slot name="buttons">
|
||||
<x-contacts.show.buttons type="customer" :model="$customer" />
|
||||
</x-slot>
|
||||
|
||||
@stack('duplicate_button_start')
|
||||
@can('create-sales-customers')
|
||||
<a class="dropdown-item" href="{{ route('customers.duplicate', $customer->id) }}">
|
||||
{{ trans('general.duplicate') }}
|
||||
</a>
|
||||
@endcan
|
||||
@stack('duplicate_button_end')
|
||||
<x-slot name="moreButtons">
|
||||
<x-contacts.show.more-buttons type="customer" :model="$customer" />
|
||||
</x-slot>
|
||||
|
||||
<div class="dropdown-divider"></div>
|
||||
<x-slot name="content">
|
||||
<x-contacts.show.content type="customer" :model="$customer" />
|
||||
</x-slot>
|
||||
|
||||
@stack('invoice_button_start')
|
||||
@can('create-sales-invoices')
|
||||
<a class="dropdown-item" id="create_invoice" href="{{ route('customers.create-invoice', $customer->id) }}">
|
||||
{{ trans('invoices.create_invoice') }}
|
||||
</a>
|
||||
@endcan
|
||||
@stack('invoice_button_end')
|
||||
|
||||
@stack('revenue_button_start')
|
||||
@can('create-sales-revenues')
|
||||
<a class="dropdown-item" id="create_revenue" href="{{ route('customers.create-revenue', $customer->id) }}">
|
||||
{{ trans('revenues.create_revenue') }}
|
||||
</a>
|
||||
@endcan
|
||||
@stack('revenue_button_end')
|
||||
|
||||
<div class="dropdown-divider"></div>
|
||||
|
||||
@stack('delete_button_start')
|
||||
@can('delete-sales-customers')
|
||||
{!! Form::deleteLink($customer, 'customers.destroy') !!}
|
||||
@endcan
|
||||
@stack('delete_button_end')
|
||||
|
||||
@stack('button_dropdown_end')
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@stack('edit_button_start')
|
||||
@can('update-sales-customers')
|
||||
<a href="{{ route('customers.edit', $customer->id) }}" class="btn btn-white btn-sm">
|
||||
{{ trans('general.edit') }}
|
||||
</a>
|
||||
@endcan
|
||||
@stack('edit_button_end')
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<div class="row">
|
||||
<div class="col-xl-3">
|
||||
<ul class="list-group mb-4">
|
||||
@stack('customer_invoices_count_start')
|
||||
<li class="list-group-item d-flex justify-content-between align-items-center border-0">
|
||||
{{ trans_choice('general.invoices', 2) }}
|
||||
<span class="badge badge-primary badge-pill">{{ $counts['invoices'] }}</span>
|
||||
</li>
|
||||
@stack('customer_invoices_count_end')
|
||||
|
||||
@stack('customer_transactions_count_start')
|
||||
<li class="list-group-item d-flex justify-content-between align-items-center border-0 border-top-1">
|
||||
{{ trans_choice('general.transactions', 2) }}
|
||||
<span class="badge badge-primary badge-pill">{{ $counts['transactions'] }}</span>
|
||||
</li>
|
||||
@stack('customer_transactions_count_end')
|
||||
</ul>
|
||||
|
||||
<ul class="list-group mb-4">
|
||||
@stack('customer_email_start')
|
||||
<li class="list-group-item border-0">
|
||||
<div class="font-weight-600">{{ trans('general.email') }}</div>
|
||||
<div><small class="long-texts" title="{{ $customer->email }}">{{ $customer->email }}</small></div>
|
||||
</li>
|
||||
@stack('customer_email_end')
|
||||
|
||||
@stack('customer_phone_start')
|
||||
<li class="list-group-item border-0 border-top-1">
|
||||
<div class="font-weight-600">{{ trans('general.phone') }}</div>
|
||||
<div><small class="long-texts" title="{{ $customer->phone }}">{{ $customer->phone }}</small></div>
|
||||
</li>
|
||||
@stack('customer_phone_end')
|
||||
|
||||
@stack('customer_website_start')
|
||||
<li class="list-group-item border-0 border-top-1">
|
||||
<div class="font-weight-600">{{ trans('general.website') }}</div>
|
||||
<div><small class="long-texts" title="{{ $customer->website }}">{{ $customer->website }}</small></div>
|
||||
</li>
|
||||
@stack('customer_website_end')
|
||||
|
||||
@stack('customer_tax_number_start')
|
||||
<li class="list-group-item border-0 border-top-1">
|
||||
<div class="font-weight-600">{{ trans('general.tax_number') }}</div>
|
||||
<div><small class="long-texts" title="{{ $customer->tax_number }}">{{ $customer->tax_number }}</small></div>
|
||||
</li>
|
||||
@stack('customer_tax_number_end')
|
||||
|
||||
@stack('customer_address_start')
|
||||
<li class="list-group-item border-0 border-top-1">
|
||||
<div class="font-weight-600">{{ trans('general.address') }}</div>
|
||||
<div><small>{{ $customer->address }}</small></div>
|
||||
<div><small>{{ $customer->location }}</small></div>
|
||||
</li>
|
||||
@stack('customer_address_end')
|
||||
|
||||
@if ($customer->reference)
|
||||
@stack('customer_reference_start')
|
||||
<li class="list-group-item border-0 border-top-1">
|
||||
<div class="font-weight-600">{{ trans('general.reference') }}</div>
|
||||
<div><small class="long-texts" title="{{ $customer->reference }}">{{ $customer->reference }}</small></div>
|
||||
</li>
|
||||
@stack('customer_reference_end')
|
||||
@endif
|
||||
</ul>
|
||||
|
||||
@stack('customer_edit_button_start')
|
||||
@stack('customer_edit_button_end')
|
||||
</div>
|
||||
|
||||
<div class="col-xl-9">
|
||||
<div class="row mb--3">
|
||||
@stack('customer_paid_card_start')
|
||||
<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>
|
||||
@stack('customer_paid_card_end')
|
||||
|
||||
@stack('customer_open_card_start')
|
||||
<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('widgets.open_invoices') }}</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>
|
||||
@stack('customer_open_card_end')
|
||||
|
||||
@stack('customer_overdue_card_start')
|
||||
<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('widgets.overdue_invoices') }}</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>
|
||||
@stack('customer_overdue_card_end')
|
||||
</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">
|
||||
@stack('customer_invoices_tab_start')
|
||||
<li class="nav-item">
|
||||
<a class="nav-link mb-sm-3 mb-md-0 active" id="invoices-tab" data-toggle="tab" href="#invoices-content" role="tab" aria-controls="invoices-content" aria-selected="true">
|
||||
{{ trans_choice('general.invoices', 2) }}
|
||||
</a>
|
||||
</li>
|
||||
@stack('customer_invoices_tab_end')
|
||||
|
||||
@stack('customer_transactions_tab_start')
|
||||
<li class="nav-item">
|
||||
<a class="nav-link mb-sm-3 mb-md-0" id="transactions-tab" data-toggle="tab" href="#transactions-content" role="tab" aria-controls="transactions-content" aria-selected="false">
|
||||
{{ trans_choice('general.transactions', 2) }}
|
||||
</a>
|
||||
</li>
|
||||
@stack('customer_transactions_tab_end')
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<div class="tab-content" id="cutomer-tab-content">
|
||||
@stack('customer_invoices_content_start')
|
||||
<div class="tab-pane fade show active" id="invoices-content" role="tabpanel" aria-labelledby="invoices-tab">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-flush table-hover" id="tbl-invoices">
|
||||
<thead class="thead-light">
|
||||
<tr class="row table-head-line">
|
||||
<th class="col-xs-4 col-sm-1">{{ trans_choice('general.numbers', 1) }}</th>
|
||||
<th class="col-xs-4 col-sm-3 text-right">{{ trans('general.amount') }}</th>
|
||||
<th class="col-sm-3 d-none d-sm-block text-left">{{ trans('invoices.invoice_date') }}</th>
|
||||
<th class="col-sm-3 d-none d-sm-block text-left">{{ trans('invoices.due_date') }}</th>
|
||||
<th class="col-xs-4 col-sm-2">{{ trans_choice('general.statuses', 1) }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
@foreach($invoices as $item)
|
||||
<tr class="row align-items-center border-top-1 tr-py">
|
||||
<td class="col-xs-4 col-sm-1"><a href="{{ route('invoices.show', $item->id) }}">{{ $item->document_number }}</a></td>
|
||||
<td class="col-xs-4 col-sm-3 text-right">@money($item->amount, $item->currency_code, true)</td>
|
||||
<td class="col-sm-3 d-none d-sm-block text-left">@date($item->issued_at)</td>
|
||||
<td class="col-sm-3 d-none d-sm-block text-left">@date($item->due_at)</td>
|
||||
<td class="col-xs-4 col-sm-2"><span class="badge badge-pill badge-{{ $item->status_label }} my--2">{{ trans('documents.statuses.' . $item->status) }}</span></td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="card-footer py-4 table-action">
|
||||
<div class="row">
|
||||
@include('partials.admin.pagination', ['items' => $invoices, 'type' => 'invoices'])
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@stack('customer_invoices_content_end')
|
||||
|
||||
@stack('customer_transactions_content_start')
|
||||
<div class="tab-pane fade" id="transactions-content" role="tabpanel" aria-labelledby="transactions-tab">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-flush table-hover" id="tbl-transactions">
|
||||
<thead class="thead-light">
|
||||
<tr class="row table-head-line">
|
||||
<th class="col-xs-6 col-sm-2">{{ trans('general.date') }}</th>
|
||||
<th class="col-xs-6 col-sm-2 text-right">{{ trans('general.amount') }}</th>
|
||||
<th class="col-sm-4 d-none d-sm-block">{{ trans_choice('general.categories', 1) }}</th>
|
||||
<th class="col-sm-4 d-none d-sm-block">{{ trans_choice('general.accounts', 1) }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
@foreach($transactions as $item)
|
||||
<tr class="row align-items-center border-top-1 tr-py">
|
||||
<td class="col-xs-6 col-sm-2"><a href="{{ route('revenues.show', $item->id) }}">@date($item->paid_at)</a></td>
|
||||
<td class="col-xs-6 col-sm-2 text-right">@money($item->amount, $item->currency_code, true)</td>
|
||||
<td class="col-sm-4 d-none d-sm-block">{{ $item->category->name }}</td>
|
||||
<td class="col-sm-4 d-none d-sm-block">{{ $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>
|
||||
@stack('customer_transactions_content_end')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('scripts_start')
|
||||
<script src="{{ asset('public/js/sales/customers.js?v=' . version('short')) }}"></script>
|
||||
@endpush
|
||||
<x-contacts.script type="customer" />
|
||||
</x-layouts.admin>
|
||||
|
@ -1,11 +1,17 @@
|
||||
@extends('layouts.admin')
|
||||
<x-layouts.admin>
|
||||
<x-slot name="title">
|
||||
{{ trans('general.title.new', ['type' => setting('invoice.title', trans_choice('general.invoices', 1))]) }}
|
||||
</x-slot>
|
||||
|
||||
@section('title', trans('general.title.new', ['type' => setting('invoice.title', trans_choice('general.invoices', 1))]))
|
||||
<x-slot name="favorite"
|
||||
title="{{ trans('general.title.new', ['type' => setting('invoice.title', trans_choice('general.invoices', 1))]) }}"
|
||||
icon="description"
|
||||
route="invoices.create"
|
||||
></x-slot>
|
||||
|
||||
@section('content')
|
||||
<x-documents.form.content type="invoice" />
|
||||
@endsection
|
||||
<x-slot name="content">
|
||||
<x-documents.form.content type="invoice" />
|
||||
</x-slot>
|
||||
|
||||
@push('scripts_start')
|
||||
<x-documents.script type="invoice" />
|
||||
@endpush
|
||||
</x-layouts.admin>
|
||||
|
@ -1,11 +1,11 @@
|
||||
@extends('layouts.admin')
|
||||
<x-layouts.admin>
|
||||
<x-slot name="title">
|
||||
{{ trans('general.title.edit', ['type' => trans_choice('general.invoices', 1)]) }}
|
||||
</x-slot>
|
||||
|
||||
@section('title', trans('general.title.edit', ['type' => trans_choice('general.invoices', 1)]))
|
||||
<x-slot name="content">
|
||||
<x-documents.form.content type="invoice" :document="$invoice" />
|
||||
</x-slot>
|
||||
|
||||
@section('content')
|
||||
<x-documents.form.content type="invoice" :document="$invoice" />
|
||||
@endsection
|
||||
|
||||
@push('scripts_start')
|
||||
<x-documents.script type="invoice" :items="$invoice->items()->get()" :document="$invoice" />
|
||||
@endpush
|
||||
</x-layouts.admin>
|
||||
|
@ -1,15 +1,25 @@
|
||||
@extends('layouts.admin')
|
||||
<x-layouts.admin>
|
||||
<x-slot name="title">
|
||||
{{ trans_choice('general.invoices', 2) }}
|
||||
</x-slot>
|
||||
|
||||
@section('title', trans_choice('general.invoices', 2))
|
||||
<x-slot name="favorite"
|
||||
title="{{ trans_choice('general.invoices', 2) }}"
|
||||
icon="description"
|
||||
route="invoices.index"
|
||||
></x-slot>
|
||||
|
||||
@section('new_button')
|
||||
<x-documents.index.top-buttons type="invoice" />
|
||||
@endsection
|
||||
<x-slot name="buttons">
|
||||
<x-documents.index.buttons type="invoice" />
|
||||
</x-slot>
|
||||
|
||||
@section('content')
|
||||
<x-documents.index.content type="invoice" :documents="$invoices" />
|
||||
@endsection
|
||||
<x-slot name="moreButtons">
|
||||
<x-documents.index.more-buttons type="invoice" />
|
||||
</x-slot>
|
||||
|
||||
<x-slot name="content">
|
||||
<x-documents.index.content type="invoice" :documents="$invoices" active-tab="invoice" />
|
||||
</x-slot>
|
||||
|
||||
@push('scripts_start')
|
||||
<x-documents.script type="invoice" />
|
||||
@endpush
|
||||
</x-layouts.admin>
|
||||
|
@ -1,10 +1,12 @@
|
||||
@extends('layouts.print')
|
||||
<x-layouts.print>
|
||||
<x-slot name="title">
|
||||
{{ trans_choice('general.invoices', 1) . ': ' . $invoice->document_number }}
|
||||
</x-slot>
|
||||
|
||||
@section('title', trans_choice('general.invoices', 1) . ': ' . $invoice->document_number)
|
||||
|
||||
@section('content')
|
||||
<x-documents.template.classic
|
||||
type="invoice"
|
||||
:document="$invoice"
|
||||
/>
|
||||
@endsection
|
||||
<x-slot name="content">
|
||||
<x-documents.template.classic
|
||||
type="invoice"
|
||||
:document="$invoice"
|
||||
/>
|
||||
</x-slot>
|
||||
</x-layouts.print>
|
||||
|
@ -1,10 +1,12 @@
|
||||
@extends('layouts.print')
|
||||
<x-layouts.print>
|
||||
<x-slot name="title">
|
||||
{{ trans_choice('general.invoices', 1) . ': ' . $invoice->document_number }}
|
||||
</x-slot>
|
||||
|
||||
@section('title', trans_choice('general.invoices', 1) . ': ' . $invoice->document_number)
|
||||
|
||||
@section('content')
|
||||
<x-documents.template.ddefault
|
||||
type="invoice"
|
||||
:document="$invoice"
|
||||
/>
|
||||
@endsection
|
||||
<x-slot name="content">
|
||||
<x-documents.template.ddefault
|
||||
type="invoice"
|
||||
:document="$invoice"
|
||||
/>
|
||||
</x-slot>
|
||||
</x-layouts.print>
|
||||
|
@ -1,10 +1,12 @@
|
||||
@extends('layouts.print')
|
||||
<x-layouts.print>
|
||||
<x-slot name="title">
|
||||
{{ trans_choice('general.invoices', 1) . ': ' . $invoice->document_number }}
|
||||
</x-slot>
|
||||
|
||||
@section('title', trans_choice('general.invoices', 1) . ': ' . $invoice->document_number)
|
||||
|
||||
@section('content')
|
||||
<x-documents.template.modern
|
||||
type="invoice"
|
||||
:document="$invoice"
|
||||
/>
|
||||
@endsection
|
||||
<x-slot name="content">
|
||||
<x-documents.template.modern
|
||||
type="invoice"
|
||||
:document="$invoice"
|
||||
/>
|
||||
</x-slot>
|
||||
</x-layouts.print>
|
||||
|
@ -1,17 +1,27 @@
|
||||
@extends('layouts.admin')
|
||||
<x-layouts.admin>
|
||||
<x-slot name="title">
|
||||
{{ setting('invoice.title', trans_choice('general.invoices', 1)) . ': ' . $invoice->document_number }}
|
||||
</x-slot>
|
||||
|
||||
@section('title', setting('invoice.title', trans_choice('general.invoices', 1)) . ': ' . $invoice->document_number)
|
||||
<x-slot name="status">
|
||||
<x-show.status status="{{ $invoice->status }}" background-color="bg-{{ $invoice->status_label }}" text-color="text-text-{{ $invoice->status_label }}" />
|
||||
</x-slot>
|
||||
|
||||
@section('new_button')
|
||||
<x-documents.show.top-buttons type="invoice" :document="$invoice" />
|
||||
@endsection
|
||||
<x-slot name="buttons">
|
||||
<x-documents.show.buttons type="invoice" :document="$invoice" />
|
||||
</x-slot>
|
||||
|
||||
@section('content')
|
||||
<x-documents.show.content type="invoice" :document="$invoice" hide-button-received />
|
||||
@endsection
|
||||
<x-slot name="moreButtons">
|
||||
<x-documents.show.more-buttons type="invoice" :document="$invoice" />
|
||||
</x-slot>
|
||||
|
||||
@push('scripts_start')
|
||||
<link rel="stylesheet" href="{{ asset('public/css/print.css?v=' . version('short')) }}" type="text/css">
|
||||
<x-slot name="content">
|
||||
<x-documents.show.content type="invoice" :document="$invoice" hide-receive hide-make-payment hide-schedule hide-children />
|
||||
</x-slot>
|
||||
|
||||
@push('stylesheet')
|
||||
<link rel="stylesheet" href="{{ asset('public/css/print.css?v=' . version('short')) }}" type="text/css">
|
||||
@endpush
|
||||
|
||||
<x-documents.script type="invoice" />
|
||||
@endpush
|
||||
</x-layouts.admin>
|
||||
|
17
resources/views/sales/recurring_invoices/create.blade.php
Normal file
17
resources/views/sales/recurring_invoices/create.blade.php
Normal file
@ -0,0 +1,17 @@
|
||||
<x-layouts.admin>
|
||||
<x-slot name="title">
|
||||
{{ trans('general.title.new', ['type' => trans_choice('general.recurring_invoices', 1)]) }}
|
||||
</x-slot>
|
||||
|
||||
<x-slot name="favorite"
|
||||
title="{{ trans('general.title.new', ['type' => trans_choice('general.recurring_invoices', 1)]) }}"
|
||||
icon="request_quote"
|
||||
url="{{ route('recurring-invoices.create') }}"
|
||||
></x-slot>
|
||||
|
||||
<x-slot name="content">
|
||||
<x-documents.form.content type="invoice-recurring" show-recurring hide-send-to />
|
||||
</x-slot>
|
||||
|
||||
<x-documents.script type="invoice-recurring" />
|
||||
</x-layouts.admin>
|
11
resources/views/sales/recurring_invoices/edit.blade.php
Normal file
11
resources/views/sales/recurring_invoices/edit.blade.php
Normal file
@ -0,0 +1,11 @@
|
||||
<x-layouts.admin>
|
||||
<x-slot name="title">
|
||||
{{ trans('general.title.edit', ['type' => trans_choice('general.recurring_invoices', 1)]) }}
|
||||
</x-slot>
|
||||
|
||||
<x-slot name="content">
|
||||
<x-documents.form.content type="invoice-recurring" :document="$recurring_invoice" show-recurring hide-send-to />
|
||||
</x-slot>
|
||||
|
||||
<x-documents.script type="invoice-recurring" :document="$recurring_invoice" :items="$recurring_invoice->items()->get()" />
|
||||
</x-layouts.admin>
|
31
resources/views/sales/recurring_invoices/index.blade.php
Normal file
31
resources/views/sales/recurring_invoices/index.blade.php
Normal file
@ -0,0 +1,31 @@
|
||||
<x-layouts.admin>
|
||||
<x-slot name="title">
|
||||
{{ trans_choice('general.recurring_templates', 2) }}
|
||||
</x-slot>
|
||||
|
||||
<x-slot name="favorite"
|
||||
title="{{ trans_choice('general.recurring_templates', 2) }}"
|
||||
icon="receipt_long"
|
||||
route="recurring-invoices.index"
|
||||
></x-slot>
|
||||
|
||||
<x-slot name="buttons">
|
||||
<x-documents.index.buttons type="invoice-recurring" />
|
||||
</x-slot>
|
||||
|
||||
<x-slot name="moreButtons">
|
||||
<x-documents.index.more-buttons type="invoice-recurring" hide-export />
|
||||
</x-slot>
|
||||
|
||||
<x-slot name="content">
|
||||
<x-documents.index.content type="invoice-recurring"
|
||||
page="recurring_templates"
|
||||
:documents="$invoices"
|
||||
tab-active="recurring-templates"
|
||||
hide-summary
|
||||
hide-bulk-action
|
||||
/>
|
||||
</x-slot>
|
||||
|
||||
<x-documents.script type="invoice-recurring" />
|
||||
</x-layouts.admin>
|
39
resources/views/sales/recurring_invoices/show.blade.php
Normal file
39
resources/views/sales/recurring_invoices/show.blade.php
Normal file
@ -0,0 +1,39 @@
|
||||
<x-layouts.admin>
|
||||
<x-slot name="title">
|
||||
{{ trans_choice('general.recurring_invoices', 1) . ': ' . $recurring_invoice->document_number }}
|
||||
</x-slot>
|
||||
|
||||
<x-slot name="status">
|
||||
<x-show.status status="{{ ! empty($recurring_invoice->recurring) ? $recurring_invoice->recurring->status : 'ended' }}" background-color="bg-{{ $recurring_invoice->recurring_status_label }}" text-color="text-text-{{ $recurring_invoice->recurring_status_label }}" />
|
||||
</x-slot>
|
||||
|
||||
<x-slot name="buttons">
|
||||
<x-documents.show.buttons type="invoice-recurring" :document="$recurring_invoice" />
|
||||
</x-slot>
|
||||
|
||||
<x-slot name="moreButtons">
|
||||
<x-documents.show.more-buttons
|
||||
type="invoice-recurring"
|
||||
:document="$recurring_invoice"
|
||||
hide-divider1
|
||||
hide-divider2
|
||||
hide-divider3
|
||||
hide-email
|
||||
hide-share
|
||||
hide-customize
|
||||
hide-print
|
||||
hide-pdf
|
||||
hide-cancel
|
||||
/>
|
||||
</x-slot>
|
||||
|
||||
<x-slot name="content">
|
||||
<x-documents.show.content type="invoice-recurring" :document="$recurring_invoice" hide-status-message hide-send hide-get-paid hide-receive hide-make-payment />
|
||||
</x-slot>
|
||||
|
||||
@push('stylesheet')
|
||||
<link rel="stylesheet" href="{{ asset('public/css/print.css?v=' . version('short')) }}" type="text/css">
|
||||
@endpush
|
||||
|
||||
<x-documents.script type="invoice-recurring" />
|
||||
</x-layouts.admin>
|
@ -1,60 +0,0 @@
|
||||
@extends('layouts.admin')
|
||||
|
||||
@section('title', trans('general.title.new', ['type' => trans_choice('general.revenues', 1)]))
|
||||
|
||||
@section('content')
|
||||
<div class="card">
|
||||
{!! Form::open([
|
||||
'route' => 'revenues.store',
|
||||
'id' => 'transaction',
|
||||
'@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::dateGroup('paid_at', trans('general.date'), 'calendar', ['id' => 'paid_at', 'required' => 'required', 'show-date-format' => company_date_format(), 'date-format' => 'Y-m-d', 'autocomplete' => 'off'], request()->get('paid_at', Date::now()->toDateString())) }}
|
||||
|
||||
{!! Form::hidden('currency_code', $account_currency_code, ['id' => 'currency_code', 'class' => 'form-control', 'required' => 'required']) !!}
|
||||
{!! Form::hidden('currency_rate', '1', ['id' => 'currency_rate']) !!}
|
||||
|
||||
{{ Form::moneyGroup('amount', trans('general.amount'), 'money-bill-alt', ['required' => 'required', 'autofocus' => 'autofocus', 'currency' => $currency, 'dynamic-currency' => 'currency'], 0) }}
|
||||
|
||||
{{ Form::selectAddNewGroup('account_id', trans_choice('general.accounts', 1), 'university', $accounts, setting('default.account'), ['required' => 'required', 'path' => route('modals.accounts.create'), 'change' => 'onChangeAccount']) }}
|
||||
|
||||
{{ Form::selectRemoteAddNewGroup('contact_id', trans_choice('general.customers', 1), 'user', $customers, old('contact.id', old('contact_id', null)), ['path' => route('modals.customers.create'), 'remote_action' => route('customers.index')]) }}
|
||||
|
||||
{{ Form::textareaGroup('description', trans('general.description')) }}
|
||||
|
||||
{{ Form::selectRemoteAddNewGroup('category_id', trans_choice('general.categories', 1), 'folder', $categories, setting('default.income_category'), ['required' => 'required', 'path' => route('modals.categories.create') . '?type=income', 'remote_action' => route('categories.index'). '?search=type:income enabled:1']) }}
|
||||
|
||||
{{ Form::recurring('create') }}
|
||||
|
||||
{{ Form::selectGroup('payment_method', trans_choice('general.payment_methods', 1), 'credit-card', $payment_methods, setting('default.payment_method')) }}
|
||||
|
||||
{{ Form::textGroup('reference', trans('general.reference'), 'file', []) }}
|
||||
|
||||
{{ Form::selectGroup('document_id', trans_choice('general.invoices', 1), 'file-invoice', [], null, ['disabled' => 'true']) }}
|
||||
|
||||
{{ Form::fileGroup('attachment', trans('general.attachment'), '', ['dropzone-class' => 'w-100', 'multiple' => 'multiple', 'options' => ['acceptedFiles' => $file_types]], null, 'col-md-12') }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card-footer">
|
||||
<div class="row save-buttons">
|
||||
{{ Form::saveButtons('revenues.index') }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{ Form::hidden('type', 'income') }}
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('scripts_start')
|
||||
<script src="{{ asset('public/js/banking/transactions.js?v=' . version('short')) }}"></script>
|
||||
@endpush
|
@ -1,84 +0,0 @@
|
||||
@extends('layouts.admin')
|
||||
|
||||
@section('title', trans('general.title.edit', ['type' => trans_choice('general.revenues', 1)]))
|
||||
|
||||
@section('content')
|
||||
@if (($recurring = $revenue->recurring) && ($next = $recurring->getNextRecurring()))
|
||||
<div class="media mb-3">
|
||||
<div class="media-body">
|
||||
<div class="media-comment-text">
|
||||
<div class="d-flex">
|
||||
<h5 class="mt-0">{{ trans('recurring.recurring') }}</h5>
|
||||
</div>
|
||||
|
||||
<p class="text-sm lh-160 mb-0">{{ trans('recurring.message', [
|
||||
'type' => mb_strtolower(trans_choice('general.revenues', 1)),
|
||||
'date' => $next->format($date_format)
|
||||
]) }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="card">
|
||||
{!! Form::model($revenue, [
|
||||
'method' => 'PATCH',
|
||||
'files' => true,
|
||||
'route' => ['revenues.update', $revenue->id],
|
||||
'role' => 'form',
|
||||
'id' => 'transaction',
|
||||
'@submit.prevent' => 'onSubmit',
|
||||
'@keydown' => 'form.errors.clear($event.target.name)',
|
||||
'class' => 'form-loading-button',
|
||||
'novalidate' => 'true'
|
||||
]) !!}
|
||||
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
{{ Form::dateGroup('paid_at', trans('general.date'), 'calendar', ['id' => 'paid_at', 'required' => 'required', 'show-date-format' => company_date_format(), 'date-format' => 'Y-m-d', 'autocomplete' => 'off'], Date::parse($revenue->paid_at)->toDateString()) }}
|
||||
|
||||
{!! Form::hidden('currency_code', $revenue->currency_code, ['id' => 'currency_code', 'class' => 'form-control', 'required' => 'required']) !!}
|
||||
{!! Form::hidden('currency_rate', null, ['id' => 'currency_rate']) !!}
|
||||
|
||||
{{ Form::moneyGroup('amount', trans('general.amount'), 'money-bill-alt', ['required' => 'required', 'autofocus' => 'autofocus', 'currency' => $currency, 'dynamic-currency' => 'currency'], $revenue->amount) }}
|
||||
|
||||
{{ Form::selectAddNewGroup('account_id', trans_choice('general.accounts', 1), 'university', $accounts, $revenue->account_id, ['required' => 'required', 'path' => route('modals.accounts.create'), 'change' => 'onChangeAccount']) }}
|
||||
|
||||
{{ Form::selectRemoteAddNewGroup('contact_id', trans_choice('general.customers', 1), 'user', $customers, $revenue->contact_id, ['path' => route('modals.customers.create'), 'remote_action' => route('customers.index')]) }}
|
||||
|
||||
{{ Form::textareaGroup('description', trans('general.description')) }}
|
||||
|
||||
{{ Form::selectRemoteAddNewGroup('category_id', trans_choice('general.categories', 1), 'folder', $categories, $revenue->category_id, ['required' => 'required', 'path' => route('modals.categories.create') . '?type=income', 'remote_action' => route('categories.index'). '?search=type:income enabled:1']) }}
|
||||
|
||||
{{ Form::recurring('edit', $revenue) }}
|
||||
|
||||
{{ Form::selectGroup('payment_method', trans_choice('general.payment_methods', 1), 'credit-card', $payment_methods, $revenue->payment_method) }}
|
||||
|
||||
{{ Form::textGroup('reference', trans('general.reference'), 'file',[]) }}
|
||||
|
||||
@if ($revenue->invoice)
|
||||
{{ Form::textGroup('document', trans_choice('general.invoices', 1), 'file-invoice', ['disabled' => 'true'], $revenue->invoice->document_number) }}
|
||||
{{ Form::hidden('document_id', $revenue->invoice->id) }}
|
||||
@endif
|
||||
|
||||
{{ Form::fileGroup('attachment', trans('general.attachment'), '', ['dropzone-class' => 'w-100', 'multiple' => 'multiple', 'options' => ['acceptedFiles' => $file_types]], $revenue->attachment, 'col-md-12') }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@can('update-sales-revenues')
|
||||
<div class="card-footer">
|
||||
<div class="row save-buttons">
|
||||
{{ Form::saveButtons('revenues.index') }}
|
||||
</div>
|
||||
</div>
|
||||
@endcan
|
||||
|
||||
{{ Form::hidden('type', 'income') }}
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('scripts_start')
|
||||
<script src="{{ asset('public/js/banking/transactions.js?v=' . version('short')) }}"></script>
|
||||
@endpush
|
@ -1,136 +0,0 @@
|
||||
@extends('layouts.admin')
|
||||
|
||||
@section('title', trans_choice('general.revenues', 2))
|
||||
|
||||
@section('new_button')
|
||||
@can('create-sales-revenues')
|
||||
<a href="{{ route('revenues.create') }}" class="btn btn-success btn-sm">{{ trans('general.add_new') }}</a>
|
||||
<a href="{{ route('import.create', ['group' => 'sales', 'type' => 'revenues']) }}" class="btn btn-white btn-sm">{{ trans('import.import') }}</a>
|
||||
@endcan
|
||||
<a href="{{ route('revenues.export', request()->input()) }}" class="btn btn-white btn-sm">{{ trans('general.export') }}</a>
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
@if ($revenues->count() || request()->get('search', false))
|
||||
<div class="card">
|
||||
<div class="card-header border-bottom-0" :class="[{'bg-gradient-primary': bulk_action.show}]">
|
||||
{!! Form::open([
|
||||
'method' => 'GET',
|
||||
'route' => 'revenues.index',
|
||||
'role' => 'form',
|
||||
'class' => 'mb-0'
|
||||
]) !!}
|
||||
<div class="align-items-center" v-if="!bulk_action.show">
|
||||
<x-search-string model="App\Models\Sale\Revenue" />
|
||||
</div>
|
||||
|
||||
{{ Form::bulkActionRowGroup('general.revenues', $bulk_actions, ['group' => 'sales', 'type' => 'revenues']) }}
|
||||
{!! 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-2 col-lg-1 col-xl-1 d-none d-sm-block">{{ Form::bulkActionAllGroup() }}</th>
|
||||
<th class="col-xs-4 col-sm-4 col-md-3 col-lg-1 col-xl-1">@sortablelink('paid_at', trans('general.date'), ['filter' => 'active, visible'], ['class' => 'col-aka', 'rel' => 'nofollow'])</th>
|
||||
<th class="col-xs-4 col-sm-4 col-md-3 col-lg-2 col-xl-2 text-right">@sortablelink('amount', trans('general.amount'))</th>
|
||||
<th class="col-md-2 col-lg-3 col-xl-3 d-none d-md-block text-left">@sortablelink('contact.name', trans_choice('general.customers', 1))</th>
|
||||
<th class="col-lg-2 col-xl-2 d-none d-lg-block text-left">@sortablelink('category.name', trans_choice('general.categories', 1))</th>
|
||||
<th class="col-lg-2 col-xl-2 d-none d-lg-block text-left">@sortablelink('account.name', trans_choice('general.accounts', 1))</th>
|
||||
<th class="col-xs-4 col-sm-2 col-md-2 col-lg-1 col-xl-1 text-center"><a>{{ trans('general.actions') }}</a></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
@foreach($revenues as $item)
|
||||
<tr class="row align-items-center border-top-1">
|
||||
<td class="col-sm-2 col-md-2 col-lg-1 col-xl-1 d-none d-sm-block">{{ Form::bulkActionGroup($item->id, $item->contact->name) }}</td>
|
||||
<td class="col-xs-4 col-sm-4 col-md-3 col-lg-1 col-xl-1">
|
||||
@if ($item->reconciled)
|
||||
<a class="col-aka" href="#">@date($item->paid_at)</a>
|
||||
@else
|
||||
<a class="col-aka" href="{{ route('revenues.show', $item->id) }}">@date($item->paid_at)</a>
|
||||
@endif
|
||||
@if ($item->recurring)
|
||||
<i class="fas fa-redo-alt fa-xs" title="{{ trans('recurring.recurring') }}"></i>
|
||||
@endif
|
||||
</td>
|
||||
<td class="col-xs-4 col-sm-4 col-md-3 col-lg-2 col-xl-2 text-right">@money($item->amount, $item->currency_code, true)</td>
|
||||
<td class="col-md-2 col-lg-3 col-xl-3 d-none d-md-block text-left">
|
||||
{{ $item->contact->name }}
|
||||
|
||||
@if ($item->invoice)
|
||||
@if ($item->invoice->status == 'paid')
|
||||
<el-tooltip content="{{ $item->invoice->document_number }} / {{ trans('documents.statuses.paid') }}"
|
||||
effect="success"
|
||||
:open-delay="100"
|
||||
placement="top">
|
||||
<span class="badge badge-dot pl-2 h-0">
|
||||
<i class="bg-success"></i>
|
||||
</span>
|
||||
</el-tooltip>
|
||||
@elseif ($item->invoice->status == 'partial')
|
||||
<el-tooltip content="{{ $item->invoice->document_number }} / {{ trans('documents.statuses.partial') }}"
|
||||
effect="info"
|
||||
:open-delay="100"
|
||||
placement="top">
|
||||
<span class="badge badge-dot pl-2 h-0">
|
||||
<i class="bg-info"></i>
|
||||
</span>
|
||||
</el-tooltip>
|
||||
@endif
|
||||
@endif
|
||||
</td>
|
||||
<td class="col-lg-2 col-xl-2 d-none d-lg-block text-left long-texts">{{ $item->category->name }}</td>
|
||||
<td class="col-lg-2 col-xl-2 d-none d-lg-block text-left long-texts">{{ $item->account->name }}</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('revenues.show', $item->id) }}">{{ trans('general.show') }}</a>
|
||||
|
||||
@if (!$item->reconciled)
|
||||
@can('update-sales-revenues')
|
||||
<a class="dropdown-item" href="{{ route('revenues.edit', $item->id) }}">{{ trans('general.edit') }}</a>
|
||||
<div class="dropdown-divider"></div>
|
||||
@endcan
|
||||
@endif
|
||||
|
||||
@if (empty($item->document_id))
|
||||
@can('create-sales-revenues')
|
||||
<a class="dropdown-item" href="{{ route('revenues.duplicate', $item->id) }}">{{ trans('general.duplicate') }}</a>
|
||||
<div class="dropdown-divider"></div>
|
||||
@endcan
|
||||
@endif
|
||||
|
||||
@if (!$item->reconciled)
|
||||
@can('delete-sales-revenues')
|
||||
{!! Form::deleteLink($item, 'revenues.destroy') !!}
|
||||
@endcan
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="card-footer table-action">
|
||||
<div class="row">
|
||||
@include('partials.admin.pagination', ['items' => $revenues])
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@else
|
||||
<x-empty-page group="sales" page="revenues" />
|
||||
@endif
|
||||
@endsection
|
||||
|
||||
@push('scripts_start')
|
||||
<script src="{{ asset('public/js/banking/transactions.js?v=' . version('short')) }}"></script>
|
||||
@endpush
|
@ -1,10 +0,0 @@
|
||||
@extends('layouts.print')
|
||||
|
||||
@section('title', trans_choice('general.revenues', 1) . ': ' . $revenue->id)
|
||||
|
||||
@section('content')
|
||||
<x-transactions.template.ddefault
|
||||
type="revenue"
|
||||
:transaction="$revenue"
|
||||
/>
|
||||
@endsection
|
@ -1,17 +0,0 @@
|
||||
@extends('layouts.admin')
|
||||
|
||||
@section('title', trans('revenues.revenue_received'))
|
||||
|
||||
@section('new_button')
|
||||
<x-transactions.show.top-buttons type="income" :transaction="$revenue" />
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<x-transactions.show.content type="income" :transaction="$revenue" />
|
||||
@endsection
|
||||
|
||||
@push('scripts_start')
|
||||
<link rel="stylesheet" href="{{ asset('public/css/print.css?v=' . version('short')) }}" type="text/css">
|
||||
|
||||
<x-transactions.script type="income" />
|
||||
@endpush
|
Reference in New Issue
Block a user