fixes to amounts
This commit is contained in:
@@ -343,9 +343,12 @@ export default defineComponent({
|
||||
},
|
||||
computed: {
|
||||
finalChargeAmount(): number {
|
||||
// If promo is active, use server-calculated totals (which include discounts)
|
||||
// If promo is active, use server-calculated totals with fees added
|
||||
if (this.promo_active && this.total_amount_after_discount > 0) {
|
||||
return this.total_amount_after_discount;
|
||||
let total = this.total_amount_after_discount;
|
||||
if (this.deliveryOrder.prime === 1) total += Number(this.pricing.price_prime);
|
||||
if (this.deliveryOrder.same_day === 1) total += Number(this.pricing.price_same_day);
|
||||
return total;
|
||||
}
|
||||
|
||||
// Otherwise, calculate locally
|
||||
|
||||
Reference in New Issue
Block a user