Revision f83ca506
Von Sven Schöling vor fast 16 Jahren hinzugefügt
bin/mozilla/ir.pl | ||
---|---|---|
71 | 71 |
# show history button |
72 | 72 |
$form->{javascript} = qq|<script type=text/javascript src=js/show_history.js></script>|; |
73 | 73 |
#/show hhistory button |
74 |
|
|
74 |
|
|
75 | 75 |
$form->{title} = $locale->text('Edit Vendor Invoice'); |
76 | 76 |
|
77 | 77 |
&invoice_links; |
... | ... | |
116 | 116 |
IR->get_vendor(\%myconfig, \%$form); |
117 | 117 |
IR->retrieve_invoice(\%myconfig, \%$form); |
118 | 118 |
$form->{cp_id} = $cp_id; |
119 |
|
|
119 |
|
|
120 | 120 |
if ($payment_id) { |
121 | 121 |
$form->{payment_id} = $payment_id; |
122 | 122 |
} |
... | ... | |
293 | 293 |
} |
294 | 294 |
my $globalprojectnumber = NTI($cgi->popup_menu('-name' => 'globalproject_id', '-values' => \@values, '-labels' => \%labels, |
295 | 295 |
'-default' => $form->{"globalproject_id"})); |
296 |
|
|
296 |
|
|
297 | 297 |
%labels = (); |
298 | 298 |
@values = (); |
299 | 299 |
my $i = 0; |
... | ... | |
301 | 301 |
push(@values, $item); |
302 | 302 |
$labels{$item} = $item; |
303 | 303 |
} |
304 |
|
|
304 |
|
|
305 | 305 |
$form->{currency} = $form->{defaultcurrency} unless $form->{currency}; |
306 | 306 |
my $currencies; |
307 | 307 |
if (scalar @values) { |
... | ... | |
406 | 406 |
|
407 | 407 |
#write Trigger |
408 | 408 |
$jsscript = |
409 |
Form->write_trigger(\%myconfig, "2",
|
|
409 |
Form->write_trigger(\%myconfig, "2", |
|
410 | 410 |
"invdate", "BL", "trigger1", |
411 | 411 |
"duedate", "BL", "trigger2"); |
412 | 412 |
|
... | ... | |
469 | 469 |
<td align=right> |
470 | 470 |
<table> |
471 | 471 |
$employees |
472 |
<tr>
|
|
472 |
<tr> |
|
473 | 473 |
<th align=right nowrap>| . $locale->text('Invoice Number') . qq|</th> |
474 | 474 |
<td><input name=invnumber size=11 value="$form->{invnumber}"></td> |
475 | 475 |
</tr> |
... | ... | |
869 | 869 |
. qq|">|; |
870 | 870 |
} |
871 | 871 |
# /button for saving history |
872 |
# mark_as_paid button
|
|
873 |
if($form->{id} ne "") {
|
|
874 |
print qq| <input type="submit" class="submit" name="action" value="|
|
|
872 |
# mark_as_paid button |
|
873 |
if($form->{id} ne "") { |
|
874 |
print qq| <input type="submit" class="submit" name="action" value="| |
|
875 | 875 |
. $locale->text('mark as paid') . qq|">|; |
876 | 876 |
} |
877 | 877 |
# /mark_as_paid button |
... | ... | |
889 | 889 |
|
890 | 890 |
$auth->assert('vendor_invoice_edit'); |
891 | 891 |
|
892 |
&mark_as_paid_common(\%myconfig,"ap");
|
|
892 |
&mark_as_paid_common(\%myconfig,"ap"); |
|
893 | 893 |
|
894 | 894 |
$lxdebug->leave_sub(); |
895 | 895 |
} |
... | ... | |
1006 | 1006 |
# Payments must not be recorded for the new storno invoice. |
1007 | 1007 |
$form->{paidaccounts} = 0; |
1008 | 1008 |
map { my $key = $_; delete $form->{$key} if grep { $key =~ /^$_/ } qw(datepaid_ source_ memo_ paid_ exchangerate_ AR_paid_) } keys %{ $form }; |
1009 |
|
|
1009 |
|
|
1010 | 1010 |
# saving the history |
1011 | 1011 |
if(!exists $form->{addition} && $form->{id} ne "") { |
1012 |
$form->{snumbers} = qq|invnumber_| . $form->{invnumber};
|
|
1012 |
$form->{snumbers} = qq|invnumber_| . $form->{invnumber}; |
|
1013 | 1013 |
$form->{addition} = "CANCELED"; |
1014 | 1014 |
$form->save_history($form->dbconnect(\%myconfig)); |
1015 | 1015 |
} |
1016 | 1016 |
# /saving the history |
1017 |
|
|
1017 |
|
|
1018 | 1018 |
$form->{storno_id} = $form->{id}; |
1019 | 1019 |
$form->{storno} = 1; |
1020 | 1020 |
$form->{id} = ""; |
... | ... | |
1144 | 1144 |
if (IR->post_invoice(\%myconfig, \%$form)){ |
1145 | 1145 |
# saving the history |
1146 | 1146 |
if(!exists $form->{addition} && $form->{id} ne "") { |
1147 |
$form->{snumbers} = qq|invnumber_| . $form->{invnumber};
|
|
1147 |
$form->{snumbers} = qq|invnumber_| . $form->{invnumber}; |
|
1148 | 1148 |
$form->{addition} = "POSTED"; |
1149 | 1149 |
#$form->{what_done} = $locale->text("Rechnungsnummer") . qq| | . $form->{invnumber}; |
1150 | 1150 |
$form->save_history($form->dbconnect(\%myconfig)); |
... | ... | |
1204 | 1204 |
if (IR->delete_invoice(\%myconfig, \%$form)) { |
1205 | 1205 |
# saving the history |
1206 | 1206 |
if(!exists $form->{addition}) { |
1207 |
$form->{snumbers} = qq|invnumber_| . $form->{invnumber};
|
|
1207 |
$form->{snumbers} = qq|invnumber_| . $form->{invnumber}; |
|
1208 | 1208 |
$form->{addition} = "DELETED"; |
1209 | 1209 |
$form->save_history($form->dbconnect(\%myconfig)); |
1210 | 1210 |
} |
1211 |
# /saving the history
|
|
1211 |
# /saving the history |
|
1212 | 1212 |
$form->redirect($locale->text('Invoice deleted!')); |
1213 | 1213 |
} |
1214 | 1214 |
$form->error($locale->text('Cannot delete invoice!')); |
Auch abrufbar als: Unified diff
Whitespace Purge