epic-ts
authorMichael Wagner <michael@wagnertech.de>
Tue, 8 Mar 2022 16:18:42 +0000 (17:18 +0100)
committerMichael Wagner <michael@wagnertech.de>
Tue, 8 Mar 2022 16:18:42 +0000 (17:18 +0100)
SL/Controller/Mebil.pm
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]

index db4a84b..03a8917 100644 (file)
@@ -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";
index 94f7e47..5fc6855 100644 (file)
@@ -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 (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;
+;