mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-03 07:44:35 -04:00
Merge pull request #4452 from beganovich/v5-4450
(v5) Fix #4450 & apply php-cs-fixer
This commit is contained in:
commit
a67de4ad7e
@ -844,7 +844,7 @@ class InvoiceController extends BaseController
|
|||||||
$file_path = $invoice->service()->getInvoiceDeliveryNote($invoice, $invoice->invitations->first()->contact);
|
$file_path = $invoice->service()->getInvoiceDeliveryNote($invoice, $invoice->invitations->first()->contact);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$file = public_path("storage/{$file_path}");
|
$file = public_path("storage/{$file_path}");
|
||||||
|
|
||||||
|
|
||||||
return response()->download($file, basename($file));
|
return response()->download($file, basename($file));
|
||||||
|
@ -69,7 +69,7 @@ class SetupController extends Controller
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
$db = SystemHealth::dbCheck($request);
|
$db = SystemHealth::dbCheck($request);
|
||||||
|
|
||||||
if ($db['success'] == false) {
|
if ($db['success'] == false) {
|
||||||
throw new \Exception($db['message']);
|
throw new \Exception($db['message']);
|
||||||
}
|
}
|
||||||
@ -81,10 +81,12 @@ class SetupController extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$smtp = SystemHealth::testMailServer($request);
|
if ($request->mail_driver != 'log') {
|
||||||
|
$smtp = SystemHealth::testMailServer($request);
|
||||||
|
|
||||||
if ($smtp['success'] == false) {
|
if ($smtp['success'] == false) {
|
||||||
throw new \Exception($smtp['message']);
|
throw new \Exception($smtp['message']);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
return response([
|
return response([
|
||||||
|
@ -34,8 +34,9 @@ class QueryLogging
|
|||||||
$timeStart = microtime(true);
|
$timeStart = microtime(true);
|
||||||
|
|
||||||
// Enable query logging for development
|
// Enable query logging for development
|
||||||
if (config('ninja.app_env') == 'production')
|
if (config('ninja.app_env') == 'production') {
|
||||||
return $next($request);
|
return $next($request);
|
||||||
|
}
|
||||||
|
|
||||||
DB::enableQueryLog();
|
DB::enableQueryLog();
|
||||||
|
|
||||||
|
@ -14,6 +14,7 @@ namespace App\Jobs\Ninja;
|
|||||||
use App\DataMapper\InvoiceItem;
|
use App\DataMapper\InvoiceItem;
|
||||||
use App\Events\Invoice\InvoiceWasEmailed;
|
use App\Events\Invoice\InvoiceWasEmailed;
|
||||||
use App\Jobs\Entity\EmailEntity;
|
use App\Jobs\Entity\EmailEntity;
|
||||||
|
use App\Jobs\Util\WebHookHandler;
|
||||||
use App\Libraries\MultiDB;
|
use App\Libraries\MultiDB;
|
||||||
use App\Models\Invoice;
|
use App\Models\Invoice;
|
||||||
use App\Models\Webhook;
|
use App\Models\Webhook;
|
||||||
@ -26,7 +27,6 @@ use Illuminate\Foundation\Bus\Dispatchable;
|
|||||||
use Illuminate\Queue\InteractsWithQueue;
|
use Illuminate\Queue\InteractsWithQueue;
|
||||||
use Illuminate\Queue\SerializesModels;
|
use Illuminate\Queue\SerializesModels;
|
||||||
use Illuminate\Support\Carbon;
|
use Illuminate\Support\Carbon;
|
||||||
use App\Jobs\Util\WebHookHandler;
|
|
||||||
|
|
||||||
class SendReminders implements ShouldQueue
|
class SendReminders implements ShouldQueue
|
||||||
{
|
{
|
||||||
|
@ -343,7 +343,7 @@ class HtmlEngine
|
|||||||
$data['$item'] = ['value' => '', 'label' => ctrans('texts.item')];
|
$data['$item'] = ['value' => '', 'label' => ctrans('texts.item')];
|
||||||
$data['$description'] = ['value' => '', 'label' => ctrans('texts.description')];
|
$data['$description'] = ['value' => '', 'label' => ctrans('texts.description')];
|
||||||
|
|
||||||
$data['$entity_footer'] = ['value' => $this->client->getSetting("{$this->entity_string}_footer"), 'label' => ''];
|
$data['$entity_footer'] = ['value' => $this->client->getSetting("{$this->entity_string}_footer"), 'label' => ''];
|
||||||
|
|
||||||
// $data['custom_label1'] = ['value' => '', 'label' => ctrans('texts.')];
|
// $data['custom_label1'] = ['value' => '', 'label' => ctrans('texts.')];
|
||||||
// $data['custom_label2'] = ['value' => '', 'label' => ctrans('texts.')];
|
// $data['custom_label2'] = ['value' => '', 'label' => ctrans('texts.')];
|
||||||
|
@ -103,7 +103,7 @@ class Number
|
|||||||
$value = number_format($value, $precision, $decimal, $thousand);
|
$value = number_format($value, $precision, $decimal, $thousand);
|
||||||
$symbol = $currency->symbol;
|
$symbol = $currency->symbol;
|
||||||
|
|
||||||
if ($client->getSetting('show_currency_code') === true && $currency->code == 'CHF'){
|
if ($client->getSetting('show_currency_code') === true && $currency->code == 'CHF') {
|
||||||
return "{$code} {$value}";
|
return "{$code} {$value}";
|
||||||
} elseif ($client->getSetting('show_currency_code') === true) {
|
} elseif ($client->getSetting('show_currency_code') === true) {
|
||||||
return "{$value} {$code}";
|
return "{$value} {$code}";
|
||||||
|
@ -602,15 +602,12 @@ trait GeneratesCounter
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($entity instanceof Vendor) {
|
if ($entity instanceof Vendor) {
|
||||||
|
|
||||||
$search[] = '{$vendor_id_number}';
|
$search[] = '{$vendor_id_number}';
|
||||||
$replace[] = $entity->id_number;
|
$replace[] = $entity->id_number;
|
||||||
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if ($entity instanceof Expense) {
|
if ($entity instanceof Expense) {
|
||||||
|
if ($entity->vendor) {
|
||||||
if($entity->vendor){
|
|
||||||
$search[] = '{$vendor_id_number}';
|
$search[] = '{$vendor_id_number}';
|
||||||
$replace[] = $entity->vendor->id_number;
|
$replace[] = $entity->vendor->id_number;
|
||||||
|
|
||||||
@ -629,7 +626,7 @@ trait GeneratesCounter
|
|||||||
|
|
||||||
$search[] = '{$expense_id_number}';
|
$search[] = '{$expense_id_number}';
|
||||||
$replace[] = $entity->id_number;
|
$replace[] = $entity->id_number;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($entity->client) {
|
if ($entity->client) {
|
||||||
$search[] = '{$client_custom1}';
|
$search[] = '{$client_custom1}';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user