//before end and currrent date iss qual and now arrival is greater than to current $transfer= Reservation::UpdateTranfer($categoryname,$roomid,$fromdate,$todate,$Numberofdays,$nowamount,$reservationid); $transfer = Reservation::UpdateTranfer($categoryname, $roomid, $fromdate, $todate, $Numberofdays, $totalamount, $reservationid); $transferroom = new transferroom($reservationid, $fname, $lname, $roomnumber, $roomtype, $Rate, $datetransfer, $numberofdays, $payable, $status, $userInCharge); if ($end < $todate && $fromdate > $start && $fromdate < $promoto && $todate > $promofrom && $todate <= $promoto && $percent > 0) { // if ang departure is same xa old departure ug arrival mas daku xa old arrival if ($transfer) { if (Transaction::UpdateAmount($transactionamount, $fromdate, $reservationid)) { if ($transferroom->TransferRoom()) { echo 'true'; } } } } else { $transactionamount = $totalamount + $addonpayable - abs($downpayment); $transfer = Reservation::UpdateTranfer($categoryname, $roomid, $fromdate, $todate, $Numberofdays, $totalamount, $reservationid); $transferroom = new transferroom($reservationid, $fname, $lname, $roomnumber, $roomtype, $Rate, $datetransfer, $numberofdays, $payable, $status, $userInCharge); if ($transfer) { if (Transaction::UpdateAmount($transactionamount, $fromdate, $reservationid)) { if ($transferroom->TransferRoom()) { echo 'true'; } } } } } } } } } } }
<?php include '../../connection.php'; include '../class/transferroom.php'; if (isset($_GET['trid'])) { $trid = $_GET['trid']; if (transferroom::transferDelete($trid)) { echo '<script type="text/javascript">'; echo 'window.location.href = "../pages/transaction.php";'; echo '</script>'; } } else { echo '<script>alert("An error occured during the operation");</script>'; echo '<script type="text/javascript">'; echo 'window.location.href = "../pages/transaction.php";'; echo '</script>'; }