ÿØÿà JFIF  ` ` ÿþš 403 WEBHELL REBORN
403 WEBHELL REBORN
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/agent_reserve/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

Buat Folder Baru:
Buat File Baru:

Current File : /tkt_travelbus/www/toadmin/agent_reserve/good_res_edit.html
<?
include "../include/top_iframe.html";
include "._common.php";

$class_AccountCustomer = new AccountCustomer();

// 예약정보
$res_data = res_good_master(" and res_no='{$res_no}' ");
$row = res_good_master_replace($res_data[0]);

// 관리자목록
$admin_arr = member_fetch(" and mb_level <= 10  ");

// 고객 자동정산정보 계산
$class_AccountCustomer->account_customer_check($res_no,"good_res");

// 해외패키지,허니문,데이투어 행사가격
$date_arr = $row['date']; 

// 진행전달
$res_type_arr = base_codec("PRD","RESP");

// 대리점 목록
$agent_arr = $row['d_agent_all'];

// 동행자 정보
$person_data = res_good_date_person($res_no);

// 출발지
$data_depot = good_depot($row['g_uid'],"Y");

// 통합예약정보(이전예약정보 제외)
$data_res_all = array();
$rdata = array("sql_where"=>" and res_cust_id='{$row[mb_id]}' and start_dt >= curdate() " , "sql_order"=>"start_dt");
if ($row['mb_id']) $data_res_all = to_res_all($rdata);

// 회원예약건
if ($row['mb_id']) {
	$sql = "select count(*) as res_cnt from TB_RES_GOOD where mb_id='{$row['mb_id']}' and ev_start >= curdate() and ev_start <= DATE_ADD(CURDATE(), INTERVAL 10 MONTH)";
	$r = db_fetch($sql);
	$res_cnt = $r['res_cnt'];
}

// 대리점 정보
$row_agent = get_member($row['agent_id']);

// 회원 포인트 
$mb_point_tot = 0;
if ($row['mb_id']) {
	$class_CommonTour = new CommonTour();
	$data_mbpoint = $class_CommonTour->pointTotal(array("sql_where"=>" and mb_id='{$row[mb_id]}' "));
	$mb_point_tot = $data_mbpoint['cur_point'];
}

//통화단위
if($row['lang']=='ko' || $row['lang']=='ag')  {
	$row['symbol_before'] = "₩ ";
}else if($row['lang']=='en')  {
	$row['symbol_before'] = "USD ";
}else if($row['lang']=='cn')  {
	$row['symbol_before'] = "CNY ";
}else if($row['lang']=='hk')  {
	$row['symbol_before'] = "HKD ";
	$row['tot_input_twd'] = "(NT " . round($row['account']['tot_input_will'] * $row['to_twd']) . ")";
	$row['pay_money_twd'] = "(NT " . round($row['account']['pay_money'] * $row['to_twd']) . ")";
	$row['pre_money_twd'] = "(NT " . round($row['account']['pre_money'] * $row['to_twd']) . ")";

}
?>
<div class="top_bar">
	<h4>예약 상세정보</h4>
	<div class="info_list">
		<ul>
			<li>예약자 <strong><?=$row['res_cust_nm']?></strong></li>
			<li>여행인원 <strong id="inwon_head_view"><?=$row['inwon']?>명</strong></li>
			<li>판매금액 <span class="c_red symbol_before"><?=$row['symbol_before']?></span><strong id="sales_total_head_view"><?=number_format($row['account']['tot_input_will'])?></strong><?=$row['symbol_after']?><?=$row['tot_input_twd']?></li>
			<li>입금액 <span class="c_red symbol_before"><?=$row['symbol_before']?></span><strong><?=number_format($row['account']['pay_money'])?><?=$row['symbol_after']?></strong><?=$row['pay_money_twd']?></li>
			<li>미입금액 <span class="c_red symbol_before"><?=$row['symbol_before']?></span><strong><?=number_format($row['account']['pre_money'])?><?=$row['symbol_after']?></strong><?=$row['pre_money_twd']?></li>
			<?php if($row['mb_id']) {?><li><input type='button' class="Table_btn" value='<?=$row['res_cust_nm']?>예약 &nbsp;<?=$res_cnt?>건' onclick="parent.location.href='good_res_list.html?search_key_s=mb_id&search_word_s=<?=urlencode($row['mb_id'])?>&mode_period_s=ev_start&date_s1=<?=date('Y-m-d')?>&date_s2=<?=date('Y-m-d', strtotime('+ 10 month'))?>&period_date_s=bebore1month';"></li><?php }?>
		</ul>
	</div>
	<!--<div class="btn_fix"><a class="Bbtn red" href="javascript:;" onclick="chk_form();">저장</a></div>-->
</div>

<div class="conbody_area">
<!-- 본문 -->


<!-- 폼 -->
<form name="frm_reserv_good" id="frm_reserv_good" method="post">
<input type="hidden" name="SqlType" value="reserv_updt">
<input type="hidden" name="tmp_layer_id" value="<?=$tmp_layer_id?>">
<input type="hidden" name="res_no" value="<?=$res_no?>">
<input type="hidden" name="buy_total" value="<?=$row['buy_total']?>"><!-- 매입가 합계 -->
<input type="hidden" name="sales_total" value="<?=$row['sales_total']?>"><!-- 판매가 합계 -->
<INPUT TYPE="hidden" NAME="option_buy_price" value="0"><!-- 옵션 매입금액 계 -->
<INPUT TYPE="hidden" NAME="option_price" value="0"><!-- 옵션 판매금액 계 -->
<INPUT TYPE="hidden" NAME="tot_adult" value="0">
<INPUT TYPE="hidden" NAME="tot_child" value="0">
<INPUT TYPE="hidden" NAME="tot_baby" value="0">
<INPUT TYPE="hidden" NAME="tot_infant" value="0">
<INPUT TYPE="hidden" NAME="addon_buy_price" value="0"><!-- 추가 매입금액 합계 -->
<INPUT TYPE="hidden" NAME="addon_sale_price" value="0"><!-- 추가 판매금액 합계 -->

<!-- ********************************************예약자정보******************************************** -->
<div id="cont01">
<?
$rtab = '1';
include "good_res_tab.php";
?>보
	<table width="100%" border="0" cellspacing="0" cellpadding="0">
		<tr>
			<td valign="top" width="50%">
				<table width="100%" border="0" cellspacing="0" cellpadding="0" class="setting_write">
				<tbody>
					<tr>
						<th width="100">예약자 아이디</th>
						<td colspan="3"><input type="text" class="input_text" id="mb_id" name="mb_id" value="<?=$row['mb_id']?>" readonly> 
						<!--<input class="Table_btn gray" id="btn_agent_search" onclick="to_dialog.iframe('member_find_ajax.html','회원검색','680','360',true,true,'no');" type="button" value="회원조회"/>-->

						</td>
					</tr>
					<tr>
						<th>예약자 적립금</th>
						<td colspan="3"><?=number_format($mb_point_tot)?>point
						<?php if($row['mb_id']){?>
							<!--<input class="Table_btn blue" id="btn_agent_search" onclick="to_dialog.iframe('../res_good/member_point.html?mb_id=<?=$row['mb_id']?>','<?=$row['res_cust_nm']?>님  적립금내역','800','450',true,true,'yes');" type="button" value="적립금내역"/>-->
						<?php }?>
						</td>
					</tr>					
					<tr>
						<th>예약자명*</th>
						<td colspan="3"><input type="text" class="input_text" id="cu_name" name="res_cust_nm" value="<?=$row['res_cust_nm']?>" style="width:130px;" readonly></td>
					</tr>
					<tr>
						<th>핸드폰*</th>
						<td><input type="text" class="input_text" id="cu_phone" name="res_cust_hp" value="<?=$row['res_cust_hp']?>" style="width:130px;" readonly></td>
						<th width="100">전화번호</th>
						<td><input type="text" class="input_text" id="cu_tel" name="res_cust_tel" value="<?=$row['res_cust_tel']?>" style="width:130px;" readonly></td>
					</tr>
					<tr>
						<th>이메일</th>
						<td colspan="3">
							<input type="text" class="input_text" id="cu_email" name="res_cust_email" value="<?=$row['res_cust_email']?>" style="width:407px;" readonly>
						</td>
					</tr>
				</tbody>
				</table>
			</td>
			<td width="0"></td>
			<td valign="top">
				<table width="100%" border="0" cellspacing="0" cellpadding="0" class="setting_write item_agent_disp">
				<tbody>
					<tr height="47px">
						<th width="100">대리점</th>
						<td colspan="3">
							<select name="agent_id" id="agent_id" style="width:180px;display:none;">
								<option value=""></option>
								<?
									$v2 = ""; 
									if(is_array($agent_arr)){for($a=0 ; $a<count($agent_arr) ; $a++) {
										$v = $agent_arr[$a];
										if ($v['agent_id']==$row['agent_id']) $v2 = $v;
								?>
									<option value="<?=$v['agent_id']?>" <?=($v['agent_id']==$row['agent_id'])?"selected":""?>><?=$v['agent_nm']?> | <?=$v['agent_id']?></option>
								<?}}?>
							</select>
						</td>
					</tr>
					<tr height="47px">
						<th>대리점 기본수수료율</th>
						<td colspan="3"><span class="agent_comm_info"><?=@number_format($v2['agent_comm'])?><?=@$v2['agent_comm_unit']?></span></td>
					</tr>					
					<tr height="47px">
						<th>담당자</th>
						<td colspan="3"><span class="mb_nm"><?=$row_agent['mb_nm']?></span></td>
					</tr>
					<tr height="47px">
						<th>연락처</th>
						<td><span class="mb_tel"><?=$row_agent['mb_tel']?></span></td>
						<th width="100">전화번호</th>
						<td><span class="mb_phone"><?=$row_agent['mb_phone']?></span></td>
					</tr>
					<tr height="47px">
						<th>이메일</th>
						<td colspan="3"><span class="mb_email"><?=$row_agent['mb_email']?></span></td>
					</tr>
				</tbody>
				</table>
			</td>
		</tr>
		<tr>
			<td valign="top" colspan="3" height="10px"></td>
		</tr>			
		<tr>
			<td valign="top" colspan="3">
				<div class="pop_title">담당자 정보</div>
			</td>
		</tr>			
		<tr>
			<td colspan="3">
			<table width="100%" border="0" cellspacing="0" cellpadding="0" class="setting_write">
				<tbody>
				<tr>
					<th width="100">담당자</th>
					<th width="100">등록자</th>
					<th width="100">등록일</th>
					<th width="100">수정자</th>
					<th width="100">수정일</th>
				</tr>
				<tr>
					<td><select name="admin_id" id="admin_id" hname="담당자" required>
							<option value="">==선택==</option>
							<?
								for($i=0 ; $i < count($admin_arr) ; $i++){
									$arr = $admin_arr[$i];
							?>
							<option value="<?=$arr['mb_id']?>" <?=($arr['mb_id']==$row['admin_id'])?"selected":""?>><?=$arr['mb_nm']?></option>
						<?}?></select></td>
						<td><?=$TO_MB['mb_nm']?></td>
						<td><?=$row['ins_dt2']?></td>
						<td><?=$row['edit_nm']?></td>
						<td><?=$row['edit_dt2']?></td>					
					</tr>
				</tbody>
			</table>			
			</td>
		</tr>
		
	</table>	
