Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 6af007ae

Von Moritz Bunkus vor mehr als 11 Jahren hinzugefügt

  • ID 6af007aef5ff57abc085bf61c6b2d228baac7b25
  • Vorgänger 368f144b
  • Nachfolger ce8306e0

Nummernkreise/Standardkonten in Mandantenkonfigurationsdialog verschoben

Unterschiede anzeigen:

bin/mozilla/am.pl
935 935
  $main::lxdebug->leave_sub();
936 936
}
937 937

  
938
sub edit_defaults {
939
  $main::lxdebug->enter_sub();
940

  
941
  my $form     = $main::form;
942
  my %myconfig = %main::myconfig;
943
  my $locale   = $main::locale;
944

  
945
  # get defaults for account numbers and last numbers
946
  AM->defaultaccounts(\%myconfig, \%$form);
947
  $form->{ALL_UNITS} = AM->convertible_units(AM->retrieve_all_units(), 'g');
948

  
949
  map { $form->{"defaults_${_}"} = $form->{defaults}->{$_} } keys %{ $form->{defaults} };
950

  
951
  # default language
952
  my $all_languages = SL::DB::Manager::Language->get_all;
953

  
954
# cash = IST-Versteuerung, accrual = SOLL-Versteuerung
955

  
956
  foreach my $key (keys %{ $form->{IC} }) {
957
    foreach my $accno (sort keys %{ $form->{IC}->{$key} }) {
958
      my $array = "ACCNOS_" . uc($key);
959
      $form->{$array} ||= [];
960

  
961
      my $value = "${accno}--" . $form->{IC}->{$key}->{$accno}->{description};
962
      push @{ $form->{$array} }, {
963
        'name'     => $value,
964
        'value'    => $value,
965
        'selected' => $form->{IC}->{$key}->{$accno}->{id} == $form->{defaults}->{$key},
966
      };
967
    }
968
  }
969

  
970
  $form->{title} = $locale->text('Ranges of numbers and default accounts');
971

  
972
  $form->header();
973
  print $form->parse_html_template('am/edit_defaults',
974
                                   { ALL_LANGUAGES => $all_languages, });
975

  
976
  $main::lxdebug->leave_sub();
977
}
978

  
979
sub save_defaults {
980
  $main::lxdebug->enter_sub();
981

  
982
  my $form     = $main::form;
983
  my $locale   = $main::locale;
984

  
985
  AM->save_defaults();
986

  
987
  $form->redirect($locale->text('Defaults saved.'));
988

  
989
  $main::lxdebug->leave_sub();
990
}
991

  
992 938
sub _build_cfg_options {
993 939
  my $form     = $main::form;
994 940
  my %myconfig = %main::myconfig;

Auch abrufbar als: Unified diff