Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision e077b319

Von Thomas Kasulke vor mehr als 17 Jahren hinzugefügt

  • ID e077b319257252c3a6a96e626487f6350681f0fe
  • Vorgänger a0f6a00c
  • Nachfolger 61824c45

Anpassung des Speichervorgangs der Historie. Parameter $form->{snumbers} wird erwartet.

Unterschiede anzeigen:

SL/Form.pm
2282 2282
  }
2283 2283

  
2284 2284
  my $query =
2285
    qq|INSERT INTO history_erp (trans_id, employee_id, addition, what_done) | .
2286
    qq|VALUES (?, ?, ?, ?)|;
2285
    qq|INSERT INTO history_erp (trans_id, employee_id, addition, what_done, snumbers) | .
2286
    qq|VALUES (?, ?, ?, ?, ?)|;
2287 2287
  my @values = (conv_i($self->{id}), conv_i($self->{employee_id}),
2288
                $self->{addition}, $self->{what_done});
2288
                $self->{addition}, $self->{what_done}, "$self->{snumbers}");
2289 2289
  do_query($self, $dbh, $query, @values);
2290 2290

  
2291 2291
  $main::lxdebug->leave_sub();
......
2302 2302
  my $i = 0;
2303 2303
  if ($trans_id ne "") {
2304 2304
    my $query =
2305
      qq|SELECT h.employee_id, h.itime::timestamp(0) AS itime, h.addition, h.what_done, emp.name | .
2305
      qq|SELECT h.employee_id, h.itime::timestamp(0) AS itime, h.addition, h.what_done, emp.name, h.snumbers, h.trans_id AS id | .
2306 2306
      qq|FROM history_erp h | .
2307 2307
      qq|LEFT JOIN employee emp ON (emp.id = h.employee_id) | .
2308 2308
      qq|WHERE trans_id = ? |
......
2315 2315
    while(my $hash_ref = $sth->fetchrow_hashref()) {
2316 2316
      $hash_ref->{addition} = $main::locale->text($hash_ref->{addition});
2317 2317
      $hash_ref->{what_done} = $main::locale->text($hash_ref->{what_done});
2318
      $hash_ref->{snumbers} =~ s/^.+_(.*)$/$1/g;
2318 2319
      $tempArray[$i++] = $hash_ref;
2319 2320
    }
2320
    $main::lxdebug->leave_sub() and return \@tempArray
2321
    return \@tempArray and $main::lxdebug->leave_sub()
2321 2322
      if ($i > 0 && $tempArray[0] ne "");
2322 2323
  }
2323 2324
  $main::lxdebug->leave_sub();

Auch abrufbar als: Unified diff