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

(-)a/installer/data/mysql/kohastructure.sql (-2 / +2 lines)
Lines 904-912 CREATE TABLE `itemtypes` ( -- defines the item types Link Here
904
  description LONGTEXT, -- a plain text explanation of the item type
904
  description LONGTEXT, -- a plain text explanation of the item type
905
  rentalcharge decimal(28,6) default NULL, -- the amount charged when this item is checked out/issued
905
  rentalcharge decimal(28,6) default NULL, -- the amount charged when this item is checked out/issued
906
  rentalcharge_daily decimal(28,6) default NULL, -- the amount charged for each day between checkout date and due date
906
  rentalcharge_daily decimal(28,6) default NULL, -- the amount charged for each day between checkout date and due date
907
  rentalcharge_daily_calendar tinyint(1) NOT NULL DEFAULT 1, -- controls if the daily retnal fee is calculated directly or using finesCalendar
907
  rentalcharge_daily_calendar tinyint(1) NOT NULL DEFAULT 1, -- controls if the daily rental fee is calculated directly or using finesCalendar
908
  rentalcharge_hourly decimal(28,6) default NULL, -- the amount charged for each hour between checkout date and due date
908
  rentalcharge_hourly decimal(28,6) default NULL, -- the amount charged for each hour between checkout date and due date
909
  rentalcharge_hourly_calendar tinyint(1) NOT NULL DEFAULT 1, -- controls if the hourly retnal fee is calculated directly or using finesCalendar
909
  rentalcharge_hourly_calendar tinyint(1) NOT NULL DEFAULT 1, -- controls if the hourly rental fee is calculated directly or using finesCalendar
910
  defaultreplacecost decimal(28,6) default NULL, -- default replacement cost
910
  defaultreplacecost decimal(28,6) default NULL, -- default replacement cost
911
  processfee decimal(28,6) default NULL, -- default text be recorded in the column note when the processing fee is applied
911
  processfee decimal(28,6) default NULL, -- default text be recorded in the column note when the processing fee is applied
912
  notforloan smallint(6) default NULL, -- 1 if the item is not for loan, 0 if the item is available for loan
912
  notforloan smallint(6) default NULL, -- 1 if the item is not for loan, 0 if the item is available for loan
(-)a/installer/data/mysql/updatedatabase.pl (-5 / +7 lines)
Lines 21260-21271 if( CheckVersion( $DBversion ) ) { Link Here
21260
21260
21261
$DBversion = '19.12.00.052';
21261
$DBversion = '19.12.00.052';
21262
if( CheckVersion( $DBversion ) ) {
21262
if( CheckVersion( $DBversion ) ) {
21263
    my $finesCalendar = C4::Context->preference('finesCalendar');
21264
    my $value = $finesCalendar eq 'noFinesWhenClosed' ? 1 : 0;
21265
21263
    if( !column_exists( 'itemtypes', 'rentalcharge_daily_calendar' ) ) {
21266
    if( !column_exists( 'itemtypes', 'rentalcharge_daily_calendar' ) ) {
21264
        $dbh->do(q{
21267
        $dbh->do(q{
21265
            ALTER TABLE itemtypes ADD COLUMN
21268
            ALTER TABLE itemtypes ADD COLUMN
21266
            rentalcharge_daily_calendar tinyint(1) NOT NULL DEFAULT 1
21269
            rentalcharge_daily_calendar tinyint(1) NOT NULL DEFAULT 1
21267
            AFTER rentalcharge_daily;
21270
            AFTER rentalcharge_daily;
21268
        });
21271
        });
21272
21273
        $dbh->do("UPDATE itemtypes SET rentalcharge_daily_calendar = $value");
21269
    }
21274
    }
21270
21275
21271
    if( !column_exists( 'itemtypes', 'rentalcharge_hourly_calendar' ) ) {
21276
    if( !column_exists( 'itemtypes', 'rentalcharge_hourly_calendar' ) ) {
Lines 21274-21284 if( CheckVersion( $DBversion ) ) { Link Here
21274
            rentalcharge_hourly_calendar tinyint(1) NOT NULL DEFAULT 1
21279
            rentalcharge_hourly_calendar tinyint(1) NOT NULL DEFAULT 1
21275
            AFTER rentalcharge_hourly;
21280
            AFTER rentalcharge_hourly;
21276
        });
21281
        });
21277
    }
21278
21282
21279
    my $finesCalendar = C4::Context->preference('finesCalendar');
21283
        $dbh->do("UPDATE itemtypes SET rentalcharge_hourly_calendar = $value");
21280
    my $value = $finesCalendar eq 'noFinesWhenClosed' ? 1 : 0;
21284
    }
21281
    $dbh->do("UPDATE itemtypes SET rentalcharge_hourly_calendar = $value, rentalcharge_daily_calendar = $value");
21282
21285
21283
    NewVersion( $DBversion, 21443, "Add ability to exclude holidays when calculating rentals fees by time period");
21286
    NewVersion( $DBversion, 21443, "Add ability to exclude holidays when calculating rentals fees by time period");
21284
}
21287
}
21285
- 

Return to bug 26341