Option für Datev-Check in Mandantenkonfiguration verschoben.
[kivitendo-erp.git] / SL / Controller / ClientConfig.pm
index 97ff15a..e6e6878 100644 (file)
@@ -19,6 +19,12 @@ sub action_edit {
   $self->{payments_changeable} = SL::DB::Default->get->payments_changeable;
   $self->{show_bestbefore}     = SL::DB::Default->get->show_bestbefore;
 
+  map { $self->{$_} = SL::DB::Default->get->$_ } qw(datev_check_on_sales_invoice datev_check_on_purchase_invoice datev_check_on_ar_transaction datev_check_on_ap_transaction datev_check_on_gl_transaction);
+  # datev check: not implemented yet:
+  #check_on_cash_and_receipt = 0
+  #check_on_dunning = 0
+  #check_on_sepa_import = 0
+
   $self->render('client_config/form', title => $::locale->text('Client Configuration'));
 }
 
@@ -29,6 +35,8 @@ sub action_save {
   SL::DB::Default->get->update_attributes('payments_changeable' => $::form->{payments_changeable});
   SL::DB::Default->get->update_attributes('show_bestbefore'     => $::form->{show_bestbefore});
 
+  map { SL::DB::Default->get->update_attributes($_ => $::form->{$_}); } qw(datev_check_on_sales_invoice datev_check_on_purchase_invoice datev_check_on_ar_transaction datev_check_on_ap_transaction datev_check_on_gl_transaction);
+
   flash_later('info', $::locale->text('Client Configuration saved!'));
 
   $self->redirect_to(action => 'edit');