/**
  * 
  * @param integer $grupo_dispo_cab_id
  * @param string $texto_1er_elemento
  * @param string $color_1er_elemento
  * @return string
  */
 function getComboPorInventario($grupo_dispo_cab_id, $inventario_id, $calidad_id, $texto_1er_elemento = "<Seleccione>", $color_1er_elemento = "#FFFFAA")
 {
     $GrupoDispoCabDAO = new GrupoDispoCabDAO();
     $GrupoDispoCabDAO->setEntityManager($this->getEntityManager());
     $result = $GrupoDispoCabDAO->consultarPorInventario($inventario_id, $calidad_id);
     $opciones_dispo = \Application\Classes\Combo::getComboDataResultset($result, 'id', 'nombre', $grupo_dispo_cab_id, $texto_1er_elemento, $color_1er_elemento);
     return $opciones_dispo;
 }
 /**
  *
  * @param int $obtentor
  * @param string $texto_1er_elemento
  * @param string $color_1er_elemento
  * @return string
  */
 function getComboObtentor($obtentor, $texto_1er_elemento = "<Seleccione>", $color_1er_elemento = "#FFFFAA")
 {
     $ObtentorDAO = new ObtentorDAO();
     $ObtentorDAO->setEntityManager($this->getEntityManager());
     $result = $ObtentorDAO->consultarTodos();
     $opciones = \Application\Classes\Combo::getComboDataResultset($result, 'id', 'nombre', $obtentor, $texto_1er_elemento, $color_1er_elemento);
     return $opciones;
 }
 /**
  * 
  * @param string $Marcacion_id
  * @param int $marcacion_sec
  * @param string $texto_1er_elemento
  * @param string $color_1er_elemento
  * @return string
  */
 function getComboPorMarcacionId($Marcacion_id, $marcacion_sec, $texto_1er_elemento = "<Seleccione>", $color_1er_elemento = "#FFFFAA")
 {
     $MarcacionDAO = new MarcacionDAO();
     $MarcacionDAO->setEntityManager($this->getEntityManager());
     $result = $MarcacionDAO->consultarPorMarcacionId($Marcacion_id);
     $opciones = \Application\Classes\Combo::getComboDataResultset($result, 'marcacion_sec', 'nombre', $marcacion_sec, $texto_1er_elemento, $color_1er_elemento);
     return $opciones;
 }
Example #4
0
 /**
  *
  * @param string $calidad
  * @param string $texto_1er_elemento
  * @param string $color_1er_elemento
  * @return string
  */
 function getComboCalidadFox($clasifica_fox, $texto_1er_elemento = "<Seleccione>", $color_1er_elemento = "#FFFFAA")
 {
     $CalidadDAO = new CalidadDAO();
     $CalidadDAO->setEntityManager($this->getEntityManager());
     $result = $CalidadDAO->consultarTodos();
     $opciones = \Application\Classes\Combo::getComboDataResultset($result, 'clasifica_fox', 'nombre', $clasifica_fox, $texto_1er_elemento, $color_1er_elemento);
     return $opciones;
 }
 /**
  *
  * @return string
  */
 function getComboDataGrid()
 {
     $TipoCajaDAO = new TipoCajaDAO();
     $TipoCajaDAO->setEntityManager($this->getEntityManager());
     $result = $TipoCajaDAO->consultarTodos();
     $opciones = \Application\Classes\Combo::getComboDataResultset($result, 'id', 'nombre', null, null, null, \Application\Classes\Combo::$tipo_combo_datagrid);
     return $opciones;
 }
 /**
  * 
  * @param string $proveedor_id
  * @param string $texto_1er_elemento
  * @param string $color_1er_elemento
  * @return string
  */
 function getCombo($proveedor_id, $texto_1er_elemento = "<Seleccione>", $color_1er_elemento = "#FFFFAA", $buscar_proveedor_id = null)
 {
     $ProveedorDAO = new ProveedorDAO();
     $ProveedorDAO->setEntityManager($this->getEntityManager());
     $result = $ProveedorDAO->consultarTodos($buscar_proveedor_id);
     $opciones = \Application\Classes\Combo::getComboDataResultset($result, 'id', 'nombre', $proveedor_id, $texto_1er_elemento, $color_1er_elemento);
     return $opciones;
 }
