diff options
author | einhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46> | 2006-11-12 23:11:14 +0000 |
---|---|---|
committer | einhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46> | 2006-11-12 23:11:14 +0000 |
commit | d8e2262143ab259acafa27fc88c61ddcff7df42d (patch) | |
tree | 71d44978c1b843b90dbe25720a3a05ce03f267a9 | |
parent | c24f5facf43ae43c3390931591248cac8f09c1a5 (diff) |
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
-rwxr-xr-x | LedgerSMB/Form.pm | 30 | ||||
-rw-r--r-- | 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; @@ -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 |