diff --git a/VERSION.txt b/VERSION.txt index 1d1a43ec8a07..794e21dd8eba 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1 +1 @@ -5.7.36 \ No newline at end of file +5.7.37 \ No newline at end of file diff --git a/app/Http/Controllers/BaseController.php b/app/Http/Controllers/BaseController.php index 2d5d41c24e3a..bab418747b5e 100644 --- a/app/Http/Controllers/BaseController.php +++ b/app/Http/Controllers/BaseController.php @@ -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'; } diff --git a/app/Http/Livewire/PdfSlot.php b/app/Http/Livewire/PdfSlot.php index 91a51e588acd..1a12a4dc68bf 100644 --- a/app/Http/Livewire/PdfSlot.php +++ b/app/Http/Livewire/PdfSlot.php @@ -268,7 +268,7 @@ class PdfSlot extends Component 'line_total' => Number::formatMoney($item->line_total, $this->entity->client ?: $this->entity->vendor), ]; }); - + return $product_items; } diff --git a/app/Services/Pdf/PdfBuilder.php b/app/Services/Pdf/PdfBuilder.php index d6df412c4213..c83e0fed78c4 100644 --- a/app/Services/Pdf/PdfBuilder.php +++ b/app/Services/Pdf/PdfBuilder.php @@ -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;']], diff --git a/app/Utils/Helpers.php b/app/Utils/Helpers.php index 0bbbca13d219..029d79372bf9 100644 --- a/app/Utils/Helpers.php +++ b/app/Utils/Helpers.php @@ -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]; diff --git a/composer.lock b/composer.lock index e1e0f74679ae..25ea94daad71 100644 --- a/composer.lock +++ b/composer.lock @@ -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", diff --git a/config/ninja.php b/config/ninja.php index 6f9fdab3d065..6d1c3534d3d3 100644 --- a/config/ninja.php +++ b/config/ninja.php @@ -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', ''), diff --git a/resources/views/portal/ninja2020/components/html-viewer.blade.php b/resources/views/portal/ninja2020/components/html-viewer.blade.php index 2841d3a17487..f20885864a6a 100644 --- a/resources/views/portal/ninja2020/components/html-viewer.blade.php +++ b/resources/views/portal/ninja2020/components/html-viewer.blade.php @@ -156,7 +156,7 @@ span {