[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb:[5468] trunk
- Subject: SF.net SVN: ledger-smb:[5468] trunk
- From: ..hidden..
- Date: Fri, 04 Jan 2013 07:17:52 +0000
Revision: 5468
http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=5468&view=rev
Author: einhverfr
Date: 2013-01-04 07:17:51 +0000 (Fri, 04 Jan 2013)
Log Message:
-----------
Can now search users through contact search interface
Modified Paths:
--------------
trunk/LedgerSMB/Report/Contact/Search.pm
trunk/UI/Reports/filters/contact_search.html
trunk/sql/modules/Employee.sql
Modified: trunk/LedgerSMB/Report/Contact/Search.pm
===================================================================
--- trunk/LedgerSMB/Report/Contact/Search.pm 2013-01-03 09:08:53 UTC (rev 5467)
+++ trunk/LedgerSMB/Report/Contact/Search.pm 2013-01-04 07:17:51 UTC (rev 5468)
@@ -228,6 +228,14 @@
coerce => 1,
required => 0);
+=item users
+
+If the entity_class is 3 then this restricts the report to only users.
+
+=cut
+
+has users => (is => 'ro', isa => 'Bool', required => 0);
+
=back
=head1 METHODS
Modified: trunk/UI/Reports/filters/contact_search.html
===================================================================
--- trunk/UI/Reports/filters/contact_search.html 2013-01-03 09:08:53 UTC (rev 5467)
+++ trunk/UI/Reports/filters/contact_search.html 2013-01-04 07:17:51 UTC (rev 5468)
@@ -58,6 +58,13 @@
<td><?lsmb INCLUDE input element_data={size = '32', name = 'employee'} ?></td>
<?lsmb END -?>
</tr>
+ <tr>
+ <th align="right"><?lsmb text('Only Users') ?></th>
+ <td><?lsmb PROCESS input element_data = {
+ type = 'checkbox', name = 'users', value = '1'
+ } ?> (<?lsmb text('Only for Employees') ?>)</td>
+ </tr>
+ <tr>
<th align="right"><?lsmb text('Notes') ?></th>
<td><?lsmb INCLUDE textarea element_data={
rows = '3', cols = '32', name = 'notes'} ?></td>
Modified: trunk/sql/modules/Employee.sql
===================================================================
--- trunk/sql/modules/Employee.sql 2013-01-03 09:08:53 UTC (rev 5467)
+++ trunk/sql/modules/Employee.sql 2013-01-04 07:17:51 UTC (rev 5468)
@@ -153,15 +153,15 @@
and ($3 is null or $3 >= ee.startdate)
and ($4 is null or p.first_name ilike '%' || $4 || '%')
and ($5 is null or p.middle_name ilike '%' || $5 || '%')
- and ($6 is null or p.last_name ilike '%' || $6 || '%');
- and ($7 is null
- or $7 = exists (select 1 from users where entity_id = e.id))
+ and ($6 is null or p.last_name ilike '%' || $6 || '%')
+ and ($8 is null
+ or $8 = (exists (select 1 from users where entity_id = e.id)));
$$ language sql;
COMMENT ON FUNCTION employee__search
(in_employeenumber text, in_startdate_from date, in_startdate_to date,
in_first_name text, in_middle_name text, in_last_name text,
-in_notes text) IS
+in_notes text, in_users bool) IS
$$ Returns a list of employee_result records matching the search criteria.
employeenumber is an exact match.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.