return;
}
- my ($stylesheet, $favicon);
+ my ($stylesheet, $favicon, $pagelayout);
if ($ENV{HTTP_USER_AGENT}) {
my $doctype;
? "$self->{title} - $self->{titlebar}"
: $self->{titlebar};
my $ajax = "";
- foreach $item (@ { $self->{AJAX} }) {
+ foreach my $item (@ { $self->{AJAX} }) {
$ajax .= $item->show_javascript();
}
$add_params->{SHOW_BACK_BUTTON} = 1;
}
- $self->{title} = $title if ($title);
+ $self->{title} = $params{title} if $params{title};
$self->header();
print $self->parse_html_template("generic/error", $add_params);
$main::lxdebug->leave_sub();
- die("Information: $error\n");
+ die("Information: $text\n");
}
# write Trigger JavaScript-Code ($qty = quantity of Triggers)
"yyyy-mm-dd" => "%Y-%m-%d",
);
- my $ifFormat = defined($dateformats{$myconfig{"dateformat"}}) ?
- $dateformats{$myconfig{"dateformat"}} : "%d.%m.%Y";
+ my $ifFormat = defined($dateformats{$myconfig->{"dateformat"}}) ?
+ $dateformats{$myconfig->{"dateformat"}} : "%d.%m.%Y";
my @triggers;
while ($#_ >= 2) {
if ($self->{callback}) {
- ($script, $argv) = split(/\?/, $self->{callback}, 2);
+ my ($script, $argv) = split(/\?/, $self->{callback}, 2);
$script =~ s|.*/||;
$script =~ s|[^a-zA-Z0-9_\.]||g;
exec("perl", "$script", $argv);
$amount *= $conv_unit->{factor};
my @values;
+ my $num;
foreach my $unit (@$conv_units) {
my $last = $unit->{name} eq $part_unit->{name};
$main::lxdebug->enter_sub();
my ($self, $date, $myconfig) = @_;
+ my ($yy, $mm, $dd);
if ($date && $date =~ /\D/) {
my ($self, $myconfig) = @_;
# connect to database
- $dbh =
+ my $dbh =
DBI->connect($myconfig->{dbconnect}, $myconfig->{dbuser},
$myconfig->{dbpasswd}, { AutoCommit => 0 })
or $self->dberror;
$main::lxdebug->enter_sub();
my ($self, $dbh, $params) = @_;
+ my ($key);
$key = $params->{key};
$key = "all_charts" unless ($key);
my ($self, $dbh, $key, $limit) = @_;
$key = "all_customers" unless ($key);
- $limit_clause = "LIMIT $limit" if $limit;
+ my $limit_clause = "LIMIT $limit" if $limit;
my $query = qq|SELECT * FROM customer WHERE NOT obsolete ORDER BY name $limit_clause|;
$main::lxdebug->leave_sub();
}
-sub _get_groups {
- $main::lxdebug->enter_sub();
-
- my ($self, $dbh, $key) = @_;
-
- $key ||= "all_groups";
-
- my $groups = $main::auth->read_groups();
-
- $self->{$key} = selectall_hashref_query($self, $dbh, $query);
-
- $main::lxdebug->leave_sub();
-}
+#sub _get_groups {
+# $main::lxdebug->enter_sub();
+#
+# my ($self, $dbh, $key) = @_;
+#
+# $key ||= "all_groups";
+#
+# my $groups = $main::auth->read_groups();
+#
+# $self->{$key} = selectall_hashref_query($self, $dbh, $query);
+#
+# $main::lxdebug->leave_sub();
+#}
sub get_lists {
$main::lxdebug->enter_sub();
$self->_get_warehouses($dbh, $params{warehouses});
}
- if ($params{groups}) {
- $self->_get_groups($dbh, $params{groups});
- }
+# if ($params{groups}) {
+# $self->_get_groups($dbh, $params{groups});
+# }
+
if ($params{partsgroup}) {
$self->get_partsgroup(\%main::myconfig, { all => 1, target => $params{partsgroup} });
}
do_statement($self, $sth, $query, '%' . $module . '%');
$self->{accounts} = "";
- while ($ref = $sth->fetchrow_hashref(NAME_lc)) {
+ while ($ref = $sth->fetchrow_hashref("NAME_lc")) {
foreach my $key (split(/:/, $ref->{link})) {
if ($key =~ /\Q$module\E/) {
WHERE a.id = ?|;
$ref = selectfirst_hashref_query($self, $dbh, $query, $self->{id});
- foreach $key (keys %$ref) {
+ foreach my $key (keys %$ref) {
$self->{$key} = $ref->{$key};
}
do_statement($self, $sth, $query, "%$module%");
$self->{accounts} = "";
- while ($ref = $sth->fetchrow_hashref(NAME_lc)) {
+ while ($ref = $sth->fetchrow_hashref("NAME_lc")) {
foreach my $key (split(/:/, $ref->{link})) {
if ($key =~ /\Q$module\E/) {
my $index = 0;
# store amounts in {acc_trans}{$key} for multiple accounts
- while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
+ while (my $ref = $sth->fetchrow_hashref("NAME_lc")) {
$ref->{exchangerate} =
$self->get_exchangerate($dbh, $self->{currency}, $ref->{transdate}, $fld);
if (!($xkeyref{ $ref->{accno} } =~ /tax/)) {
# fill rows
foreach my $item (sort { $a->{num} <=> $b->{num} } @ndx) {
$i++;
- $j = $item->{ndx} - 1;
+ my $j = $item->{ndx} - 1;
map { $self->{"${_}_$i"} = $new->[$j]->{$_} } @{$flds};
}