pub fn decide(ready: bool, blocked: bool) -> bool { if ready == true { return false; } if blocked == false { return true; } false } pub fn price(base: i64, qty: i64, tax_rate: i64, discount: i64, shipping: i64) -> i64 { let mut total = base * qty; if qty > 0 { if tax_rate > 0 { if total > 5000 { total = total - discount; } } } total + shipping }