Chọn thời gian
Ngày
 
fetchRow($rs)){ if($thutuphong==10 || $rw['LAU_ID']!=$lau_curr){ $thutuphong = 0; if($lau_curr!=0){ $dong++; } } if($rw['LAU_ID']!=$lau_curr){ $lau_curr = $rw['LAU_ID']; } $arr_data[$dong][$thutuphong] = $rw; $thutuphong++; } for($i=0;$i ".WebHelper::decodeSpecialChar($arr_data[$i][$j]['PH_TEN']).""; }else{ echo ""; } };?> 0){ $rw = $arr_data[$i][$j]; $tk_slkhach += $rw['SOKHACH']; $giaphong_int = 0; if($rw['IDKHDAIDIEN']!=null){ if(!isset($arr_doan[$rw['IDKHDAIDIEN']])){ $arr_doan[$rw['IDKHDAIDIEN']] =array( 'TEN'=> WebHelper::decodeSpecialChar($rw['TENKHDAIDIEN']), 'PHONG' => array('P' => 0, 'FOC' => 0, 'HDV' => 0, 'Free' => 0) ); } } if($rw['KLT_FOC']==1){ $giaphong = 'FOC'; $tk_foc++; if($rw['IDKHDAIDIEN']!=null){ $arr_doan[$rw['IDKHDAIDIEN']]['PHONG']['FOC']++; } }elseif($rw['KLT_HDV']==1){ $giaphong = 'HDV'; $tk_hdv++; if($rw['IDKHDAIDIEN']!=null){ $arr_doan[$rw['IDKHDAIDIEN']]['PHONG']['HDV']++; } }elseif($rw['GIAPHONG']==0){ $giaphong = 'Free'; $tk_free++; if($rw['IDKHDAIDIEN']!=null){ $arr_doan[$rw['IDKHDAIDIEN']]['PHONG']['Free']++; } }else{ $giaphong = WebHelper::format_vn_number($rw['GIAPHONG']/1000); $giaphong_int = intval($rw['GIAPHONG']); $tk_slphong++; if($rw['IDKHDAIDIEN']!=null){ $arr_doan[$rw['IDKHDAIDIEN']]['PHONG']['P']++; } } if(!isset($arr_theoloai_phongtheogia[$rw['PLP_LOAI']][$giaphong_int])){ $arr_theoloai_phongtheogia[$rw['PLP_LOAI']][$giaphong_int] = array(); $arr_theoloai_phongtheogia[$rw['PLP_LOAI']][$giaphong_int][] = $rw['PH_TEN']; }else{ $arr_theoloai_phongtheogia[$rw['PLP_LOAI']][$giaphong_int][] = $rw['PH_TEN']; } echo ""; }else{ echo ""; } };?> 0){ $phuthu = WebHelper::format_vn_number($arr_data[$i][$j]['PHUTHU']/1000); $tong_phuthu+= $phuthu; echo ""; }else{ echo ""; } };?> 0){ $sokhach = $arr_data[$i][$j]['SOKHACH']; echo ""; }else{ echo ""; } };?> 0){ if($arr_data[$i][$j]['THOIDIEMTRAPHONG']==NULL){ $songay = "1*"; }else{ $songay = round((strtotime($thoidiem_hetngay)-strtotime($arr_data[$i][$j]['KLT_THOIDIEMNHANPHONG']))/86400); if($songay==0){ $songay = 1; } } echo ""; }else{ echo ""; } };?>
 
Giá bán phòng ".$giaphong." 
Phụ thu ".$phuthu." 
Số khách ".$sokhach." 
Số ngày lưu trú ".$songay." 
Tổng số phòng: 0){ $arr_info[] = $tk_slphong."P"; } if($tk_foc>0){ $arr_info[] = $tk_foc."FOC"; } if($tk_free>0){ $arr_info[] = $tk_free."Free"; } if($tk_hdv>0){ $arr_info[] = $tk_hdv."HDV"; } echo implode(" + ", $arr_info); ?> Lũy kế phòng:
Tổng số khách lưu trú: Lũy kế khách:
 
A. TỔNG HỢP DOANH THU TRONG NGÀY
$arr_theo_gia){ if($loai==0){ foreach($arr_theo_gia as $gia_i=>$arr_phong){ $tong_sl_phong += count($arr_phong); $tong_tien_thue_phong += count($arr_phong)*$gia_i/1000; } }else{ foreach($arr_theo_gia as $gia_i=>$arr_phong){ $tong_sl_bung += count($arr_phong); $tong_tien_thue_bung += count($arr_phong)*$gia_i/1000; } } } $tong_sl_phong_and_bung = $tong_sl_phong+$tong_sl_bung; $tong_tien_phong_and_bung = $tong_tien_thue_phong+$tong_tien_thue_bung; $tongtien_dv = 0; $tongtien_dv_luyke = 0; $tien_dv_khac = 0; $tien_dv_khac_luyke = 0; foreach($arr_doanhthu_dichvu as $idldv=>$info){ $tongtien_dv+=$info['THANHTIEN']/1000; if($idldv==0){ $tien_dv_khac = $info['THANHTIEN']/1000; } } foreach($arr_doanhthu_dichvu_lk as $idldv=>$info){ $tongtien_dv_luyke+=$info['THANHTIEN']/1000; if($idldv==0){ $tien_dv_khac_luyke = $info['THANHTIEN']/1000; } } $tongtien_dv += $phuthuphong; $tongtien_dv_luyke += $phuthuphong_luyke; $tongthu_I_II = $tong_tien_phong_and_bung + $tongtien_dv; $tongthu_I_II_luyke = $arr_luyke['DOANHTHU_PHONG']+ $arr_luyke['DOANHTHU_BUNG'] + $tongtien_dv_luyke; ?> $arr_p){ $tt++; ?> $arr_p){ $tt++; ?> $info){ if($idldv!=0){ $stt_dv++; ?>
STT DIỄN GIẢI ĐVT Số lượng Đơn giá Thành tiền Lũy kế
  TỔNG DOANH THU (I + II)      
I Doanh thu thuê phòng và bungalows (1 + 2)    
1    Thuê phòng    
1.    
             
2    Thuê bungalows    
2.    
             
II Doanh thu các dịch vụ      
     
Phụ thu phòng      
Dich vụ khác      
 
B. THEO DÕI THANH TOÁN
$info){ ?>
$sl){ if($sl>0){ $info_p[] = $sl.$name_type; } } echo "".$stt_doan."/ ".$info['TEN'].": ".implode(' + ',$info_p);?>