projects
/
kivitendo-erp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
test action
[kivitendo-erp.git]
/
Test
/
perl
/
test_action.pl
diff --git
a/Test/perl/test_action.pl
b/Test/perl/test_action.pl
index
904bb23
..
5611dac
100755
(executable)
--- 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;
use SL::Form;
use SL::LXDebug;
+use SL::DB::Manager::MebilMapping;
$::lxdebug = new LXDebug;
#$::form = new Form;
$::lxdebug = new LXDebug;
#$::form = new Form;
@@
-12,17
+13,26
@@
$::lxdebug = new LXDebug;
#my $dbh = $::form->get_standard_dbh;
SL::DB->register_db(
#my $dbh = $::form->get_standard_dbh;
SL::DB->register_db(
+ domain => 'KIVITENDO',
+ type => 'KIVITENDO',
driver => 'Pg',
driver => 'Pg',
- database => '
dev_db
',
+ database => '
firma
',
host => 'localhost',
username => 'kivitendo',
host => 'localhost',
username => 'kivitendo',
- password => 'kivite
m
do',
+ password => 'kivite
n
do',
);
);
-#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");
+}