Bug 38457

Summary: Add custom field in debit type to allow for external finance system codes to be added
Product: Koha Reporter: Hannah Dunne-Howrie <hdunne-howrie>
Component: Point of SaleAssignee: Martin Renvoize (ashimema) <martin.renvoize>
Status: Needs Signoff --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: aude.charillon, daniel.jones, fiona.borthwick, hdunne-howrie, martin.renvoize, pedro.amorim, sally.healey
Version: unspecified   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Medium patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Bug Depends on: 13985, 38663    
Bug Blocks:    
Attachments: Bug 38457: DBIC Add AdditionalFields to AccountDebitType
Bug 38457: Add additional fields to debit types
Bug 38457: Add additional fields to debit display

Description Hannah Dunne-Howrie 2024-11-15 14:24:39 UTC
Problem - 
Any external finance systems have separate codes that may not align 1:1 with debit type lines. For example, a library might have a retail offer with 50 item lines but these products may align to 10 finance codes. This means it is time consuming/impossible for staff during finance reporting to match up finance codes with item lines from Koha reports. 

Proposed solution - 
An additional field within debit types would allow us to add in these finance codes and create reports based on takings by these codes (as opposed to each individual debit type line.
Comment 1 Martin Renvoize (ashimema) 2024-11-20 12:35:55 UTC
We're going to take this on within PTFS Europe, it's on my list to assign it out to the team today and schedule it very early in the next community cycle (i.e. coding to take place before xmas)
Comment 2 Martin Renvoize (ashimema) 2024-12-17 16:43:07 UTC
Created attachment 175630 [details] [review]
Bug 38457: DBIC Add AdditionalFields to AccountDebitType
Comment 3 Martin Renvoize (ashimema) 2024-12-17 16:43:09 UTC
Created attachment 175631 [details] [review]
Bug 38457: Add additional fields to debit types

Test plan, k-t-d:
1) Before defining any additional fields for account_debit_types,
   confirm that the 'Additional fields' section does not appear when
   attempting to add a new or edit an existing debit type.
2) Add a new additional field to 'account_debit_types':
   <staff_url>/cgi-bin/koha/admin/additional-fields.pl?tablename=account_debit_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 debit type:
   <staff_url>/cgi-bin/koha/admin/debit_types.pl?op=add_form&code=MANUAL
6) Input various values in the different additional fields. Click
   'Submit'
7) Edit the same debit type again and note the additional fields added
   in the previous step are visible
   <staff_url>/cgi-bin/koha/admin/debit_types.pl?op=add_form&code=MANUAL
Comment 4 Martin Renvoize (ashimema) 2024-12-17 17:07:21 UTC
Created attachment 175633 [details] [review]
Bug 38457: Add additional fields to debit display

This patch adds the previously added additional fields to the display
in the debit types management page table