Merge branch 'b-3.6.1' into mebil
authorMichael Wagner <michael@wagnertech.de>
Fri, 15 Jul 2022 17:28:43 +0000 (19:28 +0200)
committerMichael Wagner <michael@wagnertech.de>
Fri, 15 Jul 2022 17:28:43 +0000 (19:28 +0200)
21 files changed:
SL/Controller/Mebil.pm [new file with mode: 0644]
SL/DB/Helper/Mappings.pm
SL/DB/Manager/MebilMapping.pm [new file with mode: 0644]
SL/DB/MebilMapping.pm [new file with mode: 0644]
SL/DB/MetaSetup/MebilMapping.pm [new file with mode: 0644]
VERSION
debian/.dummy [new file with mode: 0644]
debian/mkivitendo.changelog [new file with mode: 0644]
debian/mkivitendo.control [new file with mode: 0644]
debian/mkivitendo.cp [new file with mode: 0755]
debian/mkivitendo.prepare [new file with mode: 0755]
image/icons/16x16/wtg.png [new file with mode: 0644]
menus/.dummy [new file with mode: 0644]
menus/admin/.dummy [new file with mode: 0644]
menus/mobile/.dummy [new file with mode: 0644]
menus/user/.dummy [new file with mode: 0644]
menus/user/00-erp.yaml
sql/Pg-upgrade2/mebil_v1.sql [new file with mode: 0644]
sql/Pg-upgrade2/release_3_5_8.sql
templates/webpages/mebil/.dummy [new file with mode: 0644]
templates/webpages/mebil/report_top.html [new file with mode: 0644]

