Bug 20144: [sql_modes] Set default value for Itemtype fees in TestBuilder
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 6 Feb 2018 15:15:02 +0000 (12:15 -0300)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 13 Feb 2018 16:58:58 +0000 (13:58 -0300)
Fix for:
Out of range value for column 'amount'

t/db_dependent/Circulation/Chargelostitem.t

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
t/db_dependent/Circulation/Chargelostitem.t
t/lib/TestBuilder.pm

index 9d070b6..dfcee30 100644 (file)
@@ -32,7 +32,10 @@ my $library = $builder->build({
 my $branchcode = $library->{branchcode};
 
 my $itemtype = $builder->build({
-    source => 'Itemtype'
+    source => 'Itemtype',
+    value => {
+        processfee => 42,
+    }
 });
 
 my %item_branch_infos = (
index 086635e..1aa6de9 100644 (file)
@@ -479,6 +479,8 @@ sub _gen_default_values {
         },
         Itemtype => {
             rentalcharge => 0,
+            defaultreplacecost => 0,
+            processfee => 0,
         },
         Aqbookseller => {
             tax_rate => 0,