ÿØÿà JFIF ` ` ÿþ
Server : Apache System : Linux ruga7-004.fmcity.com 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64 User : tkt_travelbus ( 1137) PHP Version : 7.0.0p1 Disable Function : mysql_pconnect Directory : /tkt_travelbus/www/toadmin/erp/ |
Upload File : |
<? ini_set('max_inputs_vars',50000); include "../include/top_yeonsung.html"; include "_common.html"; // 기존 예약정보 if($a_idx){ $sql = "select * from TB_ERP_ALL_YEONSUNG where a_idx='{$a_idx}'"; $rs = db_query($sql); $row = db_fetch_array($rs) ; // p($row); //1인투어비 $price_per_one = round($row['total_price'] / ($row['num_adult']+$row['num_child'])); //통화단위 $currency2 = $row[currency]; $SqlType = "res_update"; //견적서 정보 $sql2 = "select * from TB_ERP_ESTIMATE_YEONSUNG where a_idx='{$a_idx}'"; $rs2 = db_query($sql2); $row2 = db_fetch_array($rs2) ; $e_idx = $row2[e_idx]; /*if(devCookie()){ p($row2); }*/ //invoice 정보 $sql3 = "select * from TB_ERP_INVOICE_YEONSUNG where a_idx='{$a_idx}'"; $rs3 = db_query($sql3); $row3 = db_fetch_array($rs3) ; $i_idx = $row3[i_idx]; //voucher 정보 $sql4 = "select * from TB_ERP_VOUCHER_YEONSUNG where a_idx='{$a_idx}'"; $rs4 = db_query($sql4); $row4 = db_fetch_array($rs4) ; $v_idx = $row4[v_idx]; } else { $SqlType = "res_ins"; } if($rtab=="2") { $esti_tab = "none"; $voucher_tab = "none"; $invoice_tab = "block"; } elseif($rtab=="3") { $esti_tab = "none"; $invoice_tab = "none"; $voucher_tab = "block"; } else { $esti_tab = "block"; $invoice_tab = "none"; $voucher_tab = "none"; } ?> <style> #total, #per_amount {color:red;font-weight:bold;} </style> <div class="contents_wrap"> <div class="contents_wrap_in" style="position:relative;"> <?if($a_idx and $e_idx) {?> <ul class="butline" style="position:absolute;right:19px;top:45px;z-index:1;display:none"> <li><a href="../TCPDF/erp/pdf_estimate_yeonsung.php?a_idx=<?=$a_idx?>&e_idx=<?=$e_idx?>"><span class="Bbtn red">TK 트래블 PDF</span></a></li> <li><a href="excel_estimate.php?a_idx=<?=$a_idx?>&e_idx=<?=$e_idx?>"><span class="Bbtn red" style="background-color:#fff; color:#000;border:1px solid #aaa"><img src="../image/btn/ico_excel.gif"> 엑셀저장</span></a></li> </ul> <? } ?> <div class="title"> <i class="xi-cut" style="font-size: 21px; position: relative; top: 2px;"></i> <strong>견적서 수정</strong> </div> <div class="contents_detail"> <!-- 본문 --> <!--<div class="top_bar"> <div class="btn_fix"><a class="Bbtn red" href="javascript:;" onclick="chk_form();">저장</a></div> </div>--> <div class="conbody_area" style="margin-top:0;padding-top:0;"> <!-- ********************************************견적서******************************************** --> <div id="cont01" style="display:<?=$esti_tab?>; background-color:#edf0f5;"> <!-- 폼 --> <form name="frm_reserv_good" id="frm_reserv_good" method="post"> <input type="hidden" name="SqlType" value="<?=$SqlType?>"> <input type="hidden" name="a_idx" value="<?=$a_idx?>"> <input type="hidden" name="e_idx" value="<?=$e_idx?>"> <input type="hidden" name="i_idx" value="<?=$i_idx?>"> <input type="hidden" name="v_idx" value="<?=$v_idx?>"> <input type="hidden" name="amount_per_one" value=""> <? $rtab = '1'; include "good_res_tabreg_yeonsung.php"; ?> <style> .butline { float: right; padding-bottom:10px; } .butline li{ list-style:none; display: inline; margin-right:10px; } .butline li a{ color: #fff; } </style> <p style="background-color:#edf0f5"> </p> <table width="72%" border="0" cellspacing="0" cellpadding="0" style="background-color:#edf0f5;"> <tr> <td valign="top"> <table width="100%" border="0" cellspacing="0" cellpadding="0" class="setting_write" > <tbody> <tr style="border-top:1.2px solid #555;"> <th width="10%">ATTN</th> <td colspan="6"><input type="text" class="input_text" id="attn" name="attn" value="<?=$row['attn']?>" style="width:90%" hname="ATTN" required> </td> <th width="10%">FROM</th> <td width="20%"> <input type="text" class="input_text" id="admiN_nm" name="admin_nm" value="<?=$row['admin_nm']?>"> </td> <th width="10%">담당자</th> <td width="20%"> <input type="text" class="input_text" id="charger" name="charger" value="<?=$row['charger']?>" > </td> </tr> <tr> <th>행사명</th> <td colspan="6"><input type="text" class="input_text" id="good_name" name="good_name" value="<?=$row['good_name']?>" style="width:90%" hname="행사명" required> </td> <th>행사날짜</th> <td colspan="3"> <input type="text" name="start_date" id="start_date" class="cal_input" value="<?=$row['start_date']?>" onclick="AjaxCal(this,event,{'add_event':'clear_period_date()'});" readonly hname="출발날짜" required> ~ <input type="text" name="end_date" id="end_date" class="cal_input" value="<?=$row['end_date']?>" onclick="AjaxCal(this,event,{'add_event':'clear_period_date()'});" readonly hname="도착날짜" required> <!--<span id="periods"><?=$row['periods']?></span>--> <input type="text" class="input_text" id="period_str" name="period_str" value="<?=$row['periods']?>" style="display:inline;width:25%;margin-left:22px"> </td> </tr> <tr> <th>호텔명</th> <td colspan="6"><input type="text" class="input_text" id="hotel_name" name="hotel_name" value="<?=$row['hotel_name']?>" style="width:90%"> </td> <th>차량정보</th> <td> <input type="text" class="input_text" id="car_info" name="car_info" value="<?=$row['car_info']?>" > </td> <th width="10%">항공비</th> <td width="20%"> <input type="text" class="input_text" id="air_fee" onblur="this.value=comma(this.value);" name="air_fee" value="<?=number_format($row['air_fee'])?>" > </td> </tr> <tr> <th>예약자명</th> <td colspan="2"><input type="text" class="input_text" id="res_name" name="res_name" value="<?=$row['res_name']?>" hname="예약자명" required> </td> <th>국적</th> <td colspan="3"> <input type="text" style="width:164px" class="input_text" id="res_nationality" name="res_nationality" value="<?=$row['res_nationality']?>"> </td> <th>공급가액</th> <td colspan="3"> <span id="supply_price"></span> </td> </tr> <tr> <th>연락처</th> <td colspan="2"><input type="text" class="input_text" id="res_phone" name="res_phone" value="<?=$row['res_phone']?>" hname="연락처" required> </td> <th>이메일</th> <td colspan="3"> <input type="text" style="width:164px" class="input_text" id="res_email" name="res_email" value="<?=$row['res_email']?>" hname="이메일" required> </td> <th>부가세</th> <td colspan="3"> <span id="surtax_price"></span> </td> </tr> <tr> <th>인원</th> <th width="5%">Adult</th> <td width="5%"> <input type="text" class="input_text" id="num_adult" name="num_adult" value="<?=$row['num_adult']?>" style="width:60px" hname="성인 인원" required> </td> <th width="5%">Child</th> <td width="5%"> <input type="text" class="input_text" id="num_child" name="num_child" value="<?=$row['num_child']?>" style="width:60px"> </td> <th width="5%">FOC</th> <td width="5%"> <input type="text" class="input_text" id="num_foc" name="num_foc" value="<?=$row['num_foc']?>" style="width:60px"> </td> <th>최종합계</th> <td> <span id="total" style="font-weight:bold;"><?=$row['currency']?> <?=number_format($row['total_price'])?></span> <input type="hidden" id="total_price" name="total_price" value="<?=$row['total_price']?>"> </td> <th>1인투어비</th> <td> <span id="per_amount"><?=$row['currency']?> <?=number_format($price_per_one)?></span> </td> </tr> </tbody> </table> <br> <table width="100%" border="0" cellspacing="0" cellpadding="0" class="setting_write"> <tbody> <tr style="border-top:1.2px solid #555;"> <th width="10%">포함사항</th> <td colspan="10"><textarea name="included" style="width:100%;min-height:70px;background-color:white;"><?=stripslashes($row['included'])?></textarea></td> </tr> <tr> <th>불포함사항</th> <td colspan="10"><textarea name="non_included" style="width:100%;min-height:70px;background-color:white;"><?=stripslashes($row['non_included'])?></textarea></td> </tr> <tr> <th>취소/환불규정</th> <td colspan="10"><textarea name="notice" style="width:100%;min-height:70px;background-color:white;"><?=stripslashes($row['remarks'])?></textarea></td> </tr> </tbody> </table> <div id="item_ajaxEstimate"></div> </td> </tr> </table> <!-- <div class="btn_wrap_C pt30 pb30"> <a class="Bbtn red" href="javascript:;" onclick="chk_form();">견적서 저장</a> </div> --> </form> <!-- //폼 --> </div> <script> $(document).ready(function(){ $('input[type="checkbox"][name="state"]').click(function(){ if ($(this).prop('checked')) { $('input[type="checkbox"][name="state"]').prop('checked', false); $(this).prop('checked', true); } }); }); $(function(){ var e_idx = '<?=$e_idx?>'; if(e_idx) { ajax_loader('resEdit.ajax_yeonsung.php?SqlType=<?=$SqlType?>&a_idx=<?=$a_idx?>&e_idx=<?=$e_idx?>','item_ajaxEstimate'); } else { ajax_loader('resForm.ajax_yeonsung.php?SqlType=<?=$SqlType?>&a_idx=<?=$a_idx?>','item_ajaxEstimate'); } }); // 폼 저장 /* function chk_form() { var f = document.frm_reserv_good; var result = to_validation(f) if( result == false ) return false; $(".day_date").each(function(index){ var day_value = $(this).val(); if(day_value == ''){ var number = index +1; alert('"Day ' + number +'" 값을 입력하세요'); $(this).focus(); result = false; return false; } }); if( result == false ) return false; if(!confirm('저장하시겠습니까?')) return; f.action = "res_proc.php"; f.submit(); }*/ function clear_period_date() { //no op } function calcu() { //통화단위 var currency = $("input[name='currency']").val(); //인원 var num_adult = $("#frm_reserv_good input[name='num_adult']").val(); var num_child = $("#frm_reserv_good input[name='num_child']").val(); if(!num_adult || num_adult==undefined) num_adult = "0"; if(!num_child || num_child==undefined) num_child = "0"; // 합계 구하기 var total_price = $("#frm_reserv_good input[name='total_price']").val(); //합계 // 콤마제거 total_price = replaceComma(total_price); //1인 투어비 var per_amount = ""; var total_inwon = parseInt(num_adult) + parseInt(num_child); per_amount = currency + " " + number_format(Math.round(total_price / total_inwon)).toString(); $("#frm_reserv_good input[name='amount_per_one']").val(Math.round(total_price / total_inwon)); $("#per_amount").html(per_amount); $("#total_currency").html(currency); } </script> <!-- ********************************************/견적서******************************************** --> <!-- ********************************************INVOICE******************************************** --> <div id="cont02" style="display:<?=$invoice_tab?>;"> <? $rtab = '2'; include "good_res_tabreg.php"; ?> <!-- 폼 --> <form name="frm_invoice" id="frm_invoice" method="post"> <input type="hidden" name="SqlType" value="<?=$SqlType?>"> <input type="hidden" name="a_idx" value="<?=$a_idx?>"> <input type="hidden" name="i_idx" value="<?=$i_idx?>"> <input type="hidden" name="currency" value="<?=$currency?>"> <table width="72%" border="0" cellspacing="0" cellpadding="0" style="background-color:#FFF;"> <?if($a_idx and $i_idx) {?> <tr> <td valign="top"> <div style="float:left;padding-top:20px;"> <a class="Bbtn red" href="javascript:;" onclick="invoice_form();">INVOICE 저장</a> </div> <ul class="butline"> <li><a href="../TCPDF/erp/pdf_invoice_tourboss.php?a_idx=<?=$a_idx?>&i_idx=<?=$i_idx?>"><span class="Bbtn red">여행대장 PDF</span></a></li> <li><a href="../TCPDF/erp/pdf_invoice_tktravel.php?a_idx=<?=$a_idx?>&i_idx=<?=$i_idx?>"><span class="Bbtn red">TK 트래블 PDF</span></a></li> <li><a href="excel_invoice.php?a_idx=<?=$a_idx?>&i_idx=<?=$i_idx?>"><span class="Bbtn red">엑셀저장</span></a></li> </ul> </td> </tr> <? } ?> <tr> <td valign="top"> <div class="pop_title" style="background-color:#edf0f5"><div class="lo_left">예약정보</div> </td> </tr> <tr> <td valign="top" width="100%"> <table width="100%" border="0" cellspacing="0" cellpadding="0" class="setting_write"> <tbody> <tr style="border-top:1.2px solid #555;"> <th width="8%">ATTN</th> <td colspan="6""><?=$row['attn']?></td> <th width="8%">FROM</th> <td width="15%"><?=$row['admin_nm']?></td> <th width="8%">담당자</th> <td width="15%"><?=$row['charger']?></td> </tr> <tr> <th>행사명</th> <td colspan="6"><?=$row['good_name']?></td> <th>행사날짜</th> <td colspan="3"> <?=$row['start_date']?> ~ <?=$row['end_date']?> | <span id="periods"><?=$row['periods']?></span> </td> </tr> <tr> <th>호텔명</th> <td colspan="6"><?=$row['hotel_name']?></td> <th>차량정보</th> <td><?=$row['car_info']?></td> <th width="10%">항공비</th> <td width="20%"> <? if($TO_MB['mb_level'] < 2) { ?> <input type="hidden" id="charger" name="charger" value="<?=$TO_MB['mb_nm']?>" ><?=$TO_MB['mb_nm']?> <? } else { ?> <? } ?> <input type="text" class="input_text" id="charger" name="charger" value="<?=$TO_MB['mb_nm']?>" > </td> </tr> <tr> <th>예약자명</th> <td colspan="2"><?=$row['res_name']?></td> <th>국적</th> <td colspan="3"><?=$row['res_nationality']?></td> <th>공급가액</th> <td colspan="3"> <span id="supply_price2"></span> </td> </tr> <tr> <th>연락처</th> <td colspan="2"><?=$row['res_phone']?></td> <th>이메일</th> <td colspan="3"><?=$row['res_email']?></td> <th>부가세</th> <td colspan="3"> <span id="surtax_price2"></span> </td> </tr> <tr> <th>인원</th> <th width="5%">Adult</th> <td width="5%"><?=$row['num_adult']?></td> <th width="5%">Child</th> <td width="5%"><?=$row['num_child']?></td> <th width="5%">FOC</th> <td width="5%"><?=$row['num_foc']?></td> <th>최종합계</th> <td> <span id="total2" style="color:red; font-weight:bold;"><?=$row['currency']?> <?=number_format($row['total_price'])?></span> </td> <th>1인투어비</th> <td> <span id="per_amount"><?=$row['currency']?> <?=number_format($price_per_one)?></span> </td> </tr> <tr> <th>입금기한</th> <td colspan="10"> <input type="text" class="input_text" id="date_payment" name="date_payment" value="<?=$row['date_payment']?>" style="width:20%"> </td> </tr> </tbody> </table> </td> </tr> </table> <p> </p> <div id="item_ajaxInvoice"></div> <div class="btn_wrap_C mt30 mb30" style="background-color:#edf0f5;margin-left:-230px;"> <a class="Bbtn red" href="javascript:;" onclick="invoice_form();">INVOICE 저장</a> </div> </form> </div> <script> $(function(){ var i_idx = '<?=$i_idx?>'; if(i_idx) { ajax_loader('InvoiceEdit.ajax.php?SqlType=invoice_update&a_idx=<?=$a_idx?>&i_idx=<?=$i_idx?>','item_ajaxInvoice'); } else { ajax_loader('InvoiceForm.ajax.php?SqlType=<?=$SqlType?>&a_idx=<?=$a_idx?>','item_ajaxInvoice'); } }); // 폼 저장 function invoice_form() { var f = document.frm_invoice; var result = to_validation(f) if( result == false ) return false; if(!confirm('저장하시겠습니까?')) return; //ajax_post('ajax_proc','invoice_proc.php','frm_invoice'); f.action = "invoice_proc.php"; f.submit(); } </script> <!-- ********************************************/INVOICE******************************************** --> <!-- ********************************************VOUCHER******************************************** --> <div id="cont03" style="display:<?=$voucher_tab?>"> <? $rtab = '3'; include "good_res_tabreg.php"; ?> <!-- 폼 --> <form name="frm_voucher" id="frm_voucher" method="post" enctype="multipart/form-data"> <input type="hidden" name="SqlType" value="<?=$SqlType?>"> <input type="hidden" name="a_idx" value="<?=$a_idx?>"> <input type="hidden" name="v_idx" value="<?=$v_idx?>"> <table width="72%" border="0" cellspacing="0" cellpadding="0" style="background-color:#FFF;"> <?if($a_idx and $i_idx) {?> <tr> <td valign="top"> <div style="float:left;padding-top:20px;"> <a class="Bbtn red" href="javascript:;" onclick="voucher_form();">VOUCHER 저장</a> </div> <ul class="butline"> <li><a href="../TCPDF/erp/pdf_voucher_tourboss.php?a_idx=<?=$a_idx?>&i_idx=<?=$i_idx?>&v_idx=<?=$v_idx?>"><span class="Bbtn red">여행대장 PDF</span></a></li> <li><a href="../TCPDF/erp/pdf_voucher_tktravel.php?a_idx=<?=$a_idx?>&i_idx=<?=$i_idx?>&v_idx=<?=$v_idx?>"><span class="Bbtn red">TK 트래블 PDF</span></a></li> <li><a href="excel_voucher.php?a_idx=<?=$a_idx?>&v_idx=<?=$v_idx?>"><span class="Bbtn red">엑셀저장</span></a></li> </ul> </td> </tr> <? } ?> <tr> <td valign="top"> <div class="pop_title" style="background-color:#edf0f5"><div class="lo_left">예약정보</div> </td> </tr> <tr> <td valign="top" width="100%"> <table width="100%" border="0" cellspacing="0" cellpadding="0" class="setting_write"> <tbody> <tr style="border-top:1.2px solid #555;"> <th width="8%">ATTN</th> <td colspan="6"><?=$row['attn']?></td> <th width="8%">FROM</th> <td width="15%"><?=$row['admin_nm']?></td> <th width="8%">담당자</th> <td width="15%"><?=$row['charger']?></td> </tr> <tr> <th>행사명</th> <td colspan="6"><?=$row['good_name']?></td> <th>행사날짜</th> <td colspan="3"> <?=$row['start_date']?> ~ <?=$row['end_date']?> | <span id="periods"><?=$row['periods']?></span> </td> </tr> <tr> <th>호텔명</th> <td colspan="6"><?=$row['hotel_name']?></td> <th>차량정보 111</th> <td><?=$row['car_info']?></td> <th width="10%">항공비</th> <td width="20%"> <? if($TO_MB['mb_level'] < 2) { ?> <input type="hidden" id="charger" name="charger" value="<?=$TO_MB['mb_nm']?>" ><?=$TO_MB['mb_nm']?> <? } else { ?> <? } ?> <input type="text" class="input_text" id="charger" name="charger" value="<?=$TO_MB['mb_nm']?>" > </td> </tr> <tr> <th>예약자명</th> <td colspan="2"><?=$row['res_name']?></td> <th>국적</th> <td colspan="3"><?=$row['res_nationality']?></td> <th>공급가액</th> <td colspan="3"> <span id="supply_price3"></span> </td> </tr> <tr> <th>연락처</th> <td colspan="2"><?=$row['res_phone']?></td> <th>이메일</th> <td colspan="3"><?=$row['res_email']?></td> <th>부가세</th> <td colspan="3"> <span id="surtax_price3"></span> </td> </tr> <tr> <th>인원</th> <th width="5%">Adult</th> <td width="5%"><?=$row['num_adult']?></td> <th width="5%">Child</th> <td width="5%"><?=$row['num_child']?></td> <th width="5%">FOC</th> <td width="5%"><?=$row['num_foc']?></td> <th>최종합계</th> <td> <span id="total3" style="color:red; font-weight:bold;"><?=$row['currency']?> <?=number_format($row['total_price'])?></span> </td> <th>1인투어비</th> <td> <span id="per_amount"><?=$row['currency']?> <?=number_format($price_per_one)?></span> </td> </tr> </tbody> </table> </td> </tr> </table> <div id="item_ajaxVoucher"></div> <div class="btn_wrap_C mt30 mb30" style="background-color:#edf0f5;margin-left:-230px;"> <a class="Bbtn red" href="javascript:;" onclick="voucher_form();">VOUCHER 저장</a> </div> </form> </div> <script> $(function(){ var v_idx = '<?=$v_idx?>'; if(v_idx) { ajax_loader('VoucherEdit.ajax.php?SqlType=voucher_update&a_idx=<?=$a_idx?>&v_idx=<?=$v_idx?>','item_ajaxVoucher'); } else { ajax_loader('VoucherForm.ajax.php?SqlType=<?=$SqlType?>&a_idx=<?=$a_idx?>','item_ajaxVoucher'); } var tab = '<?=$tab?>'; if(tab != '') scrollTab(tab, 200); }); // 폼 저장 function voucher_form() { var f = document.frm_voucher; var result = to_validation(f) if( result == false ) return false; if(!confirm('저장하시겠습니까?')) return; //ajax_post('ajax_proc','voucher_proc.php','frm_invoice'); f.action = "voucher_proc.php"; f.submit(); } </script> </div> <!-- ********************************************/VOUCHER******************************************** --> <!-- /본문 --> </div> </div><!-- //contents_detail --> </div><!-- //contents_wrap_in --> </div><!-- //contents_wrap --> <? include "../include/footer_yeonsung.html" ?>