mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-23 20:00:33 -04:00
Working on L5
This commit is contained in:
parent
9dcc4e0e52
commit
564d006428
@ -1,5 +1,6 @@
|
||||
<?php namespace App\Exceptions;
|
||||
|
||||
use Utils;
|
||||
use Exception;
|
||||
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
|
||||
|
||||
@ -24,7 +25,9 @@ class Handler extends ExceptionHandler {
|
||||
*/
|
||||
public function report(Exception $e)
|
||||
{
|
||||
return parent::report($e);
|
||||
Utils::logError(Utils::getErrorString($e));
|
||||
return false;
|
||||
//return parent::report($e);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -36,7 +39,6 @@ class Handler extends ExceptionHandler {
|
||||
*/
|
||||
public function render($request, Exception $e)
|
||||
{
|
||||
return parent::render($request, $e);
|
||||
return parent::render($request, $e);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,12 +1,13 @@
|
||||
<?php namespace App\Http\Controllers;
|
||||
|
||||
use App\Libraries\Utils;
|
||||
use App\Ninja\Mailers\Mailer;
|
||||
use Redirect;
|
||||
use App\Models\Account;
|
||||
use Auth;
|
||||
use View;
|
||||
use Input;
|
||||
use Session;
|
||||
use App\Models\Account;
|
||||
use App\Libraries\Utils;
|
||||
use App\Ninja\Mailers\Mailer;
|
||||
|
||||
class HomeController extends BaseController
|
||||
{
|
||||
|
@ -23,7 +23,16 @@ class InvoiceApiController extends Controller
|
||||
|
||||
public function index()
|
||||
{
|
||||
$invoices = Invoice::scope()->where('invoices.is_quote', '=', false)->orderBy('created_at', 'desc')->get();
|
||||
$invoices = Invoice::scope()->with('invitations')->where('invoices.is_quote', '=', false)->orderBy('created_at', 'desc')->get();
|
||||
|
||||
// Add the first invitation link to the data
|
||||
foreach ($invoices as $key => $invoice) {
|
||||
foreach ($invoice->invitations as $subKey => $invitation) {
|
||||
$invoices[$key]['link'] = $invitation->getLink();
|
||||
}
|
||||
unset($invoice['invitations']);
|
||||
}
|
||||
|
||||
$invoices = Utils::remapPublicIds($invoices->toArray());
|
||||
|
||||
$response = json_encode($invoices, JSON_PRETTY_PRINT);
|
||||
|
@ -93,11 +93,6 @@ class TokenController extends BaseController
|
||||
*/
|
||||
public function create()
|
||||
{
|
||||
if (!Auth::user()->confirmed) {
|
||||
Session::flash('error', trans('texts.register_to_add_user'));
|
||||
return Redirect::to('company/advanced_settings/user_management');
|
||||
}
|
||||
|
||||
$data = [
|
||||
'showBreadcrumbs' => false,
|
||||
'token' => null,
|
||||
|
@ -321,7 +321,7 @@ define('NINJA_GATEWAY_ID', GATEWAY_AUTHORIZE_NET);
|
||||
define('NINJA_GATEWAY_CONFIG', '{"apiLoginId":"626vWcD5","transactionKey":"4bn26TgL9r4Br4qJ","testMode":"","developerMode":""}');
|
||||
define('NINJA_WEB_URL', 'https://www.invoiceninja.com');
|
||||
define('NINJA_APP_URL', 'https://app.invoiceninja.com');
|
||||
define('NINJA_VERSION', '2.0');
|
||||
define('NINJA_VERSION', '1.7.2');
|
||||
define('NINJA_DATE', '2000-01-01');
|
||||
define('NINJA_FROM_EMAIL', 'maildelivery@invoiceninja.com');
|
||||
define('RELEASES_URL', 'https://github.com/hillelcoren/invoice-ninja/releases/');
|
||||
|
@ -165,6 +165,7 @@ class Utils
|
||||
'user_agent' => isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : '',
|
||||
'ip' => Request::getClientIp(),
|
||||
'count' => Session::get('error_count', 0),
|
||||
'input' => Input::all()
|
||||
];
|
||||
|
||||
Log::error($error."\n", $data);
|
||||
|
@ -13,7 +13,7 @@ return [
|
||||
|
|
||||
*/
|
||||
|
||||
'debug' => true,
|
||||
'debug' => env('APP_DEBUG', ''),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
### [https://www.invoiceninja.com](https://www.invoiceninja.com)
|
||||
|
||||
#### Please [click here](https://bitnami.com/stack/invoice-ninja) to vote for us to be added to Bitnami's one-click install library
|
||||
##### Please [click here](https://bitnami.com/stack/invoice-ninja) to vote for us to be added to Bitnami's one-click install library
|
||||
|
||||
If you'd like to use our code to sell your own invoicing app we have an affiliate program. Get in touch for more details.
|
||||
|
||||
|
@ -164,7 +164,7 @@
|
||||
</div>
|
||||
@elseif (Session::has('news_feed_message'))
|
||||
<div class="alert alert-info">
|
||||
{{ Session::get('news_feed_message') }}
|
||||
{!! Session::get('news_feed_message') !!}
|
||||
<a href="#" onclick="hideMessage()" class="pull-right">{{ trans('texts.hide') }}</a>
|
||||
</div>
|
||||
@endif
|
||||
|
@ -673,10 +673,10 @@
|
||||
invoice.contact = _.findWhere(invoice.client.contacts, {send_invoice: true});
|
||||
|
||||
if (!invoice.terms) {
|
||||
invoice.terms = "{{ str_replace(["\r\n","\r","\n"], '\n', addslashes($account->invoice_terms)) }}";
|
||||
invoice.terms = wordWrapText('{{ str_replace(["\r\n","\r","\n"], '\n', addslashes($account->invoice_terms)) }}', 300);
|
||||
}
|
||||
if (!invoice.invoice_footer) {
|
||||
invoice.invoice_footer = "{{ str_replace(["\r\n","\r","\n"], '\n', addslashes($account->invoice_footer)) }}";
|
||||
invoice.invoice_footer = wordWrapText('{{ str_replace(["\r\n","\r","\n"], '\n', addslashes($account->invoice_footer)) }}', 600);
|
||||
}
|
||||
|
||||
@if (file_exists($account->getLogoPath()))
|
||||
|
Loading…
x
Reference in New Issue
Block a user