modify_transaction(0, $bill_id, 1, $reserved_date, $newCheckinDate, $userid, $roomamt, $totsvc, $tottax, $roomamt, $totsvc, $tottax, 1, $rtid, '', $totamt, $curr); $newCheckinDate = date("Y-m-d", strtotime('+1 day', strtotime($newCheckinDate))); } } } } } } } else { if ($status == RES_ACTIVE && !$bill_id) { // Must create a Bill before recording the deposit $bill_id = create_reservation_bill($resid, $userid, $guestid); if ($bill_id) { if ($amt > 0) { if (!$deposit_made) { modify_receipt(0, $bill_id, 0, $resid, 0, $resdtime, $fop, $cctype, $ccnum, $expiry, $cvv, $auth, 'Reservation Deposit', $amt, $userid, '', 1, $currency, $currency); } if (isset($_POST['payinadvance']) && $resdetailID) { $ratedetails = array(); if ($ratesid) { get_rateitems($ratesid, $ratedetails); } $curr = get_Currency_byRateID($ratesid); //print_r($ratedetails); $roomamt = 0; $totamt = $roomamt; $totsvc = 0; $tottax = 0; $stdsvc = 0; $stdtax = 0; foreach ($ratedetails as $ratedetail) {
$ref_date = $_POST[$dt]; $cctp = "refcctype" . $i; $refcctype = $_POST[$cctp]; $rfop = "reffop" . $i; $reffop = $_POST[$rfop]; $rfamt = "refamount" . $i; $refamount = $_POST[$rfamt]; $rfcur = "refcur" . $i; $refcur = $_POST[$rfcur]; $userid = $_SESSION["userid"]; if ($refamount > 0) { $refamount = 0 - $refamount; } $linecr .= "Refund " . $i . " " . $refamount . " " . $reffop . " " . $refcur . "<br/>"; if ($reffop && $refamount && $refcur) { modify_receipt(0, $id, $bid, $rid, "", $ref_date, $reffop, $refcctype, "", "", "", "Refund", "Refund", $refamount, $userid, $today, 1, $refcur, $refcur); } } break; case 'Find': //check if user is searching using name, payrollno, national id number or other fields break; } } $bill = array(); $book = array(); $res = array(); // If the bill id is present get it and set the booking and reservations ids. if ($id) { if (get_bill($id, $bill)) { $bid = $bill['book_id'];