</div>
<!-- ********************************************/예약자정보******************************************** -->

<!-- ********************************************상품정보******************************************** -->
<div id="cont02">
<?
$rtab = '2';
include "good_res_tab.php";
?>
	<table width="100%" border="0" cellspacing="0" cellpadding="0">	
		<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="상태버튼"> 수동발송 </span>
				</div> 
	
				<div class="r_btn">
					<? if ($row['res_stat_cd'] != "D" ) { ?>
						<? if ($row['res_stat_cd'] == "R" or $row['res_stat_cd'] == "N" ) { // 대기상태(R)?>
						<input type="button" value="예약확정" class="Table_btn red2" onclick="if(!confirm('예약확정하시겠습니까?'))return;ajax_loader('../res_good/good_res_proc.html?SqlType=res_fix&res_no=<?=$res_no?>');"> 
						<? } ?>
						<input type="button" value="예약취소" class="Table_btn gray" onclick="if(!confirm('정말 취소하시겠습니까?'))return;ajax_loader('../res_good/good_res_proc.html?SqlType=res_cancel&res_no=<?=$res_no?>&ev_uid=<?=$row['ev_uid']?>');">
					<?}?>
				</div>-->
	
				<div class="lo_right" style="color:<?=$row['res_stat_color']?>;"><?=$row['res_stat_str']?></div>
	
				</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="70">진행전달</th>
						<?for($i=0 ; $i<count($res_type_arr); $i++) {
								$arr = $res_type_arr[$i];
						?>
						<td><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>&nbsp;</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'=>'RESP','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="<?=cut_str($v['subj'],10,'...')?>" 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 blue" 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 blue" onclick="to_dialog.iframe('../reservation/history_mailsms.html?type=M&res_no=<?=$res_no?>','메일발송내역','700','440',true,true,'yes');"></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'=>'RESP','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="<?=cut_str($v['subj'],10,'...')?>" 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']?>">
								</div>
							<?}?>
						</td>
						<?}?>
							<td><input type="button" name="" value="일반SMS" class="Table_btn green" 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 green" onclick="to_dialog.iframe('../reservation/history_mailsms.html?res_no=<?=$res_no?>&type=S','SMS발송내역','700','440',true,true,'yes');"></td>
					</tr>
					-->
					</tbody>
					</table>
			</td>
		</tr>
		<tr>
			<td valign="top" colspan="3" height="15"></td>
		</tr>		
	</table>
	

	<table width="100%" border="0" cellspacing="0" cellpadding="0">	
		<tr>
			<td valign="top" colspan="3">
				<div class="pop_title"><div class="lo_left">상품정보</div> 
			</td>
		</tr>	
		<tr>
			<td valign="top" colspan="3">
				<table width="100%" border="0" cellspacing="0" cellpadding="0" class="setting_write">
				<tbody>
					<tr>
						<th width="70">접수번호</th>
						<td><?=$row['res_no']?></td>
						<th width="70">예약번호</th>
						<td><input type="text" class="input_text" name="rsv_no" id="rsv_no" value="<?=$row['rsv_no']?>" size="30" readonly>
							<!--( <input type="checkbox" id="rsv_no_1" onclick="if($(this).prop('checked')==true){$('#rsv_no').val('<?=$row['res_no']?>');}else{$('#rsv_no').val('');}"> <label for="rsv_no_1">접수번호와 동일</label> )-->
						</td>
					</tr>
					</tbody>
				</table>				
			</td>
		</tr>		
		<tr>
			<td valign="top" colspan="3" height="15"></td>
		</tr>				
		<tr>
			<td valign="top"  colspan="3">
				<table width="100%" border="0" cellspacing="0" cellpadding="0" class="setting_write">
				<tbody>
					<tr>
						<th width="70">상품명</th>
						<td>
							<input type="text" class="input_text" id="" name="" value="<?=$row['g_title']?>" size="50" readonly title="<?=$row['g_title']?>">
						</td>
						<?php // 단독투어
						if ($row['gdt']=="pe") {
						?>
						<th width="70">1<?=$row['date']['d_pe_people_unit']?>(<?=$row['date']['d_pe_people_inwon']?>인기준)</th>
						<td width="400">
							<input name="adult_inwon" class="input_text" style="text-align: right; -ms-ime-mode: disabled;" onkeydown="ChkNum(this,event);" onblur="if($(this).val()!=$(this).attr('value_old')) date_dw_cal38();" type="text" size="5" maxlength="3" value="<?=$row['gdt_pe_daesu']?>" value_old="<?=$row['gdt_pe_daesu']?>" readonly><?=$row['date']['d_pe_people_unit']?>
						</td>						
					
						<?php }else{?>
						
						<th width="70">성인</th>
						<td width="400">
							<input name="adult_inwon" class="input_text" style="text-align: right; -ms-ime-mode: disabled;" onkeydown="ChkNum(this,event);" onblur="if($(this).val()!=$(this).attr('value_old')) add_person('A',$(this).val());" type="text" size="5" maxlength="3" value="<?=$row['adult_inwon']?>" value_old="<?=$row['adult_inwon']?>" readonly>명
						</td>			
						<?php }?>			
					</tr>
					<tr>
						<th width="70">행사명</th>
						<td>
							<input type="text" class="input_text" id="" name="" value="<?=$row['ev_title']?>" size="50" readonly title="<?=$row['ev_title']?>">
							<!--<input type="button" name="" value="예약추가" class="Table_btn red" onclick="if(!confirm('<?=$row['res_cust_nm']?>고객정보로 새로운예약이 진행됩니다.\n계속진행하시겠습니까?'))return;document.location.href='goodResReg.html?SqlType=reserv_ins_addon&res_no=<?=$res_no?>';"> 
							<input type="button" name="" value="행사변경" class="Table_btn red2" onclick="if(!confirm('행사를 변경합니다.\n계속진행하시겠습니까?'))return;to_dialog.iframe('../res_good/again_good_res.html?res_no=<?=$res_no?>&nextloadwx=res_ev_updt','추가','1000','550',true,true,'yes');">-->
						</td>
						<th width="70"><?php if($row['gdt']!="pe") {?>소인<?php }?></th>
						<td>
							<?php if($row['gdt']!="pe") {?>
							<input name="child_inwon" class="input_text" style="text-align: right; -ms-ime-mode: disabled;" onkeydown="ChkNum(this,event);" onblur="if($(this).val()!=$(this).attr('value_old')) add_person('C',$(this).val());" type="text" size="5" maxlength="3" value="<?=$row['child_inwon']?>" value_old="<?=$row['child_inwon']?>" readonly>명
							<?php }?> 
						</td>								
					</tr>
					<?
					############## 패키지여행 ###################
					if($row['tab']=="P"){?>
					<tr>
						<th>출발일정</th>
						<td><?=$row['ev_start']?>(<?=$row['ev_start_yoil']?>) / <?=$row['date']['d_starttime3']?> <?=$row['date']['d_plane1_img']?> <?=$row['date']['d_plane1']?></td>
						<th>유아</th>
						<td>
							<input name="baby_inwon" class="input_text" style="text-align: right; -ms-ime-mode: disabled;" onkeydown="ChkNum(this,event);" onblur="if($(this).val()!=$(this).attr('value_old')) add_person('B',$(this).val());" type="text" size="5" maxlength="3" value="<?=$row['baby_inwon']?>"  value_old="<?=$row['baby_inwon']?>" readonly>명
						</td>								
					</tr>
					<tr>
						<th>도착일정</th>
						<td><?=$row['ev_end']?>(<?=$row['ev_end_yoil']?>) / <?=$row['date']['d_endtime3']?> <?=$row['date']['d_plane2_img']?> <?=$row['date']['d_plane2']?></td>
						<th>영아</th>
						<td>
							<input name="infant_inwon" class="input_text" style="text-align: right; -ms-ime-mode: disabled;" onkeydown="ChkNum(this,event);" onblur="if($(this).val()!=$(this).attr('value_old')) add_person('I',$(this).val());" type="text" size="5" maxlength="3" value="<?=$row['infant_inwon']?>" value_old="<?=$row['infant_inwon']?>" readonly>명	
						</td>								
					</tr>
					<?}
					############## 데이투어 ###################
					else{
					?>
					<tr>
						<th>출발일정</th>
						<td><?=$row['ev_start']?>(<?=$row['ev_start_yoil']?>) <?=$row['date']['d_starttime3']?></td>
						<th><?php if($row['gdt']!="pe") {?>유아<?php }?></th>
						<td>
							<?php if($row['gdt']!="pe") {?>
							<input name="baby_inwon" class="input_text" style="text-align: right; -ms-ime-mode: disabled;" onkeydown="ChkNum(this,event);" onblur="" type="text" size="5" maxlength="3" value="<?=$row['baby_inwon']?>" value_old="<?=$row['baby_inwon']?>" readonly>명
							<?php }?>
						</td>							
					</tr>
					<tr>
						<th>도착일정</th>
						<td>&nbsp;</td>
						<th><?php if($row['gdt']!="pe") {?>영아<?php }?></th>
						<td>
							<?php if($row['gdt']!="pe") {?>
							<input name="infant_inwon" class="input_text" style="text-align: right; -ms-ime-mode: disabled;" onkeydown="ChkNum(this,event);" onblur="" type="text" size="5" maxlength="3" value="<?=$row['infant_inwon']?>" value_old="<?=$row['infant_inwon']?>" readonly>명
							<?php }?>
						</td>								
					</tr>					
					<?}?>
					<tr>
						<th>행사기간</th>
						<td><?=$row['date']['d_period']?></td>					
						<th 11>총인원</th>
						<td><span id="item_person_inwon"><?=$row['inwon']?></span> 명</td>				
					</tr>
	
					<!--
					<?php 
					#########################티켓/패스###########################
					if($row['tab']=="T") {?>
					<tr>
						<th>주의및이용</th>
						<td colspan="3">
							<input type="button" name="" value=" 안 &nbsp; &nbsp; 내 " class="Table_btn" onclick="parent.parent.to_dialog.iframe('../reservation/mail_send.html?type=good&cust_email=<?=$row['res_cust_email']?>&cust_nm=<?=$row['res_cust_nm']?>&tab=<?=$row['tab']?>&res_no=<?=$res_no?>&item=t_include&title=<?=urlencode("주의및이용안내")?>','주의및 이용안내 발송','1000','750',true,true,'no');"> &nbsp; 
						</td>
					</tr>
					<?php }
					
					#########################패키지,데이투어###########################
					else{?>
					<tr>
						<th>이용안내</th>
						<td colspan="3">
							<input type="button" name="" value="일 정 표" class="Table_btn" onclick="parent.parent.to_dialog.iframe('../reservation/mail_send.html?type=good&cust_email=<?=$row['res_cust_email']?>&cust_nm=<?=$row['res_cust_nm']?>&tab=<?=$row['tab']?>&res_no=<?=$res_no?>&item=d_content&title=<?=urlencode("일정표")?>','일정표 발송','1000','750',true,true,'yes');"> &nbsp; 
							<input type="button" name="" value="포함내역" class="Table_btn" onclick="parent.parent.to_dialog.iframe('../reservation/mail_send.html?type=good&cust_email=<?=$row['res_cust_email']?>&cust_nm=<?=$row['res_cust_nm']?>&tab=<?=$row['tab']?>&res_no=<?=$res_no?>&item=include&title=<?=urlencode("포함내역")?>','포함내역 발송','1000','750',true,true,'yes');"> &nbsp; 
							<input type="button" name="" value="불포함내역" class="Table_btn" onclick="parent.parent.to_dialog.iframe('../reservation/mail_send.html?type=good&cust_email=<?=$row['res_cust_email']?>&cust_nm=<?=$row['res_cust_nm']?>&tab=<?=$row['tab']?>&res_no=<?=$res_no?>&item=noinclude&title=<?=urlencode("불포함내역")?>','불포함내역 발송','1000','750',true,true,'yes');"> &nbsp; 
							<input type="button" name="" value="유의사항" class="Table_btn" onclick="parent.parent.to_dialog.iframe('../reservation/mail_send.html?type=good&cust_email=<?=$row['res_cust_email']?>&cust_nm=<?=$row['res_cust_nm']?>&tab=<?=$row['tab']?>&res_no=<?=$res_no?>&item=rule&title=<?=urlencode("유의사항")?>','유의사항 발송','1000','750',true,true,'yes');">
						 일정표 포함내역 불포함내역 유의사항</td>
					</tr>				
					<?php }?>
					<tr>
						<th>비고</th>
						<td colspan="3"><textarea name="admin_comt" id="admin_comt" cols="170" rows="7" ><?=$row['admin_comt']?></textarea></td>
					</tr>
					-->
				</tbody>
				</table>
			</td>
			</tr>
		<!--	
		<tr>
			<td valign="top" colspan="4" height="35" style="padding-top:10px;text-align: right;">
				<input type="button" class="Table_btn red item_addon_price_add" value="항목추가(+)" > &nbsp; <input type="button" class="Table_btn blue item_addon_price_del" 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_addon_price_ck_all" value=""></th>
							<th width="180" style="text-align:center;">항목</th>
							<th width="130" style="text-align:center;">이용일자</th>
							<th style="text-align:center;">매입금액(1인)</th>
							<th style="text-align:center;">판매금액(1인)</th>
							<th width="100" style="text-align:center;"><?php if($row['gdt']=="pe") {?><?=$row['date']['d_pe_people_unit']?><?php }else{?>인원<?php }?></th>
							<th width="150" style="text-align:center;">매입금액 소계</th>
							<th width="150" style="text-align:center;">판매금액 소계</th>
							<th width="" style="text-align:center;">비고</th>
							<th width="40" style="text-align:center;">-</th>
						</tr>
						<!-- 성인/소인/유아/영아 가격정보 -->
						<?// 단독투어
						if($row['tab']=="D" and $row['gdt']=="pe") {?>	
							<!-- 데이투어>단독투어 가격계산용 -->
							<INPUT TYPE="hidden" NAME="child_price" value="0">
							<INPUT TYPE="hidden" NAME="baby_price" value="0">
							<INPUT TYPE="hidden" NAME="infant_price" value="0">			
							<INPUT TYPE="hidden" NAME="child_buy" value="0">
							<INPUT TYPE="hidden" NAME="baby_buy" value="0">
							<INPUT TYPE="hidden" NAME="infant_buy" value="0">											
							<tr style="text-align:center;">
								<td></td>
								<td style="text-align: left;">1<?=$row['date']['d_pe_people_unit']?>(<?=$row['date']['d_pe_people_inwon']?>인기준)</td>
								<td><?=$row['ev_start']?></td>
								<td><input type="text" class="input_text" id="" name="adult_buy" value="<?=number_format($row['adult_buy'])?>" value_old="<?=number_format($row['adult_buy'])?>" size="12" style="text-align:right;ime-mode:disabled;" onkeydown="ChkNum(this,event);" onblur="this.value=comma(this.value);if($(this).val()!=$(this).attr('value_old'))date_dw_cal38();" readonly></td>
								<td><input type="text" class="input_text" id="" name="adult_price" value="<?=number_format($row['adult_price'])?>" value_old="<?=number_format($row['adult_price'])?>" size="12" style="text-align:right;ime-mode:disabled;" onkeydown="ChkNum(this,event);" onblur="this.value=comma(this.value);if($(this).val()!=$(this).attr('value_old'))date_dw_cal38();"  readonly></td>
								<td style="text-align:right;"><span id="item_adult_inwon"><?=number_format($row['gdt_pe_daesu'])?></span></td>
								<td style="text-align:right;"><span id="item_adult_buy"><?=number_format($row['adult_buy_tot'])?></span></td>
								<td style="text-align:right;"><span id="item_adult_price"><?=number_format($row['adult_price_tot'])?></span></td>
								<td><input type="text" name="adult_comt" size="20" class="input_text" value="<?=$row['adult_comt']?>"  readonly></td>
								<td>-</td>
							</tr>							
						<?}// 패키지
						else {?>			
							<tr style="text-align:center;">
								<td></td>
								<td>성인</td>
								<td><?=$row['ev_start']?></td>
								<td><input type="text" class="input_text" id="" name="adult_buy" value="<?=number_format($row['adult_buy'])?>" value_old="<?=number_format($row['adult_buy'])?>" size="12" style="text-align:right;ime-mode:disabled;" onkeydown="ChkNum(this,event);" onblur="this.value=comma(this.value);if($(this).val()!=$(this).attr('value_old'))date_dw_cal38();" readonly></td>
								<td><input type="text" class="input_text" id="" name="adult_price" value="<?=number_format($row['adult_price'])?>" value_old="<?=number_format($row['adult_price'])?>" size="12" style="text-align:right;ime-mode:disabled;" onkeydown="ChkNum(this,event);" onblur="this.value=comma(this.value);if($(this).val()!=$(this).attr('value_old'))date_dw_cal38();" readonly></td>
								<td style="text-align:right;"><span id="item_adult_inwon"><?=number_format($row['adult_inwon'])?></span></td>
								<td style="text-align:right;"><span id="item_adult_buy"><?=number_format($row['adult_buy_tot'])?></span></td>
								<td style="text-align:right;"><span id="item_adult_price"><?=number_format($row['adult_price_tot'])?></span></td>
								<td><input type="text" name="adult_comt" size="20" class="input_text" value="<?=$row['adult_comt']?>" readonly></td>
								<td>-</td>
							</tr>		
							<tr style="text-align:center;">
								<td></td>
								<td>소인</td>
								<td><?=$row['ev_start']?></td>
								<td><input type="text" class="input_text" id="" name="child_buy" value="<?=number_format($row['child_buy'])?>" value_old="<?=number_format($row['child_buy'])?>" size="12" style="text-align:right;ime-mode:disabled;" onkeydown="ChkNum(this,event);" onblur="this.value=comma(this.value);if($(this).val()!=$(this).attr('value_old'))date_dw_cal38();" readonly></td>
								<td><input type="text" class="input_text" id="" name="child_price" value="<?=number_format($row['child_price'])?>" value_old="<?=number_format($row['child_price'])?>" size="12" style="text-align:right;ime-mode:disabled;" onkeydown="ChkNum(this,event);" onblur="this.value=comma(this.value);if($(this).val()!=$(this).attr('value_old'))date_dw_cal38();" readonly></td>
								<td style="text-align:right;"><span id="item_child_inwon"><?=number_format($row['child_inwon'])?></span></td>
								<td style="text-align:right;"><span id="item_child_buy"><?=number_format($row['child_buy_tot'])?></span></td>
								<td style="text-align:right;"><span id="item_child_price"><?=number_format($row['child_price_tot'])?></span></td>
								<td><input type="text" name="child_comt" size="20" class="input_text" value="<?=$row['child_comt']?>" readonly></td>
								<td>-</td>
							</tr>		
							<tr style="text-align:center;">
								<td></td>
								<td>유아</td>
								<td><?=$row['ev_start']?></td>
								<td><input type="text" class="input_text" id="" name="baby_buy" value="<?=number_format($row['baby_buy'])?>" value_old="<?=number_format($row['baby_buy'])?>" size="12" style="text-align:right;ime-mode:disabled;" onkeydown="ChkNum(this,event);" onblur="this.value=comma(this.value);if($(this).val()!=$(this).attr('value_old'))date_dw_cal38();" readonly></td>
								<td><input type="text" class="input_text" id="" name="baby_price" value="<?=number_format($row['baby_price'])?>" value_old="<?=number_format($row['baby_price'])?>" size="12" style="text-align:right;ime-mode:disabled;" onkeydown="ChkNum(this,event);" onblur="this.value=comma(this.value);if($(this).val()!=$(this).attr('value_old'))date_dw_cal38();" readonly></td>
								<td style="text-align:right;"><span id="item_baby_inwon"><?=number_format($row['baby_inwon'])?></span></td>
								<td style="text-align:right;"><span id="item_baby_buy"><?=number_format($row['baby_buy_tot'])?></span></td>
								<td style="text-align:right;"><span id="item_baby_price"><?=number_format($row['baby_price_tot'])?></span></td>
								<td><input type="text" name="baby_comt" size="20" class="input_text" value="<?=$row['baby_comt']?>" readonly></td>
								<td>-</td>
							</tr>		
							<tr style="text-align:center;">
								<td></td>
								<td>영아</td>
								<td><?=$row['ev_start']?></td>
								<td><input type="text" class="input_text" id="" name="infant_buy" value="<?=number_format($row['infant_buy'])?>" value_old="<?=number_format($row['infant_buy'])?>" size="12" style="text-align:right;ime-mode:disabled;" onkeydown="ChkNum(this,event);" onblur="this.value=comma(this.value);if($(this).val()!=$(this).attr('value_old'))date_dw_cal38();" readonly></td>
								<td><input type="text" class="input_text" id="" name="infant_price" value="<?=number_format($row['infant_price'])?>" value_old="<?=number_format($row['infant_price'])?>" size="12" style="text-align:right;ime-mode:disabled;" onkeydown="ChkNum(this,event);" onblur="this.value=comma(this.value);if($(this).val()!=$(this).attr('value_old'))date_dw_cal38();" readonly></td>
								<td style="text-align:right;"><span id="item_infant_inwon"><?=number_format($row['infant_inwon'])?></span></td>
								<td style="text-align:right;"><span id="item_infant_buy"><?=number_format($row['infant_buy_tot'])?></span></td>
								<td style="text-align:right;"><span id="item_infant_price"><?=number_format($row['infant_price_tot'])?></span></td>
								<td><input type="text" name="infant_comt" size="20" class="input_text" value="<?=$row['infant_comt']?>" readonly></td>
								<td>-</td>
							</tr>																											
						<?}?>	
						<!-- /성인/소인/유아/영아 가격정보 -->
						<!-- 옵션 가격정보 -->
						<?
							for($i=0 ; $i<count($row['d_good_option_all']) ; $i++) {
								$r = $row['d_good_option_all'][$i];
						?>
						<tr style="text-align:center;">
							<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 style="text-align: center;"><?=$row['ev_start']?></td>
							<td><input type="text" class="input_text" id="" name="op_price_buy_arr[]" value="<?=number_format($r['op_price_buy'])?>" value_old="<?=number_format($r['op_price_buy'])?>" size="12" style="text-align:right;ime-mode:disabled;" onkeydown="ChkNum(this,event);" onblur="this.value=comma(this.value);if($(this).val()!=$(this).attr('value_old'))date_dw_cal38();" readonly></td>
							<td><input TYPE="text" NAME="op_price_sell_arr[]" class="input_text" value="<?=($row['agent_id'])?number_format($r['op_price_agent']):number_format($r['op_price_sell'])?>" value_old="<?=($row['agent_id'])?number_format($r['op_price_agent']):number_format($r['op_price_sell'])?>" style="text-align:right;ime-mode:disabled;" onkeydown="ChkNum(this,event);" onblur="this.value=comma(this.value);if($(this).val()!=$(this).attr('value_old'))date_dw_cal38();" maxlength="10" size="12" title="판매금액" readonly></td>
							<td style="text-align:right;"><input name="op_num_arr[]" class="input_text" style="text-align: right; -ms-ime-mode: disabled;" onkeydown="ChkNum(this,event);" onblur="if($(this).val()!=$(this).attr('value_old'))date_dw_cal38();" type="text" size="5" maxlength="4" value="<?=$r['op_num']?>" value_old="<?=$r['op_num']?>"  readonly></td>
							<td style="text-align:right;"><span class="item_option_buy">0</span></td>
							<td style="text-align:right;"><span class="item_option_sale">0</span></td>
							<td><input type="text" name="op_comt_arr[]" size="20" class="input_text" value="<?=$r['op_comt']?>" readonly></td>	
							<td>-</td>							
						</tr>
						<?}?>						
						<!-- /옵션 가격정보 -->	
						</thead>	
						<!-- 추가 가격정보 -->
						<tbody>
						<?if(is_array($row['d_good_addon_all'])){foreach($row['d_good_addon_all'] as $r){?>
							<tr style="text-align:center;">
								<td><input type="checkbox" name="" class="item_addon_price_ck" value=""></td>
								<td style="text-align: center;"><input name="itemnm_arr[]" type="text" class="input_text"  value="<?=$r['op_nm']?>" size="20"  readonly></td>
								<td style="text-align: center;"><input name="usdt_arr[]" type="text" class="cal_input"  value="<?=$r['usdt']?>"  readonly onclick="AjaxCal(this,event)" size="15"  readonly></td>
								<td><input name="addon_buy_arr[]" class="input_text" 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'))date_dw_cal38();" type="text" size="10" maxlength="15" value="<?=number_format($r['op_price_buy'])?>" value_old="<?=number_format($r['op_price_buy'])?>" readonly></td>
								<td><input name="addon_sale_arr[]" class="input_text" 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'))date_dw_cal38();" type="text" size="10" maxlength="15" value="<?=number_format($r['op_price_sell'])?>" value_old="<?=number_format($r['op_price_sell'])?>" readonly></td>
								<td style="text-align:right;"><input name="addon_inwon_arr[]" class="input_text item_inwon" style="text-align: right; -ms-ime-mode: disabled;" onkeydown="ChkNum(this,event);" onblur="if($(this).val()!=$(this).attr('value_old'))date_dw_cal38();" type="text" size="5" maxlength="4" value="<?=$r['op_num']?>" value_old="<?=$r['op_num']?>"  readonly></td>
								<td style="text-align:right;"><span class="item_buy_price">0</span></td>
								<td style="text-align:right;"><span class="item_sale_price">0</span></td>
								<td><input type="text" name="addon_comt_arr[]" size="20" class="input_text" value="<?=$r['op_comt']?>" readonly></td>
								<td><!--<input type="button" class="Table_btn blue" value="삭제" onclick="$(this).parent().parent().remove();date_dw_cal38();">--></td>
							</tr>
						<?}}?>		
						</tbody>									
						<!-- /추가 가격정보 -->												
					<thead>
					<!--
					<tr style="text-align:center;">
						<td></td>
						<td>할인(-)</td>
						<td></td>
						<td></td>
						<td></td>
						<td></td>
						<td style="text-align:right;">(-)<input name="discount_buy" class="input_text" 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'))date_dw_cal38();" type="text" size="10" maxlength="15" value="<?=number_format($row['discount_buy'])?>" value_old="<?=number_format($row['discount_buy'])?>"></td>
						<td style="text-align:right;">(-)<input name="discount_sale" class="input_text" 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'))date_dw_cal38();" type="text" size="10" maxlength="15" value="<?=number_format($row['discount_sale'])?>" value_old="<?=number_format($row['discount_sale'])?>"></td>
						<td><input type="text" name="discount_cmt" size="20" class="input_text" value="<?=$row['discount_cmt']?>"></td>
						<td></td>
					</tr>	
					-->
					<tr style="text-align:center;">
						<td></td>
						<td>합계</td>
						<td colspan="4"></td>
						<td style="text-align:right;"><span id="item_buy_gtot"><?=number_format($buy_gtot)?></span></td>
						<td style="text-align:right;"><span id="item_sale_gtot"><?=number_format($sale_gtot)?></span></td>
						<td colspan="2"></td>
					</tr>		
					</thead>				
					</table>
			</td>
		</tr>		
		
	</table>	
