Hemos sido testigos a través del tiempo de como poco a poco los dispositivos móviles van desplazando a los equipos de escritorio y laptop o mas que desplazarlo son mas las personas que usan celulares en su vida diaria ya que es mas seguro que una persona tenga un celular a tener un equipo de computo
Les dejo algunos ejemplos de la facturación electrónica que entrara obligatoriamente en abril de 2022
Ya se puede ir timbrando con esta versión a partir de enero de 2022
INGRESO
<?xml version="1.0" encoding="utf-8"?>
<cfdi:Comprobante xsi:schemaLocation="http://www.sat.gob.mx/cfd/4 http://www.sat.gob.mx/sitio_internet/cfd/4/cfdv40.xsd" Version="4.0" Serie="Serie" Folio="Folio" Fecha="2021-12-14T00:18:10" Sello="e" CondicionesDePago="CondicionesDePago" SubTotal="200" Descuento="1" Moneda="AMD" TipoCambio="1" Total="199.16" TipoDeComprobante="I" Exportacion="01" MetodoPago="PPD" FormaPago="99" LugarExpedicion="20000" xmlns:cfdi="http://www.sat.gob.mx/cfd/4" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<cfdi:Emisor Rfc="EKU9003173C9" Nombre="ESCUELA KEMPER URGATE SA DE CV" RegimenFiscal="601" />
<cfdi:Receptor Rfc="URE180429TM6" Nombre="UNIVERSIDAD ROBOTICA ESPAÑOLA SA DE CV" DomicilioFiscalReceptor="45601" RegimenFiscalReceptor="601" UsoCFDI="G01" />
<cfdi:Conceptos>
<cfdi:Concepto ClaveProdServ="50211503" Cantidad="1" ClaveUnidad="H87" Unidad="Pieza" Descripcion="Cigarros" ValorUnitario="200.00" Descuento="1" Importe="200.00" ObjetoImp="02">
<cfdi:Impuestos>
<cfdi:Traslados>
<cfdi:Traslado Base="1" Importe="0.16" Impuesto="002" TasaOCuota="0.160000" TipoFactor="Tasa"/>
</cfdi:Traslados>
<cfdi:Retenciones>
<cfdi:Retencion Base="1" Impuesto="001" TipoFactor="Tasa" TasaOCuota="0.100000" Importe="0.00" />
<cfdi:Retencion Base="1" Impuesto="002" TipoFactor="Tasa" TasaOCuota="0.106666" Importe="0.00" />
</cfdi:Retenciones>
</cfdi:Impuestos>
</cfdi:Concepto>
</cfdi:Conceptos>
<cfdi:Impuestos TotalImpuestosRetenidos="0.00" TotalImpuestosTrasladados="0.16">
<cfdi:Retenciones>
<cfdi:Retencion Impuesto="001" Importe="0.00" />
<cfdi:Retencion Impuesto="002" Importe="0.00" />
</cfdi:Retenciones>
<cfdi:Traslados>
<cfdi:Traslado Base="1" Importe="0.16" Impuesto="002" TasaOCuota="0.160000" TipoFactor="Tasa"/>
</cfdi:Traslados>
</cfdi:Impuestos>
</cfdi:Comprobante><?xml version="1.0" encoding="utf-8"?>
<cfdi:Comprobante Fecha="2021-12-14T07:41:44" Folio="679" FormaPago="01" LugarExpedicion="22214" MetodoPago="PUE" Moneda="MXN" Sello="e" Serie="F" SubTotal="100.00" Exportacion="01" TipoDeComprobante="I" Total="100.00" Version="4.0" xmlns:cfdi="http://www.sat.gob.mx/cfd/4" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sat.gob.mx/cfd/4 http://www.sat.gob.mx/sitio_internet/cfd/4/cfdv40.xsd">
<cfdi:InformacionGlobal Periodicidad="01" Meses="01" Año="2021"/>
<cfdi:Emisor Rfc="EKU9003173C9" Nombre="ESCUELA KEMPER URGATE SA DE CV" RegimenFiscal="601" />
<cfdi:Receptor Rfc="URE180429TM6" Nombre="UNIVERSIDAD ROBOTICA ESPAÑOLA SA DE CV" DomicilioFiscalReceptor="45601" RegimenFiscalReceptor="601" UsoCFDI="G01" />
<cfdi:Conceptos>
<cfdi:Concepto Cantidad="1" ClaveProdServ="10201801" ClaveUnidad="E48" Descripcion="PRUEBA " Importe="100.000000" NoIdentificacion="02" Unidad="SERVICIO" ValorUnitario="100.000000" ObjetoImp="02">
<cfdi:Impuestos>
<cfdi:Traslados>
<cfdi:Traslado Base="1" Importe="1" Impuesto="002" TasaOCuota="0.160000" TipoFactor="Tasa"/>
</cfdi:Traslados>
<cfdi:Retenciones>
<cfdi:Retencion Base="1" Importe="1" Impuesto="002" TasaOCuota="0.040000" TipoFactor="Tasa"/>
</cfdi:Retenciones>
</cfdi:Impuestos>
<cfdi:InformacionAduanera NumeroPedimento="21 47 3807 8003832" />
<cfdi:Parte ClaveProdServ="50211503" ValorUnitario="200.00" Importe="200.00" Cantidad="1" Unidad="Pieza" NoIdentificacion="123" Descripcion="cosas" />
</cfdi:Concepto>
</cfdi:Conceptos>
<cfdi:Impuestos TotalImpuestosRetenidos="1" TotalImpuestosTrasladados="1">
<cfdi:Retenciones>
<cfdi:Retencion Importe="1" Impuesto="002"/>
</cfdi:Retenciones>
<cfdi:Traslados>
<cfdi:Traslado Base="1" Importe="1" Impuesto="002" TasaOCuota="0.160000" TipoFactor="Tasa"/>
</cfdi:Traslados>
</cfdi:Impuestos>
</cfdi:Comprobante>Traslado
<?xml version="1.0" encoding="utf-8"?>
<cfdi:Comprobante xsi:schemaLocation="http://www.sat.gob.mx/cfd/4 http://www.sat.gob.mx/sitio_internet/cfd/4/cfdv40.xsd" Version="4.0" Serie="Serie" Folio="Folio" Fecha="2021-12-14T00:18:10" Sello="e" CondicionesDePago="CondicionesDePago" SubTotal="0" Descuento="0" Moneda="AMD" TipoCambio="1" Total="0" TipoDeComprobante="T" Exportacion="01" LugarExpedicion="20000" xmlns:cfdi="http://www.sat.gob.mx/cfd/4" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<cfdi:Emisor Rfc="EKU9003173C9" Nombre="ESCUELA KEMPER URGATE SA DE CV" RegimenFiscal="601" />
<cfdi:Receptor Rfc="URE180429TM6" Nombre="UNIVERSIDAD ROBOTICA ESPAÑOLA SA DE CV" DomicilioFiscalReceptor="45601" RegimenFiscalReceptor="601" UsoCFDI="G01" />
<cfdi:Conceptos>
<cfdi:Concepto ClaveProdServ="50211503" NoIdentificacion="UT421511" Cantidad="1" ClaveUnidad="H87" Unidad="Pieza" Descripcion="Cigarros" ValorUnitario="0.00" Importe="0.00" ObjetoImp="01">
<cfdi:InformacionAduanera NumeroPedimento="21 47 3807 8003832" />
<cfdi:Parte ClaveProdServ="50211503" ValorUnitario="200.00" Importe="200.00" Cantidad="1" Unidad="Pieza" NoIdentificacion="123" Descripcion="cosas" />
</cfdi:Concepto>
</cfdi:Conceptos>
</cfdi:Comprobante>Pagos
<?xml version="1.0" encoding="utf-8"?>
<cfdi:Comprobante xsi:schemaLocation="http://www.sat.gob.mx/cfd/4 http://www.sat.gob.mx/sitio_internet/cfd/4/cfdv40.xsd http://www.sat.gob.mx/Pagos20
http://www.sat.gob.mx/sitio_internet/cfd/Pagos/Pagos20.xsd" xmlns:pago20="http://www.sat.gob.mx/Pagos20" Version="4.0" Serie="Serie" Folio="Folio" Fecha="2021-12-16T00:18:10" Sello="e" SubTotal="0" Moneda="XXX" Total="0.00" TipoDeComprobante="P" Exportacion="01" LugarExpedicion="20000" xmlns:cfdi="http://www.sat.gob.mx/cfd/4" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<cfdi:Emisor Rfc="EKU9003173C9" Nombre="ESCUELA KEMPER URGATE SA DE CV" RegimenFiscal="601" />
<cfdi:Receptor Rfc="URE180429TM6" Nombre="UNIVERSIDAD ROBOTICA ESPAÑOLA SA DE CV" DomicilioFiscalReceptor="45601" RegimenFiscalReceptor="601" UsoCFDI="G01" />
<cfdi:Conceptos>
<cfdi:Concepto ClaveProdServ="84111506" Cantidad="1" ClaveUnidad="ACT" Descripcion="Pago" ValorUnitario="0.00" Importe="0.00" ObjetoImp="01" />
</cfdi:Conceptos>
<cfdi:Complemento>
<pago20:Pagos Version="2.0">
<pago20:Totales MontoTotalPagos="200.00" />
<pago20:Pago FechaPago="2021-12-15T00:00:00" FormaDePagoP="01" MonedaP="MXN" Monto="200.00" TipoCambioP="1">
<pago20:DoctoRelacionado IdDocumento="bfc36522-4b8e-45c4-8f14-d11b289f9eb7" MonedaDR="MXN" NumParcialidad="1" ImpSaldoAnt="200.00" ImpPagado="200.00" ImpSaldoInsoluto="0.00" ObjetoImpDR="01" EquivalenciaDR="1"/>
</pago20:Pago>
</pago20:Pagos>
</cfdi:Complemento>
</cfdi:Comprobante>Fuente

