epic-ts
authorMichael Wagner <michael@wagnertech.de>
Mon, 25 Oct 2021 14:48:15 +0000 (16:48 +0200)
committerMichael Wagner <michael@wagnertech.de>
Mon, 25 Oct 2021 14:48:15 +0000 (16:48 +0200)
SL/Controller/Mebil.pm
menus/user/00-erp.yaml

index f16f6cb..903312f 100644 (file)
@@ -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 "<h1>Mebil-Mapping</h1>";
-       print "<p>Folgende Zuordnungen sind in der DB hinterlegt:";
 
-       
-       print "<table><tr><th>Konto</th><th>Ziel</th></tr>\n";
-       foreach my $mapping (@{ $self->{data} }) {
-               print "<tr><td>",$mapping->{chart_id},"</td><td>",$mapping->{xbrl_tag},"</td></tr>\n";
-       } 
-       print "</table>\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;
index 53d0586..57fc96a 100644 (file)
   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