X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FDB%2FHelper%2FFlattenToForm.pm;h=4dca557f903ecc51e57d2e5f4cf1a3061674c3dd;hb=5681e5f76cf196266fa96f2b60123e6edf031012;hp=0b2c5e93effee753ea4f6e28324848667c495d05;hpb=0b4b1f4c8a098531b11da00d2162ffaef4933a7f;p=kivitendo-erp.git diff --git a/SL/DB/Helper/FlattenToForm.pm b/SL/DB/Helper/FlattenToForm.pm index 0b2c5e93e..4dca557f9 100644 --- a/SL/DB/Helper/FlattenToForm.pm +++ b/SL/DB/Helper/FlattenToForm.pm @@ -72,8 +72,9 @@ sub flatten_to_form { _copy_custom_variables($item, $form, 'ic_cvar_', "_${idx}"); if (ref($self) eq 'SL::DB::Invoice') { - $form->{"deliverydate_oe_${idx}"} = $item->deliverydate->to_lxoffice; - $form->{"reqdate_${idx}"} = $item->deliverydate->to_lxoffice; + my $date = $item->deliverydate ? $item->deliverydate->to_lxoffice : undef; + $form->{"deliverydate_oe_${idx}"} = $date; + $form->{"reqdate_${idx}"} = $date; } }