Example #7
0
 /**
  * 
  * @param string $cliente_id
  * @param string $texto_1er_elemento
  * @param string $color_1er_elemento
  * @return string
  */
 function getCombo($cliente_id, $texto_1er_elemento = "<Seleccione>", $color_1er_elemento = "#FFFFAA")
 {
     $ClienteDAO = new ClienteDAO();
     $ClienteDAO->setEntityManager($this->getEntityManager());
     //$result = $ClienteDAO->consultarTodo();
     $result = $ClienteDAO->consultarUsuarioAsignado();
     $opciones = \Application\Classes\Combo::getComboDataResultset($result, 'id', 'nombre', $cliente_id, $texto_1er_elemento, $color_1er_elemento);
     return $opciones;
 }
 /**
  * 
  * @param string $cliente_id
  * @param string $agencia_carga_id
  * @param string $texto_1er_elemento
  * @param string $color_1er_elemento
  * @return string
  */
 function getComboPorCliente($cliente_id, $agencia_carga_id, $texto_1er_elemento = "<Seleccione>", $color_1er_elemento = "#FFFFAA")
 {
     $AgenciaCargaDAO = new AgenciaCargaDAO();
     $AgenciaCargaDAO->setEntityManager($this->getEntityManager());
     $result = $AgenciaCargaDAO->consultarPorCliente($cliente_id);
     $opciones = \Application\Classes\Combo::getComboDataResultset($result, 'id', 'nombre', $agencia_carga_id, $texto_1er_elemento, $color_1er_elemento);
     return $opciones;
 }
 /**
  *
  * @param string $inventario_id
  * @param string $variedad_id
  * @param string $texto_1er_elemento
  * @param string $color_1er_elemento
  * @return string
  */
 function getComboVariedad($tipo_caja_id, $inventario_id, $variedad_id, $texto_1er_elemento = "<Seleccione>", $color_1er_elemento = "#FFFFAA")
 {
     $TipoCajaMatrizDAO = new TipoCajaMatrizDAO();
     $TipoCajaMatrizDAO->setEntityManager($this->getEntityManager());
     $result = $TipoCajaMatrizDAO->consultarVariedadPorInventario($tipo_caja_id, $inventario_id);
     $opciones = \Application\Classes\Combo::getComboDataResultset($result, 'variedad_id', 'variedad_nombre', $variedad_id, $texto_1er_elemento, $color_1er_elemento);
     return $opciones;
 }
 function getComboTipo($tipo, $texto_1er_elemento = "<Seleccione>", $color_1er_elemento = "#FFFFAA")
 {
     $arrData = array('A' => 'A', 'T' => 'T');
     $opciones = \Application\Classes\Combo::getComboDataArray($arrData, $tipo, $texto_1er_elemento);
     return $opciones;
 }
