Revision ea6ec9c1
Von Bernd Bleßmann vor etwa 3 Jahren hinzugefügt
SL/WH.pm | ||
---|---|---|
627 | 627 |
$form->{l_part_type} = 'Y'; |
628 | 628 |
|
629 | 629 |
my $select_clause = join ', ', map { +/^l_/; "$select_tokens{$'} AS $'" } |
630 |
( grep( { !/qty/ and /^l_/ and $form->{$_} eq 'Y' } keys %$form), |
|
630 |
( grep( { !/qty/ and !/^l_cvar/ and /^l_/ and $form->{$_} eq 'Y' } keys %$form),
|
|
631 | 631 |
qw(l_parts_id l_qty l_partunit) ); |
632 | 632 |
|
633 | 633 |
my $group_clause = join ", ", map { +/^l_/; "$'" } |
634 |
( grep( { !/qty/ and /^l_/ and $form->{$_} eq 'Y' } keys %$form), |
|
634 |
( grep( { !/qty/ and !/^l_cvar/ and /^l_/ and $form->{$_} eq 'Y' } keys %$form),
|
|
635 | 635 |
qw(l_parts_id l_partunit) ); |
636 | 636 |
|
637 | 637 |
my %join_tokens = ( |
... | ... | |
639 | 639 |
); |
640 | 640 |
|
641 | 641 |
my $joins = join ' ', grep { $_ } map { +/^l_/; $join_tokens{"$'"} } |
642 |
( grep( { !/qty/ and /^l_/ and $form->{$_} eq 'Y' } keys %$form), |
|
642 |
( grep( { !/qty/ and !/^l_cvar/ and /^l_/ and $form->{$_} eq 'Y' } keys %$form),
|
|
643 | 643 |
qw(l_parts_id l_qty l_partunit) ); |
644 | 644 |
|
645 | 645 |
my $query = |
bin/mozilla/wh.pl | ||
---|---|---|
790 | 790 |
|
791 | 791 |
show_no_warehouses_error() if (!scalar @{ $form->{WAREHOUSES} }); |
792 | 792 |
|
793 |
my $CVAR_CONFIGS = SL::DB::Manager::CustomVariableConfig->get_all_sorted(where => [ module => 'IC' ]); |
|
794 |
my $INCLUDABLE_CVAR_CONFIGS = [ grep { $_->includeable } @{ $CVAR_CONFIGS } ]; |
|
793 |
my $cvar_configs = CVar->get_configs('module' => 'IC'); |
|
794 |
(undef, |
|
795 |
$form->{CUSTOM_VARIABLES_INCLUSION_CODE}) = CVar->render_search_options('variables' => $cvar_configs, |
|
796 |
'include_prefix' => 'l_', |
|
797 |
'include_value' => 'Y'); |
|
795 | 798 |
|
796 | 799 |
$form->{title} = $locale->text("Report about warehouse contents"); |
797 | 800 |
|
... | ... | |
801 | 804 |
print $form->parse_html_template("wh/report_filter", |
802 | 805 |
{ "WAREHOUSES" => $form->{WAREHOUSES}, |
803 | 806 |
"UNITS" => AM->unit_select_data(AM->retrieve_units(\%myconfig, $form)), |
804 |
# "CVAR_CONFIGS" => $CVAR_CONFIGS, # nyi searchable cvars |
|
805 |
"INCLUDABLE_CVAR_CONFIGS" => $INCLUDABLE_CVAR_CONFIGS, |
|
806 | 807 |
}); |
807 | 808 |
|
808 | 809 |
$main::lxdebug->leave_sub(); |
templates/webpages/wh/report_filter.html | ||
---|---|---|
215 | 215 |
<td align="right"><input name="l_list_price" id="l_list_price" class="checkbox" type="checkbox" value="Y"></td> |
216 | 216 |
<td nowrap><label for="l_list_price">[% 'List Price' | $T8 %]</label></td> |
217 | 217 |
</tr> |
218 |
[% IF INCLUDABLE_CVAR_CONFIGS %] |
|
219 |
<tr><td colspan="6"><hr noshade height="1"></td></tr> |
|
220 |
[% FOREACH cvar_cfg = INCLUDABLE_CVAR_CONFIGS %] |
|
221 |
<tr> |
|
222 |
<td colspan="2" align="left"> |
|
223 |
[% name__ = cvar_cfg.name; |
|
224 |
L.checkbox_tag("l_cvar_" _ name__, value="1", checked=(cvar_cfg.included_by_default ? 1 : ''), label=cvar_cfg.description) %] |
|
225 |
</td> |
|
226 |
</tr> |
|
227 |
[% END %] |
|
228 |
[% END %] |
|
218 |
</table> |
|
219 |
<table> |
|
220 |
[% CUSTOM_VARIABLES_INCLUSION_CODE %] |
|
229 | 221 |
</table> |
230 | 222 |
</td> |
231 | 223 |
</tr> |
Auch abrufbar als: Unified diff
CVars für Lagerbestand: Funktion zum Rendern aus SL/CVar nehmen