use Carp;
use Data::Dumper;
+use Encode;
use SL::DBUtils;
+use strict;
+
sub get_account {
$main::lxdebug->enter_sub();
};
- $main::lxdebug->message(LXDebug::QUERY, "\$query=\n $query");
+ $main::lxdebug->message(LXDebug->QUERY(), "\$query=\n $query");
my $sth = $dbh->prepare($query);
$sth->execute($form->{id}) || $form->dberror($query . " ($form->{id})");
- my $ref = $sth->fetchrow_hashref(NAME_lc);
+ my $ref = $sth->fetchrow_hashref("NAME_lc");
foreach my $key (keys %$ref) {
$form->{"$key"} = $ref->{"$key"};
# get default accounts
$query = qq|SELECT inventory_accno_id, income_accno_id, expense_accno_id
FROM defaults|;
- $main::lxdebug->message(LXDebug::QUERY, "\$query=\n $query");
+ $main::lxdebug->message(LXDebug->QUERY(), "\$query=\n $query");
$sth = $dbh->prepare($query);
$sth->execute || $form->dberror($query);
- $ref = $sth->fetchrow_hashref(NAME_lc);
+ $ref = $sth->fetchrow_hashref("NAME_lc");
- map { $form->{$_} = $ref->{$_} } keys %ref;
+ map { $form->{$_} = $ref->{$_} } keys %{ $ref };
$sth->finish;
rate
FROM tax ORDER BY taxkey
};
- $main::lxdebug->message(LXDebug::QUERY, "\$query=\n $query");
+ $main::lxdebug->message(LXDebug->QUERY(), "\$query=\n $query");
$sth = $dbh->prepare($query);
$sth->execute || $form->dberror($query);
$form->{TAXKEY} = [];
- while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
+ while (my $ref = $sth->fetchrow_hashref("NAME_lc")) {
push @{ $form->{TAXKEY} }, $ref;
}
FROM chart
WHERE link = ?
ORDER BY accno|;
- $main::lxdebug->message(LXDebug::QUERY, "\$query=\n $query");
+ $main::lxdebug->message(LXDebug->QUERY(), "\$query=\n $query");
$sth = $dbh->prepare($query);
$sth->execute($form->{link}) || $form->dberror($query . " ($form->{link})");
$form->{NEWACCOUNT} = [];
- while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
+ while (my $ref = $sth->fetchrow_hashref("NAME_lc")) {
push @{ $form->{NEWACCOUNT} }, $ref;
}
WHERE tk.chart_id = ?
ORDER BY startdate DESC
};
- $main::lxdebug->message(LXDebug::QUERY, "\$query=\n $query");
+ $main::lxdebug->message(LXDebug->QUERY(), "\$query=\n $query");
$sth = $dbh->prepare($query);
$sth->execute($form->{id}) || $form->dberror($query . " ($form->{id})");
$form->{ACCOUNT_TAXKEYS} = [];
- while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
+ while (my $ref = $sth->fetchrow_hashref("NAME_lc")) {
push @{ $form->{ACCOUNT_TAXKEYS} }, $ref;
}
# check if we have any transactions
$query = qq|SELECT a.trans_id FROM acc_trans a
WHERE a.chart_id = ?|;
- $main::lxdebug->message(LXDebug::QUERY, "\$query=\n $query");
+ $main::lxdebug->message(LXDebug->QUERY(), "\$query=\n $query");
$sth = $dbh->prepare($query);
$sth->execute($form->{id}) || $form->dberror($query . " ($form->{id})");
if ($form->{new_chart_id}) {
$query = qq|SELECT current_date-valid_from FROM chart
WHERE id = ?|;
- $main::lxdebug->message(LXDebug::QUERY, "\$query=\n $query");
+ $main::lxdebug->message(LXDebug->QUERY(), "\$query=\n $query");
my ($count) = selectrow_query($form, $dbh, $query, $form->{id});
if ($count >=0) {
$form->{new_chart_valid} = 1;
FROM department d
ORDER BY 2|;
- $sth = $dbh->prepare($query);
+ my $sth = $dbh->prepare($query);
$sth->execute || $form->dberror($query);
$form->{ALL} = [];
- while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
+ while (my $ref = $sth->fetchrow_hashref("NAME_lc")) {
push @{ $form->{ALL} }, $ref;
}
my $sth = $dbh->prepare($query);
$sth->execute($form->{id}) || $form->dberror($query . " ($form->{id})");
- my $ref = $sth->fetchrow_hashref(NAME_lc);
+ my $ref = $sth->fetchrow_hashref("NAME_lc");
map { $form->{$_} = $ref->{$_} } keys %$ref;
$main::lxdebug->enter_sub();
my ($self, $myconfig, $form) = @_;
+ my ($query);
# connect to database
my $dbh = $form->dbconnect($myconfig);
$main::lxdebug->enter_sub();
my ($self, $myconfig, $form) = @_;
+ my ($query);
# connect to database
my $dbh = $form->dbconnect($myconfig);
FROM leads
ORDER BY 2|;
- $sth = $dbh->prepare($query);
+ my $sth = $dbh->prepare($query);
$sth->execute || $form->dberror($query);
- while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
+ while (my $ref = $sth->fetchrow_hashref("NAME_lc")) {
push @{ $form->{ALL} }, $ref;
}
my $sth = $dbh->prepare($query);
$sth->execute($form->{id}) || $form->dberror($query . " ($form->{id})");
- my $ref = $sth->fetchrow_hashref(NAME_lc);
+ my $ref = $sth->fetchrow_hashref("NAME_lc");
map { $form->{$_} = $ref->{$_} } keys %$ref;
$main::lxdebug->enter_sub();
my ($self, $myconfig, $form) = @_;
+ my ($query);
# connect to database
my $dbh = $form->dbconnect($myconfig);
$main::lxdebug->enter_sub();
my ($self, $myconfig, $form) = @_;
+ my ($query);
# connect to database
my $dbh = $form->dbconnect($myconfig);
# connect to database
my $dbh = $form->dbconnect($myconfig);
- my $query = qq|SELECT id, description, discount, customernumberinit
+ my $query = qq|SELECT id, description, discount, customernumberinit, salesman
FROM business
ORDER BY 2|;
- $sth = $dbh->prepare($query);
+ my $sth = $dbh->prepare($query);
$sth->execute || $form->dberror($query);
- while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
+ while (my $ref = $sth->fetchrow_hashref("NAME_lc")) {
push @{ $form->{ALL} }, $ref;
}
my $dbh = $form->dbconnect($myconfig);
my $query =
- qq|SELECT b.description, b.discount, b.customernumberinit
+ qq|SELECT b.description, b.discount, b.customernumberinit, b.salesman
FROM business b
WHERE b.id = ?|;
my $sth = $dbh->prepare($query);
$sth->execute($form->{id}) || $form->dberror($query . " ($form->{id})");
- my $ref = $sth->fetchrow_hashref(NAME_lc);
+ my $ref = $sth->fetchrow_hashref("NAME_lc");
map { $form->{$_} = $ref->{$_} } keys %$ref;
$main::lxdebug->enter_sub();
my ($self, $myconfig, $form) = @_;
+ my ($query);
# connect to database
my $dbh = $form->dbconnect($myconfig);
- my @values = ($form->{description}, $form->{discount},
- $form->{customernumberinit});
+ my @values = ($form->{description}, $form->{discount}, $form->{customernumberinit}, $form->{salesman} ? 't' : 'f');
# id is the old record
if ($form->{id}) {
$query = qq|UPDATE business SET
description = ?,
discount = ?,
- customernumberinit = ?
+ customernumberinit = ?,
+ salesman = ?
WHERE id = ?|;
push(@values, $form->{id});
} else {
$query = qq|INSERT INTO business
- (description, discount, customernumberinit)
- VALUES (?, ?, ?)|;
+ (description, discount, customernumberinit, salesman)
+ VALUES (?, ?, ?, ?)|;
}
do_query($form, $dbh, $query, @values);
# connect to database
my $dbh = $form->dbconnect($myconfig);
- $query = qq|DELETE FROM business
+ my $query = qq|DELETE FROM business
WHERE id = ?|;
do_query($form, $dbh, $query, $form->{id});
" output_numberformat, output_dateformat, output_longdates " .
"FROM language ORDER BY description";
- $sth = $dbh->prepare($query);
+ my $sth = $dbh->prepare($query);
$sth->execute || $form->dberror($query);
my $ary = [];
- while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
+ while (my $ref = $sth->fetchrow_hashref("NAME_lc")) {
push(@{ $ary }, $ref);
}
my $sth = $dbh->prepare($query);
$sth->execute($form->{"id"}) || $form->dberror($query . " ($form->{id})");
- my $ref = $sth->fetchrow_hashref(NAME_lc);
+ my $ref = $sth->fetchrow_hashref("NAME_lc");
map { $form->{$_} = $ref->{$_} } keys %$ref;
$main::lxdebug->enter_sub();
my ($self, $myconfig, $form) = @_;
+ my $query;
# connect to database
my $dbh = $form->dbconnect_noauto($myconfig);
foreach my $table (qw(translation_payment_terms units_language)) {
- my $query = qq|DELETE FROM $table WHERE language_id = ?|;
+ $query = qq|DELETE FROM $table WHERE language_id = ?|;
do_query($form, $dbh, $query, $form->{"id"});
}
FROM buchungsgruppen
ORDER BY sortkey|;
- $sth = $dbh->prepare($query);
+ my $sth = $dbh->prepare($query);
$sth->execute || $form->dberror($query);
$form->{ALL} = [];
- while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
+ while (my $ref = $sth->fetchrow_hashref("NAME_lc")) {
push @{ $form->{ALL} }, $ref;
}
my $sth = $dbh->prepare($query);
$sth->execute($form->{id}) || $form->dberror($query . " ($form->{id})");
- my $ref = $sth->fetchrow_hashref(NAME_lc);
+ my $ref = $sth->fetchrow_hashref("NAME_lc");
map { $form->{$_} = $ref->{$_} } keys %$ref;
my $sth = $dbh->prepare($query);
$sth->execute || $form->dberror($query);
- while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
+ while (my $ref = $sth->fetchrow_hashref("NAME_lc")) {
foreach my $key (split(/:/, $ref->{link})) {
if (!$form->{"std_inventory_accno_id"} && ($key eq "IC")) {
$form->{"std_inventory_accno_id"} = $ref->{"id"};
# connect to database
my $dbh = $form->dbconnect($myconfig);
- $query = qq|DELETE FROM buchungsgruppen WHERE id = ?|;
+ my $query = qq|DELETE FROM buchungsgruppen WHERE id = ?|;
do_query($form, $dbh, $query, $form->{id});
$dbh->disconnect;
$main::lxdebug->leave_sub();
}
-sub printer {
- $main::lxdebug->enter_sub();
-
- my ($self, $myconfig, $form) = @_;
-
- # connect to database
- my $dbh = $form->dbconnect($myconfig);
-
- my $query = qq|SELECT id, printer_description, template_code, printer_command
- FROM printers
- ORDER BY 2|;
-
- $sth = $dbh->prepare($query);
- $sth->execute || $form->dberror($query);
-
- $form->{"ALL"} = [];
- while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
- push @{ $form->{ALL} }, $ref;
- }
-
- $sth->finish;
- $dbh->disconnect;
-
- $main::lxdebug->leave_sub();
-}
-
-sub get_printer {
- $main::lxdebug->enter_sub();
-
- my ($self, $myconfig, $form) = @_;
-
- # connect to database
- my $dbh = $form->dbconnect($myconfig);
-
- my $query =
- qq|SELECT p.printer_description, p.template_code, p.printer_command
- FROM printers p
- WHERE p.id = ?|;
- my $sth = $dbh->prepare($query);
- $sth->execute($form->{id}) || $form->dberror($query . " ($form->{id})");
-
- my $ref = $sth->fetchrow_hashref(NAME_lc);
-
- map { $form->{$_} = $ref->{$_} } keys %$ref;
-
- $sth->finish;
-
- $dbh->disconnect;
-
- $main::lxdebug->leave_sub();
-}
-
-sub save_printer {
- $main::lxdebug->enter_sub();
-
- my ($self, $myconfig, $form) = @_;
-
- # connect to database
- my $dbh = $form->dbconnect($myconfig);
-
- my @values = ($form->{printer_description},
- $form->{template_code},
- $form->{printer_command});
-
- # id is the old record
- if ($form->{id}) {
- $query = qq|UPDATE printers SET
- printer_description = ?, template_code = ?, printer_command = ?
- WHERE id = ?|;
- push(@values, $form->{id});
- } else {
- $query = qq|INSERT INTO printers
- (printer_description, template_code, printer_command)
- VALUES (?, ?, ?)|;
- }
- do_query($form, $dbh, $query, @values);
-
- $dbh->disconnect;
-
- $main::lxdebug->leave_sub();
-}
-
-sub delete_printer {
- $main::lxdebug->enter_sub();
-
- my ($self, $myconfig, $form) = @_;
-
- # connect to database
- my $dbh = $form->dbconnect($myconfig);
-
- $query = qq|DELETE FROM printers
- WHERE id = ?|;
- do_query($form, $dbh, $query, $form->{id});
-
- $dbh->disconnect;
-
- $main::lxdebug->leave_sub();
-}
-
sub payment {
$main::lxdebug->enter_sub();
my $query = qq|SELECT * FROM payment_terms ORDER BY sortkey|;
- $sth = $dbh->prepare($query);
+ my $sth = $dbh->prepare($query);
$sth->execute || $form->dberror($query);
$form->{ALL} = [];
- while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
+ while (my $ref = $sth->fetchrow_hashref("NAME_lc")) {
push @{ $form->{ALL} }, $ref;
}
my $sth = $dbh->prepare($query);
$sth->execute($form->{"id"}) || $form->dberror($query . " ($form->{id})");
- my $ref = $sth->fetchrow_hashref(NAME_lc);
+ my $ref = $sth->fetchrow_hashref("NAME_lc");
map { $form->{$_} = $ref->{$_} } keys %$ref;
$sth->finish();
$sth->execute($form->{"id"}) || $form->dberror($query . " ($form->{id})");
my %mapping;
- while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
+ while (my $ref = $sth->fetchrow_hashref("NAME_lc")) {
$mapping{ $ref->{"language_id"} } = $ref
unless (defined($mapping{ $ref->{"language_id"} }));
}
close(TEMPLATE);
}
+ $content = Encode::decode('utf-8-strict', $content) if $::locale->is_utf8;
+
$main::lxdebug->leave_sub();
return ($content, $lines);
my $error = "";
if (open(TEMPLATE, ">$filename")) {
+ $content = Encode::encode('utf-8-strict', $content) if $::locale->is_utf8;
$content =~ s/\r\n/\n/g;
print(TEMPLATE $content);
close(TEMPLATE);
my $dbh = $params{dbh} || $form->get_standard_dbh($myconfig);
my %accnos;
- map { ($accnos{$_}) = split(m/--/, $form->{$_}) } qw(inventory_accno income_accno expense_accno fxgain_accno fxloss_accno);
+ map { ($accnos{$_}) = split(m/--/, $form->{$_}) } qw(inventory_accno income_accno expense_accno fxgain_accno fxloss_accno ar_paid_accno);
$form->{curr} =~ s/ //g;
my @currencies = grep { $_ ne '' } split m/:/, $form->{curr};
expense_accno_id = (SELECT c.id FROM chart c WHERE c.accno = ?),
fxgain_accno_id = (SELECT c.id FROM chart c WHERE c.accno = ?),
fxloss_accno_id = (SELECT c.id FROM chart c WHERE c.accno = ?),
+ ar_paid_accno_id = (SELECT c.id FROM chart c WHERE c.accno = ?),
invnumber = ?,
cnnumber = ?,
sonumber = ?,
servicenumber = ?,
sdonumber = ?,
pdonumber = ?,
- yearend = ?,
curr = ?,
businessnumber = ?,
weightunit = ?|;
my @values = ($accnos{inventory_accno}, $accnos{income_accno}, $accnos{expense_accno},
- $accnos{fxgain_accno}, $accnos{fxloss_accno},
+ $accnos{fxgain_accno}, $accnos{fxloss_accno}, $accnos{ar_paid_accno},
$form->{invnumber}, $form->{cnnumber},
$form->{sonumber}, $form->{ponumber},
$form->{sqnumber}, $form->{rfqnumber},
$form->{customernumber}, $form->{vendornumber},
$form->{articlenumber}, $form->{servicenumber},
$form->{sdonumber}, $form->{pdonumber},
- $form->{yearend}, $currency,
+ $currency,
$form->{businessnumber}, $form->{weightunit});
do_query($form, $dbh, $query, @values);
sub save_preferences {
$main::lxdebug->enter_sub();
- my ($self, $myconfig, $form, $webdav) = @_;
+ my ($self, $myconfig, $form) = @_;
my $dbh = $form->get_standard_dbh($myconfig);
$myconfig->{$item} = $form->{$item};
}
- $myconfig->save_member($memberfile);
+ $myconfig->save_member;
my $auth = $main::auth;
- if ($auth->can_change_password()
- && defined $form->{new_password}
- && ($form->{new_password} ne '********')) {
- $auth->change_password($form->{login}, $form->{new_password});
-
- $form->{password} = $form->{new_password};
- $auth->set_session_value('password', $form->{password});
- $auth->create_or_refresh_session();
- }
-
- if ($webdav) {
- @webdavdirs =
- qw(angebote bestellungen rechnungen anfragen lieferantenbestellungen einkaufsrechnungen);
- foreach $directory (@webdavdirs) {
- $file = "webdav/" . $directory . "/webdav-user";
- if ($myconfig->{$directory}) {
- open(HTACCESS, "$file") or die "cannot open webdav-user $!\n";
- while (<HTACCESS>) {
- ($login, $password) = split(/:/, $_);
- if ($login ne $form->{login}) {
- $newfile .= $_;
- }
- }
- close(HTACCESS);
- open(HTACCESS, "> $file") or die "cannot open webdav-user $!\n";
- $newfile .= $myconfig->{login} . ":" . $myconfig->{password} . "\n";
- print(HTACCESS $newfile);
- close(HTACCESS);
- } else {
- $form->{$directory} = 0;
- open(HTACCESS, "$file") or die "cannot open webdav-user $!\n";
- while (<HTACCESS>) {
- ($login, $password) = split(/:/, $_);
- if ($login ne $form->{login}) {
- $newfile .= $_;
- }
- }
- close(HTACCESS);
- open(HTACCESS, "> $file") or die "cannot open webdav-user $!\n";
- print(HTACCESS $newfile);
- close(HTACCESS);
- }
- }
- }
-
$main::lxdebug->leave_sub();
return $rc;
my $sth = $dbh->prepare($query);
$sth->execute || $form->dberror($query);
- $form->{defaults} = $sth->fetchrow_hashref(NAME_lc);
+ $form->{defaults} = $sth->fetchrow_hashref("NAME_lc");
$form->{defaults}{IC} = $form->{defaults}{inventory_accno_id};
$form->{defaults}{IC_income} = $form->{defaults}{income_accno_id};
$form->{defaults}{IC_expense} = $form->{defaults}{expense_accno_id};
$form->{defaults}{FX_gain} = $form->{defaults}{fxgain_accno_id};
$form->{defaults}{FX_loss} = $form->{defaults}{fxloss_accno_id};
+ $form->{defaults}{AR_paid} = $form->{defaults}{ar_paid_accno_id};
$form->{defaults}{weightunit} ||= 'kg';
$sth = $dbh->prepare($query);
$sth->execute || $self->dberror($query);
- while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
+ while (my $ref = $sth->fetchrow_hashref("NAME_lc")) {
foreach my $key (split(/:/, $ref->{link})) {
if ($key =~ /IC/) {
- $nkey = $key;
+ my $nkey = $key;
if ($key =~ /cogs/) {
$nkey = "IC_expense";
}
$sth = $dbh->prepare($query);
$sth->execute || $self->dberror($query);
- while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
+ while (my $ref = $sth->fetchrow_hashref("NAME_lc")) {
%{ $form->{IC}{FX_gain}{ $ref->{accno} } } = (
id => $ref->{id},
description => $ref->{description}
$sth = $dbh->prepare($query);
$sth->execute || $self->dberror($query);
- while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
+ while (my $ref = $sth->fetchrow_hashref("NAME_lc")) {
%{ $form->{IC}{FX_loss}{ $ref->{accno} } } = (
id => $ref->{id},
description => $ref->{description}
$sth = $dbh->prepare($query);
$sth->execute || $form->dberror($query);
- while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
+ while (my $ref = $sth->fetchrow_hashref("NAME_lc")) {
$form->{taxrates}{ $ref->{accno} }{id} = $ref->{id};
$form->{taxrates}{ $ref->{accno} }{description} = $ref->{description};
$form->{taxrates}{ $ref->{accno} }{taxnumber} = $ref->{taxnumber}
if $ref->{taxnumber};
$form->{taxrates}{ $ref->{accno} }{rate} = $ref->{rate} if $ref->{rate};
}
+ # Abfrage für Standard Umlaufvermögenskonto
+ $query =
+ qq|SELECT id, accno, description, link | .
+ qq|FROM chart | .
+ qq|WHERE link LIKE ? |.
+ qq|ORDER BY accno|;
+ $sth = prepare_execute_query($form, $dbh, $query, '%AR%');
+ $sth->execute || $form->dberror($query);#
+ while (my $ref = $sth->fetchrow_hashref("NAME_lc")) {
+ foreach my $item (split(/:/, $ref->{link})) {
+ if ($item eq "AR_paid") {
+ %{ $form->{IC}{AR_paid}{ $ref->{accno} } } = (
+ id => $ref->{id},
+ description => $ref->{description}
+ );
+ }
+ }
+ }
$sth->finish;
$dbh->disconnect;
my ($self, $myconfig, $form, $prefix) = @_;
- my $dbh = $form->dbconnect($myconfig);
+ my $dbh = $form->get_standard_dbh;
my $query = "SELECT *, base_unit AS original_base_unit FROM units";
$sth = $dbh->prepare($query_lang);
$sth->execute() || $form->dberror($query_lang);
my @languages;
- while ($ref = $sth->fetchrow_hashref()) {
+ while (my $ref = $sth->fetchrow_hashref()) {
push(@languages, $ref);
}
$sth->finish();
}
$sth->execute($unit->{"name"}) || $form->dberror($query_lang . " (" . $unit->{"name"} . ")");
- while ($ref = $sth->fetchrow_hashref()) {
+ while (my $ref = $sth->fetchrow_hashref()) {
map({ $unit->{"LANGUAGES"}->{$ref->{"template_code"}}->{$_} = $ref->{$_} } keys(%{$ref}));
}
}
- $sth->finish();
-
- $dbh->disconnect();
+ $sth->finish;
$main::lxdebug->leave_sub();
# else return 1
sub convert_unit {
$main::lxdebug->enter_sub(2);
- ($this, $a, $b, $all_units) = @_;
+ my ($this, $a, $b, $all_units) = @_;
$main::lxdebug->leave_sub(2) and return 0 unless $a && $b;
$main::lxdebug->leave_sub(2) and return 0 unless $all_units->{$a} && $all_units->{$b};
$main::lxdebug->leave_sub();
- return wantarray ? ($sum, $baseunit) : $sum;
+ return wantarray ? ($sum, $base_unit) : $sum;
}
sub add_unit {
FROM tax t
ORDER BY taxkey|;
- $sth = $dbh->prepare($query);
+ my $sth = $dbh->prepare($query);
$sth->execute || $form->dberror($query);
$form->{TAX} = [];
- while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
+ while (my $ref = $sth->fetchrow_hashref("NAME_lc")) {
push @{ $form->{TAX} }, $ref;
}
ORDER BY accno
};
- $sth = $dbh->prepare($query);
+ my $sth = $dbh->prepare($query);
$sth->execute || $form->dberror($query);
$form->{ACCOUNTS} = [];
- while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
+ while (my $ref = $sth->fetchrow_hashref("NAME_lc")) {
push @{ $form->{ACCOUNTS} }, $ref;
}
my $sth = $dbh->prepare($query);
$sth->execute($form->{id}) || $form->dberror($query . " ($form->{id})");
- my $ref = $sth->fetchrow_hashref(NAME_lc);
+ my $ref = $sth->fetchrow_hashref("NAME_lc");
map { $form->{$_} = $ref->{$_} } keys %$ref;
$sth->execute($form->{id}) || $form->dberror($query . " ($form->{id})");
$form->{TAXINUSE} = [];
- while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
+ while (my $ref = $sth->fetchrow_hashref("NAME_lc")) {
push @{ $form->{TAXINUSE} }, $ref;
}
$main::lxdebug->enter_sub();
my ($self, $myconfig, $form) = @_;
+ my $query;
# connect to database
my $dbh = $form->get_standard_dbh($myconfig);
$main::lxdebug->enter_sub();
my ($self, $myconfig, $form) = @_;
+ my $query;
# connect to database
my $dbh = $form->get_standard_dbh($myconfig);