 <?php

class Sistema_Model_FormasPagamento extends Agro_Db_Table_Abstract {
    const ID_STATUS_DOC_TED = 1;
    const ID_STATUS_CHEQUE = 2;
    const DS_CHAVE_CHEQUE = 'CHEQUE';
    const DS_CHAVE_SEM_PAGAMENTO = 'SEM_PAGAMENTO';

    const ID_STATUS_ORDEM_PAGAMENTO = 3;

    protected $_schema = 'sistema';
    protected $_name = 'formas_pagamento';
    protected $_primary = 'id';
    public $_order = 'id';

    public function getFormasPagamento() {
        $Select = $this->select()->setIntegrityCheck(false);
        $Select->from(array('fp' => 'sistema.formas_pagamento'), array('id','ds_forma_pagamento', 'ds_chave'));
        $Select->where('fl_ativo = ?', 'true');
        $Select->order($this->_order);
        $Row = $this->fetchAll($Select);
        return $Row;
    }

}