(adsbygoogle = window.adsbygoogle || []).push({}); Estamos en domingo, segundo día de 2022, y los desarrolladores que hay detrás de uno de los alumnos más aventajados de Arch Linux habían lanzado una Testing hace poco, por lo que no se esperaba una versión estable tan pronto. Pero Manjaro 2022-01-02 ha llegado, y lo ha hecho con […]
Manjaro 2022-01-02, la primera Stable del año llega con Python 3.10, entre otras novedades
Anteriormente hemos visto como hacer fácil aplicaciones básicas y sencillas en cualquier distribución de GNU/Linux usando Gambas 3.
Ahora haremos la aplicación usando la ultima versión de Visual Basic que esta dentro de la versión community 2022
Como introducción ya deben saber que a estas alturas Gambas3 y Visual Basic Entran a la categoria de entornos RAD (Rapid application development) o en español (desarrollo rapido de aplicacion)
Ventajas de la versión 2022 sobre las anteriores
No hace mucho ha sido lanzado la ultima versión de Windows, Windows 11 y pese que aun no es compatible con la mayoría de las maquinas mucha gente se las arregla para saltarse los requisitos minimos
Como recomendación si el equipo no cumple con lo requisitos mínimos es mejor dejar el Windows 10 para el mas correcto funcionamiento, ya que seria si no cumple con los requisitos será aun peor que tener el Windows10
Después de instalar es checamos en el administrador de dispositivos y si hay dispositivos sin controladores lo mejor es dejar que Windows 11 se actualice, normal mente lo hace en automático en el primer inicio
Si al reiniciar observamos que aun hay dispositivos sin controlador instalado podemos usar Driver Booster, que se encargara de buscar e instalar los controladores mas básico de manera gratuita
Al momento de instalarlo debemos elegir la instalación personalizada para evitar instalar programas o publicidad no deseada
Les dejo este mini tutorial de gambas en donde vemos como instalarlo, como programar las ventanas, eventos, veremos como tener acceso a la base de datos MySQL, Guardar configuraciones en la maquina “Settings“, como guardar archivos en el disco duro y finalmente como publicar el programa en la granja de software
- Programando en Gambas3 Introducción – Instalación
- Creando un proyecto al estilo winforms en GAMBAS3
- Añadiendo menú a la ventana principal del programa
- Añadiendo controles al formulario
- Crear otro formulario e invocarlo desde el menú
- Guardando configuraciones en Gambas3
- Conexión a la base de datos MySQL en GAMBAS
- Función en GAMBAS3 para convertir la primera letra de una cadena a Mayúscula
- Crear función en GAMBAS3 para crear el código para el archivo controlador en php8
- Función para crear automáticamente el código de la vista en base a una tabla en MySQL
- Como guardar archivos en disco duro con GAMBAS3 File.Save
- Como publicar proyecto de gambas3 en la granja de software
Suponiendo que ya esta listo el programa lo que sigue puede ser lo siguiente
1. Crear un simple Ejecutable
2. Crear un paquete de instalación para instalarlo en cualquier distribución de Linux a través de un empaquetado .deb
3. Publicarlo en la granja de software de Gambas3
Lo que haremos es publicarlo en la granja de software
Primero le asignamos un icono al proyecto en las propiedades del proyecto

