From 9afb3375454c887e33c60e043509e2b9617b3a4f Mon Sep 17 00:00:00 2001 From: Aleisha Amohia Date: Fri, 21 Apr 2023 03:11:49 +0000 Subject: [PATCH] Bug 33478: Apply formatting to RECEIPT To test: 1. Enable EnablePointOfSale and UseCashRegisters system preferences in Koha Administration -> Global system preferences 2. Go to Koha Administration -> Cash registers and add a new cash register 3. Go to Koha Administration -> Debit types and add a new debit type. Make sure you check the 'can be sold' option 4. Go to Point of sale 5. Select Add for your item under Items for purchase 6. Fill in Collect payment box and click Confirm 7. When payment is received, click Print receipt 8. Confirm your format settings for RECEIPT are applied --- .../prog/en/modules/pos/printreceipt.tt | 29 ++++++++++++------- pos/printreceipt.pl | 3 +- 2 files changed, 20 insertions(+), 12 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/pos/printreceipt.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/pos/printreceipt.tt index 581d5668fb9..e330d4ce6f3 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/pos/printreceipt.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/pos/printreceipt.tt @@ -14,20 +14,29 @@ [% INCLUDE 'blocking_errors.inc' %] - +[% PROCESS 'notice_format_translations.inc' %] +
- [% IF slip %] - [% IF plain %] -
-      [% slip | html %]
-    
+ [% IF ( slip ) %] +
+ [% IF slip.is_html %] + [% slip.content | $raw %] + [% ELSE %] +
+                [% slip.content | html %]
+            
+ [% END %] +
[% ELSE %] - [% slip | $raw %] + No print template found [% END %] - [% ELSE %] - No print template found - [% END %]
[% MACRO jsinclude BLOCK %] diff --git a/pos/printreceipt.pl b/pos/printreceipt.pl index bee3fa196ca..3fe9693336f 100755 --- a/pos/printreceipt.pl +++ b/pos/printreceipt.pl @@ -68,8 +68,7 @@ my $letter = C4::Letters::GetPreparedLetter( ); $template->param( - slip => $letter->{content}, - plain => !$letter->{is_html} + slip => $letter, ); output_html_with_http_headers $input, $cookie, $template->output; -- 2.30.2