Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision ad033a76

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

  • ID ad033a768bbe46566afa159008c42ff7fc6bb35a
  • Vorgänger e8966d20
  • Nachfolger 8dc4cef2

surplus: Erfassungsdatum bei Stammdatensuche Waren/Dienstleistungen/Erzeugnisse ...

... im Bericht anzeigen und danach filtern.

Conflicts:

SL/IC.pm
bin/mozilla/ic.pl
templates/webpages/ic/search.html

Übernahme aus Kundenprojekt.

Unterschiede anzeigen:

SL/IC.pm
744 744
  my @apoe_filters         = qw(transdate);
745 745
  my @like_filters         = (@simple_filters, @invoice_oi_filters);
746 746
  my @all_columns          = (@simple_filters, @makemodel_filters, @apoe_filters, @project_filters, qw(serialnumber));
747
  my @simple_l_switches    = (@all_columns, qw(notes listprice sellprice lastcost priceupdate weight unit rop image shop));
747
  my @simple_l_switches    = (@all_columns, qw(notes listprice sellprice lastcost priceupdate weight unit rop image shop insertdate));
748 748
  my @oe_flags             = qw(bought sold onorder ordered rfq quoted);
749 749
  my @qsooqr_flags         = qw(invnumber ordnumber quonumber trans_id name module qty);
750 750
  my @deliverydate_flags   = qw(deliverydate);
......
820 820
    'ioi.id'       => 'ioi_id',
821 821
    'ioi.ioi'      => 'ioi',
822 822
    'projectdescription' => 'projectdescription',
823
    'insertdate'   => 'insertdate',
823 824
  );
824 825

  
825 826
  my %real_column = (
826 827
    projectdescription => 'description',
828
    insertdate         => 'itime::DATE',
827 829
  );
828 830

  
829 831
  if (($form->{searchitems} eq 'assembly') && $form->{l_lastcost}) {
......
864 866
    }
865 867
  }
866 868

  
869
  # special case insertdate
870
  if (grep { $form->{$_} } qw(insertdatefrom insertdateto)) {
871
    $form->{"l_insertdate"} = 1;
872
    push @select_tokens, 'insertdate';
873

  
874
    my $token_builder = $make_token_builder->();
875
    my $token = $token_builder->('insertdate');
876

  
877
    for (qw(insertdatefrom insertdateto)) {
878
      next unless $form->{$_};
879
      push @where_tokens, sprintf "$token %s ?", /from$/ ? '>=' : '<=';
880
      push @bind_vars,    $form->{$_};
881
    }
882
  }
