Event quantity not returning when under 8
This commit is contained in:
@@ -66,12 +66,13 @@ function shoppingCartLineItem($name, $price, $description = '')
|
|||||||
function eventPricing($qty)
|
function eventPricing($qty)
|
||||||
{
|
{
|
||||||
$tableQty = 0;
|
$tableQty = 0;
|
||||||
$eventQty = 0;
|
|
||||||
|
|
||||||
// If pricing is 8 or more then we need to factor in table reservations
|
// If pricing is 8 or more then we need to factor in table reservations
|
||||||
if ($qty > 7) {
|
if ($qty > 7) {
|
||||||
$tableQty = (int) ($qty / 8);
|
$tableQty = (int) ($qty / 8);
|
||||||
$eventQty = $qty - ($tableQty * 8);
|
$eventQty = $qty - ($tableQty * 8);
|
||||||
|
}else {
|
||||||
|
$eventQty = $qty;
|
||||||
}
|
}
|
||||||
|
|
||||||
return [$tableQty, $eventQty];
|
return [$tableQty, $eventQty];
|
||||||
|
|||||||
Reference in New Issue
Block a user