From 2285083b5d6252a67d85e1a24589f772bf643649 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20B=C3=BCren?= Date: Tue, 8 Feb 2022 14:31:56 +0100 Subject: [PATCH] DeliveryOrder: calculate_stock_in_out liefert auch die Einheit mit MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit In do.pl wird hier auch hart die Standardeinheit mitübergeben und ein Wechsel der Einheit in den Auslagermasken hat keine Auswirkung TODO: Macht es Sinn überhaupt eine Auswahlliste für Einheit anzubieten? --- SL/Controller/DeliveryOrder.pm | 3 +-- templates/webpages/delivery_order/tabs/_row.html | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/SL/Controller/DeliveryOrder.pm b/SL/Controller/DeliveryOrder.pm index 5ebbf9d68..c96bc42ac 100644 --- a/SL/Controller/DeliveryOrder.pm +++ b/SL/Controller/DeliveryOrder.pm @@ -933,7 +933,6 @@ sub action_update_stock_information { stock_info => $yaml, stock_qty => $stock_qty, }; - $self->render(\ SL::JSON::to_json($response), { layout => 0, type => 'json', process => 0 }); } @@ -2154,7 +2153,7 @@ sub calculate_stock_in_out_from_stock_info { $units_by_name{$_->{unit}}->convert_to($_->{qty}, $units_by_name{$unit}) } @$stock_info; - my $content = _format_number($sum, 2); + my $content = _format_number($sum, 2) . ' ' . $unit; return $content; } diff --git a/templates/webpages/delivery_order/tabs/_row.html b/templates/webpages/delivery_order/tabs/_row.html index 0e6e1294c..82422ef16 100644 --- a/templates/webpages/delivery_order/tabs/_row.html +++ b/templates/webpages/delivery_order/tabs/_row.html @@ -88,7 +88,7 @@ - [% SELF.calculate_stock_in_out(ITEM) %] + [% SELF.calculate_stock_in_out(ITEM) %] [% ITEM.unit %] [% P.button_tag("kivi.DeliveryOrder.open_stock_in_out_dialog(this, '" _ in_out _"')", "?") %] -- 2.20.1