commit 0483b692e6e694c43854cc168db4039e5235a6a9
Author: Rolf Fluehmann <rolf.fluehmann@revamp-it.ch>
Date:   Mon Jan 4 17:00:41 2016 +0100

    Schweizer Modus

diff --git a/SL/Controller/ClientConfig.pm b/SL/Controller/ClientConfig.pm
index d002f427a..bdd52d280 100644
--- a/SL/Controller/ClientConfig.pm
+++ b/SL/Controller/ClientConfig.pm
@@ -29,6 +29,7 @@ sub action_edit {
   my ($self, %params) = @_;
 
   $::form->{use_templates} = $self->defaults->templates ? 'existing' : 'new';
+  $::form->{country_mode} = $self->defaults->country_mode;
   $self->edit_form;
 }
 
diff --git a/SL/DB/MetaSetup/Default.pm b/SL/DB/MetaSetup/Default.pm
index 20610fd3b..ac5df0fd3 100644
--- a/SL/DB/MetaSetup/Default.pm
+++ b/SL/DB/MetaSetup/Default.pm
@@ -35,6 +35,7 @@ __PACKAGE__->meta->columns(
   customer_hourly_rate                      => { type => 'numeric', precision => 8, scale => 2 },
   customer_projects_only_in_sales           => { type => 'boolean', default => 'false', not_null => 1 },
   customernumber                            => { type => 'text' },
+  country_mode                              => { type => 'text', default => 'DE', not_null => 1 },
   datev_check_on_ap_transaction             => { type => 'boolean', default => 'true' },
   datev_check_on_ar_transaction             => { type => 'boolean', default => 'true' },
   datev_check_on_gl_transaction             => { type => 'boolean', default => 'true' },
diff --git a/bin/mozilla/am.pl b/bin/mozilla/am.pl
index 1b4fd5f1e..392aedcda 100644
--- a/bin/mozilla/am.pl
+++ b/bin/mozilla/am.pl
@@ -214,38 +214,47 @@ sub account_header {
   }
 
   my $select_eur = q|<option value=""> |. $locale->text('None') .q|</option>\n|;
-  my %eur = (
-          1  => "Umsatzerlöse",
-          2  => "sonstige Erlöse",
-          3  => "Privatanteile",
-          4  => "Zinserträge",
-          5  => "Ausserordentliche Erträge",
-          6  => "Vereinnahmte Umsatzst.",
-          7  => "Umsatzsteuererstattungen",
-          8  => "Wareneingänge",
-          9  => "Löhne und Gehälter",
-          10 => "Gesetzl. sozialer Aufw.",
-          11 => "Mieten",
-          12 => "Gas, Strom, Wasser",
-          13 => "Instandhaltung",
-          14 => "Steuern, Versich., Beiträge",
-          15 => "Kfz-Steuern",
-          16 => "Kfz-Versicherungen",
-          17 => "Sonst. Fahrzeugkosten",
-          18 => "Werbe- und Reisekosten",
-          19 => "Instandhaltung u. Werkzeuge",
-          20 => "Fachzeitschriften, Bücher",
-          21 => "Miete für Einrichtungen",
-          22 => "Rechts- und Beratungskosten",
-          23 => "Bürobedarf, Porto, Telefon",
-          24 => "Sonstige Aufwendungen",
-          25 => "Abschreibungen auf Anlagever.",
-          26 => "Abschreibungen auf GWG",
-          27 => "Vorsteuer",
-          28 => "Umsatzsteuerzahlungen",
-          29 => "Zinsaufwand",
-          30 => "Ausserordentlicher Aufwand",
-          31 => "Betriebliche Steuern");
+  my %eur;
+  if (($form->{country_mode} = SL::DB::Default->get->country_mode) eq 'CH') {
+    %eur = (
+         1  => "Ertrag",
+         6  => "Aufwand",
+    );
+  } else {
+    %eur = (
+         1  => "Umsatzerlöse",
+         2  => "sonstige Erlöse",
+         3  => "Privatanteile",
+         4  => "Zinserträge",
+         5  => "Ausserordentliche Erträge",
+         6  => "Vereinnahmte Umsatzst.",
+         7  => "Umsatzsteuererstattungen",
+         8  => "Wareneingänge",
+         9  => "Löhne und Gehälter",
+         10 => "Gesetzl. sozialer Aufw.",
+         11 => "Mieten",
+         12 => "Gas, Strom, Wasser",
+         13 => "Instandhaltung",
+         14 => "Steuern, Versich., Beiträge",
+         15 => "Kfz-Steuern",
+         16 => "Kfz-Versicherungen",
+         17 => "Sonst. Fahrzeugkosten",
+         18 => "Werbe- und Reisekosten",
+         19 => "Instandhaltung u. Werkzeuge",
+         20 => "Fachzeitschriften, Bücher",
+         21 => "Miete für Einrichtungen",
+         22 => "Rechts- und Beratungskosten",
+         23 => "Bürobedarf, Porto, Telefon",
+         24 => "Sonstige Aufwendungen",
+         25 => "Abschreibungen auf Anlagever.",
+         26 => "Abschreibungen auf GWG",
+         27 => "Vorsteuer",
+         28 => "Umsatzsteuerzahlungen",
+         29 => "Zinsaufwand",
+         30 => "Ausserordentlicher Aufwand",
+         31 => "Betriebliche Steuern",
+    );
+  }
   foreach my $item (sort({ $a <=> $b } keys(%eur))) {
     my $text = H($::locale->{iconv_utf8}->convert($eur{$item}));
     if ($item == $form->{pos_eur}) {
diff --git a/config/kivitendo.conf.default b/config/kivitendo.conf.default
index 163984915..120b6f41b 100644
--- a/config/kivitendo.conf.default
+++ b/config/kivitendo.conf.default
@@ -65,6 +65,10 @@ bind_password =
 # and "en" (English, not perfect) are available.
 language = de
 
+# Set default_manager for admin forms. Currently "german"
+# and "swiss" are available.
+default_manager = german
+
 # The memory limits given here determine the maximum process size
 # (vsz, the total amount of memory this process uses including memory
 # swapped out or shared with other processes) or resident set size
diff --git a/sql/Pg-upgrade2/defaults_add_country_mode.sql b/sql/Pg-upgrade2/defaults_add_country_mode.sql
new file mode 100644
index 000000000..d6495e1d7
--- /dev/null
+++ b/sql/Pg-upgrade2/defaults_add_country_mode.sql
@@ -0,0 +1,5 @@
+-- @tag: defaults_add_country_mode
+-- @description: adds new column 'country_mode' (ISO-3166) in table defaults used for erp.ini
+-- @depends: release_3_2_0
+ALTER TABLE defaults ADD COLUMN country_mode TEXT NOT NULL DEFAULT('DE');
+
diff --git a/templates/webpages/am/edit_accounts.html b/templates/webpages/am/edit_accounts.html
index 8f0c09aff..7b000d674 100644
--- a/templates/webpages/am/edit_accounts.html
+++ b/templates/webpages/am/edit_accounts.html
@@ -217,7 +217,9 @@ $(function() {
               <tr>
                 <th align="left">[% 'Taxkey' | $T8 %]</th>
                 <th align="left">[% 'valid from' | $T8 %]</th>
-                <th align="left">[% 'pos_ustva' | $T8 %]</th>
+                [% IF country_mode != 'CH' %]
+                  <th align="left">[% 'pos_ustva' | $T8 %]</th>
+                [% END %]
                 <th align="left">[% 'delete' | $T8 %] ? </th>
               </tr>
 [% FOREACH tk = ACCOUNT_TAXKEYS %]
@@ -227,14 +229,18 @@ $(function() {
                 <input type="hidden" name="taxkey_id_[% tk.runningnumber %]" value="[% tk.id %]">
                 <td><select name="taxkey_tax_[% tk.runningnumber %]">[% tk.selecttaxkey %]</select></td>
                 <td><input name="taxkey_startdate_[% tk.runningnumber %]" value="[% HTML.escape(tk.startdate) %]"></td>
-                <td><select name="taxkey_pos_ustva_[% tk.runningnumber %]">[% tk.select_tax %]</select></td>
+                [% IF country_mode != 'CH' %]
+                  <td><select name="taxkey_pos_ustva_[% tk.runningnumber %]">[% tk.select_tax %]</select></td>
+                [% END %]
                 <td><input name="taxkey_del_[% tk.runningnumber %]" type="checkbox"
                 class="checkbox" value="delete"></td>
     [% ELSE %]
                 <input type="hidden" name="taxkey_id_[% tk.runningnumber %]" value="NEW">
                 <td><select name="taxkey_tax_[% tk.runningnumber %]">[% tk.selecttaxkey %]</select></td>
                 <td><input name="taxkey_startdate_[% tk.runningnumber %]" value="[% HTML.escape(tk.startdate) %]"></td>
-                <td><select name="taxkey_pos_ustva_[% tk.runningnumber %]">[% tk.select_tax %]</select></td>
+                [% IF country_mode != 'CH' %]
+                  <td><select name="taxkey_pos_ustva_[% tk.runningnumber %]">[% tk.select_tax %]</select></td>
+                [% END %]
                 <td>&nbsp;</td>
     [% END %]
               </tr>
@@ -251,6 +257,7 @@ $(function() {
           <th align="left">[% 'EUER' | $T8 %]</th>
           <td colspan="3"><select name="pos_eur">[% select_eur %]</select></td>
         </tr>
+     [% IF country_mode != 'CH' %]
         <tr>
           <th align="left">[% 'BWA' | $T8 %]</th>
           <td colspan="3"><select name="pos_bwa">[% select_bwa %]</select></td>
@@ -264,6 +271,7 @@ $(function() {
           <th align="left">[% 'Datevautomatik' | $T8 %]</th>
           <td colspan="3"><input name="datevautomatik" type="checkbox" class="checkbox" value="T" [% IF datevautomatik %]checked [% END %]>[% 'If checked the taxkey will not be exported in the DATEV Export, but only IF chart taxkeys differ from general ledger taxkeys' | $T8 %] </td>
         </tr>
+     [% END %]
         <tr>
           <th align="left">[% 'Folgekonto' | $T8 %]</th>
           <td><select name="new_chart_id">[% selectnewaccount %]</select></td>
