Fix #7123 - getting abra ready to test
[Pman.Xtuple] / DataObjects / Salesrep.php
1 <?php
2 /**
3  * Table Definition for salesrep
4  */
5 require_once 'DB/DataObject.php';
6
7 class Pman_Xtuple_DataObjects_Salesrep extends DB_DataObject 
8 {
9     ###START_AUTOCODE
10     /* the code below is auto generated do not remove the above tag */
11
12     public $__table = 'salesrep';            // table name
13     public $salesrep_id;                     // int4(4)  not_null default_nextval%28%28salesrep_salesrep_id_seq%29%3A%3Aregclass%29 primary_key primary_key
14     public $salesrep_active;                 // bool(1)  
15     public $salesrep_number;                 // text(-1)  unique_key unique_key
16     public $salesrep_name;                   // text(-1)  
17     public $salesrep_commission;             // numeric(-1)  
18     public $salesrep_method;                 // bpchar(-1)  
19     public $salesrep_emp_id;                 // int4(4)  
20
21     
22    /**
23     * Getter / Setter for $salesrep_emp_id
24     *
25     * @param    mixed   (optional) value to assign
26     * @access   public
27     */
28     public function emp() {
29         return func_num_args() ? $this->link('salesrep_emp_id', func_get_arg(0)) : $this->link('salesrep_emp_id');
30     }
31
32
33     /* the code above is auto generated do not remove the tag below */
34     ###END_AUTOCODE
35     
36     function applyFilters($q, $au, $roo)
37     {
38         if(!empty($q['query']['name'])){
39             $this->whereAdd("
40                 salesrep_name LIKE '{$this->escape($q['query']['name'])}%'
41             ");
42         }
43     }
44
45 }