]> wagnertech.de Git - kivitendo-erp.git/blobdiff - SL/FU.pm
DO: get_shipped_qty entfernt
[kivitendo-erp.git] / SL / FU.pm
index b98687f3e69c3096b32a557ead6f109dbf75f14e..a2faf62f37a58a6b36053e0fce007a89245a06a8 100644 (file)
--- a/SL/FU.pm
+++ b/SL/FU.pm
@@ -81,7 +81,8 @@ sub finish {
 
   SL::DB->client->with_transaction(sub {
     do_query($form, SL::DB->client->dbh, qq|UPDATE follow_ups SET done = TRUE WHERE id = ?|, conv_i($params{id}));
 
   SL::DB->client->with_transaction(sub {
     do_query($form, SL::DB->client->dbh, qq|UPDATE follow_ups SET done = TRUE WHERE id = ?|, conv_i($params{id}));
-  });
+    1;
+  }) or do { die SL::DB->client->error };
 
   $main::lxdebug->leave_sub();
 }
 
   $main::lxdebug->leave_sub();
 }
@@ -105,7 +106,8 @@ sub delete {
     do_query($form, $dbh, qq|DELETE FROM follow_up_links WHERE follow_up_id = ?|,                         $id);
     do_query($form, $dbh, qq|DELETE FROM follow_ups      WHERE id = ?|,                                   $id);
     do_query($form, $dbh, qq|DELETE FROM notes           WHERE (trans_id = ?) AND (trans_module = 'fu')|, $id);
     do_query($form, $dbh, qq|DELETE FROM follow_up_links WHERE follow_up_id = ?|,                         $id);
     do_query($form, $dbh, qq|DELETE FROM follow_ups      WHERE id = ?|,                                   $id);
     do_query($form, $dbh, qq|DELETE FROM notes           WHERE (trans_id = ?) AND (trans_module = 'fu')|, $id);
-  });
+    1;
+  }) or do { die SL::DB->client->error };
 
   $main::lxdebug->leave_sub();
 }
 
   $main::lxdebug->leave_sub();
 }
@@ -361,6 +363,12 @@ sub link_details {
       'title' => $locale->text('Sales Invoice') . " $params{trans_info}",
     };
 
       'title' => $locale->text('Sales Invoice') . " $params{trans_info}",
     };
 
+  } elsif ($params{trans_type} eq 'purchase_invoice') {
+    $link = {
+      'url'   => 'ir.pl?action=edit&type=purchase_invoice&id=' . $params{trans_id},
+      'title' => $locale->text('Purchase Invoice') . " $params{trans_info}",
+    };
+
   } elsif ($params{trans_type} eq 'credit_note') {
     $link = {
       'url'   => 'is.pl?action=edit&type=credit_note&id=' . $params{trans_id},
   } elsif ($params{trans_type} eq 'credit_note') {
     $link = {
       'url'   => 'is.pl?action=edit&type=credit_note&id=' . $params{trans_id},
@@ -444,7 +452,8 @@ sub save_access_rights {
     }
 
     $sth->finish();
     }
 
     $sth->finish();
-  });
+    1;
+  }) or do { die SL::DB->client->error };
 
   $main::lxdebug->leave_sub();
 }
 
   $main::lxdebug->leave_sub();
 }