Revision 8c7e4493
Von Moritz Bunkus vor fast 17 Jahren hinzugefügt
bin/mozilla/gl.pl | ||
---|---|---|
38 | 38 |
use SL::PE; |
39 | 39 |
use SL::ReportGenerator; |
40 | 40 |
|
41 |
require "bin/mozilla/arap.pl"; |
|
42 | 41 |
require "bin/mozilla/common.pl"; |
43 | 42 |
require "bin/mozilla/reportgenerator.pl"; |
44 | 43 |
|
... | ... | |
77 | 76 |
sub add { |
78 | 77 |
$lxdebug->enter_sub(); |
79 | 78 |
|
79 |
$auth->assert('general_ledger'); |
|
80 |
|
|
80 | 81 |
$form->{title} = "Add"; |
81 | 82 |
|
82 |
$form->{callback} = |
|
83 |
"$form->{script}?action=add&login=$form->{login}&password=$form->{password}" |
|
84 |
unless $form->{callback}; |
|
83 |
$form->{callback} = "gl.pl?action=add" unless $form->{callback}; |
|
85 | 84 |
|
86 | 85 |
# we use this only to set a default date |
87 | 86 |
GL->transaction(\%myconfig, \%$form); |
... | ... | |
119 | 118 |
sub prepare_transaction { |
120 | 119 |
$lxdebug->enter_sub(); |
121 | 120 |
|
121 |
$auth->assert('general_ledger'); |
|
122 |
|
|
122 | 123 |
GL->transaction(\%myconfig, \%$form); |
123 | 124 |
|
124 | 125 |
map { |
... | ... | |
191 | 192 |
sub edit { |
192 | 193 |
$lxdebug->enter_sub(); |
193 | 194 |
|
195 |
$auth->assert('general_ledger'); |
|
196 |
|
|
194 | 197 |
prepare_transaction(); |
195 | 198 |
|
196 | 199 |
$form->{title} = "Edit"; |
... | ... | |
208 | 211 |
sub search { |
209 | 212 |
$lxdebug->enter_sub(); |
210 | 213 |
|
214 |
$auth->assert('general_ledger'); |
|
215 |
|
|
211 | 216 |
$form->{title} = $locale->text('Journal'); |
212 | 217 |
|
213 | 218 |
$form->all_departments(\%myconfig); |
... | ... | |
281 | 286 |
print qq| |
282 | 287 |
<body onLoad="$onload"> |
283 | 288 |
|
284 |
<form method=post action=$form->{script}>
|
|
289 |
<form method=post action=gl.pl>
|
|
285 | 290 |
|
286 | 291 |
<input type=hidden name=sort value=transdate> |
287 | 292 |
|
... | ... | |
382 | 387 |
|
383 | 388 |
<input type=hidden name=nextsub value=generate_report> |
384 | 389 |
|
385 |
<input type=hidden name=login value=$form->{login}> |
|
386 |
<input type=hidden name=password value=$form->{password}> |
|
387 |
|
|
388 | 390 |
<br> |
389 | 391 |
<input class=submit type=submit name=action value="| |
390 | 392 |
. $locale->text('Continue') . qq|"> |
... | ... | |
415 | 417 |
sub generate_report { |
416 | 418 |
$lxdebug->enter_sub(); |
417 | 419 |
|
420 |
$auth->assert('general_ledger'); |
|
421 |
|
|
418 | 422 |
$form->{sort} ||= "transdate"; |
419 | 423 |
|
420 | 424 |
GL->all_transactions(\%myconfig, \%$form); |
... | ... | |
639 | 643 |
sub update { |
640 | 644 |
$lxdebug->enter_sub(); |
641 | 645 |
|
646 |
$auth->assert('general_ledger'); |
|
647 |
|
|
642 | 648 |
$form->{oldtransdate} = $form->{transdate}; |
643 | 649 |
|
644 | 650 |
my @a = (); |
... | ... | |
745 | 751 |
my ($init) = @_; |
746 | 752 |
$lxdebug->enter_sub(); |
747 | 753 |
|
754 |
$auth->assert('general_ledger'); |
|
755 |
|
|
748 | 756 |
&form_header($init); |
749 | 757 |
|
750 | 758 |
# for $i (1 .. $form->{rowcount}) { |
... | ... | |
763 | 771 |
my ($init) = @_; |
764 | 772 |
$lxdebug->enter_sub(); |
765 | 773 |
|
774 |
$auth->assert('general_ledger'); |
|
775 |
|
|
766 | 776 |
$form->{debit_1} = 0 if !$form->{"debit_1"}; |
767 | 777 |
$form->{totaldebit} = 0; |
768 | 778 |
$form->{totalcredit} = 0; |
... | ... | |
955 | 965 |
sub form_header { |
956 | 966 |
my ($init) = @_; |
957 | 967 |
$lxdebug->enter_sub(); |
968 |
|
|
969 |
$auth->assert('general_ledger'); |
|
970 |
|
|
958 | 971 |
$title = $form->{title}; |
959 | 972 |
$form->{title} = $locale->text("$title General Ledger Transaction"); |
960 | 973 |
$readonly = ($form->{id}) ? "readonly" : ""; |
... | ... | |
1055 | 1068 |
print qq| |
1056 | 1069 |
<body onLoad="fokus()"> |
1057 | 1070 |
|
1058 |
<form method=post name="gl" action=$form->{script}>
|
|
1071 |
<form method=post name="gl" action=gl.pl>
|
|
1059 | 1072 |
|; |
1060 | 1073 |
|
1061 | 1074 |
$form->hide_form(qw(id closedto locked storno storno_id previous_id previous_gldate)); |
... | ... | |
1189 | 1202 |
|
1190 | 1203 |
sub form_footer { |
1191 | 1204 |
$lxdebug->enter_sub(); |
1205 |
|
|
1206 |
$auth->assert('general_ledger'); |
|
1207 |
|
|
1192 | 1208 |
($dec) = ($form->{totaldebit} =~ /\.(\d+)/); |
1193 | 1209 |
$dec = length $dec; |
1194 | 1210 |
$decimalplaces = ($dec > 2) ? $dec : 2; |
... | ... | |
1210 | 1226 |
</tr> |
1211 | 1227 |
</table> |
1212 | 1228 |
|
1213 |
<input type=hidden name=login value=$form->{login}> |
|
1214 |
<input type=hidden name=password value=$form->{password}> |
|
1215 |
|
|
1216 | 1229 |
<input name=callback type=hidden value="$form->{callback}"> |
1217 | 1230 |
|
1218 | 1231 |
<br> |
... | ... | |
1260 | 1273 |
print qq| |
1261 | 1274 |
<body> |
1262 | 1275 |
|
1263 |
<form method=post action=$form->{script}>
|
|
1276 |
<form method=post action=gl.pl>
|
|
1264 | 1277 |
|; |
1265 | 1278 |
|
1266 | 1279 |
map { $form->{$_} =~ s/\"/"/g } qw(reference description); |
... | ... | |
1268 | 1281 |
delete $form->{header}; |
1269 | 1282 |
|
1270 | 1283 |
foreach $key (keys %$form) { |
1284 |
next if (($key eq 'login') || ($key eq 'password') || ('' ne ref $form->{$key})); |
|
1271 | 1285 |
print qq|<input type="hidden" name="$key" value="$form->{$key}">\n|; |
1272 | 1286 |
} |
1273 | 1287 |
|
... | ... | |
1464 | 1478 |
sub post { |
1465 | 1479 |
$lxdebug->enter_sub(); |
1466 | 1480 |
|
1481 |
$auth->assert('general_ledger'); |
|
1482 |
|
|
1467 | 1483 |
$form->{title} = $locale->text("$form->{title} General Ledger Transaction"); |
1468 | 1484 |
$form->{storno} = 0; |
1469 | 1485 |
|
... | ... | |
1478 | 1494 |
sub post_as_new { |
1479 | 1495 |
$lxdebug->enter_sub(); |
1480 | 1496 |
|
1497 |
$auth->assert('general_ledger'); |
|
1498 |
|
|
1481 | 1499 |
$form->{id} = 0; |
1482 | 1500 |
&add; |
1483 | 1501 |
$lxdebug->leave_sub(); |
... | ... | |
1487 | 1505 |
sub storno { |
1488 | 1506 |
$lxdebug->enter_sub(); |
1489 | 1507 |
|
1508 |
$auth->assert('general_ledger'); |
|
1509 |
|
|
1490 | 1510 |
# don't cancel cancelled transactions |
1491 | 1511 |
if (IS->has_storno(\%myconfig, $form, 'gl')) { |
1492 | 1512 |
$form->{title} = $locale->text("Cancel Accounts Receivables Transaction"); |
... | ... | |
1508 | 1528 |
$lxdebug->leave_sub(); |
1509 | 1529 |
} |
1510 | 1530 |
|
1531 |
sub continue { |
|
1532 |
call_sub($form->{nextsub}); |
|
1533 |
} |
Auch abrufbar als: Unified diff
Umstellung der Benutzerverwaltung von Dateien im Verzeichnis "users" auf die Verwendung einer Authentifizierungsdatenbank.
Es ist erforderlich, die Dateien doc/UPGRADE und doc/INSTALL/index.html zu lesen und die angesprochenen Punkte auszuführen, um nach einem Upgrade weiter arbeiten zu können.