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 year, $currentDateTime->month)->translatedFormat('F Y'); } // If right side contains one of math operations, calculate. - if (Str::contains($right, ['+'])) { + if (Str::contains(str_replace("keys()->first()), $replacements['literal'][$matches->keys()->first()], @@ -315,7 +316,7 @@ class Helpers ); } - if (Str::contains($match, ['-', '+', '/', '*'])) { + if (Str::contains(str_replace(" 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 {
- {{ strip_tags($entity->public_notes) }} + {!! html_entity_decode($entity->public_notes) !!}
@@ -171,7 +171,7 @@ span {
- {{ strip_tags($entity->terms) }} + {!! html_entity_decode($entity->terms) !!}
@@ -186,7 +186,7 @@ span {
- {{ strip_tags($entity->footer) }} + {!! html_entity_decode($entity->footer) !!}