Skip to content
/ shopper Public

A package to help in getting data from SEFAZ-RS receipts

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md
Notifications You must be signed in to change notification settings

fcsest/shopper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🛍 shopper

Lifecycle: maturing

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.

Installation

You can install the development version from GitHub with:

# install.packages("remotes")
remotes::install_github("fcsest/shopper")

Example

This package helps in collecting data from SEFAZ-RS receipts, below is an example of a complete receipt:

Full Receipt SEFAZ-RS

To collect the data we need to cropping the QR Code like this:

Cropped SEFAZ-RS

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" ...

About

A package to help in getting data from SEFAZ-RS receipts

Topics

Resources

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages