X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FCT.pm;h=6d801d4881717b8b605adaece9eaa3fd45db404c;hb=f825091992391175a3b30072fc86e035cd28c41d;hp=b36cfa3e88bc3a55d6daf90e16331285e78d2e01;hpb=d18df453f55190d4807af324725ea82a8835d7fc;p=kivitendo-erp.git diff --git a/SL/CT.pm b/SL/CT.pm index b36cfa3e8..6d801d488 100644 --- a/SL/CT.pm +++ b/SL/CT.pm @@ -1045,7 +1045,24 @@ sub delete_shipto { my %myconfig = %main::myconfig; my $dbh = $form->get_standard_dbh(\%myconfig); - do_query($form, $dbh, qq|UPDATE contacts SET cp_cv_id = NULL WHERE cp_id = ?|, $shipto_id); + do_query($form, $dbh, qq|UPDATE shipto SET trans_id = NULL WHERE shipto_id = ?|, $shipto_id); + + $dbh->commit(); + + $main::lxdebug->leave_sub(); +} + +sub delete_contact { + $main::lxdebug->enter_sub(); + + my $self = shift; + my $cp_id = shift; + + my $form = $main::form; + my %myconfig = %main::myconfig; + my $dbh = $form->get_standard_dbh(\%myconfig); + + do_query($form, $dbh, qq|UPDATE contacts SET cp_cv_id = NULL WHERE cp_id = ?|, $cp_id); $dbh->commit();