883

  
867 884
  if ($form->{"partsgroup_id"}) {
868 885
    $form->{"l_partsgroup"} = '1'; # show the column
869 886
    push @where_tokens, "pg.id = ?";
......
997 1014

  
998 1015
  my $token_builder = $make_token_builder->(\%joins_needed);
999 1016

  
1000
  my @sort_cols    = (@simple_filters, qw(id priceupdate onhand invnumber ordnumber quonumber name serialnumber soldtotal deliverydate shop));
1017
  my @sort_cols    = (@simple_filters, qw(id priceupdate onhand invnumber ordnumber quonumber name serialnumber soldtotal deliverydate insertdate shop));
1001 1018
     $form->{sort} = 'id' unless grep { $form->{"l_$_"} } grep { $form->{sort} eq $_ } @sort_cols; # sort by id if unknown or invisible column
1002 1019
  my $sort_order   = ($form->{revers} ? ' DESC' : ' ASC');
1003 1020
  my $order_clause = " ORDER BY " . $token_builder->($form->{sort}) . ($form->{revers} ? ' DESC' : ' ASC');
......
1055 1072
  if ($form->{searchitems} eq 'assembly' && $form->{bom}) {
1056 1073
    $query =
1057 1074
      qq|SELECT p.id, p.partnumber, p.description, a.qty AS onhand,
1058
           p.unit, p.notes,
1075
           p.unit, p.notes, p.itime::DATE as insertdate,
1059 1076
           p.sellprice, p.listprice, p.lastcost,
1060 1077
           p.rop, p.weight, p.priceupdate,
1061 1078
           p.image, p.drawing, p.microfiche,
bin/mozilla/ic.pl
1023 1023
    'drawing'            => { 'text' => $locale->text('Drawing'), },
1024 1024
    'ean'                => { 'text' => $locale->text('EAN'), },
1025 1025
    'image'              => { 'text' => $locale->text('Image'), },
1026
    'insertdate'         => { 'text' => $locale->text('Insert Date'), },
1026 1027
    'invnumber'          => { 'text' => $locale->text('Invoice Number'), },
1027 1028
    'lastcost'           => { 'text' => $locale->text('Last Cost'), },
1028 1029
    'linetotallastcost'  => { 'text' => $locale->text('Extended'), },
......
1130 1131
    microfiche    => $locale->text('Microfiche')       . ": '$form->{microfiche}'",
1131 1132
    l_soldtotal   => $locale->text('Qty in Selected Records'),
1132 1133
    ean           => $locale->text('EAN')              . ": '$form->{ean}'",
1134
    insertdatefrom => $locale->text('Insert Date') . ": " . $locale->text('From')       . " " . $locale->date(\%myconfig, $form->{insertdatefrom}, 1),
1135
    insertdateto   => $locale->text('Insert Date') . ": " . $locale->text('To (time)')  . " " . $locale->date(\%myconfig, $form->{insertdateto}, 1),
1133 1136
  );
1134 1137

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

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

  
1226 1229
  my $pricegroups = SL::DB::Manager::Pricegroup->get_all(sort => 'id');
......
1248 1251
  map { $column_defs{$_}->{align}   = 'right' } qw(onhand sellprice listprice lastcost linetotalsellprice linetotallastcost linetotallistprice rop weight soldtotal shop), @pricegroup_columns;
1249 1252

  
1250 1253
  my @hidden_variables = (
1251
    qw(l_subtotal l_linetotal searchitems itemstatus bom l_pricegroups),
1254
    qw(l_subtotal l_linetotal searchitems itemstatus bom l_pricegroups insertdatefrom insertdateto),
1252 1255
    @itemstatus_keys,
1253 1256
    @callback_keys,
1254 1257
    map({ "cvar_$_->{name}" } @searchable_custom_variables),
......
1258 1261

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

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

  
1264 1267
  foreach my $col (@sort_full) {
templates/webpages/ic/search.html
70 70
       <td>[% L.yes_no_tag('shop', shop, default='', with_empty=1, empty_title='---') %]</td>
71 71
      </tr>
72 72

  
73
      <tr>
74
       <th align="right">[% 'Insert Date' | $T8 %]</th>
75
       <td>
76
        [% 'From' | $T8 %][% L.date_tag('insertdatefrom') %]
77
        [% 'Bis' | $T8 %] [% L.date_tag('insertdateto') %]
78
       </td>
79
      </tr>
80

  
73 81
      [% CUSTOM_VARIABLES_FILTER_CODE %]
74 82

  
75 83
      [%- IF is_assembly %]
......
214 222
          <td>[%- L.checkbox_tag('l_notes', label=LxERP.t8('Notes'), value='Y') %]</td>
215 223
          <td>[%- L.checkbox_tag('l_name', label=LxERP.t8('Name in Selected Records'), value='Y') %]</td>
216 224
          <td>[%- L.checkbox_tag('l_shop', label=LxERP.t8('Shopartikel'), value='Y') %]</td>
225
          <td>[%- L.checkbox_tag('l_insertdate', label=LxERP.t8('Insert Date'), value='Y') %]</td>
217 226
         </tr>
218 227

  
219 228
         [% CUSTOM_VARIABLES_INCLUSION_CODE %]

Auch abrufbar als: Unified diff