From 7464fcbd11174679dd59d9953fe22eb8285c7eac Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bernd=20Ble=C3=9Fmann?= Date: Fri, 30 Aug 2019 10:34:08 +0200 Subject: [PATCH] Lagerstandsbericht: Listenpreis anzeigbar machen --- SL/WH.pm | 1 + bin/mozilla/wh.pl | 7 +++++-- templates/webpages/wh/report_filter.html | 2 ++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/SL/WH.pm b/SL/WH.pm index 918607284..c8ad6006e 100644 --- a/SL/WH.pm +++ b/SL/WH.pm @@ -809,6 +809,7 @@ sub get_warehouse_report { "partunit" => "p.unit", "stock_value" => "p.lastcost / COALESCE(pfac.factor, 1)", "purchase_price" => "p.lastcost", + "list_price" => "p.listprice", ); $form->{l_classification_id} = 'Y'; $form->{l_part_type} = 'Y'; diff --git a/bin/mozilla/wh.pl b/bin/mozilla/wh.pl index f4b2d5f10..ffea4b7a5 100644 --- a/bin/mozilla/wh.pl +++ b/bin/mozilla/wh.pl @@ -791,7 +791,7 @@ sub generate_report { my $sort_col = $form->{sort}; my %filter; - my @columns = qw(warehousedescription bindescription partnumber type_and_classific partdescription chargenumber bestbefore comment qty partunit purchase_price stock_value); + my @columns = qw(warehousedescription bindescription partnumber type_and_classific partdescription chargenumber bestbefore comment qty partunit list_price purchase_price stock_value); # filter stuff map { $filter{$_} = $form->{$_} if ($form->{$_}) } qw(warehouse_id bin_id classification_id partnumber description chargenumber bestbefore date include_invalid_warehouses); @@ -878,6 +878,7 @@ sub generate_report { 'partunit' => { 'text' => $locale->text('Unit'), }, 'stock_value' => { 'text' => $locale->text('Stock value'), }, 'purchase_price' => { 'text' => $locale->text('Purchase price'), }, + 'list_price' => { 'text' => $locale->text('List Price'), }, ); my $href = build_std_url('action=generate_report', grep { $form->{$_} } @hidden_variables); @@ -885,7 +886,7 @@ sub generate_report { map { $column_defs{$_}->{link} = $href . "&page=".$page."&sort=${_}&order=" . Q($_ eq $sort_col ? 1 - $form->{order} : $form->{order}) } @columns; - my %column_alignment = map { $_ => 'right' } qw(qty purchase_price stock_value); + my %column_alignment = map { $_ => 'right' } qw(qty list_price purchase_price stock_value); map { $column_defs{$_}->{visible} = $form->{"l_${_}"} ? 1 : 0 } @columns; @@ -927,6 +928,7 @@ sub generate_report { # 'conv_units' => 'convertible'); $entry->{stock_value} = $form->format_amount(\%myconfig, $entry->{stock_value} * 1, 2); $entry->{purchase_price} = $form->format_amount(\%myconfig, $entry->{purchase_price} * 1, 2); + $entry->{list_price} = $form->format_amount(\%myconfig, $entry->{list_price} * 1, 2); my $row_set = [ { map { $_ => { 'data' => $entry->{$_}, 'align' => $column_alignment{$_} } } @columns } ]; @@ -941,6 +943,7 @@ sub generate_report { # 'conv_units' => 'convertible'); $row->{stock_value}->{data} = $form->format_amount(\%myconfig, $subtotals{stock_value} * 1, 2); $row->{purchase_price}->{data} = $form->format_amount(\%myconfig, $subtotals{purchase_price} * 1, 2); + $row->{list_price}->{data} = $form->format_amount(\%myconfig, $subtotals{list_price} * 1, 2); %subtotals = map { $_ => 0 } @subtotals_columns; diff --git a/templates/webpages/wh/report_filter.html b/templates/webpages/wh/report_filter.html index a3afc9bfc..585d580af 100644 --- a/templates/webpages/wh/report_filter.html +++ b/templates/webpages/wh/report_filter.html @@ -186,6 +186,8 @@ + + -- 2.20.1