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); }
<table class="table table-bordered"> <tr> <th class="text-center">Service</th> <th class="text-center">Price</th> </tr> <?php $countserv = 1; foreach ($service as $se) { ?> <tr> <td><?php echo getServiceName((int) $se); ?> </td> <td class="text-right">৳ <?php echo getServicePrice((int) $se); ?> </td> </tr> <?php } ?> </table> </div> <div class="col-sm-6"></div> </div> </div> <?php if ($book['g_title'] != null) { ?> <div class="row">