function getTotalBookingAmount($service, $guest, $gate, $stage, $food, $full, $amount, $setMenu) { $serv = explode('|', $service); $grandTotal = 0.0; $serviceTotal = 0.0; foreach ($serv as $s) { if ($s != 2) { $serviceTotal += (double) getServicePrice($s); } else { $serviceTotal += (double) (getServicePrice($s) * $guest); } } $gateTotal = getGateValue($gate); $stageTotal = getStageValue($stage); $setMenuTotal = getPriceSetMenu($setMenu); $foo = explode('|', $food); $foodTotal = 0.0; foreach ($foo as $f) { $foodTotal += (double) getFoodPrice($f); } $fullamount = 0.0; $j = 0; for ($i = 0; $i < count($full); $i++) { for ($j; $j < $i + 1; $j++) { $fullamount += (double) getFoodPrice($full[$i]) * $amount[$j]; } } $grandTotal = $serviceTotal + $gateTotal + $stageTotal + $foodTotal * $guest + $fullamount + $setMenuTotal * $guest; $vat = $grandTotal * 0.15; $grandTotal += $vat; return floor($grandTotal); }
echo SERVER; ?> /assets/img/food/<?php echo getFoodImage((int) $FoodAmount[0]); ?> " alt="<?php echo getFoodTitle((int) $FoodAmount[0]); ?> "/> </div> <h3><?php echo getFoodTitle((int) $FoodAmount[0]); ?> </h3> <div class="col-xs-7"><p><span>Price: ৳ <?php echo getFoodPrice((int) $FoodAmount[0]); ?> </span></p></div> <div class="col-xs-5"> <input type="number" name="amount[]" min="0" class="form-control" value="<?php echo $FoodAmount[1]; ?> " disabled="disabled"> </div> <br/><br/><br/> </label> <?php $count++; ?> </div> </div>