mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
commit
795485a3c3
@ -1 +1 @@
|
||||
5.7.36
|
||||
5.7.37
|
@ -1179,8 +1179,6 @@ class BaseController extends Controller
|
||||
return 'main.next.dart.js';
|
||||
case 'profile':
|
||||
return 'main.profile.dart.js';
|
||||
case 'html':
|
||||
return 'main.html.dart.js';
|
||||
default:
|
||||
return 'main.foss.dart.js';
|
||||
}
|
||||
|
@ -1036,16 +1036,19 @@ class PdfBuilder
|
||||
*/
|
||||
public function getTableTotals() :array
|
||||
{
|
||||
|
||||
//need to see where we don't pass all these particular variables. try and refactor thisout
|
||||
$_variables = array_key_exists('variables', $this->service->options)
|
||||
? $this->service->options['variables']
|
||||
: ['values' => ['$entity.public_notes' => $this->service->config->entity->public_notes, '$entity.terms' => $this->service->config->entity->terms, '$entity_footer' => $this->service->config->entity->footer], 'labels' => []];
|
||||
// $_variables = array_key_exists('variables', $this->service->options)
|
||||
// ? $this->service->options['variables']
|
||||
// : ['values' => ['$entity.public_notes' => $this->service->config->entity->public_notes, '$entity.terms' => $this->service->config->entity->terms, '$entity_footer' => $this->service->config->entity->footer], 'labels' => []];
|
||||
|
||||
$_variables = $this->service->html_variables;
|
||||
|
||||
$variables = $this->service->config->pdf_variables['total_columns'];
|
||||
|
||||
$elements = [
|
||||
['element' => 'div', 'properties' => ['style' => 'display: flex; flex-direction: column;'], 'elements' => [
|
||||
['element' => 'p', 'content' => strtr(str_replace(["labels","values"], ["",""], $_variables['values']['$entity.public_notes']), $_variables), 'properties' => ['data-ref' => 'total_table-public_notes', 'style' => 'text-align: left;']],
|
||||
['element' => 'p', 'content' => strtr(str_replace(["labels", "values"], ["",""], $_variables['values']['$entity.public_notes']), $_variables), 'properties' => ['data-ref' => 'total_table-public_notes', 'style' => 'text-align: left;']],
|
||||
['element' => 'p', 'content' => '', 'properties' => ['style' => 'text-align: left; display: flex; flex-direction: column; page-break-inside: auto;'], 'elements' => [
|
||||
['element' => 'span', 'content' => '$entity.terms_label: ', 'properties' => ['hidden' => $this->entityVariableCheck('$entity.terms'), 'data-ref' => 'total_table-terms-label', 'style' => 'font-weight: bold; text-align: left; margin-top: 1rem;']],
|
||||
['element' => 'span', 'content' => strtr(str_replace("labels", "", $_variables['values']['$entity.terms']), $_variables['labels']), 'properties' => ['data-ref' => 'total_table-terms', 'style' => 'text-align: left;']],
|
||||
|
@ -18,6 +18,7 @@ use Carbon\Carbon;
|
||||
use Illuminate\Support\Str;
|
||||
use stdClass;
|
||||
|
||||
//30-10-2023: due to HTML encoding, need to remove </ from string when searching for matches
|
||||
class Helpers
|
||||
{
|
||||
use MakesDates;
|
||||
@ -266,12 +267,12 @@ class Helpers
|
||||
$_right = '';
|
||||
|
||||
// If right side doesn't have any calculations, replace with raw ranges keyword.
|
||||
if (! Str::contains($right, ['-', '+', '/', '*'])) {
|
||||
if (! Str::contains(str_replace("</", "", $right), ['-', '+', '/', '*'])) {
|
||||
$_right = Carbon::createFromDate($currentDateTime->year, $currentDateTime->month)->translatedFormat('F Y');
|
||||
}
|
||||
|
||||
// If right side contains one of math operations, calculate.
|
||||
if (Str::contains($right, ['+'])) {
|
||||
if (Str::contains(str_replace("</", "", $right), ['+'])) {
|
||||
$operation = preg_match_all('/(?!^-)[+*\/-](\s?-)?/', $right, $_matches);
|
||||
|
||||
$_operation = array_shift($_matches)[0]; // + -
|
||||
@ -306,7 +307,7 @@ class Helpers
|
||||
continue;
|
||||
}
|
||||
|
||||
if (! Str::contains($match, ['-', '+', '/', '*'])) {
|
||||
if (! Str::contains(str_replace("</", "", $match), ['-', '+', '/', '*'])) {
|
||||
$value = preg_replace(
|
||||
sprintf('/%s/', $matches->keys()->first()),
|
||||
$replacements['literal'][$matches->keys()->first()],
|
||||
@ -315,7 +316,7 @@ class Helpers
|
||||
);
|
||||
}
|
||||
|
||||
if (Str::contains($match, ['-', '+', '/', '*'])) {
|
||||
if (Str::contains(str_replace("</", "", $match), ['-', '+', '/', '*'])) {
|
||||
$operation = preg_match_all('/(?!^-)[+*\/-](\s?-)?/', $match, $_matches);
|
||||
|
||||
$_operation = array_shift($_matches)[0];
|
||||
|
36
composer.lock
generated
36
composer.lock
generated
@ -60,16 +60,16 @@
|
||||
},
|
||||
{
|
||||
"name": "apimatic/core",
|
||||
"version": "0.3.2",
|
||||
"version": "0.3.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/apimatic/core-lib-php.git",
|
||||
"reference": "32238fb83ce9a3ebef38c726b497c0f218d6e6c9"
|
||||
"reference": "984123c831598fc31749d194aa044cd46f227d29"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/apimatic/core-lib-php/zipball/32238fb83ce9a3ebef38c726b497c0f218d6e6c9",
|
||||
"reference": "32238fb83ce9a3ebef38c726b497c0f218d6e6c9",
|
||||
"url": "https://api.github.com/repos/apimatic/core-lib-php/zipball/984123c831598fc31749d194aa044cd46f227d29",
|
||||
"reference": "984123c831598fc31749d194aa044cd46f227d29",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -107,9 +107,9 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/apimatic/core-lib-php/issues",
|
||||
"source": "https://github.com/apimatic/core-lib-php/tree/0.3.2"
|
||||
"source": "https://github.com/apimatic/core-lib-php/tree/0.3.3"
|
||||
},
|
||||
"time": "2023-07-11T09:30:32+00:00"
|
||||
"time": "2023-10-26T06:52:40+00:00"
|
||||
},
|
||||
{
|
||||
"name": "apimatic/core-interfaces",
|
||||
@ -485,16 +485,16 @@
|
||||
},
|
||||
{
|
||||
"name": "aws/aws-sdk-php",
|
||||
"version": "3.283.11",
|
||||
"version": "3.283.13",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/aws/aws-sdk-php.git",
|
||||
"reference": "348b68edcc83062c329cf7540c4c92d061d27d9c"
|
||||
"reference": "853eecfb21e8d623fa1b32e597b0a75912e8a404"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/348b68edcc83062c329cf7540c4c92d061d27d9c",
|
||||
"reference": "348b68edcc83062c329cf7540c4c92d061d27d9c",
|
||||
"url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/853eecfb21e8d623fa1b32e597b0a75912e8a404",
|
||||
"reference": "853eecfb21e8d623fa1b32e597b0a75912e8a404",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -574,9 +574,9 @@
|
||||
"support": {
|
||||
"forum": "https://forums.aws.amazon.com/forum.jspa?forumID=80",
|
||||
"issues": "https://github.com/aws/aws-sdk-php/issues",
|
||||
"source": "https://github.com/aws/aws-sdk-php/tree/3.283.11"
|
||||
"source": "https://github.com/aws/aws-sdk-php/tree/3.283.13"
|
||||
},
|
||||
"time": "2023-10-24T18:10:38+00:00"
|
||||
"time": "2023-10-26T18:14:40+00:00"
|
||||
},
|
||||
{
|
||||
"name": "bacon/bacon-qr-code",
|
||||
@ -16363,16 +16363,16 @@
|
||||
},
|
||||
{
|
||||
"name": "phpunit/phpunit",
|
||||
"version": "10.4.1",
|
||||
"version": "10.4.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/phpunit.git",
|
||||
"reference": "62bd7af13d282deeb95650077d28ba3600ca321c"
|
||||
"reference": "cacd8b9dd224efa8eb28beb69004126c7ca1a1a1"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/62bd7af13d282deeb95650077d28ba3600ca321c",
|
||||
"reference": "62bd7af13d282deeb95650077d28ba3600ca321c",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/cacd8b9dd224efa8eb28beb69004126c7ca1a1a1",
|
||||
"reference": "cacd8b9dd224efa8eb28beb69004126c7ca1a1a1",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -16444,7 +16444,7 @@
|
||||
"support": {
|
||||
"issues": "https://github.com/sebastianbergmann/phpunit/issues",
|
||||
"security": "https://github.com/sebastianbergmann/phpunit/security/policy",
|
||||
"source": "https://github.com/sebastianbergmann/phpunit/tree/10.4.1"
|
||||
"source": "https://github.com/sebastianbergmann/phpunit/tree/10.4.2"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@ -16460,7 +16460,7 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2023-10-08T05:01:11+00:00"
|
||||
"time": "2023-10-26T07:21:45+00:00"
|
||||
},
|
||||
{
|
||||
"name": "sebastian/cli-parser",
|
||||
|
@ -15,8 +15,8 @@ return [
|
||||
'require_https' => env('REQUIRE_HTTPS', true),
|
||||
'app_url' => rtrim(env('APP_URL', ''), '/'),
|
||||
'app_domain' => env('APP_DOMAIN', 'invoicing.co'),
|
||||
'app_version' => env('APP_VERSION','5.7.36'),
|
||||
'app_tag' => env('APP_TAG','5.7.36'),
|
||||
'app_version' => env('APP_VERSION','5.7.37'),
|
||||
'app_tag' => env('APP_TAG','5.7.37'),
|
||||
'minimum_client_version' => '5.0.16',
|
||||
'terms_version' => '1.0.1',
|
||||
'api_secret' => env('API_SECRET', ''),
|
||||
|
@ -156,7 +156,7 @@ span {
|
||||
</button>
|
||||
|
||||
<div id="notes" class="py-10 border-b-2 border-fuschia-600" x-show="show_notes">
|
||||
{{ strip_tags($entity->public_notes) }}
|
||||
{!! html_entity_decode($entity->public_notes) !!}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@ -171,7 +171,7 @@ span {
|
||||
</button>
|
||||
|
||||
<div id="terms" class="py-10 border-b-2 border-fuschia-600" x-show="show_terms">
|
||||
{{ strip_tags($entity->terms) }}
|
||||
{!! html_entity_decode($entity->terms) !!}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@ -186,7 +186,7 @@ span {
|
||||
</button>
|
||||
|
||||
<div id="terms" class="py-10 border-b-2 border-fuschia-600" x-show="show_footer">
|
||||
{{ strip_tags($entity->footer) }}
|
||||
{!! html_entity_decode($entity->footer) !!}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user