ÿØÿà 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/admin/res_hotel/ |
Upload File : |
<?php /* * * 호텔상품예약 > 호텔상품예약 ajax * */ include "../include/top_proc.html"; // 파라메터 $SqlType=$SqlType; $res_no=$res_no; $lang=$lang; $curunit=$curunit; $class_HotelReserv = new HotelReserv(); $class_AccountCustomer = new AccountCustomer(); // 정산 정보 업데이트 $class_AccountCustomer->account_customer_check($res_no); // 예약정보 $data = $class_HotelReserv->res_hotel_master(" and res_no='{$res_no}' "); $row = $class_HotelReserv->res_hotel_master_replace($data[0]); // 예약상태 $res_type_arr = base_codec("PRD","RES"); // 관리자목록 $admin_arr = member_fetch(" and mb_level <= 10 "); // 예약수정시에 // 호텔예약시 호텔정보(TB_HOTEL,TB_TOHEL_DATE...)가 연결되어있으면 "예약변경"버튼으로 예약수정 // 호텔예약시 호텔정보없이 예약생성한 경우는 모든 항목을 수정할 수있도록. $is_edit_hotel=true; // 수정가능 if($row['hseq'] or $row['ridx']) $is_edit_hotel=false; // 수정불가 //2019-11-26 실무용 바우처번호 생성 if(!$row['rsv_no']) { $row['rsv_no'] = auto_create_voucher("L",$row['ins_dt']); } ?> <script type="text/javascript"> var mode=''; // hotelResReg.js에 호텔/룸정보 불러와서 이용일자/가격 세팅하는 부분(mode='hotel') var hseq='<?=$hseq?>' , ridx='<?=$ridx?>'; var person_max_price=parseInt('<?=$row_date['person_max_price']?>'); var person_max_price_fr=parseInt('<?=$row_date['person_max_price_fr']?>'); var __ma1HotelJob=function(){ //성인/소인 숙박인원 인원수 세팅 ckSelAdultChild(); //입실일/숙박일수 에 따른 항목생성 ckRoomDateOut(); // 숙박자 입력목록 세팅 ckRoomPersonIns(); // 공급가 소계 $("input[name='buy_price_arr[]']").each(function(){ dateDwLine($(this)); }); // 거래처가 소계 $("input[name='agent_price_arr[]']").each(function(){ dateDwLine($(this)); }); // 판매가 소계 $("input[name='sell_price_arr[]']").each(function(){ dateDwLine($(this)); }); } $(function(){ // 입실/퇴실일 계산 //ckRoomDateOut(); // 추가항목 항목추가 $(".itemBtnAddOnPriceRow").on("click",function(){ addRowItem(); }); // 2019-10-17 조식항목 추가 $(".itemBtnAddOnBFRow").on("click",function(){ addRowItemBF(); }); // 추가항목 전체선택 $(".item_checkbox_ckall").on("click",function(){ $(".itemCheckBoxAddOn").prop("checked",$(this).prop("checked")); }); // 추가항목 선택항목 삭제 $(".itemBtnDelPriceRow").on("click",function(){ $(".itemCheckBoxAddOn").each(function(){ if($(this).prop("checked")==true) { delRowItem($(this).parent().parent().find("td").last().children()); // 추가항목 삭제 } }); }); // 공급가 / 판매가할인 $(".itemTableTrDiscount .itemInput").on("blur",function(){ var r=dateDwCal38();// 전체금액 계산 }); // 옵션상품 소계 $(".itemTableTrOption .itemInput").on("blur",function(){ dateDwLineOption($(this)); }); // 공급가/거래처가/판매가 소계 $(".itemTableTrRoom input[name='buy_price_arr[]']").on("blur",function(){ dateDwLine($(this)); }); $(".itemTableTrRoom input[name='agent_price_arr[]']").on("blur",function(){ dateDwLine($(this)); }); $(".itemTableTrRoom input[name='sell_price_arr[]']").on("blur",function(){ dateDwLine($(this)); }); $(".itemTableTrRoom input[name='i_count_arr[]']").on("blur",function(){ dateDwLine($(this)); }); // 조식 공급가/거래처가/판매가 소계 $(".itemTableTrAddOn input[name='buy_price_arr[]']").on("blur",function(){ dateDwLine($(this)); }); $(".itemTableTrAddOn input[name='agent_price_arr[]']").on("blur",function(){ dateDwLine($(this)); }); $(".itemTableTrAddOn input[name='sell_price_arr[]']").on("blur",function(){ dateDwLine($(this)); }); $(".itemTableTrAddOn input[name='i_count_arr[]']").on("blur",function(){ dateDwLine($(this)); }); }); //2019-10-17 조식 추가 function addRowItemBF() { var _tmp = _HTML_ADDON_PRICE.replace('{INPUT}','<input type="checkbox" name="" class="itemCheckBoxAddOn" value="">'); _tmp = _tmp.replace('{TITLE}','<input type="hidden" name="gu_arr[]" value="B"><input name="itemnm_arr[]" type="text" class="input_text" style="text-align:center;" value="조식" size="8" hname="조식항목" required readonly>'); _tmp = _tmp.replace('{DATE}','<input name="room_date_arr[]" type="text" class="cal_input" value="'+cur_date()+'" readonly onclick="AjaxCal(this,event)" size="13" hname="이용일자" required>'); _tmp = _tmp.replace('{COUNT}','<input type="text" class="input_text item_count" name="i_count_arr[]" size="4" maxlength="3" value="0" style="text-align:center;ime-mode:disabled;" onkeydown="ChkNum(this,event);">'); _tmp = _tmp.replace('{COST_PRICE}',0); _tmp = _tmp.replace('{AGENT_PRICE}',0); _tmp = _tmp.replace('{SELL_PRICE}',0); _tmp = _tmp.replace('{SELL_PRICE_FR}',0); _tmp = _tmp.replace('{CLASS}','itemTableTrAddOn'); _tmp = _tmp.replace('{CONTROL_BTN}','<input type="button" class="Table_btn blue" value="삭제" onclick="deleteLine(this);">'); htmlStr = _tmp; $(".item_addon_price_box tbody").append(htmlStr); // 매입가/거래처가/판매가 소계 $(".itemTableTrAddOn input[name='buy_price_arr[]']").on("blur",function(){ dateDwLine($(this)); }); $(".itemTableTrAddOn input[name='agent_price_arr[]']").on("blur",function(){ dateDwLine($(this)); }); $(".itemTableTrAddOn input[name='sell_price_arr[]']").on("blur",function(){ dateDwLine($(this)); }); $(".itemTableTrAddOn input[name='i_count_arr[]']").on("blur",function(){ dateDwLine($(this)); }); // 추가항목 삭제 $(".itemButtonDelRow").on("click",function(){ delRowItem($(this));// 추가항목 삭제 }); } function deleteLine(obj) { var tr = $(obj).parent().parent(); //라인 삭제 tr.remove(); // 전체금액 계산 var r=dateDwCal38(); } </script> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td valign="top" colspan="3"> <table width="100%" border="0" cellspacing="0" cellpadding="0" class="setting_write"> <tbody> <tr> <th width="100">접수번호</th> <td><?=$row['res_no']?></td> <th width="100">바우처번호</th> <td><input type="text" class="input_text" name="rsv_no" id="rsv_no" value="<?=$row['rsv_no']?>" size="30"></td> <th width="100" style="color:red;font-weight:500">*호텔예약번호</th> <td><input type="text" class="input_text" name="hotel_voucher" id="hotel_voucher" value="<?=$row['hotel_voucher']?>" size="30"></td> </tr> </tbody> </table> </td> </tr> <tr> <td valign="top" colspan="3" height="15"></td> </tr> <tr> <td valign="top" colspan="3"> <div class="pop_title"><div class="lo_left">예약상태 <span style="font-weight:normal;">※ <input name="" class="Table_btn red" type="button" value="자동발송"> 자동발송 <input name="" class="Table_btn" type="button" value="직접발송"> 수동발송 <input name="" class="Table_btn green" type="button" value="반자동발송"> 문자발송</span> <span style='color:#cf2d36;'> (※ 아래 "진행순서" 버튼을 신중하게 체크해주시고 "저장" 버튼을 누르세요.)</span> </div> <div class="r_btn"> <?=$row['res_stat_str']?> <? if ($row['res_stat_cd'] != "D" ) { ?> <? if ($row['res_stat_cd'] == "R" ) { // 대기상태(R)?> <input type="button" value="예약확정" class="Table_btn red" onclick="if(!confirm('예약확정 하시겠습니까?'))return;ajax_loader('../res_hotel/hotelResProc.html?SqlType=res_roomdate_fix&res_no=<?=$res_no?>');"> <? } ?> <input type="button" value="예약취소" class="Table_btn gray" onclick="if(!confirm('정말 취소하시겠습니까?'))return;ajax_loader('../res_hotel/hotelResProc.html?SqlType=res_roomdate_delete&res_no=<?=$res_no?>');"> <? } ?> </div> </td> </tr> <tr> <td valign="top" colspan="3"> <table width="100%" border="0" cellspacing="0" cellpadding="0" class="setting_write"> <tbody> <tr style="text-align:center;"> <th width="100">진행순서</th> <?for($i=0 ; $i<count($res_type_arr); $i++) { $arr = $res_type_arr[$i]; ?> <td style="color:#000; background-color:<?=$arr['cd_memo2']?>;"><input type='radio' name="order_state" id="order_state_<?=$arr['code']?>" value="<?=$arr['code']?>" <?=($arr['code']==$row['order_state'])?"checked":""?>><label for="order_state_<?=$arr['code']?>"> <?=$arr['cd_nm']?></label> </td> <?}?> <td colspan="2">-</td> </tr> <tr style="text-align:center;"> <th>메일발송</th> <?for($i=0 ; $i<count($res_type_arr); $i++) { $arr = $res_type_arr[$i]; $class = "gray"; $data_macro = to_macro_list(array('type'=>'M','resp'=>'RES','res_cd'=>$arr['code'],'disp_yn'=>'Y'));// 메일 템플릿 ?> <td> <?foreach($data_macro as $v) { $class = "gray"; if($v['auto_send']=="Y") $class = "orange"; $title = $row['res_cust_nm']."고객님! ".$v['subj']." 입니다."; ?> <div style="padding:4px 0 0 0;"> <input type="button" name="btn_send_mail" value="<?=$v['subj']?>" class="Table_btn" onclick="<?if(!$row['res_cust_email']){?>alert('예약자이메일 정보가 없습니다.메일발송이 불가능합니다.');<?}?>parent.parent.to_dialog.iframe('../reservation/mail_send.html?type=<?=$v['mtype']?>&cust_email=<?=$row['res_cust_email']?>&cust_nm=<?=$row['res_cust_nm']?>&tab=<?=$row['tab']?>&res_no=<?=$res_no?>&title=<?=urlencode($title)?>','<?=$v['subj']?> 메일 발송','1000','750',true,true,'yes');" title="<?=$v['subj']?>"> </div> <?}?> </td> <?}?> <td><input type="button" name="" value="메일발송" class="Table_btn" onclick="parent.parent.to_dialog.iframe('../reservation/mail_send.html?type=common&cust_email=<?=$row['res_cust_email']?>&cust_nm=<?=$row['res_cust_nm']?>&tab=<?=$row['tab']?>&res_no=<?=$res_no?>','메일 발송','1000','750',true,true,'yes');"></td> <td><input type="button" name="" value="메일발송내역" class="Table_btn" onclick="to_dialog.iframe('../reservation/history_mailsms.html?type=M&res_no=<?=$res_no?>','메일발송내역','700','440',true,true,'no');"></td> </tr> <tr style="text-align:center;"> <th>SMS발송</th> <?for($i=0 ; $i<count($res_type_arr); $i++){ $arr = $res_type_arr[$i]; $data_macro = to_macro_list(array('type'=>'S','resp'=>'RES','res_cd'=>$arr['code'],'disp_yn'=>'Y'));// SMS 상용구 ?> <td> <?foreach($data_macro as $v) { $class = "gray"; if($v['auto_send']=="Y") $class = "orange";?> <div style="padding:4px 0 0 0;"> <input type="button" name="btn_send_mail" value="<?=$v['subj']?>" class="Table_btn <?=($v['auto_send']=="Y") ? "red":""?>" onclick="parent.parent.to_dialog.iframe('../reservation/sms_sender_pop.html?res_no=<?=$res_no?>&midx=<?=$v['midx']?>','<?=$v['subj']?> SMS 발송','350','440',true,true,'no');" title="<?=$v['subj']?>" style="width:70px;"> </div> <?}?> </td> <?}?> <td><input type="button" name="" value="일반SMS" class="Table_btn" onclick="parent.parent.to_dialog.iframe('../reservation/sms_sender_pop.html?res_no=<?=$res_no?>','일반SMS 발송','350','440',true,true,'no');"></td> <td><input type="button" name="" value="SMS발송내역" class="Table_btn" onclick="to_dialog.iframe('../reservation/history_mailsms.html?res_no=<?=$res_no?>&type=S','SMS발송내역','700','440',true,true,'yes');"></td> </tr> <tr style="text-align:center;"> <th>알림톡발송</th> <?for($i=0 ; $i<count($res_type_arr); $i++){ $arr = $res_type_arr[$i]; $data_macro = to_macro_list(array('type'=>'AT','resp'=>'RES','res_cd'=>$arr['code'],'disp_yn'=>'Y'));// SMS 상용구 ?> <td> <?foreach($data_macro as $v) { $class = "yellow"; if($v['auto_send']=="Y") $class = "red";?> <div style="padding:4px 0 0 0;"> <input type="button" name="btn_send_mail" value="<?=$v['subj']?>" class="Table_btn <?=$class?>" onclick="if(!confirm('알림톡을 발송하시겠습니까?'))return;ajax_loader('../reservation/at_send_proc.php?SqlType=alimtalk_send&res_no=<?=$res_no?>&midx=<?=$v['midx']?>');" title="<?=$v['subj']?>"> </div> <?}?> </td> <?}?> <td></td> <td><input type="button" name="" value="알림톡발송내역" class="Table_btn yellow" onclick="to_dialog.iframe('../reservation/history_mailsms.html?res_no=<?=$res_no?>&type=AT','알림톡발송내역','700','540',true,true,'yes');"></td> </tr> </tbody> </table> </td> </tr> <tr> <td valign="top" colspan="4" style="height:10px;"></td> </tr> <? if($row['hseq'] == 275 || $row['hseq'] == 276){ ?> <tr colspan="4"> <td valign="top" colspan="12" height="15" style="padding:0 0 10px 0;"> <b>▶ 엘리시안 할인권 URL : <span style="color:#CF2D36;">https://www.tourboss.co.kr/tmbi_ticket/cp.html?code=<?=$res_no?> <input class="Table_btn gray" id="btn_agent_search" onclick="window.open('https://www.tourboss.co.kr/tmbi_ticket/cp.html?code=<?=$res_no?>');" type="button" value="미리보기" style="height:21px;"/> <input class="Table_btn gray" id="btn_agent_search" onclick="copy_coupon_url('<?=$res_no?>');" type="button" value="복사" style="height:21px;"/> <span style="margin-left:5px;"><input type="button" class="Table_btn yellow" value="★예약번호+할인권발송" onclick="if(!confirm('예약번호+할인권 알림톡을 발송하시겠습니까?'))return;ajax_loader('../reservation/at_send_proc.php?SqlType=coupon_elysian&res_no=<?=$res_no?>');"></span> </td> </tr> <? } ?> <tr> <td valign="top" colspan="4" style="height:10px;"></td> </tr> <tr> <td valign="top" > <table width="100%" border="0" cellspacing="0" cellpadding="0" class="setting_write"> <tbody> <tr> <th width="140">호텔명</th> <td width="380"> <input type="hidden" name="hseq" value="<?=$row['hseq']?>"> <input type="text" class="input_text" id="" name="hnm" value="<?=$row['hnm']?>" size="50" hname="호텔명" required <?=($is_edit_hotel==true)?"":"readonly"?>> </td> <th width="140">입실일</th> <td> <?php if($is_edit_hotel==true){?> <input type="text" class="cal_input" id="room_date" name="room_date" value="<?=$row['room_date']?>" size="15" readonly onClick="AjaxCal(this,event,{'add_event':'ckRoomDateOut()'});"> <?php }else{?> <?=$row['room_date']?><input type="hidden" name="room_date" id="room_date" value="<?=$row['room_date']?>"> <?php }?> <input type="button" name="" value="일정변경" class="Table_btn red2" onclick="to_dialog.iframe('../res_hotel/change_schedule_hotel_res.html?res_no=<?=$res_no?>&hseq=<?=$row['hseq']?>&lang=<?=$row['lang']?>&curunit=<?=$row['curunit']?>','일정변경','1000','550',true,true,'yes');"> </td> </tr> <tr> <th>룸타입</th> <td> <input type="hidden" name="ridx" value="<?=$row['ridx']?>"> <input type="text" class="input_text" id="" name="rnm" value="<?=$row['rnm']?>" size="50" required <?=($is_edit_hotel==true)?"":"readonly"?>> <input type="button" name="" value="예약추가" class="Table_btn red" onclick="if(confirm('현재회원 정보로 새로운 예약을 등록합니다.\n계속진행하시겠습니까?')){document.location.href='../res_hotel/hotelResReg.html?SqlType=hotel_res_addon&res_no=<?=$res_no?>&lang=<?=$lang?>&curunit=<?=$curunit?>';}"> <!--<input type="button" name="" value="예약변경" class="Table_btn red2" onclick="if(confirm('본예약 정보가 변경됩니다.\n계속진행하시겠습니까?')){document.location.href='../res_hotel/hotelResReg.html?SqlType=hotel_res_updt&res_no=<?=$res_no?>&lang=<?=$lang?>&curunit=<?=$curunit?>';}">--> </td> <th>숙박일수</th> <td> <?php if($is_edit_hotel==true){?> <select name="room_day" id="room_day" style="width:50px;" onChange="__ma1HotelJob();"> <?php for($i=1 ; $i<=$cf['max_reserv_room_day'] ; $i++){?> <option value="<?=$i?>" <?=($row['room_day']==$i)?"selected":""?>><?=$i?></option> <?php }?> </select> 박 <?php }else{?> <?=$row['room_day']?>박<input type="hidden" name="room_day" id="room_day" value="<?=$row['room_day']?>"> <?php }?> </td> </tr> <tr> <th>베드타입</th> <td><input type="text" name="room_bedtype" value="<?=$row['room_bedtype']?>" class="input_text" size="31"></td> <th>퇴실일</th> <td> <?php if($is_edit_hotel==true){?> <input type="text" class="input_text" id="room_date_out" name="room_date_out" value="<?=$row['room_date_out']?>" style="border:0px;background-Color:#ffffff;" readonly> <?php }else{?> <?=$row['room_date_out']?><input type="hidden" name="room_date_out" id="room_date_out" value="<?=$row['room_date_out']?>"> <?php }?> </td> </tr> <tr> <th>성인 기준인원 </th> <td> <input type="text" class="input_text" id="person_num" name="person_num" value="<?=$row['person_num']?>" old_val='<?=$row['person_num']?>' size="6" onkeydown="ChkNum(this,event);" maxlength="2" onBlur="__ma1HotelJob();" <?=($is_edit_hotel==true)?"":"readonly"?>>명 </td> <th>객실수</th> <td> <select name="room_cnt" id="room_cnt" style="width:50px;" onChange="__ma1HotelJob();"> <?php for($i=1 ; $i<=20 ; $i++) {?> <option value="<?=$i?>" <?if($row['room_cnt']==$i) echo " selected" ?>><?=$i?></option> <?php }?> </select> 룸 </td> </tr> <tr> <th>성인 최대인원</th> <td> <input type="text" class="input_text" id="person_maxnum" name="person_maxnum" value="<?=$row['person_maxnum']?>" old_val='<?=$row['person_maxnum']?>' size="6" onkeydown="ChkNum(this,event);" maxlength="2" onBlur="__ma1HotelJob();" <?=($is_edit_hotel==true)?"":"readonly"?>>명 </td> <th>성인 숙박인원</th> <td> <select name="room_adult_num" id="room_adult_num" style="width:50px;" onChange="__ma1HotelJob();"> <option value="0">0</option> <?for($i=1,$j=0 ; $i<=$row['r_adult_maxnum'] ; $i++) { $bgcolor=""; if($i>$row['r_adult_num']) { $bgcolor="#FF0000"; $j++; } ?> <option value='<?=$i?>' <?=($row['room_adult_num']==$i)?"selected":""?> maxnum="<?=$j?>" style="background-Color:<?=$bgcolor?>;"><?=$i?></option> <?}?> </select> ※<span style="color:red;">빨간색</span>은 초과인원 </td> </tr> <tr> <th>소인 최대인원</th> <td><input type="text" class="input_text" id="child_maxnum" name="child_maxnum" value="<?=$row['child_maxnum']?>" size="6" onkeydown="ChkNum(this,event);" maxlength="2" onBlur="__ma1HotelJob();" <?=($is_edit_hotel==true)?"":"readonly"?>>명</td> <th>소인 숙박인원</th> <td> <select name="room_child_num" id="room_child_num" style="width:50px;" onChange="__ma1HotelJob();"> <option value="0">0</option> <?for($i=1 ; $i<=$row['r_room_child_num'] ; $i++) {?> <option value='<?=$i?>' <?=($row['room_child_num']==$i)?"selected":""?> ><?=$i?></option> <?}?> </select> </td> </tr> <!-- <tr> <th>비고</th> <td colspan="3"><input name="cont" class="input_text" id="" type="text" size="60" value="<?=$row['cont']?>"></td> </tr> --> <tr> <th>고객요청</th> <td><?=nl2br($row['res_cust_memo'])?></td> <th> <img style="position:relative;top:-1px;left:3px;" src="../../image/board/bullet_disk.gif"> 첨부파일 </th> <td> <span style="float:left;width:190px;overflow:hidden"> <input type="file" name="attach_file" class="input_file input_text no_print" size="50" style="float:left;width:180px;height:18px;"> <?php if($row['attach_file']){ $attach_file = explode("/",$row['attach_file']); $attach_file = $attach_file[1]; ?> <br> <a style="float:left; width:229px;margin-left: 5px;margin-top: 9px;overflow:hidden;margin-left:3px;color:#1c67a5" href="/FileData/hotel/res/<?=$row['attach_file']?>" download><?=$attach_file?></a> <?php } ?> </span> <span style="float:left;margin-left:10px;overflow:hidden;width:190px"> <input type="file" name="attach_file2" class="input_file input_text no_print" size="50" style="float:left;width:180px;height:18px;"> <?php if($row['attach_file2']){ $attach_file2 = explode("/",$row['attach_file2']); $attach_file2 = $attach_file2[1]; ?> <br> <a style="float:left; width:229px;margin-left: 5px;margin-top: 9px;overflow:hidden;margin-left:3px;color:#1c67a5" href="/FileData/hotel/res/<?=$row['attach_file2']?>" download><?=$attach_file2?></a> <?php } ?> </span> </td> </tr> <tr> <th>관리자 메모<br><span style="color:#F00;">(리스트 메모와 연동)</span></th> <td colspan="3"><textarea name="g_memo" style="width:240px;height:60px"><?=$row['g_memo']?></textarea></td> </tr> </tbody> </table> </td> </tr> <tr> <td valign="top" colspan="4" height="35" style="padding-top:10px;text-align: right;"> <input 999 type="button" class="Table_btn red itemBtnAddOnBFRow" value="조식추가(+)" > <input type="button" class="Table_btn red itemBtnAddOnPriceRow" value="항목추가(+)" > <input type="button" class="Table_btn blue itemBtnDelPriceRow" value="선택항목삭제(-)" > </td> </tr> <tr> <td valign="top" colspan="3"> <table width="100%" border="0" cellspacing="0" cellpadding="0" class="setting_write item_addon_price_box"> <thead> <tr > <th width="30" style="text-align:center;"><input type="checkbox" name="" class="item_checkbox_ckall" value=""></th> <th width="125" style="text-align:center;">구분</th> <th width="120" style="text-align:center;">이용일자</th> <th width="105" style="text-align:center;"><span style="color:#cf2d36;">원가</span></th> <th width="105" style="text-align:center;"><span style="color:#cf2d36;">B2B</span></th> <th width="105" style="text-align:center;"><span style="color:#cf2d36;">B2C</span></th> <th width="70" style="text-align:center;">수량</th> <th width="105" style="text-align:center;">원가소계</th> <th width="105" style="text-align:center;">B2B소계</th> <th width="105" style="text-align:center;">B2C소계</th> <th width="" style="text-align:center;">비고</th> <th width="40" style="text-align:center;">-</th> </tr> </thead> <tbody> <!-- 호텔일자별 가격정보 --><!--/호텔일자별 가격정보 --> <!-- 일자별 추가인원 가격정보 --><!--/일자별 추가인원 가격정보 --> <!-- 추가 가격정보 --><!-- /추가 가격정보 --> <?php $hotel_res_item_arr = $row['hotel_res_item']; if(is_array($hotel_res_item_arr)){foreach($hotel_res_item_arr as $v){ if($v['gu']=="R"){ ?> <tr class="itemTableTrRoomDateOut itemTableTrRoom"> <td></td> <td style="text-align: left;"> 객실금액<input type="hidden" name="gu_arr[]" value="R"><input name="itemnm_arr[]" type="hidden" class="input_text" value="호텔" size="18"> </td> <td><?=$v['room_date']?><input type="hidden" name="room_date_arr[]" value="<?=$v['room_date']?>"></td> <td><input type="text" class="input_text" name="buy_price_arr[]" value="<?=number_format($v['buy_price'])?>" value_old="<?=number_format($v['buy_price'])?>" size="10" style="text-align:right;ime-mode:disabled;" onkeydown="ChkNum(this,event);" onblur="this.value=comma(this.value);if($(this).val()!=$(this).attr('value_old')){}"></td> <?php //거래처가(b2b) if($_COOKIE['ty_dev'] == 1){ ?> <td><input 222 type="text" class="input_text" name="agent_price_arr[]" value="<?=number_format($v['agent_price'])?>" value_old="<?=number_format($v['agent_price'])?>" size="10" style="text-align:right;ime-mode:disabled;" onkeydown="ChkNum(this,event);" onblur="this.value=comma(this.value);if($(this).val()!=$(this).attr('value_old')){}"></td> <?php }else{ ?> <td><input type="text" class="input_text" name="agent_price_arr[]" value="<?=number_format($v['agent_price'])?>" value_old="<?=number_format($v['agent_price'])?>" size="10" style="text-align:right;ime-mode:disabled;" onkeydown="ChkNum(this,event);" onblur="this.value=comma(this.value);if($(this).val()!=$(this).attr('value_old')){}"></td> <?php } ?> <td><input type="hidden" name="sell_price_arr_fr[]" value="<?=$v['sell_price_fr']?>" value_old="<?=$v['sell_price_fr']?>" ><input type="text" class="input_text" name="sell_price_arr[]" value="<?=number_format($v['sell_price'])?>" value_old="<?=number_format($v['sell_price'])?>" size="10" style="text-align:right;ime-mode:disabled;" onkeydown="ChkNum(this,event);" onblur="this.value=comma(this.value);if($(this).val()!=$(this).attr('value_old')){}"></td> <td style="text-align:center;"><input type="text" class="item_count" name="i_count_arr[]" size="4" value="<?=$v['i_count']?>" style="border:0px;text-align:center;backgound-Color:#fffff;" readonly=""></td> <td><input type="text" class="item_buy_price_tot" name="buy_price_tot_arr[]" size="10" value="<?=number_format($v['buy_price_tot'])?>" style="border:0px;text-align:right;backgound-Color:#fffff;" readonly=""></td> <td><input type="text" class="item_agent_price_tot" name="agent_price_tot_arr[]" size="10" value="<?=number_format($v['agent_price_tot'])?>" style="border:0px;text-align:right;backgound-Color:#fffff;" readonly=""></td> <td><input type="hidden" class="item_sell_price_tot_fr" name="sell_price_tot_arr_fr[]" value="<?=$v['sell_price_tot_fr']?>" readonly=""><input type="text" class="item_sell_price_tot" name="sell_price_tot_arr[]" size="10" value="<?=number_format($v['sell_price_tot'])?>" style="border:0px;text-align:right;backgound-Color:#fffff;" readonly=""></td> <td><input type="text" name="comt_arr[]" size="16" class="input_text" value="<?=$v['comt']?>"></td> <td style="text-align:center;"><input type="button" class="Table_btn blue" value="삭제" onclick="deleteLine(this);"></td> <!-- <td>-</td>--> </tr> <?php }}}?> <?php if(is_array($hotel_res_item_arr)){foreach($hotel_res_item_arr as $v){ if($v['gu']=="U"){ ?> <tr class="itemTableTrRoomDateOverInwon itemTableTrRoom"> <td></td> <td style="text-align:center;"> 객실초과인원<input type="hidden" name="gu_arr[]" value="U"><input name="itemnm_arr[]" type="hidden" class="input_text" value="객실초과인원"> </td> <td style="text-align:center;"><?=$v['room_date']?><input type="hidden" name="room_date_arr[]" value="<?=$v['room_date']?>"></td> <td style="text-align:center;"><input type="text" class="input_text" name="buy_price_arr[]" value="<?=number_format($v['buy_price'])?>" value_old="<?=number_format($v['buy_price'])?>" size="10" style="text-align:right;ime-mode:disabled;" onkeydown="ChkNum(this,event);" onblur="this.value=comma(this.value);if($(this).val()!=$(this).attr('value_old')){}"></td> <td style="text-align:center;"><input type="text" class="input_text" name="agent_price_arr[]" value="<?=number_format($v['agent_price'])?>" value_old="<?=number_format($v['agent_price'])?>" size="10" style="text-align:right;ime-mode:disabled;" onkeydown="ChkNum(this,event);" onblur="this.value=comma(this.value);if($(this).val()!=$(this).attr('value_old')){}"></td> <td style="text-align:center;"><input type="hidden" name="sell_price_arr_fr[]" value="<?=$v['sell_price_fr']?>" value_old="<?=$v['sell_price_fr']?>" ><input type="text" class="input_text" name="sell_price_arr[]" value="<?=number_format($v['sell_price'])?>" value_old="<?=number_format($v['sell_price'])?>" size="10" style="text-align:right;ime-mode:disabled;" onkeydown="ChkNum(this,event);" onblur="this.value=comma(this.value);if($(this).val()!=$(this).attr('value_old')){}"></td> <td style="text-align:center;"><input type="text" class="item_count" name="i_count_arr[]" size="4" value="<?=$v['i_count']?>" style="border:0px;text-align:center;backgound-Color:#fffff;" readonly=""></td> <td style="text-align:center;"><input type="text" class="item_buy_price_tot" name="buy_price_tot_arr[]" size="10" value="<?=number_format($v['buy_price_tot'])?>" style="border:0px;text-align:right;backgound-Color:#fffff;" readonly=""></td> <td style="text-align:center;"><input type="text" class="item_agent_price_tot" name="agent_price_tot_arr[]" size="10" value="<?=number_format($v['agent_price_tot'])?>" style="border:0px;text-align:right;backgound-Color:#fffff;" readonly=""></td> <td style="text-align:center;"><input type="hidden" class="item_sell_price_tot_fr" name="sell_price_tot_arr_fr[]" value="<?=$v['sell_price_tot_fr']?>" readonly=""><input type="text" class="item_sell_price_tot" name="sell_price_tot_arr[]" size="10" value="<?=number_format($v['sell_price_tot'])?>" style="border:0px;text-align:right;backgound-Color:#fffff;" readonly=""></td> <td style="text-align:center;"><input type="text" name="comt_arr[]" size="16" class="input_text" value="<?=$v['comt']?>"></td> <td style="text-align:center;"><input type="button" class="Table_btn blue" value="삭제" onclick="deleteLine(this);"></td> <!-- <td style="text-align:center;">-</td>--> </tr> <?php }}}?> <!-- 2019-10-17 조식추가 --> <?php if(is_array($hotel_res_item_arr)){foreach($hotel_res_item_arr as $v){ if($v['gu']=="B"){ ?> <tr class="itemTableTrAddOn"> <td><input type="checkbox" name="" class="itemCheckBoxAddOn" value=""></td> <td style="text-align:center;"><input type="hidden" name="gu_arr[]" value="B"><?=$v['item_nm']?><input name="itemnm_arr[]" type="hidden" class="input_text" value="<?=$v['item_nm']?>" size="18" hname="추가항목" required=""></td> <td style="text-align:center;"><input name="room_date_arr[]" type="text" class="cal_input" value="<?=$v['room_date']?>" readonly="" onclick="AjaxCal(this,event)" size="13" hname="이용일자" required=""></td> <td style="text-align:center;"><input type="text" class="input_text" name="buy_price_arr[]" value="<?=number_format($v['buy_price'])?>" value_old="<?=number_format($v['buy_price'])?>" size="10" style="text-align:right;ime-mode:disabled;" onkeydown="ChkNum(this,event);" onblur="this.value=comma(this.value);if($(this).val()!=$(this).attr('value_old')){}"></td> <td style="text-align:center;"><input type="text" class="input_text" name="agent_price_arr[]" value="<?=number_format($v['agent_price'])?>" value_old="<?=number_format($v['agent_price'])?>" size="10" style="text-align:right;ime-mode:disabled;" onkeydown="ChkNum(this,event);" onblur="this.value=comma(this.value);if($(this).val()!=$(this).attr('value_old')){}"></td> <td style="text-align:center;"><input type="hidden" name="sell_price_arr_fr[]" value="<?=$v['sell_price_fr']?>" value_old="<?=$v['sell_price_fr']?>" ><input type="text" class="input_text" name="sell_price_arr[]" value="<?=number_format($v['sell_price'])?>" value_old="<?=number_format($v['sell_price'])?>" size="10" style="text-align:right;ime-mode:disabled;" onkeydown="ChkNum(this,event);" onblur="this.value=comma(this.value);if($(this).val()!=$(this).attr('value_old')){}"></td> <td style="text-align:center;"><input type="text" class="input_text item_count" name="i_count_arr[]" size="4" maxlength="3" value="<?=$v['i_count']?>" style="text-align:center;ime-mode:disabled;" onkeydown="ChkNum(this,event);"></td> <td style="text-align:center;"><input type="text" class="item_buy_price_tot" name="buy_price_tot_arr[]" size="10" value="<?=number_format($v['buy_price_tot'])?>" style="border:0px;text-align:right;backgound-Color:#fffff;" readonly=""></td> <td style="text-align:center;"><input type="text" class="item_agent_price_tot" name="agent_price_tot_arr[]" size="10" value="<?=number_format($v['agent_price_tot'])?>" style="border:0px;text-align:right;backgound-Color:#fffff;" readonly=""></td> <td style="text-align:center;"><input type="hidden" class="item_sell_price_tot_fr" name="sell_price_tot_arr_fr[]" value="<?=$v['sell_price_tot_fr']?>" readonly=""><input type="text" class="item_sell_price_tot" name="sell_price_tot_arr[]" size="10" value="<?=number_format($v['sell_price_tot'])?>" style="border:0px;text-align:right;backgound-Color:#fffff;" readonly=""></td> <td style="text-align:center;"><input type="text" name="comt_arr[]" size="16" class="input_text" value="<?=$v['comt']?>"></td> <td style="text-align:center;"><input type="button" class="Table_btn blue " value="삭제" onclick="deleteLine(this);"></td> </tr> <?php }}}?> <?php if(is_array($hotel_res_item_arr)){foreach($hotel_res_item_arr as $v){ if($v['gu']=="A"){ ?> <tr class="itemTableTrAddOn"> <td><input type="checkbox" name="" class="itemCheckBoxAddOn" value=""></td> <td style="text-align:center;"><input type="hidden" name="gu_arr[]" value="A"><input name="itemnm_arr[]" type="text" class="input_text" value="<?=$v['item_nm']?>" size="18" hname="추가항목" required=""></td> <td style="text-align:center;"><input name="room_date_arr[]" type="text" class="cal_input" value="<?=$v['room_date']?>" readonly="" onclick="AjaxCal(this,event)" size="13" hname="이용일자" required=""></td> <td style="text-align:center;"><input type="text" class="input_text" name="buy_price_arr[]" value="<?=number_format($v['buy_price'])?>" value_old="<?=number_format($v['buy_price'])?>" size="10" style="text-align:right;ime-mode:disabled;" onkeydown="ChkNum(this,event);" onblur="this.value=comma(this.value);if($(this).val()!=$(this).attr('value_old')){}"></td> <td style="text-align:center;"><input type="text" class="input_text" name="agent_price_arr[]" value="<?=number_format($v['agent_price'])?>" value_old="<?=number_format($v['agent_price'])?>" size="10" style="text-align:right;ime-mode:disabled;" onkeydown="ChkNum(this,event);" onblur="this.value=comma(this.value);if($(this).val()!=$(this).attr('value_old')){}"></td> <td style="text-align:center;"><input type="hidden" name="sell_price_arr_fr[]" value="<?=$v['sell_price_fr']?>" value_old="<?=$v['sell_price_fr']?>"><input type="text" class="input_text" name="sell_price_arr[]" value="<?=number_format($v['sell_price'])?>" value_old="<?=number_format($v['sell_price'])?>" size="10" style="text-align:right;ime-mode:disabled;" onkeydown="ChkNum(this,event);" onblur="this.value=comma(this.value);if($(this).val()!=$(this).attr('value_old')){}"></td> <td style="text-align:center;"><input type="text" class="input_text item_count" name="i_count_arr[]" size="4" maxlength="3" value="<?=$v['i_count']?>" style="text-align:center;ime-mode:disabled;" onkeydown="ChkNum(this,event);"></td> <td style="text-align:center;"><input type="text" class="item_buy_price_tot" name="buy_price_tot_arr[]" size="10" value="<?=number_format($v['buy_price_tot'])?>" style="border:0px;text-align:right;backgound-Color:#fffff;" readonly=""></td> <td style="text-align:center;"><input type="text" class="item_agent_price_tot" name="agent_price_tot_arr[]" size="10" value="<?=number_format($v['agent_price_tot'])?>" style="border:0px;text-align:right;backgound-Color:#fffff;" readonly=""></td> <td style="text-align:center;"><input type="hidden" class="item_sell_price_tot_fr" name="sell_price_tot_arr_fr[]" value="<?=$v['sell_price_tot_fr']?>" readonly=""><input type="text" class="item_sell_price_tot" name="sell_price_tot_arr[]" size="10" value="<?=number_format($v['sell_price_tot'])?>" style="border:0px;text-align:right;backgound-Color:#fffff;" readonly=""></td> <td style="text-align:center;"><input type="text" name="comt_arr[]" size="16" class="input_text" value="<?=$v['comt']?>"></td> <td style="text-align:center;"><input type="button" class="Table_btn blue" value="삭제" onclick="deleteLine(this);"></td> </tr> <?php }}}?> </tbody> <thead> <!-- 옵션 가격정보 --> <? $option_arr = $row['option_all']; if(is_array($option_arr)){foreach($option_arr as $r){ ?> <tr style="text-align:center;" class="itemTableTrOption"> <td></td> <td style="text-align:center;"> <?=$r['op_nm']?> <input type="hidden" name="opid_arr[]" value="<?=$r['opid']?>"> <input type="hidden" name="op_nm_arr[]" value="<?=$r['op_nm']?>"> </td> <td>숙박기간중</td> <td><input type="text" name="op_buy_price_arr[]" class="input_text itemInput" value="<?=number_format($r['op_price_buy'])?>" size="10" style="text-align:right;ime-mode:disabled;" onkeydown="ChkNum(this,event);" onblur="this.value=comma(this.value);"></td> <td><input type="text" name="op_agent_price_arr[]" class="input_text itemInput" value="<?=number_format($r['op_price_agent'])?>" size="10" style="text-align:right;ime-mode:disabled;" onkeydown="ChkNum(this,event);" onblur="this.value=comma(this.value);"></td> <td><input TYPE="hidden" NAME="op_sell_price_arr_fr[]" value="<?=$r['op_price_sell_fr']?>" value_old="<?=$r['op_price_sell_fr']?>"><input TYPE="text" NAME="op_sell_price_arr[]" class="input_text itemInput" value="<?=number_format($r['op_price_sell'])?>" value_old="<?=number_format($r['op_price_sell'])?>" style="text-align:right;ime-mode:disabled;" onkeydown="ChkNum(this,event);" onblur="this.value=comma(this.value);" maxlength="10" size="10" title="판매가"></td> <td><input type="text" class="input_text item_count itemInput" name="op_num_arr[]" size="4" maxlength="3" value="<?=$r['op_num']?>" style="text-align:center;ime-mode:disabled;" onkeydown="ChkNum(this,event);"></td> <td><input type="text" class="item_buy_price_tot" name="op_buy_price_tot_arr[]" size="10" value="<?=number_format($r['op_buy_price_tot'])?>" style="border:0px;text-align:right;backgound-Color:#fffff;" readonly></td> <td><input type="text" class="item_agent_price_tot" name="op_agent_price_tot_arr[]" size="10" value="<?=number_format($r['op_agent_price_tot'])?>" style="border:0px;text-align:right;backgound-Color:#fffff;" readonly></td> <td><input type="hidden" class="item_sell_price_tot_fr" name="op_sell_price_tot_arr_fr[]" value="<?=$r['op_sell_price_tot_fr']?>" readonly><input type="text" class="item_sell_price_tot" name="op_sell_price_tot_arr[]" size="10" value="<?=number_format($r['op_sell_price_tot'])?>" style="border:0px;text-align:right;backgound-Color:#fffff;" readonly></td> <td><input type="text" name="op_comt_arr[]" size="16" class="input_text" value="<?=$r['op_comt']?>"></td> <td style="text-align:center;"><input type="button" class="Table_btn blue" value="삭제" onclick="deleteLine(this);"></td> <!-- <td>-</td>--> </tr> <?}}?> <!-- /옵션 가격정보 --> <tr style="text-align:center;" class="itemTableTrDiscount"> <td></td> <td>할인(-)</td> <td></td> <td></td> <td></td> <td></td> <td></td> <td>(-)<input name="discount_buy" class="input_text itemInput" style="text-align: right; -ms-ime-mode: disabled;" onkeydown="ChkNum(this,event);" onblur="this.value=comma(this.value);if($(this).val()!=$(this).attr('value_old')){}" type="text" size="9" maxlength="15" value="<?=number_format($row['buy_discount'])?>" value_old="<?=number_format($row['buy_discount'])?>"></td> <td>(-)<input name="discount_agent" class="input_text itemInput" style="text-align: right; -ms-ime-mode: disabled;" onkeydown="ChkNum(this,event);" onblur="this.value=comma(this.value);if($(this).val()!=$(this).attr('value_old')){}" type="text" size="9" maxlength="15" value="<?=number_format($row['agent_discount'])?>" value_old="<?=number_format($row['agent_discount'])?>"></td> <td>(-)<input name="discount_sell_fr" type="hidden" value="<?=$row['sell_discount_fr']?>" value_old="<?=$row['sell_discount_fr']?>"><input name="discount_sell" class="input_text itemInput" style="text-align: right; -ms-ime-mode: disabled;" onkeydown="ChkNum(this,event);" onblur="this.value=comma(this.value);if($(this).val()!=$(this).attr('value_old')){}" type="text" size="9" maxlength="15" value="<?=number_format($row['sell_discount'])?>" value_old="<?=number_format($row['sell_discount'])?>"></td> <td><input type="text" name="discount_cmt" size="16" class="input_text" value="<?=$row['discount_cmt']?>"></td> <td></td> </tr> <tr style="text-align:center;"> <td></td> <td>합계</td> <td colspan="5"></td> <td><span id="item_buy_gtot"><?=number_format($row['buy_total'])?></span></td> <td><span id="item_agent_gtot"><?=number_format($row['agent_total'])?></span></td> <td><span id="item_sell_gtot"><?=number_format($row['sales_total'])?></span></td> <td colspan="2"></td> </tr> </thead> </table> </td> </tr> </table> <?php if($_COOKIE['ty_dev'] == 1){ // echo '<pre>'; // var_dump($row); // echo '</pre>'; p($row); } ?>