From: Jan Büren Date: Tue, 8 Feb 2022 13:31:56 +0000 (+0100) Subject: DeliveryOrder: calculate_stock_in_out liefert auch die Einheit mit X-Git-Tag: kivitendo-mebil_0.1-0~10^2~2^2~216^2~4 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=2285083b5d6252a67d85e1a24589f772bf643649;p=kivitendo-erp.git DeliveryOrder: calculate_stock_in_out liefert auch die Einheit mit 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? --- 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 _"')", "?") %]