<?php

/**
 * Class that operate on table 'supplieropenexchangeorclosing'. Database Mysql.
 *
 * @author: http://phpdao.com
 * @date: 2023-07-21 13:00
 */
class SupplieropenexchangeorclosingMySqlExtDAO extends SupplieropenexchangeorclosingMySqlDAO {

    public function queryAllEX($queryString = '') {
        $sql = 'SELECT supplieropenexchangeorclosing.*,supplieropen.name as suppOpenName,save.savename,assets.assetsName,expensestype.expensestypename
                FROM supplieropenexchangeorclosing
                left join supplieropen on supplieropen.id= supplieropenexchangeorclosing.supplieropenid
                left join save on save.saveid = supplieropenexchangeorclosing.saveid
                left join assets on (assets.assetId = supplieropenexchangeorclosing.assetorexpenseid and assetorexpense=0)
                left join expensestype on (expensestype.expensestypeid = supplieropenexchangeorclosing.assetorexpenseid and assetorexpense=1)
                where supplieropenexchangeorclosing.del=0 ' . $queryString;
        $sqlQuery = new SqlQuery($sql);
        return $this->getList($sqlQuery);
    }

}

?>