]> wagnertech.de Git - kivitendo-erp.git/blobdiff - SL/Controller/ClientConfig.pm
Änderbarkeit und Löschbarkeit von Belegen in Mandantenkonfiguration einstellbar.
[kivitendo-erp.git] / SL / Controller / ClientConfig.pm
index 2047077f7035887abb0a4d037044f52e2dfa4c7f..0e424de69c8142e341f5098a0891a4cd3aab0762 100644 (file)
@@ -12,6 +12,9 @@ __PACKAGE__->run_before('check_auth');
 sub action_edit {
   my ($self, %params) = @_;
 
+  $self->{posting_options} = [ { title => $::locale->text("never"), value => 0 },
+                               { title => $::locale->text("every time"), value => 1 },
+                               { title => $::locale->text("on the same day"), value => 2 }, ];
   $self->{payment_options} = [ { title => $::locale->text("never"), value => 0 },
                                { title => $::locale->text("every time"), value => 1 },
                                { title => $::locale->text("on the same day"), value => 2 }, ];
@@ -22,6 +25,8 @@ sub action_edit {
   $self->{profit_options} = [ { title => $::locale->text("balance"), value => "balance" },
                               { title => $::locale->text("income"), value => "income" }, ];
 
+  map { $self->{$_} = SL::DB::Default->get->$_ } qw(is_changeable ir_changeable ar_changeable ap_changeable gl_changeable);
+
   $self->{payments_changeable} = SL::DB::Default->get->payments_changeable;
 
   map { $self->{$_} = SL::DB::Default->get->$_ } qw(accounting_method inventory_system profit_determination);
@@ -41,6 +46,8 @@ sub action_edit {
 sub action_save {
   my ($self, %params) = @_;
 
+  map { SL::DB::Default->get->update_attributes($_ => $::form->{$_}); } qw(is_changeable ir_changeable ar_changeable ap_changeable gl_changeable);
+
   SL::DB::Default->get->update_attributes('payments_changeable' => $::form->{payments_changeable});
 
   map { SL::DB::Default->get->update_attributes($_ => $::form->{$_}); } qw(accounting_method inventory_system profit_determination);