Bug 41325

Summary: register.tt is broken by translation
Product: Koha Reporter: Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski>
Component: Point of SaleAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: martin.renvoize
Version: Main   
Hardware: All   
OS: All   
GIT URL: Initiative type: ---
Sponsorship status: --- Comma delimited list of Sponsors:
Crowdfunding goal: 0 Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Bug Depends on: 23355    
Bug Blocks:    

Description Baptiste Wojtkowski (bwoj) 2025-11-27 15:00:51 UTC
following template is broken since it was created in Bug 23355 after translation koha-tmpl/intranet-tmpl/prog/en/modules/pos/register.tt


117   <td>{ "type": "credit", "identifier": "[%- accountline.credit_number | html -%]", "description": "[%- PROCESS account_type_description account=accountline -%] ([% AuthorisedValues.GetByCode('PAYMENT_TYPE', accountline.payment_type ) | html %])", "amount": "[% accountline.amount * -1 | $Price %]", "timestamp": "[% accountline.timestamp | $KohaDates with_hours => 1 %]" }</td>



For example in french:
 <td>{ "type" : "crédit", "identifiant" : "[%- accountline.credit_number | html -%]", "description" : "[%- PROCESS ac
count_type_description account=accountline -%] ([% AuthorisedValues.GetByCode( 'PAYMENT_TYPE', accountline.payment_ty
pe ) | html %])", "montant" : "[% accountline.amount * -1 | $Price %]", "horodatage" : "[% accountline.timestamp | $K
ohaDates with_hours => 1 %]" }</td>



Since this is in plain HTML, strings like "timestamp" get translated. Hence, while reading in this part of the code

367                     if ( group ) {
368                     var details = JSON.parse(rows.data().pluck(1).pop());
369                     var identifier = details.identifier || group;
370                     return $('<tr class="'+details.type+'"/>')