getValue('TSCN_CACHTINHPHUTHUTHEMNGUOI', $chinhanh_id); $arr_ts = $mTS->getThongTinTinhTienPhong($cty_id); $arr_price_early = $mTinhVaoSom->getToArray($cty_id); $arr_price_add = $mTinhQuaGio->getToArray($cty_id); while($rw=$conn->fetchRow($rs)){ $stt++; if($rw['KLT_HUYDATPHONG']==1){ $trangthai = "Đã hủy"; $thucte = " "; }elseif($rw['THUCTECHECKIN']!="" && $rw['THUCTECHECKOUT']!=""){ $trangthai = "Đã trả phòng"; $thucte = $rw['THUCTECHECKIN']." - ".$rw['THUCTECHECKOUT']; }elseif($rw['THUCTECHECKIN']!=""){ $trangthai = "Đã nhận phòng"; $thucte = $rw['THUCTECHECKIN']." - "; }else{ $trangthai = "Chưa nhận phòng"; $thucte = " "; } $tiencoc = " "; $sl_khach = $rw['KLT_SLKHACH']; $tongsokhach += $sl_khach; if($rw['TIENPHONG']!==null){ $tienphong = $rw['TIENPHONG']; $info_i = ""; }elseif($rw['STATUS']=='BOOK'){ $start_stay = $rw['KLT_THOIDIEMDATPHONG']; if($rw['KLT_THOIDIEMTRADUKIEN']==NULL || strtotime($rw['KLT_THOIDIEMTRADUKIEN']) > strtotime($search_denngay_db)){ $end_stay = date("Y-m-d",strtotime($search_denngay_db))." 12:00:00"; }else{ $end_stay = $rw['KLT_THOIDIEMTRADUKIEN']; } $tienphong = round((strtotime($end_stay)-strtotime($start_stay))/86400)*$rw['GIAPHONG']; }else{ $start_stay = $rw['KLT_THOIDIEMNHANPHONG']; if($rw['KLT_THOIDIEMTRADUKIEN']==NULL || strtotime($rw['KLT_THOIDIEMTRADUKIEN']) > strtotime($search_denngay_db)){ $end_stay = date("Y-m-d",strtotime($search_denngay_db))." 12:00:00"; }else{ $end_stay = $rw['KLT_THOIDIEMTRADUKIEN']; } $info_i = $start_stay." - ".$end_stay; $ph_id = $rw['KLT_IDPH']; $arr_giatheonguoi = $mGiaTheoNguoi->getGiaTheoNguoi($ph_id); $arr_price = $mPhong->getPriceToArray($ph_id,$rw['KLT_THOIDIEMNHANPHONG']); $arr_price['GIANGAY'] = $rw['GIAPHONG']; $arr_price['GIAQUADEM'] = $rw['GIAPHONG']; $songay_tinhkm = 0; $tinhthang = 0; $khuyenmai = $rw['KLT_KHUYENMAI']; $dvtkhuyenmai = $rw['KLT_DVTKHUYENMAI']; $slkhach = intval($rw['KLT_SLKHACH']); $baotratre = $rw['KLT_BAOTRATRE']; $klt_ext_info = $mKLT->get_ext_info($rw); $data = $mKLT->calcBalance($arr_ts, $arr_price,$arr_price_early, $arr_price_add, $start_stay,$end_stay,$arr_giatheonguoi,$slkhach,$cachtinhphuthuthemnguoi,0,$baotratre,0,$klt_ext_info); $tienphong = $data['first']['amount']; if(isset($data['middle'])){ $tienphong += $data['middle']['amount']; } if(isset($data['last'])){ $tienphong += $data['last']['amount']; } } $tong = $tienphong + $rw['TIENDICHVU']; $sum_tong += $tong; if($daidiennhom != $rw['KLT_DAIDIENNHOM']){ ?>
Ngày dự kiến đi: Từ    đến     
# Mã XN
(Confirm No)
Số TK
(Folio)
Số Phòng
(Room)
Loại phòng
(RType)
Tên khách
(Guest Name)
Tên công ty
(TA/Company)
Ngày đến
(Arival)
Ngày đi
(Departure)
Chú thích
(Notice)
KHÁCH ĐOÀN
  Không tìm thấy thông tin
  TỔNG CỘNG  
Tổng số:
Tổng số phòng (Total Room):
Tổng số khách (Total Guest):