576 Commits

Author SHA1 Message Date
47679cd4e4 Se registra todo envio a Toku 2025-08-12 19:18:18 -04:00
0f8db5a3f8 Merge pull request 'FIX: Telefono sobre rango maximo de integer en MySQL' (#26) from hotfix/nueva-venta-fallando into develop
Reviewed-on: #26
2025-08-05 15:44:54 -04:00
c38e89d3f1 FIX: Telefono sobre rango maximo de integer en MySQL 2025-08-05 15:41:23 -04:00
307f2ac7d7 feature/cierres (#25)
Varios cambios

Co-authored-by: Juan Pablo Vial <jpvialb@incoviba.cl>
Reviewed-on: #25
2025-07-22 13:18:00 +00:00
ba57cad514 feature/editar-bono-pie (#24)
Rutas y controladores para editar bono

Formulario para editar bono pie

Filtro de columnas

Uso de nuevas estructuras y editar Bono Pie

Uso de nuevas estructuras.

Capacidad de pasar a pesos o a UF en Servicio Valor

FIX: botón incorrecto

Co-authored-by: Juan Pablo Vial <jpvialb@incoviba.cl>
Reviewed-on: #24
2025-04-11 17:34:40 +00:00
86d030bb71 Merge pull request 'FIX: no permite escriturar cuando se reajusta si no existe pie' (#23) from fix/no-escritura into develop
Reviewed-on: #23
2025-04-04 16:20:39 +00:00
3b38b5d349 Si no existe Pie no muestra reajuste.
Mostrar loading mientras se guarda
2025-04-04 13:19:20 -03:00
28fb96db6a Merge pull request 'feature/porcentajes-pie-y-bono' (#22) from feature/porcentajes-pie-y-bono into develop
Reviewed-on: #22
2025-04-03 16:51:15 +00:00
af4dec77d1 Merge remote-tracking branch 'origin/feature/porcentajes-pie-y-bono' into feature/porcentajes-pie-y-bono 2025-04-03 13:49:10 -03:00
df7f462ead Mostrar porcentajes en venta 2025-04-03 13:49:00 -03:00
68e436cd67 Mostrar porcentajes en venta 2025-04-03 13:43:46 -03:00
6d1782cac6 mejora en UX de busqueda 2025-04-03 13:38:11 -03:00
74a2cf7303 Actualizaciones en Format 2025-04-03 13:37:41 -03:00
4d6a1827a3 FIX: calculo de UF nula o 0 2025-04-03 13:37:17 -03:00
fd6577c984 Remove Drone CI 2025-03-26 18:32:09 -03:00
62ccdc9518 Drone CI 2025-03-26 18:24:52 -03:00
e7da0d5d00 Limpieza 2025-03-26 11:37:52 -03:00
e445298159 Json error 2025-03-26 11:37:38 -03:00
5740c0e47f Logs simplificados en dev 2025-03-26 11:37:16 -03:00
61244f783a Merge pull request 'FIX: ServiceActions' (#21) from hotfix/exceptions into develop
Reviewed-on: #21
2025-03-04 16:52:44 +00:00
621da92b68 FIX: ServiceActions 2025-03-04 13:52:01 -03:00
5914176b8f Merge pull request 'FIX: casos en que PDO::execute retorna falso, pero sin tirar PDOException' (#20) from hotfix/cleaunp into develop
Reviewed-on: #20
2025-03-04 14:54:15 +00:00
5054d8f19b FIX: casos en que PDO::execute retorna falso, pero sin tirar PDOException
DateTime con parametro pasado DateTime
Model::jsonComplement
2025-03-04 11:53:14 -03:00
e4e952e842 Merge pull request 'Cleanup' (#19) from hotfix/cleanup into develop
Reviewed-on: #19

Probado localmente
2025-03-03 18:28:52 +00:00
8f16f33a1e Cleanup 2025-03-03 14:57:22 -03:00
d165440483 Merge pull request 'hotfix/actualizacion-factura-al-cambio-de-unidad' (#18) from hotfix/actualizacion-factura-al-cambio-de-unidad into develop
Reviewed-on: #18
2025-03-01 15:40:41 +00:00
1720f6854b FIX: recargar facturas despues de cambiar precios 2025-03-01 11:29:17 -03:00
3e6452a44d Icono factura 2025-03-01 11:28:52 -03:00
d02732b0dd NotAllowed exception catch 2025-02-24 21:36:03 -03:00
ecec1dd8df Merge pull request 'Poder editar la direccion de un proyecto' (#17) from feature/editar-direccion-proyecto into develop
Reviewed-on: #17
2025-02-24 21:16:00 +00:00
c1528d667a Poder editar la direccion de un proyecto 2025-02-24 18:15:16 -03:00
894d09ea6f Merge pull request 'FIX: Escritura no grababa valor' (#16) from hotfix/editar-propietario-no-guarda into develop
Reviewed-on: #16
2025-02-24 19:54:21 +00:00
ab3c8da4f6 FIX: Escritura no grababa valor 2025-02-24 16:53:12 -03:00
760e1782d0 Merge pull request 'FIX: Indice de Repo/Propietario:rut' (#15) from hotfix/editar-propietario-no-guarda into develop
Reviewed-on: #15
2025-02-24 19:12:29 +00:00
b8af053c43 FIX: Indice de Repo/Propietario:rut 2025-02-24 16:11:51 -03:00
fd6d61ec21 Merge pull request 'FIX: Calculos corregidos en factura' (#14) from hotfix/factura-mostrando-valor-terreno-incorrecto into develop
Reviewed-on: #14
2025-02-24 19:01:46 +00:00
0c0fbab585 FIX: Proporcion recuperada 2025-02-24 16:00:42 -03:00
2c3f2d3f92 Merge branch 'hotfix/factura-mostrando-valor-terreno-incorrecto' of git.provm.cl:Incoviba/oficial into hotfix/factura-mostrando-valor-terreno-incorrecto 2025-02-24 15:59:13 -03:00
15e0ff80f3 FIX: Calculos corregidos en factura 2025-02-24 15:56:55 -03:00
8116e012e7 FIX: Calculos corregidos en factura 2025-02-24 15:47:58 -03:00
38e1b00971 Merge pull request 'FIX: Fechas revisadas.' (#13) from fix/escriturar-fallando-cuando-existe-abono-o-reajuste-anterior into develop
Reviewed-on: #13
2025-02-24 17:04:40 +00:00
7b63cbc757 FIX: Fechas revisadas. 2025-02-24 14:02:12 -03:00
8b386b8b44 Merge pull request 'FIX: Banco vacio o con espacio' (#12) from fix/pago-sin-banco into develop
Reviewed-on: #12
2025-02-04 16:09:36 +00:00
9f56604917 FIX: Banco vacio o con espacio 2025-02-04 12:09:34 -03:00
4073b96796 Merge pull request 'feature/grabar-factura' (#11) from feature/grabar-factura into develop
Reviewed-on: #11
2025-02-04 13:37:32 +00:00
59a28a353b Guardar factura 2025-02-03 22:17:57 -03:00
71615050f3 Agregando o buscando el cliente primero 2025-01-17 16:56:47 -03:00
5f31b6857e Limpieza 2025-01-17 16:56:27 -03:00
ef46558040 Fix de index 2025-01-17 16:56:13 -03:00
079fd3bc74 Mapeo de JSONs 2025-01-17 16:56:03 -03:00
a5572e7c6a Ruta para editar 2025-01-17 16:55:46 -03:00
e031fd22d3 Separacion de objetos 2025-01-17 16:55:34 -03:00
d74beb5518 Separacion de objetos 2025-01-17 00:07:45 -03:00
055bf6ab20 Cambios en formato 2025-01-17 00:06:27 -03:00
45e9487b5c Dropdown de Comunas 2025-01-17 00:04:55 -03:00
bf054c22c2 Usar success 2025-01-17 00:04:34 -03:00
16100f622e Se agrega $statusCode 2025-01-17 00:04:11 -03:00
5f31bff6e5 Nueva estructura 2025-01-16 19:39:46 -03:00
7578775fed Migraciones 2025-01-16 19:39:45 -03:00
2579b0aa06 Merge pull request 'FIX: Fecha terreno' (#10) from fix/factura into develop
Reviewed-on: #10
2025-01-16 22:39:13 +00:00
3262ef9a62 FIX: Fecha terreno 2025-01-16 19:30:11 -03:00
44ea8acd39 Merge pull request 'FIX: En movimientos ahora se muestran las categorias y otros detalles faltantes.' (#9) from fix/movimientos-categorias into develop
Reviewed-on: #9
2025-01-13 20:59:26 +00:00
0870623236 FIX: En movimientos ahora se muestran las categorias y otros detalles faltantes. 2025-01-13 17:53:30 -03:00
87bd89d223 Merge pull request 'Validaciones' (#8) from feature/validacion-nueva-venta into develop
Reviewed-on: #8
2025-01-10 14:54:03 +00:00
728207d63d Validaciones 2025-01-10 11:39:36 -03:00
604c49c99d FIX: If pendiente 2025-01-10 11:10:30 -03:00
ce9078328a FIX: Validacion de RUT 2025-01-08 14:53:49 -03:00
713fcc6ab8 FIX: Rut retornado al agregar nuevo propietario 2025-01-08 14:53:22 -03:00
dfbfbd2908 FIX: Depreciado 2025-01-07 22:13:41 -03:00
8b8aa79b6d FIX: Mapeo de columnas faltante 2025-01-07 22:10:52 -03:00
e2d670a38c FIX: Index Respository 2025-01-07 21:44:23 -03:00
4d85b39cab FIX: Detalle movimiento->id 2025-01-07 21:43:00 -03:00
33c90f06dd FIX: Index Respository 2025-01-07 21:42:40 -03:00
3771af0282 FIX: Index Respository 2025-01-07 21:29:48 -03:00
574918f1cc Merge branch 'develop' of git.provm.cl:Incoviba/oficial into develop 2025-01-07 20:46:51 -03:00
e128152b5f FIX: Missing properties. 2025-01-07 20:46:28 -03:00
fc1371f0ed Merge pull request 'Se agrega el boton de terraza' (#7) from feature/agregar-terraza-con-venta into develop
Reviewed-on: #7
2024-12-30 23:48:54 +00:00
ec36c4a7a3 Merge branch 'develop' into feature/agregar-terraza-con-venta 2024-12-30 23:47:32 +00:00
2c1be63257 Se agrega el boton de terraza 2024-12-30 20:45:39 -03:00
6aca90c02f Merge pull request 'FIX: valor cuota al agregar usa . en formato para miles. Ahora limpia los . antes de agregar cuotas.' (#6) from hotfix/agregar-cuota-divido-1000 into develop
Reviewed-on: #6
2024-12-30 20:44:37 +00:00
a8bab175a2 FIX: valor cuota al agregar usa . en formato para miles. Ahora limpia los . antes de agregar cuotas. 2024-12-30 17:41:59 -03:00
95f9f4ef05 Merge pull request 'feature/migrations' (#5) from feature/migrations into develop
Reviewed-on: #5
2024-12-18 23:44:25 +00:00
2d868cb119 Remove seeds 2024-12-18 20:43:24 -03:00
d3df35daff Seeds corregidas 2024-12-18 20:33:16 -03:00
fdb9dcf9be Seeds corregidas 2024-12-18 20:33:16 -03:00
2ab3c25e96 Fix: nulls 2024-12-18 20:33:16 -03:00
46cdf74c52 Mejoras 2024-12-18 20:33:16 -03:00
d6b735f2aa Migrations and seeds 2024-12-18 20:33:15 -03:00
70710b24c5 Migration generator per table. 2024-12-18 20:33:15 -03:00
57fc6fa46e Migraciones 2024-12-18 20:33:15 -03:00
dafabdbbdb Merge pull request 'feature/colores-importar-movimientos' (#4) from feature/colores-importar-movimientos into develop
Reviewed-on: #4
2024-12-17 03:08:11 +00:00
34cb8bf0be Mostrar colores y posibilidad de eliminar movimientos obsoletos 2024-12-17 00:06:00 -03:00
0e049adc98 Id y fecha en texto para movimientos 2024-12-17 00:05:18 -03:00
e2284314bd Identificar movimientos nuevos y obsoletos 2024-12-16 23:05:38 -03:00
c4b9ca5ab7 FIX: Multiples condiciones en Select 2024-12-16 23:05:15 -03:00
e1b6fc7394 Merge pull request 'feature/Proveedores' (#3) from feature/Proveedores into develop
Reviewed-on: #3
2024-12-03 23:36:57 +00:00
fe74619482 Proveedores en movimientos 2024-12-03 20:32:29 -03:00
0766cf7e94 FIX: apellidos no existentes 2024-12-03 19:08:43 -03:00
fc575c3078 Menu incluye proveedores 2024-12-03 17:39:30 -03:00
187b6f6f05 Edit Proveedores 2024-12-03 17:35:29 -03:00
42e1dcdff7 Agregar Proveedor 2024-12-03 16:45:42 -03:00
5b44260245 Separacion logs 2024-12-03 16:45:04 -03:00
b2c55c08ce Servicio y vista 2024-12-03 11:55:06 -03:00
1f0f25bbde Migraciones 2024-12-03 11:55:06 -03:00
9f302e712c FIX: Desisitimiento no encontrado 2024-12-03 11:46:18 -03:00
2b1190202a FIX: Desisitimiento no encontrado 2024-12-03 11:39:25 -03:00
acb1081190 Logs diferentes para desarrollo 2024-12-03 11:39:11 -03:00
606b99a0f9 FIX: Key de prorrateo 2024-11-29 18:22:08 -03:00
44f32d9e5f FIX: Edit Pago sin "valor" 2024-11-29 18:09:55 -03:00
f5add0b4c5 FIX: No existe valor de terreno en BD 2024-11-29 16:15:15 -03:00
1d20d63294 Merge pull request 'feature/cuotas-abono-escritura' (#2) from feature/cuotas-abono-escritura into develop
Reviewed-on: #2
2024-11-29 17:24:16 +00:00
39da754d8b FIX: Cuotas se agregan sin UF, desface en la tabla 2024-11-29 14:22:05 -03:00
02fc372610 Merge branch 'develop' into feature/cuotas-abono-escritura 2024-11-29 14:13:42 -03:00
8aa1c787f4 Merge pull request 'feature/cuotas-abono-escritura' (#1) from feature/cuotas-abono-escritura into develop
Reviewed-on: #1
2024-11-28 22:24:48 +00:00
8028b673fb FIX: Editar cuotas 2024-11-28 19:14:14 -03:00
52de72b507 Sumar cuotas. 2024-11-28 17:38:21 -03:00
f4b8634cb4 Agregar y editar abono cuotas. 2024-11-28 17:12:35 -03:00
4f0a56c711 FIX: migracion 2024-11-28 15:12:30 -03:00
3ff5f3f1a6 Vistas 2024-11-28 14:07:07 -03:00
151d1d0209 Rutoa 2024-11-28 14:06:58 -03:00
b13f8a5b20 Numero de cuota 2024-11-28 14:06:44 -03:00
1d268f9a94 Controlador 2024-11-28 14:06:12 -03:00
a844589d7f Creacion de tabla 2024-11-28 14:06:00 -03:00
83ea955d89 Cuota abono en venta 2024-11-28 12:02:49 -03:00
4392f61db9 Cuota abono a escritura 2024-11-28 12:02:02 -03:00
a2352d79f9 Testing conectado a adminer 2024-11-28 11:41:19 -03:00
56d3a26cff Datos Persona 2024-11-28 11:41:03 -03:00
cc5c90e2c0 Cleanup tests 2024-11-28 11:40:53 -03:00
f9e079cc42 Migraciones 2024-11-20 21:26:03 -03:00
3f65a5dbd9 Composer mas libre 2024-11-20 20:49:32 -03:00
28036fdd05 FIX: Si no conecta con Nubox solo se reajusta el terreno. 2024-11-20 20:49:05 -03:00
54f3b95b88 FIX: Fecha comparación para terreno a fin de diciembre 2024-11-20 17:11:03 -03:00
1e2bd617fa FIX: Fecha comparación para terreno 2024-11-20 12:19:04 -03:00
62e7001fba FIX: Problemas de curl 2024-11-20 11:51:06 -03:00
bc8aa02236 FIX: Problemas de curl 2024-11-20 11:29:02 -03:00
5b30c0e36c FIX: Revert 2024-11-20 10:59:21 -03:00
da1fb26647 FIX: SSL Nubox mas antiguo 2024-11-20 10:52:55 -03:00
b1609465a9 FIX: Search venta 2024-11-19 15:54:14 -03:00
cb2edb1543 Agregar Bono Pie 2024-11-18 23:25:20 -03:00
1e1994264e Search con resumen de tipologias 2024-11-18 22:25:42 -03:00
f2cc0a8c47 Actualizacion de PHP 2024-11-12 21:52:43 -03:00
e474123699 Merge remote-tracking branch 'origin/develop' into develop 2024-11-12 21:52:25 -03:00
c3a99d5939 Migraciones y testeo 2024-11-12 21:52:10 -03:00
0212b3e405 Migraciones y testeo 2024-11-12 21:51:56 -03:00
e4ffcb52d8 FIX: eventos no se actualizaban con cambio de pagina en DataTables 2024-11-12 21:27:33 -03:00
37c28c3080 Editar estado cuota 2024-11-06 21:28:36 -03:00
d154212732 FIX: Editar pago 2024-11-06 19:55:49 -03:00
be410daa8b Datos para manejar mejor los requests externos. 2024-11-01 17:04:24 -03:00
38202d1382 FIX: UF despues de obtener estado. 2024-10-31 17:15:51 -03:00
1b99358597 Eliminar log innecesario 2024-10-31 17:15:38 -03:00
6107861381 Login log independiente 2024-10-31 17:15:23 -03:00
3d5799ae58 HTTPS 2024-10-31 16:31:42 -03:00
d649e03684 Logout en valod uris 2024-10-28 13:10:49 -03:00
fc3d25dd18 FIX: Cuotas hoy y pendientes. 2024-10-25 21:48:19 -03:00
532e0ec601 FIX: Reorden CORS 2024-10-25 18:56:14 -03:00
3e9f9a3fef FIX: CORS other requests 2024-10-25 18:40:59 -03:00
d1b255aa8b FIX: CORS headers 2024-10-25 18:38:23 -03:00
93a0832800 CORS authorization 2024-10-25 18:37:05 -03:00
4894809105 No usar schema para revision de url 2024-10-25 18:33:50 -03:00
389e60980e Editar cuota 2024-10-23 08:39:11 -03:00
fe6a01b2fb Redis options 2024-10-18 21:21:35 -03:00
2b6a8b35a5 Redis parameters 2024-10-18 21:15:13 -03:00
30a4d66be5 Redis username 2024-10-18 21:01:41 -03:00
089579f39f Redis password 2024-10-18 20:57:48 -03:00
63ea21f105 Comparar glosa en 75% 2024-10-10 18:48:44 -03:00
33409a18e3 Comparar glosa en mismo tamaño 2024-10-08 18:57:19 -03:00
2592794a49 Alertas 2024-10-03 21:11:06 -03:00
196c5b947f Modernizacion de repo Cuota 2024-10-03 20:38:35 -03:00
b9c2972fe9 Cuando existen cuotas asociadas a algun pie distintas al pie asociado 2024-10-01 17:35:23 -03:00
37015f7e95 PHP 8 2024-10-01 17:34:43 -03:00
c3b36dcdf7 Optimizacion 2024-10-01 17:34:27 -03:00
c68b773cbb FIX: Banco vacio 2024-10-01 17:33:29 -03:00
933e652dac FIX: centro_costo undefined 2024-10-01 13:20:23 -03:00
ff1e9ebb53 Optimizaciones 2024-10-01 13:11:46 -03:00
599880ae27 Editar movimientos 2024-10-01 13:11:15 -03:00
a4da8d8624 FIX: mes se ve raro 2024-09-24 21:10:57 -03:00
87dfb0ae6e Listar movimientos y exportar
TODO: editar
2024-09-24 21:02:28 -03:00
afbac7259a FIX: evitar correr funcion con valor vacio en Mapper 2024-09-24 13:26:41 -03:00
e2573f35d1 FIX: Officebanking mensual 2024-09-18 13:43:23 -03:00
b8d4b260b6 Timezone 2024-09-16 22:20:22 -03:00
ff06e70869 OfficeBanking usando isExcel y correccion en procesamiento de valores. 2024-09-16 22:13:38 -03:00
5e7326a4b6 Limpieza 2024-09-16 22:12:30 -03:00
26a227c8ae Itau funcionando para ByV BCI 2024-09-12 18:08:48 -03:00
5defd2b564 Itau funcionando para ByV y Vialcorp 2024-09-12 16:41:57 -03:00
74b15add36 Cartolas Security 2024-09-03 00:10:46 -04:00
d8d2cba308 Excel functions for Cartola Banco Service 2024-09-03 00:07:52 -04:00
5983a4b20f Parse rut and 0 centro_costo 2024-09-03 00:07:06 -04:00
6e4dd8180e FIX: Cartola::import string date 2024-08-27 18:17:59 -04:00
7447579ef0 Try Token 2024-08-27 14:51:54 -04:00
ccd5b296f3 Descriptions 2024-08-27 14:51:06 -04:00
095c33e8aa Command ContainerLoader 2024-08-27 14:50:45 -04:00
4604a9af48 Update Cartolas 2024-08-27 14:50:11 -04:00
55d879274c Try Tokens rout 2024-08-27 14:49:27 -04:00
85b529c22d Try Token 2024-08-27 14:49:15 -04:00
3ba45c48f5 Update Cartolas 2024-08-27 14:48:47 -04:00
552a4c7aca Update Cartolas 2024-08-27 14:48:21 -04:00
2070987403 Fetch by Cuenta 2024-08-27 14:47:21 -04:00
d9dab9c88d Configuracion de API 2024-08-27 14:46:57 -04:00
f9f133d3a9 Se extra getKey y configuraciones the paths 2024-08-27 14:46:03 -04:00
f85af642d2 API Service para manejo de token 2024-08-27 14:45:21 -04:00
f3d9b58ffb Agregar Cartolas al importar, y chequeo de Cartolas faltantes 2024-08-27 14:44:40 -04:00
8f682f7f13 Se agrega chequeo para cartola diaria 2024-08-27 14:43:17 -04:00
26e626074a Add sub Bancos to BCI and Santander 2024-08-26 15:26:10 -04:00
478b407646 Sub Banco for the Cartola Services 2024-08-26 15:25:45 -04:00
7d210601da Clean up 2024-08-26 15:25:13 -04:00
9563876b36 Process errors 2024-08-26 15:25:02 -04:00
d9e27d5af7 Move Cartola::import into the Service and added errors 2024-08-26 15:24:42 -04:00
936830ae64 Separate Banco::process pipe to be able to intervene in the middle 2024-08-26 15:23:22 -04:00
e93149456a FIX: API not added by git 2024-07-26 23:57:04 -04:00
93a15ef1e4 Add UF Update 2024-07-26 23:33:40 -04:00
6950413eec FIX: logger in API Middleware 2024-07-26 23:31:08 -04:00
9162ed240e FIX: testing 2024-07-26 23:20:17 -04:00
84861b5e57 Cli user 2024-07-26 23:15:48 -04:00
43bb7a83c8 FIX: tesoreria no cargaba datos 2024-07-25 12:52:48 -04:00
081187e3d3 Mensaje de error 2024-07-25 12:51:25 -04:00
b2f1bd5ba0 FIX: Importar cartolas correctamente. 2024-07-18 21:25:10 -04:00
a471a1083e Merge branch 'temp' into develop 2024-07-17 22:34:20 -04:00
8e7f43e487 Subir cartolas procesadas 2024-07-17 22:33:33 -04:00
390e79ad6d 2024-06-18 2024-07-16 16:17:24 -04:00
6169089475 FIX: Cambio fecha factura 2024-07-10 15:40:59 -04:00
a7ce78a3fb FIX: IPC asociado a fecha de UF 2024-07-10 15:32:05 -04:00
6f023928e8 FIX: Actualizacion de IPC al cambiar fecha facturas 2024-07-09 19:52:39 -04:00
a4b7183de1 FIX: UF para Pago actualizado 2024-07-09 11:58:49 -04:00
a428aeebe1 Agregar, editar y borrar comentarios 2024-07-04 18:09:25 -04:00
fc543729d2 FIX: Propietario no tomaba en consideracion comuna para direccion 2024-07-04 16:28:01 -04:00
8cec046d66 FIX 2024-07-04 16:23:39 -04:00
1f730fb7f3 FIX: comentario en redirect y cleanup 2024-07-04 16:19:54 -04:00
964d8d4237 Poder editar propietario de ventas, cambiando el propietario en si 2024-07-04 15:42:10 -04:00
0d5c9efd68 FIX: Mostrar unidad principal en busqueda 2024-07-03 17:20:26 -04:00
d68eba5697 Limpieza de input de valor y filtro de datos a nivel Repo 2024-07-03 15:13:13 -04:00
d5b9be0196 FIX: Division por 0 2024-07-03 12:19:44 -04:00
d0d99eaa81 FIX: IPC terreno hasta 2 meses antes de factura 2024-06-27 12:33:02 -04:00
15e9a54c7e FIX: venta sin departamentos 2024-06-11 18:16:34 -04:00
b7e9a17586 Se cambia el total de acuerdo a informacion de Contador 2024-06-11 18:07:12 -04:00
61533b5a4c Cambio en diseño de inicio 2024-06-11 13:21:50 -04:00
5864e7ee94 Mapper default null 2024-06-11 12:07:57 -04:00
3fc7aa88dc FIX: IPC en factura 2024-06-10 21:41:11 -04:00
1caa62500a FIX: unidadService -> propiedadUnidadService 2024-06-10 15:53:05 -04:00
27e88761e0 Mysql log retain 2024-06-07 17:18:20 -04:00
b27a6fab33 Propiedad con unidad_principal 2024-06-07 17:16:58 -04:00
fa978728ce Optimizacion de monedas 2024-05-16 21:23:24 -04:00
256a3d2459 Fechas 2024-05-14 19:43:14 -04:00
f8f5796a66 FIX: columnas al exportar 2024-05-14 13:09:59 -04:00
0e0b783a80 Sigla sociedad 2024-05-13 16:58:33 -04:00
a5125aff74 Movimientos filtrados y editables 2024-05-13 16:54:59 -04:00
71bbe7f2d7 Cuotas compactas 2024-05-10 10:48:19 -04:00
e2c68a14d1 FIX: removed self in asociados 2024-05-09 21:04:51 -04:00
5e51562aec FIX: proporcion pie pagado 2024-05-09 21:00:49 -04:00
7719a5c614 Una fecha para facturas por venta 2024-04-30 20:27:05 -04:00
05b9a3ad8a FIX: valor vacio 2024-04-30 11:35:04 -04:00
665bed8553 Propiedad principal 2024-04-30 11:28:18 -04:00
9c024d1ef7 Matriz facturacion 2024-04-29 18:35:44 -04:00
94d618b2a1 Factura con fecha de UF 2024-04-29 10:45:19 -04:00
4786ee2552 Factura multiple con cambio de fecha 2024-04-28 23:01:55 -04:00
39d8d4943e FIX: No estaban todas las disponibles 2024-04-25 21:00:14 -04:00
e63a3d0077 Disable submit button 2024-04-25 19:56:35 -04:00
d580cc1a11 Favicon 2024-04-25 19:07:21 -04:00
86034a6349 FIX: objeto ->array 2024-04-23 15:35:51 -04:00
97ab5acf3e Agregar usuario a log 2024-04-23 14:35:04 -04:00
435180ebaf Ids de ventas 2024-04-23 14:22:32 -04:00
d2511901ec Facturacion 2024-04-19 23:19:35 -04:00
9388dc17fc Facturacion y Terreno 2024-04-18 20:30:26 -04:00
a33dd341cd Facturacion 2024-04-15 20:13:15 -04:00
8e4b5eaaf8 Listado de Movimientos 2024-04-10 21:18:33 -04:00
91679b164f DAP y saldo anterior 2024-04-05 20:23:58 -03:00
3c7e4b9ef4 Orden sociedades 2024-04-05 17:13:21 -03:00
20045c9a64 Formatos 2024-04-05 16:35:18 -03:00
47d43f504d Informes anteriores y siguientes 2024-04-05 14:48:17 -03:00
0502b8e735 agentes -> proveedores 2024-04-05 14:45:54 -03:00
905e8263bc Login redirect 307 (temporary) 2024-04-03 13:26:12 -03:00
8710c8a111 Agentes 2024-04-02 23:02:52 -03:00
5d9ac2bc51 Tests results in cache 2024-04-02 20:19:59 -03:00
062e0543e4 Ignore app/bin 2024-04-02 19:58:58 -03:00
b97916cfc4 Menu 2024-04-02 19:04:57 -03:00
7af9cafdb6 Moderno 2024-04-02 19:04:26 -03:00
84a2fbd119 Log DB 2024-04-02 13:50:08 -03:00
bc9c71870c No remove nocache 2024-03-26 17:09:43 -03:00
912e8624b2 Nocache after ready 2024-03-26 16:57:07 -03:00
86406bf027 Fecha cuota 2024-03-26 16:41:33 -03:00
7b8d44e8c8 Reordenar 2024-03-26 13:59:18 -03:00
c10f2e5912 Cuotas con detalle de UF y de Pies asociados 2024-03-26 13:21:47 -03:00
bef0a22758 Bin folder 2024-03-26 13:17:08 -03:00
092eb95f06 Cache phpunit 2024-03-26 09:38:35 -03:00
5f56022109 Restructura contabilidad 2024-03-26 09:38:20 -03:00
4b3397dd63 Estado cuenta 2024-03-21 23:10:18 -03:00
529f9e32a1 Inmobiliarias por razon y cuadratura 2024-03-21 22:09:15 -03:00
939adf126f FIX: multiples cartolas 2024-03-21 22:08:30 -03:00
63400af1db Cartola diaria adds all cartolas 2024-03-21 21:57:32 -03:00
019974614c FIX: Saldos cartola diaria 2024-03-21 21:18:40 -03:00
735c341729 FIX: Login, change in separator defined 2024-03-20 23:29:09 -03:00
444ff687fc Base API, and more solid key and check 2024-03-20 23:07:49 -03:00
f3a5fa2cdc Tests 2024-03-20 23:06:38 -03:00
2ed265dcf1 Merge branch 'testing' into develop 2024-03-20 21:11:32 -03:00
dbae630fdd Bold footer 2024-03-20 21:04:43 -03:00
d69976d015 FIX: Remove cache from login when redirecting 2024-03-20 20:55:34 -03:00
2ccbc31ae0 FIX: Auth had all paths starting with slash as valid 2024-03-20 20:48:05 -03:00
e50d80560c FIX: Auth missing from some routes 2024-03-20 20:43:53 -03:00
7cc0333876 Informe tesoreria busca ultima cartola ingresada 2024-03-20 20:22:54 -03:00
eb38236926 FIX: cartola BCI 2024-03-20 17:52:34 -03:00
85ef4dd60e Ignore testing cache 2024-03-20 15:00:54 -03:00
f1e29e3b0b Ignore testing results 2024-03-20 13:50:04 -03:00
6617a92f5f Tests 2024-03-20 13:49:58 -03:00
ca958b8a88 Testing dependencies 2024-03-20 13:45:53 -03:00
dc2e2c7f71 Cartola BCI 2024-03-18 17:54:27 -03:00
936fd2d1e1 Cuota vacia 2024-03-18 18:06:32 +00:00
7c6a397e31 CORS 2024-03-18 14:58:54 -03:00
7385225a2e FIX: Venta cargada sin formaPago 2024-03-15 13:09:58 -03:00
9c335fd350 FIX: Venta 2024-03-13 22:43:37 -03:00
57f9169cc7 Encriptar clave 2024-03-13 21:24:52 -03:00
8caa80459e Accelerar listado ventas 2024-03-13 16:17:14 -03:00
98953cce42 FormaPago Service 2024-03-13 14:38:44 -03:00
c7dd309185 Movimiento + Detalles 2024-03-04 19:55:49 -03:00
48bfe5d8ab Mejora en velocidad de busqueda 2024-02-28 21:44:37 -03:00
d9b5bc6507 Procesar otras cartolas Santander 2024-02-28 17:02:04 -03:00
21d1ef653f FIX: Saldo actual informe tesoreria 2024-02-28 13:53:53 -03:00
e8d43e43ff FIX: fecha saldo consolidado 2024-02-28 13:45:20 -03:00
fc9788a1cd FIX: Mostrar pie con cuotas vigentes 2024-02-28 10:37:51 -03:00
02dcc950f4 FIX: Editar credito, valor mandaba fecha 2024-02-28 10:33:34 -03:00
370b6714bc Excel button in datatables 2024-02-27 16:49:39 -03:00
dc7a9f9e7a Buscar por rut 2024-02-27 16:11:48 -03:00
cfe18c1909 Informe tesoreria en excel 2024-02-23 22:37:09 -03:00
5156858205 Update Fomantic-UI 2024-02-23 10:20:58 -03:00
415ba31270 Cartola Diaria Manual 2024-02-23 10:20:44 -03:00
c784d1bee9 Fix informes 2024-02-21 21:22:04 +00:00
a1ade5c2c7 Merge branch 'develop' of http://git.provm.cl/Incoviba/oficial into develop 2024-02-20 01:54:05 +00:00
879b612493 Cartola Diaria 2024-02-19 22:39:22 -03:00
b4cdd2d5f7 Merge branch 'develop' of http://git.provm.cl/Incoviba/oficial into develop 2024-02-15 21:59:47 +00:00
51cabee824 Editar credito 2024-02-15 18:57:56 -03:00
d2e51e76f8 Merge branch 'develop' of http://git.provm.cl/Incoviba/oficial into develop 2024-02-14 16:54:10 +00:00
1621d6fe30 Implementacion agregar abono a escritura 2024-02-14 13:54:01 -03:00
0e32512adc Merge branch 'develop' of http://git.provm.cl/Incoviba/oficial into develop 2024-02-13 21:18:11 +00:00
338f290539 FIX: logged en debug 2024-02-13 18:13:53 -03:00
2aad7e1152 Merge branch 'develop' of http://git.provm.cl/Incoviba/oficial into develop 2024-02-13 21:00:02 +00:00
e542615128 FIX: Venta nueva no se ingresaba 2024-02-13 17:59:46 -03:00
1c7797b1b1 Merge branch 'develop' of http://git.provm.cl/Incoviba/oficial into develop 2024-02-13 15:13:06 +00:00
ba0d4073d7 FIX: All sociedades 2024-02-13 12:12:54 -03:00
faac3874a8 Merge branch 'develop' of http://git.provm.cl/Incoviba/oficial into develop 2024-02-13 15:11:33 +00:00
ade107ab3c Stackable grid 2024-02-13 12:11:26 -03:00
c192cf1883 Merge branch 'develop' of http://git.provm.cl/Incoviba/oficial into develop 2024-02-13 15:08:31 +00:00
4fb75b11c4 Mejora en look de depositos y vencidos 2024-02-13 12:08:25 -03:00
ccbb71d875 Merge branch 'develop' of http://git.provm.cl/Incoviba/oficial into develop 2024-02-13 14:26:36 +00:00
7f25b4b5e1 FIX: all sociedades & allActive depositos 2024-02-13 11:26:28 -03:00
f0b26a251b Merge branch 'develop' of http://git.provm.cl/Incoviba/oficial into develop 2024-02-13 14:17:08 +00:00
ea068d95d0 FIX: DAPs -> Depositos routes 2024-02-13 11:17:01 -03:00
1ccc9ab3d4 Cambio a proyectos:activos 2024-02-13 14:12:19 +00:00
5cd19bcdce Merge branch 'develop' of http://git.provm.cl/Incoviba/oficial into develop 2024-02-13 14:11:45 +00:00
712c70b34d FIX: DAPs -> Depositos 2024-02-13 11:11:30 -03:00
35ab7e7e8b Depositos vencidos no suman ni restan 2024-02-13 11:10:26 -03:00
4b39f93f30 Update permissions for cli 2024-02-13 04:30:54 +00:00
d3f188684a Increase update of proyectos 2024-02-13 04:30:29 +00:00
82647a171d Merge branch 'feature/DAPs' into develop 2024-02-13 01:16:58 -03:00
e44ab30665 Informe Tesoreria 2024-02-13 01:16:17 -03:00
19333bc338 Merge branch 'feature/dap' into develop 2024-02-12 10:00:42 -03:00
4738dae7c8 DAPs API 2024-02-12 10:00:17 -03:00
a370ffff43 Cleanup 2024-02-12 09:59:47 -03:00
88f9e539f7 Merge branch 'develop' of http://git.provm.cl/Incoviba/oficial into develop 2024-02-12 09:53:52 -03:00
671b26f038 Merge branch 'feature/Movimientos' into develop 2024-02-12 09:53:18 -03:00
e133bd36cf Cartola diaria 2024-02-12 09:52:48 -03:00
251dbbe0f0 FIX: cron ENV vars 2024-02-10 10:37:45 -03:00
e1eb2c4c56 Cleanup 2024-02-08 13:04:05 -03:00
1078f4c188 Simplificacion de Cartola diaria 2024-02-08 00:06:29 -03:00
38962cb9cf API Movimientos y cartola diaria 2024-02-07 23:48:31 -03:00
3cd699d2e2 Merge branch 'develop' of http://git.provm.cl/Incoviba/oficial into develop 2024-02-07 18:37:13 -03:00
d8b8787be9 FIX: Find Pago 2024-02-07 18:35:28 -03:00
ad3285efd9 FIX: find ventas por proyecto y unidad 2024-01-30 12:07:43 -03:00
62edca5335 Simplify set post or query 2024-01-23 20:41:52 -03:00
ac6c5b7d3d FIX: activar busqueda cuando tiene query definido 2024-01-23 20:18:02 -03:00
5b5a0ed1f5 FIX: Link a buscar propietario 2024-01-23 20:07:34 -03:00
9d7857621e FIX: findPago sin numero 2024-01-22 12:10:16 -03:00
029cd095cb Base Log cli 2024-01-19 23:27:06 -03:00
c1792907c0 Basic Controller and Service 2024-01-19 23:12:13 -03:00
fa11f5b240 Cleanup logs, fixed add Venta, fixed search 2024-01-19 23:10:20 -03:00
f55e4dbd5f ventas.base 2024-01-18 17:15:32 -03:00
ca83472012 Informe escritura 2024-01-18 16:41:16 -03:00
01af47fba1 FIX: escriturar 2024-01-18 15:18:07 -03:00
e1462657fc Clave -> Contraseña 2024-01-18 13:20:02 -03:00
72f63c5e6c Cleanup 2024-01-18 13:17:23 -03:00
1f076bc2f1 FIX: IPC y factura 2024-01-18 13:15:26 -03:00
ad003c7dcf Cleanup 2024-01-18 13:05:36 -03:00
aef1ccd4a0 Santander 2024-01-17 18:27:29 -03:00
3684bc2e21 FIX: glosa 2024-01-17 16:21:40 -03:00
d1d3705a7b Cambio base Cartola/Banco e implementacion de Itau 2024-01-17 16:19:38 -03:00
ecdb67a9ab FIX: Security en htm 2024-01-17 14:31:49 -03:00
4c86ce2a8a TipoUnidad por Proyecto 2024-01-17 11:22:10 -03:00
5c6bd91425 Missing updates 2024-01-17 11:15:13 -03:00
18d7e449f7 Missing updates 2024-01-17 11:13:27 -03:00
bfdaf0e7f2 Missing updates 2024-01-17 11:10:56 -03:00
ce0510687a Menu Centros de Costos 2024-01-17 11:05:25 -03:00
3eb4ce4d21 Max log files 2024-01-17 10:49:14 -03:00
674aba801e Cartolas 2024-01-17 10:33:11 -03:00
c4f486d3fa Disable edit of Centros Costos 2024-01-10 20:47:39 -03:00
dc840a7bff Sort Centros Costos 2024-01-10 20:36:18 -03:00
316cc51387 FIX: Tipo Cuenta 2024-01-10 20:32:55 -03:00
68e59770fd Menu contabilidad 2024-01-10 19:34:41 -03:00
a66b549a8c Centros de Costos 2024-01-09 23:35:35 -03:00
74b3bb42ea Add sorting to fetchAll 2024-01-09 23:35:11 -03:00
72a2ffe924 Error code change 2024-01-08 21:25:02 -03:00
6393a1fced Implement movimientos cuotas 2024-01-08 21:24:34 -03:00
d225011ae9 Implement search pago 2024-01-08 17:33:42 -03:00
bc2333bc95 FIX: Pie cuotas valores uf 2024-01-08 13:16:12 -03:00
675b3843ea FIX: Pie cuotas vigentes 2023-12-22 14:15:09 -03:00
0829d338a9 FIX: null date 2023-12-22 14:14:02 -03:00
20b2bdc6c6 FIX: Cuotas vigentes 2023-12-22 13:17:03 -03:00
8492d1df2b Eliminar desistimiento y loading en editar desistimiento 2023-12-22 12:52:04 -03:00
afbadd520b FIX: when new value is null 2023-12-22 12:50:09 -03:00
ac52305002 Editar desistimiento venta 2023-12-21 21:06:38 -03:00
d7d17a3051 Mostrar correctamente venta desistida 2023-12-21 19:15:11 -03:00
80a6bf1535 Desistir venta 2023-12-21 18:45:47 -03:00
93431e41b3 Porcentajes en cuotas 2023-12-20 20:59:43 -03:00
d99f2a6214 pageLength for cuotas 2023-12-20 15:39:13 -03:00
30277e6355 FIX: cuotas en pie 2023-12-20 15:37:47 -03:00
06d5327934 Search listado por defecto muestra 25 y cleanup 2023-12-20 12:04:06 -03:00
6f772a56b8 FIX: Buscar por nombre con wildcards 2023-12-20 12:02:52 -03:00
abe82e4689 FIX: Default valor unitario terreno 2023-12-20 10:50:49 -03:00
379a33a4da Escriturar 2023-12-20 08:44:49 -03:00
1ba53c9e12 FIX: Precio Unidad no existe en venta y facturacion 2023-12-13 13:28:19 -03:00
94906eea8c FIX: Precio Unidad no existe 2023-12-13 13:03:43 -03:00
8b9b02825a FIX: Precio Unidad no existe 2023-12-13 12:44:32 -03:00
8f2f90aca2 FIX: .env 2023-12-12 20:19:15 -03:00
d699f9bf62 Install executeable 2023-12-12 15:56:00 +00:00
e38fdd20ee FIX: install 2023-12-12 12:53:32 -03:00
f362054ea7 Install 2023-12-12 12:47:58 -03:00
f597d552be Edit fecha escritura 2023-12-04 21:43:57 -03:00
43977d1bd9 FIX: IPC no disponible 2023-12-04 19:51:44 -03:00
9aa4e0ae1d FIX: UF/m2 con valor venta 2023-12-04 19:08:26 -03:00
377cf51b44 Editar valor venta 2023-12-04 19:00:21 -03:00
57579a52f1 Editar propiedad en venta 2023-12-01 15:00:25 -03:00
af9c6c51d4 FIX: active -> activo en tipo_estado_pago 2023-12-01 12:39:26 -03:00
0eaa09bea0 FIX: Fetch terreno 2023-11-30 19:06:59 -03:00
04478afa2f Mejoras en Facturacion 2023-11-30 18:40:15 -03:00
f2efb41977 IPC rango y sort 2023-11-30 00:24:08 -03:00
d0a85b2149 IPC acumulado desde cli 2023-11-30 00:06:21 -03:00
68821fb0d3 Changed start location in cli 2023-11-29 23:07:50 -03:00
f957d29779 Full command 2023-11-29 23:02:12 -03:00
dc7a39e193 Output cron execution 2023-11-29 22:31:53 -03:00
17f93dcd34 Edit Pie 2023-11-29 22:21:46 -03:00
9991b7c6a3 FIX: % descuento 2023-11-29 21:23:11 -03:00
91bdef5cc5 FIX: % descuento 2023-11-29 21:21:51 -03:00
244d304e04 FIX: % descuento 2023-11-29 21:18:30 -03:00
2600bd409e FIX: fecha estado venta 2023-11-29 21:17:06 -03:00
0761be6613 Precio = valor propiedad o precio 2023-11-29 21:14:55 -03:00
e347aaabe9 Valor PU -> ultimo precio 2023-11-29 21:13:03 -03:00
fe3055708f FIX: precio->valor 2023-11-29 20:56:00 -03:00
62153dd1ef Editar propiedad en venta 2023-11-29 20:44:13 -03:00
39048e12b3 Facturacion, se agrega PropiedadUnidad 2023-11-29 20:09:08 -03:00
094209823a columna faltante del modelo 2023-11-28 22:12:15 -03:00
bcdca32075 Reajuste 2023-11-28 21:38:24 -03:00
fada4f80a2 FIX: link venta desde pie 2023-11-27 18:07:48 -03:00
a28c51d94c Total pesos en forma pago y detalle cuotas 2023-11-27 17:23:10 -03:00
df679b2a1a Log commands 2023-11-25 21:38:00 -03:00
ec4b16b2af Timezone 2023-11-25 01:14:28 -03:00
3c983fc6c9 FIX: missing slash 2023-11-25 01:05:56 -03:00
7945579e80 CLI 2023-11-25 00:56:18 -03:00
ab1647eed3 lighter install 2023-11-25 00:56:11 -03:00
ec7d8e69ab FIX: Remove login for API 2023-11-25 00:55:31 -03:00
3cadaca746 Focus and Dev Kint 2023-11-24 20:42:05 -03:00
2726bc5074 Cleanup old version 2023-11-24 20:41:41 -03:00
b66ef435c6 FIX: Escritura y saldo 2023-11-24 20:28:08 -03:00
a82db6e1da FIX: trailing slash in ventas url 2023-11-24 10:24:42 -03:00
e1ef31dccd Search update and optimization 2023-11-23 23:35:19 -03:00
bf03e85975 Redis 2023-11-23 00:53:49 -03:00
9ab0515954 Facturacion 2023-11-22 19:08:19 -03:00
b4742a501e Show Proyecto 2023-10-20 19:03:29 -03:00
4734417fe2 Estado Recepcion Final en Proyecto 2023-10-19 22:43:21 -03:00
54ac535a49 Remove benchmark 2023-10-19 22:01:00 -03:00
e536f0f8f3 Redis expiration 1 day 2023-10-19 21:49:57 -03:00
dc217d876a Redis service 2023-10-19 20:46:52 -03:00
742c0327c2 Improving cuotas por vencer 2023-10-19 19:39:27 -03:00
ada0434caf Error log cuotas 2023-10-19 19:10:08 -03:00
850a475ef6 Cuando no tiene resultados en cuotas, entregar vacio 2023-10-19 18:58:48 -03:00
02e1f3e091 Mostrar alertas en inicio 2023-10-19 18:20:37 -03:00
c2a3192b32 Listado proyectos 2023-10-13 10:45:21 -03:00
0d558b7980 Separar datos inicio 2023-10-11 09:03:44 -03:00
e4328d8604 Reorder docker 2023-10-11 09:00:00 -03:00
d8a81db78b Inmobiliarias 2023-09-28 22:28:30 -03:00
3141f1e7c4 Search 2023-09-28 21:05:16 -03:00
2e2d0f07b4 Limpieza de logo 2023-09-15 00:16:02 -03:00
0cd357b6cb 2023-09-12 2023-09-13 18:51:46 -03:00
fa15da1ee2 Ventas 2023-09-07 23:03:21 -03:00
59825259b6 Implemented repository mapper, and venta show 2023-08-08 23:53:49 -04:00
ef30ae67d2 Ventas->Listado->Ventas 2023-07-28 17:17:04 -04:00
38383f5295 Accordion 2023-07-25 20:25:28 -04:00
43cd955061 Venta->Listado->Cierres 2023-07-25 17:03:57 -04:00
1a7b10ce3c Auth, Login, Home, Venta->Listados->Precios 2023-07-24 20:55:26 -04:00
d9d5a15376 Docker 2023-07-24 20:54:30 -04:00
b7fc538e78 Old Version 2023-07-24 20:52:13 -04:00
be33305cf1 config 2023-07-24 20:41:38 -04:00
6ab24c8961 Command return 2023-06-23 11:36:44 -04:00
b212381bb7 Cli 2023-06-22 23:15:17 -04:00
05e37f19ae Money and Remote services 2023-06-22 14:04:40 -04:00
8a51fb9c42 Ignore modules 2023-06-22 13:25:29 -04:00
e6da1d9727 Encapsulation 2023-04-12 22:59:16 -04:00
34c2aa9a46 Cleanup 2023-04-12 22:56:17 -04:00
683e8bc3a8 Restart logview 2023-02-15 18:29:51 -03:00
1508539140 Fix PHP Errors 2023-02-15 18:29:43 -03:00
064ad35553 Logview version 2023-02-15 18:29:11 -03:00
e81a098d31 Fix gump version 2023-02-15 18:28:41 -03:00
01512d0605 Cleanup in dockerfile 2023-02-14 23:00:15 -03:00
5d8fbceb67 Logview 2023-02-14 20:47:41 -03:00
907c756aa2 FIX: cuotas 2023-02-13 17:18:26 -03:00
84d50e0209 Logging 2023-02-10 15:14:34 +00:00
87643a5b99 Fixes for upgrade 2023-02-10 15:14:14 +00:00
de6100a546 Upgrade to php 8 2023-02-10 15:12:30 +00:00
b6c0c90943 Merge branch 'develop' 2023-02-10 06:45:42 +00:00
726bdaec4c logs 2023-02-10 06:39:24 +00:00
009ba01e69 Releas dependencies versions 2023-02-10 06:38:43 +00:00
bb1d2b2159 Update aldarien dependencies 2023-02-10 06:38:16 +00:00
d6f58893b6 FIX 2022-06-09 16:40:10 -04:00
717ba19792 Check uf, replace ',' in valor 2022-06-09 16:39:25 -04:00
9ffc7527c3 Log agregar Venta 2022-06-09 16:19:05 -04:00
eac6b7d197 FIX: null valor in format 2022-04-11 11:01:35 -04:00
6995561e4f FIX: listen to network 2022-03-10 15:31:18 -03:00
24bd5a6fc4 FIX: docker context 2022-03-10 15:16:55 -03:00
1c5467e8fb Python docker 2022-03-10 15:11:26 -03:00
0550ff11a4 Merge branch 'develop' 2022-03-08 12:15:31 -03:00
f29bc8f05f FIX 2022-03-08 11:02:23 -03:00
d1473eaac4 FIX: connection timeout 2022-03-08 11:00:36 -03:00
2f369c4e5e Se agregar Resciliacion y el n° de departamento al inicio de la linea
FIX: acumulado no pagado
2022-03-08 10:58:38 -03:00
27ace68b1d FIX: cuando UF = 0 2022-03-08 10:57:28 -03:00
66a128663d Merge branch 'develop' 2022-03-08 09:02:22 -03:00
b3577a7800 Glosa y estado a los pagos, titulos por cuenta 2022-03-08 08:44:33 -03:00
a5940019bc Merge branch 'develop' 2022-03-07 23:49:52 -03:00
b8babf2906 Clean up 2022-03-07 23:49:26 -03:00
7d3e75c316 FIX: max execution time 2022-03-07 22:59:13 -03:00
33417a6acd FIX: filter 2022-03-07 22:50:17 -03:00
e51d87f83f FIX: filter 2022-03-07 22:45:56 -03:00
16fb8f0a96 Filter duplicates 2022-03-07 22:43:34 -03:00
1547b24412 FIX: getNumberFormat 2022-03-07 22:40:55 -03:00
517276da1d FIX: format in excel 2022-03-07 22:38:29 -03:00
fbce7089a8 FIX: non array rows 2022-03-07 22:34:04 -03:00
e8aa00e121 FIX: columns 2022-03-07 22:31:07 -03:00
26bac169de FIX: format 2022-03-07 22:25:03 -03:00
4971570474 Merge branch 'develop' 2022-03-07 22:21:55 -03:00
3b473bcefa Change to xlsx file 2022-03-07 22:21:42 -03:00
85be709ab0 Merge branch 'develop' 2022-03-07 21:45:05 -03:00
726794923d Formateo 2022-03-07 21:44:17 -03:00
52bead5104 Merge branch 'develop' 2022-03-07 21:31:10 -03:00
a6a1c3d102 FIX: Sibsidios retorna array 2022-03-07 21:30:59 -03:00
66dbf54714 Merge branch 'develop' 2022-03-07 21:23:58 -03:00
301a4c7302 FIX: DateInterval 2022-03-07 21:23:21 -03:00
d2e6a11e0b Merge branch 'develop' 2022-03-07 21:20:58 -03:00
5fefdd94b0 Fixes to format and defaults 2022-03-07 21:20:27 -03:00
9d13a193b6 Merge branch 'develop' 2022-03-07 18:28:27 -03:00
3de1c9b527 FIX: Hide password 2022-03-07 18:27:44 -03:00
34d0659036 Fix: Was missing db configuration on php 2022-03-07 18:26:27 -03:00
b0c587532f Merge branch 'develop' 2022-03-07 18:08:44 -03:00
1754633475 Profiles and cleanup 2022-03-07 18:08:25 -03:00
6a5efba272 Informe de Contabilidad Resumen 2022-03-07 16:36:21 -03:00
0c62ed0582 Update to PHP 8 2022-03-07 14:16:37 -03:00
483a3e943c Merge branch 'develop' of http://git.provm.cl/Incoviba/oficial into develop
# Conflicts:
#	composer.json
2022-03-07 12:10:02 -03:00
68ab19b874 Merge branch 'develop' 2022-03-07 12:07:51 -03:00
bc4dd543ae FIX: handling of dependencies 2022-03-07 12:07:33 -03:00
fb8e204f77 FIX: valor en Escritura 2022-03-07 12:06:12 -03:00
8ed1742de8 Update 2022-03-07 2022-03-07 10:09:15 -03:00
f85f9ff3c9 Ignore IDE files 2022-03-07 10:07:25 -03:00
e75c3dada8 Ignore modules 2022-03-07 10:06:46 -03:00
670d73be38 Env settings 2022-03-07 10:06:02 -03:00
ee37338be4 ENV 2022-03-07 10:06:02 -03:00
b3fc29d19b Env files 2022-03-07 10:06:02 -03:00
a771714357 Database 2022-03-07 10:06:02 -03:00
1fb29cb877 .\config\ 2022-03-07 10:05:59 -03:00
db7344bc74 Mixed 2022-03-07 10:05:03 -03:00
20ae31b7bf Ignore IDE files 2022-03-07 09:59:09 -03:00
8ce0b75bb4 Ignore modules 2022-03-07 09:54:45 -03:00
abe01e5592 Update 2022-03-07 2022-03-07 12:42:34 +00:00
606fdc4d96 Env settings 2021-06-14 17:49:21 -04:00
7206fa1c3c ENV 2021-06-14 17:49:12 -04:00
d5adec2137 Env files 2021-06-14 17:44:21 -04:00
33669f34b5 Database 2021-06-14 17:41:59 -04:00
8da6b4f160 .\config\ 2021-06-14 17:41:40 -04:00
5ef0aaae50 Mixed 2021-06-14 17:35:27 -04:00
67efd83ae3 Merge branch 'master' of http://git.provm.cl/Incoviba/oficial 2021-04-05 20:22:46 +00:00
3b6b5d10ff Merge branch 'develop' into master 2021-04-05 16:22:10 -04:00
18986c6e17 Se agrega editar Bono Pie 2021-04-05 16:15:54 -04:00
b6665c8f9c Local settings 2021-03-26 19:03:57 +00:00
91cc2fed12 Local Database 2021-03-26 19:03:57 +00:00
1515 changed files with 80596 additions and 42742 deletions

6
.env.sample Normal file
View File

@ -0,0 +1,6 @@
COMPOSE_PATH_SEPARATOR=:
COMPOSE_FILE=./docker-compose.yml:./adminer-compose.yml
COMPOSE_PROFILES=app,db,cli,cache
APP_PATH=./app
CLI_PATH=./cli
APP_PORT=8080

22
.gitignore vendored
View File

@ -1,8 +1,14 @@
.env
/vendor/
composer.lock
/node_modules/
package-lock.json
Pipfile.lock
/logs/
/cache/
**/*.env
**/vendor/
**/composer.lock
**/node_modules/
**/package-lock.json
**/Pipfile.lock
**/logs/
**/cache/
**/modules/
**/.idea/
**/upload?/
**/informe?/
**/.phpunit.cache/
**/coverage/

1
.key.env.sample Normal file
View File

@ -0,0 +1 @@
API_KEY=

22
CLI.Dockerfile Normal file
View File

@ -0,0 +1,22 @@
FROM php:8.4-cli
ENV TZ "${TZ}"
ENV APP_NAME "${APP_NAME}"
RUN apt-get update && apt-get install -y --no-install-recommends cron rsyslog nano beanstalkd \
&& rm -r /var/lib/apt/lists/*
RUN pecl install xdebug-3.4.2 \
&& docker-php-ext-enable xdebug \
&& echo $TZ > /etc/timezone
COPY --chmod=550 ./cli/start_command /root/start_command
COPY ./php-errors.ini /usr/local/etc/php/conf.d/docker-php-errors.ini
COPY ./php-timezone.ini /usr/local/etc/php/conf.d/docker-php-timezone.ini
WORKDIR /code/bin
COPY --chmod=644 ./cli/crontab /var/spool/cron/crontabs/root
CMD [ "/root/start_command" ]

View File

@ -1,6 +1,20 @@
FROM php:7.4-fpm
FROM php:8.4-fpm
RUN docker-php-ext-install pdo pdo_mysql
ENV TZ=America/Santiago
RUN pecl install xdebug-3.0.3 \
&& docker-php-ext-enable xdebug
RUN apt-get update && apt-get install -y --no-install-recommends libzip-dev libicu-dev git \
libpng-dev unzip tzdata libxml2-dev beanstalkd \
&& rm -r /var/lib/apt/lists/* \
&& docker-php-ext-install pdo pdo_mysql zip intl gd bcmath dom \
&& pecl install xdebug-3.4.2 \
&& docker-php-ext-enable xdebug \
&& echo $TZ > /etc/timezone
COPY ./php-errors.ini /usr/local/etc/php/conf.d/docker-php-errors.ini
COPY ./php-xdebug.ini /usr/local/etc/php/conf.d/docker-php-xdebug.ini
COPY ./php-memory.ini /usr/local/etc/php/conf.d/docker-php-memory.ini
COPY ./php-timezone.ini /usr/local/etc/php/conf.d/docker-php-timezone.ini
COPY --from=composer /usr/bin/composer /usr/bin/composer
WORKDIR /code

24
Log.Dockerfile Normal file
View File

@ -0,0 +1,24 @@
FROM php:8-apache
ENV COMPOSER_ALLOW_SUPERUSER=1
ENV LOGVIEW_INSTALLATION_PATH=/app
ENV APACHE_DOCUMENT_ROOT="${LOGVIEW_INSTALLATION_PATH}/app"
ENV APACHE_PUBLIC_ROOT="${APACHE_DOCUMENT_ROOT}/public"
COPY --from=composer /usr/bin/composer /usr/bin/composer
WORKDIR "${LOGVIEW_INSTALLATION_PATH}"
RUN apt-get update \
&& apt-get install -yq --no-install-recommends git zip unzip libzip-dev \
&& rm -r /var/lib/apt/lists/* \
&& git clone http://git.provm.cl/ProVM/logview.git "${LOGVIEW_INSTALLATION_PATH}" \
&& docker-php-ext-install zip \
&& cp "${LOGVIEW_INSTALLATION_PATH}/php-errors.ini" /usr/local/etc/php/conf.d/docker-php-errors.ini \
&& composer -d "${LOGVIEW_INSTALLATION_PATH}/app" install \
&& mkdir "${LOGVIEW_INSTALLATION_PATH}/app/cache" \
&& chmod -R 777 "${LOGVIEW_INSTALLATION_PATH}/app/cache" \
&& sed -ri -e "s!/var/www/html!${APACHE_PUBLIC_ROOT}!g" /etc/apache2/sites-available/*.conf \
&& sed -ri -e "s!/var/www/!${APACHE_DOCUMENT_ROOT}!g" /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf \
&& a2enmod rewrite \
&& a2enmod actions \
&& service apache2 restart

12
Pipfile
View File

@ -1,12 +0,0 @@
[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true
[dev-packages]
[packages]
gunicorn = "*"
[requires]
python_version = "3.8"

9
Python.Dockerfile Normal file
View File

@ -0,0 +1,9 @@
FROM python:3.8
COPY ./bin /usr/opt/incoviba
WORKDIR /usr/opt/incoviba/informes
RUN pip install gunicorn pandas xlsxwriter httpx flask numpy
CMD ["gunicorn", "-w", "4", "--bind", "0.0.0.0", "app:app"]

15
adminer-compose.yml Normal file
View File

@ -0,0 +1,15 @@
services:
adminer:
profiles:
- db
container_name: incoviba_adminer
image: adminer
restart: unless-stopped
env_file: ${APP_PATH:-.}/.adminer.env
networks:
- adminer_network
ports:
- "8083:8080"
networks:
adminer_network: {}

View File

@ -1,11 +0,0 @@
composer.phar
/vendor/
# Commit your application's lock file http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file
# You may choose to ignore a library lock file http://getcomposer.org/doc/02-libraries.md#lock-file
# composer.lock
#Eclipse IDE
.settings
.buildpath
.project

View File

@ -1,21 +0,0 @@
MIT License
Copyright (c) 2017 Aldarien
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@ -1,2 +0,0 @@
# asset
Asset manager module for my apps

View File

@ -1,21 +0,0 @@
<?php
namespace App\Contract;
use App\Definition\Contract;
use App\Service\Asset as AssetService;
class Asset
{
use Contract;
protected static function newInstance()
{
return new AssetService();
}
public static function get($identifier)
{
$instance = self::getInstance();
return $instance->get($identifier);
}
}
?>

View File

@ -1,5 +0,0 @@
<?php
function asset($identifier) {
return \App\Contract\Asset::get($identifier);
}
?>

View File

@ -1,88 +0,0 @@
<?php
namespace App\Service;
class Asset
{
protected $assets;
protected $dir;
public function __construct()
{
$this->dir = config('locations.public');
}
public function get($identifier)
{
$asset = $this->find($identifier);
return $asset->url;
}
protected function find($identifier)
{
$type = $this->getType($identifier);
$asset = null;
if ($type == false) {
foreach (array_keys($this->assets) as $type) {
if (($asset = $this->getAsset($identifier, $type))) {
break;
}
}
} else {
$asset = $this->getAsset($identifier, $type);
}
return $asset;
}
protected function getType($identifier)
{
if (strpos($identifier, '.') !== false) {
list($name, $ext) = explode('.', $identifier);
return $ext;
}
return false;
}
protected function getAsset($identifier, $type)
{
if (!isset($this->assets[$type])) {
$this->loadAssets($type);
}
if (!isset($this->assets[$type])) {
return null;
}
foreach ($this->assets[$type] as $asset) {
if ($this->compareIdentifier($asset, $identifier)) {
return $asset;
}
}
return null;
}
protected function loadAssets($type)
{
$dir = $this->dir . '/' . $type . '/*.' . $type;
$files = glob($dir);
foreach ($files as $file) {
$url = $this->url($file);
$identifier = pathinfo($file)['filename'];
$this->assets[$type] []= (object) ['identifier' => $identifier, 'url' => $url, 'type' => $type];
}
}
protected function url($file)
{
$url = '/' . config('app.project') . '/' . str_replace('\\', '/', str_replace(realpath(config('locations.public')), '', dirname(realpath($file)))) . '/' . basename(realpath($file));
$url = preg_replace('/\/+/', '/', $url);
return $url;
}
protected function compareIdentifier($asset, $identifier)
{
if (strpos($identifier, '.') !== false) {
list($name, $ext) = explode('.', $identifier);
if ($asset->identifier == $name and $asset->type == $ext) {
return true;
}
} else {
if ($asset->identifier == $identifier) {
return true;
}
}
return false;
}
}

View File

@ -1,26 +0,0 @@
{
"name" : "aldarien/asset",
"description" : "Asset manager module for my apps",
"type" : "library",
"require" : {
"aldarien/config" : "dev-master",
"aldarien/contract" : "dev-master"
},
"require-dev" : {
"phpunit/phpunit" : "^6.3"
},
"license" : "MIT",
"authors" : [{
"name" : "Aldarien",
"email" : "aldarien85@gmail.com"
}
],
"autoload" : {
"psr-4" : {
"App\\" : "app"
},
"files": [
"app/Helper/functions.php"
]
}
}

View File

@ -1,17 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit
colors="true"
verbose="true"
bootstrap="./vendor/autoload.php"
>
<testsuites>
<testsuite name="Application Test Suite">
<directory>./tests/</directory>
</testsuite>
</testsuites>
<filter>
<whitelist>
<directory>./app</directory>
</whitelist>
</filter>
</phpunit>

View File

@ -1,25 +0,0 @@
<?php
use PHPUnit\Framework\TestCase;
class AssetTest extends TestCase
{
public function setUp()
{
mkdir(root() . '/public');
mkdir(root() . '/public/css');
config('locations.public', root() . '/public');
file_put_contents(root() . '/public/css/style.css', 'body {color: black;}');
}
public function tearDown()
{
unlink(root() . '/public/css/style.css');
rmdir(root() . '/public/css');
rmdir(root() . '/public');
}
public function testAsset()
{
$this->assertEquals(asset('style.css'), '/css/style.css');
}
}
?>

View File

@ -1,13 +0,0 @@
composer.phar
/vendor/
# Commit your application's lock file http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file
# You may choose to ignore a library lock file http://getcomposer.org/doc/02-libraries.md#lock-file
# composer.lock
config
# Eclipse IDE
.settings
.buildpath
.project

View File

@ -1,3 +0,0 @@
language: php
php: '7.1'
install: composer update

View File

@ -1,21 +0,0 @@
MIT License
Copyright (c) 2017 Aldarien
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@ -1,4 +0,0 @@
# config
Config module that recovers configuration files
[![Build Status](https://travis-ci.org/Aldarien/config.svg?branch=1.0.1)](https://travis-ci.org/Aldarien/config)

View File

@ -1,31 +0,0 @@
<?php
namespace App\Contract;
use App\Definition\Contract;
use App\Service\Config AS ConfigService;
class Config
{
use Contract;
protected static function newInstance()
{
return new ConfigService();
}
public static function get($name = null)
{
$instance = self::getInstance();
return $instance->get($name);
}
public static function set($name, $value)
{
$instance = self::getInstance();
return $instance->set($name, $value);
}
public static function addFile($filename)
{
$instance = self::getInstance();
return $instance->loadFile($filename);
}
}
?>

View File

@ -1,21 +0,0 @@
<?php
namespace App\Contract;
use Symfony\Component\Yaml\Yaml;
class YamlWrapper
{
public static function load($filename, $flags = 0)
{
return self::parse(file_get_contents($filename), $flags);
}
public static function parse($input, $flags = 0)
{
return Yaml::parse($input, $flags);
}
public static function dump($array, $inline = 2, $indent = 4, $flags = 0)
{
return Yaml::dump($array, $inline, $indent, $flags);
}
}
?>

View File

@ -1,9 +0,0 @@
<?php
function config($name = null, $value = null) {
if ($value == null) {
return App\Contract\Config::get($name);
} else {
return App\Contract\Config::set($name, $value);
}
}
?>

View File

@ -1,146 +0,0 @@
<?php
namespace App\Service;
use App\Contract\YamlWrapper;
class Config
{
protected $dir;
protected $data;
public function __construct($dir = null)
{
if ($dir == null) {
$dir = realpath(root() . '/config');
}
$this->dir = $dir;
$this->load();
}
protected function load()
{
$files = glob($this->dir . '/*.{php,json,yml}', GLOB_BRACE);
foreach ($files as $file) {
$info = pathinfo($file);
$name = $info['filename'];
$d = $this->getData($file);
$data[$name] = $d;
$data = array_merge($data, $this->translateArray($d, $name));
foreach ($data as $key => $value) {
$this->add($key, $value);
}
}
}
public function loadFile(string $filename)
{
if (!file_exists(realpath($filename))) {
return false;
}
$info = pathinfo($filename);
$name = $info['filename'];
$d = $this->getData($filename);
$data[$name] = $d;
$data = array_merge($data, $this->translateArray($d, $name));
foreach ($data as $key => $value) {
$this->add($key, $value);
}
return true;
}
protected function getData($filename)
{
$info = pathinfo($filename);
switch ($info['extension']) {
case 'php':
return include_once $filename;
case 'json':
return json_decode(file_get_contents($filename), true);
case 'yml':
return YamlWrapper::load($filename);
default:
throw new \DomainException('Invalid file extension for ' . $filename);
}
}
protected function translateArray($array, $level)
{
$output = [];
foreach ($array as $k1 => $l1) {
$key = $level . '.' . $k1;
if (is_array($l1)) {
$output[$key] = $l1;
$output = array_merge($output, $this->translateArray($l1, $key));
} else {
$output[$key] = $l1;
}
}
return $output;
}
protected function add($field, $value)
{
if (isset($this->data[$field])) {
if ($this->data[$field] == $value) {
return;
}
if (is_array($this->data[$field])) {
$this->data[$field] = $this->merge($this->data[$field], $this->replace($value));
} else {
$this->data[$field] = $this->replace($value);
}
} else {
$this->data[$field] = $this->replace($value);
}
}
protected function merge($arr1, $arr2)
{
$output = $arr1;
foreach ($arr2 as $k => $value) {
if (isset($arr1[$k])) {
if ($arr1[$k] == $value) {
continue;
}
if (is_array($arr1[$k])) {
$output[$k] = $this->merge($arr1[$k], $value);
} else {
$output[$k] = array_merge([$arr1[$k]], $value);
}
} else {
$output[$k] = $value;
}
}
return $output;
}
protected function replace($value)
{
if (is_array($value)) {
foreach ($value as $k => $v) {
$value[$k] = $this->replace($v);
}
return $value;
}
if (strpos($value, '{') !== false) {
while(strpos($value, '{') !== false) {
$ini = strpos($value, '{') + 1;
$end = strpos($value, '}', $ini);
$rep = substr($value, $ini, $end - $ini);
$value = str_replace('{' . $rep . '}', $this->get($rep), $value);
}
}
return $value;
}
public function get($name = null)
{
if ($name == null) {
return $this->data;
}
if (isset($this->data[$name])) {
return $this->data[$name];
}
return null;
}
public function set($name, $value)
{
$this->add($name, $value);
}
}
?>

View File

@ -1,3 +0,0 @@
<?php
include_once dirname(__DIR__) . '/vendor/autoload.php';
?>

View File

@ -1,28 +0,0 @@
{
"name": "aldarien/config",
"description": "Config module for my apps",
"type": "library",
"license": "MIT",
"authors": [
{
"name": "Aldarien",
"email": "aldarien85@gmail.com"
}
],
"require": {
"aldarien/contract": "dev-master",
"aldarien/root": "dev-master",
"symfony/yaml": "^3.3"
},
"autoload": {
"psr-4": {
"App\\": "app"
},
"files": [
"app/Helper/functions.php"
]
},
"require-dev": {
"phpunit/phpunit": "^6.3"
}
}

View File

@ -1,17 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit
colors="true"
verbose="true"
bootstrap="./bootstrap/autoload.php"
>
<testsuites>
<testsuite name="Application Test Suite">
<directory>./tests/</directory>
</testsuite>
</testsuites>
<filter>
<whitelist>
<directory>./app</directory>
</whitelist>
</filter>
</phpunit>

View File

@ -1,90 +0,0 @@
<?php
use PHPUnit\Framework\TestCase;
use App\Contract\YamlWrapper;
class ConfigTest extends TestCase
{
public function setUp()
{
mkdir(dirname(__DIR__) . '/config');
$str = "<?php return ['name' => 'Config', 'test_array' => ['data1' => 1, 'data2' => 2]]; ?>";
file_put_contents(dirname(__DIR__) . '/config/app.php', $str);
$data = ['name' => 'Config', 'test_array' => ['data1' => 1, 'data2' => 2]];
file_put_contents(dirname(__DIR__) . '/config/json.json', json_encode($data));
file_put_contents(dirname(__DIR__) . '/config/yaml.yml', YamlWrapper::dump($data));
$data = ['last_name' => 'Config'];
file_put_contents(dirname(__DIR__) . '/config/yaml.json', json_encode($data));
}
public function testGetNamePhp()
{
$name = 'Config';
$this->assertEquals($name, config('app.name'));
}
public function testGetNameJson()
{
$name = 'Config';
$this->assertEquals($name, config('json.name'));
}
public function testGetNameYaml()
{
$name = 'Config';
$this->assertEquals($name, config('yaml.name'));
}
public function testSetNamehp()
{
$new_name = 'Config_Test';
config('app.name', $new_name);
$this->assertEquals($new_name, config('app.name'));
}
public function testSetNameJson()
{
$new_name = 'Config_Test';
config('json.name', $new_name);
$this->assertEquals($new_name, config('json.name'));
}
public function testSetNameYaml()
{
$new_name = 'Config_Test';
config('yaml.name', $new_name);
$this->assertEquals($new_name, config('yaml.name'));
}
public function testArrayGetPhp()
{
$this->assertArrayHasKey('data1', config('app.test_array'));
}
public function testArrayGetJson()
{
$this->assertArrayHasKey('data1', config('json.test_array'));
}
public function testArrayGetYaml()
{
$this->assertArrayHasKey('data1', config('yaml.test_array'));
}
public function testSameSectionName()
{
$this->assertEquals('Config', config('yaml.last_name'));
}
public function testDuplicateValue()
{
config('json.name', 'Config2');
$this->assertEquals('Config2', config('json.name'));
}
public function testAddFile()
{
$filename = dirname(__DIR__) . '/composer.json';
App\Contract\Config::addFile($filename);
$this->assertEquals('aldarien/config', config('composer.name'));
}
public function tearDown()
{
unlink(dirname(__DIR__) . '/config/app.php');
unlink(dirname(__DIR__) . '/config/json.json');
unlink(dirname(__DIR__) . '/config/yaml.yml');
unlink(dirname(__DIR__) . '/config/yaml.json');
rmdir(dirname(__DIR__) . '/config');
}
}
?>

View File

@ -1,6 +0,0 @@
composer.phar
/vendor/
# Commit your application's lock file http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file
# You may choose to ignore a library lock file http://getcomposer.org/doc/02-libraries.md#lock-file
# composer.lock

View File

@ -1,21 +0,0 @@
MIT License
Copyright (c) 2017 Aldarien
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@ -1,20 +0,0 @@
<?php
namespace App\Definition;
trait Contract
{
protected static $instance = null;
private function __construct() {}
protected static function getInstance()
{
if (self::$instance == null) {
self::$instance = static::newInstance();
}
return self::$instance;
}
abstract protected static function newInstance();
}
?>

View File

@ -1,18 +0,0 @@
{
"name": "aldarien/contract",
"description": "Contract trait for my apps",
"type": "library",
"license": "MIT",
"authors": [
{
"name": "Aldarien",
"email": "aldarien85@gmail.com"
}
],
"require": {},
"autoload": {
"psr-4": {
"App\\": "app"
}
}
}

View File

@ -1,11 +0,0 @@
composer.phar
/vendor/
# Commit your application's lock file http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file
# You may choose to ignore a library lock file http://getcomposer.org/doc/02-libraries.md#lock-file
# composer.lock
# Eclipse IDE
.settings
.buildpath
.project

View File

@ -1,21 +0,0 @@
MIT License
Copyright (c) 2017 Aldarien
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@ -1,2 +0,0 @@
# format
Module for formatting data, mostly numbers

View File

@ -1,43 +0,0 @@
<?php
namespace App\Helper;
class Format
{
public static function number(float $number, $decimals)
{
return number_format($number, $decimals, ',', '.');
}
public static function pesos(float $number, bool $print = false)
{
return (($print) ? '$ ' : '') . self::number($number, 0);
}
public static function ufs(float $number, bool $print = false)
{
return self::number($number, 2) . (($print) ? ' UF' : '');
}
public static function date(string $date)
{
$d = \Carbon\Carbon::parse($date, config('app.timezone'));
return $d->format("d \d\\e F Y");
}
public static function shortDate(string $date)
{
$d = \Carbon\Carbon::parse($date, config('app.timezone'));
return $d->format('d-m-Y');
}
public static function localDate(string $date)
{
$d = \Carbon\Carbon::parse($date, config('app.timezone'));
setlocale(LC_TIME, 'es');
return $d->formatLocalized('%d de %B de %Y');
}
public static function m2(float $number, bool $print = false)
{
return self::number($number, 2) . (($print) ? ' m&#0178;' : '');
}
public static function percent(float $number, bool $print = false)
{
return self::number($number, 2) . (($print) ? '%' : '');
}
}
?>

View File

@ -1,23 +0,0 @@
{
"name" : "aldarien/format",
"description" : "Module for formatting data, mostly numbers",
"type" : "library",
"require-dev" : {
"phpunit/phpunit" : "^6",
"aldarien/config": "dev-master"
},
"license" : "MIT",
"authors" : [{
"name" : "Aldarien",
"email" : "aldarien85@gmail.com"
}
],
"autoload" : {
"psr-4" : {
"App\\" : "app"
}
},
"require": {
"nesbot/carbon": "^2"
}
}

View File

@ -1,5 +0,0 @@
<?php
return [
'timezone' => 'America/Santiago'
];
?>

View File

@ -1,17 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit
colors="true"
verbose="true"
bootstrap="./vendor/autoload.php"
>
<testsuites>
<testsuite name="Application Test Suite">
<directory>./tests/</directory>
</testsuite>
</testsuites>
<filter>
<whitelist>
<directory>./app</directory>
</whitelist>
</filter>
</phpunit>

View File

@ -1,59 +0,0 @@
<?php
use PHPUnit\Framework\TestCase;
use App\Helper\Format;
class FormatTest extends TestCase
{
protected $number = 5049872.31567;
protected $date = '2016-03-25';
public function testFormat()
{
$output = '5.049.872,316';
$result = Format::number($this->number, 3);
$this->assertEquals($output, $result);
}
public function testPesosPrint()
{
$output = '$ 5.049.872';
$result = Format::pesos($this->number, true);
$this->assertEquals($output, $result);
}
public function testUFPrint()
{
$output = '5.049.872,32 UF';
$result = Format::ufs($this->number, true);
$this->assertEquals($output, $result);
}
public function testDate()
{
$output = '25 de March 2016';
$result = Format::date($this->date);
$this->assertEquals($output, $result);
}
public function testShortDate()
{
$output = '25-03-2016';
$result = Format::shortDate($this->date);
$this->assertEquals($output, $result);
}
public function testLocalDate()
{
$output = '25 de marzo de 2016';
$result = Format::localDate($this->date);
$this->assertEquals($output, $result);
}
public function testM2Print()
{
$output = '5.049.872,32 m&#0178;';
$result = Format::m2($this->number, true);
$this->assertEquals($output, $result);
}
public function testPercentPrint()
{
$output = '5.049.872,32%';
$result = Format::percent($this->number, true);
$this->assertEquals($output, $result);
}
}
?>

View File

@ -1,7 +0,0 @@
#Eclipse IDE
.settings
.buildpath
.project
#Composer
vendor

View File

@ -1,21 +0,0 @@
MIT License
Copyright (c) 2017 Aldarien
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@ -1,2 +0,0 @@
# response
Response handler module for my apps

View File

@ -1,27 +0,0 @@
<?php
namespace App\Contract;
use App\Definition\Contract;
use App\Service\Response as ResponseService;
class Response
{
use Contract;
protected static function newInstance()
{
return new ResponseService();
}
public static function __callStatic($name, $params)
{
if (!method_exists(Response::class, $name)) {
$instance = self::getInstance();
if (method_exists($instance, $name)) {
return call_user_func_array([$instance, $name], $params);
}
return null;
}
return call_user_func_array([self, $name], $params);
}
}
?>

View File

@ -1,11 +0,0 @@
<?php
function sanitize() {
App\Contract\Response::sanitize();
}
function get($query = null) {
return App\Contract\Response::get($query);
}
function post($query = null) {
return App\Contract\Response::post($query);
}
?>

View File

@ -1,62 +0,0 @@
<?php
namespace App\Service;
class Response
{
protected $post;
protected $get;
protected $gump;
public function __construct()
{
$this->gump = new \GUMP();
}
public function sanitize()
{
if ($_POST) {
$this->post = $this->correctNumbers($this->gump->sanitize($_POST));
}
if ($_GET) {
$this->get = $this->correctNumbers($this->gump->sanitize($_GET));
}
}
public function correctNumbers(array $data)
{
$output = [];
foreach ($data as $key => $value) {
if (is_float(str_replace(',', '.', $value))) {
$output[$key] = str_replace(',', '.', $value);
} else {
$output[$key] = $value;
}
}
return $output;
}
public function get($query = null)
{
if ($this->get == null) {
$this->sanitize();
}
if ($query == null) {
return $this->get;
}
if (isset($this->get[$query])) {
return $this->get[$query];
}
return false;
}
public function post($query = null)
{
if ($this->post == null) {
$this->sanitize();
}
if ($query == null) {
return $this->post;
}
if (isset($this->post[$query])) {
return $this->post[$query];
}
return false;
}
}
?>

View File

@ -1,3 +0,0 @@
<?php
include_once dirname(__DIR__) . '/vendor/autoload.php';
?>

View File

@ -1,26 +0,0 @@
{
"name" : "aldarien/response",
"description" : "Response handler module for my apps",
"type" : "library",
"require" : {
"wixel/gump" : "^1.5",
"aldarien/contract" : "dev-master"
},
"require-dev" : {
"phpunit/phpunit" : "^6.3"
},
"license" : "MIT",
"authors" : [{
"name" : "Aldarien",
"email" : "jpvial@gmail.com"
}
],
"autoload" : {
"psr-4" : {
"App\\" : "app"
},
"files": [
"app/Helper/functions.php"
]
}
}

View File

@ -1,17 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit
colors="true"
verbose="true"
bootstrap="./bootstrap/autoload.php"
>
<testsuites>
<testsuite name="Application Test Suite">
<directory>./tests/</directory>
</testsuite>
</testsuites>
<filter>
<whitelist>
<directory>./app</directory>
</whitelist>
</filter>
</phpunit>

View File

@ -1,22 +0,0 @@
<?php
use PHPUnit\Framework\TestCase;
class ResponseTest extends TestCase
{
protected $value = 'Test';
public function setUp()
{
$_GET['test'] = $this->value;
$_POST['test'] = $this->value;
}
public function testGet()
{
$this->assertEquals($this->value, get('test'));
}
public function testPost()
{
$this->assertEquals($this->value, post('test'));
}
}
?>

View File

@ -1,5 +0,0 @@
.buildpath
.project
.settings
*.lock
vendor

View File

@ -1,21 +0,0 @@
MIT License
Copyright (c) 2017 Aldarien
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@ -1,22 +0,0 @@
# root
get root directory path for your project
## Usage
add `Root::root('project')` or `root('project')` or `Root::root()` or `root()` where you need the root directory of your proyect.
## Example
For the structure:
~~~
/usr/share/www/projects
- myProject
-- src
-- tests
~~~
using `Root::root('myProject')`
outputs:
`/usr/share/www/projects/myProject`

View File

@ -1,5 +0,0 @@
<?php
function root(string $proyect_name = '') {
return \Proyect\Root\Root::root($proyect_name);
}
?>

View File

@ -1,21 +0,0 @@
{
"name" : "aldarien/root",
"description" : "Find the root path for your proyect",
"authors" : [{
"name" : "Aldarien"
}
],
"license": "MIT",
"require-dev" : {
"phpunit/phpunit" : "~6",
"kint-php/kint" : "~2"
},
"autoload" : {
"psr-4" : {
"Proyect\\Root\\" : "src"
},
"files": [
"app/Helper/functions.php"
]
}
}

View File

@ -1,19 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/6.2/phpunit.xsd"
bootstrap="vendor/autoload.php"
forceCoversAnnotation="true"
beStrictAboutCoversAnnotation="true"
beStrictAboutOutputDuringTests="true"
beStrictAboutTodoAnnotatedTests="true"
verbose="true">
<testsuite>
<directory suffix="Test.php">tests</directory>
</testsuite>
<filter>
<whitelist processUncoveredFilesFromWhitelist="true">
<directory suffix=".php">src</directory>
</whitelist>
</filter>
</phpunit>

View File

@ -1,48 +0,0 @@
<?php
namespace Proyect\Root;
class Root
{
/**
* gives base path for your proyect.
* eg. <code>$proyect_name/public/index.php</code> calls for <code>$proyect_name/bootstrap/autoload.php</code>,
* you just need to
*
* <code>include root() . '/bootstrap/autoload.php'</code>
*
* @param string $proyect_name
* @return string
*/
public static function root(string $proyect_name = '')
{
$dir = realpath(__DIR__);
if ($proyect_name == '') {
return self::findComposerFile($dir);
} else {
$ini = strpos($dir, $proyect_name) + strlen($proyect_name);
}
$path = substr($dir, $ini);
$cnt = substr_count($path, DIRECTORY_SEPARATOR);
$root = DIRECTORY_SEPARATOR;
for ($i = 0; $i < $cnt; $i ++) {
$root .= '..' . DIRECTORY_SEPARATOR;
}
return realpath($dir . $root);
}
protected static function findComposerFile($dir)
{
if (file_exists($dir . '/vendor/')) {
return $dir;
}
$root = realpath('/');
if (realpath($dir) == $root) {
return null;
}
$dir = dirname($dir);
return self::findComposerFile($dir);
}
}
?>

View File

@ -1,61 +0,0 @@
<?php
use PHPUnit\Framework\TestCase;
use Proyect\Root\Root;
class RootTest extends TestCase
{
private $proyect_name = 'root';
private $current_dir;
public function testBaseRoot()
{
$this->getCurrentDir();
$this->assertEquals($this->getRoot(), $this->current_dir);
$this->assertEquals($this->getBaseRoot(), $this->current_dir);
}
public function testBaseRootFunction()
{
$this->getCurrentDir();
$this->assertEquals($this->getFRoot(), $this->current_dir);
$this->assertEquals($this->getFBaseRoot(), $this->current_dir);
}
public function testSrcRoot()
{
$this->changeDir('src');
$this->assertEquals(realpath($this->getRoot() . '/src'), $this->current_dir);
$this->assertEquals(realpath($this->getBaseRoot() . '/src'), $this->current_dir);
}
public function testSrcRootFunction()
{
$this->changeDir('src');
$this->assertEquals(realpath($this->getFRoot() . '/src'), $this->current_dir);
$this->assertEquals(realpath($this->getFBaseRoot() . '/src'), $this->current_dir);
}
private function getCurrentDir()
{
$this->current_dir = getcwd();
}
private function changeDir($dir)
{
chdir($dir);
$this->getCurrentDir();
}
private function getRoot()
{
return Root::root($this->proyect_name);
}
private function getBaseRoot()
{
return Root::root();
}
private function getFRoot()
{
return root($this->proyect_name);
}
private function getFBaseRoot()
{
return root();
}
}
?>

View File

@ -1,11 +0,0 @@
composer.phar
/vendor/
# Commit your application's lock file http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file
# You may choose to ignore a library lock file http://getcomposer.org/doc/02-libraries.md#lock-file
# composer.lock
# Eclipse IDE
.settings
.buildpath
.project

View File

@ -1,21 +0,0 @@
MIT License
Copyright (c) 2017 Aldarien
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@ -1,2 +0,0 @@
# session
Session wrapper for aura/session

View File

@ -1,29 +0,0 @@
<?php
namespace App\Contract;
use Aura\Session\SessionFactory;
use App\Definition\Contract;
class Session
{
use Contract;
protected static function newInstance()
{
$session_factory = new SessionFactory();
return $session_factory->newInstance($_COOKIE);
}
public static function get($segment, $name)
{
$instance = self::getInstance();
$segment = $instance->getSegment($segment);
return $segment->get($name);
}
public static function set($segment, $name, $value)
{
$instance = self::getInstance();
$segment = $instance->getSegment($segment);
$segment->set($name, $value);
}
}
?>

View File

@ -1,24 +0,0 @@
{
"name": "aldarien/session",
"description": "Session wrapper for aura/session",
"type": "library",
"require": {
"aura/session": "^2.1",
"aldarien/contract": "dev-master"
},
"require-dev": {
"phpunit/phpunit": "^6.3"
},
"license": "MIT",
"authors": [
{
"name": "Aldarien",
"email": "aldarien85@gmail.com"
}
],
"autoload": {
"psr-4": {
"App\\": "app"
}
}
}

View File

@ -1,12 +0,0 @@
composer.phar
/vendor/
# Commit your application's lock file http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file
# You may choose to ignore a library lock file http://getcomposer.org/doc/02-libraries.md#lock-file
# composer.lock
.settings
.buildpath
.project
# Eclipse IDE

View File

@ -1,21 +0,0 @@
MIT License
Copyright (c) 2017 Aldarien
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@ -1,2 +0,0 @@
# url
Get relative path url

View File

@ -1,21 +0,0 @@
<?php
namespace App\Contract;
use App\Definition\Contract;
use App\Service\URL as URLService;
class URL
{
use Contract;
protected static function newInstance()
{
return new URLService();
}
public static function url($path = '', $variables = null)
{
$instance = self::getInstance();
return $instance->url($path, $variables);
}
}
?>

View File

@ -1,8 +0,0 @@
<?php
function url($path = '', $variables = null) {
return App\Contract\URL::url($path, $variables);
}
function baseUrl() {
return url();
}
?>

View File

@ -1,76 +0,0 @@
<?php
namespace App\Service;
use League\Uri\Http;
use League\Uri\Components\Host;
use League\Uri\Components\HierarchicalPath;
class URL
{
protected $root;
protected $relative;
public function __construct()
{
$this->root = $this->findRoot();
$this->relative = $this->findRelative();
}
protected function findRoot()
{
$base = $_SERVER['HTTP_HOST'] . ((isset($_SERVER['HTTP_PORT'])) ? ':' . $_SERVER['HTTP_PORT'] : '');
$uri = Http::createFromString(\Sabre\Uri\resolve($_SERVER['REQUEST_SCHEME'] . '://' . $base, $_SERVER['SCRIPT_NAME']));
$host = new Host($uri->getHost());
if ($host->isAbsolute()) {
return $host->getRegistrableDomain();
}
$base = $host . (($uri->getPort()) ? ':' . $uri->getPort() : '');
return ($uri->getScheme() ?: 'http') . '://' . $base;
}
protected function findRelative()
{
$uri = Http::createFromString($_SERVER['SCRIPT_NAME']);
$normalized = (new HierarchicalPath($uri->getPath()))->withoutLeadingSlash()->withoutTrailingSlash()->withoutDotSegments()->withoutEmptySegments();
if ($normalized->getDirname() == '.') {
return '';
}
return $normalized->getDirname();
}
public function url($path = '', $variables = null)
{
$uri = Http::createFromString($path);
if ($uri->getHost() != $this->root and $uri->getHost() != '') {
return $path;
}
$uri = \Sabre\Uri\resolve($this->getBaseUrl(), $path);
try {
$host = new Host(Http::createFromString($uri)->getHost());
} catch (\League\Uri\Exception $e) {
$uri = \Sabre\Uri\resolve($this->getBaseUrl(), '../../') . '/' . basename($path);
$host = new Host(Http::createFromString($uri)->getHost());
}
$base = new Host(Http::createFromString($this->root)->getHost());
if ($host . '' != $base . '') {
$host = new Host(Http::createFromString($this->root)->getHost());
$page = str_replace($this->root, '', $uri);
$uri = \Sabre\Uri\resolve(Http::createFromString($this->root)->getScheme() . '://' . $host->getRegistrableDomain(). '/', $page);
}
if ($variables != null) {
$uri = \Sabre\Uri\resolve($uri, '?' . http_build_query($variables));
}
$uri = \Sabre\Uri\normalize($uri);
return $uri;
}
protected function getBaseUrl()
{
$url = \Sabre\Uri\normalize(trim($this->root . '/' . $this->relative, '/') . '/');
return $url;
}
}
?>

View File

@ -1,28 +0,0 @@
{
"name" : "aldarien/url",
"description" : "Get relative path uri",
"type" : "library",
"require" : {
"aldarien/contract" : "dev-master",
"aldarien/root" : "dev-master",
"league/uri": "^5.2",
"sabre/uri": "^2.1"
},
"require-dev" : {
"phpunit/phpunit" : "^6.3"
},
"license" : "MIT",
"authors" : [{
"name" : "Aldarien",
"email" : "jpvial@gmail.com"
}
],
"autoload" : {
"psr-4" : {
"App\\" : "app"
},
"files": [
"app/Helper/functions.php"
]
}
}

View File

@ -1,10 +0,0 @@
composer.phar
/vendor/
# Commit your application's lock file http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file
# You may choose to ignore a library lock file http://getcomposer.org/doc/02-libraries.md#lock-file
# composer.lock
.settings
.buildpath
.project

View File

@ -1,21 +0,0 @@
MIT License
Copyright (c) 2017 Aldarien
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@ -1,2 +0,0 @@
# view
View module for my apps

View File

@ -1,21 +0,0 @@
<?php
namespace App\Contract;
use App\Definition\Contract;
use App\Service\View as ViewService;
class View
{
use Contract;
protected static function newInstance()
{
return new ViewService();
}
public static function show($template, $variables = null)
{
$instance = self::getInstance();
return $instance->show($template, $variables);
}
}
?>

View File

@ -1,5 +0,0 @@
<?php
function view($template, $variables = null) {
return \App\Contract\View::show($template, $variables);
}
?>

View File

@ -1,27 +0,0 @@
<?php
namespace App\Service;
use Philo\Blade\Blade;
class View
{
protected $views;
protected $cache;
protected $blade;
public function __construct()
{
$this->views = config('locations.views');
$this->cache = config('locations.cache');
$this->blade = new Blade($this->views, $this->cache);
}
public function show($template, $vars = null)
{
if ($vars) {
return $this->blade->view()->make($template, $vars)->render();
}
return $this->blade->view()->make($template)->render();
}
}
?>

View File

@ -1,9 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<title>View</title>
</head>
<body>
View test
</body>
</html>

View File

@ -1,28 +0,0 @@
{
"name": "aldarien/view",
"description": "View module for my apps",
"type": "library",
"require": {
"philo/laravel-blade": "^3.1",
"aldarien/contract": "dev-master",
"aldarien/config": "dev-master"
},
"license": "MIT",
"authors": [
{
"name": "Aldarien",
"email": "aldarien85@gmail.com"
}
],
"autoload": {
"psr-4": {
"App\\": "app"
},
"files": [
"app/Helper/functions.php"
]
},
"require-dev": {
"phpunit/phpunit": "^6.3"
}
}

View File

@ -1,8 +0,0 @@
<?php
return [
'base' => root(),
'cache' => '{locations.base}/cache',
'resources' => '{locations.base}/resources',
'views' => '{locations.resources}/views'
];
?>

View File

@ -1,17 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit
colors="true"
verbose="true"
bootstrap="./vendor/autoload.php"
>
<testsuites>
<testsuite name="Application Test Suite">
<directory>./tests/</directory>
</testsuite>
</testsuites>
<filter>
<whitelist>
<directory>./app</directory>
</whitelist>
</filter>
</phpunit>

View File

@ -1,5 +0,0 @@
<?php
include_once dirname(__DIR__) . '/vendor/autoload.php';
echo view('base');
?>

View File

@ -1,9 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<title>View</title>
</head>
<body>
View test
</body>
</html>

View File

@ -1,22 +0,0 @@
<?php
use PHPUnit\Framework\TestCase;
class ViewTest extends TestCase
{
public function testView()
{
$output = <<<DATA
<!DOCTYPE html>
<html>
<head>
<title>View</title>
</head>
<body>
View test
</body>
</html>
DATA;
$this->assertEquals($output, view('base'));
}
}
?>

9
api.compose.yml Normal file
View File

@ -0,0 +1,9 @@
services:
httpclient:
profiles:
- testing
container_name: incoviba_client
image: flawiddsouza/restfox
restart: unless-stopped
ports:
- "${HTTPCLIENT_PORT:-4004}:4004"

1
app/.adminer.env.sample Normal file
View File

@ -0,0 +1 @@
ADMINER_DESIGN=dracula

4
app/.db.env.sample Normal file
View File

@ -0,0 +1,4 @@
MYSQL_ROOT_PASSWORD=
MYSQL_DATABASE=
MYSQL_USER=
MYSQL_PASSWORD=

19
app/.env.sample Normal file
View File

@ -0,0 +1,19 @@
#ENVIRONMENT=
APP_URL=
COOKIE_NAME=
COOKIE_DOMAIN=
COOKIE_PATH=/
MAX_LOGIN_HOURS=120
#REDIS_HOST=redis
#REDIS_PORT=6379
DB_HOST=db
DB_DATABASE=incoviba
DB_USER=incoviba
DB_PASSWORD=
TOKU_URL=
TOKU_TOKEN=

2
app/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
**/bin
**/public/tests

14
app/.phpunit-watcher.yml Normal file
View File

@ -0,0 +1,14 @@
watch:
directories:
- src
- tests
- common
- resources
fileMask: '*.php'
notifications:
passingTests: false
failingTests: false
hideManual: true
phpunit:
arguments: '--testsuite unit --log-events-text /logs/output.txt --stop-on-failure'
timeout: 180

View File

@ -1,18 +0,0 @@
<?php
namespace App\Alias\Excel\Style;
use Slam\Excel\Helper\CellStyleInterface;
use Slam\Excel\Pear\Writer\Format;
class Mes implements CellStyleInterface
{
public function decorateValue($value)
{
return $value;
}
public function styleCell(Format $format): void
{
$format->setNumFormat('mmm-YY');
$format->setAlign('center');
}
}

View File

@ -1,12 +0,0 @@
<?php
use App\Helper\Format as F;
class Format
{
public static function __callstatic($name, $params)
{
if (method_exists(F, $name)) {
return F::$name($params);
}
}
}
?>

View File

@ -1,87 +0,0 @@
<?php
namespace App\Alias;
use Stringy\Stringy;
use App\Contract\Auth;
class Model extends \Model
{
public function getTable()
{
return parent::_get_table_name(static::class);
}
protected function log()
{
if (strpos(get_called_class(), 'Incoviba\\common\\') !== false) {
return;
}
$user = Auth::User()->id;
$orm = $this->orm;
$ref = new \ReflectionObject($orm);
if (!$ref->hasProperty('_dirty_fields')) {
return;
}
$dirty = $ref->getProperty('_dirty_fields');
$dirty->setAccessible(true);
$new_values = $dirty->getValue($orm);
$changes = array_combine(array_keys($new_values), array_fill(0, count($new_values), ['old' => '', 'new' => '']));
if ($this->isNew()) {
$old = (object) array_combine(array_keys($new_values), array_fill(0, count($new_values), ''));
} else {
$old = model(get_called_class())->findOne($this->{$this->getId()});
}
foreach ($new_values as $column => $value) {
$changes[$column] = ['column' => $column, 'old' => $old->$column, 'new' => $value];
}
$action = '[' . get_called_class() . ']';
doLog($user, $action, $changes);
}
public function getId()
{
if (property_exists(get_called_class(), '_id_column')) {
return static::$_id_column;
}
return $this->id;
}
public function save()
{
$ref = new \ReflectionObject($this);
if ($ref->hasProperty('_timestamps')) {
$ref = $ref->getProperty('_timestamps');
$ref->setAccessible(true);
if ($ref->getValue()) {
if ($this->is_new()) {
$this->setExpr('created_at', 'NOW()');
}
$this->setExpr('updated_at', 'NOW()');
}
}
if (!\ORM::getDb()->inTransaction()) {
\ORM::getDb()->beginTransaction();
}
try {
parent::save();
if (\ORM::getDb()->inTransaction()) {
\ORM::getDb()->commit();
}
} catch (\Exception $e) {
if (\ORM::getDb()->inTransaction()) {
\ORM::getDb()->rollBack();
}
throw $e;
}
$this->log();
}
public function __call($method, $args)
{
if (!method_exists($this, $method)) {
$str = '' . Stringy::create($method)->underscored();
if (method_exists($this, $str)) {
return call_user_func_array([$this, $str], $args);
}
throw new \BadMethodCallException($method . ' not found in ' . get_class($this));
}
return call_user_func_array([$this, $str], $args);
}
}
?>

View File

@ -1,20 +0,0 @@
<?php
namespace App\Alias;
use Carbon\Carbon;
/**
*
* @author Aldarien
* @property int id
* @property Date fecha
*
*/
class NewEstado extends NewModel
{
public function fecha()
{
return Carbon::parse($this->fecha, config('app.timezone'));
}
}
?>

View File

@ -1,9 +0,0 @@
<?php
namespace App\Alias;
class NewModel extends Model
{
protected static $_connection_name = 'mysql_copy';
protected static $_timestamps = true;
}
?>

View File

@ -1,15 +0,0 @@
<?php
namespace App\Alias;
/**
*
* @author Aldarien
* @property int id
* @property string descripcion
*
*/
class NewTipo extends NewModel
{
protected static $_timestamps = true;
}
?>

View File

@ -1,8 +0,0 @@
<?php
namespace App\Alias;
class OldModel extends Model
{
protected static $_connection_name = 'mysql';
}
?>

View File

@ -1,155 +0,0 @@
<?php
namespace App\Alias;
use Slam\Excel\Helper as ExcelHelper;
class PHPExcel
{
protected $name;
protected $filename;
protected $columns;
protected $data;
public function __construct($name, $filename)
{
$this->name = $name;
$this->filename = $filename;
}
public function addColumns($fields)
{
$columns = [];
foreach ($fields as $i => $field) {
if (is_object($field)) {
if (isset($field->style)) {
$style = $this->getExcelStyle($field->style);
} else {
$style = $this->getExcelStyle();
}
$column = new ExcelHelper\Column($field->name, $field->name, 10, $style);
} elseif (is_array($field)) {
if (isset($field['style'])) {
$style = $this->getExcelStyle($field['style']);
} else {
$style = $this->getExcelStyle();
}
$column = new ExcelHelper\Column($field['name'], $field['name'], 10, $style);
} else {
$style = $this->getExcelStyle();
$column = new ExcelHelper\Column($field, $field, 10, $style);
}
$columns []= $column;
}
$collection = new ExcelHelper\ColumnCollection($columns);
$this->columns = $collection;
}
protected function getExcelStyle($style = 'text')
{
switch (strtolower($style)) {
case 'date':
return new ExcelHelper\CellStyle\Date();
case 'mes':
return new Excel\Style\Mes();
case 'currency':
case 'amount':
return new ExcelHelper\CellStyle\Amount();
case 'number':
case 'integer':
return new ExcelHelper\CellStyle\Integer();
case 'percent':
case 'percentage':
return new ExcelHelper\CellStyle\Percentage();
case 'text':
case 'string':
default:
return new ExcelHelper\CellStyle\Text();
}
}
public function addData($data)
{
if ($this->data == null) {
$this->data = [];
}
$this->data = array_merge($data);
}
public function addRow($rowData)
{
if ($this->data == null) {
$this->data = [];
}
$this->data []= $rowData;
}
public function addTotals($totals)
{
$columns = (array) $this->columns;
$columns = array_pop($columns);
$ts = [];
foreach ($columns as $column) {
$col = $column->getHeading();
if (isset($totals[$col])) {
$ts[$col] = $this->getTotal($col, $totals[$col]);
continue;
}
$ts[$col] = '';
}
$this->data []= $ts;
}
protected function getTotal($col, $aggr)
{
$col_num = $this->getColNumber($col);
$col = $this->getColName($col_num);
switch(strtolower($aggr)) {
case 'sum':
$num = 109;
break;
case 'count':
$num = 102;
break;
case 'counta':
$num = 103;
break;
default:
$num = 0;
}
if ($num > 0) {
$end = count($this->data) + 2;
$str = "=SUBTOTAL({$num};{$col}3:{$col}{$end})";
return $str;
}
return $aggr;
}
protected function getColNumber($col)
{
$columns = (array) $this->columns;
$columns = array_keys(array_pop($columns));
return array_search($col, $columns);
}
protected function getColName($col_num)
{
$cols = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
$N = strlen($cols);
$name = '';
if ($col_num > $N) {
$name .= $cols[floor($col_num / $N)];
$col_num = $N * ($col_num / $N - floor($col_num / $N));
}
$name .= $cols[$col_num];
return $name;
}
public function informe()
{
header("Content-Type: application/octet-stream; charset=utf-8");
header('Content-Transfer-Encoding: binary');
header('Content-Disposition: attachment; filename="' . $this->filename . '"');
header('Cache-Control: max-age=0');
$pE = new ExcelHelper\TableWorkbook('php://output');
$ws = $pE->addWorksheet($this->name);
$table = new ExcelHelper\Table($ws, 0, 0, $this->name, new \ArrayIterator($this->data));
$table->setColumnCollection($this->columns);
$pE->writeTable($table);
$pE->close();
}
}

Some files were not shown because too many files have changed in this diff Show More