Revision 8c7e4493
Von Moritz Bunkus vor fast 17 Jahren hinzugefügt
bin/mozilla/ap.pl | ||
---|---|---|
79 | 79 |
sub add { |
80 | 80 |
$lxdebug->enter_sub(); |
81 | 81 |
|
82 |
$auth->assert('general_ledger'); |
|
83 |
|
|
82 | 84 |
return $lxdebug->leave_sub() if (load_draft_maybe()); |
83 | 85 |
|
84 | 86 |
$form->{title} = "Add"; |
85 | 87 |
|
86 |
$form->{callback} = |
|
87 |
"$form->{script}?action=add&login=$form->{login}&password=$form->{password}" |
|
88 |
unless $form->{callback}; |
|
88 |
$form->{callback} = "ap.pl?action=add" unless $form->{callback}; |
|
89 | 89 |
|
90 | 90 |
AP->get_transdate(\%myconfig, $form); |
91 | 91 |
$form->{initial_transdate} = $form->{transdate}; |
... | ... | |
99 | 99 |
sub edit { |
100 | 100 |
$lxdebug->enter_sub(); |
101 | 101 |
|
102 |
$auth->assert('general_ledger'); |
|
103 |
|
|
102 | 104 |
$form->{title} = "Edit"; |
103 | 105 |
|
104 | 106 |
&create_links; |
... | ... | |
110 | 112 |
sub display_form { |
111 | 113 |
$lxdebug->enter_sub(); |
112 | 114 |
|
115 |
$auth->assert('general_ledger'); |
|
116 |
|
|
113 | 117 |
&form_header; |
114 | 118 |
&form_footer; |
115 | 119 |
|
... | ... | |
119 | 123 |
sub create_links { |
120 | 124 |
$lxdebug->enter_sub(); |
121 | 125 |
|
126 |
$auth->assert('general_ledger'); |
|
127 |
|
|
122 | 128 |
$form->create_links("AP", \%myconfig, "vendor"); |
123 | 129 |
$taxincluded = $form->{taxincluded}; |
124 | 130 |
$duedate = $form->{duedate}; |
... | ... | |
174 | 180 |
sub form_header { |
175 | 181 |
$lxdebug->enter_sub(); |
176 | 182 |
|
183 |
$auth->assert('general_ledger'); |
|
184 |
|
|
177 | 185 |
$title = $form->{title}; |
178 | 186 |
$form->{title} = $locale->text("$title Accounts Payables Transaction"); |
179 | 187 |
|
... | ... | |
743 | 751 |
sub form_footer { |
744 | 752 |
$lxdebug->enter_sub(); |
745 | 753 |
|
754 |
$auth->assert('general_ledger'); |
|
755 |
|
|
746 | 756 |
print qq| |
747 | 757 |
|
748 | 758 |
<input name=callback type=hidden value="$form->{callback}"> |
749 | 759 |
<input name="gldate" type="hidden" value="| . Q($form->{gldate}) . qq|"> |
750 |
|
|
751 |
<input type=hidden name=login value=$form->{login}> |
|
752 |
<input type=hidden name=password value=$form->{password}> |
|
753 | 760 |
| |
754 | 761 |
. $cgi->hidden('-name' => 'draft_id', '-default' => [$form->{draft_id}]) |
755 | 762 |
. $cgi->hidden('-name' => 'draft_description', '-default' => [$form->{draft_description}]) |
... | ... | |
813 | 820 |
|
814 | 821 |
sub mark_as_paid { |
815 | 822 |
$lxdebug->enter_sub(); |
823 |
|
|
824 |
$auth->assert('general_ledger'); |
|
825 |
|
|
816 | 826 |
&mark_as_paid_common(\%myconfig,"ap"); |
827 |
|
|
817 | 828 |
$lxdebug->leave_sub(); |
818 | 829 |
} |
819 | 830 |
|
820 | 831 |
sub update { |
821 | 832 |
$lxdebug->enter_sub(); |
822 | 833 |
|
834 |
$auth->assert('general_ledger'); |
|
835 |
|
|
823 | 836 |
my $display = shift; |
824 | 837 |
|
825 | 838 |
$form->{invtotal} = 0; |
... | ... | |
911 | 924 |
sub post_payment { |
912 | 925 |
$lxdebug->enter_sub(); |
913 | 926 |
|
927 |
$auth->assert('general_ledger'); |
|
928 |
|
|
914 | 929 |
$form->{defaultcurrency} = $form->get_default_currency(\%myconfig); |
915 | 930 |
|
916 | 931 |
for $i (1 .. $form->{paidaccounts}) { |
... | ... | |
945 | 960 |
sub post { |
946 | 961 |
$lxdebug->enter_sub(); |
947 | 962 |
|
963 |
$auth->assert('general_ledger'); |
|
964 |
|
|
948 | 965 |
# check if there is a vendor, invoice and due date |
949 | 966 |
$form->isblank("transdate", $locale->text("Invoice Date missing!")); |
950 | 967 |
$form->isblank("duedate", $locale->text("Due Date missing!")); |
... | ... | |
1022 | 1039 |
sub post_as_new { |
1023 | 1040 |
$lxdebug->enter_sub(); |
1024 | 1041 |
|
1042 |
$auth->assert('general_ledger'); |
|
1043 |
|
|
1025 | 1044 |
$form->{postasnew} = 1; |
1026 | 1045 |
# saving the history |
1027 | 1046 |
if(!exists $form->{addition} && $form->{id} ne "") { |
... | ... | |
1038 | 1057 |
sub use_as_template { |
1039 | 1058 |
$lxdebug->enter_sub(); |
1040 | 1059 |
|
1060 |
$auth->assert('general_ledger'); |
|
1061 |
|
|
1041 | 1062 |
map { delete $form->{$_} } qw(printed emailed queued invnumber invdate deliverydate id datepaid_1 source_1 memo_1 paid_1 exchangerate_1 AP_paid_1 storno); |
1042 | 1063 |
$form->{paidaccounts} = 1; |
1043 | 1064 |
$form->{rowcount}--; |
... | ... | |
1050 | 1071 |
sub delete { |
1051 | 1072 |
$lxdebug->enter_sub(); |
1052 | 1073 |
|
1074 |
$auth->assert('general_ledger'); |
|
1075 |
|
|
1053 | 1076 |
$form->{title} = $locale->text('Confirm!'); |
1054 | 1077 |
|
1055 | 1078 |
$form->header; |
... | ... | |
1063 | 1086 |
|; |
1064 | 1087 |
|
1065 | 1088 |
foreach $key (keys %$form) { |
1089 |
next if (($key eq 'login') || ($key eq 'password') || ('' ne ref $form->{$key})); |
|
1066 | 1090 |
$form->{$key} =~ s/\"/"/g; |
1067 | 1091 |
print qq|<input type=hidden name=$key value="$form->{$key}">\n|; |
1068 | 1092 |
} |
... | ... | |
1087 | 1111 |
|
1088 | 1112 |
sub yes { |
1089 | 1113 |
$lxdebug->enter_sub(); |
1114 |
|
|
1115 |
$auth->assert('general_ledger'); |
|
1116 |
|
|
1090 | 1117 |
if (AP->delete_transaction(\%myconfig, \%$form, $spool)) { |
1091 | 1118 |
# saving the history |
1092 | 1119 |
if(!exists $form->{addition}) { |
... | ... | |
1105 | 1132 |
sub search { |
1106 | 1133 |
$lxdebug->enter_sub(); |
1107 | 1134 |
|
1135 |
$auth->assert('general_ledger | vendor_invoice_edit'); |
|
1136 |
|
|
1108 | 1137 |
# setup vendor selection |
1109 | 1138 |
$form->all_vc(\%myconfig, "vendor", "AP"); |
1110 | 1139 |
|
... | ... | |
1297 | 1326 |
|
1298 | 1327 |
<br> |
1299 | 1328 |
<input type=hidden name=nextsub value=$form->{nextsub}> |
1300 |
<input type=hidden name=login value=$form->{login}> |
|
1301 |
<input type=hidden name=password value=$form->{password}> |
|
1302 | 1329 |
|
1303 | 1330 |
<input class=submit type=submit name=action value="| |
1304 | 1331 |
. $locale->text('Continue') . qq|"> |
... | ... | |
1332 | 1359 |
sub ap_transactions { |
1333 | 1360 |
$lxdebug->enter_sub(); |
1334 | 1361 |
|
1362 |
$auth->assert('general_ledger | vendor_invoice_edit'); |
|
1363 |
|
|
1335 | 1364 |
($form->{vendor}, $form->{vendor_id}) = split(/--/, $form->{vendor}); |
1336 | 1365 |
|
1337 | 1366 |
$form->{sort} ||= 'transdate'; |
... | ... | |
1491 | 1520 |
sub storno { |
1492 | 1521 |
$lxdebug->enter_sub(); |
1493 | 1522 |
|
1523 |
$auth->assert('general_ledger'); |
|
1524 |
|
|
1494 | 1525 |
if (IS->has_storno(\%myconfig, $form, 'ap')) { |
1495 | 1526 |
$form->{title} = $locale->text("Cancel Accounts Payables Transaction"); |
1496 | 1527 |
$form->error($locale->text("Transaction has already been cancelled!")); |
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.