SL::DB->client->with_transaction(sub {
$query = qq|DELETE FROM leads WHERE id = ?|;
do_query($form, SL::DB->client->dbh, $query, $form->{id});
- });
+ 1;
+ }) or do { die SL::DB->client->error };
$main::lxdebug->leave_sub();
}
") VALUES (?, ?, ?, ?, ?, ?)";
}
do_query($form, $dbh, $query, @values);
- });
+ 1;
+ }) or do { die SL::DB->client->error };
$main::lxdebug->leave_sub();
}
$query = "DELETE FROM language WHERE id = ?";
do_query($form, $dbh, $query, $form->{"id"});
- });
+ 1;
+ }) or do { die SL::DB->client->error };
$main::lxdebug->leave_sub();
}
# set close in defaults
do_query($form, $dbh, $query, @values);
- });
+ 1;
+ }) or do { die SL::DB->client->error };
$main::lxdebug->leave_sub();
}
}
$sth->finish();
}
- });
+ 1;
+ }) or do { die SL::DB->client->error };
$main::lxdebug->leave_sub();
}
SL::DB->client->with_transaction(sub {
$query = qq|DELETE FROM tax WHERE id = ?|;
do_query($form, SL::DB->client->dbh, $query, $form->{id});
- });
+ 1;
+ }) or do { die SL::DB->client->error };
$main::lxdebug->leave_sub();
}
}
do_query($form, $dbh, $query, @values);
- });
+ 1;
+ }) or do { die SL::DB->client->error };
$main::lxdebug->leave_sub();
}
SL::DB->client->with_transaction(sub {
do_query($form, SL::DB->client->dbh, qq|DELETE FROM price_factors WHERE id = ?|, conv_i($form->{id}));
- });
+ 1;
+ }) or do { die SL::DB->client->error };
$main::lxdebug->leave_sub();
}
$sth->finish();
}
- });
+ 1;
+ }) or do { die SL::DB->client->error };
$main::lxdebug->leave_sub();
}
}
$sth->finish();
- });
+ 1;
+ }) or do { die SL::DB->client->error };
$main::lxdebug->leave_sub();
}
SL::DB->client->with_transaction(sub {
my $query = qq|DELETE FROM ap WHERE id = ?|;
do_query($form, SL::DB->client->dbh, $query, $form->{id});
- });
+ 1;
+ }) or do { die SL::DB->client->error };
$main::lxdebug->leave_sub();
# acc_trans entries are deleted by database triggers.
my $query = qq|DELETE FROM ar WHERE id = ?|;
do_query($form, SL::DB->client->dbh, $query, $form->{id});
- });
+ 1;
+ }) or do { die SL::DB->client->error };
$main::lxdebug->leave_sub();
SL::DB->client->with_transaction(sub {
my $query = qq|UPDATE oe SET closed = TRUE WHERE id IN (| . join(', ', ('?') x scalar @close_oe_ids) . qq|)|;
do_query($form, $dbh, $query, @close_oe_ids);
- });
+ 1;
+ }) or do { die SL::DB->client->error };
}
$main::lxdebug->leave_sub();
$h_taxkey_only->finish();
$h_taxkey_chart_id->finish();
- });
+ 1;
+ }) or do { die SL::DB->client->error };
}
$main::lxdebug->leave_sub();
}
$sth->finish();
- });
+ 1;
+ }) or do { die SL::DB->client->error };
}
$main::lxdebug->leave_sub();
$h_taxkey_only->finish();
$h_taxkey_chart->finish();
$h_transdate->finish();
- });
+ 1;
+ }) or do { die SL::DB->client->error };
$main::lxdebug->leave_sub();
}
do_query($form, $dbh, qq|DELETE FROM ap WHERE id = ?|, conv_i($params{trans_id}));
do_query($form, $dbh, qq|DELETE FROM gl WHERE id = ?|, conv_i($params{trans_id}));
do_query($form, $dbh, qq|DELETE FROM acc_trans WHERE trans_id = ?|, conv_i($params{trans_id}));
- });
+ 1;
+ }) or do { die SL::DB->client->error };
$main::lxdebug->leave_sub();
}
unlink(qq|$spool/$form->{"spoolfile_$i"}|);
}
}
- });
+ 1;
+ }) or do { die SL::DB->client->error };
$main::lxdebug->leave_sub();
return 1;
do_query($form, $dbh, qq|UPDATE $table SET intnotes = ? WHERE id = ?|, $intnotes, $form->{id});
$form->save_status($dbh);
- });
+ 1;
+ }) or do { die SL::DB->client->error };
$main::lxdebug->leave_sub();
}
my $query = "INSERT INTO datev (" . join(', ', @columns) . ") VALUES (" . join(', ', ('?') x @columns) . ")";
do_query($::form, $self->dbh, $query, map { $data->{$_} } @columns);
- });
+ 1;
+ }) or do { die SL::DB->client->error };
}
sub export {
foreach my $oe_id (keys %ship) {
do_query($form, $dbh,"UPDATE oe SET delivered = ".($ship{$oe_id}->{delivered}?"TRUE":"FALSE")." WHERE id = ?", $oe_id);
}
- });
+ 1;
+ }) or do { die SL::DB->client->error };
$main::lxdebug->leave_sub();
}
my $query = qq|UPDATE delivery_orders SET closed = TRUE WHERE id IN (| . join(', ', ('?') x scalar(@{ $params{ids} })) . qq|)|;
do_query($form, $dbh, $query, map { conv_i($_) } @{ $params{ids} });
- });
+ 1;
+ }) or die { SL::DB->client->error };
$form->new_lastmtime('delivery_orders');
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();
}
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();
}
}
$sth->finish();
- });
+ 1;
+ }) or do { die SL::DB->client->error };
$main::lxdebug->leave_sub();
}
SL::DB->with_transaction(sub {
do_query($form, SL::DB->client->dbh, qq|DELETE FROM gl WHERE id = ?|, conv_i($form->{id}));
- });
+ 1;
+ }) or do { die SL::DB->client->error };
$main::lxdebug->leave_sub();
}
);
map { do_query($form, $dbh, $_, @values) } @queries;
- });
+ 1;
+ }) or do { die SL::DB->client->error };
return 1;
}
push @values, $params{subject}, $params{body}, conv_i($params{id});
do_query($form, $dbh, $query, @values);
- });
+ 1;
+ }) or do { die SL::DB->client->error };
$main::lxdebug->leave_sub();
do_query($form, $dbh, qq|DELETE FROM follow_up_links WHERE follow_up_id IN (SELECT DISTINCT id FROM follow_ups WHERE note_id = ?)|, $id);
do_query($form, $dbh, qq|DELETE FROM follow_ups WHERE note_id = ?|, $id);
do_query($form, $dbh, qq|DELETE FROM notes WHERE id = ?|, $id);
- });
+ 1;
+ }) or do { die SL::DB->client->error };
$main::lxdebug->leave_sub();
}
$query = qq|UPDATE oe SET closed = TRUE WHERE id IN (| . join(', ', ('?') x scalar @close_ids) . qq|)|;
do_query($form, $dbh, $query, @close_ids);
}
-
- });
+ 1;
+ }) or do { die SL::DB->client->error };
$main::lxdebug->leave_sub();
}
unlink map { "$spool/$_" } @spoolfiles if $spool;
1;
- });
+ }) or do { die SL::DB->client->error };
$main::lxdebug->leave_sub();
my $query = qq|UPDATE sepa_export SET closed = TRUE WHERE id IN ($placeholders)|;
do_query($form, $dbh, $query, map { conv_i($_) } @ids);
- });
+ 1;
+ }) or do { die SL::DB->client->error };
$main::lxdebug->leave_sub();
}
push @values, $id;
do_query($form, $dbh, $query, @values);
- });
+ 1;
+ }) or do { die SL::DB->client->error };
$main::lxdebug->leave_sub();
}