fetchRow($rs)){ $thu_vn += $rw['THU_VND']; $thu_usd += $rw['THU_USD']; $thu_vn_the += $rw['THU_VND_THE']; if($tachtranothe==1 && $rw['TRANOTHE']==1){ $arrTrNoThe[$ij] = $rw; $ij++; }else{ $khuyenmai_amount = $rw['KLT_TIENPHONG'] + $rw['TONGDICHVU'] + $rw['KLT_THUKHAC'] + $rw['KLT_TONGTIENPHONGKHAC'] - $rw['TRATRUOC'] - $rw['KLT_TRUKHAC'] - $rw['KLT_TONGTHANHTOAN']; $dichvu_khac = $rw['THU_DICHVUKS'] + $rw['KLT_THUKHAC'] - $rw['TONGGIAMTRU']; $sum_trukhac += $rw['KLT_TRUKHAC']; $tong_tien = $rw['THU_GIATUI'] + $rw['KLT_TIENPHONG'] + $dichvu_khac - $khuyenmai_amount - $rw['KLT_TRUKHAC']; $songay = intval((strtotime($rw['NGAYTRA']." 00:00:00") - strtotime($rw['NGAYNHAN']." 00:00:00"))/86400); $dichvu_giatui = $rw['THU_GIATUI']; $dichvu_tunhan = $rw['THU_TUNHAN']; $ghichu_tratruoc = ""; if($rw['BC_TRATRUOC']==1){ $dichvu_giatui = $rw['TRATRUOC_GIATUI']; $dichvu_tunhan = $rw['TRATRUOC_DICHVU']; $dichvu_quay = 0; $tratruoc_tienphong = $rw['TRATRUOC_PHONG'] ; $dichvu_khac = 0; $tong_tien = $dichvu_giatui + $tratruoc_tienphong + $dichvu_tunhan; $tong_tratruoc += $tong_tien; $dichvu_giamtru = 0; }else{ $dichvu_giatui = $dichvu_giatui - $rw['TRATRUOC_GIATUI_DABC']; $dichvu_tunhan = $dichvu_tunhan - $rw['TRATRUOC_DICHVU_DABC']; $dichvu_quay = $rw['THU_QUAY']; // $tong_tien = $tong_tien - $rw['TRATRUOC_PHONG_DABC'] - $rw['TRATRUOC_GIATUI_DABC']; $tong_tien = $rw['KLT_THANHTOAN_TM'] + $rw['TRATRUOC_TRONGNGAY'] + $rw['TRANOTM_TRONGNGAY']; if($rw['TRATRUOC_GIATUI_DABC']>0 || $rw['TRATRUOC_PHONG_DABC']>0 || $rw['TRATRUOC_DICHVU_DABC']>0){ $sotien_datratruoc = $rw['TRATRUOC_GIATUI_DABC'] + $rw['TRATRUOC_PHONG_DABC'] + $rw['TRATRUOC_DICHVU_DABC']; $tong_tratruoc_dabc += $sotien_datratruoc; $ghichu_tratruoc = "
Đã trả trước ".$webhelper->format_vn_number($sotien_datratruoc,0)."
"; } $dichvu_giamtru = $rw['TONGGIAMTRU']; } //$tong_tien+=$dichvu_tunhan; $sum_quay += $dichvu_quay; $sum_giatui += $dichvu_giatui; $sum_thukhac += $dichvu_khac; $sum_tongtien += $tong_tien; $sum_tunhan += $dichvu_tunhan; if($rw['PH_DOAN']!=1 || $dichvu_giatui>0 || $dichvu_khac!=0 || $tong_tien !=0 || $dichvu_tunhan > 0 || $rw['KLT_TRUKHAC']>0){ $count++; ?> fetchRow($rs_huydatphong_tm)){ $tientralai = $rw['KLT_TIENTRALAIKHACH']; $tong_tratruoc_dabc = $rw['TRATRUOC_PHONG_DABC'] + $rw['TRATRUOC_DICHVU_DABC'] + $rw['TRATRUOC_GIATUI_DABC']; if($tong_tratruoc_dabc >= $tientralai){ $bc_tralaikhach = $tientralai; }else{ $bc_tralaikhach = $tong_tratruoc_dabc; } if($bc_tralaikhach>0){ $thu_vn -= $bc_tralaikhach; $sum_trukhac += $bc_tralaikhach; $sum_tongtien -=$bc_tralaikhach; ?> =15 || $cty_id==4 || $cty_id==6){ if($conn->numRows($rs_ck)>0 || $conn->numRows($rs_huydatphong_ck)>0){ ?> fetchRow($rs_ck)){ $thu_vn += $rw['THU_VND']; $thu_usd += $rw['THU_USD']; $thu_vn_the += $rw['THU_VND_THE']; $khuyenmai_amount = $rw['KLT_TIENPHONG'] + $rw['TONGDICHVU'] + $rw['KLT_THUKHAC'] + $rw['KLT_TONGTIENPHONGKHAC'] - $rw['TRATRUOC'] - $rw['KLT_TRUKHAC'] - $rw['KLT_TONGTHANHTOAN']; $dichvu_khac = $rw['THU_DICHVUKS'] + $rw['KLT_THUKHAC'] - $rw['TONGGIAMTRU']; $sum_trukhac += $rw['KLT_TRUKHAC']; // $tong_tien = $rw['THU_GIATUI'] + $rw['KLT_TIENPHONG'] + $dichvu_khac - $khuyenmai_amount - $rw['KLT_TRUKHAC']; $songay = intval((strtotime($rw['NGAYTRA']." 00:00:00") - strtotime($rw['NGAYNHAN']." 00:00:00"))/86400); if($rw['BC_TRATRUOC']==1){ $dichvu_quay = 0; $dichvu_khac = 0; $dichvu_giatui = 0; $dichvu_tunhan = 0; $tong_tien = $rw['TRATRUOC_TRONGNGAY']; $tong_tratruoc += $tong_tien; $dichvu_giamtru = 0; }else{ $dichvu_giatui = $rw['THU_GIATUI']; $dichvu_tunhan = $rw['THU_TUNHAN']; $dichvu_quay = $rw['THU_QUAY']; $tong_tien = $rw['KLT_THANHTOAN_CK'] + $rw['TRANOCK_TRONGNGAY']; $dichvu_giamtru = $rw['TONGGIAMTRU']; } $sum_giatui += $dichvu_giatui; $sum_thukhac += $dichvu_khac; $sum_tongtien += $tong_tien; $sum_tunhan += $dichvu_tunhan; $sum_quay += $dichvu_quay; if($rw['PH_DOAN']!=1 || $dichvu_giatui>0 || $dichvu_khac!=0 || $tong_tien !=0 || $dichvu_tunhan > 0 || $rw['KLT_TRUKHAC']>0){ $count++; ?> fetchRow($rs_huydatphong_the)){ $count++; $tientralai = $rw['KLT_TIENTRALAIKHACH']; $tong_tratruoc_dabc = $rw['TRATRUOC_PHONG_DABC'] + $rw['TRATRUOC_DICHVU_DABC'] + $rw['TRATRUOC_GIATUI_DABC']; $bc_tralaikhach = $tientralai; if($bc_tralaikhach>0){ $thu_vn -= $bc_tralaikhach; $sum_trukhac += $bc_tralaikhach; $sum_tongtien -=$bc_tralaikhach; ?> numRows($rs_tranothe)>0 || $conn->numRows($rs_huydatphong_the)>0){ ?> fetchRow($rs_tranothe)){ $thu_vn += $rw['THU_VND']; $thu_usd += $rw['THU_USD']; $thu_vn_the += $rw['THU_VND_THE']; $khuyenmai_amount = $rw['KLT_TIENPHONG'] + $rw['TONGDICHVU'] + $rw['KLT_THUKHAC'] + $rw['KLT_TONGTIENPHONGKHAC'] - $rw['TRATRUOC'] - $rw['KLT_TRUKHAC'] - $rw['KLT_TONGTHANHTOAN']; $dichvu_khac = $rw['THU_DICHVUKS'] + $rw['KLT_THUKHAC'] - $rw['TONGGIAMTRU']; $sum_trukhac += $rw['KLT_TRUKHAC']; // $tong_tien = $rw['THU_GIATUI'] + $rw['KLT_TIENPHONG'] + $dichvu_khac - $khuyenmai_amount - $rw['KLT_TRUKHAC']; $songay = intval((strtotime($rw['NGAYTRA']." 00:00:00") - strtotime($rw['NGAYNHAN']." 00:00:00"))/86400); $dichvu_giatui = $rw['THU_GIATUI']; $dichvu_tunhan = $rw['THU_TUNHAN']; $dichvu_quay = $rw['THU_QUAY']; $ghichu_tratruoc = ""; $tong_tien = $rw['KLT_THANHTOAN2_HTTHE']; if($ownerConfig['tra_the_tinh_no'][$cty_id]===false){ $tong_tien += $rw['KLT_THANHTOAN_THE']; } $dichvu_giamtru = $rw['TONGGIAMTRU']; $sum_giatui += $dichvu_giatui; $sum_thukhac += $dichvu_khac; $sum_tongtien += $tong_tien; $sum_tunhan += $dichvu_tunhan; $sum_quay += $dichvu_quay; if($rw['PH_DOAN']!=1 || $dichvu_giatui>0 || $dichvu_khac!=0 || $tong_tien !=0 || $dichvu_tunhan > 0 || $rw['KLT_TRUKHAC']>0){ $count++; ?> fetchRow($rs_khachno)){ $khuyenmai_amount = $rw['KLT_TIENPHONG'] + $rw['TONGDICHVU'] + $rw['KLT_THUKHAC'] + $rw['KLT_TONGTIENPHONGKHAC'] - $rw['TRATRUOC'] - $rw['KLT_TRUKHAC'] - $rw['KLT_TONGTHANHTOAN']; $dichvu_khac = $rw['THU_DICHVUKS'] + $rw['KLT_THUKHAC'] - $rw['TONGGIAMTRU']; $dichvu_giamtru = $rw['TONGGIAMTRU']; $sum_trukhac+= $rw['KLT_TRUKHAC']; $tong_tien = $rw['THU_GIATUI'] + $rw['KLT_TIENPHONG'] + $dichvu_khac - $khuyenmai_amount - $rw['KLT_TRUKHAC']; $songay = intval((strtotime($rw['NGAYTRA']." 00:00:00") - strtotime($rw['NGAYNHAN']." 00:00:00"))/86400); $dichvu_giatui = $rw['THU_GIATUI']; $dichvu_tunhan = $rw['THU_TUNHAN']; $dichvu_giatui = $dichvu_giatui - $rw['TRATRUOC_GIATUI_DABC']; $dichvu_tunhan = $dichvu_tunhan - $rw['TRATRUOC_DICHVU_DABC']; // $tong_tien = $tong_tien - $rw['TRATRUOC_PHONG_DABC'] - $rw['TRATRUOC_GIATUI_DABC']; if($rw['TRATRUOC_GIATUI_DABC']>0 || $rw['TRATRUOC_PHONG_DABC']>0 || $rw['TRATRUOC_DICHVU_DABC']>0){ $sotien_datratruoc = $rw['TRATRUOC_GIATUI_DABC'] + $rw['TRATRUOC_PHONG_DABC'] + $rw['TRATRUOC_DICHVU_DABC']; $ghichu_tratruoc = "
Đã trả trước ".$webhelper->format_vn_number($sotien_datratruoc,0)."
"; }else{ $ghichu_tratruoc = ""; } $tong_tien = $rw['KLT_THANHTOAN_NO']; if($ownerConfig['tra_the_tinh_no'][$cty_id]){ $tong_tien += $rw['KLT_THANHTOAN_THE']; } if($cty_id==4){ $tong_tien += $rw['KLT_THANHTOAN_CK']; } $dichvu_quay = $rw['THU_QUAY']; $sum_giatui += $dichvu_giatui; $sum_thukhac += $dichvu_khac; // $sum_tongtien += $tong_tien; // $sum_notienphong += $tong_tien; $sum_tunhan += $dichvu_tunhan; $sum_quay += $dichvu_quay; $sum_tongtien_full += $tong_tien; if($rw['PHONGKHAC_DATHANHTOAN']!=1){ $sum_notienphong += $tong_tien; $sum_tongtien += $tong_tien; } if($rw['PH_DOAN']!=1 || $dichvu_giatui>0 || $dichvu_khac!=0 || $tong_tien !=0 || $dichvu_tunhan > 0 || $rw['KLT_TRUKHAC']>0){ $count++; ?> fetchRow($rs_khach_con_o)){ if(strtotime($search_ngay_db." ".$thoidiembaocao.":00")>strtotime(date('Y-m-d H:i:s'))){ $thoidiem_out = date('Y-m-d H:i:s'); $thoidiem_text = date('H:i:s d-m-Y'); }else{ $thoidiem_out = $search_ngay_db." ".$thoidiembaocao.":00"; $thoidiem_text = $thoidiembaocao.":00"." ".$search_ngay; } $uutiengio = $rw['KLT_UUTIENGIO']; $slkhach = $rw['KLT_SLKHACH']; $klt_ext_info = $model->get_ext_info($rw); if($cty_id==32 && $rw['KLT_CACHTINH']!=CACHTINH_GIAGIO){ if(strtotime($rw['KLT_THOIDIEMNHANPHONG'])>strtotime($search_ngay_db." 12:00:00")-86400){ $t_in = $rw['KLT_THOIDIEMNHANPHONG']; }else{ $t_in = date('Y-m-d H:i:s',strtotime($search_ngay_db." 12:00:00")-86400); } if($rw['KLT_THOIDIEMTRADUKIEN']==NULL){ $t_out = date('Y-m-d H:i:s',strtotime($search_ngay_db." 12:00:00")); }elseif(strtotime($rw['KLT_THOIDIEMTRADUKIEN'])>strtotime($search_ngay_db." 18:00:00")-86400){ $t_out = date('Y-m-d H:i:s',strtotime($search_ngay_db." 12:00:00")); }else{ $t_out = date('Y-m-d H:i:s',strtotime($search_ngay_db." 12:00:00")-86400); } if(strtotime($t_out)<=strtotime($t_in)){ continue; } $arrTienPhong = $model->calcTienPhong($rw['KLT_ID'],$rw['KLT_IDPH'],$slkhach,$cachtinhphuthuthemnguoi,$uutiengio,$t_in,$t_out,$rw['KLT_KHUYENMAI'].$rw['KLT_DVTKHUYENMAI'],$cty_id,$rw['KLT_BAOTRATRE'],$rw['KLT_TINHTUANTHANG'],$klt_ext_info); }else{ $arrTienPhong = $model->calcTienPhong($rw['KLT_ID'],$rw['KLT_IDPH'],$slkhach,$cachtinhphuthuthemnguoi,$uutiengio,$rw['KLT_THOIDIEMNHANPHONG'],$thoidiem_out,$rw['KLT_KHUYENMAI'].$rw['KLT_DVTKHUYENMAI'],$cty_id,$rw['KLT_BAOTRATRE'],$rw['KLT_TINHTUANTHANG'],$klt_ext_info); } $khuyenmai_amount = $arrTienPhong['khuyenmai']; $dichvu_khac = $rw['THU_DICHVUKS'] + $rw['KLT_THUKHAC'] - $rw['TONGGIAMTRU']; $dichvu_giamtru = $rw['TONGGIAMTRU']; $sum_trukhac += $rw['KLT_TRUKHAC']; $tong_tien = $rw['THU_GIATUI'] + $arrTienPhong['tienphong'] + $dichvu_khac - $khuyenmai_amount -$rw['KLT_TRUKHAC']; $songay = intval((strtotime($search_ngay_db." 00:00:00") - strtotime($rw['NGAYNHAN']." 00:00:00"))/86400); $dichvu_giatui = $rw['THU_GIATUI']; $dichvu_tunhan = $rw['THU_TUNHAN']; $dichvu_quay = $rw['THU_QUAY']; $dichvu_giatui = $dichvu_giatui - $rw['TRATRUOC_GIATUI_DABC']; $dichvu_tunhan = $dichvu_tunhan - $rw['TRATRUOC_DICHVU_DABC']; if($cty_id!=32 || $rw['KLT_CACHTINH']==CACHTINH_GIAGIO){ $tong_tien = $tong_tien - $rw['TRATRUOC_PHONG_DABC'] - $rw['TRATRUOC_GIATUI_DABC']; } if($rw['TRATRUOC_GIATUI_DABC']>0 || $rw['TRATRUOC_PHONG_DABC']>0 || $rw['TRATRUOC_DICHVU_DABC']>0){ $sotien_datratruoc = $rw['TRATRUOC_GIATUI_DABC'] + $rw['TRATRUOC_PHONG_DABC'] + $rw['TRATRUOC_DICHVU_DABC']; $ghichu_tratruoc = "
Đã trả trước ".$webhelper->format_vn_number($sotien_datratruoc,0)."
"; }else{ $ghichu_tratruoc = ""; } $tong_tien+=$dichvu_tunhan; $sum_giatui += $dichvu_giatui; $sum_thukhac += $dichvu_khac; $sum_tongtien += $tong_tien; $sum_tien_o_lai+=$tong_tien; $sum_tunhan += $dichvu_tunhan; $sum_quay += $dichvu_quay; if($rw['PH_DOAN']!=1 || $dichvu_giatui>0 || $dichvu_khac!=0 || $tong_tien !=0 || $dichvu_tunhan > 0 || $rw['KLT_TRUKHAC']>0){ $count++; ?> strtotime(date('Y-m-d H:i:s'))){ $thoidiem_text = date('H:i:s')." ngày ".date('d-m-Y'); }else{ $thoidiem_text = $thoidiembaocao.":00 ngày ".$search_ngay; } ?> fetchRow($rs_khach_moi)){ if(strtotime($search_ngay_db." ".$thoidiembaocao.":00")>strtotime(date('Y-m-d H:i:s'))){ $thoidiem_out = date('Y-m-d H:i:s'); $thoidiem_text = date('H:i:s d-m-Y'); }else{ $thoidiem_out = $search_ngay_db." ".$thoidiembaocao.":00"; $thoidiem_text = $thoidiembaocao.":00 ".$search_ngay; } $uutiengio = $rw['KLT_UUTIENGIO']; $slkhach = $rw['KLT_SLKHACH']; $klt_ext_info = $model->get_ext_info($rw); $arrTienPhong = $model->calcTienPhong($rw['KLT_ID'],$rw['KLT_IDPH'],$slkhach,$cachtinhphuthuthemnguoi,$uutiengio,$rw['KLT_THOIDIEMNHANPHONG'],$thoidiem_out,$rw['KLT_KHUYENMAI'].$rw['KLT_DVTKHUYENMAI'],$cty_id,$rw['KLT_BAOTRATRE'],$rw['KLT_TINHTUANTHANG'],$klt_ext_info); $khuyenmai_amount = $arrTienPhong['khuyenmai']; $dichvu_khac = $rw['THU_DICHVUKS'] + $rw['KLT_THUKHAC'] - $rw['TONGGIAMTRU']; $dichvu_giamtru = $rw['TONGGIAMTRU']; $sum_trukhac += $rw['KLT_TRUKHAC']; $tong_tien = $rw['THU_GIATUI'] + $arrTienPhong['tienphong'] + $dichvu_khac - $khuyenmai_amount - $rw['KLT_TRUKHAC']; $songay = intval((strtotime($search_ngay_db." 00:00:00") - strtotime($rw['NGAYNHAN']." 00:00:00"))/86400); $dichvu_giatui = $rw['THU_GIATUI']; $dichvu_tunhan = $rw['THU_TUNHAN']; $dichvu_quay = $rw['THU_QUAY']; $dichvu_giatui = $dichvu_giatui - $rw['TRATRUOC_GIATUI_DABC']; $dichvu_tunhan = $dichvu_tunhan - $rw['TRATRUOC_DICHVU_DABC']; $tong_tien = $tong_tien - $rw['TRATRUOC_PHONG_DABC'] - $rw['TRATRUOC_GIATUI_DABC']; if($rw['TRATRUOC_GIATUI_DABC']>0 || $rw['TRATRUOC_PHONG_DABC']>0 || $rw['TRATRUOC_DICHVU_DABC']>0){ $sotien_datratruoc = $rw['TRATRUOC_GIATUI_DABC'] + $rw['TRATRUOC_PHONG_DABC'] + $rw['TRATRUOC_DICHVU_DABC']; $ghichu_tratruoc = "
Đã trả trước ".$webhelper->format_vn_number($sotien_datratruoc,0)."
"; }else{ $ghichu_tratruoc = ""; } $tong_tien+=$dichvu_tunhan; $sum_giatui += $dichvu_giatui; $sum_thukhac += $dichvu_khac; $sum_tongtien += $tong_tien; $sum_tunhan += $dichvu_tunhan; $sum_quay += $dichvu_quay; if($rw['PH_DOAN']!=1 || $dichvu_giatui>0 || $dichvu_khac!=0 || $tong_tien !=0 || $dichvu_tunhan > 0 || $rw['KLT_TRUKHAC']>0){ $count++; ?> fetchRow($rsthu)){ $count++; $tong_thu_khac += $rw['THU_SOTIEN']; ?> fetchRow($rschi)){ $count++; $tong_chi += $rw['CP_SOTIEN']; ?> fetchRowToArray('TIENTE_ID', 'TIENTE_TEN','',$cty_id); $arr_ngoaite = array(); foreach($arrTienTe as $i=>$info){ $arr_ngoaite[$info['value']] = array( 'NAME'=>$info['text'], 'THUTRONGCA'=>0, 'BANTRONGCA'=>0 ); } $arr_thu_nte = $mThuDoiNgoaiTe->getThuNgoaiTe($chinhanh_id,$bc_from_time,$bc_to_time); foreach($arr_thu_nte as $idnte=>$sotien_nt){ $arr_ngoaite[$idnte]['THUTRONGCA'] = $sotien_nt; } $arr_ban_nte = $mThuDoiNgoaiTe->getChiNgoaiTe($chinhanh_id,$bc_from_time,$bc_to_time); foreach($arr_ban_nte as $idnte=>$sotien_nt){ $arr_ngoaite[$idnte]['BANTRONGCA'] = $sotien_nt; } $thu_ban_ngoai_te = $mThuDoiNgoaiTe->getChiVND($chinhanh_id, $bc_from_time,$bc_to_time); $chi_mua_ngoai_te = $mThuDoiNgoaiTe->getThuVND($chinhanh_id, $bc_from_time,$bc_to_time); ?>
(Thời gian báo cáo được tính từ ngày hôm trước đến của ngày báo cáo)    Ngày " value="" name="txtSearch_Ngay" id="txtSearch_Ngay" readonly="readonly"/>    
THU NGÀY (TM)
# Phòng Vào Ra Ngày Đ.Giá Giặt ủi D.vụ khác Nước Tiền quầy Trừ khác Thu Khách hàng Giảm giá Ghi chú
decodeSpecialChar($rw['PH_TEN'])." (".$rw['KLT_SOHD'].") ";?>
 
format_vn_number($rw['GIAPHONG_NGAY'],0);?> format_vn_number($dichvu_giatui,0);?> format_vn_number($dichvu_khac,0);?> format_vn_number($dichvu_tunhan,0);?> format_vn_number($dichvu_quay,0);?> format_vn_number($rw['KLT_TRUKHAC'],0);?> format_vn_number($tong_tien,0);?> decodeSpecialChar($rw['KH_TEN']);?> 100){ echo $webhelper->format_vn_number($rw['KLT_KHUYENMAI'],0); }elseif($rw['KLT_KHUYENMAI']>0){ echo $rw['KLT_KHUYENMAI'].$rw['KLT_DVTKHUYENMAI'];};?> ".$webhelper->decodeSpecialChar($rw['KLT_SOHOADONGTGT']).""; } if($rw['LOAINO']==2){ echo "
Trả nợ
"; } if($rw['BC_TRATRUOC']==1){ if($tong_tien>0){ echo "
Trả trước
"; }else{ echo "
Hoàn cọc
"; } } if($dichvu_giamtru>0){ echo "
Giảm trừ: ".WebHelper::format_vn_number($dichvu_giamtru,0)."
"; } if($rw['TENPHONG_THANHTOAN']!=null){ echo "
P.".$rw['TENPHONG_THANHTOAN']." t.toán
"; } echo $ghichu_tratruoc; echo $webhelper->decodeSpecialChar($rw['KLT_GHICHU']); ?>
decodeSpecialChar($rw['PH_TEN'])." (".$rw['KLT_SOHD'].") ";?>             format_vn_number($bc_tralaikhach,0);?> -format_vn_number($bc_tralaikhach,0);?> decodeSpecialChar($rw['KH_TEN']);?>   format_vn_number($rw['TRATRUOC'],0).", trả lại khách hôm nay: ".$webhelper->format_vn_number($tientralai,0).", đã báo cáo: ".$webhelper->format_vn_number($tong_tratruoc_dabc,0).")";?>
')"> 
 
            format_vn_number($thu_dichvule,0);?>     format_vn_number($thu_dichvule,0);?> Tiền bán lẻ dịch vụ    
  Không tìm thấy thông tin.
  Tổng cộng format_vn_number($sum_giatui,0);?> format_vn_number($sum_thukhac,0);?> format_vn_number($sum_tunhan,0);?> format_vn_number($sum_quay,0);?> format_vn_number($sum_trukhac,0);?> format_vn_number($sum_tongtien,0);?>      
THU CHUYỂN KHOẢN (CK)
# Phòng Vào Ra Ngày Đ.Giá Giặt ủi D.vụ khác Nước Tiền quầy Trừ khác Thu Khách hàng Giảm giá Ghi chú
decodeSpecialChar($rw['PH_TEN'])." (".$rw['KLT_SOHD'].") ";?>
 
format_vn_number($rw['GIAPHONG_NGAY'],0);?> format_vn_number($dichvu_giatui,0);?> format_vn_number($dichvu_khac,0);?> format_vn_number($dichvu_tunhan,0);?> format_vn_number($dichvu_quay,0);?> format_vn_number($rw['KLT_TRUKHAC'],0);?> format_vn_number($tong_tien,0);?> decodeSpecialChar($rw['KH_TEN']);?> 100){ echo $webhelper->format_vn_number($rw['KLT_KHUYENMAI'],0); }elseif($rw['KLT_KHUYENMAI']>0){ echo $rw['KLT_KHUYENMAI'].$rw['KLT_DVTKHUYENMAI'];};?> ".$webhelper->decodeSpecialChar($rw['KLT_SOHOADONGTGT']).""; } if($rw['LOAINO']==2){ echo "
Trả nợ
"; } if($rw['BC_TRATRUOC']==1){ echo "
Trả trước
"; } if($dichvu_giamtru>0){ echo "
Giảm trừ: ".WebHelper::format_vn_number($dichvu_giamtru,0)."
"; } if($rw['TENPHONG_THANHTOAN']!=null){ echo "
P.".$rw['TENPHONG_THANHTOAN']." t.toán
"; } echo $webhelper->decodeSpecialChar($rw['KLT_GHICHU']); ?>
decodeSpecialChar($rw['PH_TEN'])." (".$rw['KLT_SOHD'].") ";?>             format_vn_number($bc_tralaikhach,0);?> -format_vn_number($bc_tralaikhach,0);?> decodeSpecialChar($rw['KH_TEN']);?>   format_vn_number($rw['TRATRUOC'],0).", trả lại khách hôm nay: ".$webhelper->format_vn_number($tientralai,0).", đã báo cáo: ".$webhelper->format_vn_number($tong_tratruoc_dabc,0).")";?>
  Không tìm thấy thông tin.
  Tổng cộng format_vn_number($sum_giatui,0);?> format_vn_number($sum_thukhac,0);?> format_vn_number($sum_tunhan,0);?> format_vn_number($sum_quay,0);?> format_vn_number($sum_trukhac,0);?> format_vn_number($sum_tongtien,0);?>      
KHÁCH TRẢ THẺ NGÀY
# Phòng Vào Ra Ngày Đ.Giá Giặt ủi D.vụ khác Nước Tiền quầy Trừ khác Thu Khách hàng Giảm giá Ghi chú
decodeSpecialChar($rw['PH_TEN'])." (".$rw['KLT_SOHD'].") ";?>
 
format_vn_number($rw['GIAPHONG_NGAY'],0);?> format_vn_number($dichvu_giatui,0);?> format_vn_number($dichvu_khac,0);?> format_vn_number($dichvu_tunhan,0);?> format_vn_number($dichvu_quay,0);?> format_vn_number($rw['KLT_TRUKHAC'],0);?> format_vn_number($tong_tien,0);?> decodeSpecialChar($rw['KH_TEN']);?> 100){ echo $webhelper->format_vn_number($rw['KLT_KHUYENMAI'],0); }elseif($rw['KLT_KHUYENMAI']>0){ echo $rw['KLT_KHUYENMAI'].$rw['KLT_DVTKHUYENMAI'];};?> ".$webhelper->decodeSpecialChar($rw['KLT_SOHOADONGTGT']).""; } if($rw['LOAINO']==2){ echo "
Trả nợ
"; } // if($rw['BC_TRATRUOC']==1){ // echo "
Trả trước
"; // } if($dichvu_giamtru>0){ echo "
Giảm trừ: ".WebHelper::format_vn_number($dichvu_giamtru,0)."
"; } if($rw['TENPHONG_THANHTOAN']!=null){ echo "
P.".$rw['TENPHONG_THANHTOAN']." t.toán
"; } echo $ghichu_tratruoc; echo $webhelper->decodeSpecialChar($rw['KLT_GHICHU']); ?>
  Không tìm thấy thông tin.
  Tổng cộng format_vn_number($sum_giatui,0);?> format_vn_number($sum_thukhac,0);?> format_vn_number($sum_tunhan,0);?> format_vn_number($sum_quay,0);?> format_vn_number($sum_trukhac,0);?> format_vn_number($sum_tongtien,0);?>      
