# If the patron changes to a category with enrollment fee, we add a fee
if ( $data{categorycode} and $data{categorycode} ne $old_categorycode ) {
if (C4::Context->preference('FeeOnChangePatronCategory') == 0){
AddEnrolmentFeeIfNeeded( $data{categorycode}, $data{borrowernumber} );
}
# If NorwegianPatronDBEnable is enabled, we set syncstatus to something that a
SetVersion ($DBversion);
$DBversion = "3.19.00.XXX";
if ( CheckVersion($DBversion) ) {
$dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('FeeOnChangePatronCategory','0','If set, when the patron changes to a category with enrolment fee, a fee is not added','','YesNo')");
print "Upgrade to $DBversion done (Bug 13697 - Option to don't add a fee, if the patron changes to a category with enrolment fee)\n";
SetVersion($DBversion);
=head1 FUNCTIONS
=head2 TableExists($table)
-