From be8c4415c90cb11cbf45132b63482f420b41070b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bernd=20Ble=C3=9Fmann?= Date: Fri, 30 Aug 2019 11:01:13 +0200 Subject: [PATCH] =?utf8?q?Lagerstandsbericht:=20Listenpreis=20als=20Basis?= =?utf8?q?=20f.=20Bestandswert=20ausw=C3=A4hlbar?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/WH.pm | 2 +- bin/mozilla/wh.pl | 2 +- locale/de/all | 1 + locale/en/all | 1 + templates/webpages/wh/report_filter.html | 11 +++++++++++ 5 files changed, 15 insertions(+), 2 deletions(-) diff --git a/SL/WH.pm b/SL/WH.pm index c8ad6006e..dacddcca2 100644 --- a/SL/WH.pm +++ b/SL/WH.pm @@ -807,7 +807,7 @@ sub get_warehouse_report { "chargeid" => "c.id", "warehousedescription" => "w.description", "partunit" => "p.unit", - "stock_value" => "p.lastcost / COALESCE(pfac.factor, 1)", + "stock_value" => $form->{stock_value_basis} eq 'list_price' ? "p.listprice / COALESCE(pfac.factor, 1)" : "p.lastcost / COALESCE(pfac.factor, 1)", "purchase_price" => "p.lastcost", "list_price" => "p.listprice", ); diff --git a/bin/mozilla/wh.pl b/bin/mozilla/wh.pl index ffea4b7a5..e8afc5dae 100644 --- a/bin/mozilla/wh.pl +++ b/bin/mozilla/wh.pl @@ -864,7 +864,7 @@ sub generate_report { my @hidden_variables = map { "l_${_}" } @columns; push @hidden_variables, qw(warehouse_id bin_id partnumber partstypes_id description chargenumber bestbefore qty_op qty qty_unit partunit l_warehousedescription l_bindescription); push @hidden_variables, qw(include_empty_bins subtotal include_invalid_warehouses date); - push @hidden_variables, qw(classification_id); + push @hidden_variables, qw(classification_id stock_value_basis); my %column_defs = ( 'warehousedescription' => { 'text' => $locale->text('Warehouse'), }, diff --git a/locale/de/all b/locale/de/all index d1c69dd12..91d3e5889 100755 --- a/locale/de/all +++ b/locale/de/all @@ -3991,6 +3991,7 @@ $self->{texts} = { 'bank_collection_payment_list_#1' => 'bankeinzugszahlungsliste_#1', 'bank_transfer_payment_list_#1' => 'ueberweisungszahlungsliste_#1', 'banktransfers' => 'ueberweisungen', + 'basis for stock value' => 'Grundlage für Bestandswert', 'bestbefore #1' => 'Mindesthaltbarkeit #1', 'bin_list' => 'Lagerliste', 'bis' => 'bis', diff --git a/locale/en/all b/locale/en/all index a1d4ee490..b94f20daf 100644 --- a/locale/en/all +++ b/locale/en/all @@ -3988,6 +3988,7 @@ $self->{texts} = { 'bank_collection_payment_list_#1' => '', 'bank_transfer_payment_list_#1' => '', 'banktransfers' => '', + 'basis for stock value' => '', 'bestbefore #1' => '', 'bin_list' => '', 'bis' => '', diff --git a/templates/webpages/wh/report_filter.html b/templates/webpages/wh/report_filter.html index 585d580af..c552db135 100644 --- a/templates/webpages/wh/report_filter.html +++ b/templates/webpages/wh/report_filter.html @@ -1,6 +1,7 @@ [%- USE T8 %] [%- USE L %] [%- USE P %] +[%- USE LxERP %] [%- USE HTML %][%- USE JavaScript %]

[% 'Report about warehouse contents' | $T8 %]

@@ -190,6 +191,16 @@ + + + [% L.radio_button_tag("stock_value_basis", value='purchase_price', checked=1, label=LxERP.t8('Purchase price')) %] + [% L.radio_button_tag("stock_value_basis", value='list_price', checked=0, label=LxERP.t8('List Price')) %] + + + [% "basis for stock value" | $T8 %] + + + -- 2.20.1