Revision 73f6453e
Von Thomas Kasulke vor mehr als 17 Jahren hinzugefügt
SL/Form.pm | ||
---|---|---|
2477 | 2477 |
sub get_history { |
2478 | 2478 |
$main::lxdebug->enter_sub(); |
2479 | 2479 |
|
2480 |
my $self = shift(); |
|
2481 |
my $dbh = shift(); |
|
2482 |
my $trans_id = shift(); |
|
2483 |
my $restriction = shift(); |
|
2480 |
my ($self, $dbh, $trans_id, $restriction, $order) = @_; |
|
2481 |
my ($orderBy, $desc) = split(/\-\-/, $order); |
|
2482 |
$order = " ORDER BY " . ($order eq "" ? " h.itime " : ($desc == 1 ? $orderBy . " DESC " : $orderBy . " ")); |
|
2484 | 2483 |
my @tempArray; |
2485 | 2484 |
my $i = 0; |
2486 | 2485 |
if ($trans_id ne "") { |
... | ... | |
2488 | 2487 |
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 | . |
2489 | 2488 |
qq|FROM history_erp h | . |
2490 | 2489 |
qq|LEFT JOIN employee emp ON (emp.id = h.employee_id) | . |
2491 |
qq|WHERE trans_id = ? | |
|
2490 |
qq|WHERE trans_id = ? |. $order
|
|
2492 | 2491 |
. $restriction; |
2493 | 2492 |
|
2494 | 2493 |
my $sth = $dbh->prepare($query) || $self->dberror($query); |
Auch abrufbar als: Unified diff
sub get_history() an die neuen Historienmöglichkeiten angepasst