From 867a69bcc3730b4a3f0be8e2221f21e16eb89960 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20B=C3=BCren?= Date: Mon, 14 Jun 2021 12:41:51 +0200 Subject: [PATCH] =?utf8?q?ShippedQty:=20Fallunterschied=20f=C3=BCr=20Einka?= =?utf8?q?uf/Verkauf=20gesetzt?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/Helper/ShippedQty.pm | 5 ++++- t/helper/shipped_qty.t | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/SL/Helper/ShippedQty.pm b/SL/Helper/ShippedQty.pm index b23e4fa45..3ad46197e 100644 --- a/SL/Helper/ShippedQty.pm +++ b/SL/Helper/ShippedQty.pm @@ -432,7 +432,9 @@ include a bulk mode to speed up multiple objects. =item C -Creates a new helper object. PARAMS may include: +Creates a new helper object, $::form->{type} is mandatory. + +PARAMS may include: =over 4 @@ -472,6 +474,7 @@ than this modules provides. See C for the returned format. + =back =item C diff --git a/t/helper/shipped_qty.t b/t/helper/shipped_qty.t index c300bb5d4..7b3bc3afc 100644 --- a/t/helper/shipped_qty.t +++ b/t/helper/shipped_qty.t @@ -63,6 +63,7 @@ my %default_transfer_params = ( wh => $wh, bin => $bin1, unit => 'Stck'); note("testing purchases, no fill_up"); +$::form->{type} = 'purchase_order'; my $purchase_order = create_purchase_order( save => 1, orderitems => [ create_order_item(part => $part1, qty => 11), @@ -135,6 +136,7 @@ is($purchase_orderitem_part2->shipped_qty(require_stock_out => 1), 11, "OrderIte note('testing sales, no fill_up'); +$::form->{type} = 'sales_order'; my $sales_order = create_sales_order( save => 1, orderitems => [ create_order_item(part => $part1, qty => 5), -- 2.20.1