mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
working on 8.1 support
This commit is contained in:
parent
94ca620b27
commit
2e37d793ac
@ -30,9 +30,8 @@ function nlog($output, $context = []): void
|
|||||||
$output = print_r($output, 1);
|
$output = print_r($output, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
$trace = debug_backtrace();
|
// $trace = debug_backtrace();
|
||||||
//nlog( debug_backtrace()[1]['function']);
|
|
||||||
// \Illuminate\Support\Facades\Log::channel('invoiceninja')->info(print_r($trace[1]['class'],1), []);
|
|
||||||
if (Ninja::isHosted()) {
|
if (Ninja::isHosted()) {
|
||||||
try {
|
try {
|
||||||
info($output);
|
info($output);
|
||||||
@ -42,10 +41,3 @@ function nlog($output, $context = []): void
|
|||||||
\Illuminate\Support\Facades\Log::channel('invoiceninja')->info($output, $context);
|
\Illuminate\Support\Facades\Log::channel('invoiceninja')->info($output, $context);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// if (!function_exists('ray')) {
|
|
||||||
// function ray($payload)
|
|
||||||
// {
|
|
||||||
// return true;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
@ -121,7 +121,7 @@ class InvoiceSum
|
|||||||
|
|
||||||
private function calculateInvoiceTaxes()
|
private function calculateInvoiceTaxes()
|
||||||
{
|
{
|
||||||
if (strlen($this->invoice->tax_name1) > 1) {
|
if (is_string($this->invoice->tax_name1) && strlen($this->invoice->tax_name1) > 1) {
|
||||||
$tax = $this->taxer($this->total, $this->invoice->tax_rate1);
|
$tax = $this->taxer($this->total, $this->invoice->tax_rate1);
|
||||||
$tax += $this->getSurchargeTaxTotalForKey($this->invoice->tax_name1, $this->invoice->tax_rate1);
|
$tax += $this->getSurchargeTaxTotalForKey($this->invoice->tax_name1, $this->invoice->tax_rate1);
|
||||||
|
|
||||||
@ -129,7 +129,7 @@ class InvoiceSum
|
|||||||
$this->total_tax_map[] = ['name' => $this->invoice->tax_name1.' '.floatval($this->invoice->tax_rate1).'%', 'total' => $tax];
|
$this->total_tax_map[] = ['name' => $this->invoice->tax_name1.' '.floatval($this->invoice->tax_rate1).'%', 'total' => $tax];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strlen($this->invoice->tax_name2) > 1) {
|
if (is_string($this->invoice->tax_name2) && strlen($this->invoice->tax_name2) > 1) {
|
||||||
$tax = $this->taxer($this->total, $this->invoice->tax_rate2);
|
$tax = $this->taxer($this->total, $this->invoice->tax_rate2);
|
||||||
$tax += $this->getSurchargeTaxTotalForKey($this->invoice->tax_name2, $this->invoice->tax_rate2);
|
$tax += $this->getSurchargeTaxTotalForKey($this->invoice->tax_name2, $this->invoice->tax_rate2);
|
||||||
|
|
||||||
@ -137,7 +137,7 @@ class InvoiceSum
|
|||||||
$this->total_tax_map[] = ['name' => $this->invoice->tax_name2.' '.floatval($this->invoice->tax_rate2).'%', 'total' => $tax];
|
$this->total_tax_map[] = ['name' => $this->invoice->tax_name2.' '.floatval($this->invoice->tax_rate2).'%', 'total' => $tax];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strlen($this->invoice->tax_name3) > 1) {
|
if (is_string($this->invoice->tax_name3) && strlen($this->invoice->tax_name3) > 1) {
|
||||||
$tax = $this->taxer($this->total, $this->invoice->tax_rate3);
|
$tax = $this->taxer($this->total, $this->invoice->tax_rate3);
|
||||||
$tax += $this->getSurchargeTaxTotalForKey($this->invoice->tax_name3, $this->invoice->tax_rate3);
|
$tax += $this->getSurchargeTaxTotalForKey($this->invoice->tax_name3, $this->invoice->tax_rate3);
|
||||||
|
|
||||||
|
@ -41,6 +41,7 @@ class GmailTransport extends AbstractTransport
|
|||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
parent::__construct();
|
parent::__construct();
|
||||||
|
|
||||||
$this->gmail = new Mail;
|
$this->gmail = new Mail;
|
||||||
$this->body = new \Google\Service\Gmail\Message();
|
$this->body = new \Google\Service\Gmail\Message();
|
||||||
|
|
||||||
|
@ -166,6 +166,6 @@ class EmailEntity implements ShouldQueue
|
|||||||
|
|
||||||
public function failed($e)
|
public function failed($e)
|
||||||
{
|
{
|
||||||
nlog($e->getMessage());
|
// nlog($e->getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -279,7 +279,7 @@ class HtmlEngine
|
|||||||
$data['$invoice.custom2'] = ['value' => $this->helpers->formatCustomFieldValue($this->company->custom_fields, 'invoice2', $this->entity->custom_value2, $this->client) ?: ' ', 'label' => $this->helpers->makeCustomField($this->company->custom_fields, 'invoice2')];
|
$data['$invoice.custom2'] = ['value' => $this->helpers->formatCustomFieldValue($this->company->custom_fields, 'invoice2', $this->entity->custom_value2, $this->client) ?: ' ', 'label' => $this->helpers->makeCustomField($this->company->custom_fields, 'invoice2')];
|
||||||
$data['$invoice.custom3'] = ['value' => $this->helpers->formatCustomFieldValue($this->company->custom_fields, 'invoice3', $this->entity->custom_value3, $this->client) ?: ' ', 'label' => $this->helpers->makeCustomField($this->company->custom_fields, 'invoice3')];
|
$data['$invoice.custom3'] = ['value' => $this->helpers->formatCustomFieldValue($this->company->custom_fields, 'invoice3', $this->entity->custom_value3, $this->client) ?: ' ', 'label' => $this->helpers->makeCustomField($this->company->custom_fields, 'invoice3')];
|
||||||
$data['$invoice.custom4'] = ['value' => $this->helpers->formatCustomFieldValue($this->company->custom_fields, 'invoice4', $this->entity->custom_value4, $this->client) ?: ' ', 'label' => $this->helpers->makeCustomField($this->company->custom_fields, 'invoice4')];
|
$data['$invoice.custom4'] = ['value' => $this->helpers->formatCustomFieldValue($this->company->custom_fields, 'invoice4', $this->entity->custom_value4, $this->client) ?: ' ', 'label' => $this->helpers->makeCustomField($this->company->custom_fields, 'invoice4')];
|
||||||
$data['$invoice.public_notes'] = ['value' => Helpers::processReservedKeywords(\nl2br($this->entity->public_notes), $this->client) ?: '', 'label' => ctrans('texts.public_notes')];
|
$data['$invoice.public_notes'] = ['value' => Helpers::processReservedKeywords(\nl2br($this->entity->public_notes ?: ''), $this->client) ?: '', 'label' => ctrans('texts.public_notes')];
|
||||||
$data['$entity.public_notes'] = &$data['$invoice.public_notes'];
|
$data['$entity.public_notes'] = &$data['$invoice.public_notes'];
|
||||||
$data['$public_notes'] = &$data['$invoice.public_notes'];
|
$data['$public_notes'] = &$data['$invoice.public_notes'];
|
||||||
$data['$notes'] = &$data['$public_notes'];
|
$data['$notes'] = &$data['$public_notes'];
|
||||||
|
@ -67,7 +67,7 @@
|
|||||||
"league/flysystem-aws-s3-v3": "^3.0",
|
"league/flysystem-aws-s3-v3": "^3.0",
|
||||||
"league/fractal": "^0.17.0",
|
"league/fractal": "^0.17.0",
|
||||||
"league/omnipay": "^3.1",
|
"league/omnipay": "^3.1",
|
||||||
"livewire/livewire": "^2.6",
|
"livewire/livewire": "^2.10",
|
||||||
"microsoft/microsoft-graph": "^1.69",
|
"microsoft/microsoft-graph": "^1.69",
|
||||||
"mollie/mollie-api-php": "^2.36",
|
"mollie/mollie-api-php": "^2.36",
|
||||||
"nelexa/zip": "^4.0",
|
"nelexa/zip": "^4.0",
|
||||||
@ -95,7 +95,7 @@
|
|||||||
"require-dev": {
|
"require-dev": {
|
||||||
"php": "^7.4|^8.0",
|
"php": "^7.4|^8.0",
|
||||||
"anahkiasen/former": "^4.2",
|
"anahkiasen/former": "^4.2",
|
||||||
"barryvdh/laravel-debugbar": "^3.4",
|
"barryvdh/laravel-debugbar": "^3.6",
|
||||||
"brianium/paratest": "^6.1",
|
"brianium/paratest": "^6.1",
|
||||||
"darkaonline/l5-swagger": "8.1.0",
|
"darkaonline/l5-swagger": "8.1.0",
|
||||||
"fakerphp/faker": "^1.14",
|
"fakerphp/faker": "^1.14",
|
||||||
@ -103,7 +103,8 @@
|
|||||||
"laravel/dusk": "^6.15",
|
"laravel/dusk": "^6.15",
|
||||||
"mockery/mockery": "^1.4.4",
|
"mockery/mockery": "^1.4.4",
|
||||||
"nunomaduro/collision": "^6.1",
|
"nunomaduro/collision": "^6.1",
|
||||||
"phpunit/phpunit": "^9.5.10"
|
"phpunit/phpunit": "^9.5.10",
|
||||||
|
"spatie/laravel-ignition": "^1.0"
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
|
715
composer.lock
generated
715
composer.lock
generated
File diff suppressed because it is too large
Load Diff
@ -51,6 +51,13 @@ return [
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
'channels' => [
|
'channels' => [
|
||||||
|
|
||||||
|
'invoiceninja' => [
|
||||||
|
'driver' => 'single',
|
||||||
|
'path' => storage_path('logs/invoiceninja.log'),
|
||||||
|
'level' => env('LOG_LEVEL', 'debug'),
|
||||||
|
],
|
||||||
|
|
||||||
'stack' => [
|
'stack' => [
|
||||||
'driver' => 'stack',
|
'driver' => 'stack',
|
||||||
'channels' => ['single'],
|
'channels' => ['single'],
|
||||||
@ -117,11 +124,6 @@ return [
|
|||||||
'emergency' => [
|
'emergency' => [
|
||||||
'path' => storage_path('logs/laravel.log'),
|
'path' => storage_path('logs/laravel.log'),
|
||||||
],
|
],
|
||||||
|
|
||||||
'invoiceninja' => [
|
|
||||||
'driver' => 'single',
|
|
||||||
'level' => 'debug',
|
|
||||||
'path' => storage_path('logs/invoiceninja.log'),
|
|
||||||
],
|
],
|
||||||
|
|
||||||
'gelf' => [
|
'gelf' => [
|
||||||
@ -185,6 +187,6 @@ return [
|
|||||||
// from the Monolog record. Default is null (no extra prefix)
|
// from the Monolog record. Default is null (no extra prefix)
|
||||||
'extra_prefix' => null,
|
'extra_prefix' => null,
|
||||||
],
|
],
|
||||||
],
|
|
||||||
|
|
||||||
];
|
];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user