Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 8cdaa6f0

Von Sven Schöling vor mehr als 16 Jahren hinzugefügt

  • ID 8cdaa6f0c4bb9b3c1dcdd18335e67f4c4842aaa4
  • Vorgänger 21207f52
  • Nachfolger 0a60b9c2

Bugfix (böse klammer zuviel).

Ausserdem Department Dropdownbox ausgelagert ins template.

Unterschiede anzeigen:

bin/mozilla/oe.pl
202 202
  # the content from the field)
203 203
  $form->error($locale->text('Collective Orders only work for orders from one customer!'))
204 204
    if          $form->{rowcount}  && $form->{type}     eq 'sales_order'
205
     && defined $form->{customer}  && $form->{customer} eq '');
205
     && defined $form->{customer}  && $form->{customer} eq '';
206 206

  
207 207
  $form->{"$form->{vc}_id"} ||= $form->{"all_$form->{vc}"}->[0]->{id} if $form->{"all_$form->{vc}"};
208 208

  
......
220 220
  $form->{employee}    = "$form->{employee}--$form->{employee_id}";
221 221

  
222 222
  # build vendor/customer drop down comatibility... don't ask
223
  $form->{"old$form->{vc}"} = $form->{"select$form->{vc}"} = 1;
224

  
225
  # departments
226
  if (@{ $form->{all_departments} }) {
227
    $form->{department}       = "$form->{department}--$form->{department_id}";
228
    $form->{selectdepartment} = join "\n", "<option>", map "<option>$_->{description}--$_->{id}</option>", @{ $form->{all_departments} };
229
  }
223
  $form->{"old$form->{vc}"} = $form->{vc};
224
  $form->{"select$form->{vc}"} = 1;
230 225

  
231 226
  $lxdebug->leave_sub();
232 227
}
......
321 316
                   "taxzones"      => "ALL_TAXZONES",
322 317
                   "payments"      => "ALL_PAYMENTS",
323 318
                   "currencies"    => "ALL_CURRENCIES",
319
                   "departments"   => "ALL_DEPARTMENTS",
324 320
                   $vc             => { key   => "ALL_" . uc($vc),
325 321
                                        limit => $myconfig{vclimit} + 1 },
326 322
                   "price_factors" => "ALL_PRICE_FACTORS");
327 323

  
328 324
  # label subs
329 325
  $TMPL_VAR{sales_employee_labels} = sub { $_[0]->{name} || $_[0]->{login} };
330
  $TMPL_VAR{shipto_labels} = sub { join "; ", grep { $_ } map { $_[0]->{"shipto${_}" } } qw(name department_1 street city) };
331
  $TMPL_VAR{contact_labels} = sub { $_[0]->{"cp_name"} . ($_[0]->{cp_abteilung} ? " ($_[0]->{cp_abteilung})" : "") };
326
  $TMPL_VAR{shipto_labels}         = sub { join "; ", grep { $_ } map { $_[0]->{"shipto${_}" } } qw(name department_1 street city) };
327
  $TMPL_VAR{contact_labels}        = sub { $_[0]->{"cp_name"} . ($_[0]->{cp_abteilung} ? " ($_[0]->{cp_abteilung})" : "") };
328
  $TMPL_VAR{department_labels}     = sub { "$_[0]->{description}--$_[0]->{id}" }; 
332 329

  
333 330
  # vendor/customer
334 331
  $TMPL_VAR{vc_keys} = sub { "$_[0]->{name}--$_[0]->{id}" };

Auch abrufbar als: Unified diff