summaryrefslogtreecommitdiff
path: root/LedgerSMB
diff options
context:
space:
mode:
authoreinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2007-07-12 20:48:40 +0000
committereinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2007-07-12 20:48:40 +0000
commitc94d01852e47fec1f8580526fd116f5a58a71252 (patch)
tree2f2cc0b85017e56f987ca65bfff64171dd8738b1 /LedgerSMB
parent1b5560f68a8a7dcb6061bae5085a07f20b8b3da4 (diff)
Fixing bug 1751604-- fix not applicable to /trunk
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/branches/1.2@1390 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 'LedgerSMB')
-rwxr-xr-xLedgerSMB/IC.pm9
1 files changed, 5 insertions, 4 deletions
diff --git a/LedgerSMB/IC.pm b/LedgerSMB/IC.pm
index 749a94e3..32771b6b 100755
--- a/LedgerSMB/IC.pm
+++ b/LedgerSMB/IC.pm
@@ -821,14 +821,11 @@ sub delete {
my $query;
- $query = qq|DELETE FROM parts WHERE id = ?|;
- $sth = $dbh->prepare($query);
- $sth->execute( $form->{id} ) || $form->dberror($query);
-
$query = qq|DELETE FROM partstax WHERE parts_id = ?|;
$sth = $dbh->prepare($query);
$sth->execute( $form->{id} ) || $form->dberror($query);
+
if ( $form->{item} ne 'assembly' ) {
$query = qq|DELETE FROM partsvendor WHERE parts_id = ?|;
$sth = $dbh->prepare($query);
@@ -860,6 +857,10 @@ sub delete {
$sth = $dbh->prepare($query);
$sth->execute( $form->{id} ) || $form->dberror($query);
+ $query = qq|DELETE FROM parts WHERE id = ?|;
+ $sth = $dbh->prepare($query);
+ $sth->execute( $form->{id} ) || $form->dberror($query);
+
# commit
my $rc = $dbh->commit;