]> wagnertech.de Git - mfinanz.git/blobdiff - SL/Form.pm
Zahlungsbedingungen bei Lieferscheinen; veraltete Spalte »terms« entfernt
[mfinanz.git] / SL / Form.pm
index e597786ecf6395747e426e28824f4ed34dd5e639..9209f3a7329f8b217fb22ea2cace67a2482ea266 100644 (file)
@@ -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/) {