<?php
abstract class Constantes
{
    const TITULO_APPLICATION       = "SISTEMA DE VENTAS LYM";
    const APP_CREDENTIALS          = "system_sisventa1";
    const COMPANIAS_TODAS          = "-1";
    const CONS_VTA_VALIDAR_STOCK   = true;

    const ROOT_DIR_APP             = "/sisventas/";
    const ROOT_DIR_IMG             = "/sisventas/web/images/";
    const ROOT_DIR_FILES           = "/sisventas/web/files/";

    static $a_meses = array
    ( 
        '01'=> "ENERO", '02'=> "FEBRERO", '03'=> "MARZO", '04'=> "ABRIL", '05'=> "MAYO", '06'=> "JUNIO", '07'=> "JULIO", '08'=> "AGOSTO", '09'=> "SEPTIEMBRE", '10'=> "OCTUBRE", '11'=> "NOVIEMBRE", '12'=> "DICIEMBRE"
    );
    
    /*static $dsn = array
    (
        //loclahost
        'default' => array( 'phptype'=>'mysqli', 'username'=>'alikullk_usernew', 'hostspec'=>'localhost', 'password'=>'JeH?NAsk.Z8N', 'database'=>'alikullk_dbnew', 'port'=>'3306', 'encoding'=>'utf8mb4' ), //utf8
    );*/
     static $dsn = array
    (
        //loclahost
        //'default' => array( 'phptype'=>'mysqli', 'username'=>'lymcor31_user', 'hostspec'=>'localhost', 'password'=>'V}*fBoq72nF3', 'database'=>'lymcor31_db', 'port'=>'3306', 'encoding'=>'utf8mb4' ), //utf8
        'default' => array( 'phptype'=>'mysqli', 'username'=>'padamuy_sv1', 'hostspec'=>'localhost', 'password'=>';r*x;bEG,%Ty', 'database'=>'padamuy_sv1', 'port'=>'3306', 'encoding'=>'utf8mb4' ), //utf8
    );
    
    public static function getTokenRutaPorCompania( $IdCompania )
    {
        //parametros exclusivo para el proveedor nubefact
        $a_Lst[1] = array
        (
            /*"RUTA_API"  => "https://api.pse.pe/api/v1/c478293cfd124bcdbdeab435575b884b4fc0d73d1e85409eaea09f140f59bef3",
            "TOKEN_API" => "eyJhbGciOiJIUzI1NiJ9.IjMyMzEyMDUxOTRkYjQ4ZmI5ZjE2ZjNkMGViYWZiMGZkZWI0MDVhNmVjZDdmNGExZThmNzRkN2RiMDNmMmQxODki.s9jZu-gUZFHYNwdHyBhO144BaM1hS-ADDtZLQmEnkJ8"*/
            "RUTA_API"  => "https://api.pse.pe/api/v1/58242bf90afe48c098284d72328764c6d815a7330ebb44c9a495b9a5a1738960",
            "TOKEN_API" => "eyJhbGciOiJIUzI1NiJ9.IjQwOTVlMWY1Y2NmNDQ2ZTM5NzMzMjc4NmI3NmRlNWE0YzFkZTM3OTM4ZjU1NDBmMDkxNDY5Nzk1ZjAzYmIxNGYi.WeUONnGytKzX6mw6dLHl6NGBxTEyHOsMwjsVoHcG668"
        );
        //aqui se puede agregar otras companias

        if( isset( $a_Lst[$IdCompania] ) )
        {
            return $a_Lst[$IdCompania];
        }
        return null;
    }
                                   
}

