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');
{$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 beforeUpdate($old, $q,$roo)
{
if(!empty($this->is_system) &&
- ($old->code != $this->code || $old->name != $this->name)
+ ($old->code != $this->code ) // used to be not allowed to change name..
){
$roo->jerr('This company is not allow to editing Ref. or Company Name...');
}