Skip to content

Control code generator for invoices inside the Bolivian national tax service implemented in Golang.

License

Notifications You must be signed in to change notification settings

pcriv/complicode-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Complicode

Control code generator for invoices inside the Bolivian national tax service.

Usage

package main

import (
	"fmt"
	"time"

	"github.com/pablocrivella/complicode-go"
)

func main() {
	authCode := "29040011007"
	key := "9rCB7Sv4X29d)5k7N%3ab89p-3(5[A"
	date, _ := time.Parse("20060102", "20070702")
	invoice := complicode.Invoice{Number: 1503, Nit: 4189179011, Date: date, Amount: 2500}
	code := complicode.Generate(authCode, key, invoice)

	fmt.Printf(code) // => "6A-DC-53-05-14"
}

License

Copyright 2020 Pablo Crivella. Read LICENSE for details.

About

Control code generator for invoices inside the Bolivian national tax service implemented in Golang.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages