"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",
);
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'), },
'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',
'bank_collection_payment_list_#1' => '',
'bank_transfer_payment_list_#1' => '',
'banktransfers' => '',
+ 'basis for stock value' => '',
'bestbefore #1' => '',
'bin_list' => '',
'bis' => '',
[%- USE T8 %]
[%- USE L %]
[%- USE P %]
+[%- USE LxERP %]
[%- USE HTML %][%- USE JavaScript %]
<h1>[% 'Report about warehouse contents' | $T8 %]</h1>
<td nowrap><label for="l_list_price">[% 'List Price' | $T8 %]</label></td>
</tr>
+ <tr>
+ <td colspan="2" align="right">
+ [% 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')) %]
+ </td>
+ <td align="right">
+ [% "basis for stock value" | $T8 %]
+ </td>
+ </tr>
+
</table>
</td>
</tr>