<?php

/**
 * mae_ter_dep actions.
 *
 * @package    contab2
 * @subpackage mae_ter_dep
 * @author     Your name here
 * @version    SVN: $Id: actions.class.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
 */
class mae_ter_depActions extends sfQuery {

    protected $table_names = array(
        'CN_MAE_TER',
        'CN_LIBRO_AUX'
    );
    protected $table_join_ids = array(
        'CN_LIBRO_AUX' =>
        array(
            'id_cia' => 'CN_MAE_TER',
            'id_mae_ter' => 'CN_MAE_TER'
        )
    );
    protected $fields = array(
        'CN_MAE_TER' => array(
            'id_mae_ter' => 'id_mae_ter',
            'nitocc' => 'nitocc',
            'nombre' => 'nombre',
            'nitocc,||, - ,||,nombre' => 'completo'
        )
    );
    protected $table_field_conditions = array(
        'CN_MAE_TER' => array(
            'id_cia' => array('=' => array('id_cia')),
            'rownum,start' => array('>' => array('_startRow')),
            'rownum,end' => array('<=' => array('_endRow'))
        ),
        'CN_LIBRO_AUX' => array(
            'id_cia' => array('=' => array('id_cia')),
            'id_vigencia' => array('=' => array('id_vigencia')),
            'id_cen_op' => array('=' => array('id_cen_op')),
            'id_periodo_contable' => array('=' => array('id_periodo_contable')),
            'cuenta' => array('BETWEEN' => array('subc_ini', 'subc_fin'))
        )
    );
    protected $table_field_or_conditions = array(
        'CN_MAE_TER' => array(
            'nitocc' => array('LIKE' => array('input', '%')),
            'nombre' => array('LIKE' => array('input', '%'))
        )
    );
    protected $query_qualifier = 'DISTINCT';

}
