+ $main::lxdebug->leave_sub();
+}
+
+sub save {
+ $main::lxdebug->enter_sub();
+
+ $main::auth->assert('config');
+
+ my $form = $main::form;
+ my %myconfig = %main::myconfig;
+ my $locale = $main::locale;
+
+ if ($form->{type} eq 'partsgroup') {
+ $form->isblank("partsgroup", $locale->text('Group missing!'));
+ PE->save_partsgroup(\%myconfig, \%$form);
+ $form->redirect($locale->text('Group saved!'));
+ }
+
+ # choice pricegroup and save
+ if ($form->{type} eq 'pricegroup') {
+ $form->isblank("pricegroup", $locale->text('Pricegroup missing!'));
+ PE->save_pricegroup(\%myconfig, \%$form);
+ $form->redirect($locale->text('Pricegroup saved!'));
+ }
+ # saving the history
+ if(!exists $form->{addition} && $form->{id} ne "") {
+ $form->{snumbers} = qq|projectnumber_| . $form->{projectnumber};
+ $form->{addition} = "SAVED";
+ $form->save_history($form->dbconnect(\%myconfig));
+ }
+ # /saving the history
+
+ $main::lxdebug->leave_sub();