Example #11
0
 /**
  * 
  * @param int $perfil_id
  * @param string $texto_1er_elemento
  * @param string $color_1er_elemento
  * @return string
  */
 function getComboPerfilRestringido($perfil_id, $texto_1er_elemento = "<Seleccione>", $color_1er_elemento = "#FFFFAA")
 {
     $arrData = array("2" => 'VENDEDOR', "3" => 'ADMINISTRADOR');
     $opciones = \Application\Classes\Combo::getComboDataArray($arrData, (int) $perfil_id, $texto_1er_elemento);
     return $opciones;
 }
 public function getcajasAction()
 {
     try {
         $EntityManagerPlugin = $this->EntityManagerPlugin();
         $SesionUsuarioPlugin = $this->SesionUsuarioPlugin();
         $SesionUsuarioPlugin->isLoginClienteVendedor();
         $DispoBO = new DispoBO();
         $DispoBO->setEntityManager($EntityManagerPlugin->getEntityManager());
         $body = $this->getRequest()->getContent();
         $json = json_decode($body, true);
         $producto_id = $json['producto_id'];
         $tipo_caja_id = $json['tipo_caja_id'];
         $variedad_id = $json['variedad_id'];
         $grado_id = $json['grado_id'];
         $tallos_x_bunch = $json['tallos_x_bunch'];
         //Se pregunta si se ha seleccionado una marcacion y una agencia, caso contrario lo rutea
         //para obligarlo a seleccionar
         $marcacion_id = $SesionUsuarioPlugin->getClienteSeleccionMarcacionSec();
         $agencia_id = $SesionUsuarioPlugin->getClienteSeleccionAgenciaId();
         //Se consulta la dispo, considerando los criterios de busqueda
         $cliente_id = $SesionUsuarioPlugin->getUserClienteId();
         $usuario_id = $SesionUsuarioPlugin->getClienteUsuarioId();
         $marcacion_sec = $SesionUsuarioPlugin->getClienteSeleccionMarcacionSec();
         $cbo_nro_caja = "";
         $nro_cajas = 0;
         $result = $DispoBO->getDispo($cliente_id, $usuario_id, $marcacion_sec, $tipo_caja_id, $variedad_id, $grado_id, false, true, false, $producto_id, $tallos_x_bunch);
         if ($result) {
             $result_dispo = $result['result_dispo'][0];
             if ($result_dispo) {
                 $arr_cajas = array();
                 for ($i = 1; $i <= $result_dispo['nro_cajas']; $i++) {
                     $arr_cajas[$i] = $i;
                 }
                 $cbo_nro_caja = \Application\Classes\Combo::getComboDataArray($arr_cajas, 1, "");
                 $nro_cajas = $result_dispo['nro_cajas'];
             }
             ///end if
         }
         //end function
         $response = new \stdClass();
         $response->respuesta_code = 'OK';
         $response->respuesta_mensaje = $result['respuesta_msg'];
         $response->respuesta_codex = $result['respuesta_code'];
         $response->cbo_nro_caja = $cbo_nro_caja;
         $response->nro_cajas = $nro_cajas;
         $json = new JsonModel(get_object_vars($response));
         return $json;
     } catch (\Exception $e) {
         $excepcion_msg = utf8_encode($this->ExcepcionPlugin()->getMessageFormat($e));
         $response = $this->getResponse();
         $response->setStatusCode(500);
         $response->setContent($excepcion_msg);
         return $response;
     }
 }
Example #13
0
 function getComboVariedadNoExiste($inventario_id, $calidad_id, $variedad_id, $texto_1er_elemento = "&lt;Seleccione&gt;", $color_1er_elemento = "#FFFFAA")
 {
     $DispoDAO = new DispoDAO();
     $CalidadDAO = new CalidadDAO();
     $DispoDAO->setEntityManager($this->getEntityManager());
     $CalidadDAO->setEntityManager($this->getEntityManager());
     $CalidadData = $CalidadDAO->consultar($calidad_id);
     $condiciones = array("inventario_id" => $inventario_id, "proveedor_id" => null, "clasifica" => $CalidadData->getClasificaFox(), "color_ventas_id" => null, "calidad_variedad_id" => null, "nro_tallos" => 25);
     $result_dispo = $this->listadoVacios($condiciones);
     $result_variedad = $DispoDAO->variedadesNoExiste($inventario_id, $CalidadData->getClasificaFox());
     $result = null;
     foreach ($result_dispo as $row) {
         $reg['variedad_id'] = $row['variedad_id'];
         $reg['variedad_nombre'] = $row['variedad'];
         $result[$reg['variedad_id']] = $reg;
     }
     //end foreach
     foreach ($result_variedad as $row) {
         $reg['variedad_id'] = $row['variedad_id'];
         $reg['variedad_nombre'] = $row['variedad_nombre'];
         $result[$reg['variedad_id']] = $reg;
     }
     //end foreach
     $opciones = \Application\Classes\Combo::getComboDataResultset($result, 'variedad_id', 'variedad_nombre', $variedad_id, $texto_1er_elemento, $color_1er_elemento);
     return $opciones;
 }
 /**
  *
  * @param string $tipo
  * @param string $texto_1er_elemento
  * @param string $color_1er_elemento
  * @return string
  */
 public static function getComboNroTallos($nro_tallo, $texto_1er_elemento = "&lt;Seleccione&gt;", $color_1er_elemento = "#FFFFAA")
 {
     $arrData = array('25' => '25', 'NO25' => '<>25');
     $opciones = \Application\Classes\Combo::getComboDataArray($arrData, $nro_tallo, $texto_1er_elemento);
     return $opciones;
 }
 public static function getCombo($tipo_grafico, $texto_1er_elemento = "&lt;Seleccione&gt;")
 {
     $arrData = array(self::GRAFICO_BARRA => "Grafico Barra", self::GRAFICO_LINEAL => "Grafico Lineal");
     $opciones = \Application\Classes\Combo::getComboDataArray($arrData, $tipo_grafico, $texto_1er_elemento);
     return $opciones;
 }