From: Stephan Köhler Date: Thu, 29 Jun 2006 15:26:13 +0000 (+0000) Subject: Bug Ware liess sich nicht loeschen -foreign key constraint Error, X-Git-Tag: release-2.4.0^2~262 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=b5c6450b24b39a214b1d0507d9e582652655b1fb;p=kivitendo-erp.git Bug Ware liess sich nicht loeschen -foreign key constraint Error, Preisgruppenpreise wurden nicht geloescht --- diff --git a/SL/IC.pm b/SL/IC.pm index 9c60d6395..8f2cfb35b 100644 --- a/SL/IC.pm +++ b/SL/IC.pm @@ -718,6 +718,11 @@ sub delete { # connect to database, turn off AutoCommit my $dbh = $form->dbconnect_noauto($myconfig); + # first delete prices of pricegroup + my $query = qq|DELETE FROM prices + WHERE parts_id = $form->{id}|; + $dbh->do($query) || $form->dberror($query); + my $query = qq|DELETE FROM parts WHERE id = $form->{id}|; $dbh->do($query) || $form->dberror($query);