+sub delete {
+ $main::lxdebug->enter_sub();
+
+ $main::auth->assert('config');
+
+ my $form = $main::form;
+ my %myconfig = %main::myconfig;
+ my $locale = $main::locale;
+
+ PE->delete_tuple(\%myconfig, \%$form);
+
+ if ($form->{type} eq 'partsgroup') {
+ $form->redirect($locale->text('Group deleted!'));
+ }
+ if ($form->{type} eq 'pricegroup') {
+ $form->redirect($locale->text('Pricegroup deleted!'));
+ }
+ # saving the history
+ if(!exists $form->{addition}) {
+ $form->{snumbers} = qq|projectnumber_| . $form->{projectnumber};
+ $form->{addition} = "DELETED";
+ $form->save_history($form->dbconnect(\%myconfig));
+ }
+ # /saving the history
+ $main::lxdebug->leave_sub();
+}
+
+sub continue { call_sub($main::form->{"nextsub"}); }
+
+sub partsgroup_report {
+ $main::lxdebug->enter_sub();
+
+ $main::auth->assert('config');
+
+ my $form = $main::form;
+ my %myconfig = %main::myconfig;
+ my $locale = $main::locale;
+
+ map { $form->{$_} = $form->unescape($form->{$_}) } qw(partsgroup);
+ PE->partsgroups(\%myconfig, \%$form);
+
+ my $callback =
+ "$form->{script}?action=partsgroup_report&type=$form->{type}&status=$form->{status}";
+
+ my ($option);