Bug 20199: Send a DateTime to DBIC instead of an iso formatted date

We do not need to format the date, DBIC handles DateTime correctly.

It fixes t/db_dependent/Letters.t with new SQL modes

Test plan:
  prove t/db_dependent/Letters.t
  prove t/db_dependent/Koha/Acquisition/Order.t
Must return green

Signed-off-by: Roch D'Amour <roch.damour@inlibro.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Jonathan Druart 2018-02-14 14:17:58 -03:00
parent 912824a9b1
commit 0cd75a0eb2
1 changed files with 1 additions and 1 deletions

View File

@ -70,7 +70,7 @@ sub store {
}
$self->quantityreceived(0) unless $self->quantityreceived;
$self->entrydate(output_pref( { dt => dt_from_string, dateformat => 'iso' } )) unless $self->entrydate;
$self->entrydate(dt_from_string) unless $self->entrydate;
$self->ordernumber(undef) unless $self->ordernumber;
$self = $self->SUPER::store( $self );