Bugzilla – Attachment 121136 Details for
Bug 28368
Error when printing receipt of point of sale
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28368: Add fallback language for anonymous payment receipts
Bug-28368-Add-fallback-language-for-anonymous-paym.patch (text/plain), 1.37 KB, created by
Victor Grousset/tuxayo
on 2021-05-18 21:39:34 UTC
(
hide
)
Description:
Bug 28368: Add fallback language for anonymous payment receipts
Filename:
MIME Type:
Creator:
Victor Grousset/tuxayo
Created:
2021-05-18 21:39:34 UTC
Size:
1.37 KB
patch
obsolete
>From 3080272e6aa20ffd065caf2033ecf1e3b32b0018 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Tue, 18 May 2021 15:57:29 +0100 >Subject: [PATCH] Bug 28368: Add fallback language for anonymous payment > receipts > >This adds a fallback for when a payment is made anonymously to allow >printing a receipt in the staff members current session language. > >Test plan >1. Set `EnablePointOfSale` and `UseCashRegisters` >2. Add new cash register` >3. New debit type that 'can be sold' >4. Make a sale (via Point of Sale) using the above debit type. >5. Attempt to 'print receipt' from the subsequent prompt >6. Not the ISE: Can't call method "lang" >7. Apply patch >8. Attempt to 'print receipt' again, this time it should work. > >Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> >--- > pos/printreceipt.pl | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > >diff --git a/pos/printreceipt.pl b/pos/printreceipt.pl >index 14e4b72484..8f18f6bc6b 100755 >--- a/pos/printreceipt.pl >+++ b/pos/printreceipt.pl >@@ -51,8 +51,9 @@ output_and_exit_if_error( > } > ) if $patron; # Payment could have been anonymous > >+my $lang = $patron ? $patron->lang : $template->lang; > my $letter = C4::Letters::getletter( 'pos', 'RECEIPT', >- C4::Context::mybranch, 'print', $patron->lang ); >+ C4::Context::mybranch, 'print', $lang ); > > $template->param( > letter => $letter, >-- >2.31.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 28368
:
121114
| 121136