bill

Crates.iobill
lib.rsbill
version0.4.2
sourcesrc
created_at2017-04-26 19:00:49.492495
updated_at2023-03-26 14:22:56.127872
description💸 A minimal library for creating invoices. Feel free to review and correct it.
homepage
repositoryhttps://github.com/hoodie/bill-rs
max_upload_size
id12130
size32,340
Hendrik Sollich (hoodie)

documentation

https://docs.rs/bill/

README

💸 Bill

Travis license Crates.io version documentation

Tiny little billing library.

Example

cargo run --example catalogue
offer:
  0%
*   2x Service         8,00€ 16,00€
  0.19%
  *   8x Water           0,61€ 4,88€
  *   4x AppleJuice      1,64€ 6,56€
  *   4x OrangeJuice    1,86€ 7,44€
  *   40x Sandwich        3,40€ 136,00€
---------------------------------------
       170,88€
     + 29,43€ (tax)
   net 200,31€

...

With serialization

cargo run --example catalogue --features serialization
{"items_by_tax":{
  "0": {
    "items":[
      {"amount":2.0,"product":{"name":"Service","price":8.0,"tax":"0"}}
    ]
  },
  "0.19":{
    "items": [
      {"amount":8.0,"product":{"name":"Water","price":0.61,"tax":"0.19"}},
      {"amount":4.0,"product":{"name":"AppleJuice","price":1.64,"tax":"0.19"}},
      {"amount":4.0,"product":{"name":"OrangeJuice","price":1.86,"tax":"0.19"}},{"amount":40.0,"product":{"name":"Sandwich","price":3.4,"tax":"0.19"}}
    ]
   }
}}
Commit count: 51

cargo fmt