#
# This file is part of Koha.
#
-# Koha is free software; you can redistribute it and/or modify it under the
-# terms of the GNU General Public License as published by the Free Software
-# Foundation; either version 3 of the License, or (at your option) any later
-# version.
+# Koha is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
#
-# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
-# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
-# A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+# Koha is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
#
-# You should have received a copy of the GNU General Public License along
-# with Koha; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+# You should have received a copy of the GNU General Public License
+# along with Koha; if not, see <http://www.gnu.org/licenses>.
use Modern::Perl;
-use Test::More tests => 24;
use Data::Dumper;
-use Koha::Database;
+use Test::More tests => 24;
+
use t::lib::Mocks;
-use Koha::Items;
-use Koha::Biblioitems;
use t::lib::TestBuilder;
+use C4::Calendar;
+use Koha::Biblioitems;
+use Koha::Libraries;
+use Koha::Database;
+use Koha::DateUtils qw(dt_from_string);;
+use Koha::Items;
+
BEGIN {
use_ok('Koha::ItemType');
use_ok('Koha::ItemTypes');
summary => 'summary',
checkinmsg => 'checkinmsg',
checkinmsgtype => 'checkinmsgtype',
+ processfee => '0.00',
+ defaultreplacecost => '0.00',
}
)->store;
summary => 'summary',
checkinmsg => 'checkinmsg',
checkinmsgtype => 'checkinmsgtype',
+ processfee => '0.00',
+ defaultreplacecost => '0.00',
}
)->store;
summary => 'summary',
checkinmsg => 'checkinmsg',
checkinmsgtype => 'checkinmsgtype',
+ processfee => '0.00',
+ defaultreplacecost => '0.00',
}
)->store;
ok( defined($type), 'first result' );
is( $type->itemtype, 'type1', 'itemtype/code' );
is( $type->description, 'description', 'description' );
-is( $type->rentalcharge, '0.0000', 'rentalcharge' );
+is( $type->rentalcharge+0, 0, 'rentalcharge' );
is( $type->imageurl, 'imageurl', 'imageurl' );
is( $type->summary, 'summary', 'summary' );
is( $type->checkinmsg, 'checkinmsg', 'checkinmsg' );
ok( defined($type), 'second result' );
is( $type->itemtype, 'type2', 'itemtype/code' );
is( $type->description, 'description', 'description' );
-is( $type->rentalcharge, '0.0000', 'rentalcharge' );
+is( $type->rentalcharge+0, 0, 'rentalcharge' );
is( $type->imageurl, 'imageurl', 'imageurl' );
is( $type->summary, 'summary', 'summary' );
is( $type->checkinmsg, 'checkinmsg', 'checkinmsg' );