Summary: | Monetary accounts notices should be definable at the credit_type/debit_type level | ||
---|---|---|---|
Product: | Koha | Reporter: | Martin Renvoize (ashimema) <martin.renvoize> |
Component: | Notices | Assignee: | Martin Renvoize (ashimema) <martin.renvoize> |
Status: | CLOSED FIXED | QA Contact: | Kyle M Hall (khall) <kyle> |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | caroline.cyr-la-rose, joonas.kylmala, kyle, lucas, sally.healey, victor |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Trivial patch |
Documentation contact: | Caroline Cyr La Rose | Documentation submission: | https://gitlab.com/koha-community/koha-manual/-/merge_requests/678 |
Text to go in the release notes: |
**Sponsored by** *PTFS Europe*
This enhancement allows end users to define their account notices (print receipt and print invoice for example) at the debit type and credit type level.
Simply add a new notice with code 'DEBIT_your_debit_type_code' or 'CREDIT_your_credit_type_code' to the notices and we will pick that over the existing default 'ACCOUNT_DEBIT' and 'ACCOUNT_CREDIT' notices.
|
Version(s) released in: |
22.11.00,21.11, 22.05.05
|
Circulation function: | |||
Bug Depends on: | 26734 | ||
Bug Blocks: | 24381 | ||
Attachments: |
Bug 26686: Fix sorting of "updated on" and "time created" on notices tab
Bug 26689: Check for specific template then fallback Bug 26689: Check for specific template then fallback - printfeercpt Bug 26689: Check for specific template then fallback - printinvoice Bug 26689: Check for specific template then fallback - printfeercpt Bug 26689: Check for specific template then fallback - printinvoice Bug 26689: Check for specific template then fallback - printfeercpt Bug 26689: Check for specific template then fallback - printinvoice Bug 26689: Check for specific template then fallback - printfeercpt Bug 26689: Check for specific template then fallback - printinvoice Bug 26689: Check for specific template then fallback - printfeercpt Bug 26689: Check for specific template then fallback - printinvoice Bug 26689: Prepend letter codes. |
Description
Martin Renvoize (ashimema)
2020-10-15 10:04:21 UTC
Created attachment 112081 [details] [review] Bug 26686: Fix sorting of "updated on" and "time created" on notices tab In the patron's account in the staff interface there is a tab 'Notices' that shows all notices sent out to a patron. The updated on column would not sort at all, but there was also some markup missing for the time created column. To test: - Make sure you have a patron account with some notices, ideally with different times and dates - Verify that the updated on column doesn't sort at all - Apply patch - Verify both date columns now sort correctly for different DateFormat settings Created attachment 118204 [details] [review] Bug 26689: Check for specific template then fallback This patch adds a check for a more specific ACCOUNT_CREDIT template (named to match the credit_type_code of the credit line) prior to falling back to the ACCOUNT_CREDIT template. Created attachment 118211 [details] [review] Bug 26689: Check for specific template then fallback - printfeercpt This patch adds a check for a more specific ACCOUNT_CREDIT template (named to match the credit_type_code of the credit line) prior to falling back to the ACCOUNT_CREDIT template. Test plan 1/ On a patrons account page use the print option on a series of credit lines with differing credit types (Payment, Lost Item Return, Writeoff) 2/ Note that the same template 'ACCOUNT_CREDIT' is used for all types 3/ Apply the patch 4/ Run step 1 again and note all still print using ACCOUNT_CREDIT 5/ Add a new notice template under the 'circulation' module with a code that matches one of your account credit types (PAYMENT, WRITEOFF, LOST_FOUND) 6/ Run step 1 again and note that where you have added a specific notice for that credit type it has been used. Created attachment 118212 [details] [review] Bug 26689: Check for specific template then fallback - printinvoice This patch adds a check for a more specific ACCOUNT_DEBIT template (named to match the debit_type_code of the credit line) prior to falling back to the ACCOUNT_DEBIT template. Test plan 1/ On a patrons account page use the print option on a series of debit lines with differing credit types (Overdue, Payout) 2/ Note that the same template 'ACCOUNT_DEBIT' is used for all types 3/ Apply the patch 4/ Run step 1 again and note all still print using ACCOUNT_DEBIT 5/ Add a new notice template under the 'circulation' module with a code that matches one of your account debit types (OVERDUE, PAYOUT) 6/ Run step 1 again and note that where you have added a specific notice for that debit type it has been used. Where this becomes really cool is for where a debit type or credit type doesn't entirely fit with the expected... Examples: * WRITEOFF is a credit type but it's not a payment.. so doesn't make sense to have 'Thanks for your payment' * CREDIT is a credit type for credit notes.. it makes sense to have it's own notice * PAYOUT is a debit type.. but it really doesn't make sense to print it the same way as other debit types. Martin, this doesn't apply anymore, could you now do re-do this as the missing dependency was just pushed to master? Created attachment 119572 [details] [review] Bug 26689: Check for specific template then fallback - printfeercpt This patch adds a check for a more specific ACCOUNT_CREDIT template (named to match the credit_type_code of the credit line) prior to falling back to the ACCOUNT_CREDIT template. Test plan 1/ On a patrons account page use the print option on a series of credit lines with differing credit types (Payment, Lost Item Return, Writeoff) 2/ Note that the same template 'ACCOUNT_CREDIT' is used for all types 3/ Apply the patch 4/ Run step 1 again and note all still print using ACCOUNT_CREDIT 5/ Add a new notice template under the 'circulation' module with a code that matches one of your account credit types (PAYMENT, WRITEOFF, LOST_FOUND) 6/ Run step 1 again and note that where you have added a specific notice for that credit type it has been used. Created attachment 119573 [details] [review] Bug 26689: Check for specific template then fallback - printinvoice This patch adds a check for a more specific ACCOUNT_DEBIT template (named to match the debit_type_code of the credit line) prior to falling back to the ACCOUNT_DEBIT template. Test plan 1/ On a patrons account page use the print option on a series of debit lines with differing credit types (Overdue, Payout) 2/ Note that the same template 'ACCOUNT_DEBIT' is used for all types 3/ Apply the patch 4/ Run step 1 again and note all still print using ACCOUNT_DEBIT 5/ Add a new notice template under the 'circulation' module with a code that matches one of your account debit types (OVERDUE, PAYOUT) 6/ Run step 1 again and note that where you have added a specific notice for that debit type it has been used. Created attachment 119574 [details] [review] Bug 26689: Check for specific template then fallback - printfeercpt This patch adds a check for a more specific ACCOUNT_CREDIT template (named to match the credit_type_code of the credit line) prior to falling back to the ACCOUNT_CREDIT template. Test plan 1/ On a patrons account page use the print option on a series of credit lines with differing credit types (Payment, Lost Item Return, Writeoff) 2/ Note that the same template 'ACCOUNT_CREDIT' is used for all types 3/ Apply the patch 4/ Run step 1 again and note all still print using ACCOUNT_CREDIT 5/ Add a new notice template under the 'circulation' module with a code that matches one of your account credit types (PAYMENT, WRITEOFF, LOST_FOUND) 6/ Run step 1 again and note that where you have added a specific notice for that credit type it has been used. Created attachment 119575 [details] [review] Bug 26689: Check for specific template then fallback - printinvoice This patch adds a check for a more specific ACCOUNT_DEBIT template (named to match the debit_type_code of the credit line) prior to falling back to the ACCOUNT_DEBIT template. Test plan 1/ On a patrons account page use the print option on a series of debit lines with differing credit types (Overdue, Payout) 2/ Note that the same template 'ACCOUNT_DEBIT' is used for all types 3/ Apply the patch 4/ Run step 1 again and note all still print using ACCOUNT_DEBIT 5/ Add a new notice template under the 'circulation' module with a code that matches one of your account debit types (OVERDUE, PAYOUT) 6/ Run step 1 again and note that where you have added a specific notice for that debit type it has been used. It seems bug 26734 hasn't actually been pushed.. just the first patch from it accidentally made it in.. as such I've undone my rebase and unobsoleted the two patches. This applies nicely again now as is :) Created attachment 135113 [details] [review] Bug 26689: Check for specific template then fallback - printfeercpt This patch adds a check for a more specific ACCOUNT_CREDIT template (named to match the credit_type_code of the credit line) prior to falling back to the ACCOUNT_CREDIT template. Test plan 1/ On a patrons account page use the print option on a series of credit lines with differing credit types (Payment, Lost Item Return, Writeoff) 2/ Note that the same template 'ACCOUNT_CREDIT' is used for all types 3/ Apply the patch 4/ Run step 1 again and note all still print using ACCOUNT_CREDIT 5/ Add a new notice template under the 'circulation' module with a code that matches one of your account credit types (PAYMENT, WRITEOFF, LOST_FOUND) 6/ Run step 1 again and note that where you have added a specific notice for that credit type it has been used. Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk> Created attachment 135114 [details] [review] Bug 26689: Check for specific template then fallback - printinvoice This patch adds a check for a more specific ACCOUNT_DEBIT template (named to match the debit_type_code of the credit line) prior to falling back to the ACCOUNT_DEBIT template. Test plan 1/ On a patrons account page use the print option on a series of debit lines with differing credit types (Overdue, Payout) 2/ Note that the same template 'ACCOUNT_DEBIT' is used for all types 3/ Apply the patch 4/ Run step 1 again and note all still print using ACCOUNT_DEBIT 5/ Add a new notice template under the 'circulation' module with a code that matches one of your account debit types (OVERDUE, PAYOUT) 6/ Run step 1 again and note that where you have added a specific notice for that debit type it has been used. Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk> This is a really nice development - works great, signing off. Created attachment 135685 [details] [review] Bug 26689: Check for specific template then fallback - printfeercpt This patch adds a check for a more specific ACCOUNT_CREDIT template (named to match the credit_type_code of the credit line) prior to falling back to the ACCOUNT_CREDIT template. Test plan 1/ On a patrons account page use the print option on a series of credit lines with differing credit types (Payment, Lost Item Return, Writeoff) 2/ Note that the same template 'ACCOUNT_CREDIT' is used for all types 3/ Apply the patch 4/ Run step 1 again and note all still print using ACCOUNT_CREDIT 5/ Add a new notice template under the 'circulation' module with a code that matches one of your account credit types (PAYMENT, WRITEOFF, LOST_FOUND) 6/ Run step 1 again and note that where you have added a specific notice for that credit type it has been used. Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Created attachment 135686 [details] [review] Bug 26689: Check for specific template then fallback - printinvoice This patch adds a check for a more specific ACCOUNT_DEBIT template (named to match the debit_type_code of the credit line) prior to falling back to the ACCOUNT_DEBIT template. Test plan 1/ On a patrons account page use the print option on a series of debit lines with differing credit types (Overdue, Payout) 2/ Note that the same template 'ACCOUNT_DEBIT' is used for all types 3/ Apply the patch 4/ Run step 1 again and note all still print using ACCOUNT_DEBIT 5/ Add a new notice template under the 'circulation' module with a code that matches one of your account debit types (OVERDUE, PAYOUT) 6/ Run step 1 again and note that where you have added a specific notice for that debit type it has been used. Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> I am a little worried that there could be an overlap with existing notice template codes resulting in 'strange' behaviour. 5/ Add a new notice template under the 'circulation' module with a code that matches one of your account debit types (OVERDUE, PAYOUT) OVERDUE and circulation seems a super likely candidate, even if the standard notice is ODUE, but this can be configured as libraries like... Maybe it would be a little safer to use these with a prefix? Something like ACCOUNT_ could be a good fit. Created attachment 136744 [details] [review] Bug 26689: Prepend letter codes. This patch prepends the credit_type_code and debit_type_code with CREDIT_ and DEBIT_ respectively when doing a lookup on the notice letter code. Test plan 1) As previous patches, however instead of just naming your notice to match the credit_type_code or debit_type_code use CREDIT_credit_type_code and DEBIT_debit_type_code respectively. Nice catch Katrin.. added a follow-up and added notes for the release notes. (In reply to Martin Renvoize from comment #20) > Nice catch Katrin.. added a follow-up and added notes for the release notes. Thanks! Pushed to master for 22.11. Nice work everyone, thanks! Backported to 22.05.x for 22.05.05 Thanks! Pushed to 21.11 for 21.11.12 Not backported to oldoldstable (21.05.x). Feel free to ask if it's needed. |