Merge pull request #27 from denisdulici/improve-filters

Improved income/expense filters
This commit is contained in:
Denis Duliçi 2017-09-27 22:00:53 +03:00 committed by GitHub
commit e0e4e1d7c6
36 changed files with 73 additions and 54 deletions

View File

@ -19,6 +19,11 @@ class Bills extends ModelFilter
return $this->whereLike('vendor_name', $query); return $this->whereLike('vendor_name', $query);
} }
public function vendor($vendor)
{
return $this->where('vendor_id', $vendor);
}
public function status($status) public function status($status)
{ {
return $this->where('bill_status_code', $status); return $this->where('bill_status_code', $status);

View File

@ -19,6 +19,11 @@ class Payments extends ModelFilter
return $this->whereLike('description', $query); return $this->whereLike('description', $query);
} }
public function vendor($vendor)
{
return $this->where('vendor_id', $vendor);
}
public function category($category) public function category($category)
{ {
return $this->where('category_id', $category); return $this->where('category_id', $category);

View File

@ -19,6 +19,11 @@ class Invoices extends ModelFilter
return $this->whereLike('customer_name', $query); return $this->whereLike('customer_name', $query);
} }
public function customer($customer)
{
return $this->where('customer_id', $customer);
}
public function status($status) public function status($status)
{ {
return $this->where('invoice_status_code', $status); return $this->where('invoice_status_code', $status);

View File

@ -14,6 +14,11 @@ class Revenues extends ModelFilter
*/ */
public $relations = []; public $relations = [];
public function search($query)
{
return $this->whereLike('description', $query);
}
public function customer($customer) public function customer($customer)
{ {
return $this->where('customer_id', $customer); return $this->where('customer_id', $customer);

View File

@ -21,7 +21,7 @@ class Users extends Controller
$users = User::with('roles')->collect(); $users = User::with('roles')->collect();
$roles = collect(Role::all()->pluck('display_name', 'id')) $roles = collect(Role::all()->pluck('display_name', 'id'))
->prepend(trans('roles.all'), ''); ->prepend(trans('general.all_type', ['type' => trans_choice('general.roles', 2)]), '');
return view('auth.users.index', compact('users', 'roles')); return view('auth.users.index', compact('users', 'roles'));
} }

View File

@ -27,7 +27,7 @@ class Transfers extends Controller
$items = Transfer::with(['payment', 'revenue', 'account'])->collect('payment.paid_at'); $items = Transfer::with(['payment', 'revenue', 'account'])->collect('payment.paid_at');
$accounts = collect(Account::enabled()->pluck('name', 'id')) $accounts = collect(Account::enabled()->pluck('name', 'id'))
->prepend(trans('accounts.all'), ''); ->prepend(trans('general.all_type', ['type' => trans_choice('general.accounts', 2)]), '');
$transfers = array(); $transfers = array();

View File

@ -46,7 +46,7 @@ class Invoices extends Controller
} }
$status = collect(InvoiceStatus::all()->pluck('name', 'code')) $status = collect(InvoiceStatus::all()->pluck('name', 'code'))
->prepend(trans('general.all_statuses'), ''); ->prepend(trans('general.all_type', ['type' => trans_choice('general.statuses', 2)]), '');
return view('customers.invoices.index', compact('invoices', 'status')); return view('customers.invoices.index', compact('invoices', 'status'));
} }

View File

@ -27,10 +27,10 @@ class Payments extends Controller
$payment_methods = Modules::getPaymentMethods(); $payment_methods = Modules::getPaymentMethods();
$categories = collect(Category::enabled()->type('income')->pluck('name', 'id')) $categories = collect(Category::enabled()->type('income')->pluck('name', 'id'))
->prepend(trans('categories.all'), ''); ->prepend(trans('general.all_type', ['type' => trans_choice('general.categories', 2)]), '');
$accounts = collect(Account::enabled()->pluck('name', 'id')) $accounts = collect(Account::enabled()->pluck('name', 'id'))
->prepend(trans('accounts.all'), ''); ->prepend(trans('general.all_type', ['type' => trans_choice('general.accounts', 2)]), '');
return view('customers.payments.index', compact('payments', 'payment_methods', 'categories', 'accounts')); return view('customers.payments.index', compact('payments', 'payment_methods', 'categories', 'accounts'));
} }

