--- /dev/null
+$DBversion = 'XXX'; # will be replaced by the RM
+if( CheckVersion( $DBversion ) ) {
+ if( !column_exists( 'itemtypes', 'rentalcharge_daily_calendar' ) ) {
+ $dbh->do(q{
+ ALTER TABLE itemtypes ADD COLUMN
+ rentalcharge_daily_calendar tinyint(1) NOT NULL DEFAULT 1
+ AFTER rentalcharge_daily;
+ });
+ }
+
+ if( !column_exists( 'itemtypes', 'rentalcharge_hourly_calendar' ) ) {
+ $dbh->do(q{
+ ALTER TABLE itemtypes ADD COLUMN
+ rentalcharge_hourly_calendar tinyint(1) NOT NULL DEFAULT 1
+ AFTER rentalcharge_hourly;
+ });
+ }
+
+ # Always end with this (adjust the bug info)
+ SetVersion( $DBversion );
+ print "Upgrade to $DBversion done (Bug 21443: Add ability to exclude holidays when calculating rentals fees by time period)\n";
+}
description LONGTEXT, -- a plain text explanation of the item type
rentalcharge decimal(28,6) default NULL, -- the amount charged when this item is checked out/issued
rentalcharge_daily decimal(28,6) default NULL, -- the amount charged for each day between checkout date and due date
+ rentalcharge_daily_calendar tinyint(1) NOT NULL DEFAULT 1, -- controls if the daily retnal fee is calculated directly or using finesCalendar
rentalcharge_hourly decimal(28,6) default NULL, -- the amount charged for each hour between checkout date and due date
+ rentalcharge_hourly_calendar tinyint(1) NOT NULL DEFAULT 1, -- controls if the hourly retnal fee is calculated directly or using finesCalendar
defaultreplacecost decimal(28,6) default NULL, -- default replacement cost
processfee decimal(28,6) default NULL, -- default text be recorded in the column note when the processing fee is applied
notforloan smallint(6) default NULL, -- 1 if the item is not for loan, 0 if the item is available for loan