- $form->error($locale->text('Cannot post transaction for a closed period!'))
- if ($transdate <= $closedto);
+ my $zero_amount_posting = 1;
+ for $i (1 .. $form->{rowcount}) {
+ if ($form->parse_amount(\%myconfig, $form->{"amount_$i"})) {
+ $zero_amount_posting = 0;
+ last;
+ }
+ }
+
+ $form->error($locale->text('Zero amount posting!')) if $zero_amount_posting;