X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/e5e8dfae3a1edcdcfe64338112923ec40fc0353c..4d2ba3125019794b857b71523c8d02e591ebf631:/SL/Helper/ShippedQty.pm diff --git a/SL/Helper/ShippedQty.pm b/SL/Helper/ShippedQty.pm index 80ee73d9c..63f7df883 100644 --- a/SL/Helper/ShippedQty.pm +++ b/SL/Helper/ShippedQty.pm @@ -207,7 +207,7 @@ sub write_to { for my $obj (@$objects) { if ('SL::DB::OrderItem' eq ref $obj) { - $obj->{shipped_qty} = $shipped_qty->{$obj->id}; + $obj->{shipped_qty} = $shipped_qty->{$obj->id} //= 0; $obj->{delivered} = $shipped_qty->{$obj->id} == $obj->qty; } elsif ('SL::DB::Order' eq ref $obj) { if (exists $obj->{orderitems}) { @@ -452,13 +452,26 @@ No return value. All internal errors will throw an exception. =item C -Save the C and C state to the objects. If L -was called with objects, then C will use these. +Save the C and C state to the given objects. If +L was called with objects, then C will use these. + +C and C will be directly infused into the objects +without calling the accessor for delivered. If you want to save afterwards, +you'll have to do that yourself. + +C is guaranteed to be coerced to a number. If no delivery_order +was found it will be set to zero. + +C is guaranteed only to be the correct boolean value, but not +any specific value. =item C Valid after L. Returns a hasref with shipped qtys by orderitems id. +Unlike the result of C, entries in C may be C if +linked elements were found. + =item C Valid after L. Returns a hasref with delivered flag by order id.