1
0
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:
Hillel Coren 2016-01-28 16:34:22 +02:00
parent 719f13a557
commit e245b6f639
3 changed files with 1017 additions and 892 deletions

View File

@ -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

View File

@ -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() !!}