use SL::DB;
use SL::Form;
use SL::LXDebug;
+use SL::DB::Manager::MebilMapping;
$::lxdebug = new LXDebug;
#$::form = new Form;
#my $dbh = $::form->get_standard_dbh;
SL::DB->register_db(
+ domain => 'KIVITENDO',
+ type => 'KIVITENDO',
driver => 'Pg',
- database => 'dev_db',
+ database => 'firma',
host => 'localhost',
username => 'kivitendo',
- password => 'kivitemdo',
+ password => 'kivitendo',
);
-#my $db = SL::DB::client;
+my $db = SL::DB->new(domain => 'KIVITENDO',
+ type => 'KIVITENDO',);
+my $dbh = $db->dbh;
-#my $dbh = SL::DB::dbi_connect("dbi:driver=Pg;dbname=firma;host=localhost;port=5432", "kivitendo", "kivitendo");
-my $db = SL::DB->new;
+#$dbh->do("SELECT * FROM mebil_mapping");
-my $m = new SL::Controller::Mebil;
-$m->action_calcmap;
+#$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");
+}