#billing #money #tax #invoice #little #tiny #💸

bill

💸 一个用于创建发票的最小化库。欢迎审查和纠正。

7个不稳定版本

0.4.2 2023年3月26日
0.4.1 2021年10月18日
0.4.0 2019年1月18日
0.3.1 2019年1月18日
0.1.1 2017年4月26日

财务中排名第73

Download history 9/week @ 2024-03-27 13/week @ 2024-04-03

每月下载量70
用于asciii

MIT/Apache

13KB
284

💸 Bill

Travis license Crates.io version documentation

一个非常小的账单库。

示例

cargo run --example catalogue
offer:
  0%
*   2x Service         8,0016,000.19%
  *   8x Water           0,614,88*   4x AppleJuice      1,646,56*   4x OrangeJuice    1,867,44*   40x Sandwich        3,40136,00---------------------------------------
       170,88+ 29,43(tax)
   net 200,31...

使用序列化

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"}}
    ]
   }
}}

依赖项

~0.8–1.6MB
~37K SLoC