From: Galen Charlton Date: Mon, 11 May 2009 20:25:14 +0000 (-0500) Subject: bug 2770: add RenewalPeriodBase syspref for 3.2 (DB rev 032) X-Git-Tag: new_acq_a_porter~99 X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=commitdiff_plain;h=741af686cedd7aef67998752227a2ce483d49b1f;p=koha_ffzg bug 2770: add RenewalPeriodBase syspref for 3.2 (DB rev 032) 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 --- diff --git a/admin/systempreferences.pl b/admin/systempreferences.pl index c24a17fcf6..ca8503e83b 100755 --- a/admin/systempreferences.pl +++ b/admin/systempreferences.pl @@ -160,6 +160,7 @@ $tabsysprefs{UseBranchTransferLimits} = "Circulation"; $tabsysprefs{AllowHoldPolicyOverride} = "Circulation"; $tabsysprefs{BranchTransferLimitsType} = "Circulation"; $tabsysprefs{AllowNotForLoanOverride} = "Circulation"; +$tabsysprefs{RenewalPeriodBase} = "Circulation"; # Staff Client $tabsysprefs{TemplateEncoding} = "StaffClient"; diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 15e1c085b6..6d7892157b 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -2406,6 +2406,15 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { SetVersion ($DBversion); } +$DBversion = "3.01.00.032"; +if (C4::Context->preference("Version") < TransformToNum($DBversion)) { + $dbh->do(<