</div>	
<script type="text/javascript">
$(function() {
	$(".input_text").on("blur",function(){
		var val_old = $(this).attr("value_old");
		if($(this).val()!=val_old) $(this).attr("value_old",$(this).val());
	});

	// 대리점 선택
	$("#agent_id").on("change",function(){
		var data=<?=json_encode($agent_arr)?>;
		var data_option=<?=json_encode($row['d_good_option_all'])?>;
		var agent_id='';

		agent_id = $(this).val();

		/*
		 * 성인,아동,유아,영아 가격 변경
		 * 옵션가 판매및 대리점판매 변경
	     */

	  	// 성인,아동,유아,영아 가격 변경(대리점)
		if(agent_id){
			$.each(data,function(k,r){
				if(r.agent_id==agent_id){
					$("#frm_reserv_good input[name='adult_price']").val(number_format(r.adult_price.toString()));
					$("#frm_reserv_good input[name='child_price']").val(number_format(r.child_price.toString()));
					$("#frm_reserv_good input[name='baby_price']").val(number_format(r.baby_price.toString()));
					$("#frm_reserv_good input[name='infant_price']").val(number_format(r.infant_price.toString()));
					$(".item_agent_disp .agent_comm_info").html(number_format(r.agent_comm.toString())+r.agent_comm_unit);
				}
			});
			
			// 옵션가 판매및 대리점판매 변경
			$.each(data_option,function(k,r){
				$("#frm_reserv_good input[name='opid_arr[]']").each(function(){
					if($(this).val()==r.opid) $(this).parent().parent().find("input[name='op_price_sell_arr[]']").val(r.op_price_agent);
				});
			});
			
		}

		// 성인,아동,유아,영아 가격 변경
		else {
			$("#frm_reserv_good input[name='adult_price']").val("<?=number_format($row['adult_price'])?>");
			$("#frm_reserv_good input[name='child_price']").val("<?=number_format($row['child_price'])?>");
			$("#frm_reserv_good input[name='baby_price']").val("<?=number_format($row['baby_price'])?>");
			$("#frm_reserv_good input[name='infant_price']").val("<?=number_format($row['infant_price'])?>");
			$(".item_agent_disp .agent_comm_info").html('');
			
			// 옵션가 판매및 대리점판매 변경
			$.each(data_option,function(k,r){
				$("input[name='opid_arr[]']").each(function(){
					if($(this).val()==r.opid) $(this).parent().parent().find("input[name='op_price_sell_arr[]']").val(r.op_price_sell);
				});
			});			
		}

		if(!agent_id) {
			$("#adult_price").val($("#adult_price").attr("o_price"));
			$("#child_price").val($("#child_price").attr("o_price"));
			$("#baby_price").val($("#baby_price").attr("o_price"));
			$("#infant_price").val($("#infant_price").attr("o_price"));

			$(".item_agent_disp .mb_nm").html('');
			$(".item_agent_disp .mb_tel").html('');
			$(".item_agent_disp .mb_phone").html('');
			$(".item_agent_disp .mb_email").html('');
			$(".item_agent_disp .agent_comm_info").html('');
		}
	
		var url = '../reservation/jsonMemberInfo.html';
		var q = 'mb_id='+agent_id;

		$.post(url,q,function(data){
			if(data.mb_id){
					$(".item_agent_disp .mb_nm").html(data.mb_nm);
					$(".item_agent_disp .mb_tel").html(data.mb_tel);
					$(".item_agent_disp .mb_phone").html(data.mb_phone);
					$(".item_agent_disp .mb_email").html(data.mb_email);
			}
		},'json');
		
		date_dw_cal38(); // 판매금액 계산
	});	
});

