Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 5d2ede53

Von Bernd Bleßmann vor mehr als 3 Jahren hinzugefügt

  • ID 5d2ede536e3a31f17b0a8afa9cc0ce8627a34b2f
  • Vorgänger 3193bd4a
  • Nachfolger db791046

Lagerberichte nach Waren-CVars filtern können …

… nur Waren-CVars aus den Stammdaten - nicht aus Überlagerung aus Belegen

Übernahme aus Kundenprojekt

Unterschiede anzeigen:

SL/WH.pm
306 306

  
307 307
  my $where_clause = @filter_ary ? join(" AND ", @filter_ary) . " AND " : '';
308 308

  
309
  my ($cvar_where, @cvar_values) = CVar->build_filter_query(
310
    module         => 'IC',
311
    trans_id_field => 'p.id',
312
    filter         => $form,
313
    sub_module     => undef,
314
  );
315

  
316
  if ($cvar_where) {
317
    $where_clause .= qq| ($cvar_where) AND |;
318
    push @filter_vars, @cvar_values;
319
  }
320

  
309 321
  $select_tokens{'trans'} = {
310 322
     "parts_id"             => "i1.parts_id",
311 323
     "qty"                  => "ABS(SUM(i1.qty))",
......
642 654
        ( grep( { !/qty/ and !/^l_cvar/ and /^l_/ and $form->{$_} eq 'Y' } keys %$form),
643 655
          qw(l_parts_id l_qty l_partunit) );
644 656

  
657
  my ($cvar_where, @cvar_values) = CVar->build_filter_query(
658
    module         => 'IC',
659
    trans_id_field => 'p.id',
660
    filter         => $form,
661
    sub_module     => undef,
662
  );
663

  
664
  if ($cvar_where) {
665
    $where_clause .= qq| AND ($cvar_where)|;
666
    push @filter_vars, @cvar_values;
667
  }
668

  
645 669
  my $query =
646 670
    qq|SELECT * FROM ( SELECT $select_clause
647 671
      FROM inventory i
bin/mozilla/wh.pl
575 575
  show_no_warehouses_error() if (!scalar @{ $form->{WAREHOUSES} });
576 576

  
577 577
  my $cvar_configs                           = CVar->get_configs('module' => 'IC');
578
  (undef,
578
  ($form->{CUSTOM_VARIABLES_FILTER_CODE},
579 579
   $form->{CUSTOM_VARIABLES_INCLUSION_CODE}) = CVar->render_search_options('variables'      => $cvar_configs,
580 580
                                                                           'include_prefix' => 'l_',
581 581
                                                                           'include_value'  => 'Y');
......
649 649

  
650 650
  my $cvar_configs                 = CVar->get_configs('module' => 'IC');
651 651
  my @includeable_custom_variables = grep { $_->{includeable} } @{ $cvar_configs };
652
  my @searchable_custom_variables  = grep { $_->{searchable} }  @{ $cvar_configs };
652 653
  push @columns, map { "cvar_$_->{name}" } @includeable_custom_variables;
653 654

  
654 655
  my @hidden_variables = map { "l_${_}" } @columns;
655 656
  push @hidden_variables, qw(warehouse_id bin_id partnumber description chargenumber bestbefore qty_op qty qty_unit unit partunit fromdate todate transtype_ids comment projectnumber);
656 657
  push @hidden_variables, qw(classification_id);
658
  push @hidden_variables, map({'cvar_'. $_->{name}}                                         @searchable_custom_variables);
659
  push @hidden_variables, map({'cvar_'. $_->{name} .'_from'}  grep({$_->{type} eq  'date'}  @searchable_custom_variables));
660
  push @hidden_variables, map({'cvar_'. $_->{name} .'_to'}    grep({$_->{type} eq  'date'}  @searchable_custom_variables));
661
  push @hidden_variables, map({'cvar_'. $_->{name} .'_qtyop'} grep({$_->{type} eq 'number'} @searchable_custom_variables));
657 662

  
658 663
  my %column_defs = (
659 664
    'ids'             => { raw_header_data => checkbox_tag("", id => "check_all", checkall  => "[data-checkall=1]") },
......
811 816
  show_no_warehouses_error() if (!scalar @{ $form->{WAREHOUSES} });
812 817

  
813 818
  my $cvar_configs                           = CVar->get_configs('module' => 'IC');
814
  (undef,
819
  ($form->{CUSTOM_VARIABLES_FILTER_CODE},
815 820
   $form->{CUSTOM_VARIABLES_INCLUSION_CODE}) = CVar->render_search_options('variables'      => $cvar_configs,
816 821
                                                                           'include_prefix' => 'l_',
817 822
                                                                           'include_value'  => 'Y');
......
915 920

  
916 921
  my $cvar_configs                 = CVar->get_configs('module' => 'IC');
917 922
  my @includeable_custom_variables = grep { $_->{includeable} } @{ $cvar_configs };
923
  my @searchable_custom_variables  = grep { $_->{searchable} }  @{ $cvar_configs };
918 924
  push @columns, map { "cvar_$_->{name}" } @includeable_custom_variables;
919 925

  
920 926
  my @hidden_variables = map { "l_${_}" } @columns;
921 927
  push @hidden_variables, qw(warehouse_id bin_id partnumber partstypes_id description chargenumber bestbefore qty_op qty qty_unit partunit l_warehousedescription l_bindescription);
922 928
  push @hidden_variables, qw(include_empty_bins subtotal include_invalid_warehouses date);
923 929
  push @hidden_variables, qw(classification_id stock_value_basis allrows);
930
  push @hidden_variables, map({'cvar_'. $_->{name}}                                         @searchable_custom_variables);
931
  push @hidden_variables, map({'cvar_'. $_->{name} .'_from'}  grep({$_->{type} eq 'date'}   @searchable_custom_variables));
932
  push @hidden_variables, map({'cvar_'. $_->{name} .'_to'}    grep({$_->{type} eq 'date'}   @searchable_custom_variables));
933
  push @hidden_variables, map({'cvar_'. $_->{name} .'_qtyop'} grep({$_->{type} eq 'number'} @searchable_custom_variables));
924 934

  
925 935
  my %column_defs = (
926 936
    'warehousedescription' => { 'text' => $locale->text('Warehouse'), },
templates/webpages/wh/journal_filter.html
142 142
          [% L.date_tag('todate') %]
143 143
        </td>
144 144
       </tr>
145
       [% CUSTOM_VARIABLES_FILTER_CODE %]
145 146
      </table>
146 147
     </td>
147 148
    </tr>
templates/webpages/wh/report_filter.html
162 162
         [% L.input_number_tag("per_page", 20, size=4) %]
163 163
        </td>
164 164
       </tr>
165
       [% CUSTOM_VARIABLES_FILTER_CODE %]
165 166
      </table>
166 167
     </td>
167 168
    </tr>

Auch abrufbar als: Unified diff