View | Details | Raw Unified | Return to bug 21443
Collapse All | Expand All

(-)a/installer/data/mysql/atomicupdate/bug_21443.perl (+22 lines)
Line 0 Link Here
1
$DBversion = 'XXX'; # will be replaced by the RM
2
if( CheckVersion( $DBversion ) ) {
3
    if( !column_exists( 'itemtypes', 'rentalcharge_daily_calendar' ) ) {
4
        $dbh->do(q{
5
            ALTER TABLE itemtypes ADD COLUMN
6
            rentalcharge_daily_calendar tinyint(1) NOT NULL DEFAULT 1
7
            AFTER rentalcharge_daily;
8
        });
9
    }
10
11
    if( !column_exists( 'itemtypes', 'rentalcharge_hourly_calendar' ) ) {
12
        $dbh->do(q{
13
            ALTER TABLE itemtypes ADD COLUMN
14
            rentalcharge_hourly_calendar tinyint(1) NOT NULL DEFAULT 1
15
            AFTER rentalcharge_hourly;
16
        });
17
    }
18
19
    # Always end with this (adjust the bug info)
20
    SetVersion( $DBversion );
21
    print "Upgrade to $DBversion done (Bug 21443: Add ability to exclude holidays when calculating rentals fees by time period)\n";
22
}
(-)a/installer/data/mysql/kohastructure.sql (-1 / +2 lines)
Lines 878-884 CREATE TABLE `itemtypes` ( -- defines the item types Link Here
878
  description LONGTEXT, -- a plain text explanation of the item type
878
  description LONGTEXT, -- a plain text explanation of the item type
879
  rentalcharge decimal(28,6) default NULL, -- the amount charged when this item is checked out/issued
879
  rentalcharge decimal(28,6) default NULL, -- the amount charged when this item is checked out/issued
880
  rentalcharge_daily decimal(28,6) default NULL, -- the amount charged for each day between checkout date and due date
880
  rentalcharge_daily decimal(28,6) default NULL, -- the amount charged for each day between checkout date and due date
881
  rentalcharge_daily_calendar tinyint(1) NOT NULL DEFAULT 1, -- controls if the daily retnal fee is calculated directly or using finesCalendar
881
  rentalcharge_hourly decimal(28,6) default NULL, -- the amount charged for each hour between checkout date and due date
882
  rentalcharge_hourly decimal(28,6) default NULL, -- the amount charged for each hour between checkout date and due date
883
  rentalcharge_hourly_calendar tinyint(1) NOT NULL DEFAULT 1, -- controls if the hourly retnal fee is calculated directly or using finesCalendar
882
  defaultreplacecost decimal(28,6) default NULL, -- default replacement cost
884
  defaultreplacecost decimal(28,6) default NULL, -- default replacement cost
883
  processfee decimal(28,6) default NULL, -- default text be recorded in the column note when the processing fee is applied
885
  processfee decimal(28,6) default NULL, -- default text be recorded in the column note when the processing fee is applied
884
  notforloan smallint(6) default NULL, -- 1 if the item is not for loan, 0 if the item is available for loan
886
  notforloan smallint(6) default NULL, -- 1 if the item is not for loan, 0 if the item is available for loan
885
- 

Return to bug 21443