Download the PHP package gfarias/laravel-previ-scraper without Composer
On this page you can find all versions of the php package gfarias/laravel-previ-scraper. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download gfarias/laravel-previ-scraper
More information about gfarias/laravel-previ-scraper
Files in gfarias/laravel-previ-scraper
Package laravel-previ-scraper
Short Description Extractor de indicadores previsionales y tramos de renta (previred/sii)
License MIT
Homepage https://github.com/gfarias/laravel-previ-scraper
Informations about the package laravel-previ-scraper
Laravel PreviScraper
Indicadores previsionales Chile 🇨🇱
Indicadores previsionales desde Previred y tramos de impuesto desde SII
Los datos se obtienen utilizando web scraping (Previred - Sii)
Instalación
Corre el siguiente comando en la terminal:
Cómo se usa
Puedes utilizar el provider e inyectarlo directo en los métodos ejecutados por el framework:
o instanciar directamente PreviScraper :
Sii - Impuesto segunda categoría
Soporta desde el año 2013+
método | retorno |
---|---|
getTramosMensuales() |
array |
getTramosQuincenales() |
array |
getTramosSemanales() |
array |
getTramosDiarios() |
array |
all() |
array |
Cada método entrega un arreglo con el conjunto de tramos disponibles en SII, a su vez, cada tramo contiene los siguientes datos:
nombre | tipo de dato | descripción |
---|---|---|
periodo | string | [mensual ,quincenal , semanal , diario ] |
desde | float | renta mínima del tramo |
hasta | float | renta tope del tramo |
factor | float | factor de cálculo |
descuento | float | Cantidad a rebajar |
impuesto | float | Tasa de Impuesto Efectiva, máxima por cada tramo de Renta |
En resumen, es una fiel representación de la web de SII
Ejemplos de uso
Obtener indicadores mensuales del periodo Enero 2021
El output de estos indicadores sería:
Previred
Por ahora solo soporta el periodo actual en el sitio de previred, una buena implementación sería un lector PDF para obtener datos de períodos anteriores
método | retorno |
---|---|
getUF() |
float |
getUTM() |
float |
getRentaTopeImponibleAfp() |
float |
getRentaTopeImponibleIps() |
float |
getRentaTopeImponibleCesantia() |
float |
getRentaMinimaImponibleDependiente() |
float |
getRentaMinimaImponibleMenores() |
float |
getRentaMinimaImponibleParticulares() |
float |
getSeguroCesantia() |
\Gfarias\PreviScraper\CesantiaSupport |
getTopeApvMensual() |
float |
getTopeAPVAnual() |
float |
getAfpCapital() |
\Gfarias\PreviScraper\AfpSupport |
getAfpCuprum() |
\Gfarias\PreviScraper\AfpSupport |
getAfpHabitat() |
\Gfarias\PreviScraper\AfpSupport |
getAfpPlanVital() |
\Gfarias\PreviScraper\AfpSupport |
getAfpProVida() |
\Gfarias\PreviScraper\AfpSupport |
getAfpModelo() |
\Gfarias\PreviScraper\AfpSupport |
getAfpUno() |
\Gfarias\PreviScraper\AfpSupport |
getAsignacionTramoAMonto() |
float |
getAsignacionTramoBMonto() |
float |
getAsignacionTramoCMonto() |
float |
getAsignacionTramoA() |
float |
getAsignacionTramoB() |
float |
getAsignacionTramoC() |
float |
getAsignacionTramoD() |
float |
all() |
array |
CesantiaSupport
Datos específicos del seguro de cesantía
método | retorno |
---|---|
getIndefinidoEmpleador() |
float |
getIndefinidoTrabajador() |
float |
getPlazoFijoEmpleador() |
float |
getIndefinidoSobre11Empleador() |
float |
getCasaParticularEmpleador() |
float |
toArray() |
array |
AfpSupport
Datos específicos de cada AFP
método | retorno |
---|---|
getNombre() |
string |
getCodigo() |
string |
getPorcentajeDependiente() |
float |
getPorcentajeSis() |
float |
getPorcentajeIndependiente() |
float |
toArray() |
array |
Ejemplo de uso
❤️