From 1630b93572dd4c56575665554cb11fe34b2f8860 Mon Sep 17 00:00:00 2001 From: Michael Wagner Date: Mon, 25 Oct 2021 16:48:15 +0200 Subject: [PATCH] epic-ts --- SL/Controller/Mebil.pm | 38 +++----------------------------------- menus/user/00-erp.yaml | 11 +++++++++++ 2 files changed, 14 insertions(+), 35 deletions(-) diff --git a/SL/Controller/Mebil.pm b/SL/Controller/Mebil.pm index f16f6cb10..903312ffd 100644 --- a/SL/Controller/Mebil.pm +++ b/SL/Controller/Mebil.pm @@ -4,7 +4,8 @@ use strict; use parent qw(SL::Controller::Base); -use SL::Controller::Helper::ReportGenerator; +#use SL::Controller::Helper::ReportGenerator; +use SL::ReportGenerator; use SL::DBUtils; #use Data::Dumper; @@ -51,26 +52,12 @@ sub action_showmap { my $sql = "SELECT chart_id,xbrl_tag from mebil_mapping"; $self->{data} = SL::DBUtils::selectall_hashref_query($::form, $::form->get_standard_dbh, $sql); -# $self->get_objects; -# $self->calculate_one_time_data; -# $self->calculate_periodic_invoices; $self->prepare_report; $self->list_data; -=cut - $::form->header(no_layout => 1); - - print "

Mebil-Mapping

"; - print "

Folgende Zuordnungen sind in der DB hinterlegt:"; - - print "\n"; - foreach my $mapping (@{ $self->{data} }) { - print "\n"; - } - print "
KontoZiel
",$mapping->{chart_id},"",$mapping->{xbrl_tag},"
\n"; -=cut $::lxdebug->leave_sub; } + sub prepare_report { my ($self) = @_; @@ -119,23 +106,4 @@ sub list_data { return $self->report->generate_with_headers; } - -=cut -sub get_objects { - my ($self) = @_; - $self->objects({ - sales_quotations => SL::DB::Manager::Order->get_all( where => [ and => [ @f_date, @f_salesman, SL::DB::Manager::Order->type_filter('sales_quotation') ]]), - sales_orders => SL::DB::Manager::Order->get_all( where => [ and => [ @f_date, @f_salesman, SL::DB::Manager::Order->type_filter('sales_order') ]], with_objects => [ qw(periodic_invoices_config) ]), - sales_orders_per_inv => [], - requests_for_quotation => SL::DB::Manager::Order->get_all( where => [ and => [ @f_date, @f_salesman, SL::DB::Manager::Order->type_filter('request_quotation') ]]), - purchase_orders => SL::DB::Manager::Order->get_all( where => [ and => [ @f_date, @f_salesman, SL::DB::Manager::Order->type_filter('purchase_order') ]]), - sales_invoices => SL::DB::Manager::Invoice->get_all( where => [ and => [ @f_date, @f_salesman, ]]), - purchase_invoices => SL::DB::Manager::PurchaseInvoice->get_all(where => [ and => \@f_date ]), - periodic_invoices_cfg => SL::DB::Manager::PeriodicInvoicesConfig->get_all(where => [ active => 1, $self->salesman_id ? ('order.salesman_id' => $self->salesman_id) : () ], with_objects => [ qw(order) ]), - }); - - $self->objects->{sales_orders} = [ grep { !$_->periodic_invoices_config || !$_->periodic_invoices_config->active } @{ $self->objects->{sales_orders} } ]; -} -=cut - 1; diff --git a/menus/user/00-erp.yaml b/menus/user/00-erp.yaml index 53d0586b4..57fc96a8e 100644 --- a/menus/user/00-erp.yaml +++ b/menus/user/00-erp.yaml @@ -833,6 +833,17 @@ access: report params: action: LiquidityProjection/show +- id: mebil + name: Mebil + icon: report + order: 750 +- parent: mebil + id: mebil_showmap + name: Mebil Map + order: 100 + access: report + params: + action: Mebil/showmap - id: batch_printing name: Batch Printing icon: printing -- 2.20.1