Revision 7e0ea1c2
Von Udo Spallek vor etwa 17 Jahren hinzugefügt
bin/mozilla/am.pl | ||
---|---|---|
3216 | 3216 |
sub save_tax { |
3217 | 3217 |
$lxdebug->enter_sub(); |
3218 | 3218 |
|
3219 |
$form->isblank("chart_id", $locale->text('Tax-O-Matic account missing!')); |
|
3220 | 3219 |
$form->isblank("rate", $locale->text('Taxrate missing!')); |
3221 | 3220 |
$form->isblank("taxdescription", $locale->text('Taxdescription missing!')); |
3222 | 3221 |
$form->isblank("taxkey", $locale->text('Taxkey missing!')); |
3223 | 3222 |
|
3224 | 3223 |
$form->{rate} = $form->parse_amount(\%myconfig, $form->{rate}); |
3225 | 3224 |
|
3226 |
if ( $form->{rate} <= 0 || $form->{rate} >= 100 ) {
|
|
3225 |
if ( $form->{rate} < 0 || $form->{rate} >= 100 ) { |
|
3227 | 3226 |
$form->error($locale->text('Tax Percent is a number between 0 and 100')); |
3228 | 3227 |
} |
3229 | 3228 |
|
3230 |
if ( $form->{rate} <= 0.99 && $form->{rate} >= 0 ) {
|
|
3229 |
if ( $form->{rate} <= 0.99 && $form->{rate} > 0 ) { |
|
3231 | 3230 |
$form->error($locale->text('Tax Percent is a number between 0 and 100')); |
3232 | 3231 |
} |
3233 | 3232 |
|
Auch abrufbar als: Unified diff
Diverse Bugs im Zusammenhang mit Steuerautomatiken, mit chart_id=0 oder mit rate=0.
Beides sollte jedoch moeglich sein fuer Konten wie 'steuerfrei'.