9205d4ef45
In some areas it's required to sequentially number payment slips / receipts. This patch adds a database column accountlines.credit_number and a system preference AutoCreditNumber to control how this number will be generated. The following options are available: - Do not automatically generate credit numbers. This is the current behaviour and the default syspref value. - Automatically generate credit numbers in the form <year>-0001 (annual) - Automatically generate credit numbers in the form <branchcode>yyyymm0001 (branchyyyymmincr) where <branchcode> is the branch where the user (staff member) is logged in - Automatically generate credit numbers in the form 1, 2, 3 (incremental) It also adds a column (hidden by default) in the table under Transactions tab to display this number. Test plan: 0. Apply patch, run updatedatabase and update_dbix_class_files 1. Go to Admin » Column settings, and uncheck the 'hidden' box for column credit_number in table account-fines. It will be easier for testing 2. Create a manual credit for a borrower. Verify in Transactions tab that this credit has no number generated 3. Change syspref 'AutoCreditNumber' to 'incremental' 4. Create more manual credits, and verify that the numbers generated are 1, 2, 3, ... 5. Change syspref 'AutoCreditNumber' to 'annual' 6. Create more manual credits, and verify that the numbers generated are '2020-0001', '2020-0002', ... 7. Change syspref to 'AutoCreditNumber' to 'branchyyyymmincr' 8. Create more manual credits, and verify that the numbers generated are 'BRANCHA2020020001', 'BRANCHA2020020002', ... (assuming you are connected to library BRANCHA, and it's February 2020) 9. Set library to another one, say BRANCHB 10. Create more manual credits, and verify that the numbers generated are 'BRANCHB2020020001', 'BRANCHB2020020002', ... 11. Edit the letter ACCOUNT_CREDIT, and add [% account.credit_number %] somewhere. Go back to Transactions tab and click on 'Print' for one line that has a credit number. Make sure the number is there. 12. prove t/db_dependent/Koha/Account.t Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> |
||
---|---|---|
.. | ||
preferences | ||
searchengine/elasticsearch | ||
additional-fields.tt | ||
admin-home.tt | ||
adveditorshortcuts.tt | ||
aqbudgetperiods.tt | ||
aqbudgets.tt | ||
aqcontract.tt | ||
aqplan.tt | ||
audio_alerts.tt | ||
auth_subfields_structure.tt | ||
auth_tag_structure.tt | ||
authorised_values.tt | ||
authtypes.tt | ||
biblio_framework.tt | ||
branch_transfer_limits.tt | ||
branches.tt | ||
cash_registers.tt | ||
categories.tt | ||
checkmarc.tt | ||
cities.tt | ||
classsources.tt | ||
clone-rules.tt | ||
columns_settings.tt | ||
credit_types.tt | ||
currency.tt | ||
debit_types.tt | ||
desks.tt | ||
didyoumean.tt | ||
edi_accounts.tt | ||
edi_ean_accounts.tt | ||
item_circulation_alerts.tt | ||
items_search_field.tt | ||
items_search_fields.tt | ||
itemtypes.tt | ||
koha2marclinks.tt | ||
library_groups.tt | ||
localization.tt | ||
marc_subfields_structure.tt | ||
marctagstructure.tt | ||
matching-rules.tt | ||
oai_set_mappings.tt | ||
oai_sets.tt | ||
overdrive.tt | ||
patron-attr-types.tt | ||
preferences.tt | ||
share_content.tt | ||
smart-rules.tt | ||
sms_providers.tt | ||
sru_modmapping.tt | ||
sru_modmapping_auth.tt | ||
systempreferences.tt | ||
transport-cost-matrix.tt | ||
usage_statistics.tt | ||
z3950servers.tt |