Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision b1c40d4d

Von Bernd Bleßmann vor fast 10 Jahren hinzugefügt

  • ID b1c40d4de868ead7dc9f2a007d7d461b02318d29
  • Vorgänger b922ab4c
  • Nachfolger 1adadc30

Stammdaten -> Berichte -> Kunden: Nach Standardverkäufer filtern können.

Unterschiede anzeigen:

SL/CT.pm
171 171
    push(@values, conv_i($form->{business_id}));
172 172
  }
173 173

  
174
  if ($form->{salesman_id}) {
175
    $where .= qq| AND (ct.salesman_id = ?)|;
176
    push(@values, conv_i($form->{salesman_id}));
177
  }
178

  
174 179
  # Nur Kunden finden, bei denen ich selber der Verkäufer bin
175 180
  # Gilt nicht für Lieferanten
176 181
  if ($cv eq 'customer' &&   !$main::auth->assert('customer_vendor_all_edit', 1)) {
bin/mozilla/ct.pl
76 76

  
77 77
  $form->{IS_CUSTOMER} = $form->{db} eq 'customer';
78 78

  
79
  $form->get_lists("business_types" => "ALL_BUSINESS_TYPES");
79
  $form->get_lists("business_types" => "ALL_BUSINESS_TYPES",
80
                   "salesmen"       => "ALL_SALESMEN");
80 81
  $form->{SHOW_BUSINESS_TYPES} = scalar @{ $form->{ALL_BUSINESS_TYPES} } > 0;
81 82

  
82 83
  $form->{CUSTOM_VARIABLES}                  = CVar->get_configs('module' => 'CT');
......
152 153
      push @options, $label . " : " . $business->description;
153 154
    }
154 155
  }
156
  if ($form->{salesman_id}) {
157
    my $salesman = SL::DB::Manager::Employee->find_by(id => $form->{salesman_id});
158
    if ($salesman) {
159
      push @options, $locale->text('Salesman') . " : " . $salesman->name;
160
    }
161
  }
155 162

  
156 163
  my @columns = (
157 164
    'id',        'name',    "$form->{db}number",   'contact',   'phone',    'discount',
......
194 201

  
195 202
  my @hidden_variables  = ( qw(
196 203
      db status obsolete name contact email cp_name addr_street addr_zipcode
197
      addr_city addr_country business_id
204
      addr_city addr_country business_id salesman_id
198 205
    ), "$form->{db}number",
199 206
    map({ "cvar_$_->{name}" } @searchable_custom_variables),
200 207
    map({'cvar_'. $_->{name} .'_qtyop'} grep({$_->{type} eq 'number'} @searchable_custom_variables)),
templates/webpages/ct/search.html
57 57
   </tr>
58 58
   [% END %]
59 59

  
60
   [% IF IS_CUSTOMER && ALL_SALESMEN.size %]
61
   <tr>
62
    <th align="right" nowrap>[% 'Salesman' | $T8 %]</th>
63
    <td>
64
     [% L.select_tag('salesman_id', ALL_SALESMEN, title_key = 'name', with_empty = 1) %]
65
    </td>
66
   </tr>
67
   [% END %]
68

  
60 69
   [% CUSTOM_VARIABLES_FILTER_CODE %]
61 70

  
62 71
   <tr>

Auch abrufbar als: Unified diff