CustomerVendor-Controller: Daten in Neu-Anzeige bei Fehler beibehalten
[kivitendo-erp.git] / SL / Controller / Taxzones.pm
index 5f19ea6..1e29e60 100644 (file)
@@ -15,6 +15,7 @@ use SL::Controller::ClientConfig;
 
 use Rose::Object::MakeMethods::Generic (
   scalar                  => [ qw(config) ],
+  'scalar --get_set_init' => [ qw(defaults) ],
 );
 
 __PACKAGE__->run_before('check_auth');
@@ -54,7 +55,7 @@ sub show_form {
 sub action_edit {
   my ($self) = @_;
 
-  $self->show_form(title     => t8('Edit custom variable'),
+  $self->show_form(title     => t8('Edit taxzone'),
                    CHARTLIST => SL::DB::TaxzoneChart->get_all_accounts_by_taxzone_id($self->config->id));
 }
 
@@ -115,6 +116,7 @@ sub create_or_update {
   }
 
   $self->config->save;
+  $self->config->obsolete($::form->{"obsolete"});
 
   #Save taxzone_charts for new taxzones:
   if ($is_new) {
@@ -135,4 +137,10 @@ sub create_or_update {
   $self->redirect_to(action => 'list');
 }
 
+#
+# initializers
+#
+
+sub init_defaults { SL::DB::Default->get };
+
 1;