Revision 8c7e4493
Von Moritz Bunkus vor fast 17 Jahren hinzugefügt
bin/mozilla/ir.pl | ||
---|---|---|
49 | 49 |
sub add { |
50 | 50 |
$lxdebug->enter_sub(); |
51 | 51 |
|
52 |
$auth->assert('vendor_invoice_edit'); |
|
53 |
|
|
52 | 54 |
return $lxdebug->leave_sub() if (load_draft_maybe()); |
53 | 55 |
|
54 | 56 |
$form->{title} = $locale->text('Add Vendor Invoice'); |
... | ... | |
63 | 65 |
sub edit { |
64 | 66 |
$lxdebug->enter_sub(); |
65 | 67 |
|
68 |
$auth->assert('vendor_invoice_edit'); |
|
69 |
|
|
66 | 70 |
# show history button |
67 | 71 |
$form->{javascript} = qq|<script type=text/javascript src=js/show_history.js></script>|; |
68 | 72 |
#/show hhistory button |
... | ... | |
79 | 83 |
sub invoice_links { |
80 | 84 |
$lxdebug->enter_sub(); |
81 | 85 |
|
86 |
$auth->assert('vendor_invoice_edit'); |
|
87 |
|
|
82 | 88 |
# create links |
83 | 89 |
$form->{webdav} = $webdav; |
84 | 90 |
$form->{jsscript} = 1; |
... | ... | |
182 | 188 |
sub prepare_invoice { |
183 | 189 |
$lxdebug->enter_sub(); |
184 | 190 |
|
191 |
$auth->assert('vendor_invoice_edit'); |
|
192 |
|
|
185 | 193 |
if ($form->{id}) { |
186 | 194 |
|
187 | 195 |
map { $form->{$_} =~ s/\"/"/g } qw(invnumber ordnumber quonumber); |
... | ... | |
215 | 223 |
sub form_header { |
216 | 224 |
$lxdebug->enter_sub(); |
217 | 225 |
|
226 |
$auth->assert('vendor_invoice_edit'); |
|
227 |
|
|
218 | 228 |
# set option selected |
219 | 229 |
foreach $item (qw(AP vendor currency department)) { |
220 | 230 |
$form->{"select$item"} =~ s/ selected//; |
... | ... | |
382 | 392 |
<input type=button name=invdate id="trigger1" value=| . $locale->text('button') . qq|></td>\n|; |
383 | 393 |
$button2 = qq| |
384 | 394 |
<td width="13"><input name=duedate id=duedate size=11 title="$myconfig{dateformat}" value="$form->{duedate}" onBlur=\"check_right_date_format(this)\"> |
385 |
<input type=button name=duedate id="trigger2" value=| . $locale->text('button') . qq|></td></td>\n|;
|
|
395 |
<input type=button name=duedate id="trigger2" value=| . $locale->text('button') . qq|></td>\n|; |
|
386 | 396 |
|
387 | 397 |
#write Trigger |
388 | 398 |
$jsscript = |
... | ... | |
499 | 509 |
sub form_footer { |
500 | 510 |
$lxdebug->enter_sub(); |
501 | 511 |
|
512 |
$auth->assert('vendor_invoice_edit'); |
|
513 |
|
|
502 | 514 |
$form->{invtotal} = $form->{invsubtotal}; |
503 | 515 |
|
504 | 516 |
if (($rows = $form->numtextrows($form->{notes}, 25, 8)) < 2) { |
... | ... | |
811 | 823 |
} |
812 | 824 |
|
813 | 825 |
print $form->write_trigger(\%myconfig, scalar(@triggers) / 3, @triggers); |
814 |
$form->hide_form(qw(rowcount callback draft_id draft_description login password));
|
|
826 |
$form->hide_form(qw(rowcount callback draft_id draft_description)); |
|
815 | 827 |
|
816 | 828 |
# button for saving history |
817 | 829 |
if($form->{id} ne "") { |
... | ... | |
840 | 852 |
|
841 | 853 |
sub mark_as_paid { |
842 | 854 |
$lxdebug->enter_sub(); |
855 |
|
|
856 |
$auth->assert('vendor_invoice_edit'); |
|
857 |
|
|
843 | 858 |
&mark_as_paid_common(\%myconfig,"ap"); |
859 |
|
|
844 | 860 |
$lxdebug->leave_sub(); |
845 | 861 |
} |
846 | 862 |
|
847 | 863 |
sub update { |
848 | 864 |
$lxdebug->enter_sub(); |
849 | 865 |
|
866 |
$auth->assert('vendor_invoice_edit'); |
|
867 |
|
|
850 | 868 |
map { $form->{$_} = $form->parse_amount(\%myconfig, $form->{$_}) } qw(exchangerate creditlimit creditremaining); |
851 | 869 |
|
852 | 870 |
&check_name(vendor); |
... | ... | |
936 | 954 |
sub storno { |
937 | 955 |
$lxdebug->enter_sub(); |
938 | 956 |
|
957 |
$auth->assert('vendor_invoice_edit'); |
|
958 |
|
|
939 | 959 |
if ($form->{storno}) { |
940 | 960 |
$form->error($locale->text('Cannot storno storno invoice!')); |
941 | 961 |
} |
... | ... | |
975 | 995 |
sub use_as_template { |
976 | 996 |
$lxdebug->enter_sub(); |
977 | 997 |
|
998 |
$auth->assert('vendor_invoice_edit'); |
|
999 |
|
|
978 | 1000 |
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); |
979 | 1001 |
$form->{paidaccounts} = 1; |
980 | 1002 |
$form->{rowcount}--; |
... | ... | |
987 | 1009 |
sub post_payment { |
988 | 1010 |
$lxdebug->enter_sub(); |
989 | 1011 |
|
1012 |
$auth->assert('vendor_invoice_edit'); |
|
1013 |
|
|
990 | 1014 |
$form->{defaultcurrency} = $form->get_default_currency(\%myconfig); |
991 | 1015 |
for $i (1 .. $form->{paidaccounts}) { |
992 | 1016 |
if ($form->{"paid_$i"}) { |
... | ... | |
1029 | 1053 |
sub post { |
1030 | 1054 |
$lxdebug->enter_sub(); |
1031 | 1055 |
|
1056 |
$auth->assert('vendor_invoice_edit'); |
|
1057 |
|
|
1032 | 1058 |
$form->{defaultcurrency} = $form->get_default_currency(\%myconfig); |
1033 | 1059 |
|
1034 | 1060 |
$form->isblank("invdate", $locale->text('Invoice Date missing!')); |
... | ... | |
1102 | 1128 |
sub delete { |
1103 | 1129 |
$lxdebug->enter_sub(); |
1104 | 1130 |
|
1131 |
$auth->assert('vendor_invoice_edit'); |
|
1132 |
|
|
1105 | 1133 |
$form->header; |
1106 | 1134 |
print qq| |
1107 | 1135 |
<body> |
... | ... | |
1113 | 1141 |
map { delete $form->{$_} } qw(action header); |
1114 | 1142 |
|
1115 | 1143 |
foreach $key (keys %$form) { |
1144 |
next if (($key eq 'login') || ($key eq 'password') || ('' ne ref $form->{$key})); |
|
1116 | 1145 |
$form->{$key} =~ s/\"/"/g; |
1117 | 1146 |
print qq|<input type=hidden name=$key value="$form->{$key}">\n|; |
1118 | 1147 |
} |
... | ... | |
1134 | 1163 |
|
1135 | 1164 |
sub yes { |
1136 | 1165 |
$lxdebug->enter_sub(); |
1166 |
|
|
1167 |
$auth->assert('vendor_invoice_edit'); |
|
1168 |
|
|
1137 | 1169 |
if (IR->delete_invoice(\%myconfig, \%$form)) { |
1138 | 1170 |
# saving the history |
1139 | 1171 |
if(!exists $form->{addition}) { |
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.