Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision b47574cb

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

  • ID b47574cb2bdd79d3c172f67d94d3eada4bd3f981
  • Vorgänger ea316187
  • Nachfolger 2ff1c023

Auftrags-Controller: Zahlungs- und Lieferbedingungen

Unterschiede anzeigen:

SL/Controller/Order.pm
137 137
    $self->js->hide('#shipto_row');
138 138
  }
139 139

  
140
  $self->order->payment_id($self->order->$cv_method->payment_id);
141
  $self->order->delivery_term_id($self->order->$cv_method->delivery_term_id);
142

  
140 143
  $self->js
141 144
    ->replaceWith('#order_cp_id',     $self->build_contact_select)
142 145
    ->replaceWith('#order_shipto_id', $self->build_shipto_select)
143 146
    ->val('#order_taxzone_id', $self->order->taxzone_id)
147
    ->val('#order_payment_id',       $self->order->payment_id)
148
    ->val('#order_delivery_term_id', $self->order->delivery_term_id)
144 149
    ->focus('#order_' . $self->cv . '_id')
145 150
    ->render($self);
146 151
}
......
400 405
sub _pre_render {
401 406
  my ($self) = @_;
402 407

  
403
  $self->{all_taxzones}  = SL::DB::Manager::TaxZone->get_all_sorted();
404
  $self->{all_employees} = SL::DB::Manager::Employee->get_all(where => [ or => [ id => $self->order->employee_id,
405
                                                                                 deleted => 0 ] ],
406
                                                              sort_by => 'name');
407
  $self->{all_salesmen}  = SL::DB::Manager::Employee->get_all(where => [ or => [ id => $self->order->salesman_id,
408
                                                                                 deleted => 0 ] ],
409
                                                              sort_by => 'name');
410
  $self->{all_projects}  = SL::DB::Manager::Project->get_all(where => [ or => [ id => $self->order->globalproject_id,
411
                                                                                active => 1 ] ],
412
                                                             sort_by => 'projectnumber');
408
  $self->{all_taxzones}        = SL::DB::Manager::TaxZone->get_all_sorted();
409
  $self->{all_employees}       = SL::DB::Manager::Employee->get_all(where => [ or => [ id => $self->order->employee_id,
410
                                                                                       deleted => 0 ] ],
411
                                                                    sort_by => 'name');
412
  $self->{all_salesmen}        = SL::DB::Manager::Employee->get_all(where => [ or => [ id => $self->order->salesman_id,
413
                                                                                       deleted => 0 ] ],
414
                                                                    sort_by => 'name');
415
  $self->{all_projects}        = SL::DB::Manager::Project->get_all(where => [ or => [ id => $self->order->globalproject_id,
416
                                                                                      active => 1 ] ],
417
                                                                   sort_by => 'projectnumber');
418
  $self->{all_payment_terms}   = SL::DB::Manager::PaymentTerm->get_all_sorted();
419
  $self->{all_delivery_terms}  = SL::DB::Manager::DeliveryTerm->get_all_sorted();
413 420

  
414 421
  $self->{current_employee_id} = SL::DB::Manager::Employee->current->id;
415 422
}

Auch abrufbar als: Unified diff