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':
|
case 'invoice':
|
||||||
$expenses = Expense::scope($ids)->get();
|
$expenses = Expense::scope($ids)->get();
|
||||||
$clientPublicId = null;
|
$clientId = null;
|
||||||
$data = [];
|
$data = [];
|
||||||
|
|
||||||
// Validate that either all expenses do not have a client or if there is a client, it is the same client
|
// 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)
|
foreach ($expenses as $expense)
|
||||||
{
|
{
|
||||||
if ($expense->client_id) {
|
if ($expense->client_id) {
|
||||||
if (!$clientPublicId) {
|
if (!$clientId) {
|
||||||
$clientPublicId = $expense->client_id;
|
$clientId = $expense->client_id;
|
||||||
} elseif ($clientPublicId != $expense->client_id) {
|
} elseif ($clientId != $expense->client_id) {
|
||||||
Session::flash('error', trans('texts.expense_error_multiple_clients'));
|
Session::flash('error', trans('texts.expense_error_multiple_clients'));
|
||||||
return Redirect::to('expenses');
|
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);
|
return Redirect::to("invoices/create/{$clientPublicId}")->with('expenses', $data);
|
||||||
break;
|
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() !!}
|
)->split() !!}
|
||||||
|
|
||||||
{!! DropdownButton::primary(trans('texts.new_expense'))
|
{!! Button::primary(trans("texts.new_expense"))
|
||||||
->withAttributes(['class'=>'primaryDropDown'])
|
->asLinkTo(URL::to("/expenses/create"))
|
||||||
->withContents($actionLinks)->split() !!}
|
->appendIcon(Icon::create('plus-sign')) !!}
|
||||||
@endif
|
@endif
|
||||||
{!! Former::close() !!}
|
{!! Former::close() !!}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user