KHÁCH NỢ NGÀY
# Phòng Vào Ra Ngày Đ.Giá Giặt ủi D.vụ khác Nước Tiền quầy Trừ khác Nợ Khách hàng Giảm giá Ghi chú
decodeSpecialChar($rw['PH_TEN'])." (".$rw['KLT_SOHD'].") ";?>
 
format_vn_number($rw['GIAPHONG_NGAY'],0);?> format_vn_number($dichvu_giatui,0);?> format_vn_number($dichvu_khac,0);?> format_vn_number($dichvu_tunhan,0);?> format_vn_number($dichvu_quay,0);?> format_vn_number($rw['KLT_TRUKHAC'],0);?> >format_vn_number($tong_tien,0);?> decodeSpecialChar($rw['KH_TEN']);?> 100){ echo $webhelper->format_vn_number($rw['KLT_KHUYENMAI'],0); }elseif($rw['KLT_KHUYENMAI']>0){ echo $rw['KLT_KHUYENMAI'].$rw['KLT_DVTKHUYENMAI'];};?> ".$webhelper->decodeSpecialChar($rw['KLT_SOHOADONGTGT']).""; } if($rw['KLT_THANHTOAN_CK']>0){ echo "
Chuyển khoản
"; } if($rw['KLT_THANHTOAN_THE']>0){ echo "
Nợ thẻ
"; } echo $ghichu_tratruoc; if($dichvu_giamtru>0){ echo "
Giảm trừ: ".WebHelper::format_vn_number($dichvu_giamtru,0)."
"; } if($rw['PHONG_THANHTOAN']!=null && $rw['PHONG_THANHTOAN']!=""){ $note_pay = ""; if($rw['PHONGKHAC_DATHANHTOAN']==1){ $note_pay = ", đã thanh toán"; } echo "
Chuyển vào P.".$rw['PHONG_THANHTOAN'].$note_pay."
"; } echo $webhelper->decodeSpecialChar($rw['KLT_GHICHU']); ?>
  Không tìm thấy thông tin.
  Tổng cộng format_vn_number($sum_giatui,0);?> format_vn_number($sum_thukhac,0);?> format_vn_number($sum_tunhan,0);?> format_vn_number($sum_quay,0);?> format_vn_number($sum_trukhac,0);?> format_vn_number($sum_tongtien_full,0);?>
