vat_ph
vat_ph is a library for computing Value Added Tax (VAT) in the Philippines.
The computed VAT follows the guidelines set by the Bureau of Internal Revenue (BIR) under Republic Act 12023.
The computation uses rust_decimal crate to ensure precise
financial calculations.
Usage
Using compute_vat(), you can compute the VAT given net, gross, or VAT. The result will be a struct containing all of
the three mentioned.
use dec;
use compute_vat;
use VatInput;
let result = compute_vat;
assert!;
let vat = result.unwrap;
assert_eq!;
assert_eq!;
assert_eq!;
Contribution
In order to contribute to this project, you can follow these steps:
- Clone this repository.
- Install the rust toolchain version
1.86.0. - Build the project with
cargo build. - Run test using
cargo test.