summaryrefslogtreecommitdiff
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
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
-rw-r--r--LedgerSMB/AA.pm5
-rw-r--r--bin/aa.pl3
2 files changed, 7 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";
}
}
diff --git a/bin/aa.pl b/bin/aa.pl
index ef2bb82f..742c7a06 100644
--- a/bin/aa.pl
+++ b/bin/aa.pl
@@ -1427,6 +1427,9 @@ qq|<input name="l_transdate" class=checkbox type=checkbox value=Y checked> |
<th align=right>$name</th>
<td colspan=3>$selectname</td>
</tr>
+ <tr><th align="right">|.$locale->text('Number').qq|</th>
+ <td colspan="3"><input name="meta_number" size="36">
+ </tr>
$employee
$department
$invnumber