//동행자 추가
function add_person(t,num)
{
	if (typeof(t)!='string') return;

	if (!num) num = 0;

	var str = $("#table_tr_template").val();// tr에 들어갈 row
	var generation = "";

	// 추가된 인원수 카운터
	var cnt = $("#frm_reserv_good input[name='name_kor_arr[]']").length;
	
	// 데이투어 > 개인투어 대(팀)수 체크
	var inwon=$("#frm_reserv_good select[name='adult_inwon']").val();
	var d_pe_people_inwon=parseInt('<?=$row['date']['d_pe_people_inwon']?>'); // 기준인원수
	var inw = inwon * parseInt(d_pe_people_inwon);

	if(tab=='D' && gdt=='pe' && cnt >= inw) {
		alert('대(팀)수를 초과하실수 없습니다.');
		return;
	}
	
	// 기존 값 백업
	var arr_person=new Array();
	var i=0;
	$("#table_person input[name='generation_arr[]']").each(function(index){
		var str='';
		
		if($(this).val()==t) {
			str=$(this).val()+'||@||';
			
			str=str+$(this).parent().parent().find("select[name='gend_arr[]']").val()+'||@||';
			str=str+$(this).parent().parent().find("input[name='name_kor_arr[]']").val()+'||@||';
			str=str+$(this).parent().parent().find("input[name='name_eng1_arr[]']").val()+'||@||';
			str=str+$(this).parent().parent().find("input[name='name_eng2_arr[]']").val()+'||@||';
			str=str+$(this).parent().parent().find("input[name='hp_arr[]']").val()+'||@||';
			str=str+$(this).parent().parent().find("input[name='tel_arr[]']").val()+'||@||';
			str=str+$(this).parent().parent().find("select[name='poid_arr[]']").val()+'||@||';
			str=str+$(this).parent().parent().find("input[name='birth_dt_arr[]']").val()+'||@||';
			str=str+$(this).parent().parent().find("input[name='passenger_num_arr[]']").val()+'||@||';
			str=str+$(this).parent().parent().find("input[name='passenger_expire_arr[]']").val()+'||@||';
			str=str+$(this).parent().parent().find("input[name='remarks_arr[]']").val();
	        
			arr_person[i]=str;
			i++;
		}
	});

	switch (t) {
		case "A":
			generation = "<input type='hidden' name='generation_arr[]' value='A'>성인";
			$("#item_adult_inwon").html(num);
		break;
		case "C":
			generation = "<input type='hidden' name='generation_arr[]' value='C'>소인";
			$("#item_child_inwon").html(num);
		break;
		case "B":
			generation = "<input type='hidden' name='generation_arr[]' value='B'>유아";
			$("#item_baby_inwon").html(num);
		break;
		case "I":
			generation = "<input type='hidden' name='generation_arr[]' value='I'>영아";
			$("#item_infant_inwon").html(num);
		break;
	}

	// 인원 추가
	$("#table_person input[name='generation_arr[]']").each(function(){
		if($(this).val()==t) 
			$(this).parent().parent("tr").remove();
	});
	str = str.replace('{GENERATION}',generation);
	for(var i=0 ; i<num ; i++) {
		$("#table_person").append(str);
	}

	// 기존 값 복구
	for(var i=0;i<arr_person.length;i++) {
		var arr=arr_person[i].split("||@||");
		var sw=true;
		
		$("#table_person input[name='generation_arr[]']").each(function(index){
			if($(this).val()==t && !$(this).parent().parent().find("input[name='name_kor_arr[]']").val() && sw==true) {
				$(this).parent().parent().find("select[name='gend_arr[]']").val(arr[1]).attr("selected","selected");
				$(this).parent().parent().find("input[name='name_kor_arr[]']").val(arr[2]);
				$(this).parent().parent().find("input[name='name_eng1_arr[]']").val(arr[3]);
				$(this).parent().parent().find("input[name='name_eng2_arr[]']").val(arr[4]);
				$(this).parent().parent().find("input[name='hp_arr[]']").val(arr[5]);
				$(this).parent().parent().find("input[name='tel_arr[]']").val(arr[6]);
				$(this).parent().parent().find("select[name='poid_arr[]']").val(arr[7]).attr("selected","selected");
				$(this).parent().parent().find("input[name='birth_dt_arr[]']").val(arr[8]);
				$(this).parent().parent().find("input[name='passenger_num_arr[]']").val(arr[9]);
				$(this).parent().parent().find("input[name='passenger_expire_arr[]']").val(arr[10]);
				$(this).parent().parent().find("input[name='remarks_arr[]']").val(arr[11]);

				sw=false;
			}
		});
	}


	// 가격계산
	date_dw_cal38();
}

