Docs.rs
invoice-cli-0.2.2
invoice-cli 0.2.2
Docs.rs crate page
MIT
Links
Repository
crates.io
Source
Owners
longevityboris
Dependencies
anyhow ^1
normal
chrono ^0.4
normal
clap ^4
normal
directories ^5
normal
figment ^0.10
normal
qrcode ^0.14
normal
refinery ^0.8
normal
rusqlite ^0.33
normal
rust-embed ^8
normal
rust_decimal ^1
normal
rust_decimal_macros ^1
normal
serde ^1
normal
serde_json ^1
normal
tempfile ^3
normal
thiserror ^2
normal
toml ^0.8
normal
Versions
20.67%
of the crate is documented
Go to latest version
Platform
x86_64-unknown-linux-gnu
Feature flags
docs.rs
About docs.rs
Badges
Builds
Metadata
Shorthand URLs
Download
Rustdoc JSON
Build queue
Privacy policy
Rust
Rust website
The Book
Standard Library API Reference
Rust by Example
The Cargo Guide
Clippy Documentation
Skip to main content
Module money
invoice_
cli
0.2.2
Module money
Module Items
Structs
Functions
In crate invoice_
cli
invoice_cli
Module
money
Copy item path
Source
Structs
§
Minor
Units
Functions
§
apply_
rate
Apply a percent rate to a base. Shared by tax_amount and discount math.
line_
total
Compute line total in minor units: qty * unit_price.
line_
total_
discounted
Line total after applying at most one of (rate discount, fixed discount). If both are set,
rate
wins — caller should enforce mutual exclusion at the CLI layer. Result is clamped at zero so a mis-sized fixed discount can’t flip the line negative.
tax_
amount
Compute tax amount in minor units: base * rate / 100.