Revision 41a03969
Von Thomas Kasulke vor mehr als 17 Jahren hinzugefügt
SL/Form.pm | ||
---|---|---|
2488 | 2488 |
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 | 2489 |
qq|FROM history_erp h | . |
2490 | 2490 |
qq|LEFT JOIN employee emp ON (emp.id = h.employee_id) | . |
2491 |
qq|WHERE trans_id = ? |. $order |
|
2492 |
. $restriction; |
|
2493 |
|
|
2491 |
qq|WHERE trans_id = | . $trans_id |
|
2492 |
. $restriction . qq| | |
|
2493 |
. $order; |
|
2494 |
|
|
2494 | 2495 |
my $sth = $dbh->prepare($query) || $self->dberror($query); |
2495 | 2496 |
|
2496 |
$sth->execute($trans_id) || $self->dberror("$query ($trans_id)");
|
|
2497 |
$sth->execute() || $self->dberror("$query");
|
|
2497 | 2498 |
|
2498 | 2499 |
while(my $hash_ref = $sth->fetchrow_hashref()) { |
2499 | 2500 |
$hash_ref->{addition} = $main::locale->text($hash_ref->{addition}); |
bin/mozilla/am.pl | ||
---|---|---|
3061 | 3061 |
$restriction .= " OR addition = '" . $_ . "'"; |
3062 | 3062 |
} |
3063 | 3063 |
} |
3064 |
|
|
3065 | 3064 |
$restriction .= (($form->{transdate} ne "" && $form->{reqdate} ne "") |
3066 | 3065 |
? qq| AND st.itime::date >= '| . $form->{transdate} . qq|' AND st.itime::date <= '| . $form->{reqdate} . qq|'| |
3067 | 3066 |
: (($form->{transdate} ne "" && $form->{reqdate} eq "") |
... | ... | |
3071 | 3070 |
: "" |
3072 | 3071 |
) |
3073 | 3072 |
); |
3073 |
$restriction .= ($form->{mitarbeiter} eq "" ? "" |
|
3074 |
: ($form->{mitarbeiter} =~ /^[0-9]*$/ |
|
3075 |
? " AND employee_id = " . $form->{mitarbeiter} |
|
3076 |
: " AND employee_id = " . &get_employee_id($form->{mitarbeiter}, $dbh))); |
|
3077 |
|
|
3074 | 3078 |
my $dbh = $form->dbconnect(\%myconfig); |
3075 |
my $searchSNumber = $searchNo{$form->{'what2search'}} . qq|_| . $form->{'searchid'}; |
|
3076 |
$restriction .= ($form->{mitarbeiter} eq "" ? "" |
|
3077 |
: ($form->{mitarbeiter} =~ /^[0-9]*$/ |
|
3078 |
? " AND employee_id = " . $form->{mitarbeiter} |
|
3079 |
: " AND employee_id = " . &get_employee_id($form->{mitarbeiter}, $dbh))); |
|
3080 |
my $query = qq|SELECT trans_id AS id FROM history_erp WHERE sNumbers = '$searchSNumber' |; |
|
3079 |
my $query = qq|SELECT trans_id AS id FROM history_erp | . |
|
3080 |
($form->{'searchid'} ? |
|
3081 |
qq| WHERE snumbers = '| . $searchNo{$form->{'what2search'}} . qq|_| . $form->{'searchid'} . qq|'| : |
|
3082 |
qq| WHERE snumbers ~ '^| . $searchNo{$form->{'what2search'}} . qq|'|); |
|
3081 | 3083 |
|
3082 | 3084 |
my $sth = $dbh->prepare($query); |
3083 | 3085 |
|
3084 | 3086 |
$sth->execute() || $form->dberror($query); |
3085 |
|
|
3086 |
if($sth->fetch() <= 0) { |
|
3087 |
$sth->finish(); |
|
3088 |
my $query = qq|SELECT id FROM $search{$form->{what2search}} |
|
3089 |
WHERE $searchNo{$form->{'what2search'}} ILIKE '$form->{"searchid"}' |
|
3090 |
|; |
|
3091 |
} |
|
3092 |
$sth->execute() || $form->dberror($query); |
|
3093 |
$form->{title} = $locale->text("History Search"); |
|
3087 |
|
|
3088 |
$form->{title} = $locale->text("History Search"); |
|
3094 | 3089 |
$form->header(); |
3095 |
my $daten = ""; |
|
3096 |
while(my $hash_ref = $sth->fetchrow_hashref()){ |
|
3097 |
$daten = $form->get_history($dbh,$hash_ref->{id},$restriction,$form->{order}); |
|
3090 |
|
|
3091 |
my $i = 1; |
|
3092 |
my $daten = qq||; |
|
3093 |
while(my $hash_ref = $sth->fetchrow_hashref()){ |
|
3094 |
if($i) { |
|
3095 |
$daten .= $hash_ref->{id}; |
|
3096 |
$i = 0; |
|
3097 |
} |
|
3098 |
else { |
|
3099 |
$daten .= " OR trans_id = " . $hash_ref->{id}; |
|
3100 |
} |
|
3098 | 3101 |
} |
3099 |
$dbh->disconnect(); |
|
3102 |
|
|
3103 |
my ($sort, $sortby) = split(/\-\-/, $form->{order}); |
|
3104 |
$sort =~ s/.*\.(.*)$/$1/; |
|
3105 |
|
|
3100 | 3106 |
print $form->parse_html_template("/common/show_history", |
3101 |
{"DATEN" => $daten, |
|
3102 |
"SUCCESS" => ($daten != 0 ? 1 : 0), |
|
3103 |
"NONEWWINDOW" => 1 |
|
3107 |
{"DATEN" => $form->get_history($dbh, $daten, $restriction, $form->{order}), |
|
3108 |
"SUCCESS" => ($form->get_history($dbh, $daten, $restriction, $form->{order}) ne "0"), |
|
3109 |
"NONEWWINDOW" => 1, |
|
3110 |
uc($sort) => 1, |
|
3111 |
uc($sort)."BY" => $sortby |
|
3104 | 3112 |
}); |
3105 |
$lxdebug->leave_sub(); |
|
3113 |
$dbh->disconnect(); |
|
3114 |
$lxdebug->leave_sub(); |
|
3106 | 3115 |
} |
3107 | 3116 |
|
3108 | 3117 |
sub get_employee_id { |
bin/mozilla/common.pl | ||
---|---|---|
538 | 538 |
sub show_history { |
539 | 539 |
$lxdebug->enter_sub(); |
540 | 540 |
my $dbh = $form->dbconnect(\%myconfig); |
541 |
|
|
541 |
my ($sort, $sortby) = split(/\-\-/, $form->{order}); |
|
542 |
$sort =~ s/.*\.(.*)/$1/; |
|
543 |
|
|
542 | 544 |
$form->{title} = $locale->text("History"); |
543 | 545 |
$form->header(); |
544 | 546 |
print $form->parse_html_template( "common/show_history", { |
545 |
"DATEN" => $form->get_history($dbh,$form->{input_name}), |
|
546 |
"SUCCESS" => ($form->get_history($dbh,$form->{input_name}) ne "0") |
|
547 |
"DATEN" => $form->get_history($dbh,$form->{input_name},"",$form->{order}), |
|
548 |
"SUCCESS" => ($form->get_history($dbh,$form->{input_name}) ne "0"), |
|
549 |
uc($sort) => 1, |
|
550 |
uc($sort)."BY" => $sortby |
|
547 | 551 |
} ); |
548 | 552 |
|
549 | 553 |
$dbh->disconnect(); |
locale/de/all | ||
---|---|---|
1226 | 1226 |
'new Window' => 'neues Fenster', |
1227 | 1227 |
'none (pricegroup)' => 'keine', |
1228 | 1228 |
'number' => 'Nummer', |
1229 |
'order' => 'Reihenfolge', |
|
1229 | 1230 |
'packing_list' => 'Versandliste', |
1230 | 1231 |
'pick_list' => 'Entnahmeliste', |
1231 | 1232 |
'plural first char' => 'P', |
templates/webpages/common/search_history_de.html | ||
---|---|---|
4 | 4 |
<script type="text/javascript" src="js/jscalendar/calendar-setup.js"></script> |
5 | 5 |
<script type="text/javascript" src="js/show_am_history.js"></script> |
6 | 6 |
|
7 |
<form method="post" onSubmit="javascript:set_history_uri();"<!--action="<TMPL_VAR NAME=script ESCAPE=HTML>"-->>
|
|
7 |
<form method="post" onSubmit="javascript:set_history_uri();"> |
|
8 | 8 |
|
9 | 9 |
<input type="hidden" name="login" value="<TMPL_VAR NAME=login ESCAPE=HTML>"> |
10 | 10 |
<input type="hidden" name="password" value="<TMPL_VAR NAME=password ESCAPE=HTML>"> |
... | ... | |
70 | 70 |
var tempString = ""; |
71 | 71 |
function addForm(last, remove) { |
72 | 72 |
if(last == "INIT") { |
73 |
tempString = "<select id='selectForm'>"; |
|
73 |
tempString = "<select id='selectForm'><option></option>";
|
|
74 | 74 |
for(i=0;i<defaults.length;i++) { |
75 | 75 |
tempString += "\<option value\=\'" + defaults[i] + "\'\ onClick=\"javascript:addForm(\'" + defaults[i] + "\', " + i + ");\">" + translated[defaults[i]] + "\<\/option\>" + "\n"; |
76 | 76 |
} |
... | ... | |
100 | 100 |
document.getElementById('inputText').innerHTML += ((document.getElementById('inputText').innerHTML == "") ? ("<b>Sie haben bereits die folgenden Einschränkungen vorgenommen:</b><br>") : ("<br>")) + translated[last]; |
101 | 101 |
if(defaults.length > 0) { |
102 | 102 |
document.getElementById('einschraenkungen').value += ((document.getElementById('einschraenkungen').value == "") ? ("") : (",")) + last; |
103 |
tempString = "<select id='selectForm'>"; |
|
103 |
tempString = "<select id='selectForm'><option></option>";
|
|
104 | 104 |
for(i=0;i<defaults.length;i++) { |
105 | 105 |
tempString += "\<option value\=\'" + defaults[i] + "\'\ onClick=\"javascript:addForm(\'" + defaults[i] + "\', " + i + ");\">" + translated[defaults[i]] + "\<\/option\>" + "\n"; |
106 | 106 |
} |
templates/webpages/common/search_history_master.html | ||
---|---|---|
4 | 4 |
<script type="text/javascript" src="js/jscalendar/calendar-setup.js"></script> |
5 | 5 |
<script type="text/javascript" src="js/show_am_history.js"></script> |
6 | 6 |
|
7 |
<form method="post" onSubmit="javascript:set_history_uri();"<!--action="<TMPL_VAR NAME=script ESCAPE=HTML>"-->>
|
|
7 |
<form method="post" onSubmit="javascript:set_history_uri();"> |
|
8 | 8 |
|
9 | 9 |
<input type="hidden" name="login" value="<TMPL_VAR NAME=login ESCAPE=HTML>"> |
10 | 10 |
<input type="hidden" name="password" value="<TMPL_VAR NAME=password ESCAPE=HTML>"> |
... | ... | |
70 | 70 |
var tempString = ""; |
71 | 71 |
function addForm(last, remove) { |
72 | 72 |
if(last == "INIT") { |
73 |
tempString = "<select id='selectForm'>"; |
|
73 |
tempString = "<select id='selectForm'><option></option>";
|
|
74 | 74 |
for(i=0;i<defaults.length;i++) { |
75 | 75 |
tempString += "\<option value\=\'" + defaults[i] + "\'\ onClick=\"javascript:addForm(\'" + defaults[i] + "\', " + i + ");\">" + translated[defaults[i]] + "\<\/option\>" + "\n"; |
76 | 76 |
} |
... | ... | |
100 | 100 |
document.getElementById('inputText').innerHTML += ((document.getElementById('inputText').innerHTML == "") ? ("<b><translate>You've already chosen the following limitations:</translate></b><br>") : ("<br>")) + translated[last]; |
101 | 101 |
if(defaults.length > 0) { |
102 | 102 |
document.getElementById('einschraenkungen').value += ((document.getElementById('einschraenkungen').value == "") ? ("") : (",")) + last; |
103 |
tempString = "<select id='selectForm'>"; |
|
103 |
tempString = "<select id='selectForm'><option></option>";
|
|
104 | 104 |
for(i=0;i<defaults.length;i++) { |
105 | 105 |
tempString += "\<option value\=\'" + defaults[i] + "\'\ onClick=\"javascript:addForm(\'" + defaults[i] + "\', " + i + ");\">" + translated[defaults[i]] + "\<\/option\>" + "\n"; |
106 | 106 |
} |
templates/webpages/common/show_history_de.html | ||
---|---|---|
29 | 29 |
<table> |
30 | 30 |
<tr> |
31 | 31 |
<th class=listtop> |
32 |
<a href="javascript:orderBy('h.itime');">Zeitpunkt</a> |
|
32 |
<a href="javascript:orderBy('h.itime');">Zeitpunkt</a> <TMPL_IF NAME=ITIME><a title="Reihenfolge"><TMPL_IF NAME=ITIMEBY>∨<TMPL_ELSE>∧</TMPL_IF></a></TMPL_IF>
|
|
33 | 33 |
</th> |
34 | 34 |
<th class=listtop> |
35 |
<a href="javascript:orderBy('emp.name');">Mitarbeiter</a> |
|
35 |
<a href="javascript:orderBy('emp.name');">Mitarbeiter</a> <TMPL_IF NAME=NAME><a title="Reihenfolge"><TMPL_IF NAME=NAMEBY>∨<TMPL_ELSE>∧</TMPL_IF></a></TMPL_IF>
|
|
36 | 36 |
</th> |
37 | 37 |
<th class=listtop> |
38 |
<a href="javascript:orderBy('h.addition');">Aktion</a>
|
|
38 |
<a href="">Aktion</a> |
|
39 | 39 |
</th> |
40 | 40 |
<th class=listtop> |
41 |
<a href="javascript:orderBy('h.what_done');">Zusatz</a>
|
|
41 |
<a href="">Zusatz</a> |
|
42 | 42 |
</th> |
43 | 43 |
<th class=listtop> |
44 |
<a href="javascript:orderBy('h.trans_id');">ID-Nummer (intern)</a> |
|
44 |
<a href="javascript:orderBy('h.trans_id');">ID-Nummer (intern)</a> <TMPL_IF NAME=TRANS_ID><a title="Reihenfolge"><TMPL_IF NAME=TRANS_IDBY>∨<TMPL_ELSE>∧</TMPL_IF></a></TMPL_IF>
|
|
45 | 45 |
</th> |
46 | 46 |
<th class=listtop> |
47 |
<a href="javascript:orderBy('h.snumbers');">Buchungsnummer</a> |
|
47 |
<a href="javascript:orderBy('h.snumbers');">Buchungsnummer</a> <TMPL_IF NAME=SNUMBERS><a title="Reihenfolge"><TMPL_IF NAME=SNUMBERSBY>∨<TMPL_ELSE>∧</TMPL_IF></a></TMPL_IF>
|
|
48 | 48 |
</th> |
49 | 49 |
</tr> |
50 | 50 |
<TMPL_LOOP NAME=DATEN> |
templates/webpages/common/show_history_master.html | ||
---|---|---|
29 | 29 |
<table> |
30 | 30 |
<tr> |
31 | 31 |
<th class=listtop> |
32 |
<a href="javascript:orderBy('h.itime');"><translate>Zeitpunkt</translate></a> |
|
32 |
<a href="javascript:orderBy('h.itime');"><translate>Zeitpunkt</translate></a> <TMPL_IF NAME=ITIME><a title="<translate>order</translate>"><TMPL_IF NAME=ITIMEBY>∨<TMPL_ELSE>∧</TMPL_IF></a></TMPL_IF>
|
|
33 | 33 |
</th> |
34 | 34 |
<th class=listtop> |
35 |
<a href="javascript:orderBy('emp.name');"><translate>Mitarbeiter</translate></a> |
|
35 |
<a href="javascript:orderBy('emp.name');"><translate>Mitarbeiter</translate></a> <TMPL_IF NAME=NAME><a title="<translate>order</translate>"><TMPL_IF NAME=NAMEBY>∨<TMPL_ELSE>∧</TMPL_IF></a></TMPL_IF>
|
|
36 | 36 |
</th> |
37 | 37 |
<th class=listtop> |
38 |
<a href="javascript:orderBy('h.addition');"><translate>Aktion</translate></a>
|
|
38 |
<a href=""><translate>Aktion</translate></a> |
|
39 | 39 |
</th> |
40 | 40 |
<th class=listtop> |
41 |
<a href="javascript:orderBy('h.what_done');"><translate>Zusatz</translate></a>
|
|
41 |
<a href=""><translate>Zusatz</translate></a> |
|
42 | 42 |
</th> |
43 | 43 |
<th class=listtop> |
44 |
<a href="javascript:orderBy('h.trans_id');"><translate>ID-Nummer</translate></a> |
|
44 |
<a href="javascript:orderBy('h.trans_id');"><translate>ID-Nummer</translate></a> <TMPL_IF NAME=TRANS_ID><a title="<translate>order</translate>"><TMPL_IF NAME=TRANS_IDBY>∨<TMPL_ELSE>∧</TMPL_IF></a></TMPL_IF>
|
|
45 | 45 |
</th> |
46 | 46 |
<th class=listtop> |
47 |
<a href="javascript:orderBy('h.snumbers');"><translate>Belegnummer</translate></a> |
|
47 |
<a href="javascript:orderBy('h.snumbers');"><translate>Belegnummer</translate></a> <TMPL_IF NAME=SNUMBERS><a title="<translate>order</translate>"><TMPL_IF NAME=SNUMBERSBY>∨<TMPL_ELSE>∧</TMPL_IF></a></TMPL_IF>
|
|
48 | 48 |
</th> |
49 | 49 |
</tr> |
50 | 50 |
<TMPL_LOOP NAME=DATEN> |
Auch abrufbar als: Unified diff
Verbesserung der Suchfunktionen der Historie und Visualisierung der Sortierreihenfolge.