From 68a97c5527b38ad5d7197439e5d7d5f58177ec5f Mon Sep 17 00:00:00 2001 From: Paul Derscheid Date: Fri, 6 Mar 2026 17:17:35 +0100 Subject: [PATCH] Bug 41575: (QA follow-up) Fix register description interpolation in cashup modal - The tidy replaced TT interpolation with a JS template literal expression but left it inside single quotes instead of using backticks or string concatenation - This caused the cashup confirmation dialog to show "Confirm cashup of" with no register name - The incorrect syntax also silently swallowed quote formatting that the auto tidy would normally have applied - Use string concatenation to match the surrounding code style Test plan: - Go to Point of sale, make a sale - Navigate to Cash summary - Click "Record cashup" on a register row - Verify the dialog says "Confirm cashup of " instead of "Confirm cashup of" Signed-off-by: Paul Derscheid --- koha-tmpl/intranet-tmpl/prog/en/modules/pos/register.tt | 8 +++++--- koha-tmpl/intranet-tmpl/prog/en/modules/pos/registers.tt | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/pos/register.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/pos/register.tt index 63eba53943a..c71c2b6f3f9 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/pos/register.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/pos/register.tt @@ -576,7 +576,9 @@ var result = ' ' + + '" data-register="' + + register.description + + '" href="#cashupSummaryModal"> ' + _("Summary") + "\n"; return result; @@ -590,10 +592,10 @@ 1 ); - $(document).ready(function() { + $(document).ready(function () { // Check for cashup hash in URL let hash = window.location.hash; - if (hash && hash.startsWith('#cashup-')) { + if (hash && hash.startsWith("#cashup-")) { let cashup_id = hash.substring(8); // Remove '#cashup-' prefix let $button = $('[data-cashup="' + cashup_id + '"]'); if ($button.length) { diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/pos/registers.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/pos/registers.tt index 3c95f06113b..4c774401895 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/pos/registers.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/pos/registers.tt @@ -245,7 +245,7 @@ // Check for cashup hash in URL let hash = window.location.hash; - if (hash && hash.startsWith('#cashup-')) { + if (hash && hash.startsWith("#cashup-")) { let cashup_id = hash.substring(8); // Remove '#cashup-' prefix let $button = $('[data-cashup="' + cashup_id + '"]'); if ($button.length) { -- 2.39.5