From: Rolf Fluehmann Date: Mon, 4 Jan 2016 16:00:41 +0000 (+0100) Subject: Schweizer Modus X-Git-Tag: release-3.4.1~486 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=0483b692e6e694c43854cc168db4039e5235a6a9;p=kivitendo-erp.git 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|\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() { [% 'Taxkey' | $T8 %] [% 'valid from' | $T8 %] - [% 'pos_ustva' | $T8 %] + [% IF country_mode != 'CH' %] + [% 'pos_ustva' | $T8 %] + [% END %] [% 'delete' | $T8 %] ? [% FOREACH tk = ACCOUNT_TAXKEYS %] @@ -227,14 +229,18 @@ $(function() { - + [% IF country_mode != 'CH' %] + + [% END %] [% ELSE %] - + [% IF country_mode != 'CH' %] + + [% END %]   [% END %] @@ -251,6 +257,7 @@ $(function() { [% 'EUER' | $T8 %] + [% IF country_mode != 'CH' %] [% 'BWA' | $T8 %] @@ -264,6 +271,7 @@ $(function() { [% 'Datevautomatik' | $T8 %] [% 'If checked the taxkey will not be exported in the DATEV Export, but only IF chart taxkeys differ from general ledger taxkeys' | $T8 %] + [% END %] [% 'Folgekonto' | $T8 %]