Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 22a52f84

Von Bernd Bleßmann vor etwa 9 Jahren hinzugefügt

  • ID 22a52f84da5686ecce3a55cd4c4ab2ecabab1d9c
  • Vorgänger 9052a048
  • Nachfolger 8bf3fee4

Stammdaten->Berichte->Waren: Nach Shopartikel filtern und anzeigen können.

Unterschiede anzeigen:

SL/IC.pm
730 730
  my @apoe_filters         = qw(transdate);
731 731
  my @like_filters         = (@simple_filters, @invoice_oi_filters);
732 732
  my @all_columns          = (@simple_filters, @makemodel_filters, @apoe_filters, @project_filters, qw(serialnumber));
733
  my @simple_l_switches    = (@all_columns, qw(notes listprice sellprice lastcost priceupdate weight unit rop image));
733
  my @simple_l_switches    = (@all_columns, qw(notes listprice sellprice lastcost priceupdate weight unit rop image shop));
734 734
  my @oe_flags             = qw(bought sold onorder ordered rfq quoted);
735 735
  my @qsooqr_flags         = qw(invnumber ordnumber quonumber trans_id name module qty);
736 736
  my @deliverydate_flags   = qw(deliverydate);
......
856 856
    push @bind_vars, $form->{"partsgroup_id"};
857 857
  }
858 858

  
859
  if ($form->{shop} ne '') {
860
    $form->{l_shop} = '1'; # show the column
861
    if ($form->{shop} eq '0' || $form->{shop} eq 'f') {
862
      push @where_tokens, 'NOT p.shop';
863
      $form->{shop} = 'f';
864
    } else {
865
      push @where_tokens, 'p.shop';
866
    }
867
  }
868

  
859 869
  foreach (@like_filters) {
860 870
    next unless $form->{$_};
861 871
    $form->{"l_$_"} = '1'; # show the column
......
973 983

  
974 984
  my $token_builder = $make_token_builder->(\%joins_needed);
975 985

  
976
  my @sort_cols    = (@simple_filters, qw(id priceupdate onhand invnumber ordnumber quonumber name serialnumber soldtotal deliverydate));
986
  my @sort_cols    = (@simple_filters, qw(id priceupdate onhand invnumber ordnumber quonumber name serialnumber soldtotal deliverydate shop));
977 987
     $form->{sort} = 'id' unless grep { $form->{"l_$_"} } grep { $form->{sort} eq $_ } @sort_cols; # sort by id if unknown or invisible column
978 988
  my $sort_order   = ($form->{revers} ? ' DESC' : ' ASC');
979 989
  my $order_clause = " ORDER BY " . $token_builder->($form->{sort}) . ($form->{revers} ? ' DESC' : ' ASC');
bin/mozilla/ic.pl
1045 1045
    'transdate'          => { 'text' => $locale->text('Transdate'), },
1046 1046
    'unit'               => { 'text' => $locale->text('Unit'), },
1047 1047
    'weight'             => { 'text' => $locale->text('Weight'), },
1048
    'shop'               => { 'text' => $locale->text('Shopartikel'), },
1048 1049
    'projectnumber'      => { 'text' => $locale->text('Project Number'), },
1049 1050
    'projectdescription' => { 'text' => $locale->text('Project Description'), },
1050 1051
  );
......
1133 1134

  
1134 1135
  my @itemstatus_keys = qw(active obsolete orphaned onhand short);
1135 1136
  my @callback_keys   = qw(onorder ordered rfq quoted bought sold partnumber partsgroup partsgroup_id serialnumber description make model
1136
                           drawing microfiche l_soldtotal l_deliverydate transdatefrom transdateto ean);
1137
                           drawing microfiche l_soldtotal l_deliverydate transdatefrom transdateto ean shop);
1137 1138

  
1138 1139
  # calculate dependencies
1139 1140
  for (@itemstatus_keys, @callback_keys) {
......
1219 1220
    linetotallistprice sellprice linetotalsellprice lastcost linetotallastcost
1220 1221
    priceupdate weight image drawing microfiche invnumber ordnumber quonumber
1221 1222
    transdate name serialnumber deliverydate ean projectnumber projectdescription
1223
    shop
1222 1224
  );
1223 1225

  
1224 1226
  my $pricegroups = SL::DB::Manager::Pricegroup->get_all(sort => 'id');
......
1243 1245

  
1244 1246
  %column_defs = (%column_defs, %column_defs_cvars, %column_defs_pricegroups);
1245 1247
  map { $column_defs{$_}->{visible} ||= $form->{"l_$_"} ? 1 : 0 } @columns;
1246
  map { $column_defs{$_}->{align}   = 'right' } qw(onhand sellprice listprice lastcost linetotalsellprice linetotallastcost linetotallistprice rop weight soldtotal), @pricegroup_columns;
1248
  map { $column_defs{$_}->{align}   = 'right' } qw(onhand sellprice listprice lastcost linetotalsellprice linetotallastcost linetotallistprice rop weight soldtotal shop), @pricegroup_columns;
1247 1249

  
1248 1250
  my @hidden_variables = (
1249 1251
    qw(l_subtotal l_linetotal searchitems itemstatus bom l_pricegroups),
......
1256 1258

  
1257 1259
  my $callback         = build_std_url('action=generate_report', grep { $form->{$_} } @hidden_variables);
1258 1260

  
1259
  my @sort_full        = qw(partnumber description onhand soldtotal deliverydate);
1261
  my @sort_full        = qw(partnumber description onhand soldtotal deliverydate shop);
1260 1262
  my @sort_no_revers   = qw(partsgroup bin priceupdate invnumber ordnumber quonumber name image drawing serialnumber);
1261 1263

  
1262 1264
  foreach my $col (@sort_full) {
......
1350 1352

  
1351 1353
    $row->{weight}->{data} .= ' ' . $defaults->{weightunit};
1352 1354

  
1355
    # 'yes' and 'no' for boolean value shop
1356
    if ($form->{l_shop}) {
1357
      $row->{shop}{data} = $row->{shop}{data}? $::locale->text('yes') : $::locale->text('no');
1358
    }
1359

  
1353 1360
    if (!$ref->{assemblyitem}) {
1354 1361
      foreach my $col (@subtotal_columns) {
1355 1362
        $totals{$col}    += $soldtotal * $ref->{$col};
templates/webpages/ic/search.html
65 65
       <td><input name="microfiche" size="20"></td>
66 66
      </tr>
67 67

  
68
      <tr>
69
       <th align="right" nowrap>[% 'Shopartikel' | $T8 %]</th>
70
       <td>[% L.yes_no_tag('shop', shop, default='', with_empty=1, empty_title='---') %]</td>
71
      </tr>
72

  
68 73
      [% CUSTOM_VARIABLES_FILTER_CODE %]
69 74

  
70 75
      [%- IF is_assembly %]
......
208 213
         <tr>
209 214
          <td>[%- L.checkbox_tag('l_notes', label=LxERP.t8('Notes'), value='Y') %]</td>
210 215
          <td>[%- L.checkbox_tag('l_name', label=LxERP.t8('Name in Selected Records'), value='Y') %]</td>
216
          <td>[%- L.checkbox_tag('l_shop', label=LxERP.t8('Shopartikel'), value='Y') %]</td>
211 217
         </tr>
212 218

  
213 219
         [% CUSTOM_VARIABLES_INCLUSION_CODE %]

Auch abrufbar als: Unified diff