Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision dd2ee66b

Von Kivitendo Admin vor mehr als 7 Jahren hinzugefügt

  • ID dd2ee66b1d04c3644c48c32b33673463af223077
  • Vorgänger ffd06003
  • Nachfolger dec270d2

Aufträge - Abteilung per ALL_DEPARTMENTS und L.select_tag

Unterschiede anzeigen:

SL/OE.pm
138 138
    qq|WHERE (o.quotation = ?) |;
139 139
  push(@values, $quotation);
140 140

  
141
  my ($null, $split_department_id) = split /--/, $form->{department};
142
  my $department_id = $form->{department_id} || $split_department_id;
143
  if ($department_id) {
141
  if ($form->{department_id}) {
144 142
    $query .= qq| AND o.department_id = ?|;
145
    push(@values, $department_id);
143
    push(@values, $form->{department_id});
146 144
  }
147 145

  
148 146
  if ($form->{"project_id"}) {
......
722 720

  
723 721
  my $quotation = $form->{type} =~ /_order$/ ? 'f' : 't';
724 722

  
725
  ($null, $form->{department_id}) = split(/--/, $form->{department}) if $form->{department};
726

  
727 723
  # save OE record
728 724
  $query =
729 725
    qq|UPDATE oe SET
......
1282 1278

  
1283 1279
  push(@project_ids, $form->{"globalproject_id"}) if ($form->{"globalproject_id"});
1284 1280

  
1285
  $form->get_lists('price_factors' => 'ALL_PRICE_FACTORS',
1286
                   'departments'   => 'ALL_DEPARTMENTS');
1281
  $form->get_lists('price_factors' => 'ALL_PRICE_FACTORS');
1282
  $form->{ALL_DEPARTMENTS} = SL::DB::Manager::Department->get_all;
1287 1283
  my %price_factors;
1288 1284

  
1289 1285
  foreach my $pfac (@{ $form->{ALL_PRICE_FACTORS} }) {
......
1292 1288
    $pfac->{formatted_factor}    = $form->format_amount($myconfig, $pfac->{factor});
1293 1289
  }
1294 1290

  
1295
  # lookup department
1296
  foreach my $dept (@{ $form->{ALL_DEPARTMENTS} }) {
1297
    next unless $dept->{id} eq $form->{department_id};
1298
    $form->{department} = $dept->{description};
1299
    last;
1300
  }
1301

  
1302 1291
  # sort items by partsgroup
1303 1292
  for $i (1 .. $form->{rowcount}) {
1304 1293
    $partsgroup = "";

Auch abrufbar als: Unified diff