[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb:[6638] trunk
- Subject: SF.net SVN: ledger-smb:[6638] trunk
- From: ..hidden..
- Date: Sat, 25 Jan 2014 14:08:46 +0000
Revision: 6638
http://sourceforge.net/p/ledger-smb/code/6638
Author: einhverfr
Date: 2014-01-25 14:08:43 +0000 (Sat, 25 Jan 2014)
Log Message:
-----------
Fixing bug 965, breaking workflows from 1.3 regarding name searches. I made handling consistent between the ar/ap screens and the transaction search screens. Both support now full text and ilike searches
Modified Paths:
--------------
trunk/LedgerSMB/Form.pm
trunk/sql/modules/Report.sql
Modified: trunk/LedgerSMB/Form.pm
===================================================================
--- trunk/LedgerSMB/Form.pm 2014-01-25 13:36:34 UTC (rev 6637)
+++ trunk/LedgerSMB/Form.pm 2014-01-25 14:08:43 UTC (rev 6638)
@@ -1791,12 +1791,14 @@
ON (c.id = ecl.credit_id)
LEFT JOIN country_tax_form ctf ON (c.taxform_id = ctf.id)
WHERE (lower(e.name) LIKE ?
- OR c.meta_number ILIKE ?)
+ OR c.meta_number ILIKE ?
+ or e.name @@ plainto_tsquery(?))
AND coalesce(?, c.entity_class) = c.entity_class
$where
ORDER BY e.name/;
- unshift( @queryargs, $name, $self->{"${table}number"} , $entity_class);
+ unshift( @queryargs, $name, $self->{"${table}number"} ,
+ $self->{$table}, $entity_class);
my $sth = $self->{dbh}->prepare($query);
$sth->execute(@queryargs) || $self->dberror($query);
@@ -1807,6 +1809,7 @@
$i++;
}
$sth->finish;
+ use Carp::Always;
return $i;
}
Modified: trunk/sql/modules/Report.sql
===================================================================
--- trunk/sql/modules/Report.sql 2014-01-25 13:36:34 UTC (rev 6637)
+++ trunk/sql/modules/Report.sql 2014-01-25 14:08:43 UTC (rev 6638)
@@ -416,7 +416,8 @@
OR EXISTS (select 1 FROM acc_trans
WHERE trans_id = a.id and chart_id = in_account_id))
AND (in_entity_name IS NULL
- OR eeca.name @@ plainto_tsquery(in_entity_name))
+ OR eeca.name @@ plainto_tsquery(in_entity_name)
+ OR eeca.name ilike '%' || in_entity_name || '%')
AND (in_meta_number IS NULL
OR eca.meta_number ilike in_meta_number || '%')
AND (in_employee_id IS NULL OR ee.id = in_employee_id)
@@ -513,7 +514,7 @@
EXISTS (select * from acc_trans
where trans_id = a.id AND chart_id = in_account_id))
AND (in_entity_name IS NULL
--- OR eeca.name ilike in_entity_name || '%')
+ OR eeca.name ilike in_entity_name || '%'
OR eeca.name @@ plainto_tsquery(in_entity_name))
AND (in_meta_number IS NULL OR eca.meta_number ilike in_meta_number)
AND (in_employee_id = ee.entity_id OR in_employee_id IS NULL)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today.
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
Ledger-smb-commits mailing list
..hidden..
https://lists.sourceforge.net/lists/listinfo/ledger-smb-commits