Reconciliation patch to add the RenewalPeriodBase system
preference, which per code by Nahuel Angelinetti changes
the process of calculating the due date after a renewal:
If RenewalPeriodBase is set to 'now', the due date is
set to the current date + the loan period. This is the
current behavior.
If RenewalPeriodBase is set to 'date_due', the due date
is set to the due date before the renewal + the loan period.
Unless like the corresonding database update in the 3.0.x branch
(3.00.01.007), the default value of RenewalPeriodBase is set to
'now' so as not to unexpectedly change the calculation.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
$tabsysprefs{AllowHoldPolicyOverride} = "Circulation";
$tabsysprefs{BranchTransferLimitsType} = "Circulation";
$tabsysprefs{AllowNotForLoanOverride} = "Circulation";
+$tabsysprefs{RenewalPeriodBase} = "Circulation";
# Staff Client
$tabsysprefs{TemplateEncoding} = "StaffClient";
SetVersion ($DBversion);
}
+$DBversion = "3.01.00.032";
+if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
+ $dbh->do(<<ENDOFRENEWAL);
+INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('RenewalPeriodBase', 'now', 'Set whether the renewal date should be counted from the date_due or from the moment the Patron asks for renewal ','date_due|now','Choice');
+ENDOFRENEWAL
+ print "Upgrade to $DBversion done (Change the field)\n";
+ SetVersion ($DBversion);
+}
+
=item DropAllForeignKeys($table)
Drop all foreign keys of the table $table