Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision cf9865dc

Von Moritz Bunkus vor fast 8 Jahren hinzugefügt

  • ID cf9865dc7faad6b1ea68e2c5db8b8b44d316fd26
  • Vorgänger 2dcf4554
  • Nachfolger 518e6454

Einkaufsrechnungssuche: keine Multibox mehr nutzen

Unterschiede anzeigen:

SL/AP.pm
439 439

  
440 440
  my @values;
441 441

  
442
  if ($form->{vendor_id}) {
443
    $where .= " AND a.vendor_id = ?";
444
    push(@values, $form->{vendor_id});
445
  } elsif ($form->{vendor}) {
442
  if ($form->{vendor}) {
446 443
    $where .= " AND v.name ILIKE ?";
447 444
    push(@values, like($form->{vendor}));
448 445
  }
bin/mozilla/ap.pl
816 816
  my %myconfig = %main::myconfig;
817 817
  my $locale   = $main::locale;
818 818

  
819
  # setup customer selection
820
  $form->all_vc(\%myconfig, "vendor", "AP");
821

  
822 819
  $form->{title}    = $locale->text('AP Transactions');
823 820

  
824
  $form->get_lists("projects"     => { "key" => "ALL_PROJECTS", "all" => 1 },
825
                   "vendors"      => "ALL_VC");
821
  $form->get_lists(projects => { "key" => "ALL_PROJECTS", "all" => 1 });
826 822

  
827
  $::form->{ALL_DEPARTMENTS} = SL::DB::Manager::Department->get_all;
823
  $::form->{ALL_DEPARTMENTS} = SL::DB::Manager::Department->get_all_sorted;
828 824
  # constants and subs for template
829 825
  $form->{vc_keys}   = sub { "$_[0]->{name}--$_[0]->{id}" };
830 826

  
827
  $::request->layout->add_javascripts("autocomplete_project.js");
828

  
831 829
  $form->header;
832 830
  print $form->parse_html_template('ap/search', { %myconfig });
833 831

  
......
864 862

  
865 863
  $main::auth->assert('vendor_invoice_edit');
866 864

  
867
  ($form->{vendor}, $form->{vendor_id}) = split(/--/, $form->{vendor});
868

  
869 865
  report_generator_set_default_sort('transdate', 1);
870 866

  
871 867
  AP->ap_transactions(\%myconfig, \%$form);
templates/webpages/ap/search.html
1 1
[%- USE T8 %]
2
[%- USE L %]
2
[%- USE L %][%- USE P -%]
3 3
<h1>[% title %]</h1>
4 4

  
5 5
 <form method=post name="search" action=[% script %]>
......
10 10
    <table>
11 11
     <tr>
12 12
      <th align=right>[% 'Vendor' | $T8 %]</th>
13
      <td colspan=3>
14
            [%- INCLUDE 'generic/multibox.html'
15
                 id            = 'vendor',
16
                 name          = 'vendor',
17
                 default       = oldvendor,
18
                 style         = 'width: 250px',
19
                 class         = 'initial_focus',
20
                 DATA          = ALL_VC,
21
                 id_sub        = 'vc_keys',
22
                 label_key     = 'name',
23
                 select        = vc_select,
24
                 limit         = vclimit,
25
                 show_empty    = 1,
26
                 allow_textbox = 1,
27
                 -%]
28
      </td>
13
      <td colspan=3>[% L.input_tag("vendor", vendor, style="width: 250px", class="initial_focus") %]</td>
29 14
     </tr>
30 15
    <tr>
31 16
     <th align="right" nowrap>[% 'Contact Person' | $T8 %]</th>
......
51 36
     </tr>
52 37
     <tr>
53 38
      <th align="right">[% 'Project Number' | $T8 %]</th>
54
      <td>
55
            [%- INCLUDE 'generic/multibox.html'
56
                 name          =  'project_id',
57
                 style         = "width: 250px",
58
                 DATA          =  ALL_PROJECTS,
59
                 id_key        = 'id',
60
                 label_key     = 'projectnumber',
61
                 limit         = vclimit,
62
                 show_empty    = 1,
63
                 allow_textbox = 0,
64
            -%]
65
      </td>
39
      <td colspan="3">[% P.project_picker("project_id", project_id, style="width: 250px") %]</td>
66 40
      <th align="right">[% 'Part Number' | $T8 %]</th>
67 41
      <td><input name="parts_partnumber" size="20"></td>
68 42
     </tr>

Auch abrufbar als: Unified diff