From 741af686cedd7aef67998752227a2ce483d49b1f Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Mon, 11 May 2009 15:25:14 -0500 Subject: [PATCH] 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 --- admin/systempreferences.pl | 1 + installer/data/mysql/updatedatabase.pl | 9 +++++++++ 2 files changed, 10 insertions(+) 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(<