epic-s6g
[kivitendo-erp.git] / SL / Controller / Mebil.pm
index 570e070..dbb8c2d 100644 (file)
@@ -13,6 +13,8 @@ use SL::Locale::String;  # t8
 #use Data::Dumper;
 #use SL::ClientJS;
 
+use SL::mebil::Mapping;
+
 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) ],
@@ -56,8 +58,8 @@ sub action_showmap {
        
        $::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 $mapping = new SL::mebil::Mapping($::form, $::form->get_standard_dbh);
+       $self->{data} = $mapping->get_mapping();
 
        $self->prepare_report;
        $self->list_data;