Skip to main content

pieces_to_lots

Function pieces_to_lots 

Source
pub fn pieces_to_lots(qty: Qty, lot: i64) -> Result<i64, Error>
Expand description

Units to lots: the quantity must be a whole number of lots, at least one.

§Errors

[Error::Rejected] with code invalid_qty for zero, a negative number, a fraction, or a number that is not a multiple of lot. Nothing is rounded.