format_vn_number($sum_tongtien,0);?>
     
KHÁCH CÒN Ở LẠI NGÀY
# Phòng Vào Ra Ngày Đ.Giá Giặt ủi D.vụ khác Nước Tiền quầy Trừ khác Thành tiền Khách hàng Giảm giá Ghi chú
decodeSpecialChar($rw['PH_TEN'])." (".$rw['KLT_SOHD'].") ";?> format_vn_number($rw['GIAPHONG_NGAY'],0);?> format_vn_number($dichvu_giatui,0);?> format_vn_number($dichvu_khac,0);?> format_vn_number($dichvu_tunhan,0);?> format_vn_number($dichvu_quay,0);?> format_vn_number($rw['KLT_TRUKHAC'],0);?> format_vn_number($tong_tien,0);?> decodeSpecialChar($rw['KH_TEN']);?> 100){ echo $webhelper->format_vn_number($rw['KLT_KHUYENMAI'],0); }elseif($rw['KLT_KHUYENMAI']>0){ echo $rw['KLT_KHUYENMAI'].$rw['KLT_DVTKHUYENMAI'];};?> decodeSpecialChar($rw['KLT_GHICHU']); if($dichvu_giamtru>0){ echo "
Giảm trừ: ".WebHelper::format_vn_number($dichvu_giamtru,0)."
"; }?>
  Không tìm thấy thông tin.
  Tổng cộng format_vn_number($sum_giatui,0);?> format_vn_number($sum_thukhac,0);?> format_vn_number($sum_tunhan,0);?> format_vn_number($sum_quay,0);?> format_vn_number($sum_trukhac,0);?> format_vn_number($sum_tongtien,0);?>      
KHÁCH MỚI NHẬN PHÒNG TRONG NGÀY  (Tính đến ,Tính doanh thu cho ngày hôm sau)
# Phòng Vào Ra Ngày Đ.Giá Giặt ủi D.vụ khác Nước Tiền quầy Trừ khác Thu Khách hàng Giảm giá Ghi chú
decodeSpecialChar($rw['PH_TEN'])." (".$rw['KLT_SOHD'].") ";?> format_vn_number($rw['GIAPHONG_NGAY'],0);?> format_vn_number($dichvu_giatui,0);?> format_vn_number($dichvu_khac,0);?> format_vn_number($dichvu_tunhan,0);?> format_vn_number($dichvu_quay,0);?> format_vn_number($rw['KLT_TRUKHAC'],0);?> format_vn_number($tong_tien,0);?> decodeSpecialChar($rw['KH_TEN']);?> 100){ echo $webhelper->format_vn_number($rw['KLT_KHUYENMAI'],0); }elseif($rw['KLT_KHUYENMAI']>0){ echo $rw['KLT_KHUYENMAI'].$rw['KLT_DVTKHUYENMAI'];};?> decodeSpecialChar($rw['KLT_GHICHU']); if($dichvu_giamtru>0){ echo "
Giảm trừ: ".WebHelper::format_vn_number($dichvu_giamtru,0)."
"; } ?>
  Không tìm thấy thông tin.
  Tổng cộng format_vn_number($sum_giatui,0);?> format_vn_number($sum_thukhac,0);?> format_vn_number($sum_tunhan,0);?> format_vn_number($sum_quay,0);?> format_vn_number($sum_trukhac,0);?> format_vn_number($sum_tongtien,0);?>      
THU KHOẢN KHÁC TRONG NGÀY
# Nội dung Ghi chú   Số tiền        
decodeSpecialChar($rw['THU_NOIDUNG']);?> format_vn_number($rw['THU_SOTIEN'],0);?>        
  Không tìm thấy thông tin.
  Tổng cộng format_vn_number($tong_thu_khac,0);?>        
CHI TRONG NGÀY
# Nội dung Ghi chú   Số tiền          
decodeSpecialChar($rw['CP_NOIDUNG']);?> format_vn_number($rw['CP_SOTIEN'],0);?>          
  Không tìm thấy thông tin.
  Tổng cộng format_vn_number($tong_chi,0);?>          
$info){ ?>
THU ĐỔI NGOẠI TỆ TRONG NGÀY
Ngoại tệ Thu mua trong ngày Bán trong ngày
Chi mua ngoại tệ:
Thu bán ngoại tệ:
TỔNG HỢP THU/CHI TRONG NGÀY:
".$webhelper->format_vn_number($tongdoanhthu_ngay,0)." ". CURRENCY_NAME." (".$ghichu_doanhthu.")"; ?>
format_vn_number($tongthu_ngay,0)." ". CURRENCY_NAME ."(".$ghichu_thucthu.")"; // if($thu_vn_the!=0){ // echo " (bao gồm trả qua thẻ: ".$webhelper->format_vn_number($thu_vn_the,0)." ".CURRENCY_NAME.")"; // } ?>
format_vn_number($tong_chi + $chi_mua_ngoai_te,0);?>
format_vn_number($thu_chi,0);?>
format_vn_number($sum_notienphong,0);?>