// 동행자 삭제
function del_row($o)
{
	// 동행자 구분
	var t = $o.parent().parent().find("input[name='generation_arr[]']").val();

	// 인원수 
	var adult_inwon = parseInt($("#frm_reserv_good input[name='adult_inwon']").val()); 
	var child_inwon = parseInt($("#frm_reserv_good input[name='child_inwon']").val());
	var baby_inwon = parseInt($("#frm_reserv_good input[name='baby_inwon']").val());
	var infant_inwon = parseInt($("#frm_reserv_good input[name='infant_inwon']").val()); 

	switch (t) {
		case "A":
			--adult_inwon;
			$("#frm_reserv_good input[name='adult_inwon']").val(adult_inwon);
			$("#frm_reserv_good input[name='adult_inwon']").attr("value_old",adult_inwon);
			$("#item_adult_inwon").html(adult_inwon);
		break;
		case "C":
			--child_inwon;
			$("#frm_reserv_good input[name='child_inwon']").val(child_inwon);
			$("#frm_reserv_good input[name='child_inwon']").attr("value_old",child_inwon);
			$("#item_child_inwon").html(child_inwon);
		break;
		case "B":
			--baby_inwon;
			$("#frm_reserv_good input[name='baby_inwon']").val(baby_inwon);
			$("#frm_reserv_good input[name='baby_inwon']").attr("value_old",baby_inwon);
			$("#item_baby_inwon").html(baby_inwon);
		break;
		case "I":
			--infant_inwon;
			$("#frm_reserv_good input[name='infant_inwon']").val(infant_inwon);
			$("#frm_reserv_good input[name='infant_inwon']").attr("value_old",infant_inwon);
			$("#item_infant_inwon").html(infant_inwon);
		break;
	}
	
	$o.parent().parent().remove();
	date_dw_cal38();
}

