Revision eb8bed3f
Von Moritz Bunkus vor mehr als 17 Jahren hinzugefügt
bin/mozilla/ap.pl | ||
---|---|---|
993 | 993 |
sub post_payment { |
994 | 994 |
$lxdebug->enter_sub(); |
995 | 995 |
for $i (1 .. $form->{paidaccounts}) { |
996 |
if ($form->{"paid_$i"}) {
|
|
996 |
if ($form->parse_amount(\%myconfig, $form->{"paid_$i"})) {
|
|
997 | 997 |
$datepaid = $form->datetonum($form->{"datepaid_$i"}, \%myconfig); |
998 | 998 |
|
999 | 999 |
$form->isblank("datepaid_$i", $locale->text('Payment date missing!')); |
1000 | 1000 |
|
1001 |
$form->error($locale->text('Zero amount posting!')) if !$form->parse_amount(\%myconfig, $form->{"amount_$i"}); |
|
1002 | 1001 |
$form->error($locale->text('Cannot post payment for a closed period!')) |
1003 | 1002 |
if ($datepaid <= $closedto); |
1004 | 1003 |
|
... | ... | |
1032 | 1031 |
|
1033 | 1032 |
$closedto = $form->datetonum($form->{closedto}, \%myconfig); |
1034 | 1033 |
$transdate = $form->datetonum($form->{transdate}, \%myconfig); |
1034 |
$form->error($locale->text('Cannot post transaction for a closed period!')) if ($transdate <= $closedto); |
|
1035 |
|
|
1036 |
my $zero_amount_posting = 1; |
|
1037 |
for $i (1 .. $form->{rowcount}) { |
|
1038 |
if ($form->parse_amount(\%myconfig, $form->{"amount_$i"})) { |
|
1039 |
$zero_amount_posting = 0; |
|
1040 |
last; |
|
1041 |
} |
|
1042 |
} |
|
1035 | 1043 |
|
1036 |
$form->error($locale->text('Zero amount posting!')) if !$form->parse_amount(\%myconfig, $form->{amount}); |
|
1037 |
$form->error($locale->text('Cannot post transaction for a closed period!')) |
|
1038 |
if ($transdate <= $closedto); |
|
1044 |
$form->error($locale->text('Zero amount posting!')) if $zero_amount_posting; |
|
1039 | 1045 |
|
1040 | 1046 |
$form->isblank("exchangerate", $locale->text('Exchangerate missing!')) |
1041 | 1047 |
if ($form->{currency} ne $form->{defaultcurrency}); |
... | ... | |
1047 | 1053 |
|
1048 | 1054 |
$form->isblank("datepaid_$i", $locale->text('Payment date missing!')); |
1049 | 1055 |
|
1050 |
$form->error($locale->text('Zero amount posting!')) if !$form->parse_amount(\%myconfig, $form->{"amount_$i"}); |
|
1051 | 1056 |
$form->error($locale->text('Cannot post payment for a closed period!')) |
1052 | 1057 |
if ($datepaid <= $closedto); |
1053 | 1058 |
|
bin/mozilla/ar.pl | ||
---|---|---|
1019 | 1019 |
sub post_payment { |
1020 | 1020 |
$lxdebug->enter_sub(); |
1021 | 1021 |
for $i (1 .. $form->{paidaccounts}) { |
1022 |
if ($form->{"paid_$i"}) {
|
|
1022 |
if ($form->parse_amount(\%myconfig, $form->{"paid_$i"})) {
|
|
1023 | 1023 |
$datepaid = $form->datetonum($form->{"datepaid_$i"}, \%myconfig); |
1024 | 1024 |
|
1025 | 1025 |
$form->isblank("datepaid_$i", $locale->text('Payment date missing!')); |
1026 | 1026 |
|
1027 |
$form->error($locale->text('Zero amount posting!')) if !$form->parse_amount(\%myconfig, $form->{amount}); |
|
1028 | 1027 |
$form->error($locale->text('Cannot post payment for a closed period!')) |
1029 | 1028 |
if ($datepaid <= $closedto); |
1030 | 1029 |
|
... | ... | |
1057 | 1056 |
|
1058 | 1057 |
$closedto = $form->datetonum($form->{closedto}, \%myconfig); |
1059 | 1058 |
$transdate = $form->datetonum($form->{transdate}, \%myconfig); |
1059 |
$form->error($locale->text('Cannot post transaction for a closed period!')) if ($transdate <= $closedto); |
|
1060 |
|
|
1061 |
my $zero_amount_posting = 1; |
|
1062 |
for $i (1 .. $form->{rowcount}) { |
|
1063 |
if ($form->parse_amount(\%myconfig, $form->{"amount_$i"})) { |
|
1064 |
$zero_amount_posting = 0; |
|
1065 |
last; |
|
1066 |
} |
|
1067 |
} |
|
1060 | 1068 |
|
1061 |
$form->error($locale->text('Zero amount posting!')) if !$form->parse_amount(\%myconfig, $form->{amount}); |
|
1062 |
$form->error($locale->text('Cannot post transaction for a closed period!')) |
|
1063 |
if ($transdate <= $closedto); |
|
1069 |
$form->error($locale->text('Zero amount posting!')) if $zero_amount_posting; |
|
1064 | 1070 |
|
1065 | 1071 |
$form->isblank("exchangerate", $locale->text('Exchangerate missing!')) |
1066 | 1072 |
if ($form->{currency} ne $form->{defaultcurrency}); |
... | ... | |
1073 | 1079 |
|
1074 | 1080 |
$form->isblank("datepaid_$i", $locale->text('Payment date missing!')); |
1075 | 1081 |
|
1076 |
$form->error($locale->text('Zero amount posting!')) if !$form->parse_amount(\%myconfig, $form->{"amount_$i"}); |
|
1077 | 1082 |
$form->error($locale->text('Cannot post payment for a closed period!')) |
1078 | 1083 |
if ($datepaid <= $closedto); |
1079 | 1084 |
|
locale/de/all | ||
---|---|---|
1189 | 1189 |
'You\'ve already chosen the following limitations:' => 'Sie haben bereits die folgenden Einschränkungen vorgenommen:', |
1190 | 1190 |
'Zeitpunkt' => 'Zeitpunkt', |
1191 | 1191 |
'Zeitraum' => 'Zeitraum', |
1192 |
'Zero amount posting!' => 'Nullbuchung!',
|
|
1192 |
'Zero amount posting!' => 'Buchung ohne Wert',
|
|
1193 | 1193 |
'Zip, City' => 'PLZ, Ort', |
1194 | 1194 |
'Zipcode' => 'PLZ', |
1195 | 1195 |
'Zusatz' => 'Zusatz', |
locale/de/ap | ||
---|---|---|
166 | 166 |
'Vendor not on file or locked!' => 'Dieser Lieferant existiert nicht oder ist gesperrt.', |
167 | 167 |
'Vendor not on file!' => 'Lieferant ist nicht in der Datenbank!', |
168 | 168 |
'Yes' => 'Ja', |
169 |
'Zero amount posting!' => 'Nullbuchung!',
|
|
169 |
'Zero amount posting!' => 'Buchung ohne Wert',
|
|
170 | 170 |
'bin_list' => 'Lagerliste', |
171 | 171 |
'button' => '?', |
172 | 172 |
'history' => 'Historie', |
locale/de/ar | ||
---|---|---|
173 | 173 |
'Vendor not on file or locked!' => 'Dieser Lieferant existiert nicht oder ist gesperrt.', |
174 | 174 |
'Vendor not on file!' => 'Lieferant ist nicht in der Datenbank!', |
175 | 175 |
'Yes' => 'Ja', |
176 |
'Zero amount posting!' => 'Nullbuchung!',
|
|
176 |
'Zero amount posting!' => 'Buchung ohne Wert',
|
|
177 | 177 |
'bin_list' => 'Lagerliste', |
178 | 178 |
'button' => '?', |
179 | 179 |
'history' => 'Historie', |
locale/de/cp | ||
---|---|---|
107 | 107 |
'Vendor details' => 'Lieferantendetails', |
108 | 108 |
'Vendor not on file or locked!' => 'Dieser Lieferant existiert nicht oder ist gesperrt.', |
109 | 109 |
'Vendor not on file!' => 'Lieferant ist nicht in der Datenbank!', |
110 |
'Zero amount posting!' => 'Nullbuchung!',
|
|
110 |
'Zero amount posting!' => 'Buchung ohne Wert',
|
|
111 | 111 |
'bin_list' => 'Lagerliste', |
112 | 112 |
'button' => '?', |
113 | 113 |
'invoice' => 'Rechnung', |
Auch abrufbar als: Unified diff
Die Überprüfungen, ob eine Nullbuchung vom Benutzer durchgeführt wurde, war falsch -- sie überprüfte falsche Variablen und auch falsche Umstände. Außerdem werden die einzelnen Zeilen der Zahlungsein- und -ausgänge eh schon vorher mit if() abgefragt. Fix für Bug 651.