Event quantity not returning when under 8

This commit is contained in:
Chris Smith
2019-03-04 16:27:22 -06:00
parent f0abcf9a7e
commit 588d5fd5c0

View File

@@ -66,12 +66,13 @@ function shoppingCartLineItem($name, $price, $description = '')
function eventPricing($qty)
{
$tableQty = 0;
$eventQty = 0;
// If pricing is 8 or more then we need to factor in table reservations
if ($qty > 7) {
$tableQty = (int) ($qty / 8);
$eventQty = $qty - ($tableQty * 8);
}else {
$eventQty = $qty;
}
return [$tableQty, $eventQty];