discount for business and personall in discount page
This commit is contained in:
@@ -210,7 +210,13 @@ fn detail_for(product: &products::Model, b2b: Option<&B2bContext>) -> PriceDetai
|
||||
auto_cents = Some(apply_discount_bp(regular, chosen.percent_bp));
|
||||
}
|
||||
|
||||
let business = [manual, auto_cents].into_iter().flatten().min();
|
||||
// Baseline business discount for all company accounts (set on the discounts
|
||||
// page), alongside the per-company automated and negotiated layers.
|
||||
let business_global = product.business_sale_price_cents;
|
||||
let business = [manual, auto_cents, business_global]
|
||||
.into_iter()
|
||||
.flatten()
|
||||
.min();
|
||||
let priced = decide(regular, public, business);
|
||||
|
||||
PriceDetail {
|
||||
|
||||
Reference in New Issue
Block a user