<?php

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

    protected $table_names = array(
        'CN_MOV_AUX_TER'
    );
    protected $table_join_ids = array(
    );
    protected $fields = array(
        'CN_MOV_AUX_TER' => array(
            'fecha_cad' => 'fecha_cad',
            'id_tipo_comprobante' => 'id_tipo_comprobante',
            'id_mae_ter' => 'id_mae_ter',
            'nitocc' => 'nitocc',
            'nombre' => 'nombre',
            'debito' => 'debito',
            'credito' => 'credito',
//            'saldo' => 'saldo',
            'tipo_doc' => 'tipo_doc',
            'doc_soporte' => 'doc_soporte',
            'descr_mto' => 'descr_mto'
        )
    );
    protected $table_field_conditions = array(
        'CN_MOV_AUX_TER' => array(
            'id_cia' => array('=' => array('id_cia')),
            'id_cen_op' => array('=' => array('id_cen_op')),
            //'vig_per' => array('BETWEEN' => array('vig_perIni', 'vig_perFin')),
            'id_auxiliar' => array('=' => array('id_auxiliar')),
            'id_catalogo' => array('=' => array('id_catalogo')),
            'id_cuenta_mayor' => array('=' => array('id_cuenta_mayor')),
            'id_grupo_cuenta' => array('=' => array('id_grupo_cuenta')),
            'id_clase_cuenta' => array('=' => array('id_clase_cuenta')),
            'id_vigencia' => array('=' => array('id_vigencia')),
            'id_periodo_contable' => array('=' => array('id_periodo_contable')),
            'rownum,start' => array('>' => array('_startRow')),
            'rownum,end' => array('<=' => array('_endRow'))
        )
    );
    protected $table_field_or_conditions = null;
    protected $query_qualifier = 'DISTINCT';

    /* service sum */
    protected $summatory_data = array(
        'CN_MOV_AUX_TER' =>
        array(
            'fields' => array('debito', 'credito'),
            'labels' => array('fecha_cad,Total'),
        //'condition,cuenta' => array('LENGTH(', 'field', ') = 4')
        )
    );

}