projects
/
kivitendo-erp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
de76094
)
FlattenToForm: Zugriff auf nicht definierte Variable verhindern
author
Moritz Bunkus
<m.bunkus@linet-services.de>
Thu, 22 Jan 2015 15:38:15 +0000
(16:38 +0100)
committer
Moritz Bunkus
<m.bunkus@linet-services.de>
Thu, 22 Jan 2015 15:39:28 +0000
(16:39 +0100)
Passierte, wenn bei Rechnung das Lieferdatum in den Positionen leer war.
SL/DB/Helper/FlattenToForm.pm
patch
|
blob
|
history
diff --git
a/SL/DB/Helper/FlattenToForm.pm
b/SL/DB/Helper/FlattenToForm.pm
index
0b2c5e9
..
4dca557
100644
(file)
--- 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;
}
}