<?php
class Cheques2Model extends Query{

    public function __construct()
    {
        parent::__construct();
    }

    public function getCheques()
    {
        //$sql = "SELECT *,DATE_FORMAT(ultimaventa,'%d/%m/%Y') as ultimaventa FROM clientes";
        $sql = "SELECT *,DATEDIFF(now(),ch_fecha) as diasdiferencia FROM cheques";
        $data = $this->selectAll($sql);
        return $data;
    }

    public function getEmpresa()
    {
        $sql = "SELECT * FROM empresa";
        $data = $this->select($sql);
        return $data;
    }

    public function getVendedores()
    {
        $sql = "SELECT codven, nombre FROM vendedores";
        $data = $this->selectAll($sql);
        return $data;
    }


    public function getPaises()
    {
        $sql = "SELECT cod, pais FROM paises";
        $data = $this->selectAll($sql);
        return $data;
    }
    

}
