5611dace269b2e7cbbb35266a8ab7a5f67366771
[kivitendo-erp.git] / Test / perl / test_action.pl
1 #!/usr/bin/perl
2 use strict;
3
4 #use SL::Controller::Mebil;
5 use SL::DB;
6 use SL::Form;
7 use SL::LXDebug;
8 use SL::DB::Manager::MebilMapping;
9
10 $::lxdebug = new LXDebug;
11 #$::form    = new Form;
12
13 #my $dbh = $::form->get_standard_dbh;
14
15 SL::DB->register_db(
16   domain   => 'KIVITENDO',
17   type     => 'KIVITENDO',
18   driver   => 'Pg',
19   database => 'firma',
20   host     => 'localhost',
21   username => 'kivitendo',
22   password => 'kivitendo',
23 );
24
25 my $db = SL::DB->new(domain   => 'KIVITENDO',
26   type     => 'KIVITENDO',);
27 my $dbh = $db->dbh;
28
29 #$dbh->do("SELECT * FROM mebil_mapping");
30
31 #$db->begin_work or die $db->error;
32 #my $m = new SL::Controller::Mebil;
33 #$m->action_calcmap;
34 my $mappings = SL::DB::Manager::MebilMapping->get_objects(dbh => $dbh);
35
36 foreach my $map (@$mappings) {
37          print ("$map\n");
38 }