Revision ec93aab7
Von Thomas Kasulke vor fast 18 Jahren hinzugefügt
bin/mozilla/ir.pl | ||
---|---|---|
56 | 56 |
|
57 | 57 |
sub edit { |
58 | 58 |
$lxdebug->enter_sub(); |
59 |
|
|
59 |
|
|
60 |
# show history button |
|
61 |
$form->{javascript} = qq|<script type=text/javascript src=js/show_history.js></script>|; |
|
62 |
#/show hhistory button |
|
63 |
|
|
60 | 64 |
$form->{title} = $locale->text('Edit Vendor Invoice'); |
61 | 65 |
|
62 | 66 |
&invoice_links; |
... | ... | |
810 | 814 |
<input type=hidden name=path value=$form->{path}> |
811 | 815 |
<input type=hidden name=login value=$form->{login}> |
812 | 816 |
<input type=hidden name=password value=$form->{password}> |
817 |
|; |
|
818 |
# button for saving history |
|
819 |
if($form->{id} ne "") { |
|
820 |
print qq| |
|
821 |
<input type=button class=submit onclick=set_history_window(| |
|
822 |
. $form->{id} |
|
823 |
. qq|); name=history id=history value=| |
|
824 |
. $locale->text('history') |
|
825 |
. qq|>|; |
|
826 |
} |
|
827 |
# /button for saving history |
|
813 | 828 |
|
814 |
</form> |
|
829 |
print qq|</form>
|
|
815 | 830 |
|
816 | 831 |
</body> |
817 | 832 |
</html> |
... | ... | |
989 | 1004 |
|
990 | 1005 |
($form->{AP}) = split /--/, $form->{AP}; |
991 | 1006 |
($form->{AP_paid}) = split /--/, $form->{AP_paid}; |
992 |
$form->redirect($locale->text(' Payment posted!')) |
|
993 |
if (IR->post_payment(\%myconfig, \%$form)); |
|
1007 |
if (IR->post_payment(\%myconfig, \%$form)){ |
|
1008 |
|
|
1009 |
if(!exists $form->{addition} && $form->{id} ne "") { |
|
1010 |
# saving the history |
|
1011 |
$form->{addition} = "PAYMENT POSTED"; |
|
1012 |
$form->save_history($form->dbconnect(\%myconfig)); |
|
1013 |
# /saving the history |
|
1014 |
$form->redirect($locale->text(' Payment posted!')); |
|
1015 |
} |
|
1016 |
} |
|
994 | 1017 |
$form->error($locale->text('Cannot post payment!')); |
995 | 1018 |
|
996 | 1019 |
|
... | ... | |
1045 | 1068 |
|
1046 | 1069 |
|
1047 | 1070 |
relink_accounts(); |
1048 |
$form->redirect( $locale->text('Invoice') |
|
1071 |
if (IR->post_invoice(\%myconfig, \%$form)){ |
|
1072 |
# saving the history |
|
1073 |
if(!exists $form->{addition} && $form->{id} ne "") { |
|
1074 |
$form->{addition} = "POSTED"; |
|
1075 |
#$form->{what_done} = $locale->text("Rechnungsnummer") . qq| | . $form->{invnumber}; |
|
1076 |
$form->save_history($form->dbconnect(\%myconfig)); |
|
1077 |
} |
|
1078 |
# /saving the history |
|
1079 |
$form->redirect( $locale->text('Invoice') |
|
1049 | 1080 |
. " $form->{invnumber} " |
1050 |
. $locale->text('posted!')) |
|
1051 |
if (IR->post_invoice(\%myconfig, \%$form));
|
|
1081 |
. $locale->text('posted!'));
|
|
1082 |
}
|
|
1052 | 1083 |
$form->error($locale->text('Cannot post invoice!')); |
1053 | 1084 |
|
1054 | 1085 |
$lxdebug->leave_sub(); |
... | ... | |
1058 | 1089 |
$lxdebug->enter_sub(); |
1059 | 1090 |
|
1060 | 1091 |
$form->header; |
1061 |
|
|
1062 | 1092 |
print qq| |
1063 | 1093 |
<body> |
1064 | 1094 |
|
... | ... | |
1090 | 1120 |
|
1091 | 1121 |
sub yes { |
1092 | 1122 |
$lxdebug->enter_sub(); |
1093 |
|
|
1094 |
$form->redirect($locale->text('Invoice deleted!')) |
|
1095 |
if (IR->delete_invoice(\%myconfig, \%$form)); |
|
1123 |
if (IR->delete_invoice(\%myconfig, \%$form)) { |
|
1124 |
# saving the history |
|
1125 |
if(!exists $form->{addition}) { |
|
1126 |
$form->{addition} = "DELETED"; |
|
1127 |
$form->save_history($form->dbconnect(\%myconfig)); |
|
1128 |
} |
|
1129 |
# /saving the history |
|
1130 |
$form->redirect($locale->text('Invoice deleted!')); |
|
1131 |
} |
|
1096 | 1132 |
$form->error($locale->text('Cannot delete invoice!')); |
1097 | 1133 |
|
1098 | 1134 |
$lxdebug->leave_sub(); |
Auch abrufbar als: Unified diff
Historie eingefügt