[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb: [1958] trunk



Revision: 1958
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=1958&view=rev
Author:   einhverfr
Date:     2007-12-06 21:12:39 -0800 (Thu, 06 Dec 2007)

Log Message:
-----------
Adding vendor number search on transactions (using equality, rather than pattern matching)

Modified Paths:
--------------
    trunk/LedgerSMB/AA.pm
    trunk/bin/aa.pl

Modified: trunk/LedgerSMB/AA.pm
===================================================================
--- trunk/LedgerSMB/AA.pm	2007-12-07 00:06:29 UTC (rev 1957)
+++ trunk/LedgerSMB/AA.pm	2007-12-07 05:12:39 UTC (rev 1958)
@@ -828,6 +828,9 @@
     my $sortorder = $form->sort_order( ..hidden.., \%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 @@
     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";
         }
     }
 

Modified: trunk/bin/aa.pl
===================================================================
--- trunk/bin/aa.pl	2007-12-07 00:06:29 UTC (rev 1957)
+++ trunk/bin/aa.pl	2007-12-07 05:12:39 UTC (rev 1958)
@@ -1427,6 +1427,9 @@
 	  <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


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.