summaryrefslogtreecommitdiff
path: root/LedgerSMB
diff options
context:
space:
mode:
authoreinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2007-12-07 05:12:39 +0000
committereinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2007-12-07 05:12:39 +0000
commit5bb87907beb05ffa862baea5bd4063948c061983 (patch)
tree99c8f20af742704bcf0f96bfc1e3e187b72a21b0 /LedgerSMB
parenta24f6224e9cac752f34da6752a14fac7fa37c210 (diff)
Adding vendor number search on transactions (using equality, rather than pattern matching)
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@1958 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 'LedgerSMB')
-rw-r--r--LedgerSMB/AA.pm5
1 files changed, 4 insertions, 1 deletions
diff --git a/LedgerSMB/AA.pm b/LedgerSMB/AA.pm
index f42ab0e7..3621180b 100644
--- a/LedgerSMB/AA.pm
+++ b/LedgerSMB/AA.pm
@@ -828,6 +828,9 @@ sub transactions {
my $sortorder = $form->sort_order( \@a, \%ordinal );
my $where = "1 = 1";
+ if ($form->{"meta_number"}){
+ $where .= " AND vc.meta_number = " . $dbh->quote($form->{meta_number});
+ }
if ( $form->{"$form->{vc}_id"} ) {
$form->{entity_id} = $form->{$form->{vc}."_id"};
$where .= qq| AND a.entity_id = $form->{entity_id}|;
@@ -835,7 +838,7 @@ sub transactions {
else {
if ( $form->{ $form->{vc} } ) {
$var = $dbh->quote( $form->like( lc $form->{ $form->{vc} } ) );
- $where .= " AND lower(vc.name) LIKE $var";
+ $where .= " AND lower(vce.name) LIKE $var";
}
}