Revision 590f737f
Von Thomas Kasulke vor fast 18 Jahren hinzugefügt
bin/mozilla/ar.pl | ||
---|---|---|
73 | 73 |
|
74 | 74 |
sub add { |
75 | 75 |
$lxdebug->enter_sub(); |
76 |
|
|
76 |
|
|
77 |
# saving the history |
|
78 |
if(!exists $form->{addition} && ($form->{id} ne "")) { |
|
79 |
$form->{addition} = "ADDED"; |
|
80 |
$form->save_history($form->dbconnect(\%myconfig)); |
|
81 |
} |
|
82 |
# /saving the history |
|
83 |
|
|
77 | 84 |
$form->{title} = "Add"; |
78 | 85 |
$form->{callback} = |
79 | 86 |
"$form->{script}?action=add&path=$form->{path}&login=$form->{login}&password=$form->{password}" |
... | ... | |
82 | 89 |
&create_links; |
83 | 90 |
AR->get_transdate(\%myconfig, $form); |
84 | 91 |
&display_form; |
85 |
|
|
86 | 92 |
$lxdebug->leave_sub(); |
87 | 93 |
} |
88 | 94 |
|
89 | 95 |
sub edit { |
90 | 96 |
$lxdebug->enter_sub(); |
97 |
# show history button |
|
98 |
$form->{javascript} = qq|<script type="text/javascript" src="js/show_history.js"></script>|; |
|
99 |
#/show hhistory button |
|
91 | 100 |
|
92 | 101 |
$form->{title} = "Edit"; |
93 | 102 |
|
... | ... | |
328 | 337 |
}; |
329 | 338 |
//--> |
330 | 339 |
</script>|; |
340 |
# show history button js |
|
341 |
$form->{javascript} .= qq|<script type="text/javascript" src="js/show_history.js"></script>|; |
|
342 |
#/show history button js |
|
331 | 343 |
|
332 | 344 |
$readonly = ($form->{id}) ? "readonly" : ""; |
333 | 345 |
|
... | ... | |
814 | 826 |
} |
815 | 827 |
} |
816 | 828 |
|
829 |
if ($form->{menubar}) { |
|
830 |
require "$form->{path}/menu.pl"; |
|
831 |
&menubar; |
|
832 |
} |
|
833 |
# button for saving history |
|
834 |
if($form->{id} ne "") { |
|
835 |
print qq| |
|
836 |
<input type=button class=submit onclick=set_history_window(| |
|
837 |
. $form->{id} |
|
838 |
. qq|); name=history id=history value=| |
|
839 |
. $locale->text('history') |
|
840 |
. qq|>|; |
|
841 |
} |
|
842 |
# /button for saving history |
|
817 | 843 |
print " |
818 | 844 |
</form> |
819 | 845 |
|
... | ... | |
1005 | 1031 |
exit; |
1006 | 1032 |
} |
1007 | 1033 |
|
1008 |
($creditaccno, $credittaxkey) = split /--/, $form->{AR_amountselected}; |
|
1009 |
($taxkey, $NULL) = split /--/, $form->{taxchartselected}; |
|
1010 |
($receivablesaccno, $payablestaxkey) = split /--/, $form->{ARselected}; |
|
1034 |
my ($creditaccno, $credittaxkey) = split /--/, $form->{AR_amountselected};
|
|
1035 |
my ($taxkey, $NULL) = split /--/, $form->{taxchartselected};
|
|
1036 |
my ($receivablesaccno, $payablestaxkey) = split /--/, $form->{ARselected};
|
|
1011 | 1037 |
$form->{AR}{amount_1} = $creditaccno; |
1012 | 1038 |
$form->{AR}{receivables} = $receivablesaccno; |
1013 | 1039 |
$form->{taxkey} = $taxkey; |
... | ... | |
1016 | 1042 |
unless $form->{invnumber}; |
1017 | 1043 |
|
1018 | 1044 |
$form->{id} = 0 if $form->{postasnew}; |
1019 |
|
|
1020 |
$form->redirect($locale->text('Transaction posted!')) |
|
1021 |
if (AR->post_transaction(\%myconfig, \%$form)); |
|
1045 |
if (AR->post_transaction(\%myconfig, \%$form)) { |
|
1046 |
# saving the history |
|
1047 |
if(!exists $form->{addition} && $form->{id} ne "") { |
|
1048 |
$form->{addition} = "POSTED"; |
|
1049 |
$form->save_history($form->dbconnect(\%myconfig)); |
|
1050 |
} |
|
1051 |
# /saving the history |
|
1052 |
$form->redirect($locale->text('Transaction posted!')); |
|
1053 |
} |
|
1022 | 1054 |
$form->error($locale->text('Cannot post transaction!')); |
1023 | 1055 |
|
1024 | 1056 |
$lxdebug->leave_sub(); |
... | ... | |
1028 | 1060 |
$lxdebug->enter_sub(); |
1029 | 1061 |
|
1030 | 1062 |
$form->{postasnew} = 1; |
1063 |
# saving the history |
|
1064 |
if(!exists $form->{addition} && $form->{id} ne "") { |
|
1065 |
$form->{addition} = "POSTED AS NEW"; |
|
1066 |
$form->save_history($form->dbconnect(\%myconfig)); |
|
1067 |
} |
|
1068 |
# /saving the history |
|
1031 | 1069 |
&post; |
1032 | 1070 |
|
1033 | 1071 |
$lxdebug->leave_sub(); |
... | ... | |
1085 | 1123 |
|
1086 | 1124 |
sub yes { |
1087 | 1125 |
$lxdebug->enter_sub(); |
1088 |
|
|
1089 |
$form->redirect($locale->text('Transaction deleted!')) |
|
1090 |
if (AR->delete_transaction(\%myconfig, \%$form, $spool)); |
|
1126 |
if (AR->delete_transaction(\%myconfig, \%$form, $spool)) { |
|
1127 |
# saving the history |
|
1128 |
if(!exists $form->{addition}) { |
|
1129 |
$form->{addition} = "DELETED"; |
|
1130 |
$form->save_history($form->dbconnect(\%myconfig)); |
|
1131 |
} |
|
1132 |
# /saving the history |
|
1133 |
$form->redirect($locale->text('Transaction deleted!')); |
|
1134 |
} |
|
1091 | 1135 |
$form->error($locale->text('Cannot delete transaction!')); |
1092 | 1136 |
|
1093 | 1137 |
$lxdebug->leave_sub(); |
Auch abrufbar als: Unified diff
Historie eingefügt