package OE;
use SL::AM;
+use SL::DBUtils;
sub transactions {
$main::lxdebug->enter_sub();
$main::lxdebug->leave_sub();
}
+sub close_order {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form) = @_;
+
+ $main::lxdebug->leave_sub() unless ($form->{"id"});
+
+ my $dbh = $form->dbconnect($myconfig);
+ do_query($form, $dbh, qq|UPDATE oe SET closed = TRUE where ordnumber = ?|,
+ $form->{"id"});
+ $dbh->disconnect;
+
+ $main::lxdebug->leave_sub();
+}
+
sub delete {
$main::lxdebug->enter_sub();
if ( $form->{type} eq 'sales_quotation'
|| $form->{type} eq 'request_quotation') {
- $form->{closed} = 1;
- relink_accounts();
- OE->save(\%myconfig, \%$form);
+ OE->close_order(\%myconfig, $form);
}
$form->{cp_id} *= 1;