Example #1
0
 public function where($map, $parse = null)
 {
     if (!$this->not_belongs_to_company) {
         $this->real_model_name = $this->real_model_name ? $this->real_model_name : $this->getModelName();
         $map[$this->real_model_name . ".company_id"] = get_current_company_id();
     }
     return parent::where($map, $parse);
 }
 public function __construct($name = '', $tablePrefix = '', $connection = '')
 {
     parent::__construct($name, $tablePrefix, $connection);
     $this->viewFields = array('db_erp.user' => array('name', 'realName', '_as' => 'us', '_type' => 'left'), $tablePrefix . 'Sales' => array('salesman', 'amount', '_on' => 'us.realName=' . $tablePrefix . 'Sales.salesman'));
 }
 public function __construct($name = '', $tablePrefix = '', $connection = '')
 {
     parent::__construct($name, $tablePrefix, $connection);
     $this->viewFields = array($tablePrefix . 'Goods' => array('barcode', 'product', 'letter', '_type' => 'LEFT'), $tablePrefix . 'Sales' => array('amount', 'SUM(num)' => 'num', 'saledate', '_on' => $tablePrefix . "Goods.barcode = " . $tablePrefix . "Sales.barcode"));
 }
Example #4
0
 public function __construct()
 {
     parent::__construct("Comment");
 }