[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb:[5795] trunk
- Subject: SF.net SVN: ledger-smb:[5795] trunk
- From: ..hidden..
- Date: Thu, 16 May 2013 07:47:35 +0000
Revision: 5795
http://sourceforge.net/p/ledger-smb/code/5795
Author: einhverfr
Date: 2013-05-16 07:47:33 +0000 (Thu, 16 May 2013)
Log Message:
-----------
Correcting contact filter not working, trunk specific fix, will fix separately on 1.3, this is bug 808
Modified Paths:
--------------
trunk/LedgerSMB/Report/Contact/Search.pm
trunk/UI/Reports/filters/contact_search.html
trunk/sql/modules/Company.sql
Modified: trunk/LedgerSMB/Report/Contact/Search.pm
===================================================================
--- trunk/LedgerSMB/Report/Contact/Search.pm 2013-05-16 07:26:33 UTC (rev 5794)
+++ trunk/LedgerSMB/Report/Contact/Search.pm 2013-05-16 07:47:33 UTC (rev 5795)
@@ -155,6 +155,15 @@
has phone => (is => 'ro', isa => 'Str', required => 0);
+=item contact
+
+Full text search on contact string
+
+=cut
+
+has contact => (is => 'ro', isa => 'Str', required => 0);
+
+
=item meta_number
Matches beginning of customer/vendor/etc. number.
Modified: trunk/UI/Reports/filters/contact_search.html
===================================================================
--- trunk/UI/Reports/filters/contact_search.html 2013-05-16 07:26:33 UTC (rev 5794)
+++ trunk/UI/Reports/filters/contact_search.html 2013-05-16 07:47:33 UTC (rev 5795)
@@ -50,6 +50,10 @@
<td><?lsmb INCLUDE input element_data={size = '20', name = 'phone'} ?></td>
</tr>
<tr>
+ <th align="right"><?lsmb text('Contact') ?></th>
+ <td><?lsmb INCLUDE input element_data={size = '20', name = 'contact'} ?></td>
+ </tr>
+ <tr>
<?lsmb IF entity_type == 'Customer' -?>
<th align="right"><?lsmb text('Salesperson') ?></th>
<td><?lsmb INCLUDE input element_data={size = '32', name = 'employee'} ?></td>
Modified: trunk/sql/modules/Company.sql
===================================================================
--- trunk/sql/modules/Company.sql 2013-05-16 07:26:33 UTC (rev 5794)
+++ trunk/sql/modules/Company.sql 2013-05-16 07:47:33 UTC (rev 5795)
@@ -351,6 +351,16 @@
AND (in_users IS NULL OR in_users =
(exists (select 1 from users
where entity_id = e.id)))
+ AND (in_contact IS NULL
+ OR e.id IN (select entity_id
+ FROM entity_to_contact
+ WHERE description
+ @@ plainto_tsquery(in_contact))
+ OR ec.id IN (SELECT credit_id
+ FROM eca_to_contact
+ WHERE description
+ @@ plainto_tsquery(in_contact))
+ )
ORDER BY legal_name
LOOP
RETURN NEXT out_row;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.