Ahora nos vamos al menú Proyecto -> Publicar







Ya tenemos las funciones para crear automáticamente los códigos del Modelo/Vista/Controlador para PHP ahora lo que sigue es crear los archivos en el directorio del directorio del proyecto en PHP
Para guardar archivo en Gambas3 usaremos la función File.Save(“ruta donde se va a guardar”,”contenido del archivo”)
Pasos


Insertamos en ese evento el siguiente código
Dim strModel1 As String
Dim strControlador As String
Dim strVista As String
' GUARDAR CONFIGURACION
Settings["ruta"] = ruta.SelectedPath
Settings["tabla"] = txtTabla.Text
' CREA ARCHIVO DEL MODELO
strModel1 = creadorModelo.creaModelo()
File.Save(ruta.SelectedPath & "/" & "modelos/" & txtTabla.Text & ".modelo.php", strModel1)
' CREA ARCHIVO DEL CONTROLADOR
strControlador = creadorControlador.creaControlador()
File.Save(ruta.SelectedPath & "/" & "controladores/" & txtTabla.Text & ".controlador.php", strControlador)
' CREA ARCHIVO VISTA
strVista = creadorVista.creaVista()
File.Save(ruta.SelectedPath & "/" & "vistas/modulos/" & txtTabla.Text & ".php", strVista)
' MANDAMOS MENSAJE DE QUE TODO SE HA GUARDADO CORRECTAMENTE
Message.Info("Guardado Correctamente")
Luego guarda con File.Save en la ruta que seleccionamos con el control llamado “ruta” el texto que esta en strModel
Esta misma lógica se usa para el controlador y la vista
En la siguiente publicación veremos como asignarle un icono al proyecto
Ahora solo queda hacer la función para generar automáticamente el código HTML/PHP para la vista del catalogo en base a la nueva tabla.
La lógica es igual solo que es otro texto