// 데이투어 > 개인투어 계산변수
var tab = '<?=$row['tab']?>';
var gdt = '<?=$row['gdt']?>';

// 판매금액 계산
function date_dw_cal38()
{
	// 대리점 ID
	var agent_id = $("#agent_id").val();

	/*
	* 성인,아동,유아,영아 가격 계산
	*/
	
	// 인원
	var adult_inwon = parseInt($("#frm_reserv_good input[name='adult_inwon']").val());
	var child_inwon = parseInt($("#frm_reserv_good input[name='child_inwon']").val());
	var baby_inwon = parseInt($("#frm_reserv_good input[name='baby_inwon']").val());
	var infant_inwon = parseInt($("#frm_reserv_good input[name='infant_inwon']").val());
	var person_inwon = adult_inwon+child_inwon+baby_inwon+infant_inwon;
	
	// 인원 : 데이투어(D) > 개인투어(pe)
	if(tab=='D' && gdt=='pe') {
		child_inwon=0
		baby_inwon=0;
		infant_inwon=0;		
		adult_inwon=$("#frm_reserv_good input[name='adult_inwon']").val();
		adult_inwon = parseInt(adult_inwon); // 성인인원을 대표로 사용(대/팀)

		// 개인투어 인원 카운터
		var ad_cnt=0,ch_cnt=0,ba_cnt=0,in_cnt=0;
		$("#frm_reserv_good select[name='generation_arr[]']").each(function(){
			switch($(this).val()){
				case "A":
						ad_cnt++;
					break;
				case "C":
						ch_cnt++;
					break;
				case "B":
						ba_cnt++;
					break;
				case "I":
						in_cnt++;
					break;
			}
		});
		person_inwon = ad_cnt+ch_cnt+ba_cnt+in_cnt;
		$("#item_adult_inwon").html(adult_inwon);
	}
	
	// 매입금액(1인)
	var adult_buy	= $("#frm_reserv_good input[name='adult_buy']").val().replace(/,/g,'');
	var child_buy	= $("#frm_reserv_good input[name='child_buy']").val().replace(/,/g,'');
	var baby_buy	= $("#frm_reserv_good input[name='baby_buy']").val().replace(/,/g,'');
	var infant_buy	= $("#frm_reserv_good input[name='infant_buy']").val().replace(/,/g,'');	
	
	// 판매금액(1인)
	var adult_price	= $("#frm_reserv_good input[name='adult_price']").val().replace(/,/g,'');
	var child_price		= $("#frm_reserv_good input[name='child_price']").val().replace(/,/g,'');
	var baby_price	= $("#frm_reserv_good input[name='baby_price']").val().replace(/,/g,'');
	var infant_price	= $("#frm_reserv_good input[name='infant_price']").val().replace(/,/g,'');
	
	// 매입금액 소계(=매입금액*인원)
	var adult_buy_tot = parseFloat(adult_inwon * adult_buy);
	var child_buy_tot = parseFloat(child_inwon * child_buy);
	var baby_buy_tot = parseFloat(baby_inwon * baby_buy);
	var infant_buy_tot = parseFloat(infant_inwon * infant_buy);	

	// 매입금액 소계 출력
	$("#item_adult_buy").html(number_format(adult_buy_tot.toString()));
	$("#item_child_buy").html(number_format(child_buy_tot.toString()));
	$("#item_baby_buy").html(number_format(baby_buy_tot.toString()));
	$("#item_infant_buy").html(number_format(infant_buy_tot.toString()));

	// 판매금액 소계(=판매금액*인원)
	var tot_adult = parseFloat(adult_inwon * adult_price);
	var tot_child = parseFloat(child_inwon * child_price);
	var tot_baby = parseFloat(baby_inwon * baby_price);
	var tot_infant = parseFloat(infant_inwon * infant_price);

	// 판매금액 소계 출력
	$("#item_adult_price").html(number_format(tot_adult.toString()));
	$("#item_child_price").html(number_format(tot_child.toString()));
	$("#item_baby_price").html(number_format(tot_baby.toString()));
	$("#item_infant_price").html(number_format(tot_infant.toString()));

	/*
	* 항목 추가가격 계산
	*/
	// 매입금액(1인)
	var addon_buy=0, addon_inwon=0, addon_buy_tot=0, addon_buy_gtot=0;
	$("#frm_reserv_good input[name='addon_buy_arr[]']").each(function(){
		addon_buy = parseInt($(this).val().replace(/,/g,''));
		addon_inwon = parseInt($(this).parent().parent().find("input[name='addon_inwon_arr[]']").val());
		addon_buy_tot = addon_buy*addon_inwon;
		$(this).parent().parent().find(".item_buy_price").html(number_format(addon_buy_tot.toString()));
		
		addon_buy_gtot+=addon_buy_tot;
	});
	
	// 판매금액(1인)
	var addon_sale=0, addon_sale_tot=0, addon_sale_gtot=0;
	$("#frm_reserv_good input[name='addon_sale_arr[]']").each(function(){
		addon_sale = parseInt($(this).val().replace(/,/g,''));
		addon_inwon = parseInt($(this).parent().parent().find("input[name='addon_inwon_arr[]']").val());
		addon_sale_tot = addon_sale*addon_inwon;
		$(this).parent().parent().find(".item_sale_price").html(number_format(addon_sale_tot.toString()));
		
		addon_sale_gtot+=addon_sale_tot;
	});

	/*
	*  옵션가격 계산
	*/
	var option_buy_tot=0, option_sale_tot=0, option_buy_gtot=0, option_sale_gtot=0;
	$("#frm_reserv_good input[name='op_num_arr[]']").each(function(){
		var option_buy=parseInt($(this).parent().parent().find("input[name='op_price_buy_arr[]']").val().replace(/,/g,'')); // 매입금액(1인)
		var option_sale=parseInt($(this).parent().parent().find("input[name='op_price_sell_arr[]']").val().replace(/,/g,'')); // 판매금액(1인)
		var option_num=parseInt($(this).val());  // 개수
		
			option_buy_tot = option_buy*option_num;
			option_sale_tot = option_sale*option_num;
			$(this).parent().parent().find(".item_option_buy").html(number_format(option_buy_tot.toString()));
			$(this).parent().parent().find(".item_option_sale").html(number_format(option_sale_tot.toString()));

			option_buy_gtot+=option_buy_tot;
			option_sale_gtot+=option_sale_tot;
	});

	/*
	*  할인금(-) 
	*/	
   var discount_buy = parseInt($("#frm_reserv_good input[name='discount_buy']").val().replace(/,/g,'')); // 매입금
   var discount_sale = parseInt($("#frm_reserv_good input[name='discount_sale']").val().replace(/,/g,'')); // 판매금
	
	// 
	/*
	*  매입금액 소계, 판매금액 소계
	*/		
	var buy_gtot = (adult_buy_tot+child_buy_tot+baby_buy_tot+infant_buy_tot) + addon_buy_gtot + option_buy_gtot;
	var sale_gtot = (tot_adult+tot_child+tot_baby+tot_infant) + addon_sale_gtot + option_sale_gtot;

	buy_gtot = buy_gtot-discount_buy;
	sale_gtot = sale_gtot-discount_sale;

	$("#item_buy_gtot").html(number_format(buy_gtot.toString()));
	$("#item_sale_gtot").html(number_format(sale_gtot.toString()));

	/*
	* 주요 합계 저장
	*/
	$("#frm_reserv_good input[name='option_buy_price']").val(option_buy_gtot); //  옵션 매입금액 계
	$("#frm_reserv_good input[name='option_price']").val(option_sale_gtot); // 옵션 판매금액 계
	$("#frm_reserv_good input[name='addon_buy_price']").val(addon_buy_gtot); // 추가 매입금액 합계
	$("#frm_reserv_good input[name='addon_sale_price']").val(addon_sale_gtot); // 추가 판매금액 합계
	$("#frm_reserv_good input[name='tot_adult']").val(tot_adult);
	$("#frm_reserv_good input[name='tot_child']").val(tot_child);
	$("#frm_reserv_good input[name='tot_baby']").val(tot_baby);
	$("#frm_reserv_good input[name='tot_infant']").val(tot_infant);	
	$("#frm_reserv_good input[name='buy_total']").val(buy_gtot); // 매입가 합계
	$("#frm_reserv_good input[name='sales_total']").val(sale_gtot); // 판매가 합계

	// 인원
	$("#item_person_inwon").html(person_inwon);
}

