X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/a53233e56a9d4001b47bcf412b4bfe46910d3117..1465da30:/bin/mozilla/cp.pl diff --git a/bin/mozilla/cp.pl b/bin/mozilla/cp.pl index 553c8383f..c19cc5312 100644 --- a/bin/mozilla/cp.pl +++ b/bin/mozilla/cp.pl @@ -74,14 +74,14 @@ sub payment { } # departments - if (@{ $form->{all_departments} }) { + if (@{ $form->{all_departments} || [] }) { $form->{selectdepartment} = "\n"; $form->{department} = "$form->{department}--$form->{department_id}"; map { $form->{selectdepartment} .= "$_->{description}--$_->{id}\n" - } (@{ $form->{all_departments} }); + } (@{ $form->{all_departments} || [] }); } CP->paymentaccounts(\%myconfig, \%$form); @@ -182,16 +182,6 @@ sub form_header { # $locale->text('AR') # $locale->text('AP') - $department = qq| - - | . $locale->text('Department') . qq| - $form->{selectdepartment} - - - - -| if $form->{selectdepartment}; - $form->{jsscript} = 1; $jsscript = ""; if ($form->{jsscript}) { @@ -245,82 +235,82 @@ sub form_header { - - - - - - - | . $locale->text('All') . qq| - - - $vclabel - $vc - {vc}"}"> - {"$form->{vc}_id"}> - {vc}"}"> - - - | . $locale->text('Address') . qq| - - - - $form->{street} - - - $form->{zipcode} - - - $form->{city} - - - $form->{country} - - - - - - - - - - | . $locale->text('Memo') . qq| - - - - - - - $department - - | . $locale->text('Account') . qq| - $form->{selectaccount} - - - - - | . $locale->text('Date') . qq| + + + + + + + | . $locale->text('All') . qq| + + + $vclabel + $vc + {vc}"}) . qq|"> + {vc}_id"}) . qq|"> + {vc}"}) . qq|"> + + + | . $locale->text('Address') . qq| + + + + $form->{street} + + + $form->{zipcode} + + + $form->{city} + + + $form->{country} + + + + + + + + + + | . $locale->text('Memo') . qq| + + + + + + + $department + + | . $locale->text('Account') . qq| + $form->{selectaccount} + + + + + | . $locale->text('Date') . qq| $button1 - - - | . $locale->text('Currency') . qq| - $form->{selectcurrency} - - {oldcurrency}> - - $exchangerate - - | . $locale->text('Source') . qq| - - - - | . $locale->text('Amount') . qq| - {selectcurrency}"> + {oldcurrency}> + + $exchangerate + + | . $locale->text('Source') . qq| + + + + | . $locale->text('Amount') . qq| + - - - - + + + + @@ -632,7 +622,7 @@ sub update { } # Modified by J.Zach, see abovev - $amount += $form->{"paid_$i"}; + $amount += $form->{"paid_$i"}; } else { $form->{"paid_$i"} = ""; @@ -646,7 +636,7 @@ sub update { } # Line added by J.Zach, see above - $form->{amount}=$amount; + $form->{amount}=$amount; &form_header; &list_invoices; @@ -779,7 +769,7 @@ sub check_form { $datepaid = $form->datetonum($form->{datepaid}, \%myconfig); $form->error($locale->text('Cannot process payment for a closed period!')) - if ($datepaid <= $closedto); + if ($form->date_closed($form->{"datepaid"}, \%myconfig)); $amount = $form->parse_amount(\%myconfig, $form->{amount}); $form->{amount} = $amount;