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':
$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

View File

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