X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=Test%2Fperl%2Ftest_action.pl;h=5611dace269b2e7cbbb35266a8ab7a5f67366771;hb=2d0387d1624b5b7ed6b13b79b9d5a87ce9b6d12b;hp=4e78f919fa0b315e6b06457a0ac04d942c20ae55;hpb=2577cacd03a8c97ee2217a2ff3ef90958c94542e;p=kivitendo-erp.git diff --git a/Test/perl/test_action.pl b/Test/perl/test_action.pl index 4e78f919f..5611dace2 100755 --- a/Test/perl/test_action.pl +++ b/Test/perl/test_action.pl @@ -1,15 +1,38 @@ #!/usr/bin/perl use strict; -use SL::Controller::Mebil; +#use SL::Controller::Mebil; use SL::DB; +use SL::Form; use SL::LXDebug; +use SL::DB::Manager::MebilMapping; $::lxdebug = new LXDebug; +#$::form = new Form; -my $db = new SL::DB; +#my $dbh = $::form->get_standard_dbh; -my $dbi = $db->dbi_connect("dbname=firma;host=localhost;port=5432", "kivitendo", "kivitendo"); +SL::DB->register_db( + domain => 'KIVITENDO', + type => 'KIVITENDO', + driver => 'Pg', + database => 'firma', + host => 'localhost', + username => 'kivitendo', + password => 'kivitendo', +); -my $m = new SL::Controller::Mebil; -$m->action_calcmap; +my $db = SL::DB->new(domain => 'KIVITENDO', + type => 'KIVITENDO',); +my $dbh = $db->dbh; + +#$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"); +}