Insertamos el siguiente codigo
' Gambas module file
Public Function creaVista() As String
Dim strVista As String
Dim conexion As New Connection
Dim strDatos As String
With conexion
.Type = "mysql"
.Port = "3306"
.Host = Settings["servidor"]
.User = Settings["usuario"]
.Password = Settings["password"]
.Name = Settings["baseDeDatos"]
.Open()
End With
Dim $result As Result
Dim $resultClases As Result
Dim strLLavePrimaria As String
$result = conexion.Exec("SHOW KEYS FROM " & FMain.txtTabla.Text & " WHERE Key_name = 'PRIMARY'")
strLLavePrimaria = $result["Column_name"]
conexion.Exec("delete from clases where clase= 'controladores/" & FMain.txtTabla.Text & ".controlador.php'")
conexion.Exec("delete from clases where clase= 'modelos/" & FMain.txtTabla.Text & ".modelo.php'")
conexion.Exec("insert into clases(clase) values('controladores/" & FMain.txtTabla.Text & ".controlador.php')")
conexion.Exec("insert into clases(clase) values( 'modelos/" & FMain.txtTabla.Text & ".modelo.php')")
$result = conexion.Exec("describe " & FMain.txtTabla.Text)
$result = conexion.Exec("describe " & FMain.txtTabla.Text)
Dim contador As Integer
Dim strEncabezadosTabla As String
Dim strCampos As String
Dim strControlesNuevos As String
Dim strControlesEditar As String
Dim strEditarJS As String
Dim strBloquear As String
Dim strEditarTraeDatos As String
contador = 0
strEncabezadosTabla = ""
strCampos = ""
strControlesNuevos = ""
strEditarJS = ""
While $result.Length > contador
strEncabezadosTabla &= "<th>" & utilerias.strPrimeraMayuscula($result["Field"]) & "</th>" & gb.CrLf
strCampos &= "<td>'.$value[\"" & $result["Field"] & "\"].'</td>" & gb.CrLf
If contador > 0
strControlesNuevos &= "" & " <!-- ENTRADA PARA " & UCase($result["Field"]) & " --> " & gb.CrLf
strControlesNuevos &= "" & " " & gb.CrLf
strControlesNuevos &= "" & " <div class=\"form-group\"> " & gb.CrLf
strControlesNuevos &= "" & " " & gb.CrLf
strControlesNuevos &= "" & " <div class=\"input-group\"> " & gb.CrLf
strControlesNuevos &= "" & " " & gb.CrLf
strControlesNuevos &= "" & " <span class=\"input-group-addon\">" & utilerias.strPrimeraMayuscula($result["Field"]) & ": </span> " & gb.CrLf
strControlesNuevos &= "" & " " & gb.CrLf
strControlesNuevos &= "" & " <input type=\"text\" class=\"form-control input-lg\" name=\"nuevo" & utilerias.strPrimeraMayuscula($result["Field"]) & "\" placeholder=\"Ingresar " & utilerias.strPrimeraMayuscula($result["Field"]) & "\" required> " & gb.CrLf
strControlesNuevos &= "" & " " & gb.CrLf
strControlesNuevos &= "" & " </div> " & gb.CrLf
strControlesNuevos &= "" & " " & gb.CrLf
strControlesNuevos &= "" & " </div> " & gb.CrLf
strEditarJS &= "" & " $(\"#editarDescripcion\").val(respuesta[\"descripcion\"]);" & gb.CrLf
End If
If $result["Key"] == "PRI"
strBloquear = "readonly"
Else
strBloquear = ""
End If
strControlesEditar &= "" & " <!-- ENTRADA PARA " & UCase($result["Field"]) & " --> " & gb.CrLf
strControlesEditar &= "" & " " & gb.CrLf
strControlesEditar &= "" & " <div class=\"form-group\"> " & gb.CrLf
strControlesEditar &= "" & " " & gb.CrLf
strControlesEditar &= "" & " <div class=\"input-group\"> " & gb.CrLf
strControlesEditar &= "" & " " & gb.CrLf
strControlesEditar &= "" & " <span class=\"input-group-addon\">" & utilerias.strPrimeraMayuscula($result["Field"]) & ": </span> " & gb.CrLf
strControlesEditar &= "" & " " & gb.CrLf
strControlesEditar &= "" & " <input " & strBloquear & " type=\"text\" class=\"form-control input-lg\" id=\"editar" & utilerias.strPrimeraMayuscula($result["Field"]) & "\" name=\"editar" & utilerias.strPrimeraMayuscula($result["Field"]) & "\" placeholder=\"Ingresar " & utilerias.strPrimeraMayuscula($result["Field"]) & "\" required> " & gb.CrLf
strControlesEditar &= "" & " " & gb.CrLf
strControlesEditar &= "" & " </div> " & gb.CrLf
strControlesEditar &= "" & " " & gb.CrLf
strControlesEditar &= "" & " </div> " & gb.CrLf
strEditarTraeDatos &= "" & " $(\"#editar" & utilerias.strPrimeraMayuscula($result["Field"]) & "\").val(respuesta[\"" & $result["Field"] & "\"]); " & gb.CrLf
$result.MoveNext
contador = contador + 1
Wend
strControlesEditar &= "" & " <input type=\"hidden\" id=\"editar" & utilerias.strPrimeraMayuscula(FMain.txtTabla.text) & "\" name = \"editar" & utilerias.strPrimeraMayuscula(FMain.txtTabla.text) & "\" > " & gb.CrLf
strEncabezadosTabla &= "<th>Acciones</th>"
strCampos &= "<td> " & gb.CrLf
strCampos &= "<div class = \"btn-group\"> " & gb.CrLf
strCampos &= " <button class= \"btn btn-warning btnEditar" & utilerias.strPrimeraMayuscula(FMain.txtTabla.Text) & "\" id" & utilerias.strPrimeraMayuscula(FMain.txtTabla.text) & " = \"'.$value[\"id\"].'\" data-toggle = \"modal\" data-target = \"#modalEditar" & Trim(utilerias.strPrimeraMayuscula(FMain.txtTabla.Text)) & "\"> <i class = \"fa fa-pencil\"> </i> </button> " & gb.CrLf
strCampos &= "<button class = \"btn btn-danger btnEliminar" & utilerias.strPrimeraMayuscula(FMain.txtTabla.Text) & "\" id" & utilerias.strPrimeraMayuscula(FMain.txtTabla.Text) & "= \"'.$value[\"id\"].'\"><i class= \"fa fa-times\"></i></button>" & gb.CrLf
strCampos &= "</div>" & gb.CrLf
strCampos &= "</td> " & gb.CrLf
strVista &= "" & "<?php" & gb.CrLf
strVista &= "" & gb.CrLf
strVista &= "" & "if(\"off\" == \"offf\"){" & gb.CrLf
strVista &= "" & gb.CrLf
strVista &= "" & " echo '<script>" & gb.CrLf
strVista &= "" & gb.CrLf
strVista &= "" & " window.location = \"inicio\"; " & gb.CrLf
strVista &= "" & " " & gb.CrLf
strVista &= "" & " </script>'; " & gb.CrLf
strVista &= "" & " " & gb.CrLf
strVista &= "" & " return; " & gb.CrLf
strVista &= "" & " " & gb.CrLf
strVista &= "" & "} " & gb.CrLf
strVista &= "" & " " & gb.CrLf
strVista &= "" & "?> " & gb.CrLf
strVista &= "" & "<div class=\"content-wrapper\">" & gb.CrLf
strVista &= "" & " " & gb.CrLf
strVista &= "" & " <section class=\"content-header\">" & gb.CrLf
strVista &= "" & " " & gb.CrLf
strVista &= "" & " <h1> " & gb.CrLf
strVista &= "" & " " & gb.CrLf
strVista &= "" & " Administrar <?php echo mb_strtolower(preg_replace('/(?<=\\w)(\\p{Lu})/u', ' $1', ' " & utilerias.strPrimeraMayuscula(FMain.txtTabla.Text) & " ')); ?> " & gb.CrLf
strVista &= "" & " " & gb.CrLf
strVista &= "" & " </h1> " & gb.CrLf
strVista &= "" & " " & gb.CrLf
strVista &= "" & " <ol class=\"breadcrumb\"> " & gb.CrLf
strVista &= "" & " " & gb.CrLf
strVista &= "" & " <li><a href=\"inicio\"><i class=\"fa fa-dashboard\"></i> Inicio</a></li> " & gb.CrLf
strVista &= "" & " " & gb.CrLf
strVista &= "" & " <li class=\"active\">Administrar <?php echo mb_strtolower(preg_replace('/(?<=\\w)(\\p{Lu})/u', ' $1', '" & utilerias.strPrimeraMayuscula(FMain.txtTabla.Text) & " ')); ?></li> " & gb.CrLf
strVista &= "" & " " & gb.CrLf
strVista &= "" & " </ol> " & gb.CrLf
strVista &= "" & " " & gb.CrLf
strVista &= "" & " </section> " & gb.CrLf
strVista &= "" & " " & gb.CrLf
strVista &= "" & " <section class=\"content\"> " & gb.CrLf
strVista &= "" & " " & gb.CrLf
strVista &= "" & " <div class=\"box\"> " & gb.CrLf
strVista &= "" & " " & gb.CrLf
strVista &= "" & " <div class=\"box-header with-border\"> " & gb.CrLf
strVista &= "" & " " & gb.CrLf
strVista &= "" & " <button class=\"btn btn-primary\" data-toggle=\"modal\" data-target=\"#modalAgregar" & utilerias.strPrimeraMayuscula(FMain.txtTabla.Text) & "\"> " & gb.CrLf
strVista &= "" & " " & gb.CrLf
strVista &= "" & " Agregar <?php echo mb_strtolower(preg_replace('/(?<=\\w)(\\p{Lu})/u', ' $1', '" & utilerias.strPrimeraMayuscula(FMain.txtTabla.Text) & " ')); ?> " & gb.CrLf
strVista &= "" & " " & gb.CrLf
strVista &= "" & " </button> " & gb.CrLf
strVista &= "" & " " & gb.CrLf
strVista &= "" & " </div> " & gb.CrLf
strVista &= "" & " " & gb.CrLf
strVista &= "" & " <div class=\"box-body\"> " & gb.CrLf
strVista &= "" & " " & gb.CrLf
strVista &= "" & " <table class=\"table table-bordered table-striped dt-responsive tablas\" width=\"100%\"> " & gb.CrLf
strVista &= "" & " " & gb.CrLf
strVista &= "" & " <thead> " & gb.CrLf
strVista &= "" & " " & gb.CrLf
strVista &= "" & " <tr> " & gb.CrLf
strVista &= "" & " " & strEncabezadosTabla
strVista &= "" & " </tr> " & gb.CrLf
strVista &= "" & " " & gb.CrLf
strVista &= "" & " </thead> " & gb.CrLf
strVista &= "" & " " & gb.CrLf
strVista &= "" & " <tbody> " & gb.CrLf
strVista &= "" & " " & gb.CrLf
strVista &= "" & " <?php " & gb.CrLf
strVista &= "" & " " & gb.CrLf
strVista &= "" & " $item = null; " & gb.CrLf
strVista &= "" & " $valor = null; " & gb.CrLf
strVista &= "" & " " & gb.CrLf
strVista &= "" & " $" & FMain.txtTabla.Text & "= Controlador" & utilerias.strPrimeraMayuscula(FMain.txtTabla.Text) & "::ctrMostrar($item, $valor); " & gb.CrLf
strVista &= "" & " " & gb.CrLf
strVista &= "" & " foreach ($" & FMain.txtTabla.Text & " as $key => $value){ " & gb.CrLf
strVista &= "" & " " & gb.CrLf
strVista &= "" & " echo ' <tr> " & gb.CrLf
strVista &= "" & strCampos & gb.CrLf
strVista &= "" & " " & gb.CrLf
strVista &= "" & " </tr>'; " & gb.CrLf
strVista &= "" & " } " & gb.CrLf
strVista &= "" & " " & gb.CrLf
strVista &= "" & " " & gb.CrLf
strVista &= "" & " ?> " & gb.CrLf
strVista &= "" & " " & gb.CrLf
strVista &= "" & " </tbody> " & gb.CrLf
strVista &= "" & " " & gb.CrLf
strVista &= "" & " </table> " & gb.CrLf
strVista &= "" & " " & gb.CrLf
strVista &= "" & " </div> " & gb.CrLf
strVista &= "" & " " & gb.CrLf
strVista &= "" & " </div> " & gb.CrLf
strVista &= "" & " " & gb.CrLf
strVista &= "" & " </section> " & gb.CrLf
strVista &= "" & " " & gb.CrLf
strVista &= "" & "</div> " & gb.CrLf
strVista &= "" & " " & gb.CrLf
strVista &= "" & "<!--===================================== " & gb.CrLf
strVista &= "" & "MODAL <?php echo mb_strtolower(preg_replace('/(?<=\\w)(\\p{Lu})/u', ' $1', ' " & (FMain.txtTabla.Text) & " ')); ?> " & gb.CrLf
strVista &= "" & " ======================================--> " & gb.CrLf
strVista &= "" & " " & gb.CrLf
strVista &= "" & " " & gb.CrLf
strVista &= "" & "<div id=\"modalAgregar" & utilerias.strPrimeraMayuscula(FMain.txtTabla.text) & "\" class=\"modal fade\" role=\"dialog\"> " & gb.CrLf
strVista &= "" & " " & gb.CrLf
strVista &= "" & " <div class=\"modal-dialog\"> " & gb.CrLf
strVista &= "" & " " & gb.CrLf
strVista &= "" & " <div class=\"modal-content\"> " & gb.CrLf
strVista &= "" & " " & gb.CrLf
strVista &= "" & " <form role=\"form\" method=\"post\" enctype=\"multipart/form-data\"> " & gb.CrLf
strVista &= "" & " " & gb.CrLf
strVista &= "" & " <!--===================================== " & gb.CrLf
strVista &= "" & " CABEZA DEL MODAL " & gb.CrLf
strVista &= "" & " ======================================--> " & gb.CrLf
strVista &= "" & " " & gb.CrLf
strVista &= "" & " <div class=\"modal-header\" style=\"background:#3c8dbc; color:white\"> " & gb.CrLf
strVista &= "" & " " & gb.CrLf
strVista &= "" & " <button type=\"button\" class=\"close\" data-dismiss=\"modal\">×</button> " & gb.CrLf
strVista &= "" & " " & gb.CrLf
strVista &= "" & " <h4 class=\"modal-title\">Agregar <?php echo mb_strtolower(preg_replace('/(?<=\\w)(\\p{Lu})/u', ' $1', ' " & (FMain.txtTabla.Text) & " ')); ?> </h4> " & gb.CrLf
strVista &= "" & " " & gb.CrLf
strVista &= "" & " </div> " & gb.CrLf
strVista &= "" & " <!--===================================== " & gb.CrLf
strVista &= "" & " CUERPO DEL MODAL " & gb.CrLf
strVista &= "" & " ======================================--> " & gb.CrLf
strVista &= "" & " " & gb.CrLf
strVista &= "" & " <div class=\"modal-body\"> " & gb.CrLf
strVista &= "" & " " & gb.CrLf
strVista &= "" & " <div class=\"box-body\"> " & gb.CrLf
strVista &= "" & " " & gb.CrLf
'strVista &= "" & " <!-- ENTRADA PARA DESCRIPCION --> " & gb.CrLf
strVista &= "" & " " & strControlesNuevos & gb.CrLf
strVista &= "" & " " & gb.CrLf
strVista &= "" & " " & gb.CrLf
strVista &= "" & " " & gb.CrLf
strVista &= "" & " " & gb.CrLf
strVista &= "" & " " & gb.CrLf
strVista &= "" & " </div> " & gb.CrLf
strVista &= "" & " " & gb.CrLf
strVista &= "" & " </div> " & gb.CrLf
strVista &= "" & " " & gb.CrLf
strVista &= "" & " <!--===================================== " & gb.CrLf
strVista &= "" & " PIE DEL MODAL " & gb.CrLf
strVista &= "" & " ====================================== --> " & gb.CrLf
strVista &= "" & " " & gb.CrLf
strVista &= "" & " <div class=\"modal-footer\"> " & gb.CrLf
strVista &= "" & " " & gb.CrLf
strVista &= "" & " <button type=\"button\" class=\"btn btn-default pull-left\" data-dismiss=\"modal\">Salir</button> " & gb.CrLf
strVista &= "" & " " & gb.CrLf
strVista &= "" & " <button type=\"submit\" class=\"btn btn-primary\">Guardar</button> " & gb.CrLf
strVista &= "" & " " & gb.CrLf
strVista &= "" & " </div> " & gb.CrLf
strVista &= "" & " " & gb.CrLf
strVista &= "" & " <?php " & gb.CrLf
strVista &= "" & " " & gb.CrLf
strVista &= "" & " $crear = new Controlador" & utilerias.strPrimeraMayuscula(FMain.txtTabla.Text) & "(); " & gb.CrLf
strVista &= "" & " $crear ->ctrIngresar(); " & gb.CrLf
strVista &= "" & " " & gb.CrLf
strVista &= "" & " ?> " & gb.CrLf
strVista &= "" & " " & gb.CrLf
strVista &= "" & " </form> " & gb.CrLf
strVista &= "" & " " & gb.CrLf
strVista &= "" & " </div> " & gb.CrLf
strVista &= "" & " " & gb.CrLf
strVista &= "" & " </div> " & gb.CrLf
strVista &= "" & " " & gb.CrLf
strVista &= "" & "</div> " & gb.CrLf
strVista &= "" & " " & gb.CrLf
strVista &= "" & "<!--===================================== " & gb.CrLf
strVista &= "" & "MODAL EDITAR USUARIO " & gb.CrLf
strVista &= "" & " ======================================--> " & gb.CrLf
strVista &= "" & " " & gb.CrLf
strVista &= "" & " " & gb.CrLf
strVista &= "" & "<div id=\"modalEditar" & utilerias.strPrimeraMayuscula(FMain.txtTabla.Text) & "\" class=\"modal fade\" role=\"dialog\">" & gb.CrLf
strVista &= "" & " " & gb.CrLf
strVista &= "" & " <div class=\"modal-dialog\"> " & gb.CrLf
strVista &= "" & " " & gb.CrLf
strVista &= "" & " <div class=\"modal-content\"> " & gb.CrLf
strVista &= "" & " " & gb.CrLf
strVista &= "" & " <form role=\"form\" method=\"post\" enctype=\"multipart/form-data\"> " & gb.CrLf
strVista &= "" & " " & gb.CrLf
strVista &= "" & " <!--===================================== " & gb.CrLf
strVista &= "" & " CABEZA DEL MODAL " & gb.CrLf
strVista &= "" & " ======================================--> " & gb.CrLf
strVista &= "" & " " & gb.CrLf
strVista &= "" & " <div class=\"modal-header\" style=\"background:#3c8dbc; color:white\"> " & gb.CrLf
strVista &= "" & " " & gb.CrLf
strVista &= "" & " <button type=\"button\" class=\"close\" data-dismiss=\"modal\">×</button> " & gb.CrLf
strVista &= "" & " " & gb.CrLf
strVista &= "" & " <h4 class=\"modal-title\">Agregar <?php echo mb_strtolower(preg_replace('/(?<=\\w)(\\p{Lu})/u', ' $1', ' " & (FMain.txtTabla.Text) & " ')); ?> </h4> " & gb.CrLf
strVista &= "" & " " & gb.CrLf
strVista &= "" & " </div> " & gb.CrLf
strVista &= "" & " " & gb.CrLf
strVista &= "" & " <!--===================================== " & gb.CrLf
strVista &= "" & " CUERPO DEL MODAL " & gb.CrLf
strVista &= "" & " ======================================--> " & gb.CrLf
strVista &= "" & " " & gb.CrLf
strVista &= "" & " <div class=\"modal-body\"> " & gb.CrLf
strVista &= "" & " " & gb.CrLf
strVista &= "" & " <div class=\"box-body\"> " & gb.CrLf
strVista &= "" & " " & gb.CrLf
strVista &= "" & " <!-- ENTRADA PARA DESCRIPCION --> " & gb.CrLf
strVista &= "" & " " & gb.CrLf
strVista &= "" & strControlesEditar
strVista &= "" & " " & gb.CrLf
strVista &= "" & " " & gb.CrLf
strVista &= "" & " " & gb.CrLf
strVista &= "" & " " & gb.CrLf
strVista &= "" & " </div> " & gb.CrLf
strVista &= "" & " " & gb.CrLf
strVista &= "" & " </div> " & gb.CrLf
strVista &= "" & " " & gb.CrLf
strVista &= "" & " <!--===================================== " & gb.CrLf
strVista &= "" & " PIE DEL MODAL " & gb.CrLf
strVista &= "" & " ======================================--> " & gb.CrLf
strVista &= "" & " " & gb.CrLf
strVista &= "" & " <div class=\"modal-footer\"> " & gb.CrLf
strVista &= "" & " " & gb.CrLf
strVista &= "" & " <button type=\"button\" class=\"btn btn-default pull-left\" data-dismiss=\"modal\">Salir</button> " & gb.CrLf
strVista &= "" & " " & gb.CrLf
strVista &= "" & " <button type=\"submit\" class=\"btn btn-primary\">Modificar</button> " & gb.CrLf
strVista &= "" & " " & gb.CrLf
strVista &= "" & " </div> " & gb.CrLf
strVista &= "" & " " & gb.CrLf
strVista &= "" & " <?php " & gb.CrLf
strVista &= "" & " " & gb.CrLf
strVista &= "" & " $editar = new Controlador" & utilerias.strPrimeraMayuscula(FMain.txtTabla.text) & "(); " & gb.CrLf
strVista &= "" & " $editar ->ctrEditar(); " & gb.CrLf
strVista &= "" & " " & gb.CrLf
strVista &= "" & " ?> " & gb.CrLf
strVista &= "" & " " & gb.CrLf
strVista &= "" & " </form> " & gb.CrLf
strVista &= "" & " " & gb.CrLf
strVista &= "" & " </div> " & gb.CrLf
strVista &= "" & " " & gb.CrLf
strVista &= "" & " </div> " & gb.CrLf
strVista &= "" & " " & gb.CrLf
strVista &= "" & "</div> " & gb.CrLf
strVista &= "" & " " & gb.CrLf
strVista &= "" & "<?php " & gb.CrLf
strVista &= "" & " " & gb.CrLf
strVista &= "" & " $borrar = new Controlador" & utilerias.strPrimeraMayuscula(FMain.txtTabla.Text) & "(); " & gb.CrLf
strVista &= "" & " $borrar ->ctrBorrar(); " & gb.CrLf
strVista &= "" & " " & gb.CrLf
strVista &= "" & "?> " & gb.CrLf
'JAVASCRIPT FUNCIONES
strVista &= "" & "<script type=\"text/javascript\">" & gb.CrLf
'ELIMINAR
strVista &= "" & "/*= == == == == == == == == == == == == == == == == == == == == == ==" & gb.CrLf
strVista &= "" & " ELIMINAR " & UCase(FMain.txtTabla.Text) & gb.CrLf
strVista &= "" & " == == == == == == == == == == == == == == == == == == == == == == = */" & gb.CrLf
strVista &= "" & "$(\".tablas\").on(\"click\", \".btnEliminar" & utilerias.strPrimeraMayuscula(FMain.txtTabla.Text) & "\", function() {" & gb.CrLf
strVista &= "" & " var id" & utilerias.strPrimeraMayuscula(FMain.txtTabla.Text) & " = $(this).attr(\"id" & FMain.txtTabla.Text & "\");" & gb.CrLf
strVista &= "" & " swal( {" & gb.CrLf
strVista &= "" & " title: '¿Está seguro de borrar?'," & gb.CrLf
strVista &= "" & " text: \"¡Si no lo está puede cancelar la accíón!\"," & gb.CrLf
strVista &= "" & " type: 'warning'," & gb.CrLf
strVista &= "" & " showCancelButton: true," & gb.CrLf
strVista &= "" & " confirmButtonColor: '#3085d6'," & gb.CrLf
strVista &= "" & " cancelButtonColor: '#d33'," & gb.CrLf
strVista &= "" & " cancelButtonText: 'Cancelar'," & gb.CrLf
strVista &= "" & " confirmButtonText: 'Si, borrar!'" & gb.CrLf
strVista &= "" & " }).then(function(result) {" & gb.CrLf
strVista &= "" & "" & gb.CrLf
strVista &= "" & " if (result.value) {" & gb.CrLf
strVista &= "" & "" & gb.CrLf
strVista &= "" & " window.location = \"index.php?ruta=" & (FMain.txtTabla.Text) & "&id" & utilerias.strPrimeraMayuscula(FMain.txtTabla.Text) & "=\"+id" & utilerias.strPrimeraMayuscula(FMain.txtTabla.Text) & "+\"&borrar" & utilerias.strPrimeraMayuscula(FMain.txtTabla.Text) & "=borrar\";" & gb.CrLf
strVista &= "" & "" & gb.CrLf
strVista &= "" & " }" & gb.CrLf
strVista &= "" & "" & gb.CrLf
strVista &= "" & " })" & gb.CrLf
strVista &= "" & "})" & gb.CrLf
'editar
strVista &= "" & "/* = == == == == == == == == == == == == == == == == == == == == == ==" & gb.CrLf
strVista &= "" & " EDITAR " & gb.CrLf
strVista &= "" & " == == == == == == == == == == == == == == == == == == == == == == = */" & gb.CrLf
strVista &= "" & "$(\".tablas\").on(\"click\", \".btnEditar" & utilerias.strPrimeraMayuscula(FMain.txtTabla.Text) & "\", function() {" & gb.CrLf
strVista &= "" & "" & gb.CrLf
strVista &= "" & " var id" & utilerias.strPrimeraMayuscula(FMain.txtTabla.Text) & " = $(this).attr(\"id" & utilerias.strPrimeraMayuscula(FMain.txtTabla.Text) & "\");" & gb.CrLf
strVista &= "" & " console.log(id" & utilerias.strPrimeraMayuscula(FMain.txtTabla.Text) & ");"
strVista &= "" & "" & gb.CrLf
strVista &= "" & "" & gb.CrLf
strVista &= "" & " var datos = new FormData();" & gb.CrLf
strVista &= "" & " datos.append(\"id" & utilerias.strPrimeraMayuscula(FMain.txtTabla.Text) & "\", id" & utilerias.strPrimeraMayuscula(FMain.txtTabla.Text) & "); " & gb.CrLf
strVista &= "" & " datos.append(\"buscar" & utilerias.strPrimeraMayuscula(FMain.txtTabla.Text) & "\", \"buscar" & utilerias.strPrimeraMayuscula(FMain.txtTabla.Text) & "\");" & gb.CrLf
strVista &= "" & " " & gb.CrLf
strVista &= "" & "" & gb.CrLf
strVista &= "" & " $.ajax( {" & gb.CrLf
strVista &= "" & "" & gb.CrLf
strVista &= "" & " url:\"controladores/" & FMain.txtTabla.text & ".controlador.php\"," & gb.CrLf
strVista &= "" & " method:\"POST\"," & gb.CrLf
strVista &= "" & " data: datos," & gb.CrLf
strVista &= "" & " cache: false," & gb.CrLf
strVista &= "" & " contentType: false," & gb.CrLf
strVista &= "" & " processData: false," & gb.CrLf
strVista &= "" & " dataType:\"json\"," & gb.CrLf
strVista &= "" & " success: function(respuesta) {" & gb.CrLf
strVista &= "" & "" & gb.CrLf
strVista &= "" & strEditarTraeDatos & gb.CrLf
strVista &= "" & " " & gb.CrLf
strVista &= "" & " }" & gb.CrLf
strVista &= "" & "" & gb.CrLf
strVista &= "" & " });" & gb.CrLf
strVista &= "" & "" & gb.CrLf
strVista &= "" & "})" & gb.CrLf
strVista &= "" & "</script>" & gb.CrLf
Return strVista
End
En la siguiente publicación veremos como generar los archivos modelos/vista/Controlador al darle click al botón Crear Catalogo