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 |
|
bin/mozilla/ap.pl | ||
---|---|---|
1075 | 1075 |
if (AP->post_transaction(\%myconfig, \%$form)) { |
1076 | 1076 |
# saving the history |
1077 | 1077 |
if(!exists $form->{addition} && $form->{id} ne "") { |
1078 |
$form->{snumber} = qq|invnumber_| . $form->{invnumber}; |
|
1078 | 1079 |
$form->{addition} = "POSTED"; |
1079 | 1080 |
$form->save_history($form->dbconnect(\%myconfig)); |
1080 | 1081 |
} |
... | ... | |
1093 | 1094 |
$form->{postasnew} = 1; |
1094 | 1095 |
# saving the history |
1095 | 1096 |
if(!exists $form->{addition} && $form->{id} ne "") { |
1097 |
$form->{snumber} = qq|invnumber_| . $form->{invnumber}; |
|
1096 | 1098 |
$form->{addition} = "POSTED AS NEW"; |
1097 | 1099 |
$form->save_history($form->dbconnect(\%myconfig)); |
1098 | 1100 |
} |
... | ... | |
1157 | 1159 |
if (AP->delete_transaction(\%myconfig, \%$form, $spool)) { |
1158 | 1160 |
# saving the history |
1159 | 1161 |
if(!exists $form->{addition}) { |
1162 |
$form->{snumber} = qq|invnumber_| . $form->{invnumber}; |
|
1160 | 1163 |
$form->{addition} = "DELETED"; |
1161 | 1164 |
$form->save_history($form->dbconnect(\%myconfig)); |
1162 | 1165 |
} |
bin/mozilla/ar.pl | ||
---|---|---|
79 | 79 |
|
80 | 80 |
# saving the history |
81 | 81 |
if(!exists $form->{addition} && ($form->{id} ne "")) { |
82 |
$form->{snumber} = qq|invnumber_| . $form->{invnumber}; |
|
82 | 83 |
$form->{addition} = "ADDED"; |
83 | 84 |
$form->save_history($form->dbconnect(\%myconfig)); |
84 | 85 |
} |
... | ... | |
1092 | 1093 |
if (AR->post_transaction(\%myconfig, \%$form)) { |
1093 | 1094 |
# saving the history |
1094 | 1095 |
if(!exists $form->{addition} && $form->{id} ne "") { |
1096 |
$form->{snumber} = qq|invnumber_| . $form->{invnumber}; |
|
1095 | 1097 |
$form->{addition} = "POSTED"; |
1096 | 1098 |
$form->save_history($form->dbconnect(\%myconfig)); |
1097 | 1099 |
} |
... | ... | |
1110 | 1112 |
$form->{postasnew} = 1; |
1111 | 1113 |
# saving the history |
1112 | 1114 |
if(!exists $form->{addition} && $form->{id} ne "") { |
1115 |
$form->{snumber} = qq|invnumber_| . $form->{invnumber}; |
|
1113 | 1116 |
$form->{addition} = "POSTED AS NEW"; |
1114 | 1117 |
$form->save_history($form->dbconnect(\%myconfig)); |
1115 | 1118 |
} |
... | ... | |
1174 | 1177 |
if (AR->delete_transaction(\%myconfig, \%$form, $spool)) { |
1175 | 1178 |
# saving the history |
1176 | 1179 |
if(!exists $form->{addition}) { |
1180 |
$form->{snumber} = qq|invnumber_| . $form->{invnumber}; |
|
1177 | 1181 |
$form->{addition} = "DELETED"; |
1178 | 1182 |
$form->save_history($form->dbconnect(\%myconfig)); |
1179 | 1183 |
} |
bin/mozilla/ct.pl | ||
---|---|---|
1284 | 1284 |
$form->{script} = "ap.pl"; |
1285 | 1285 |
# saving the history |
1286 | 1286 |
if(!exists $form->{addition}) { |
1287 |
$form->{snumber} = qq|invnumber_| . $form->{invnumber}; |
|
1287 | 1288 |
$form->{addition} = "SAVED"; |
1288 | 1289 |
$form->save_history($form->dbconnect(\%myconfig)); |
1289 | 1290 |
} |
... | ... | |
1298 | 1299 |
$form->{script} = "ar.pl"; |
1299 | 1300 |
# saving the history |
1300 | 1301 |
if(!exists $form->{addition}) { |
1302 |
$form->{snumber} = qq|invnumber_| . $form->{invnumber}; |
|
1301 | 1303 |
$form->{addition} = "SAVED"; |
1302 | 1304 |
$form->save_history($form->dbconnect(\%myconfig)); |
1303 | 1305 |
} |
... | ... | |
1313 | 1315 |
$form->{type} = "invoice"; |
1314 | 1316 |
# saving the history |
1315 | 1317 |
if(!exists $form->{addition}) { |
1318 |
$form->{snumber} = qq|invnumber_| . $form->{invnumber}; |
|
1316 | 1319 |
$form->{addition} = "SAVED"; |
1317 | 1320 |
$form->save_history($form->dbconnect(\%myconfig)); |
1318 | 1321 |
} |
... | ... | |
1328 | 1331 |
$form->{type} = "request_quotation"; |
1329 | 1332 |
# saving the history |
1330 | 1333 |
if(!exists $form->{addition}) { |
1334 |
$form->{snumber} = qq|ordnumber_| . $form->{ordnumber}; |
|
1331 | 1335 |
$form->{addition} = "SAVED"; |
1332 | 1336 |
$form->save_history($form->dbconnect(\%myconfig)); |
1333 | 1337 |
} |
... | ... | |
1343 | 1347 |
$form->{type} = "sales_quotation"; |
1344 | 1348 |
# saving the history |
1345 | 1349 |
if(!exists $form->{addition}) { |
1350 |
$form->{snumber} = qq|ordnumber_| . $form->{ordnumber}; |
|
1346 | 1351 |
$form->{addition} = "SAVED"; |
1347 | 1352 |
$form->save_history($form->dbconnect(\%myconfig)); |
1348 | 1353 |
} |
... | ... | |
1359 | 1364 |
($form->{db} eq 'customer') ? "sales_order" : "purchase_order"; |
1360 | 1365 |
# saving the history |
1361 | 1366 |
if(!exists $form->{addition}) { |
1367 |
$form->{snumber} = qq|ordnumber_| . $form->{ordnumber}; |
|
1362 | 1368 |
$form->{addition} = "SAVED"; |
1363 | 1369 |
$form->save_history($form->dbconnect(\%myconfig)); |
1364 | 1370 |
} |
... | ... | |
1387 | 1393 |
} |
1388 | 1394 |
# saving the history |
1389 | 1395 |
if(!exists $form->{addition}) { |
1390 |
$form->{addition} = "SAVED"; |
|
1396 |
$form->{snumber} = ($form->{"db"} eq "customer" ? qq|customernumber_| . $form->{customernumber} : qq|vendornumber_| . $form->{vendornumber}); |
|
1397 |
$form->{addition} = "SAVED"; |
|
1391 | 1398 |
$form->save_history($form->dbconnect(\%myconfig)); |
1392 | 1399 |
} |
1393 | 1400 |
# /saving the history |
... | ... | |
1423 | 1430 |
} |
1424 | 1431 |
# saving the history |
1425 | 1432 |
if(!exists $form->{addition}) { |
1433 |
$form->{snumber} = ($form->{"db"} eq "customer" ? qq|customernumber_| . $form->{customernumber} : qq|vendornumber_| . $form->{vendornumber}); |
|
1426 | 1434 |
$form->{addition} = "SAVED"; |
1427 | 1435 |
$form->save_history($form->dbconnect(\%myconfig)); |
1428 | 1436 |
} |
... | ... | |
1446 | 1454 |
$msg .= " deleted!"; |
1447 | 1455 |
# saving the history |
1448 | 1456 |
if(!exists $form->{addition}) { |
1457 |
$form->{snumber} = ($form->{"db"} eq "customer" ? qq|customernumber_| . $form->{customernumber} : qq|vendornumber_| . $form->{vendornumber}); |
|
1449 | 1458 |
$form->{addition} = "DELETED"; |
1450 | 1459 |
$form->save_history($form->dbconnect(\%myconfig)); |
1451 | 1460 |
} |
bin/mozilla/gl.pl | ||
---|---|---|
1544 | 1544 |
if (GL->delete_transaction(\%myconfig, \%$form)){ |
1545 | 1545 |
# saving the history |
1546 | 1546 |
if(!exists $form->{addition} && $form->{id} ne "") { |
1547 |
$form->{snumber} = qq|ordnumber_| . $form->{ordnumber}; |
|
1547 | 1548 |
$form->{addition} = "DELETED"; |
1548 | 1549 |
$form->save_history($form->dbconnect(\%myconfig)); |
1549 | 1550 |
} |
... | ... | |
1737 | 1738 |
undef($form->{callback}); |
1738 | 1739 |
# saving the history |
1739 | 1740 |
if(!exists $form->{addition} && $form->{id} ne "") { |
1741 |
$form->{snumber} = qq|ordnumber_| . $form->{ordnumber}; |
|
1740 | 1742 |
$form->{addition} = "SAVED"; |
1741 | 1743 |
$form->{what_done} = $locale->text("Buchungsnummer") . " = " . $form->{id}; |
1742 | 1744 |
$form->save_history($form->dbconnect(\%myconfig)); |
... | ... | |
1763 | 1765 |
$form->{storno} = 1; |
1764 | 1766 |
# saving the history |
1765 | 1767 |
if(!exists $form->{addition} && $form->{id} ne "") { |
1768 |
$form->{snumber} = qq|ordnumber_| . $form->{ordnumber}; |
|
1766 | 1769 |
$form->{addition} = "STORNO"; |
1767 | 1770 |
$form->save_history($form->dbconnect(\%myconfig)); |
1768 | 1771 |
} |
bin/mozilla/ic.pl | ||
---|---|---|
3042 | 3042 |
} |
3043 | 3043 |
# saving the history |
3044 | 3044 |
if(!exists $form->{addition}) { |
3045 |
$form->{snumber} = qq|partnumber_| . $form->{partnumber}; |
|
3045 | 3046 |
$form->{addition} = "SAVED"; |
3046 | 3047 |
$form->save_history($form->dbconnect(\%myconfig)); |
3047 | 3048 |
} |
... | ... | |
3164 | 3165 |
|
3165 | 3166 |
# saving the history |
3166 | 3167 |
if(!exists $form->{addition}) { |
3168 |
$form->{snumber} = qq|partnumber_| . $form->{partnumber}; |
|
3167 | 3169 |
$form->{addition} = "SAVED AS NEW"; |
3168 | 3170 |
$form->save_history($form->dbconnect(\%myconfig)); |
3169 | 3171 |
} |
... | ... | |
3181 | 3183 |
$lxdebug->enter_sub(); |
3182 | 3184 |
# saving the history |
3183 | 3185 |
if(!exists $form->{addition}) { |
3186 |
$form->{snumber} = qq|partnumber_| . $form->{partnumber}; |
|
3184 | 3187 |
$form->{addition} = "DELETED"; |
3185 | 3188 |
$form->save_history($form->dbconnect(\%myconfig)); |
3186 | 3189 |
} |
bin/mozilla/io.pl | ||
---|---|---|
1716 | 1716 |
call_sub($display_form); |
1717 | 1717 |
# saving the history |
1718 | 1718 |
if(!exists $form->{addition}) { |
1719 |
$form->{snumber} = qq|ordnumber_| . $form->{ordnumber}; |
|
1719 | 1720 |
$form->{addition} = "PRINTED"; |
1720 | 1721 |
$form->save_history($form->dbconnect(\%myconfig)); |
1721 | 1722 |
} |
... | ... | |
1908 | 1909 |
|
1909 | 1910 |
# saving the history |
1910 | 1911 |
if(!exists $form->{addition}) { |
1912 |
$form->{snumber} = qq|ordnumber_| . $form->{ordnumber}; |
|
1911 | 1913 |
if($form->{media} =~ /printer/) { |
1912 | 1914 |
$form->{addition} = "PRINTED"; |
1913 | 1915 |
} |
bin/mozilla/ir.pl | ||
---|---|---|
1041 | 1041 |
|
1042 | 1042 |
if(!exists $form->{addition} && $form->{id} ne "") { |
1043 | 1043 |
# saving the history |
1044 |
$form->{snumbers} = qq|invnumber|; |
|
1044 | 1045 |
$form->{addition} = "PAYMENT POSTED"; |
1045 | 1046 |
$form->save_history($form->dbconnect(\%myconfig)); |
1046 | 1047 |
# /saving the history |
... | ... | |
1104 | 1105 |
if (IR->post_invoice(\%myconfig, \%$form)){ |
1105 | 1106 |
# saving the history |
1106 | 1107 |
if(!exists $form->{addition} && $form->{id} ne "") { |
1107 |
$form->{addition} = "POSTED"; |
|
1108 |
$form->{snumbers} = qq|invnumber|; |
|
1109 |
$form->{addition} = "POSTED"; |
|
1108 | 1110 |
#$form->{what_done} = $locale->text("Rechnungsnummer") . qq| | . $form->{invnumber}; |
1109 | 1111 |
$form->save_history($form->dbconnect(\%myconfig)); |
1110 | 1112 |
} |
... | ... | |
1157 | 1159 |
if (IR->delete_invoice(\%myconfig, \%$form)) { |
1158 | 1160 |
# saving the history |
1159 | 1161 |
if(!exists $form->{addition}) { |
1162 |
$form->{snumbers} = qq|invnumber|; |
|
1160 | 1163 |
$form->{addition} = "DELETED"; |
1161 | 1164 |
$form->save_history($form->dbconnect(\%myconfig)); |
1162 | 1165 |
} |
bin/mozilla/is.pl | ||
---|---|---|
1435 | 1435 |
remove_draft() if $form->{remove_draft}; |
1436 | 1436 |
|
1437 | 1437 |
if(!exists $form->{addition}) { |
1438 |
$form->{snumbers} = qq|invnumber_| . $form->{invnumber}; |
|
1438 | 1439 |
$form->{addition} = $print_post ? "PRINTED AND POSTED" : |
1439 | 1440 |
$form->{storno} ? "STORNO" : |
1440 | 1441 |
"POSTED"; |
... | ... | |
1611 | 1612 |
if (IS->delete_invoice(\%myconfig, \%$form, $spool)) { |
1612 | 1613 |
# saving the history |
1613 | 1614 |
if(!exists $form->{addition}) { |
1615 |
$form->{snumbers} = qq|invnumber_| . $form->{invnumber}; |
|
1614 | 1616 |
$form->{addition} = "DELETED"; |
1615 | 1617 |
$form->save_history($form->dbconnect(\%myconfig)); |
1616 | 1618 |
} |
bin/mozilla/oe.pl | ||
---|---|---|
1981 | 1981 |
|
1982 | 1982 |
# saving the history |
1983 | 1983 |
if(!exists $form->{addition}) { |
1984 |
$form->{snumber} = qq|ordnumber_| . $form->{ordnumber}; |
|
1984 | 1985 |
$form->{addition} = "SAVED"; |
1985 | 1986 |
$form->save_history($form->dbconnect(\%myconfig)); |
1986 | 1987 |
} |
... | ... | |
2062 | 2063 |
|
2063 | 2064 |
# saving the history |
2064 | 2065 |
if(!exists $form->{addition}) { |
2066 |
$form->{snumber} = qq|ordnumber_| . $form->{ordnumber}; |
|
2065 | 2067 |
$form->{addition} = "SAVED"; |
2066 | 2068 |
$form->save_history($form->dbconnect(\%myconfig)); |
2067 | 2069 |
} |
... | ... | |
2133 | 2135 |
$form->redirect($msg); |
2134 | 2136 |
# saving the history |
2135 | 2137 |
if(!exists $form->{addition}) { |
2138 |
$form->{snumber} = qq|ordnumber_| . $form->{ordnumber}; |
|
2136 | 2139 |
$form->{addition} = "DELETED"; |
2137 | 2140 |
$form->save_history($form->dbconnect(\%myconfig)); |
2138 | 2141 |
} |
bin/mozilla/pe.pl | ||
---|---|---|
467 | 467 |
} |
468 | 468 |
# saving the history |
469 | 469 |
if(!exists $form->{addition} && $form->{id} ne "") { |
470 |
$form->{snumber} = qq|projectnumber_| . $form->{projectnumber}; |
|
470 | 471 |
$form->{addition} = "SAVED"; |
471 | 472 |
$form->save_history($form->dbconnect(\%myconfig)); |
472 | 473 |
} |
... | ... | |
491 | 492 |
} |
492 | 493 |
# saving the history |
493 | 494 |
if(!exists $form->{addition}) { |
495 |
$form->{snumber} = qq|projectnumber_| . $form->{projectnumber}; |
|
494 | 496 |
$form->{addition} = "DELETED"; |
495 | 497 |
$form->save_history($form->dbconnect(\%myconfig)); |
496 | 498 |
} |
bin/mozilla/rp.pl | ||
---|---|---|
2101 | 2101 |
} |
2102 | 2102 |
# saving the history |
2103 | 2103 |
if(!exists $form->{addition} && $form->{id} ne "") { |
2104 |
$form->{snumber} = qq|ordnumber_| . $form->{ordnumber}; |
|
2104 | 2105 |
$form->{addition} = "PRINTED"; |
2105 | 2106 |
$form->{what_done} = $form->{type}; |
2106 | 2107 |
$form->save_history($form->dbconnect(\%myconfig)); |
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}; )