use strict;
use lib "/opt/kivitendo-erp";
+use lib "perl";
use SL::LXDebug;
use SL::mebil::Mapping;
-use Test::perl::ErrorChannel;
+use ErrorChannel;
$::lxdebug = new LXDebug;
my $mapper = new SL::mebil::Mapping($errch, $dbh);
my $command = $ARGV[0];
-if ($command eq "GetMapping") {
+if ($command eq "ShowMapping") {
my $mapping = $mapper->get_mapping();
foreach (@$mapping) {
print $_->{fromacc}."\n";
}
die ("Kein Mapping vorhanden.") unless (scalar(@$mapping) > 0);
} elsif ($command eq "CalcMapping") {
- die ("NIY.");
+ (my $fromacc, my $toacc) = $mapper->calc_mapping(2022);
} else {
die "Invalid command: $command";
}