✏️ 正在编辑: Fornecedor.php
路径:
/srv/systems_dir/yuppiecred-lidernegocios/application/models/DbTable/Fornecedor.php
提示:
您可以编辑任何文件(包括二进制文件),但请注意不当修改可能导致文件损坏。
<?php class Model_DbTable_Fornecedor extends Core_DbTable { protected $_primary = 'id'; protected $_name = 'tb_fornecedores'; protected static $_viewName = 'vw_fornecedores'; protected $_dependentTables = array( 'Model_DbTable_Lancamento' ); public static function getViewName() { return self::$_viewName; } public function fetchAll($where = null, $order = null, $count = null, $offset = null) { $info = $this->info(); $cols = $info['cols']; if( in_array("excluido", $cols) ){ if( ($where instanceof Zend_Db_Table_Select ) ){ $strWhere = "{$this->_name}.excluido<>1 AND tipo = 'FORNECEDOR'"; foreach ( $where->getPart(Zend_Db_Table_Select::WHERE) as $w ) { $strWhere .= ' AND ' . $w; } $where->where($strWhere); } elseif( is_array($where) ){ $where[] = "{$this->_name}.excluido<>1 AND tipo = 'FORNECEDOR'"; } elseif( $where != null ){ $where .= " AND {$this->_name}.excluido<>1 AND tipo = 'FORNECEDOR'"; } else { $where = "{$this->_name}.excluido<>1 AND tipo = 'FORNECEDOR'"; } } return parent::fetchAll($where, $order, $count, $offset); } }
💾 保存文件
← 返回文件管理器