//  추가/할인 스크립트
var html_addon_price ='';
html_addon_price = '<tr style="text-align:center;">';
html_addon_price += '	<td><input type="checkbox" name="" class="item_addon_price_ck" value=""></td>';
html_addon_price += '	<td><input name="itemnm_arr[]" type="text" class="input_text"  value="" size="20" hname="항목" required></td>';
html_addon_price += '	<td><input name="usdt_arr[]" type="text" class="cal_input"  value="<?=date("Y-m-d")?>"  readonly onclick="AjaxCal(this,event)" size="15" hname="이용일자" required></td>';
html_addon_price += '	<td><input name="addon_buy_arr[]" class="input_text" 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\'))date_dw_cal38();" type="text" size="10" maxlength="15" value="0" value_old="0"></td>';
html_addon_price += '	<td><input name="addon_sale_arr[]" class="input_text" 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\'))date_dw_cal38();" type="text" size="10" maxlength="15" value="0" value_old="0"></td>';
html_addon_price += '	<td><input name="addon_inwon_arr[]" class="input_text item_inwon" style="text-align: right; -ms-ime-mode: disabled;" onkeydown="ChkNum(this,event);" onblur="if($(this).val()!=$(this).attr(\'value_old\'))date_dw_cal38();" type="text" size="5" maxlength="4" value="1"></td>';
html_addon_price += '	<td><span class="item_buy_price">0</span></td>';
html_addon_price += '	<td><span class="item_sale_price">0</span></td>';
html_addon_price += '	<td><input type="text" name="addon_comt_arr[]" class="input_text" size="20" value=""></td>';
html_addon_price += '	<td><input type="button" class="Table_btn blue" value="삭제" onclick="$(this).parent().parent().remove();date_dw_cal38();"></td>';
html_addon_price += '</tr>';

$(function(){
	$(".item_addon_price_add").on("click",function(){
		$(".item_addon_price_box tbody").append(html_addon_price);
	});
	
	$(".item_addon_price_ck_all").on("click",function(){
		var ck = $(this).prop("checked");
		
		$(".item_addon_price_ck").prop("checked",ck);
	});

	$(".item_addon_price_del").on("click",function(){
		$(".item_addon_price_ck:checked").parent().parent().remove();
		date_dw_calcul();
	});
});
</script>
<!-- ********************************************/상품정보******************************************** -->


<!-- ********************************************여행자정보******************************************** -->
<div id="cont03">
<?
$rtab = '3';
include "good_res_tab.php";
?>

