Bug 39177 - Add additional fields support to credit types
Summary: Add additional fields support to credit types
Status: Pushed to main
Alias: None
Product: Koha
Classification: Unclassified
Component: Fines and fees (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Martin Renvoize (ashimema)
QA Contact: Brendan Gallagher
URL:
Keywords:
Depends on: 38457
Blocks:
  Show dependency treegraph
 
Reported: 2025-02-20 12:43 UTC by Martin Renvoize (ashimema)
Modified: 2025-05-26 15:10 UTC (History)
10 users (show)

See Also:
GIT URL:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
**Summary:** Credit types lacked support for custom data, limiting financial tracking options. **Enhancement:** Additional fields can now be added to credit type configurations to store extra metadata such as reporting codes. **Impact:** Enables better integration with external financial systems or internal reporting needs.
Version(s) released in:
25.05.00
Circulation function:


Attachments
Bug 39177: DBIC Add AdditionalFields to AccountCreditType (1.26 KB, patch)
2025-02-20 13:09 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39177: Add additional fields to credit types (7.78 KB, patch)
2025-02-20 13:09 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39177: DBIC Add AdditionalFields to AccountCreditType (1.26 KB, patch)
2025-04-03 12:16 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39177: Add additional fields to credit types (7.78 KB, patch)
2025-04-03 12:16 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39177: DBIC Add AdditionalFields to AccountCreditType (1.32 KB, patch)
2025-04-03 12:31 UTC, Brendan Gallagher
Details | Diff | Splinter Review
Bug 39177: Add additional fields to credit types (7.83 KB, patch)
2025-04-03 12:31 UTC, Brendan Gallagher
Details | Diff | Splinter Review
Bug 39177: DBIC Add AdditionalFields to AccountCreditType (1.39 KB, patch)
2025-05-13 16:11 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39177: Add additional fields to credit types (7.91 KB, patch)
2025-05-13 16:11 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Renvoize (ashimema) 2025-02-20 12:43:56 UTC
A parallel bug to bug 38457 to have additional field support for credit types.
Comment 1 Martin Renvoize (ashimema) 2025-02-20 13:09:02 UTC
Created attachment 178409 [details] [review]
Bug 39177: DBIC Add AdditionalFields to AccountCreditType

Sponsored-by: PTFS Europe <https://ptfs-europe.com>
Comment 2 Martin Renvoize (ashimema) 2025-02-20 13:09:04 UTC
Created attachment 178410 [details] [review]
Bug 39177: Add additional fields to credit types

Test plan, k-t-d:
1) Before defining any additional fields for account_credit_types,
   confirm that the 'Additional fields' section does not appear when
   attempting to add a new or edit an existing credit type.
2) Add a new additional field to 'account_credit_types':
   <staff_url>/cgi-bin/koha/admin/additional-fields.pl?tablename=account_credit_types
3) Click 'New field'. Add a name. Click Save.
4) Repeat step 2 but repeatable. Repeat again for 2 more of AV category
   (one repeatable, one not repeatable)
5) Edit an account credit type:
   <staff_url>/cgi-bin/koha/admin/credit_types.pl?op=add_form&code=MANUAL
6) Input various values in the different additional fields. Click
   'Submit'
7) Edit the same credit type again and note the additional fields added
   in the previous step are visible
   <staff_url>/cgi-bin/koha/admin/credit_types.pl?op=add_form&code=MANUAL

Sponsored-by: PTFS Europe <https://ptfs-europe.com>
Comment 3 Brendan Gallagher 2025-04-03 09:41:33 UTC
Needs a quick rebase (sorry!!)
Comment 4 Martin Renvoize (ashimema) 2025-04-03 12:16:23 UTC
Created attachment 180499 [details] [review]
Bug 39177: DBIC Add AdditionalFields to AccountCreditType

Sponsored-by: PTFS Europe <https://ptfs-europe.com>
Comment 5 Martin Renvoize (ashimema) 2025-04-03 12:16:27 UTC
Created attachment 180500 [details] [review]
Bug 39177: Add additional fields to credit types

Test plan, k-t-d:
1) Before defining any additional fields for account_credit_types,
   confirm that the 'Additional fields' section does not appear when
   attempting to add a new or edit an existing credit type.