View File

@ -38,10 +38,13 @@ class Bills extends Controller
{ {
$bills = Bill::with('status')->collect(); $bills = Bill::with('status')->collect();
$status = collect(BillStatus::all()->pluck('name', 'code')) $vendors = collect(Vendor::enabled()->pluck('name', 'id'))
->prepend(trans('general.all_statuses'), ''); ->prepend(trans('general.all_type', ['type' => trans_choice('general.vendors', 2)]), '');
return view('expenses.bills.index', compact('bills', 'status')); $status = collect(BillStatus::all()->pluck('name', 'code'))
->prepend(trans('general.all_type', ['type' => trans_choice('general.statuses', 2)]), '');
return view('expenses.bills.index', compact('bills', 'vendors', 'status'));
} }
/** /**

View File

@ -24,13 +24,16 @@ class Payments extends Controller
{ {
$payments = Payment::with(['account', 'category'])->collect(); $payments = Payment::with(['account', 'category'])->collect();
$vendors = collect(Vendor::enabled()->pluck('name', 'id'))
->prepend(trans('general.all_type', ['type' => trans_choice('general.vendors', 2)]), '');
$categories = collect(Category::enabled()->type('expense')->pluck('name', 'id')) $categories = collect(Category::enabled()->type('expense')->pluck('name', 'id'))
->prepend(trans('categories.all'), ''); ->prepend(trans('general.all_type', ['type' => trans_choice('general.categories', 2)]), '');
$accounts = collect(Account::enabled()->pluck('name', 'id')) $accounts = collect(Account::enabled()->pluck('name', 'id'))
->prepend(trans('accounts.all'), ''); ->prepend(trans('general.all_type', ['type' => trans_choice('general.accounts', 2)]), '');
return view('expenses.payments.index', compact('payments', 'categories', 'accounts')); return view('expenses.payments.index', compact('payments', 'vendors', 'categories', 'accounts'));
} }
/** /**

View File

@ -40,10 +40,13 @@ class Invoices extends Controller
{ {
$invoices = Invoice::with('status')->collect(); $invoices = Invoice::with('status')->collect();
$status = collect(InvoiceStatus::all()->pluck('name', 'code')) $customers = collect(Customer::enabled()->pluck('name', 'id'))
->prepend(trans('general.all_statuses'), ''); ->prepend(trans('general.all_type', ['type' => trans_choice('general.customers', 2)]), '');
return view('incomes.invoices.index', compact('invoices', 'status')); $status = collect(InvoiceStatus::all()->pluck('name', 'code'))
->prepend(trans('general.all_type', ['type' => trans_choice('general.statuses', 2)]), '');
return view('incomes.invoices.index', compact('invoices', 'customers', 'status'));
} }
/** /**

View File

@ -28,13 +28,13 @@ class Revenues extends Controller
$revenues = Revenue::with(['account', 'category', 'customer'])->collect(); $revenues = Revenue::with(['account', 'category', 'customer'])->collect();
$customers = collect(Customer::enabled()->pluck('name', 'id')) $customers = collect(Customer::enabled()->pluck('name', 'id'))
->prepend(trans('customer.all'), ''); ->prepend(trans('general.all_type', ['type' => trans_choice('general.customers', 2)]), '');
$categories = collect(Category::enabled()->type('income')->pluck('name', 'id')) $categories = collect(Category::enabled()->type('income')->pluck('name', 'id'))
->prepend(trans('categories.all'), ''); ->prepend(trans('general.all_type', ['type' => trans_choice('general.categories', 2)]), '');
$accounts = collect(Account::enabled()->pluck('name', 'id')) $accounts = collect(Account::enabled()->pluck('name', 'id'))
->prepend(trans('accounts.all'), ''); ->prepend(trans('general.all_type', ['type' => trans_choice('general.accounts', 2)]), '');
return view('incomes.revenues.index', compact('revenues', 'customers', 'categories', 'accounts')); return view('incomes.revenues.index', compact('revenues', 'customers', 'categories', 'accounts'));
} }

View File

@ -23,7 +23,8 @@ class Items extends Controller
{ {
$items = Item::with('category')->collect(); $items = Item::with('category')->collect();
$categories = Category::enabled()->type('item')->pluck('name', 'id')->prepend(trans('categories.all'), ''); $categories = Category::enabled()->type('item')->pluck('name', 'id')
->prepend(trans('general.all_type', ['type' => trans_choice('general.categories', 2)]), '');
return view('items.items.index', compact('items', 'categories')); return view('items.items.index', compact('items', 'categories'));
} }

View File

@ -19,7 +19,7 @@ class Categories extends Controller
$categories = Category::collect(); $categories = Category::collect();
$types = collect(['expense' => 'Expense', 'income' => 'Income', 'item' => 'Item', 'other' => 'Other']) $types = collect(['expense' => 'Expense', 'income' => 'Income', 'item' => 'Item', 'other' => 'Other'])
->prepend(trans('categories.all_types'), ''); ->prepend(trans('general.all_type', ['type' => trans_choice('general.types', 2)]), '');
return view('settings.categories.index', compact('categories', 'types')); return view('settings.categories.index', compact('categories', 'types'));
} }

View File

@ -23,7 +23,7 @@ class Modules
if (setting('general.api_token')) { if (setting('general.api_token')) {
$categories = Cache::remember('modules.categories', Date::now()->addHour(6), function () { $categories = Cache::remember('modules.categories', Date::now()->addHour(6), function () {
return collect($this->getCategories())->pluck('name', 'slug') return collect($this->getCategories())->pluck('name', 'slug')
->prepend(trans('categories.all'), ''); ->prepend(trans('general.all_type', ['type' => trans_choice('general.categories', 2)]), '');
}); });
$view->with(['categories' => $categories]); $view->with(['categories' => $categories]);

View File

@ -10,6 +10,5 @@ return [
'bank_phone' => 'Bank Phone', 'bank_phone' => 'Bank Phone',
'bank_address' => 'Bank Address', 'bank_address' => 'Bank Address',
'default_account' => 'Default Account', 'default_account' => 'Default Account',
'all' => 'All Accounts',
]; ];

View File

@ -1,7 +0,0 @@
<?php
return [
'all' => 'All Categories',
'all_types' => 'All Types'
];

View File

@ -35,6 +35,7 @@ return [
'languages' => 'Language|Languages', 'languages' => 'Language|Languages',
'updates' => 'Update|Updates', 'updates' => 'Update|Updates',
'numbers' => 'Number|Numbers', 'numbers' => 'Number|Numbers',
'statuses' => 'Status|Statuses',
'dashboard' => 'Dashboard', 'dashboard' => 'Dashboard',
'banking' => 'Banking', 'banking' => 'Banking',
@ -76,7 +77,6 @@ return [
'color' => 'Colour', 'color' => 'Colour',
'save' => 'Save', 'save' => 'Save',
'cancel' => 'Cancel', 'cancel' => 'Cancel',
'status' => 'Status',
'from' => 'From', 'from' => 'From',
'to' => 'To', 'to' => 'To',
'print' => 'Print', 'print' => 'Print',
@ -85,12 +85,12 @@ return [
'filter' => 'Filter', 'filter' => 'Filter',
'create_user' => 'Create User', 'create_user' => 'Create User',
'created_user' => 'Created User', 'created_user' => 'Created User',
'all_statuses' => 'All Statuses',
'bank' => 'Bank Transfer', 'bank' => 'Bank Transfer',
'cash' => 'Cash', 'cash' => 'Cash',
'paypal' => 'PayPal', 'paypal' => 'PayPal',
'help' => 'Help', 'help' => 'Help',
'all' => 'All', 'all' => 'All',
'all_type' => 'All :type',
'upcoming' => 'Upcoming', 'upcoming' => 'Upcoming',
'created' => 'Created', 'created' => 'Created',

View File

@ -1,7 +0,0 @@
<?php
return [
'all' => 'All Roles',
];

View File

@ -34,7 +34,7 @@
<th>@sortablelink('name', trans('general.name'))</th> <th>@sortablelink('name', trans('general.name'))</th>
<th>@sortablelink('number', trans('accounts.number'))</th> <th>@sortablelink('number', trans('accounts.number'))</th>
<th>@sortablelink('opening_balance', trans('accounts.current_balance'))</th> <th>@sortablelink('opening_balance', trans('accounts.current_balance'))</th>
<th>@sortablelink('enabled', trans('general.status'))</th> <th>@sortablelink('enabled', trans_choice('general.statuses', 1))</th>
<th style="width: 15%;">{{ trans('general.actions') }}</th> <th style="width: 15%;">{{ trans('general.actions') }}</th>
</tr> </tr>
</thead> </thead>

View File

@ -24,7 +24,7 @@
<th>{{ trans('invoices.invoice_number') }}</th> <th>{{ trans('invoices.invoice_number') }}</th>
<th>{{ trans_choice('general.customers', 1) }}</th> <th>{{ trans_choice('general.customers', 1) }}</th>
<th>{{ trans('invoices.total_price') }}</th> <th>{{ trans('invoices.total_price') }}</th>
<th>{{ trans('general.status') }}</th> <th>{{ trans_choice('general.statuses', 1) }}</th>
<th>{{ trans('invoices.invoice_date') }}</th> <th>{{ trans('invoices.invoice_date') }}</th>
<th style="width: 18%;">{{ trans('general.actions') }}</th> <th style="width: 18%;">{{ trans('general.actions') }}</th>
</tr> </tr>

View File

@ -16,7 +16,7 @@
<div class="pull-left"> <div class="pull-left">
<span class="title-filter">{{ trans('general.search') }}:</span> <span class="title-filter">{{ trans('general.search') }}:</span>
{!! Form::text('search', request('search'), ['class' => 'form-control input-filter input-sm', 'placeholder' => trans('general.search_placeholder')]) !!} {!! Form::text('search', request('search'), ['class' => 'form-control input-filter input-sm', 'placeholder' => trans('general.search_placeholder')]) !!}
{!! Form::select('status', $status, request('status'), ['class' => 'form-control input-filter input-sm', 'placeholder' => trans('status.all')]) !!} {!! Form::select('status', $status, request('status'), ['class' => 'form-control input-filter input-sm']) !!}
{!! Form::button('<span class="fa fa-filter"></span> &nbsp;' . trans('general.filter'), ['type' => 'submit', 'class' => 'btn btn-sm btn-default btn-filter']) !!} {!! Form::button('<span class="fa fa-filter"></span> &nbsp;' . trans('general.filter'), ['type' => 'submit', 'class' => 'btn btn-sm btn-default btn-filter']) !!}
</div> </div>
<div class="pull-right"> <div class="pull-right">
@ -34,7 +34,7 @@
<th>@sortablelink('invoice_number', trans('invoices.invoice_number'))</th> <th>@sortablelink('invoice_number', trans('invoices.invoice_number'))</th>
<th>@sortablelink('customer_name', trans_choice('general.customers', 1))</th> <th>@sortablelink('customer_name', trans_choice('general.customers', 1))</th>
<th>@sortablelink('amount', trans('invoices.total_price'))</th> <th>@sortablelink('amount', trans('invoices.total_price'))</th>
<th>@sortablelink('status.name', trans('general.status'))</th> <th>@sortablelink('status.name', trans_choice('general.statuses', 1))</th>
<th>@sortablelink('invoiced_at', trans('invoices.invoice_date'))</th> <th>@sortablelink('invoiced_at', trans('invoices.invoice_date'))</th>
<th>@sortablelink('due_at', trans('invoices.due_date'))</th> <th>@sortablelink('due_at', trans('invoices.due_date'))</th>
<th style="width: 18%;">{{ trans('general.actions') }}</th> <th style="width: 18%;">{{ trans('general.actions') }}</th>

View File

@ -176,7 +176,7 @@
<thead> <thead>
<tr> <tr>
<th>{{ trans('general.date') }}</th> <th>{{ trans('general.date') }}</th>
<th>{{ trans('general.status') }}</th> <th>{{ trans_choice('general.statuses', 1) }}</th>
<th>{{ trans('general.description') }}</th> <th>{{ trans('general.description') }}</th>
</tr> </tr>
</thead> </thead>

View File

@ -16,8 +16,8 @@
<div class="pull-left"> <div class="pull-left">
<span class="title-filter">{{ trans('general.search') }}:</span> <span class="title-filter">{{ trans('general.search') }}:</span>
{!! Form::text('search', request('search'), ['class' => 'form-control input-filter input-sm', 'placeholder' => trans('general.search_placeholder')]) !!} {!! Form::text('search', request('search'), ['class' => 'form-control input-filter input-sm', 'placeholder' => trans('general.search_placeholder')]) !!}
{!! Form::select('category_id', $categories, request('category_id'), ['class' => 'form-control input-filter input-sm', 'placeholder' => trans('categories.all')]) !!} {!! Form::select('category_id', $categories, request('category_id'), ['class' => 'form-control input-filter input-sm']) !!}
{!! Form::select('payment_method', $payment_methods, request('payment_method'), ['class' => 'form-control input-filter input-sm', 'placeholder' => trans_choice('general.payment_methods', 2)]) !!} {!! Form::select('payment_method', $payment_methods, request('payment_method'), ['class' => 'form-control input-filter input-sm']) !!}
{!! Form::button('<span class="fa fa-filter"></span> &nbsp;' . trans('general.filter'), ['type' => 'submit', 'class' => 'btn btn-sm btn-default btn-filter']) !!} {!! Form::button('<span class="fa fa-filter"></span> &nbsp;' . trans('general.filter'), ['type' => 'submit', 'class' => 'btn btn-sm btn-default btn-filter']) !!}
</div> </div>
<div class="pull-right"> <div class="pull-right">

View File

@ -16,6 +16,7 @@
<div class="pull-left"> <div class="pull-left">
<span class="title-filter">{{ trans('general.search') }}:</span> <span class="title-filter">{{ trans('general.search') }}:</span>
{!! Form::text('search', request('search'), ['class' => 'form-control input-filter input-sm', 'placeholder' => trans('general.search_placeholder')]) !!} {!! Form::text('search', request('search'), ['class' => 'form-control input-filter input-sm', 'placeholder' => trans('general.search_placeholder')]) !!}
{!! Form::select('vendor', $vendors, request('vendor'), ['class' => 'form-control input-filter input-sm']) !!}
{!! Form::select('status', $status, request('status'), ['class' => 'form-control input-filter input-sm']) !!} {!! Form::select('status', $status, request('status'), ['class' => 'form-control input-filter input-sm']) !!}
{!! Form::button('<span class="fa fa-filter"></span> &nbsp;' . trans('general.filter'), ['type' => 'submit', 'class' => 'btn btn-sm btn-default btn-filter']) !!} {!! Form::button('<span class="fa fa-filter"></span> &nbsp;' . trans('general.filter'), ['type' => 'submit', 'class' => 'btn btn-sm btn-default btn-filter']) !!}
</div> </div>
@ -35,7 +36,7 @@
<th class="col-md-1">@sortablelink('bill_number', trans_choice('general.numbers', 1))</th> <th class="col-md-1">@sortablelink('bill_number', trans_choice('general.numbers', 1))</th>
<th class="col-md-3">@sortablelink('vendor_name', trans_choice('general.vendors', 1))</th> <th class="col-md-3">@sortablelink('vendor_name', trans_choice('general.vendors', 1))</th>
<th class="col-md-1">@sortablelink('amount', trans('general.amount'))</th> <th class="col-md-1">@sortablelink('amount', trans('general.amount'))</th>
<th class="col-md-1">@sortablelink('status.name', trans('general.status'))</th> <th class="col-md-1">@sortablelink('status.name', trans_choice('general.statuses', 1))</th>
<th>@sortablelink('billed_at', trans('bills.bill_date'))</th> <th>@sortablelink('billed_at', trans('bills.bill_date'))</th>
<th>@sortablelink('due_at', trans('bills.due_date'))</th> <th>@sortablelink('due_at', trans('bills.due_date'))</th>
<th class="col-md-3">{{ trans('general.actions') }}</th> <th class="col-md-3">{{ trans('general.actions') }}</th>

View File

@ -176,7 +176,7 @@
<thead> <thead>
<tr> <tr>
<th>{{ trans('general.date') }}</th> <th>{{ trans('general.date') }}</th>
<th>{{ trans('general.status') }}</th> <th>{{ trans_choice('general.statuses', 1) }}</th>
<th>{{ trans('general.description') }}</th> <th>{{ trans('general.description') }}</th>
</tr> </tr>
</thead> </thead>

View File

@ -16,6 +16,7 @@
<div class="pull-left"> <div class="pull-left">
<span class="title-filter">{{ trans('general.search') }}:</span> <span class="title-filter">{{ trans('general.search') }}:</span>
{!! Form::text('search', request('search'), ['class' => 'form-control input-filter input-sm', 'placeholder' => trans('general.search_placeholder')]) !!} {!! Form::text('search', request('search'), ['class' => 'form-control input-filter input-sm', 'placeholder' => trans('general.search_placeholder')]) !!}
{!! Form::select('vendor', $vendors, request('vendor'), ['class' => 'form-control input-filter input-sm']) !!}
{!! Form::select('category', $categories, request('category'), ['class' => 'form-control input-filter input-sm']) !!} {!! Form::select('category', $categories, request('category'), ['class' => 'form-control input-filter input-sm']) !!}
{!! Form::select('account', $accounts, request('account'), ['class' => 'form-control input-filter input-sm']) !!} {!! Form::select('account', $accounts, request('account'), ['class' => 'form-control input-filter input-sm']) !!}
{!! Form::button('<span class="fa fa-filter"></span> &nbsp;' . trans('general.filter'), ['type' => 'submit', 'class' => 'btn btn-sm btn-default btn-filter']) !!} {!! Form::button('<span class="fa fa-filter"></span> &nbsp;' . trans('general.filter'), ['type' => 'submit', 'class' => 'btn btn-sm btn-default btn-filter']) !!}

View File

@ -34,7 +34,7 @@
<th>@sortablelink('name', trans('general.name'))</th> <th>@sortablelink('name', trans('general.name'))</th>
<th>@sortablelink('email', trans('general.email'))</th> <th>@sortablelink('email', trans('general.email'))</th>
<th>@sortablelink('phone', trans('general.phone'))</th> <th>@sortablelink('phone', trans('general.phone'))</th>
<th>@sortablelink('enabled', trans('general.status'))</th> <th>@sortablelink('enabled', trans_choice('general.statuses', 1))</th>
<th style="width: 15%;">{{ trans('general.actions') }}</th> <th style="width: 15%;">{{ trans('general.actions') }}</th>
</tr> </tr>
</thead> </thead>

View File

@ -34,7 +34,7 @@
<th>@sortablelink('name', trans('general.name'))</th> <th>@sortablelink('name', trans('general.name'))</th>
<th>@sortablelink('email', trans('general.email'))</th> <th>@sortablelink('email', trans('general.email'))</th>
<th>@sortablelink('phone', trans('general.phone'))</th> <th>@sortablelink('phone', trans('general.phone'))</th>
<th>@sortablelink('enabled', trans('general.status'))</th> <th>@sortablelink('enabled', trans_choice('general.statuses', 1))</th>
<th style="width: 15%;">{{ trans('general.actions') }}</th> <th style="width: 15%;">{{ trans('general.actions') }}</th>
</tr> </tr>
</thead> </thead>

View File

@ -16,6 +16,7 @@
<div class="pull-left"> <div class="pull-left">
<span class="title-filter">{{ trans('general.search') }}:</span> <span class="title-filter">{{ trans('general.search') }}:</span>
{!! Form::text('search', request('search'), ['class' => 'form-control input-filter input-sm', 'placeholder' => trans('general.search_placeholder')]) !!} {!! Form::text('search', request('search'), ['class' => 'form-control input-filter input-sm', 'placeholder' => trans('general.search_placeholder')]) !!}
{!! Form::select('customer', $customers, request('customer'), ['class' => 'form-control input-filter input-sm']) !!}
{!! Form::select('status', $status, request('status'), ['class' => 'form-control input-filter input-sm']) !!} {!! Form::select('status', $status, request('status'), ['class' => 'form-control input-filter input-sm']) !!}
{!! Form::button('<span class="fa fa-filter"></span> &nbsp;' . trans('general.filter'), ['type' => 'submit', 'class' => 'btn btn-sm btn-default btn-filter']) !!} {!! Form::button('<span class="fa fa-filter"></span> &nbsp;' . trans('general.filter'), ['type' => 'submit', 'class' => 'btn btn-sm btn-default btn-filter']) !!}
</div> </div>
@ -34,7 +35,7 @@
<th class="col-md-1">@sortablelink('invoice_number', trans_choice('general.numbers', 1))</th> <th class="col-md-1">@sortablelink('invoice_number', trans_choice('general.numbers', 1))</th>
<th class="col-md-3">@sortablelink('customer_name', trans_choice('general.customers', 1))</th> <th class="col-md-3">@sortablelink('customer_name', trans_choice('general.customers', 1))</th>
<th class="col-md-1">@sortablelink('amount', trans('general.amount'))</th> <th class="col-md-1">@sortablelink('amount', trans('general.amount'))</th>
<th class="col-md-1">@sortablelink('status.name', trans('general.status'))</th> <th class="col-md-1">@sortablelink('status.name', trans_choice('general.statuses', 1))</th>
<th>@sortablelink('invoiced_at', trans('invoices.invoice_date'))</th> <th>@sortablelink('invoiced_at', trans('invoices.invoice_date'))</th>
<th>@sortablelink('due_at', trans('invoices.due_date'))</th> <th>@sortablelink('due_at', trans('invoices.due_date'))</th>
<th class="col-md-3">{{ trans('general.actions') }}</th> <th class="col-md-3">{{ trans('general.actions') }}</th>

View File

@ -179,7 +179,7 @@
<thead> <thead>
<tr> <tr>
<th>{{ trans('general.date') }}</th> <th>{{ trans('general.date') }}</th>
<th>{{ trans('general.status') }}</th> <th>{{ trans_choice('general.statuses', 1) }}</th>
<th>{{ trans('general.description') }}</th> <th>{{ trans('general.description') }}</th>
</tr> </tr>
</thead> </thead>

View File

@ -15,6 +15,7 @@
{!! Form::open(['url' => 'incomes/revenues', 'role' => 'form', 'method' => 'GET']) !!} {!! Form::open(['url' => 'incomes/revenues', 'role' => 'form', 'method' => 'GET']) !!}
<div class="pull-left"> <div class="pull-left">
<span class="title-filter">{{ trans('general.search') }}:</span> <span class="title-filter">{{ trans('general.search') }}:</span>
{!! Form::text('search', request('search'), ['class' => 'form-control input-filter input-sm', 'placeholder' => trans('general.search_placeholder')]) !!}
{!! Form::select('customer', $customers, request('customer'), ['class' => 'form-control input-filter input-sm']) !!} {!! Form::select('customer', $customers, request('customer'), ['class' => 'form-control input-filter input-sm']) !!}
{!! Form::select('category', $categories, request('category'), ['class' => 'form-control input-filter input-sm']) !!} {!! Form::select('category', $categories, request('category'), ['class' => 'form-control input-filter input-sm']) !!}
{!! Form::select('account', $accounts, request('account'), ['class' => 'form-control input-filter input-sm']) !!} {!! Form::select('account', $accounts, request('account'), ['class' => 'form-control input-filter input-sm']) !!}

View File

@ -38,7 +38,7 @@
<th class="col-md-1">@sortablelink('quantity', trans_choice('items.quantities', 1))</th> <th class="col-md-1">@sortablelink('quantity', trans_choice('items.quantities', 1))</th>
<th>@sortablelink('sale_price', trans('items.sales_price'))</th> <th>@sortablelink('sale_price', trans('items.sales_price'))</th>
<th>@sortablelink('purchase_price', trans('items.purchase_price'))</th> <th>@sortablelink('purchase_price', trans('items.purchase_price'))</th>
<th class="col-md-1">@sortablelink('enabled', trans('general.status'))</th> <th class="col-md-1">@sortablelink('enabled', trans_choice('general.statuses', 1))</th>
<th class="col-md-2">{{ trans('general.actions') }}</th> <th class="col-md-2">{{ trans('general.actions') }}</th>
</tr> </tr>
</thead> </thead>

View File

@ -35,7 +35,7 @@
<th>@sortablelink('name', trans('general.name'))</th> <th>@sortablelink('name', trans('general.name'))</th>
<th>@sortablelink('type', trans_choice('general.types', 1))</th> <th>@sortablelink('type', trans_choice('general.types', 1))</th>
<th>{{ trans('general.color') }}</th> <th>{{ trans('general.color') }}</th>
<th>@sortablelink('enabled', trans('general.status'))</th> <th>@sortablelink('enabled', trans_choice('general.statuses', 1))</th>
<th class="col-md-2">{{ trans('general.actions') }}</th> <th class="col-md-2">{{ trans('general.actions') }}</th>
</tr> </tr>
</thead> </thead>

View File

@ -32,7 +32,7 @@
<th>@sortablelink('name', trans('general.name'))</th> <th>@sortablelink('name', trans('general.name'))</th>
<th>@sortablelink('code', trans('currencies.code'))</th> <th>@sortablelink('code', trans('currencies.code'))</th>
<th>@sortablelink('rate', trans('currencies.rate'))</th> <th>@sortablelink('rate', trans('currencies.rate'))</th>
<th>@sortablelink('enabled', trans('general.status'))</th> <th>@sortablelink('enabled', trans_choice('general.statuses', 1))</th>
<th class="col-md-2">{{ trans('general.actions') }}</th> <th class="col-md-2">{{ trans('general.actions') }}</th>
</tr> </tr>
</thead> </thead>

View File

@ -34,7 +34,7 @@
<tr> <tr>
<th>@sortablelink('name', trans('general.name'))</th> <th>@sortablelink('name', trans('general.name'))</th>
<th>@sortablelink('rate', trans('taxes.rate_percent'))</th> <th>@sortablelink('rate', trans('taxes.rate_percent'))</th>
<th>@sortablelink('enabled', trans('general.status'))</th> <th>@sortablelink('enabled', trans_choice('general.statuses', 1))</th>
<th class="col-md-2">{{ trans('general.actions') }}</th> <th class="col-md-2">{{ trans('general.actions') }}</th>
</tr> </tr>
</thead> </thead>