X-Git-Url: http://wagnertech.de/git?p=kivitendo-erp.git;a=blobdiff_plain;f=Test%2Fperl%2Ftest_action.pl;fp=Test%2Fperl%2Ftest_action.pl;h=5611dace269b2e7cbbb35266a8ab7a5f67366771;hp=0f2e02ab89de1170820a4b83518005a354824850;hb=2d0387d1624b5b7ed6b13b79b9d5a87ce9b6d12b;hpb=8e083c4270414505dcf58f4732be2ea6c65c5120 diff --git a/Test/perl/test_action.pl b/Test/perl/test_action.pl index 0f2e02ab8..5611dace2 100755 --- a/Test/perl/test_action.pl +++ b/Test/perl/test_action.pl @@ -5,6 +5,7 @@ use strict; use SL::DB; use SL::Form; use SL::LXDebug; +use SL::DB::Manager::MebilMapping; $::lxdebug = new LXDebug; #$::form = new Form; @@ -12,6 +13,8 @@ $::lxdebug = new LXDebug; #my $dbh = $::form->get_standard_dbh; SL::DB->register_db( + domain => 'KIVITENDO', + type => 'KIVITENDO', driver => 'Pg', database => 'firma', host => 'localhost', @@ -19,8 +22,17 @@ SL::DB->register_db( password => 'kivitendo', ); -my $db = SL::DB->new; +my $db = SL::DB->new(domain => 'KIVITENDO', + type => 'KIVITENDO',); my $dbh = $db->dbh; -my $m = new SL::Controller::Mebil; -$m->action_calcmap; +#$dbh->do("SELECT * FROM mebil_mapping"); + +#$db->begin_work or die $db->error; +#my $m = new SL::Controller::Mebil; +#$m->action_calcmap; +my $mappings = SL::DB::Manager::MebilMapping->get_objects(dbh => $dbh); + +foreach my $map (@$mappings) { + print ("$map\n"); +}