diff --git a/SL/Controller/Mebil.pm b/SL/Controller/Mebil.pm
new file mode 100644 (file)
index 0000000..03a8917
--- /dev/null
@@ -0,0 +1,314 @@
+package SL::Controller::Mebil;
+
+use strict;
+
+use parent qw(SL::Controller::Base);
+
+#use SL::Controller::Helper::ReportGenerator;
+use SL::ReportGenerator;
+use SL::DBUtils;
+
+use SL::Locale::String;  # t8
+
+#use Data::Dumper;
+#use SL::ClientJS;
+
+use Rose::Object::MakeMethods::Generic (
+  scalar                  => [ qw(report number_columns year current_year objects subtotals_per_quarter salesman_id) ],
+  'scalar --get_set_init' => [ qw(employees types data) ],
+);
+
+sub action_map {
+       $::lxdebug->enter_sub;
+       $::lxdebug->message(5, 'controller=mebil/action=map');
+       my ($self) = @_;
+       
+       $::form->header(no_layout => 1);
+       
+       print "<h1>Mebil running</h1>";
+
+       my $sql = "SELECT  chart_id,xbrl_tag from mebil_mapping";
+       my $result = SL::DBUtils::do_query($::form, $::form->get_standard_dbh, $sql);
+       $::lxdebug->message(5, "result= $result");
+       print "$result<br>\n";
+       
+       my @r = SL::DBUtils::selectall_hashref_query($::form, $::form->get_standard_dbh, $sql);
+       print ref($r[1])||"SCALAR";
+       print "<br>";
+       my $fst = $r[1];
+       while (my($k,$v) = each(%$fst)) {
+               print $k, " : ", $v, "</br>\n";
+       }
+       print "<br>";
+       print scalar @r;
+       print "<br>";
+       print @r;
+       print "<p>Mebil ready</p>";
+       $::lxdebug->leave_sub;
+}
+
+sub action_showmap {
+       $::lxdebug->enter_sub;
+       my ($self) = @_;
+       
+       # call model
+       $self->{data} = DB::MebilMapping::getMappings($::form->get_standard_dbh);
+       
+       
+       $::form->{title} = $::locale->text('Mebil Map');
+
+       my $sql = "SELECT fromacc,typ,toacc from mebil_mapping order by ordering";
+       $self->{data} = SL::DBUtils::selectall_hashref_query($::form, $::form->get_standard_dbh, $sql);
+
+       $self->prepare_report;
+       $self->list_data;
+
+       $::lxdebug->leave_sub;
+}
+
+sub extract_rule {
+       my $rule = shift;
+       my $part = $rule;
+       $part =~ s/:.*//;
+       if ($rule =~ /:/) {
+               $rule =~ s/[^:]*://;
+       }
+       else {
+               $rule = "";
+       }
+       $::lxdebug->message(5, "part=$part");
+       return ($part,$rule);
+}
+
+sub rule2sql {
+       $::lxdebug->enter_sub;
+       
+       my $rule = shift;
+       my $year = shift;
+       $::lxdebug->message(5, "rule=$rule");
+       
+       # a rule consists of key=value pairs seperated by colon. Possible keys are:
+       # - ACC: account number
+       # - VALUES=positive|negative: only positive or negative values are selected
+       #     negative implies INVERT=true
+       # - INVERT=true: Result is multiplied by -1
+       # - START=YEAR: start year. Absolute ('2020') or relative ('YEAR/PY')
+       # - END=YEAR: end year. Default: $year
+       
+       # supply defaults:
+       my $acc = "0000";
+       my $values = "";
+       my $invert = "";
+       my $start = "";
+       my $end = "AND (ac.transdate <= '31.12.$year')";
+       my $py = $year - 1;
+       
+       # parse rule
+       (my $part,$rule) = extract_rule($rule);
+       $::lxdebug->message(5, "part=$part");
+       while ($part) {
+               $part =~ /(.*)=(.*)/;
+               if ($1 eq "ACC") {
+                       $acc = $2;
+               }
+               elsif ($1 eq "VALUES") {
+                       if ($2 eq "positive") {
+                               $values = "AND (ac.amount > 0)";
+                       }
+                       elsif ($2 eq "negative") {
+                               $values = "AND (ac.amount < 0)";
+                               $invert = "* (-1)";
+                       }
+                       else {
+                               die "invalid rule part: $part";
+                       }
+               }
+               elsif ($1 eq "INVERT") {
+                       $invert = "* (-1)";
+               }
+               elsif ($1 eq "START") {
+                       $start = "AND (ac.transdate >= '01.01.$2')";
+                       $start =~ s/YEAR/$year/;
+                       $start =~ s/PY/$py/;
+               }
+               elsif ($1 eq "END") {
+                       $end = "AND (ac.transdate <= '31.12.$2')";
+                       $end =~ s/YEAR/$year/;
+                       $end =~ s/PY/$py/;
+               }
+               else {
+                       die "invalid rule part: $part";
+               }
+               ($part,$rule) = extract_rule($rule);
+       }
+
+       $::lxdebug->leave_sub;
+       return "SELECT SUM(ac.amount) $invert AS saldo
+                                               FROM acc_trans ac 
+                                               JOIN chart c ON (c.id = ac.chart_id) 
+                                               WHERE (c.accno = '$acc') $values $start $end";
+}
+
+sub action_calcmap {
+       $::lxdebug->enter_sub;
+       my ($self) = @_;
+       
+       $self->year($::form->{year} || DateTime->today->year - 1);
+       
+       $::form->{title} = $::locale->text('Mebil Map');
+       
+       my $sql = "SELECT  fromacc,typ,toacc from mebil_mapping order by ordering";
+       $self->{data} = SL::DBUtils::selectall_hashref_query($::form, $::form->get_standard_dbh, $sql);
+
+       my %fromacc = ();
+       my %toacc   = ();
+       my $year = $self->year;
+       foreach my $mapping (@{ $self->{data} }) {
+               if ($mapping->{typ} eq 'H') {
+                       # process Haben
+                       $sql = "SELECT SUM(ac.amount) AS saldo
+                                               FROM acc_trans ac 
+                                               JOIN chart c ON (c.id = ac.chart_id) 
+                                               WHERE (ac.transdate <= '31.12.$year') 
+                                               AND (c.accno = '$mapping->{fromacc}') ";
+                       my $result = SL::DBUtils::selectall_hashref_query($::form, $::form->get_standard_dbh, $sql);            
+                       $fromacc{$mapping->{fromacc}} = $result->[0]->{saldo};
+                       $toacc{$mapping->{toacc}} += $result->[0]->{saldo};
+               }
+               elsif ($mapping->{typ} eq 'S') {
+                       # process Soll
+                       $sql = "SELECT SUM(ac.amount)* -1 AS saldo
+                                               FROM acc_trans ac 
+                                               JOIN chart c ON (c.id = ac.chart_id) 
+                                               WHERE (ac.transdate <= '31.12.$year') 
+                                               AND (c.accno = '$mapping->{fromacc}') ";
+                       my @result = SL::DBUtils::selectfirst_array_query($::form, $::form->get_standard_dbh, $sql);            
+                       $fromacc{$mapping->{fromacc}} = $result[0];
+                       $toacc{$mapping->{toacc}} += $result[0];
+               }
+#              elsif ($mapping->{typ} eq 'V') {
+#                      # process Vorjahr
+#                      $fromacc{$mapping->{fromacc}} = 300.;
+#                      $toacc{$mapping->{toacc}} = 300.;
+#              }
+#              elsif ($mapping->{typ} eq 'A') {
+#                      # process Aktjahr
+#                      $fromacc{$mapping->{fromacc}} = 400.;
+#                      $toacc{$mapping->{toacc}} = 400.;
+#              }
+               elsif ($mapping->{typ} eq 'X') {
+                       # add to other account
+                       $toacc{$mapping->{toacc}} += $toacc{$mapping->{fromacc}};
+               }
+               elsif ($mapping->{typ} eq 'Y') {
+                       # substract from other account
+                       $toacc{$mapping->{toacc}} -= $toacc{$mapping->{fromacc}};
+               }
+               elsif ($mapping->{typ} eq 'R') {
+                       # rule based
+                       my $sql = rule2sql($mapping->{fromacc}, $year);
+                       $::lxdebug->message(5, "sql=$sql");
+                       my @result = SL::DBUtils::selectfirst_array_query($::form, $::form->get_standard_dbh, $sql);            
+                       $toacc{$mapping->{toacc}} += $result[0];
+               }
+               elsif ($mapping->{typ} eq 'C') {
+                       # constant value
+                       ; # do nothing here
+               }
+               else {
+                       die "Error: Invalid mapping type: $mapping->{typ}\n";
+               }
+       }
+       
+       $self->report(SL::ReportGenerator->new(\%::myconfig, $::form));
+
+       my @columns = (qw(name amount));
+
+       my %column_defs          = (
+       name                        => { text => 'Konto', align => 'left'   },
+       amount                      => { text => 'Betrag'   , align => 'right'   },
+       );
+
+  $self->report->set_options(
+    std_column_visibility => 1,
+    controller_class      => 'Mebil',
+    output_format         => 'HTML',
+       raw_top_info_text     => $self->render('mebil/report_top', { output => 0 }, YEARS_TO_LIST => [ reverse(($self->year - 10)..($self->year + 5)) ]),
+    title                 => t8('mebil - Mapping: values for #1', $self->year),
+#    allow_pdf_export      => 1,
+#    allow_csv_export      => 1,
+  );
+  $self->report->set_columns(%column_defs);
+  $self->report->set_column_order(@columns);
+#  $self->report->set_export_options(qw(list year subtotals_per_quarter salesman_id));
+       $self->report->set_options_from_form;
+       $self->add_data_sorted(\%fromacc);
+       $self->add_data_sorted(\%toacc);
+       $::lxdebug->leave_sub;
+       return $self->report->generate_with_headers;
+}
+sub add_data_sorted {
+       my $self = shift;
+       my $data = shift; # hash reference
+       
+       foreach my $key (sort keys %$data) {
+               my %data = (
+                   name                     => { data => $key },
+               amount                   => { data => $::form->format_amount(\%::myconfig, $data->{$key}, 2) },
+               );
+               $self->report->add_data(\%data);
+               
+       }
+}
+sub prepare_report {
+  my ($self)      = @_;
+
+  $self->report(SL::ReportGenerator->new(\%::myconfig, $::form));
+
+  my @columns = (qw(fromacc typ toacc));
+
+  #$self->number_columns([ grep { !m/^(?:month|year|quarter)$/ } @columns ]);
+
+  my %column_defs          = (
+    fromacc                  => { text => 'Quelle', align => 'left'   },
+    typ                      => { text => 'Typ'   , align => 'right'   },
+    toacc                    => { text => 'Ziel'  , align => 'left'   },
+  );
+
+  #$column_defs{$_}->{align} = 'right' for @columns;
+
+  $self->report->set_options(
+    std_column_visibility => 1,
+    controller_class      => 'Mebil',
+    output_format         => 'HTML',
+ #   raw_top_info_text     => $self->render('financial_overview/report_top', { output => 0 }, YEARS_TO_LIST => [ reverse(($self->current_year - 10)..($self->current_year + 5)) ]),
+    title                 => 'mebil - Mapping',
+#    allow_pdf_export      => 1,
+#    allow_csv_export      => 1,
+  );
+  $self->report->set_columns(%column_defs);
+  $self->report->set_column_order(@columns);
+#  $self->report->set_export_options(qw(list year subtotals_per_quarter salesman_id));
+  $self->report->set_options_from_form;
+}
+sub list_data {
+       my ($self)           = @_;
+
+#  my @visible_columns  = $self->report->get_visible_columns;
+#  my @type_columns     = @{ $self->types };
+#  my @non_type_columns = grep { my $c = $_; none { $c eq $_ } @type_columns } @visible_columns;
+
+       foreach my $mapping (@{ $self->{data} }) {
+               my %data = (
+                   fromacc                  => { data => $mapping->{fromacc} },
+               typ                      => { data => $mapping->{typ}     },
+               toacc                    => { data => $mapping->{toacc}   },
+               );
+               $self->report->add_data(\%data);
+       }
+       return $self->report->generate_with_headers;
+}
+
+1;
index 4f78ac4..bc477fc 100644 (file)
@@ -159,6 +159,7 @@ my %kivitendo_package_names = (
   letter                         => 'letter',
   letter_draft                   => 'letter_draft',
   makemodel                      => 'make_model',
+  mebil_mapping                  => 'mebil_mapping',
   notes                          => 'note',
   orderitems                     => 'order_item',
   oe                             => 'order',
diff --git a/SL/DB/Manager/MebilMapping.pm b/SL/DB/Manager/MebilMapping.pm
new file mode 100644 (file)
index 0000000..6ccaa08
--- /dev/null
@@ -0,0 +1,14 @@
+# This file has been auto-generated only because it didn't exist.
+# Feel free to modify it at will; it will not be overwritten automatically.
+
+package SL::DB::Manager::MebilMapping;
+
+use strict;
+
+use parent qw(SL::DB::Helper::Manager);
+
+sub object_class { 'SL::DB::MebilMapping' }
+
+__PACKAGE__->make_manager_methods;
+
+1;
diff --git a/SL/DB/MebilMapping.pm b/SL/DB/MebilMapping.pm
new file mode 100644 (file)
index 0000000..785380f
--- /dev/null
@@ -0,0 +1,16 @@
+package SL::DB::MebilMapping;
+
+use strict;
+
+use SL::DB::MetaSetup::MebilMapping;
+use SL::DB::Manager::MebilMapping;
+
+__PACKAGE__->meta->initialize;
+
+sub getMappings {
+       my $dbh = shift;
+       
+       return SL::DB::Manager::MebilMapping::get_mebilmappings();
+}
+
+1;
diff --git a/SL/DB/MetaSetup/MebilMapping.pm b/SL/DB/MetaSetup/MebilMapping.pm
new file mode 100644 (file)
index 0000000..a68fc4c
--- /dev/null
@@ -0,0 +1,22 @@
+# This file has been auto-generated. Do not modify it; it will be overwritten
+# by rose_auto_create_model.pl automatically.
+package SL::DB::MebilMapping;
+
+use strict;
+
+use parent qw(SL::DB::Object);
+
+__PACKAGE__->meta->table('mebil_mapping');
+
+__PACKAGE__->meta->columns(
+  fromacc  => { type => 'varchar', length => 200, not_null => 1 },
+  id       => { type => 'serial', not_null => 1 },
+  ordering => { type => 'integer', not_null => 1 },
+  toacc    => { type => 'varchar', length => 200, not_null => 1 },
+  typ      => { type => 'character', length => 1, not_null => 1 },
+);
+
+__PACKAGE__->meta->primary_key_columns([ 'id' ]);
+
+1;
+;
diff --git a/VERSION b/VERSION
index 9575d51..95a00e4 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-3.6.1
+3.6.1m1
diff --git a/debian/.dummy b/debian/.dummy
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/debian/mkivitendo.changelog b/debian/mkivitendo.changelog
new file mode 100644 (file)
index 0000000..861b6cc
--- /dev/null
@@ -0,0 +1,4 @@
+kivitendo-erp (3.5.8.1-%BUILD%) unstable; urgency=medium
+  * start of mebil mapping
+ -- Michael Wagner <info@wagnertech.de>  Tue, 08 Feb 2022 20:03:04 +0100
+
diff --git a/debian/mkivitendo.control b/debian/mkivitendo.control
new file mode 100644 (file)
index 0000000..c5b25cc
--- /dev/null
@@ -0,0 +1,30 @@
+Source: kivitendo-erp
+Section: main
+Priority: optional
+Maintainer: Michael Wagner <michael@wagnertech.de>
+Build-Depends: git,mbuild
+Package: mkivitendo
+Section: main
+Priority: optional
+Architecture: all
+Depends: apache2, postgresql, libapache2-mod-fcgid, libarchive-zip-perl, libclone-perl,
+  libconfig-std-perl, libdatetime-perl, libdbd-pg-perl, libdbi-perl,
+  libemail-address-perl,  libemail-mime-perl, libfcgi-perl, libjson-perl,
+  liblist-moreutils-perl, libnet-smtp-ssl-perl, libnet-sslglue-perl,
+  libparams-validate-perl, libpdf-api2-perl, librose-db-object-perl,
+  librose-db-perl, librose-object-perl, libsort-naturally-perl,
+  libstring-shellquote-perl, libtemplate-perl, libtext-csv-xs-perl,
+  libtext-iconv-perl, liburi-perl, libxml-writer-perl, libyaml-perl,
+  libimage-info-perl, libgd-gd2-perl,
+  libfile-copy-recursive-perl, libalgorithm-checkdigits-perl,
+  libcrypt-pbkdf2-perl, libcgi-pm-perl, libtext-unidecode-perl, libwww-perl,
+  postgresql-contrib, aqbanking-tools, poppler-utils, libhtml-restrict-perl,
+  libdatetime-set-perl, libset-infinite-perl, liblist-utilsby-perl,
+  libdaemon-generic-perl, libfile-flock-perl, libfile-slurp-perl,
+  libfile-mimeinfo-perl, libpbkdf2-tiny-perl, libregexp-ipv6-perl,
+  libdatetime-event-cron-perl, libexception-class-perl,
+  libcam-pdf-perl, libmath-round-perl
+Replaces: kivitendo
+Description: kivitendo-ERP
+
diff --git a/debian/mkivitendo.cp b/debian/mkivitendo.cp
new file mode 100755 (executable)
index 0000000..907a480
--- /dev/null
@@ -0,0 +1,23 @@
+#!/bin/bash
+set -e
+
+# parameter: $1: base dir for copy (optional)
+
+mkdir -p $1/opt/kivitendo-erp
+rsync -a --exclude=".git" --exclude="debian" ./ $1/opt/kivitendo-erp/
+
+# provide WTG default config file
+cp Downloads/projects/kivitendo/kivitendo.conf.default $1/opt/kivitendo-erp/config/
+
+# postinst
+cp Downloads/projects/debian/kivitendo.postinst debian/tmp/DEBIAN/postinst
+
+# copyright
+cp doc/copyright debian/
+
+# apache files
+mkdir -p $1/etc/apache2/sites-available
+mkdir -p $1/etc/apache2/sites-enabled
+cp Downloads/projects/kivitendo/kivitendo.conf $1/etc/apache2/sites-available
+cd $1/etc/apache2/sites-enabled && ln -sf ../sites-available/kivitendo.conf .
+
diff --git a/debian/mkivitendo.prepare b/debian/mkivitendo.prepare
new file mode 100755 (executable)
index 0000000..f7f4357
--- /dev/null
@@ -0,0 +1,16 @@
+#!/bin/bash
+set -e
+
+mkdir -p Downloads
+pushd Downloads >/dev/null
+
+if [ -d projects ]
+then
+       pushd projects >/dev/null
+       git fetch -t
+       popd >/dev/null
+else
+       git clone https://wagnertech.de/git/projects
+fi
+
+
diff --git a/image/icons/16x16/wtg.png b/image/icons/16x16/wtg.png
new file mode 100644 (file)
index 0000000..0d4d690
Binary files /dev/null and b/image/icons/16x16/wtg.png differ
diff --git a/menus/.dummy b/menus/.dummy
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/menus/admin/.dummy b/menus/admin/.dummy
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/menus/mobile/.dummy b/menus/mobile/.dummy
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/menus/user/.dummy b/menus/user/.dummy
new file mode 100644 (file)
index 0000000..e69de29
index 10d356b..2a8777d 100644 (file)
   access: report
   params:
     action: LiquidityProjection/show
+- id: mebil
+  name: Mebil
+  icon: wtg
+  order: 750
+- parent: mebil
+  id: mebil_showmap
+  name: Map anzeigen
+  order: 100
+  access: report
+  params:
+    action: Mebil/showmap
+- parent: mebil
+  id: mebil_calcmap
+  name: Map berechnen
+  order: 200
+  access: report
+  params:
+    action: Mebil/calcmap
 - id: batch_printing
   name: Batch Printing
   icon: printing
diff --git a/sql/Pg-upgrade2/mebil_v1.sql b/sql/Pg-upgrade2/mebil_v1.sql
new file mode 100644 (file)
index 0000000..751b264
--- /dev/null
@@ -0,0 +1,102 @@
+-- @tag: mebil_v1
+-- @description: mebil-DB
+-- @depends:
+
+-- Table of mebil extensions
+-- for module 
+-- Lx office
+DROP TABLE IF EXISTS mebil_mapping;
+CREATE TABLE mebil_mapping (
+       id                      SERIAL PRIMARY KEY,
+       ordering        INTEGER NOT NULL,
+       typ                     CHAR NOT NULL,
+       fromacc         VARCHAR(200) NOT NULL,
+       toacc           VARCHAR(200) NOT NULL
+);
+INSERT INTO mebil_mapping (ordering,typ,fromacc,toacc)
+VALUES
+       (10,'S','0483','bs.ass.fixAss.tan.machinery.gwgsammelposten'),
+       (10,'S','0484','bs.ass.fixAss.tan.machinery.gwgsammelposten'),
+       (20,'X','bs.ass.fixAss.tan.machinery.gwgsammelposten','bs.ass.fixAss.tan.machinery'),
+       (21,'X','bs.ass.fixAss.tan.machinery','bs.ass.fixAss.tan'),
+       (22,'X','bs.ass.fixAss.tan','bs.ass.fixAss'),
+       (50,'X','bs.ass.fixAss','bs.ass'),
+
+   (10,'S','1200','bs.ass.currAss.cashEquiv.bank'),
+   (20,'X','bs.ass.currAss.cashEquiv.bank','bs.ass.currAss.cashEquiv'),
+   (21,'X','bs.ass.currAss.cashEquiv.bank','bs.ass.currAss'),
+
+       (10,'S','3980','bs.ass.currAss.inventory.finishedAndMerch.merchandise.new'),
+       (20,'X','bs.ass.currAss.inventory.finishedAndMerch.merchandise.new','bs.ass.currAss.inventory.finishedAndMerch.merchandise'),
+       (21,'X','bs.ass.currAss.inventory.finishedAndMerch.merchandise','bs.ass.currAss.inventory.finishedAndMerch'),
+       (22,'X','bs.ass.currAss.inventory.finishedAndMerch','bs.ass.currAss.inventory'),
+       (23,'X','bs.ass.currAss.inventory','bs.ass.currAss'),
+
+       (10,'S','1400','bs.ass.currAss.receiv.trade'),
+       (20,'X','bs.ass.currAss.receiv.trade','bs.ass.currAss.receiv'),
+
+       (10,'S','1575','bs.ass.currAss.receiv.other.vat'),
+       (10,'S','1576','bs.ass.currAss.receiv.other.vat'),
+       (10,'S','1579','bs.ass.currAss.receiv.other.vat'),
+       (10,'S','1780','bs.ass.currAss.receiv.other.vat'),
+       (20,'X','bs.ass.currAss.receiv.other.vat','bs.ass.currAss.receiv.other'),
+       (21,'X','bs.ass.currAss.receiv.other','bs.ass.currAss.receiv'),
+       (30,'X','bs.ass.currAss.receiv','bs.ass.currAss'),
+
+       (50,'X','bs.ass.currAss','bs.ass'),
+       
+       (10,'H','0800','bs.eqLiab.equity.subscribed.corp'),
+       (20,'X',       'bs.eqLiab.equity.subscribed.corp','bs.eqLiab.equity.subscribed'),
+       (40,'X',       'bs.eqLiab.equity.subscribed',     'bs.eqLiab.equity'),
+       (10,'H','0810','bs.eqLiab.equity.capRes'),
+       (20,'X',       'bs.eqLiab.equity.capRes',         'bs.eqLiab.equity'),
+       (50,'X',       'bs.eqLiab.equity',                'bs.eqLiab'),
+       (10,'H','0970','bs.eqLiab.accruals.other.upTo1year'),
+       (20,'X',       'bs.eqLiab.accruals.other.upTo1year','bs.eqLiab.accruals.other'),
+       (21,'X',       'bs.eqLiab.accruals.other','bs.eqLiab.accruals'),
+       (50,'X',       'bs.eqLiab.accruals','bs.eqLiab'),
+       (10,'H','1775','bs.eqLiab.liab.other.theroffTax.vat'),
+       (10,'H','1776','bs.eqLiab.liab.other.theroffTax.vat'),
+       (20,'X',       'bs.eqLiab.liab.other.theroffTax.vat','bs.eqLiab.liab.other.theroffTax'),
+       (10,'H','1651','bs.eqLiab.liab.other.theroffTax.operatingTaxes'),
+       (10,'H','1652','bs.eqLiab.liab.other.theroffTax.operatingTaxes'),
+       (10,'H','1653','bs.eqLiab.liab.other.theroffTax.operatingTaxes'),
+       (20,'X',       'bs.eqLiab.liab.other.theroffTax.operatingTaxes','bs.eqLiab.liab.other.theroffTax'),
+       (21,'X',       'bs.eqLiab.liab.other.theroffTax','bs.eqLiab.liab.other'),
+       (10,'H','1606','bs.eqLiab.liab.other.profitPartLoans'),
+       (20,'X',       'bs.eqLiab.liab.other.profitPartLoans','bs.eqLiab.liab.other'),
+       (22,'X',       'bs.eqLiab.liab.other','bs.eqLiab.liab'),
+       (50,'X',       'bs.eqLiab.liab','bs.eqLiab'),
+       
+       (10,'S','4121','is.netIncome.regular.operatingTC.staff.salaries.managerPartner'),
+       (20,'X'       ,'is.netIncome.regular.operatingTC.staff.salaries.managerPartner','is.netIncome.regular.operatingTC.staff.salaries'),
+       (21,'X'       ,'is.netIncome.regular.operatingTC.staff.salaries','ismi.netIncome.staff'),
+       (50,'Y'       ,'ismi.netIncome.staff','ismi.netIncome'),
+       (10,'S','3960','is.netIncome.regular.operatingTC.grossTradingProfit.materialServices.material.purchased.generalRateVAT'),
+       (20,'X',       'is.netIncome.regular.operatingTC.grossTradingProfit.materialServices.material.purchased.generalRateVAT','is.netIncome.regular.operatingTC.grossTradingProfit.materialServices.material.purchased'),
+       (21,'X',       'is.netIncome.regular.operatingTC.grossTradingProfit.materialServices.material.purchased','is.netIncome.regular.operatingTC.grossTradingProfit.materialServices.material'),
+       (22,'X',       'is.netIncome.regular.operatingTC.grossTradingProfit.materialServices.material','ismi.netIncome.materialServices'),
+       (50,'Y',       'ismi.netIncome.materialServices','ismi.netIncome'),
+       
+       (50,'X','bs.ass.fixAss.tan.machinery.gwgsammelposten','all'),
+       (10,'R','ACC=0482:START=2016:VALUES=negative','grossCost.beginning'),
+       (10,'R','ACC=0484:START=2017:VALUES=negative','grossCost.beginning'),
+       (50,'X','grossCost.beginning','gross'),
+       (50,'X','gross.addition','gross'),
+       (10,'R','ACC=0483:START=YEAR:VALUES=negative','gross.addition'),
+       (52,'X','grossCost.beginning','accDepr'),
+       (52,'X','gross.addition','accDepr'),
+       (52,'Y','all','accDepr'),
+       (50,'X','grossCost.beginning','accDepr.beginning'),
+       (50,'Y','all_Prev_period','accDepr.beginning'),
+       (50,'X','all_Prev_period','accDepr.DeprPeriod'),
+       (50,'X','gross.addition','accDepr.DeprPeriod'),
+       (50,'Y','all','accDepr.DeprPeriod'),
+       (60,'X','accDepr.DeprPeriod','accDepr.DeprPeriod.regular'),
+       (10,'R','ACC=0482:END=PY:INVERT=true','all_Prev_period'),
+       (10,'R','ACC=0483:END=PY:INVERT=true','all_Prev_period'),
+       (10,'R','ACC=0484:END=PY:INVERT=true','all_Prev_period'),
+       
+       (0,'C','de-gaap-ci.bsAss','hbst.transfer.bsAss.name')
+       ;
+
index 25f7fb0..0432c28 100644 (file)
@@ -1,3 +1,3 @@
 -- @tag: release_3_5_8
 -- @description: Leeres Script, das alle Upgradescripte bis zum Release 3.5.8 voraussetzt, um ein fest definiertes Schema zu definieren.
--- @depends: release_3_5_7 defaults_produce_assembly_transfer_service change_warehouse_client_config_default drop_shipped_qty_config delete_warehouse_for_assembly delete_cvars_on_trans_deletion_add_shipto
+-- @depends: release_3_5_7 defaults_produce_assembly_transfer_service change_warehouse_client_config_default drop_shipped_qty_config delete_warehouse_for_assembly delete_cvars_on_trans_deletion_add_shipto mebil_v1
diff --git a/templates/webpages/mebil/.dummy b/templates/webpages/mebil/.dummy
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/templates/webpages/mebil/report_top.html b/templates/webpages/mebil/report_top.html
new file mode 100644 (file)
index 0000000..1ee307a
--- /dev/null
@@ -0,0 +1,14 @@
+[%- USE L %][% USE LxERP %]
+<form method="post" id="form" action="controller.pl">
+ [% L.hidden_tag('action', 'mebil/calcmap') %]
+ <a href="[% SELF.url_for(action='calcmap', year=(SELF.year - 1)) %]">&laquo; [%- LxERP.t8("Prior year") %]: [% SELF.year - 1 %]</a>
+
+ |
+ [% LxERP.t8("Current year") %]:
+ [% L.select_tag('year', YEARS_TO_LIST, default=SELF.year, onchange='$("#form").submit();') %]
+ |
+ <a href="[% SELF.url_for(action='calcmap', year=(SELF.year + 1)) %]">[%- LxERP.t8("Following year") %]: [% SELF.year + 1 %] &raquo;</a>
+ </form>
+<hr>