mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-08 20:22:42 +01:00
Updated texts file
This commit is contained in:
parent
719f13a557
commit
e245b6f639
@ -183,16 +183,16 @@ class ExpenseController extends BaseController
|
||||
{
|
||||
case 'invoice':
|
||||
$expenses = Expense::scope($ids)->get();
|
||||
$clientPublicId = null;
|
||||
$clientId = null;
|
||||
$data = [];
|
||||
|
||||
// Validate that either all expenses do not have a client or if there is a client, it is the same client
|
||||
foreach ($expenses as $expense)
|
||||
{
|
||||
if ($expense->client_id) {
|
||||
if (!$clientPublicId) {
|
||||
$clientPublicId = $expense->client_id;
|
||||
} elseif ($clientPublicId != $expense->client_id) {
|
||||
if (!$clientId) {
|
||||
$clientId = $expense->client_id;
|
||||
} elseif ($clientId != $expense->client_id) {
|
||||
Session::flash('error', trans('texts.expense_error_multiple_clients'));
|
||||
return Redirect::to('expenses');
|
||||
}
|
||||
@ -212,6 +212,7 @@ class ExpenseController extends BaseController
|
||||
];
|
||||
}
|
||||
|
||||
$clientPublicId = $clientId ? Client::findOrFail($clientId)->public_id : '';
|
||||
return Redirect::to("invoices/create/{$clientPublicId}")->with('expenses', $data);
|
||||
break;
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
6
resources/views/vendors/show.blade.php
vendored
6
resources/views/vendors/show.blade.php
vendored
@ -39,9 +39,9 @@
|
||||
]
|
||||
)->split() !!}
|
||||
|
||||
{!! DropdownButton::primary(trans('texts.new_expense'))
|
||||
->withAttributes(['class'=>'primaryDropDown'])
|
||||
->withContents($actionLinks)->split() !!}
|
||||
{!! Button::primary(trans("texts.new_expense"))
|
||||
->asLinkTo(URL::to("/expenses/create"))
|
||||
->appendIcon(Icon::create('plus-sign')) !!}
|
||||
@endif
|
||||
{!! Former::close() !!}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user