]> git.koha-community.org Git - koha.git/commit
Bug 17702: Add UI to manage account credit types
authorJulian Maurice <julian.maurice@biblibre.com>
Fri, 7 Feb 2020 12:17:54 +0000 (13:17 +0100)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Thu, 20 Feb 2020 14:46:33 +0000 (14:46 +0000)
commit50a733f09ca9a279c785b963f52891d4ff136c1f
tree95bf2e5e331455a65d45b012820d1aacf68d1ab1
parentfbd0687718a607aa3881298ff70c2101e8cf9cb8
Bug 17702: Add UI to manage account credit types

It is the same as for debit types.

It adds a new column `archived` in table `account_credit_types` that has
the same purpose than `account_debit_types.archived`

Test plan:
0. Apply patch && run updatedatabase && update_dbix_class_files
1. Go to Admin » Credit types
2. Add a new credit type, give it a code and a description and check
   'Can be manually added'
3. Go to a patron's accounting section, 'Create manual credit' tab
4. Verify that the new credit type appears
5. Return to Admin » Credit types and archive the credit type
6. Verify that the new credit type is not available anymore in 'Create
   manual credit'
7. Restore the credit type and verify that it is available again
8. Create a manual credit with the new credit type
9. Go to Reports » Cash register and make sure you can find the
   transaction by filtering on transaction type
10. Edit the new credit type and set some library limitations, make sure
    that the credit type doesn't appear if you're connected to a library
    you didn't selected, and that it appears if you're connected to a
    library you selected.

Note to QA team:
The change in Koha/Account.pm, I added it because otherwise Koha died
when adding a manual credit with a custom type.
In that case, offset type will default to 'Manual Credit'. I'm not sure
if that is the best thing to do. I'm open to suggestions :)

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Koha/Account.pm
admin/credit_types.pl [new file with mode: 0755]
installer/data/mysql/atomicupdate/bug-17702.perl [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/en/includes/admin-menu.inc
koha-tmpl/intranet-tmpl/prog/en/modules/admin/admin-home.tt
koha-tmpl/intranet-tmpl/prog/en/modules/admin/credit_types.tt [new file with mode: 0644]
members/mancredit.pl