npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@nearshorecode/impuestos-bo

v1.5.1

Published

Utility library to generate V7 control code for Impuestos Bolivia

Downloads

24

Readme

Build Status semantic-release codecov

Utility Library for Impuestos Bolivia

Usage

To use this library install it from npm:

npm i @nearshorecode/impuestos-bo

or

yarn add @nearshorecode/impuestos-bo

Then you can use it to generate V7 Control code, for example:

const { v7 } = require('@nearshorecode/impuestos-bo')

const data = {
  authorization: '29040011007',
  number: '1503',
  nitci: '4189179011',
  date: '2007/07/02',
  amount: '2500',
}

const controlCode = v7(data, '9rCB7Sv4X29d)5k7N%3ab89p-3(5[A') // returns control code string

You can convert a number to literal, for example:

const { literal } = require('@nearshorecode/impuestos-bo')

const data = '17'

const literal = literal(data) // returns 'DIECISIETE 00/100 BOLIVIANOS'

You can also request QR code string that you can later use it to render, for this you need to send it additional parameters:

const { v7 } = require('@nearshorecode/impuestos-bo')

const data = {
  authorization: '29040011007',
  number: '1503',
  nitci: '4189179011',
  date: '2007/07/02',
  amount: '2500',
  qr: {
    sellerNITCI: '1122332233',
    total: '2500',
    amounts: {
      'ice-iehd-tasas': '0', // defaults to 0
      gravado: '0', // defaults to 0
      'no-tax': '0' // defaults to 0
      discounts: '0' // defaults to 0
    }
  }
}

const result = v7(data, '9rCB7Sv4X29d)5k7N%3ab89p-3(5[A')

console.log(result.controlCode)
console.log(result.qrCode)

QR Code Reference

Position | Field | Type | Mandatory | Max Length --- | --- | --- | --- | --- 1 | NIT | Number | Y | 12 2 | Factura | Number | Y | 10 3 | Authorization | Number | Y | 15 4 | Date | DD/MM/AAAA | Y | 10 5 | Total | Number (decimal point) | Y | 11 6 | Amount | Number (decimal point) | Y | 11 7 | Codigo de Control | String | Y | 17 8 | Buyer NIT/CI/CEX/0 | String | Y | 12 9 | Amount ICE/IEHD/Tasas/0 | Number (decimal point) | N | 11 10 | Amount Gravado/0 | Number (decimal point) | N | 11 11 | Amount No-Tax/0 | Number (decimal point) | N | 11 12 | Discounts/Bonus | Number (decimal point) | N | 11

Local Development

First clone this project and install dependencies using:

  git clone https://github.com/nearshorecode/impuestos-bo
  yarn install

We are using semantic-release and conventional commits for this project, once you want to submit a PR make sure to run linter and to run or add unit tests in the tests folder on the root level.