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:
a31792c
)
ShippedQty: Chaining bei Aufruf mit leerem Array
author
Sven Schöling
<s.schoeling@linet-services.de>
Mon, 31 Jul 2017 13:40:15 +0000
(15:40 +0200)
committer
Sven Schöling
<s.schoeling@linet-services.de>
Mon, 31 Jul 2017 13:41:23 +0000
(15:41 +0200)
SL/Helper/ShippedQty.pm
patch
|
blob
|
history
diff --git
a/SL/Helper/ShippedQty.pm
b/SL/Helper/ShippedQty.pm
index
d89a306
..
5135823
100644
(file)
--- a/
SL/Helper/ShippedQty.pm
+++ b/
SL/Helper/ShippedQty.pm
@@
-104,8
+104,6
@@
sub calculate {
die 'Need exactly one argument, either id, object or arrayref of ids or objects.' unless 2 == @_;
- return $self if !$data || ('ARRAY' eq ref $data && !@$data);
-
$self->normalize_input($data);
return $self unless @{ $self->oe_ids };
@@
-235,6
+233,8
@@
sub write_to {
sub write_to_objects {
my ($self) = @_;
+ return unless @{ $self->oe_ids };
+
die 'Can only use write_to_objects, when calculate was called with objects. Use write_to instead.' unless $self->objects_or_ids;
$self->write_to($self->objects);