Koha/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/accounting.pref
Julian Maurice 58edcef03d Bug 19036: Add ability to enable credit number for only some credit types
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>
2020-08-20 12:31:59 +02:00

43 lines
1.9 KiB
Text

Accounting:
Policy:
-
- pref: AccountAutoReconcile
choices:
yes: "Do"
no: "Do not"
- reconcile patron balances automatically on each transaction adding debits or credits.
-
- pref: FinePaymentAutoPopup
choices:
yes: "Do"
no: "Don't"
- automatically display a print dialog for a payment receipt when making a payment.
-
- pref: RoundFinesAtPayment
choices:
yes: Do
no: "Don't"
- round fines to the nearest cent when collecting payments. Enabling this preference allows paying fines of partial cents which may not be visible in the interface.
Features:
-
- pref: UseCashRegisters
default: no
choices:
yes: "Use"
no: "Don't use"
- " cash registers with the accounting system to track payments."
-
- pref: EnablePointOfSale
default: no
choices:
yes: "Enable"
no: "Disable"
- " the point of sale feature to allow anonymous transactions with the accounting system. (Requires UseCashRegisters)"
-
- pref: AutoCreditNumber
choices:
'': 'Do not automatically generate credit numbers'
annual: 'Automatically generate credit numbers in the form <year>-0001'
branchyyyymmincr: 'Automatically generate credit numbers in the form <branchcode>yyyymm0001'
incremental: 'Automatically generate credit numbers in the form 1, 2, 3'
- Automatic generation also has to be enabled for each credit type (<a href="/cgi-bin/koha/admin/credit_types.pl">Configure credit types</a>)