X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/53d05e1f806b560e2ed3bed2cc540310aaed7d47..b9d025079a0ea00235e47c249a1d00dde90cb3cb:/SL/Form.pm diff --git a/SL/Form.pm b/SL/Form.pm index e597786ec..9209f3a73 100644 --- a/SL/Form.pm +++ b/SL/Form.pm @@ -91,7 +91,8 @@ END { sub disconnect_standard_dbh { return unless $standard_dbh; - $standard_dbh->disconnect(); + + $standard_dbh->rollback(); undef $standard_dbh; } @@ -957,6 +958,8 @@ sub parse_amount { sub round_amount { my ($self, $amount, $places) = @_; + return 0 if !defined $amount; + # We use Perl's knowledge of string representation for # rounding. First, convert the floating point number to a string # with a high number of places. Then split the string on the decimal @@ -1123,7 +1126,7 @@ sub parse_template { if ($self->{media} eq 'email') { - my $mail = new Mailer; + my $mail = Mailer->new; map { $mail->{$_} = $self->{$_} } qw(cc bcc subject message version format); @@ -2916,7 +2919,6 @@ sub lastname_used { "d.description" => "department", "ct.name" => $table, "cu.name" => "currency", - "current_date + ct.terms" => "duedate", ); if ($self->{type} =~ /delivery_order/) {