diff --git a/SL/DB/Helper/FlattenToForm.pm b/SL/DB/Helper/FlattenToForm.pm index 27134b4a84..4f2e73e3d6 100644 --- a/SL/DB/Helper/FlattenToForm.pm +++ b/SL/DB/Helper/FlattenToForm.pm @@ -28,10 +28,10 @@ sub flatten_to_form { }; if (_has($self, 'transdate')) { - my $transdate_idx = ref($self) eq 'SL::DB::Order' ? ($self->quotation ? 'quodate' : 'orddate') - : ref($self) eq 'SL::DB::Invoice' ? 'invdate' + my $transdate_idx = ref($self) eq 'SL::DB::Order' ? ($self->quotation ? 'quodate' : 'orddate') + : ref($self) eq 'SL::DB::Invoice' ? 'invdate' : ref($self) eq 'SL::DB::DeliveryOrder' ? 'dodate' - : 'transdate'; + : 'transdate'; $form->{$transdate_idx} = $self->transdate->to_lxoffice; }