sub post_payment {
$lxdebug->enter_sub();
for $i (1 .. $form->{paidaccounts}) {
- if ($form->{"paid_$i"}) {
+ if ($form->parse_amount(\%myconfig, $form->{"paid_$i"})) {
$datepaid = $form->datetonum($form->{"datepaid_$i"}, \%myconfig);
$form->isblank("datepaid_$i", $locale->text('Payment date missing!'));
- $form->error($locale->text('Zero amount posting!')) if !$form->parse_amount(\%myconfig, $form->{"amount_$i"});
$form->error($locale->text('Cannot post payment for a closed period!'))
if ($datepaid <= $closedto);
$closedto = $form->datetonum($form->{closedto}, \%myconfig);
$transdate = $form->datetonum($form->{transdate}, \%myconfig);
+ $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 !$form->parse_amount(\%myconfig, $form->{amount});
- $form->error($locale->text('Cannot post transaction for a closed period!'))
- if ($transdate <= $closedto);
+ $form->error($locale->text('Zero amount posting!')) if $zero_amount_posting;
$form->isblank("exchangerate", $locale->text('Exchangerate missing!'))
if ($form->{currency} ne $form->{defaultcurrency});
$form->isblank("datepaid_$i", $locale->text('Payment date missing!'));
- $form->error($locale->text('Zero amount posting!')) if !$form->parse_amount(\%myconfig, $form->{"amount_$i"});
$form->error($locale->text('Cannot post payment for a closed period!'))
if ($datepaid <= $closedto);
sub post_payment {
$lxdebug->enter_sub();
for $i (1 .. $form->{paidaccounts}) {
- if ($form->{"paid_$i"}) {
+ if ($form->parse_amount(\%myconfig, $form->{"paid_$i"})) {
$datepaid = $form->datetonum($form->{"datepaid_$i"}, \%myconfig);
$form->isblank("datepaid_$i", $locale->text('Payment date missing!'));
- $form->error($locale->text('Zero amount posting!')) if !$form->parse_amount(\%myconfig, $form->{amount});
$form->error($locale->text('Cannot post payment for a closed period!'))
if ($datepaid <= $closedto);
$closedto = $form->datetonum($form->{closedto}, \%myconfig);
$transdate = $form->datetonum($form->{transdate}, \%myconfig);
+ $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 !$form->parse_amount(\%myconfig, $form->{amount});
- $form->error($locale->text('Cannot post transaction for a closed period!'))
- if ($transdate <= $closedto);
+ $form->error($locale->text('Zero amount posting!')) if $zero_amount_posting;
$form->isblank("exchangerate", $locale->text('Exchangerate missing!'))
if ($form->{currency} ne $form->{defaultcurrency});
$form->isblank("datepaid_$i", $locale->text('Payment date missing!'));
- $form->error($locale->text('Zero amount posting!')) if !$form->parse_amount(\%myconfig, $form->{"amount_$i"});
$form->error($locale->text('Cannot post payment for a closed period!'))
if ($datepaid <= $closedto);
'You\'ve already chosen the following limitations:' => 'Sie haben bereits die folgenden Einschränkungen vorgenommen:',
'Zeitpunkt' => 'Zeitpunkt',
'Zeitraum' => 'Zeitraum',
- 'Zero amount posting!' => 'Nullbuchung!',
+ 'Zero amount posting!' => 'Buchung ohne Wert',
'Zip, City' => 'PLZ, Ort',
'Zipcode' => 'PLZ',
'Zusatz' => 'Zusatz',
'Vendor not on file or locked!' => 'Dieser Lieferant existiert nicht oder ist gesperrt.',
'Vendor not on file!' => 'Lieferant ist nicht in der Datenbank!',
'Yes' => 'Ja',
- 'Zero amount posting!' => 'Nullbuchung!',
+ 'Zero amount posting!' => 'Buchung ohne Wert',
'bin_list' => 'Lagerliste',
'button' => '?',
'history' => 'Historie',
'Vendor not on file or locked!' => 'Dieser Lieferant existiert nicht oder ist gesperrt.',
'Vendor not on file!' => 'Lieferant ist nicht in der Datenbank!',
'Yes' => 'Ja',
- 'Zero amount posting!' => 'Nullbuchung!',
+ 'Zero amount posting!' => 'Buchung ohne Wert',
'bin_list' => 'Lagerliste',
'button' => '?',
'history' => 'Historie',
'Vendor details' => 'Lieferantendetails',
'Vendor not on file or locked!' => 'Dieser Lieferant existiert nicht oder ist gesperrt.',
'Vendor not on file!' => 'Lieferant ist nicht in der Datenbank!',
- 'Zero amount posting!' => 'Nullbuchung!',
+ 'Zero amount posting!' => 'Buchung ohne Wert',
'bin_list' => 'Lagerliste',
'button' => '?',
'invoice' => 'Rechnung',