From d8e2262143ab259acafa27fc88c61ddcff7df42d Mon Sep 17 00:00:00 2001 From: einhverfr Date: Sun, 12 Nov 2006 23:11:14 +0000 Subject: Numerous small problems fixed with Form git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@538 4979c152-3d1c-0410-bac9-87ea11338e46 --- LedgerSMB/Form.pm | 30 +++++++++++++++--------------- UPGRADE | 5 +++++ 2 files changed, 20 insertions(+), 15 deletions(-) diff --git a/LedgerSMB/Form.pm b/LedgerSMB/Form.pm index 347f0c78..6505ee42 100755 --- a/LedgerSMB/Form.pm +++ b/LedgerSMB/Form.pm @@ -533,7 +533,7 @@ sub callproc { $argstr =~ s/\, $//; $query = "SELECT $procname"; $query =~ s/\(\)/$argstr/; - my $sth = $form->{dbh}->prepare($query); + my $sth = $self->{dbh}->prepare($query); while (my $ref = $sth->fetchrow_hashref(NAME_lc)){ push @results, $ref; } @@ -1358,7 +1358,7 @@ sub run_custom_queries { if ($query_type eq 'UPDATE'){ $query = "DELETE FROM $_ WHERE row_id = ?"; my $sth = $dbh->prepare($query); - $sth->execute->($form->{"id"."$linenum"}) + $sth->execute->($self->{"id"."$linenum"}) || $self->dberror($query); } elsif ($query_type eq 'INSERT'){ $query .= " INTO $_ ("; @@ -1399,9 +1399,9 @@ sub run_custom_queries { for (@rc){ $query = shift (@{$_}); $sth = $dbh->prepare($query) - || $form->db_error($query); - $sth->execute(@{$_}, $form->{id}) - || $form->dberror($query);; + || $self->db_error($query); + $sth->execute(@{$_}, $self->{id}) + || $self->dberror($query);; $sth->finish; $did_insert = 1; } @@ -1412,10 +1412,10 @@ sub run_custom_queries { for (@rc){ $query = shift @{$_}; $sth = $self->{dbh}->prepare($query); - $sth->execute($form->{id}); + $sth->execute($self->{id}); $ref = $sth->fetchrow_hashref(NAME_lc); for (keys %{$ref}){ - $form->{$_} = $ref->{$_}; + $self->{$_} = $ref->{$_}; } } } @@ -1900,7 +1900,7 @@ sub all_projects { FROM project WHERE $where|; - if ($form->{language_code}) { + if ($self->{language_code}) { $query = qq| SELECT pr.*, t.description AS translation @@ -2096,7 +2096,7 @@ sub create_links { FROM status s WHERE s.trans_id = ?|; $sth = $dbh->prepare($query); - $sth->execute($self->{id}) || $form->dberror($query); + $sth->execute($self->{id}) || $self->dberror($query); while ($ref = $sth->fetchrow_hashref(NAME_lc)) { $self->{printed} .= "$ref->{formname} " @@ -2157,9 +2157,9 @@ sub create_links { (undef, $val) = $sth->fetchrow_array(); if ($_ eq 'curr'){ - $form->{currencies} = $val; + $self->{currencies} = $val; } else { - $form->{$_} = $val; + $self->{$_} = $val; } $sth->finish; } @@ -2176,11 +2176,11 @@ sub create_links { (undef, $val) = $sth->fetchrow_array(); if ($_ eq 'curr'){ - $form->{currencies} = $val; + $self->{currencies} = $val; } elsif ($_ eq 'current_date'){ - $form->{transdate} = $val; + $self->{transdate} = $val; } else { - $form->{$_} = $val; + $self->{$_} = $val; } $sth->finish; } @@ -2451,7 +2451,7 @@ sub save_status { WHERE trans_id = ?|; my $sth = $dbh->prepare($query); - $sth->execute($form->{id}); + $sth->execute($self->{id}); $sth->finish; my %queued; diff --git a/UPGRADE b/UPGRADE index cac73fbb..deaca635 100644 --- a/UPGRADE +++ b/UPGRADE @@ -40,6 +40,11 @@ the installation nominally works by running "./Build test" from the command line. The test suites currently check to make sure all the perl modules load and that a number of numeric tests are passed. +Dependencies which are recommended are needed only for specific functionality +and may not be required in all circumstances. These include: + * Net::TCLink for credit card processing in a POS environment + * Parse::RecDescent for the CLI script host + 3) Upgrade database a) cd to the sql/legacy/ directory of the new ledger directory -- cgit v1.2.3