Bug 30619

Summary: Add the option to email receipts as an alternative to printing
Product: Koha Reporter: Martin Renvoize <martin.renvoize>
Component: Fines and feesAssignee: Isobel Graham <isobel.graham09>
Status: CLOSED FIXED QA Contact: Kyle M Hall <kyle>
Severity: enhancement    
Priority: P5 - low CC: david, dcook, lucas, sally.healey, victor
Version: master   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31448
Change sponsored?: Sponsored Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
This enhancement adds an email receipt option to the Point of Sale module, along with a sample notice (RECEIPT). When completing a transaction, there is now an 'Email receipt' button next to 'Print receipt' button - the email address is entered in a pop-up window if the email receipt option is selected.
Version(s) released in:
22.11.00
Bug Depends on: 13985    
Bug Blocks:    
Attachments: Bug 30619: Add email receipt to POS
Bug 30619: Add sample email notice
Bug 30619: Add email receipt to POS
Bug 30619: Add sample email notice
Bug 30619: Add email receipt to POS
Bug 30619: Add sample email notice
Bug 30619: Add email receipt to POS
Bug 30619: Add sample email notice
Bug 30619: (QA follow-up) Add exec flag to bug_30619.pl

Description Martin Renvoize 2022-04-26 11:02:38 UTC
We have the 'UseEmailReceipts' preference, but we don't have any way for patrons to opt in/out of an email receipt at payment time or for anonymous payments in the point of sale system.

It would be great to have a 'Email receipt' option wherever we display the option to 'Print receipt' with the ability to either use the borrowers primary notices address or, for the anonymous case, define an email address there and then for the receipt to be sent to.
Comment 1 Isobel Graham 2022-07-01 07:24:36 UTC
Created attachment 136798 [details] [review]
Bug 30619: Add email receipt to POS

This patch adds the ability to use email receipts with the point of sale
module.

To test:
1) Configure your Koha to enable the point of sale system.
2) Add an email template to the 'Point of sale > RECEIPT' notice.
3) Add some charges on point of sale and pay for them.
3a) You should now see a new 'Email receipt' button next to the 'Print
receipt' option.
3b) Clicking the button will display a modal to enter the anonymous
users email address
3c) Enter an email address and confirm to send the email
Comment 2 Martin Renvoize 2022-07-01 09:04:55 UTC
Created attachment 136800 [details] [review]
Bug 30619: Add sample email notice

This patch adds a default same email type notice for the point of sale
receipt.
Comment 3 Martin Renvoize 2022-07-01 09:06:48 UTC
Thanks Isobel, great work.

I've added a follow-up patch to set the default email notice template for you.

Test plan wise, this can be easily tested using the sandboxes.

Follow the plan and then you can spot that the email has been sent using the Koha Mail Log available from the sandbox management UI.
Comment 4 Martin Renvoize 2022-07-01 09:11:18 UTC
Created attachment 136801 [details] [review]
Bug 30619: Add email receipt to POS

This patch adds the ability to use email receipts with the point of sale
module.

To test:
1) Configure your Koha to enable the point of sale system.
2) Add an email template to the 'Point of sale > RECEIPT' notice.
3) Add some charges on point of sale and pay for them.
3a) You should now see a new 'Email receipt' button next to the 'Print
receipt' option.
3b) Clicking the button will display a modal to enter the anonymous
users email address
3c) Enter an email address and confirm to send the email

Sponsored-by: Martin Renvoize <martin.renvoize@gmail.com>
Comment 5 Martin Renvoize 2022-07-01 09:11:21 UTC
Created attachment 136802 [details] [review]
Bug 30619: Add sample email notice

This patch adds a default same email type notice for the point of sale
receipt.
Comment 6 ByWater Sandboxes 2022-07-04 16:55:21 UTC
Created attachment 137131 [details] [review]
Bug 30619: Add email receipt to POS

This patch adds the ability to use email receipts with the point of sale
module.

To test:
1) Configure your Koha to enable the point of sale system.
2) Add an email template to the 'Point of sale > RECEIPT' notice.
3) Add some charges on point of sale and pay for them.
3a) You should now see a new 'Email receipt' button next to the 'Print
receipt' option.
3b) Clicking the button will display a modal to enter the anonymous
users email address
3c) Enter an email address and confirm to send the email

Sponsored-by: Martin Renvoize <martin.renvoize@gmail.com>

Signed-off-by: David Nind <david@davidnind.com>
Comment 7 ByWater Sandboxes 2022-07-04 16:55:24 UTC
Created attachment 137132 [details] [review]
Bug 30619: Add sample email notice

This patch adds a default same email type notice for the point of sale
receipt.

Signed-off-by: David Nind <david@davidnind.com>
Comment 8 Kyle M Hall 2022-08-19 15:18:59 UTC
Created attachment 139502 [details] [review]
Bug 30619: Add email receipt to POS

This patch adds the ability to use email receipts with the point of sale
module.

To test:
1) Configure your Koha to enable the point of sale system.
2) Add an email template to the 'Point of sale > RECEIPT' notice.
3) Add some charges on point of sale and pay for them.
3a) You should now see a new 'Email receipt' button next to the 'Print
receipt' option.
3b) Clicking the button will display a modal to enter the anonymous
users email address
3c) Enter an email address and confirm to send the email

Sponsored-by: Martin Renvoize <martin.renvoize@gmail.com>

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 9 Kyle M Hall 2022-08-19 15:19:10 UTC
Created attachment 139503 [details] [review]
Bug 30619: Add sample email notice

This patch adds a default same email type notice for the point of sale
receipt.

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 10 Kyle M Hall 2022-08-19 15:21:16 UTC
Created attachment 139504 [details] [review]
Bug 30619: (QA follow-up) Add exec flag to bug_30619.pl
Comment 11 Tomás Cohen Arazi 2022-09-07 23:43:45 UTC
Pushed to master for 22.11.

Nice work everyone, thanks!
Comment 12 Lucas Gass 2022-10-31 20:20:29 UTC
Enhancement will not be backported to 22.05.x series