<table width="100%" border="0" cellspacing="0" cellpadding="0">
	<?php if($row['tab']=="D" and $row['gdt']=="pe") { // 데이투어>단독투어 ?>
	<tr>
		<td valign="top" colspan="14" height="15" style="padding:0 0 10px 0;text-align: right;">
			 <input type="button" class="Table_btn red" value="동행자추가" onclick="add_person_pe();">
		</td>
	</tr>		
	<?php }?>
	<tr>
		<td valign="top" colspan="3">
			<div id="ajax_person">
			<table width="100%" border="0" cellspacing="0" cellpadding="0" class="setting_write2" id="table_person">
			<colgroup>
				<col width="50" />
				<col width="70" />
				<col width="80" />
				<col width="120" />
				<col width="120" />
				<col width="120" />
				<col width="130" />
				<col width="115" />
				<col width="95" />
				<col />
				<col width="30" />
			</colgroup>		
				<tr>
					<th>구분</th><th>성별</th><th>한글이름</th><th>영문(이름/성)</th><th>핸드폰</th><th>전화번호</th><th>출발지</th><th>국적(생년월일)</th><th>여권번호</th><th>여권만료일</th><th width="">비고</th><th>-</th>
				</tr>
				<?
					for($i=0 ; $i < count($person_data) ; $i++) {
						$arr = $person_data[$i];
						$class
				?>
				<tr>
					<td>
						<?if($row['tab']=="D" and $row['gdt']=="pe") { // 데이투어 > 단독투어?>
							<select name="generation_arr[]" style="width:40px;"> 
								<option value="A" <?=($arr['generation']=="A")?"selected":""?>>성인</option>
								<option value="C" <?=($arr['generation']=="C")?"selected":""?>>소인</option>
								<option value="B" <?=($arr['generation']=="B")?"selected":""?>>유아</option>
								<option value="I" <?=($arr['generation']=="I")?"selected":""?>>영아</option>
							</select>
						<?}else{ // 패키지투어?>
							<input type="hidden" name="generation_arr[]" value="<?=$arr['generation']?>"><?=$arr['generation_str']?>
						<?}?>
					</td>
					<td>
						<select name="gend_arr[]" style="width:20px;"> 
							<option value=""></option>
							<option value="M" <?=($arr['gend']=="M")?"selected":""?>>남</option>
							<option value="F" <?=($arr['gend']=="F")?"selected":""?>>여</option>
						</select>
					</td>
					<td><input type="text" class="input_text" name="name_kor_arr[]" value="<?=$arr['name_kor']?>" style="width:60px;" readonly></td>
					<td><input type="text" class="input_text" name="name_eng1_arr[]" value="<?=$arr['name_eng1']?>" style="width:30px; marign-right:3px;" readonly>&nbsp;<input type="text" class="input_text" name="name_eng2_arr[]" value="<?=$arr['name_eng2']?>" style="width:50px;" readonly></td>
					<td><input type="text" class="input_text" name="hp_arr[]" value="<?=$arr['hp']?>" style="width:95px;" readonly></td>
					<td><input type="text" class="input_text" name="tel_arr[]" value="<?=$arr['tel']?>" style="width:95px;" readonly></td>
					<td>
						<select name="poid_arr[]" style="width:100px;">
							<option value=""></option>
							<?
								if(is_array($data_depot)){foreach($data_depot as $r) {
							?>
							<option value="<?=$r['poid']?>" <?=($r['poid']==$arr['poid'])?"selected":""?>><?=$r['depot_nm']?></option>
							<?}}?>
						</select>
					</td>
					<td><input type="text" class="input_text" name="birth_dt_arr[]" style="width:80px;" value="<?=$arr['birth_dt']?>" ></td>
					<td><input type="text" class="input_text" name="passenger_num_arr[]" value="<?=$arr['passenger_num']?>" style="width:60px;" readonly></td>
					<td><input type="text" class="cal_input" name="passenger_expire_arr[]" value="<?=$arr['passenger_expire']?>" style="width:82px;"  readonly onClick="AjaxCal(this,event)"></td>
					<td class="txt_l pl10"><input type="text" class="input_text" name="remarks_arr[]" value="<?=$arr['remarks']?>" style="width:90px;" readonly></td>
					<td><!--<img src="../image/btn/icon_del.gif" title="취소" style="cursor:pointer;" onclick="del_row($(this));">--></td>
				</tr>
				<?}?>
			</table>
			</div>
		</td>
	</tr>
	<tr>
		<td valign="top" colspan="3" height="15"></td>
	</tr>
</table>

</div>
<!-- 동행자에 추가할 row -->
<textarea id="table_tr_template" style="display:none;">
	<tr class="added_rows">
		<td>{GENERATION}</td>
		<td>
			<select name="gend_arr[]" style="width:20px;"> 
				<option value=""></option>
				<option value="M">남</option>
				<option value="F">여</option>
			</select>
		</td>
		<td><input type="text" class="input_text" name="name_kor_arr[]" style="width:60px;" readonly /></td>
		<td><input type="text" class="input_text" name="name_eng1_arr[]" style="width:30px;" />&nbsp;<input type="text" class="input_text" name="name_eng2_arr[]" style="width:50px;" readonly /></td>
		<td><input type="text" class="input_text" name="hp_arr[]" style="width:95px;" readonly /></td>
		<td><input type="text" class="input_text" name="tel_arr[]" style="width:95px;" readonly /></td>
		<td>
				<select name="poid_arr[]" style="width:100px;">
					<option value=""></option>
					<?
						if(is_array($data_depot)){foreach($data_depot as $r) {
							$sel="";
					?>
					<option value="<?=$r['poid']?>" <?=$sel?>><?=$r['depot_nm']?></option>
					<?}}?>
				</select>
		</td>
		<td><input type="text" class="input_text" name="birth_dt_arr[]" style="width:80px;" value=""  /></td>
		<td><input type="text" class="input_text" name="passenger_num_arr[]" value=""  style="width:60px;" readonly /></td>
		<td><input type="text" class="cal_input" name="passenger_expire_arr[]" style="width:82px;" value="" readonly onClick="AjaxCal(this,event)" /></td>
		<td><input type="text" class="input_text" name="remarks_arr[]" value="" style="width:90px;" readonly /></td>
		<td><!--<img src="../image/btn/icon_del.gif" title="취소" style="cursor:pointer;" onclick="del_row($(this));">--></td>
	</tr>
</textarea>


<script type="text/javascript">
// 데이투어 > 개인투어 계산변수
var tab = '<?=$row['tab']?>';
var gdt = '<?=$row['gdt']?>';

// 동행자 추가(데이투어>단독)
function add_person_pe()
{
	// tr에 들어갈 row
	var str = $("#table_tr_template").val();

	// 기존 인원수 카운터
	var cnt = $("#frm_reserv_good input[name='name_kor_arr[]']").length;

	// 성인,소인,유아,영아선택
	var generation='';
	generation ='<select name="generation_arr[]" style="width:40px;"> ';
	generation +='	<option value="A" selected>성인</option> ';
	generation +='	<option value="C">소인</option> ';
	generation +='	<option value="B">유아</option> ';
	generation +='	<option value="I">영아</option> ';
	generation +='</select> ';

	// 데이투어 > 개인투어 대(팀)수 체크
	var inwon=$("#frm_reserv_good input[name='adult_inwon']").val();
	var d_pe_people_inwon=parseInt('<?=intval($row['date']['d_pe_people_inwon'])?>'); // 기준인원수
	var inw = inwon * parseInt(d_pe_people_inwon);

	if (cnt >= inw) {
		alert('대(팀)수를 초과하실수 없습니다.');
		return;
	}

	str = str.replace('{GENERATION}',generation);

	// 추가
	$("#table_person").append(str);
}
</script>
<!-- ********************************************/여행자정보******************************************** -->
</form>
<!-- /폼 -->

<!-- ********************************************고객입출금관리******************************************** -->
<div id="cont04">
<?
$rtab = '4';
include "good_res_tab.php";
?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
	<tr>
		<td valign="top" colspan="3" height="15"></td>
	</tr>
	<tr>
		<td valign="top" colspan="3"><div id="ajax_account"></div></td>
	</tr>
</table>

</div>
<!-- ********************************************/고객입출금관리******************************************** -->


<!-- ********************************************정산관리******************************************** -->
<div id="cont05">
<?
$rtab = '5';
include "good_res_tab.php";
?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
	<tr>
		<td valign="top" colspan="3" height="15"></td>
	</tr>
	<tr>
		<td valign="top" colspan="3"><div id="ajax_cal_good"></div></td>
	</tr>
</table>
</div>
<!-- ********************************************/정산관리******************************************** -->


<!-- ********************************************상담관리******************************************** -->
<div id="cont06">
<?
$rtab = '6';
include "good_res_tab.php";
?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
	<!--<tr>
		<td valign="top" colspan="4" height="15" style="padding:0 0 10px 0;text-align: right;">
			 <input type="button" class="Table_btn red" value="메모등록" onclick="to_dialog.ajax('../res_good/contab_sd_write.html?mode=E&res_no=<?=$res_no?>&nextloadwx=ajax_contab','메모등록','800','450',true,false);">
		</td>
	</tr>-->
	<tr>
		<td valign="top" colspan="3"><div id="ajax_contab"></div></td>
	</tr>
</table>
</div>
<!-- ********************************************/상담관리******************************************** -->


<!--<div class="btn_wrap_C mt30 mb30">
<a class="Bbtn red" href="javascript:;" onclick="chk_form();">저장</a>
</div>-->

<script type="text/javascript">
$(function(){
	ajax_loader('./good_res_account.html?res_no=<?=$res_no?>','ajax_account'); // 고객입출금
	ajax_loader('./ajaxAccGood.html?res_no=<?=$res_no?>','ajax_cal_good'); // 정산
	ajax_loader('./ajaxResContab.html?res_no=<?=$res_no?>&cseq=<?=$row[cseq]?>','ajax_contab'); // 상담
	date_dw_cal38(); // 상품예약 계산
});

// 폼 저장
function chk_form()
{
	var f = document.frm_reserv_good;

	var result = to_validation(f)
	if( result == false ) return false;

	if(!confirm('저장하시겠습니까?')) return;

	ajax_post('ajax_proc','good_res_proc.html','frm_reserv_good');

}

/*function docReload()
{
	ajax_loader('ajaxAccGood.html?res_no=<?=$res_no?>','ajax_cal_good');
}*/
</script>

<!-- /본문 -->
</div>
<?
include "../include/footer_iframe.html";
?>



Anon7 - 2021