Bug 20144: [sql_modes] Fix generated value for account_offsets.amount
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 5 Feb 2018 17:51:43 +0000 (14:51 -0300)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 13 Feb 2018 16:58:49 +0000 (13:58 -0300)
Fix error:
Out of range value for column 'amount'

DBD::mysql::st execute failed: Out of range value for column 'amount' at
row 1 [for Statement "INSERT INTO `account_offsets` ( `amount`,
`debit_id`, `type`) VALUES ( ?, ?, ? )" with ParamValues:
0=7925469795795194609664.000000, 1='10', 2='Manual Debit'] at
/usr/share/perl5/DBIx/Class/Storage/DBI.pm line 1832.

7925469795795194609664.000000
=> Should be lower anyway

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/lib/TestBuilder.pm

index d42cb03..5937e0f 100644 (file)
@@ -473,6 +473,13 @@ sub _gen_default_values {
         Item => {
             more_subfields_xml => undef,
         },
+        Category => {
+            enrolmentfee => 0,
+            reservefee   => 0,
+        },
+        Itemtype => {
+            rentalcharge => 0,
+        },
     };
 }