mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-12 22:22:32 +01:00
Bug fixes
This commit is contained in:
parent
1b099d09cc
commit
ce4524ba1a
@ -203,7 +203,10 @@ class InvoiceController extends BaseController
|
|||||||
public function edit($publicId, $clone = false)
|
public function edit($publicId, $clone = false)
|
||||||
{
|
{
|
||||||
$account = Auth::user()->account;
|
$account = Auth::user()->account;
|
||||||
$invoice = Invoice::scope($publicId)->withTrashed()->with('invitations', 'account.country', 'client.contacts', 'client.country', 'invoice_items')->firstOrFail();
|
$invoice = Invoice::scope($publicId)
|
||||||
|
->with('invitations', 'account.country', 'client.contacts', 'client.country', 'invoice_items')
|
||||||
|
->withTrashed()
|
||||||
|
->firstOrFail();
|
||||||
$entityType = $invoice->getEntityType();
|
$entityType = $invoice->getEntityType();
|
||||||
|
|
||||||
$contactIds = DB::table('invitations')
|
$contactIds = DB::table('invitations')
|
||||||
@ -270,6 +273,7 @@ class InvoiceController extends BaseController
|
|||||||
$lastSent = ($invoice->is_recurring && $invoice->last_sent_date) ? $invoice->recurring_invoices->last() : null;
|
$lastSent = ($invoice->is_recurring && $invoice->last_sent_date) ? $invoice->recurring_invoices->last() : null;
|
||||||
|
|
||||||
$data = array(
|
$data = array(
|
||||||
|
'clients' => Client::scope()->withTrashed()->with('contacts', 'country')->whereId($invoice->id)->get(),
|
||||||
'entityType' => $entityType,
|
'entityType' => $entityType,
|
||||||
'showBreadcrumbs' => $clone,
|
'showBreadcrumbs' => $clone,
|
||||||
'invoice' => $invoice,
|
'invoice' => $invoice,
|
||||||
@ -327,6 +331,7 @@ class InvoiceController extends BaseController
|
|||||||
$invoice->public_id = 0;
|
$invoice->public_id = 0;
|
||||||
|
|
||||||
$data = [
|
$data = [
|
||||||
|
'clients' => Client::scope()->with('contacts', 'country')->orderBy('name')->get(),
|
||||||
'entityType' => $invoice->getEntityType(),
|
'entityType' => $invoice->getEntityType(),
|
||||||
'invoice' => $invoice,
|
'invoice' => $invoice,
|
||||||
'method' => 'POST',
|
'method' => 'POST',
|
||||||
@ -361,7 +366,6 @@ class InvoiceController extends BaseController
|
|||||||
'account' => Auth::user()->account->load('country'),
|
'account' => Auth::user()->account->load('country'),
|
||||||
'products' => Product::scope()->with('default_tax_rate')->orderBy('id')->get(),
|
'products' => Product::scope()->with('default_tax_rate')->orderBy('id')->get(),
|
||||||
'countries' => Cache::get('countries'),
|
'countries' => Cache::get('countries'),
|
||||||
'clients' => Client::scope()->with('contacts', 'country')->orderBy('name')->get(),
|
|
||||||
'taxRates' => TaxRate::scope()->orderBy('name')->get(),
|
'taxRates' => TaxRate::scope()->orderBy('name')->get(),
|
||||||
'currencies' => Cache::get('currencies'),
|
'currencies' => Cache::get('currencies'),
|
||||||
'languages' => Cache::get('languages'),
|
'languages' => Cache::get('languages'),
|
||||||
|
@ -207,12 +207,12 @@ class Utils
|
|||||||
$data = [
|
$data = [
|
||||||
'context' => $context,
|
'context' => $context,
|
||||||
'user_id' => Auth::check() ? Auth::user()->id : 0,
|
'user_id' => Auth::check() ? Auth::user()->id : 0,
|
||||||
|
'account_id' => Auth::check() ? Auth::user()->account_id : 0,
|
||||||
'user_name' => Auth::check() ? Auth::user()->getDisplayName() : '',
|
'user_name' => Auth::check() ? Auth::user()->getDisplayName() : '',
|
||||||
'url' => Input::get('url', Request::url()),
|
'url' => Input::get('url', Request::url()),
|
||||||
'user_agent' => isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : '',
|
'user_agent' => isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : '',
|
||||||
'ip' => Request::getClientIp(),
|
'ip' => Request::getClientIp(),
|
||||||
'count' => Session::get('error_count', 0),
|
'count' => Session::get('error_count', 0),
|
||||||
//'input' => Input::all()
|
|
||||||
];
|
];
|
||||||
|
|
||||||
Log::error($error."\n", $data);
|
Log::error($error."\n", $data);
|
||||||
|
@ -919,4 +919,7 @@ return array(
|
|||||||
'include' => 'Include',
|
'include' => 'Include',
|
||||||
|
|
||||||
'logo_too_large' => 'Your logo is :size, for better performance we suggest uploading an image file less than 200KB',
|
'logo_too_large' => 'Your logo is :size, for better performance we suggest uploading an image file less than 200KB',
|
||||||
|
'can_not_email_inactive_client' => 'Emails can not be sent to inactive clients',
|
||||||
|
'can_not_email_inactive_invoice' => 'Emails can not be sent to inactive invoices',
|
||||||
|
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user