From: Michael Wagner Date: Tue, 8 Mar 2022 16:18:42 +0000 (+0100) Subject: epic-ts X-Git-Tag: kivitendo-mebil_0.1-0~9^2~2 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=d4925a8b60f04674885e30d9316dc0263f8b9a84;hp=525c5931383d1c7281c2d7bcabffe317c60ffe02;p=kivitendo-erp.git epic-ts --- diff --git a/SL/Controller/Mebil.pm b/SL/Controller/Mebil.pm index db4a84b11..03a891770 100644 --- a/SL/Controller/Mebil.pm +++ b/SL/Controller/Mebil.pm @@ -51,6 +51,10 @@ 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"; diff --git a/SL/DB/Helper/Mappings.pm b/SL/DB/Helper/Mappings.pm index 94f7e4744..5fc68552f 100644 --- a/SL/DB/Helper/Mappings.pm +++ b/SL/DB/Helper/Mappings.pm @@ -156,6 +156,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 index 000000000..6ccaa0821 --- /dev/null +++ b/SL/DB/Manager/MebilMapping.pm @@ -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 index 000000000..785380ff7 --- /dev/null +++ b/SL/DB/MebilMapping.pm @@ -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 index 000000000..a68fc4c4e --- /dev/null +++ b/SL/DB/MetaSetup/MebilMapping.pm @@ -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; +;