If a borrower's category is changed during his subscription (i.e : a child who moves to adult) if category adult in this case have an enrolment fee, fees are added. Many libraries do not want these fees in these cases. So I have made a patch to offer this choice via a system preference.
Created attachment 35831 [details] [review] Option to don't add a fee, if the patron changes to a category with enrolment fee thx for testing
This needs a test plan and tests.
Test plan : 1/ create 2 categories (A & B). B with enrolment fee 2/ create a patron in category A 3/ change the patron category from A to B 4/ check that the patron has an enrolment fee to pay Apply the patch 1/ create a new patron in category A 2/ change the patron category from A to B. 3/ check that the patron has an enrolment fee to pay 4/ change the system preference => UPDATE `systempreferences` SET `value` = '1' WHERE `systempreferences`.`variable` ='FeeOnChangePatronCategory'; 5/ create a new patron in category A 6/ change the patron category from A to B 7/ check that the patron has no enrolment fee to pay thx
Created attachment 36234 [details] [review] Syspref to not add a fee when a patron changes to a category with enrolment fee Test plan : 1/ create 2 categories (A & B). B with enrolment fee 2/ create a patron in category A 3/ change the patron category from A to B 4/ check that the patron has an enrolment fee to pay Apply the patch 1/ create a new patron in category A 2/ change the patron category from A to B. 3/ check that the patron has an enrolment fee to pay 4/ change the system preference 'FeeOnChangePatronCategory' to 'Don't'; 5/ create a new patron in category A 6/ change the patron category from A to B 7/ check that the patron has no enrolment fee to pay thx
Ok, tested and it works. Case 1 tested: the patron has already a category with enrolment fee, I change it to another category with enrolment fee, the patron has no enrolment fee to pay Case 2 tested : the patron has a free category , I change it to a category with enrolment fee, the patron has no enrolment fee to pay Howether, I created the 13792 bugzilla : testing make me realise a bug about payment on fees on the master version of koha (not linked to this patch)
Created attachment 37048 [details] [review] [PASSED QA] Bug 13697 : Syspref to not add a fee when a patron changes to a category with enrolment fee By default this syspref is "Do" to keep the previous behaviour. Test plan : 1/ create 2 categories (A & B). B with enrolment fee 2/ create a patron in category A 3/ change the patron category from A to B 4/ check that the patron has an enrolment fee to pay Apply the patch 1/ create a new patron in category A 2/ change the patron category from A to B. 3/ check that the patron has an enrolment fee to pay 4/ change the system preference 'FeeOnChangePatronCategory' to 'Don't'; 5/ create a new patron in category A 6/ change the patron category from A to B 7/ check that the patron has no enrolment fee to pay Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 37049 [details] [review] Bug 13697 [QA Followup] - Add Unit Test
Created attachment 42076 [details] [review] Bug 13697: (QA followup) idiomatic fix add > charge Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Patches pushed to master. Thanks Christophe and Kyle!
Created attachment 42122 [details] [review] Bug 13697: (QA followup) fix typo in sysprefs.sql Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
I'm writing this up for the manual. It's under Norwegian Patron Database - does that mean this does not apply to patrons edited via Koha in other countries? Nicole
(In reply to Nicole C. Engard from comment #11) > I'm writing this up for the manual. It's under Norwegian Patron Database - > does that mean this does not apply to patrons edited via Koha in other > countries? > > Nicole No! That's a bug me thinks!
All better: http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15073