function applyFilters($q, $au)
{
+
+ $this->selectAdd("i18n_translate('c' , Companies.country, 'en') as country_display_name ");
+
$tn = $this->tableName();
//DB_DataObject::debugLevel(1);
$x = DB_DataObject::factory('Companies');
) as comptype_display_name
");
- if(!empty($q['query']['name'])){
- $s = $this->escape($q['query']['name']);
+ if(!empty($q['search']['name'])){
+ $s = $this->escape($q['search']['name']);
$this->whereAdd("
{$tn}.name LIKE '%$s%'
");
}
-
+ if(!empty($q['search']['name_starts'])){
+ $s = $this->escape($q['search']['name_starts']);
+ $this->whereAdd("
+ {$tn}.name LIKE '$s%'
+ ");
+ }
}
function toEventString() {
- }
-
- function beforeInsert($request,$roo)
- {
- $roo->jerr('ERROR');
-
}
function beforeUpdate($old, $q,$roo)
{
- $roo->jerr('ERROR');
if(!empty($this->is_system) &&
($old->code != $this->code || $old->name != $this->name)
){