Um (derzeit) alle Traceausgaben zu bekommen in der lx-erp.conf $global_trabce_subs = 2; setzen.
Debugausgaben entfernt.
parse_amount, format_amount und round_amount auf tracelevel 2 gesetzt. Trace breaker in parse_amount gefixt.
[Merge der Revisionen 943:945 957 aus dem LINET prog Repo]
use HTML::Template;
sub _input_to_hash {
use HTML::Template;
sub _input_to_hash {
- $main::lxdebug->enter_sub();
+ $main::lxdebug->enter_sub(2);
my $input = $_[0];
my %in = ();
my $input = $_[0];
my %in = ();
$in{$name} = unescape(undef, $value);
}
$in{$name} = unescape(undef, $value);
}
- $main::lxdebug->leave_sub();
+ $main::lxdebug->leave_sub(2);
return %in;
}
sub _request_to_hash {
return %in;
}
sub _request_to_hash {
- $main::lxdebug->enter_sub();
+ $main::lxdebug->enter_sub(2);
my ($input) = @_;
my ($i, $loc, $key, $val);
my ($input) = @_;
my ($i, $loc, $key, $val);
- $main::lxdebug->leave_sub();
+ $main::lxdebug->leave_sub(2);
- $main::lxdebug->leave_sub();
+ $main::lxdebug->leave_sub(2);
return _input_to_hash($input);
}
}
return _input_to_hash($input);
}
}
- $main::lxdebug->enter_sub();
+ $main::lxdebug->enter_sub(2);
my ($self, $str, $beenthere) = @_;
my ($self, $str, $beenthere) = @_;
$str =~ s/([^a-zA-Z0-9_.-])/sprintf("%%%02x", ord($1))/ge;
$str =~ s/([^a-zA-Z0-9_.-])/sprintf("%%%02x", ord($1))/ge;
- $main::lxdebug->leave_sub();
+ $main::lxdebug->leave_sub(2);
return $str;
}
sub unescape {
return $str;
}
sub unescape {
- $main::lxdebug->enter_sub();
+ $main::lxdebug->enter_sub(2);
$str =~ s/%([0-9a-fA-Z]{2})/pack("c",hex($1))/eg;
$str =~ s/%([0-9a-fA-Z]{2})/pack("c",hex($1))/eg;
- $main::lxdebug->leave_sub();
+ $main::lxdebug->leave_sub(2);
- $main::lxdebug->enter_sub();
+ $main::lxdebug->enter_sub(2);
my ($self, $myconfig, $amount, $places, $dash) = @_;
my ($self, $myconfig, $amount, $places, $dash) = @_;
- $main::lxdebug->leave_sub();
+ $main::lxdebug->leave_sub(2);
return $amount;
}
sub parse_amount {
return $amount;
}
sub parse_amount {
- $main::lxdebug->enter_sub();
+ $main::lxdebug->enter_sub(2);
my ($self, $myconfig, $amount) = @_;
my ($self, $myconfig, $amount) = @_;
- $main::lxdebug->message(LXDebug::DEBUG2, "Start amount: $amount");
if ($myconfig->{in_numberformat} == 1) {
if ($myconfig->{in_numberformat} == 1) {
# Extra input number format 1000.00 or 1000,00
# Extra input number format 1000.00 or 1000,00
- $main::lxdebug->message(LXDebug::DEBUG2,
- "in_numberformat: " . $main::locale->text('1000,00 or 1000.00'));
-
- #$main::lxdebug->message(LXDebug::DEBUG2, "1.Parsed Number: $amount") if ($amount);
$amount = scalar reverse $amount;
$amount = scalar reverse $amount;
-
- #$main::lxdebug->message(LXDebug::DEBUG2, "2.Parsed Number: $amount") if ($amount);
-
- #$main::lxdebug->message(LXDebug::DEBUG2, "3.Parsed Number: $amount") if ($amount);
-
- #$main::lxdebug->message(LXDebug::DEBUG2, "4.Parsed Number: $amount") if ($amount);
-
- #$main::lxdebug->message(LXDebug::DEBUG2, "5.Parsed Number:" . $amount) if ($amount);
$amount = scalar reverse $amount;
$amount = scalar reverse $amount;
- $main::lxdebug->message(LXDebug::DEBUG2,
- "Parsed amount:" . $amount . "\n");
-
+ $main::lxdebug->leave_sub(2);
- $main::lxdebug->message(LXDebug::DEBUG2,
- "in_numberformat: " . $main::locale->text('equal Outputformat'));
- $main::lxdebug->message(LXDebug::DEBUG2,
- " = numberformat: $myconfig->{numberformat}");
if ( ($myconfig->{numberformat} eq '1.000,00')
|| ($myconfig->{numberformat} eq '1000,00')) {
$amount =~ s/\.//g;
if ( ($myconfig->{numberformat} eq '1.000,00')
|| ($myconfig->{numberformat} eq '1000,00')) {
$amount =~ s/\.//g;
- $main::lxdebug->message(LXDebug::DEBUG2, "Parsed amount:" . $amount . "\n")
- if ($amount);
- $main::lxdebug->leave_sub();
+ $main::lxdebug->leave_sub(2);
return ($amount * 1);
}
sub round_amount {
return ($amount * 1);
}
sub round_amount {
- $main::lxdebug->enter_sub();
+ $main::lxdebug->enter_sub(2);
my ($self, $amount, $places) = @_;
my $round_amount;
my ($self, $amount, $places) = @_;
my $round_amount;
$amount = $amount * (10**($places));
$round_amount = int($amount + .5 * ($amount <=> 0)) / (10**($places));
$amount = $amount * (10**($places));
$round_amount = int($amount + .5 * ($amount <=> 0)) / (10**($places));
- $main::lxdebug->leave_sub();
+ $main::lxdebug->leave_sub(2);
+ my ($self, $level) = @_;
+
+ return if $global_trace_subs < $level;
if (!$self->{"trace_subs"} && !$global_trace_subs) {
return;
if (!$self->{"trace_subs"} && !$global_trace_subs) {
return;
+ my ($self, $level) = @_;
+
+ return if $global_trace_subs < $level;
if (!$self->{"trace_subs"} && !$global_trace_subs) {
return;
if (!$self->{"trace_subs"} && !$global_trace_subs) {
return;
- $main::lxdebug->enter_sub();
+ $main::lxdebug->enter_sub(2);
my ($self, $myconfig, $menulevel) = @_;
my ($self, $myconfig, $menulevel) = @_;
@a = ();
map { push @a, $_ unless $excl{$_} } (@menu);
@a = ();
map { push @a, $_ unless $excl{$_} } (@menu);
- $main::lxdebug->leave_sub();
+ $main::lxdebug->leave_sub(2);
## LINET
sub calc_version {
## LINET
sub calc_version {
- $main::lxdebug->enter_sub();
+ $main::lxdebug->enter_sub(2);
- $main::lxdebug->leave_sub();
+ $main::lxdebug->leave_sub(2);
last if ($version < $mindb);
# apply upgrade
last if ($version < $mindb);
# apply upgrade
+ $main::lxdebug->message(DEBUG2, "Appliying Update $upgradescript");
$self->process_query($form, $dbh, "sql/" . $form->{"dbdriver"} . "-upgrade/$upgradescript", $str_maxdb);
$version = $maxdb;
$self->process_query($form, $dbh, "sql/" . $form->{"dbdriver"} . "-upgrade/$upgradescript", $str_maxdb);
$version = $maxdb;