2) Add a new additional field to 'account_credit_types':
   <staff_url>/cgi-bin/koha/admin/additional-fields.pl?tablename=account_credit_types
3) Click 'New field'. Add a name. Click Save.
4) Repeat step 2 but repeatable. Repeat again for 2 more of AV category
   (one repeatable, one not repeatable)
5) Edit an account credit type:
   <staff_url>/cgi-bin/koha/admin/credit_types.pl?op=add_form&code=MANUAL
6) Input various values in the different additional fields. Click
   'Submit'
7) Edit the same credit type again and note the additional fields added
   in the previous step are visible
   <staff_url>/cgi-bin/koha/admin/credit_types.pl?op=add_form&code=MANUAL

Sponsored-by: PTFS Europe <https://ptfs-europe.com>
Comment 6 Brendan Gallagher 2025-04-03 12:31:04 UTC
Created attachment 180501 [details] [review]
Bug 39177: DBIC Add AdditionalFields to AccountCreditType

Sponsored-by: PTFS Europe <https://ptfs-europe.com>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Comment 7 Brendan Gallagher 2025-04-03 12:31:07 UTC
Created attachment 180502 [details] [review]
Bug 39177: Add additional fields to credit types

Test plan, k-t-d:
1) Before defining any additional fields for account_credit_types,
   confirm that the 'Additional fields' section does not appear when
   attempting to add a new or edit an existing credit type.
2) Add a new additional field to 'account_credit_types':
   <staff_url>/cgi-bin/koha/admin/additional-fields.pl?tablename=account_credit_types
3) Click 'New field'. Add a name. Click Save.
4) Repeat step 2 but repeatable. Repeat again for 2 more of AV category
   (one repeatable, one not repeatable)
5) Edit an account credit type:
   <staff_url>/cgi-bin/koha/admin/credit_types.pl?op=add_form&code=MANUAL
6) Input various values in the different additional fields. Click
   'Submit'
7) Edit the same credit type again and note the additional fields added
   in the previous step are visible
   <staff_url>/cgi-bin/koha/admin/credit_types.pl?op=add_form&code=MANUAL

Sponsored-by: PTFS Europe <https://ptfs-europe.com>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Comment 8 Lucas Gass (lukeg) 2025-04-29 15:54:00 UTC
Small rebase needed here.
Comment 9 Martin Renvoize (ashimema) 2025-05-13 16:11:45 UTC
Created attachment 182389 [details] [review]
Bug 39177: DBIC Add AdditionalFields to AccountCreditType

Sponsored-by: PTFS Europe <https://ptfs-europe.com>
Signed-off-by: Hannah Dunne-Howrie <hdunne-howrie@westminster.gov.uk>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Comment 10 Martin Renvoize (ashimema) 2025-05-13 16:11:48 UTC
Created attachment 182390 [details] [review]
Bug 39177: Add additional fields to credit types

Test plan, k-t-d:
1) Before defining any additional fields for account_credit_types,
   confirm that the 'Additional fields' section does not appear when
   attempting to add a new or edit an existing credit type.
2) Add a new additional field to 'account_credit_types':
   <staff_url>/cgi-bin/koha/admin/additional-fields.pl?tablename=account_credit_types
3) Click 'New field'. Add a name. Click Save.
4) Repeat step 2 but repeatable. Repeat again for 2 more of AV category
   (one repeatable, one not repeatable)
5) Edit an account credit type:
   <staff_url>/cgi-bin/koha/admin/credit_types.pl?op=add_form&code=MANUAL
6) Input various values in the different additional fields. Click
   'Submit'
7) Edit the same credit type again and note the additional fields added
   in the previous step are visible
   <staff_url>/cgi-bin/koha/admin/credit_types.pl?op=add_form&code=MANUAL

Sponsored-by: PTFS Europe <https://ptfs-europe.com>
Signed-off-by: Hannah Dunne-Howrie <hdunne-howrie@westminster.gov.uk>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Comment 11 Katrin Fischer 2025-05-15 07:12:22 UTC
Is point of sale the right component here and for bug 38457? I was thinking fines or system administration maybe.
Comment 12 Katrin Fischer 2025-05-15 07:21:40 UTC
Pushed for 25.05!

Well done everyone, thank you!