Revision a0f6a00c
Von Thomas Kasulke vor mehr als 17 Jahren hinzugefügt
bin/mozilla/am.pl | ||
---|---|---|
3134 | 3134 |
); |
3135 | 3135 |
|
3136 | 3136 |
my $dbh = $form->dbconnect(\%myconfig); |
3137 |
|
|
3137 |
my $searchSNumber = $searchNo{$form->{'what2search'}} . qq|_| . $form->{'searchid'}; |
|
3138 | 3138 |
$restriction .= ($form->{mitarbeiter} eq "" ? "" |
3139 | 3139 |
: ($form->{mitarbeiter} =~ /^[0-9]*$/ |
3140 | 3140 |
? " AND employee_id = " . $form->{mitarbeiter} |
3141 | 3141 |
: " AND employee_id = " . &get_employee_id($form->{mitarbeiter}, $dbh))); |
3142 |
|
|
3143 |
my $query = qq|SELECT id FROM $search{$form->{what2search}} |
|
3144 |
WHERE $searchNo{$form->{'what2search'}} ILIKE '$form->{"searchid"}' |
|
3145 |
|; |
|
3146 |
|
|
3147 |
my $sth = $dbh->prepare($query); |
|
3142 |
my $query = qq|SELECT trans_id AS id FROM history_erp WHERE sNumbers = '$searchSNumber' |; |
|
3143 |
|
|
3144 |
my $sth = $dbh->prepare($query); |
|
3148 | 3145 |
|
3149 | 3146 |
$sth->execute() || $form->dberror($query); |
3150 | 3147 |
|
3148 |
if($sth->fetch() <= 0) { |
|
3149 |
$sth->finish(); |
|
3150 |
my $query = qq|SELECT id FROM $search{$form->{what2search}} |
|
3151 |
WHERE $searchNo{$form->{'what2search'}} ILIKE '$form->{"searchid"}' |
|
3152 |
|; |
|
3153 |
} |
|
3154 |
$sth->execute() || $form->dberror($query); |
|
3151 | 3155 |
$form->{title} = $locale->text("History Search"); |
3152 | 3156 |
$form->header(); |
3153 |
|
|
3157 |
my @daten; |
|
3154 | 3158 |
while(my $hash_ref = $sth->fetchrow_hashref()){ |
3155 |
print $form->parse_html_template("/common/show_history", |
|
3156 |
{"DATEN" => $form->get_history($dbh,$hash_ref->{id},$restriction), |
|
3157 |
"SUCCESS" => ($form->get_history($dbh,$hash_ref->{id},$restriction) != 0), |
|
3158 |
"NONEWWINDOW" => "1" |
|
3159 |
} |
|
3160 |
); |
|
3161 |
} |
|
3159 |
push(@daten, $form->get_history($dbh,$hash_ref->{id},$restriction)); |
|
3160 |
} |
|
3162 | 3161 |
$dbh->disconnect(); |
3163 |
|
|
3162 |
print $form->parse_html_template("/common/show_history", |
|
3163 |
{"DATEN" => @daten, |
|
3164 |
"SUCCESS" => (length(@daten) > 0), |
|
3165 |
"NONEWWINDOW" => 1 |
|
3166 |
}); |
|
3164 | 3167 |
$lxdebug->leave_sub(); |
3165 | 3168 |
} |
3166 | 3169 |
|
Auch abrufbar als: Unified diff
history_search auf Buchungsnummern etcpp angepasst, so dass man auch gelöschte Daten in der Historie suchen kann.
Anpassungen innerhalb der Variablenübergabe:
$form->{snumbers} muß beim speichern der history gesetzt werden (z.B. $form->{snumbers} = qq|invnumber_| . $form->{invnumber}; )