Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision c17d679a

Von Kivitendo Admin vor fast 8 Jahren hinzugefügt

  • ID c17d679a939585324f8690e04c4d32ff4a1f4053
  • Vorgänger af9a1f44
  • Nachfolger 3d58a31e

Verkaufsbericht - Abteilung korrekt behandeln

und Umstellung auf select_tag

Unterschiede anzeigen:

SL/VK.pm
148 148
    $where .= " AND ar.transdate <= ?";
149 149
    push(@values, $form->{transdateto});
150 150
  }
151
  if ($form->{department}) {
152
    my ($null, $department_id) = split /--/, $form->{department};
151
  if ($form->{department_id}) {
153 152
    $where .= " AND ar.department_id = ?";
154
    push(@values, $department_id);
153
    push @values, conv_i($form->{department_id});
155 154
  }
156 155
  if ($form->{employee_id}) {
157 156
    $where .= " AND ar.employee_id = ?";
bin/mozilla/vk.pl
55 55
  my %myconfig = %main::myconfig;
56 56
  my $locale   = $main::locale;
57 57

  
58
  my ($customer, $department);
58
  my ($customer);
59 59

  
60 60
  # setup customer selection
61 61
  $form->all_vc(\%myconfig, "customer", "AR");
......
154 154
  # pass hidden variables for pdf/csv export
155 155
  # first with l_ to determine which columns to show
156 156
  # then with the options for headings (such as transdatefrom, partnumber, ...)
157
  my @hidden_variables  = (qw(l_headers_mainsort l_headers_subsort l_subtotal_mainsort l_subtotal_subsort l_total l_parts l_customername l_customernumber transdatefrom transdateto decimalplaces customer customer_id department partnumber partsgroup country business description project_id customernumber salesman employee salesman_id employee_id business_id partsgroup_id mainsort subsort),
157
  my @hidden_variables  = (qw(l_headers_mainsort l_headers_subsort l_subtotal_mainsort l_subtotal_subsort l_total l_parts l_customername l_customernumber transdatefrom transdateto decimalplaces customer customer_id department_id partnumber partsgroup country business description project_id customernumber salesman employee salesman_id employee_id business_id partsgroup_id mainsort subsort),
158 158
      "$form->{db}number",
159 159
      map({ "cvar_$_->{name}" } @searchable_custom_variables),
160 160
      map { "l_$_" } @columns
......
211 211
  push @options, $locale->text('Customer')                . " : $form->{customer}"                                                          if $form->{customer};
212 212
  push @options, $locale->text('Customer Number')         . " : $form->{customernumber}"                                                    if $form->{customernumber};
213 213
  # TODO: only customer id is passed
214
  push @options, $locale->text('Department')              . " : " . (split /--/, $form->{department})[0]                                    if $form->{department};
214
  push @options, $locale->text('Department')              . " : " . SL::DB::Department->new(id => $form->{department_id})->load->description if $form->{department_id};
215 215
  push @options, $locale->text('Invoice Number')          . " : $form->{invnumber}"                                                         if $form->{invnumber};
216 216
  push @options, $locale->text('Invoice Date')            . " : $form->{invdate}"                                                           if $form->{invdate};
217 217
  push @options, $locale->text('Part Number')             . " : $form->{partnumber}"                                                        if $form->{partnumber};
templates/webpages/vk/search_invoice.html
88 88
    <tr>
89 89
      <th align=right nowrap>[% 'Department' | $T8 %]</th>
90 90
      <td>
91
        [%- INCLUDE 'generic/multibox.html'
92
          name          = 'department',
93
          style         = 'width: 250px',
94
          DATA          = ALL_DEPARTMENTS,
95
          id_key        = 'id',
96
          label_key     = 'description',
97
          show_empty    = 1,
98
          allow_textbox = 0,
99
        -%]
91
        [%- L.select_tag('department_id',
92
                         ALL_DEPARTMENTS,
93
                         title_key  = 'description',
94
                         with_empty = 1,
95
                         style      = 'width: 250px')
96
      -%]
100 97
      </td>
101 98

  
102 99
      <th align="right">[% 'Project Number' | $T8 %]</th>

Auch abrufbar als: Unified diff