58edcef03d
This feature is disabled by default for all credit types. To enable it you have to set the syspref AutoCreditNumber to the value of your choice and then enable the feature for each credit type you want. System credit types can be modified too (but only this particular field can be modified) Also, throw an exception when the feature is enabled and a value for credit_number has already been set Updated test plan: 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. In Admin » Credit types: a. edit the FORGIVEN type and enable credit number generation b. create a new type A, check "can be manually added" and "enable credit number" c. create a new type B, check "can be manually added". Do NOT enable credit number 4. Change syspref 'AutoCreditNumber' to 'incremental' 5. Create more manual credits with types CREDIT and B, and verify that the numbers are not generated 6. Create more manual credits with types FORGIVEN and A, and verify that the numbers generated are 1, 2, 3, ... 7. Change syspref 'AutoCreditNumber' to 'annual' 8. Create more manual credits with types CREDIT and B, and verify that the numbers are not generated 9. Create more manual credits with types FORGIVEN and A, and verify that the numbers generated are '2020-0001', '2020-0002', ... 10. Change syspref to 'AutoCreditNumber' to 'branchyyyymmincr' 11. Create more manual credits with types CREDIT and B, and verify that the numbers are not generated 12. Create more manual credits with types FORGIVEN and A, and verify that the numbers generated are 'BRANCHA2020020001', 'BRANCHA2020020002', ... (assuming you are connected to library BRANCHA, and it's February 2020) 13. Set library to another one, say BRANCHB 14. Create more manual credits with types FORGIVEN and A, and verify that the numbers generated are 'BRANCHB2020020001', 'BRANCHB2020020002', ... 15. 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. 16. prove t/db_dependent/Koha/Account.t 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> |
||
---|---|---|
.. | ||
searchengine/elasticsearch | ||
add_user_search.pl | ||
additional-fields.pl | ||
admin-home.pl | ||
adveditorshortcuts.pl | ||
aqbudgetperiods.pl | ||
aqbudgets.pl | ||
aqcontract.pl | ||
aqplan.pl | ||
audio_alerts.pl | ||
auth_subfields_structure.pl | ||
auth_tag_structure.pl | ||
authorised_values.pl | ||
authtypes.pl | ||
biblio_framework.pl | ||
branch_transfer_limits.pl | ||
branches.pl | ||
cash_registers.pl | ||
categories.pl | ||
check_budget_parent.pl | ||
check_parent_total.pl | ||
checkmarc.pl | ||
cities.pl | ||
classsources.pl | ||
clone-rules.pl | ||
columns_settings.pl | ||
columns_settings.yml | ||
credit_types.pl | ||
currency.pl | ||
debit_types.pl | ||
desks.pl | ||
didyoumean.pl | ||
edi_accounts.pl | ||
edi_ean_accounts.pl | ||
import_export_framework.pl | ||
item_circulation_alerts.pl | ||
items_search_field.pl | ||
items_search_fields.pl | ||
itemtypes.pl | ||
koha2marclinks.pl | ||
library_groups.pl | ||
localization.pl | ||
marc_subfields_structure.pl | ||
marctagstructure.pl | ||
matching-rules.pl | ||
oai_set_mappings.pl | ||
oai_sets.pl | ||
overdrive.pl | ||
patron-attr-types.pl | ||
preferences.pl | ||
share_content.pl | ||
smart-rules.pl | ||
sms_providers.pl | ||
sru_modmapping.pl | ||
systempreferences.pl | ||
transport-cost-matrix.pl | ||
usage_statistics.pl | ||
z3950servers.pl |