Struct bill::BillItem
[−]
[src]
pub struct BillItem<P> { pub amount: Amount, pub product: P, }
Maps a BillProduct
to an amount.
Fields
amount: Amount
product: P
Methods
impl<P: BillProduct> BillItem<P>
[src]
fn gross(&self) -> Money
price * amount
fn tax(&self) -> Money
price * tax * amount
, tax being less than 1.0
fn net(&self) -> Money
gross + tax