Package to collect tax receipt data from SEFAZ-RS.
For now the package only collects data from the link generated by the QR in the tax receipts.
You can install the development version from GitHub with:
# install.packages("remotes")
remotes::install_github("fcsest/shopper")
This package helps in collecting data from SEFAZ-RS receipts, below is an example of a complete receipt:
To collect the data we need to cropping the QR Code like this:
And setting the image cropped as parameter to
shopper::get_qrcode_text()
…
# Importing pipe
library(magrittr)
# Importing the shopper package
library(shopper)
# QR Code cropped
image_example <- "https://github.com/fcsest/shopper/raw/master/inst/app/www/example.png"
# Read QR Code of impressed receipt
my_df <- get_qrcode_text(image_example) %>%
get_sefaz_rs_rdata()
# Structure of data frame
str(my_df)
#> 'data.frame': 29 obs. of 7 variables:
#> $ Código : chr "8389" "23641" "36535" "64880" ...
#> $ Produto : chr "CEBOLA NACIONAL kg" "BATATA DOCE ROSA kg" "ABOBORA ITALIA kg" "TOMATE LONGA VIDA kg" ...
#> $ Quantidade : num 0.524 0.47 0.431 0.506 0.26 500 1 20 2 2 ...
#> $ Medida : chr "kg" "kg" "kg" "kg" ...
#> $ Valor Unidade : chr "3,59" "3,79" "3,39" "3,98" ...
#> $ Valor Total : chr "1,88" "1,78" "1,46" "2,01" ...
#> $ Produto_simplificado: chr "cebola nacional" "batata doce rosa" "abobora italia" "tomate longa vida" ...