Revision bde667c2
Von Moritz Bunkus vor fast 18 Jahren hinzugefügt
bin/mozilla/ir.pl | ||
---|---|---|
37 | 37 |
require "$form->{path}/io.pl"; |
38 | 38 |
require "$form->{path}/arap.pl"; |
39 | 39 |
require "$form->{path}/common.pl"; |
40 |
require "bin/mozilla/drafts.pl"; |
|
40 | 41 |
|
41 | 42 |
1; |
42 | 43 |
|
... | ... | |
45 | 46 |
sub add { |
46 | 47 |
$lxdebug->enter_sub(); |
47 | 48 |
|
49 |
return $lxdebug->leave_sub() if (load_draft_maybe()); |
|
50 |
|
|
48 | 51 |
$form->{title} = $locale->text('Add Vendor Invoice'); |
49 | 52 |
|
50 | 53 |
&invoice_links; |
... | ... | |
399 | 402 |
<input type=hidden name=storno value=$form->{storno}> |
400 | 403 |
<input type=hidden name=storno_id value=$form->{storno_id}> |
401 | 404 |
|
405 |
| . ($form->{saved_message} ? qq|<p>$form->{saved_message}</p>| : "") . qq| |
|
406 |
|
|
402 | 407 |
<table width=100%> |
403 | 408 |
<tr class=listtop> |
404 | 409 |
<th class=listtop>$form->{title}</th> |
... | ... | |
803 | 808 |
|
804 | 809 |
if (!$form->{id} && ($invdate > $closedto)) { |
805 | 810 |
print qq| <input class=submit type=submit name=action value="| |
806 |
. $locale->text('Post') . qq|">|; |
|
811 |
. $locale->text('Post') . qq|"> | . |
|
812 |
NTI($cgi->submit('-name' => 'action', '-value' => $locale->text('Save draft'), |
|
813 |
'-class' => 'submit')); |
|
807 | 814 |
} |
808 | 815 |
|
809 | 816 |
print $form->write_trigger(\%myconfig, scalar(@triggers) / 3, @triggers) . |
... | ... | |
816 | 823 |
<input type=hidden name=path value=$form->{path}> |
817 | 824 |
<input type=hidden name=login value=$form->{login}> |
818 | 825 |
<input type=hidden name=password value=$form->{password}> |
819 |
|; |
|
826 |
| |
|
827 |
. $cgi->hidden('-name' => 'draft_id', '-default' => [$form->{draft_id}]) |
|
828 |
. $cgi->hidden('-name' => 'draft_description', '-default' => [$form->{draft_description}]); |
|
829 |
|
|
820 | 830 |
# button for saving history |
821 | 831 |
if($form->{id} ne "") { |
822 | 832 |
print qq| |
... | ... | |
1070 | 1080 |
|
1071 | 1081 |
|
1072 | 1082 |
relink_accounts(); |
1073 |
if (IR->post_invoice(\%myconfig, \%$form)){
|
|
1083 |
if (IR->post_invoice(\%myconfig, \%$form)){ |
|
1074 | 1084 |
# saving the history |
1075 | 1085 |
if(!exists $form->{addition} && $form->{id} ne "") { |
1076 | 1086 |
$form->{addition} = "POSTED"; |
... | ... | |
1078 | 1088 |
$form->save_history($form->dbconnect(\%myconfig)); |
1079 | 1089 |
} |
1080 | 1090 |
# /saving the history |
1091 |
remove_draft(); |
|
1081 | 1092 |
$form->redirect( $locale->text('Invoice') |
1082 | 1093 |
. " $form->{invnumber} " |
1083 | 1094 |
. $locale->text('posted!')); |
Auch abrufbar als: Unified diff
Einkaufs-, Verkaufs-, Debitoren- und Kreditorenrechnungen können als Entwurf gespeichert und später weiter bearbeitet werden. Dabei werden sie nicht gebucht.