Merge branch 'master' of github.com:akaunting/akaunting
This commit is contained in:
commit
f9b5611611
@ -107,35 +107,53 @@ abstract class Import implements HasLocalePreference, ShouldQueue, SkipsEmptyRow
|
|||||||
protected function replaceForBatchRules(array $rules): array
|
protected function replaceForBatchRules(array $rules): array
|
||||||
{
|
{
|
||||||
$dependent_rules = [
|
$dependent_rules = [
|
||||||
'after',
|
'after:',
|
||||||
'after_or_equal',
|
'after_or_equal:',
|
||||||
'before',
|
'before:',
|
||||||
'before_or_equal',
|
'before_or_equal:',
|
||||||
'different',
|
'different:',
|
||||||
'exclude_if',
|
'exclude_if:',
|
||||||
'exclude_unless',
|
'exclude_unless:',
|
||||||
'gt',
|
'gt:',
|
||||||
'gte',
|
'gte:',
|
||||||
'in_array',
|
'in_array:',
|
||||||
'lt',
|
'lt:',
|
||||||
'lte',
|
'lte:',
|
||||||
'prohibited_if',
|
'prohibited_if:',
|
||||||
'prohibited_unless',
|
'prohibited_unless:',
|
||||||
'required_if',
|
'required_if:',
|
||||||
'required_unless',
|
'required_unless:',
|
||||||
'required_with',
|
'required_with:',
|
||||||
'required_with_all',
|
'required_with_all:',
|
||||||
'required_without',
|
'required_without:',
|
||||||
'required_without_all',
|
'required_without_all:',
|
||||||
'same',
|
'same:',
|
||||||
];
|
];
|
||||||
|
|
||||||
foreach ($rules as $field => $rule) {
|
$batch_rules = [
|
||||||
foreach ($dependent_rules as $dependent_rule) {
|
'after:*.',
|
||||||
$rules[$field] = Str::replaceFirst($dependent_rule . ':', $dependent_rule . ':*.', $rules[$field]);
|
'after_or_equal:*.',
|
||||||
}
|
'before:*.',
|
||||||
}
|
'before_or_equal:*.',
|
||||||
|
'different:*.',
|
||||||
|
'exclude_if:*.',
|
||||||
|
'exclude_unless:*.',
|
||||||
|
'gt:*.',
|
||||||
|
'gte:*.',
|
||||||
|
'in_array:*.',
|
||||||
|
'lt:*.',
|
||||||
|
'lte:*.',
|
||||||
|
'prohibited_if:*.',
|
||||||
|
'prohibited_unless:*.',
|
||||||
|
'required_if:*.',
|
||||||
|
'required_unless:*.',
|
||||||
|
'required_with:*.',
|
||||||
|
'required_with_all:*.',
|
||||||
|
'required_without:*.',
|
||||||
|
'required_without_all:*.',
|
||||||
|
'same:*.',
|
||||||
|
];
|
||||||
|
|
||||||
return $rules;
|
return str_replace($dependent_rules, $batch_rules, $rules);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -327,4 +327,11 @@ class Customers extends Controller
|
|||||||
|
|
||||||
return redirect()->route('invoices.create')->withInput($data);
|
return redirect()->route('invoices.create')->withInput($data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function createRevenue(Contact $customer)
|
||||||
|
{
|
||||||
|
$data['contact'] = $customer;
|
||||||
|
|
||||||
|
return redirect()->route('revenues.create')->withInput($data);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div :id="'search-field-' + _uid" class="searh-field tags-input__wrapper">
|
<div :id="'search-field-' + _uid" class="searh-field tags-input__wrapper" :style="[!search_hidden ? {'height': '0px'} : {'height': 'auto'}]">
|
||||||
<div class="tags-group" v-for="(filter, index) in filtered" :index="index">
|
<div class="tags-group" v-for="(filter, index) in filtered" :index="index">
|
||||||
<span v-if="filter.option" class="el-tag el-tag--primary el-tag--small el-tag--light el-tag-option">
|
<span v-if="filter.option" class="el-tag el-tag--primary el-tag--small el-tag--light el-tag-option">
|
||||||
{{ filter.option }}
|
{{ filter.option }}
|
||||||
@ -148,7 +148,8 @@ export default {
|
|||||||
description: 'List of filters'
|
description: 'List of filters'
|
||||||
},
|
},
|
||||||
|
|
||||||
dateConfig: null,
|
dateConfig: null
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
model: {
|
model: {
|
||||||
@ -177,10 +178,20 @@ export default {
|
|||||||
values: [],
|
values: [],
|
||||||
current_value: null,
|
current_value: null,
|
||||||
show_date: false,
|
show_date: false,
|
||||||
|
search_hidden: false
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
|
searchBoxShow() {
|
||||||
|
if(document.querySelector('.js-search-input-box')) {
|
||||||
|
let search_box_html = document.querySelector('.js-search-input-box');
|
||||||
|
search_box_html.remove();
|
||||||
|
}
|
||||||
|
|
||||||
|
this.search_hidden = true;
|
||||||
|
},
|
||||||
|
|
||||||
onInputFocus() {
|
onInputFocus() {
|
||||||
if (!this.filter_list.length) {
|
if (!this.filter_list.length) {
|
||||||
return;
|
return;
|
||||||
@ -577,6 +588,8 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
created() {
|
created() {
|
||||||
|
this.searchBoxShow();
|
||||||
|
|
||||||
let path = window.location.href.replace(window.location.search, '');
|
let path = window.location.href.replace(window.location.search, '');
|
||||||
|
|
||||||
let cookie = Cookies.get('search-string');
|
let cookie = Cookies.get('search-string');
|
||||||
@ -715,6 +728,10 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
mounted() {
|
||||||
|
this.searchBoxShow();
|
||||||
|
},
|
||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
filteredOptions() {
|
filteredOptions() {
|
||||||
this.filter_list.sort(function (a, b) {
|
this.filter_list.sort(function (a, b) {
|
||||||
|
@ -5,5 +5,6 @@ return [
|
|||||||
'revenue_received' => 'Revenue Received',
|
'revenue_received' => 'Revenue Received',
|
||||||
'paid_by' => 'Paid By',
|
'paid_by' => 'Paid By',
|
||||||
'related_invoice' => 'Releated Invoice',
|
'related_invoice' => 'Releated Invoice',
|
||||||
|
'create_revenue' => 'Create Revenue',
|
||||||
|
|
||||||
];
|
];
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
<div class="position-relative js-search-input-box" style="height: 45px;">
|
||||||
|
<div class="border-bottom-0 w-100 position-absolute left-0 right-0" style="z-index: 9;">
|
||||||
|
<input type="text" placeholder="Search or filter results..." class="form-control" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<akaunting-search
|
<akaunting-search
|
||||||
placeholder="{{ (!empty($filters)) ? trans('general.placeholder.search_and_filter') : trans('general.search_placeholder')}}"
|
placeholder="{{ (!empty($filters)) ? trans('general.placeholder.search_and_filter') : trans('general.search_placeholder')}}"
|
||||||
search-text="{{ trans('general.search_text') }}"
|
search-text="{{ trans('general.search_text') }}"
|
||||||
|
@ -13,9 +13,11 @@
|
|||||||
|
|
||||||
@php
|
@php
|
||||||
$vue_key = '@input';
|
$vue_key = '@input';
|
||||||
|
$vue_value = !empty($attributes['v-model']) ? $attributes['v-model'] . ' = $event.target.value' : (!empty($attributes['data-field']) ? 'form.' . $attributes['data-field'] . '.'. $name . ' = $event.target.value' : 'form.' . $name . ' = $event.target.value');
|
||||||
|
|
||||||
if (!empty($attributes['enable-v-model'])) {
|
if (!empty($attributes['enable-v-model'])) {
|
||||||
$vue_key = 'v-model';
|
$vue_key = 'v-model';
|
||||||
|
$vue_value = !empty($attributes['v-model']) ? $attributes['v-model'] : (!empty($attributes['data-field']) ? 'form.' . $attributes['data-field'] . '.'. $name : 'form.' . $name);
|
||||||
}
|
}
|
||||||
@endphp
|
@endphp
|
||||||
|
|
||||||
@ -23,7 +25,7 @@
|
|||||||
'class' => 'form-control',
|
'class' => 'form-control',
|
||||||
'data-name' => $name,
|
'data-name' => $name,
|
||||||
'placeholder' => trans('general.form.enter', ['field' => $text]),
|
'placeholder' => trans('general.form.enter', ['field' => $text]),
|
||||||
$vue_key => !empty($attributes['v-model']) ? $attributes['v-model'] : (!empty($attributes['data-field']) ? 'form.' . $attributes['data-field'] . '.'. $name : 'form.' . $name),
|
$vue_key => $vue_value,
|
||||||
], $attributes)) !!}
|
], $attributes)) !!}
|
||||||
|
|
||||||
<div class="invalid-feedback d-block"
|
<div class="invalid-feedback d-block"
|
||||||
|
@ -47,9 +47,11 @@
|
|||||||
<td class="col-sm-2 col-md-1 col-lg-1 col-xl-1 d-none d-sm-block">
|
<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) }}
|
{{ Form::bulkActionGroup($item->id, $item->name) }}
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td class="col-xs-4 col-sm-3 col-md-4 col-lg-3 col-xl-3">
|
<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>
|
<a class="col-aka long-texts d-block" href="{{ route('customers.show', $item->id) }}">{{ $item->name }}</a>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td class="col-md-3 col-lg-3 col-xl-3 d-none d-md-block long-texts">
|
<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') }}"
|
<el-tooltip content="{{ !empty($item->phone) ? $item->phone : trans('general.na') }}"
|
||||||
effect="dark"
|
effect="dark"
|
||||||
@ -57,9 +59,11 @@
|
|||||||
<span>{{ !empty($item->email) ? $item->email : trans('general.na') }}</span>
|
<span>{{ !empty($item->email) ? $item->email : trans('general.na') }}</span>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td class="col-lg-2 col-xl-2 d-none d-lg-block text-right long-texts">
|
<td class="col-lg-2 col-xl-2 d-none d-lg-block text-right long-texts">
|
||||||
@money($item->unpaid, setting('default.currency'), true)
|
@money($item->unpaid, setting('default.currency'), true)
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td class="col-xs-4 col-sm-2 col-md-2 col-lg-2 col-xl-2 text-center">
|
<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'))
|
@if (user()->can('update-sales-customers'))
|
||||||
{{ Form::enabledGroup($item->id, $item->name, $item->enabled) }}
|
{{ Form::enabledGroup($item->id, $item->name, $item->enabled) }}
|
||||||
@ -71,21 +75,34 @@
|
|||||||
@endif
|
@endif
|
||||||
@endif
|
@endif
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td class="col-xs-4 col-sm-2 col-md-2 col-lg-1 col-xl-1 text-center">
|
<td class="col-xs-4 col-sm-2 col-md-2 col-lg-1 col-xl-1 text-center">
|
||||||
<div class="dropdown">
|
<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">
|
<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>
|
<i class="fa fa-ellipsis-h text-muted"></i>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<div class="dropdown-menu dropdown-menu-right dropdown-menu-arrow">
|
<div class="dropdown-menu dropdown-menu-right dropdown-menu-arrow">
|
||||||
<a class="dropdown-item" href="{{ route('customers.show', $item->id) }}">{{ trans('general.show') }}</a>
|
<a class="dropdown-item" href="{{ route('customers.show', $item->id) }}">
|
||||||
<a class="dropdown-item" href="{{ route('customers.edit', $item->id) }}">{{ trans('general.edit') }}</a>
|
{{ trans('general.show') }}
|
||||||
|
</a>
|
||||||
|
|
||||||
|
@can('create-sales-customers')
|
||||||
|
<a class="dropdown-item" href="{{ route('customers.edit', $item->id) }}">
|
||||||
|
{{ trans('general.edit') }}
|
||||||
|
</a>
|
||||||
|
@endcan
|
||||||
|
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
|
|
||||||
@can('create-sales-customers')
|
@can('create-sales-customers')
|
||||||
<a class="dropdown-item" href="{{ route('customers.duplicate', $item->id) }}">{{ trans('general.duplicate') }}</a>
|
<a class="dropdown-item" href="{{ route('customers.duplicate', $item->id) }}">
|
||||||
|
{{ trans('general.duplicate') }}
|
||||||
|
</a>
|
||||||
|
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
@endcan
|
@endcan
|
||||||
|
|
||||||
@can('delete-sales-customers')
|
@can('delete-sales-customers')
|
||||||
{!! Form::deleteLink($item, 'customers.destroy') !!}
|
{!! Form::deleteLink($item, 'customers.destroy') !!}
|
||||||
@endcan
|
@endcan
|
||||||
|
@ -2,6 +2,62 @@
|
|||||||
|
|
||||||
@section('title', $customer->name)
|
@section('title', $customer->name)
|
||||||
|
|
||||||
|
@section('new_button')
|
||||||
|
<div class="dropup header-drop-top">
|
||||||
|
<button type="button" class="btn btn-white btn-sm" data-toggle="dropdown" aria-expanded="false">
|
||||||
|
<i class="fa fa-chevron-down"></i> {{ trans('general.more_actions') }}
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<div class="dropdown-menu" role="menu">
|
||||||
|
@stack('button_dropdown_start')
|
||||||
|
|
||||||
|
@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')
|
||||||
|
|
||||||
|
<div class="dropdown-divider"></div>
|
||||||
|
|
||||||
|
@stack('invoice_button_start')
|
||||||
|
@can('create-sales-invoices')
|
||||||
|
<a class="dropdown-item" 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" 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')
|
@section('content')
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-xl-3">
|
<div class="col-xl-3">
|
||||||
@ -68,12 +124,7 @@
|
|||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
@stack('customer_edit_button_start')
|
@stack('customer_edit_button_start')
|
||||||
<a href="{{ route('customers.edit', $customer->id) }}" class="btn btn-info btn-block"><b>{{ trans('general.edit') }}</b></a>
|
|
||||||
@stack('customer_edit_button_end')
|
@stack('customer_edit_button_end')
|
||||||
|
|
||||||
@stack('customer_create_invoice_button_start')
|
|
||||||
<a href="{{ route('customers.create-invoice', $customer->id) }}" class="btn btn-white btn-block"><b>{{ trans('invoices.create_invoice') }}</b></a>
|
|
||||||
@stack('customer_create_invoice_button_end')
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-xl-9">
|
<div class="col-xl-9">
|
||||||
@ -131,55 +182,28 @@
|
|||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div class="nav-wrapper">
|
<div class="nav-wrapper">
|
||||||
<ul class="nav nav-pills nav-fill flex-column flex-md-row" id="tabs-icons-text" role="tablist">
|
<ul class="nav nav-pills nav-fill flex-column flex-md-row" id="tabs-icons-text" role="tablist">
|
||||||
@stack('customer_transactions_tab_start')
|
|
||||||
<li class="nav-item">
|
|
||||||
<a class="nav-link mb-sm-3 mb-md-0 active" id="transactions-tab" data-toggle="tab" href="#transactions-content" role="tab" aria-controls="transactions-content" aria-selected="true">{{ trans_choice('general.transactions', 2) }}</a>
|
|
||||||
</li>
|
|
||||||
@stack('customer_transactions_tab_end')
|
|
||||||
|
|
||||||
@stack('customer_invoices_tab_start')
|
@stack('customer_invoices_tab_start')
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link mb-sm-3 mb-md-0" id="invoices-tab" data-toggle="tab" href="#invoices-content" role="tab" aria-controls="invoices-content" aria-selected="false">{{ trans_choice('general.invoices', 2) }}</a>
|
<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>
|
</li>
|
||||||
@stack('customer_invoices_tab_end')
|
@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>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="card">
|
|
||||||
<div class="tab-content" id="myTabContent">
|
|
||||||
@stack('customer_transactions_content_start')
|
|
||||||
<div class="tab-pane fade show active" 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">@date($item->paid_at)</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 class="card">
|
||||||
|
<div class="tab-content" id="cutomer-tab-content">
|
||||||
@stack('customer_invoices_content_start')
|
@stack('customer_invoices_content_start')
|
||||||
<div class="tab-pane fade" id="invoices-content" role="tabpanel" aria-labelledby="invoices-tab">
|
<div class="tab-pane fade show active" id="invoices-content" role="tabpanel" aria-labelledby="invoices-tab">
|
||||||
<div class="table-responsive">
|
<div class="table-responsive">
|
||||||
<table class="table table-flush table-hover" id="tbl-invoices">
|
<table class="table table-flush table-hover" id="tbl-invoices">
|
||||||
<thead class="thead-light">
|
<thead class="thead-light">
|
||||||
@ -191,6 +215,7 @@
|
|||||||
<th class="col-xs-4 col-sm-2">{{ trans_choice('general.statuses', 1) }}</th>
|
<th class="col-xs-4 col-sm-2">{{ trans_choice('general.statuses', 1) }}</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
|
||||||
<tbody>
|
<tbody>
|
||||||
@foreach($invoices as $item)
|
@foreach($invoices as $item)
|
||||||
<tr class="row align-items-center border-top-1 tr-py">
|
<tr class="row align-items-center border-top-1 tr-py">
|
||||||
@ -204,6 +229,7 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="card-footer py-4 table-action">
|
<div class="card-footer py-4 table-action">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@include('partials.admin.pagination', ['items' => $invoices, 'type' => 'invoices'])
|
@include('partials.admin.pagination', ['items' => $invoices, 'type' => 'invoices'])
|
||||||
@ -211,6 +237,40 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@stack('customer_invoices_content_end')
|
@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">@date($item->paid_at)</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>
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
|
|
||||||
{{ Form::selectAddNewGroup('account_id', trans_choice('general.accounts', 1), 'university', $accounts, setting('default.account'), ['required' => 'required', 'path' => route('modals.accounts.create'), 'change' => 'onChangeAccount']) }}
|
{{ 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, null, ['path' => route('modals.customers.create'), 'remote_action' => route('customers.index')]) }}
|
{{ 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::textareaGroup('description', trans('general.description')) }}
|
||||||
|
|
||||||
|
@ -97,6 +97,7 @@ Route::group(['prefix' => 'sales'], function () {
|
|||||||
Route::get('customers/{customer}/disable', 'Sales\Customers@disable')->name('customers.disable');
|
Route::get('customers/{customer}/disable', 'Sales\Customers@disable')->name('customers.disable');
|
||||||
Route::get('customers/{customer}/currency', 'Sales\Customers@currency')->name('customers.currency');
|
Route::get('customers/{customer}/currency', 'Sales\Customers@currency')->name('customers.currency');
|
||||||
Route::get('customers/{customer}/create-invoice', 'Sales\Customers@createInvoice')->name('customers.create-invoice');
|
Route::get('customers/{customer}/create-invoice', 'Sales\Customers@createInvoice')->name('customers.create-invoice');
|
||||||
|
Route::get('customers/{customer}/create-revenue', 'Sales\Customers@createRevenue')->name('customers.create-revenue');
|
||||||
Route::resource('customers', 'Sales\Customers');
|
Route::resource('customers', 'Sales\Customers');
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -128,6 +129,7 @@ Route::group(['prefix' => 'purchases'], function () {
|
|||||||
Route::get('vendors/{vendor}/currency', 'Purchases\Vendors@currency')->name('vendors.currency');
|
Route::get('vendors/{vendor}/currency', 'Purchases\Vendors@currency')->name('vendors.currency');
|
||||||
Route::get('vendors/{vendor}/disable', 'Purchases\Vendors@disable')->name('vendors.disable');
|
Route::get('vendors/{vendor}/disable', 'Purchases\Vendors@disable')->name('vendors.disable');
|
||||||
Route::get('vendors/{vendor}/create-bill', 'Purchases\Vendors@createBill')->name('vendors.create-bill');
|
Route::get('vendors/{vendor}/create-bill', 'Purchases\Vendors@createBill')->name('vendors.create-bill');
|
||||||
|
Route::get('vendors/{vendor}/create-payment', 'Purchases\Vendors@createPayment')->name('vendors.create-payment');
|
||||||
Route::resource('vendors', 'Purchases\Vendors', ['middleware' => ['dropzone']]);
|
Route::resource('vendors', 'Purchases\Vendors', ['middleware' => ['dropzone']]);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user