ÿØÿà 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/erp_231024/ |
Upload File : |
<? include "../include/top_proc.html"; include "_common.html"; // 기존 예약정보 if($a_idx){ $sql = "select * from TB_ERP_ALL where a_idx='{$a_idx}'"; $rs = db_query($sql); $row = db_fetch_array($rs) ; $pay_state = $row['pay_state']; //입금상태 //1인투어비 $price_per_one = round($row['total_price'] / ($row['num_adult']+$row['num_child'])); } // 엑셀 파일명 설정 $FileName = "INVOICE_".$row['good_name']."_".$row['res_name'] ; $FileName = $FileName."_".Date("Ymd").".xls"; $FileName = urlencode($FileName); // UTF-8 // 엑셀 파일로 변환 헤더 header("Content-Type: application/vnd.ms-excel"); header("Content-Disposition: attachment; filename=$FileName"); header("Content-Description: PHP4 Generated Data" ); //INVOICE 정보 if($i_idx){ $sql3 = "select * from TB_ERP_INVOICE where i_idx='{$i_idx}'"; $rs3 = db_query($sql3); $row3 = db_fetch_array($rs3) ; $detail_num = "0"; if($row3['detail1']) { $detail1 = explode("::",$row3['detail1']); $detail_num++; } if($row3['detail2']) { $detail2 = explode("::",$row3['detail2']); $detail_num++; } if($row3['detail3']) { $detail3 = explode("::",$row3['detail3']); $detail_num++; } if($row3['detail4']) { $detail4 = explode("::",$row3['detail4']); $detail_num++; } if($row3['detail5']) { $detail5 = explode("::",$row3['detail5']); $detail_num++; } if($row3['detail6']) { $detail6 = explode("::",$row3['detail6']); $detail_num++; } if($row3['detail7']) { $detail7 = explode("::",$row3['detail7']); $detail_num++; } if($row3['detail8']) { $detail8 = explode("::",$row3['detail8']); $detail_num++; } if($row3['detail9']) { $detail9 = explode("::",$row3['detail9']); $detail_num++; } $detail_num++; if($row3['payment']=="bank") $payment = "Bank Transfer (銀行轉帳)"; elseif($row3['payment']=="card") $payment = "Credit Card (線上刷卡)"; } ?> <html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40"> <head> <meta http-equiv=Content-Type content="text/html; charset=utf-8"> <meta name=ProgId content=Excel.Sheet> <meta name=Generator content="Microsoft Excel 10"> <style> <!-- table {mso-displayed-decimal-separator:"\."; mso-displayed-thousand-separator:"\,";} @page {margin:1.0in .75in 1.0in .75in; mso-header-margin:.5in; mso-footer-margin:.5in;} --> table.qtable th{ text-align:center;background:#E7E7E7;} table.qtable td{ text-align:center;background:#ffffff;} table.qtable td.txt_left{ text-align:left;padding-left:10px;} table.qtable td.red{ text-align:left;color:red;} .qrcode { margin-top:10px; text-align:center; } </style> <!--[if gte mso 9]><xml> <x:ExcelWorkbook> <x:ExcelWorksheets> <x:ExcelWorksheet> <x:Name>INVOICE</x:Name> <x:WorksheetOptions> <x:Print> <x:ValidPrinterInfo/> </x:Print> <x:Selected/> </x:WorksheetOptions> </x:ExcelWorksheet> </x:ExcelWorksheets> </x:ExcelWorkbook> </xml><![endif]--> <meta http-equiv=Content-Language content=ko> </head> <body> <table cellspacing="0" cellpadding="0" border="0"> <tr> <td> <table border=0> <tr height="106"> <td colspan="11"><img src="http://tourboss.co.kr/admin/TCPDF/erp/images/header_invoice_tktravel.jpg" width="700" height="106"></td> </tr> <tr height="35"> <td colspan="5">Date:<?=date("Y-m-d")?></td> <td colspan="6" align="right">INVOICE NO. <strong><?=$row3['invoice_no']?></strong></td> </tr> <tr> <td colspan="11" height="20"> </td> </tr> </table> </td> </tr> <tr> <td> <!--예약정보--> <table cellspacing="0" cellpadding="2" bordercolor="#999999" bordercolordark="#FFFFFF" border="1" class="qtable"> <tr height="35"> <th width="60">ATTN</th> <td colspan="6" class="txt_left"><?=$row['attn']?></td> <th width="60">FROM</th> <td width="180" class="txt_left"><?=$row['admin_nm']?></td> <th width="60">Manager</th> <td width="180" class="txt_left"><?=$row['charger']?></td> </tr> <tr height="35"> <th>Name</th> <td colspan="6" class="txt_left"><?=$row['good_name']?></td> <th>Date use.</th> <td colspan="3" class="txt_left"> <?=$row['start_date']?> ~ <?=$row['end_date']?> <span id="periods"><?=$row['periods']?></span> </td> </tr> <tr height="35"> <th>Hotel</th> <td colspan="6" class="txt_left"><?=$row['hotel_name']?></td> <th>BusInfo.</th> <td colspan="3" class="txt_left"><?=$row['car_info']?></td> </tr> <tr height="35"> <th>Name</th> <td colspan="2" class="txt_left"><?=$row['res_name']?></td> <th width="60">Country</th> <td colspan="3" class="txt_left"><?=$row['res_nationality']?></td> <th>Deposit</th> <td colspan="3" class="txt_left"> <?=$row['currency']?><?=number_format($row['deposit'])?> </td> </tr> <tr height="35"> <th>Mobile</th> <td colspan="2" class="txt_left"> <?=$row['res_phone']?></td> <th width="60">E-mail</th> <td colspan="3" class="txt_left"><?=$row['res_email']?></td> <th>Balance</th> <td colspan="3" class="txt_left"> <?=$row['currency']?> <?=number_format($row['balance'])?> </td> </tr> <tr height="35"> <th>Participant</th> <th width="60">Adult</th> <td width="60"><?=$row['num_adult']?></td> <th width="60">Child</th> <td width="60"><?=$row['num_child']?></td> <th width="60">FOC</th> <td width="60"><?=$row['num_foc']?></td> <th>Total</th> <td class="txt_left"> <span id="total"><?=$row['currency']?> <?=number_format($row['total_price'])?></span> </td> <th>1 ppl cost</th> <td class="txt_left"> <span id="per_amount"><?=$row['currency']?> <?=number_format($price_per_one)?></span> </td> </tr> <tr height="35"> <th>PaymentDue</th> <td colspan="6" class="txt_left"><?=$row['date_payment']?></td> <th>Method</th> <td><?=$payment?></td> <th>State</th> <td> <? if($pay_state=='A') echo '미입금'; elseif($pay_state=='B') echo '부분입금'; elseif($pay_state=='C') echo '입금완료'; ?> </td> </tr> </table> </td> </tr> <tr> <td> <table border=0> <tr> <td colspan="11" height="20"> </td> </tr> </table> </td> </tr> <tr> <td> <!--Item Details--> <table cellspacing="0" cellpadding="2" bordercolor="#999999" bordercolordark="#FFFFFF" border="1" class="qtable"> <tr> <th colspan="2" align="center" rowspan="<?=$detail_num?>">Item Details</th> <? //if($row3['detail1']) {?> <td height="35" style="text-align:center"> (1)</td> <td class="txt_left" colspan="7"><?=$detail1[0]?></td> <td><?=$row['currency']?> <?=number_format($detail1[1])?></td> </tr> <? //} ?> <? if($row3['detail2']) {?> <tr height="35"> <td style="text-align:center"> (2)</td> <td class="txt_left" colspan="7"><?=$detail2[0]?></td> <td><?=$row['currency']?> <?=number_format($detail2[1])?></td> </tr> <? } ?> <? if($row3['detail3']) {?> <tr height="35"> <td style="text-align:center"> (3)</td> <td class="txt_left" colspan="7"><?=$detail3[0]?></td> <td><?=$row['currency']?> <?=number_format($detail3[1])?></td> </tr> <? } ?> <? if($row3['detail4']) {?> <tr height="35"> <td style="text-align:center"> (4)</td> <td class="txt_left" colspan="7"><?=$detail4[0]?></td> <td><?=$row['currency']?> <?=number_format($detail4[1])?></td> </tr> <? } ?> <? if($row3['detail5']) {?> <tr height="35"> <td style="text-align:center"> (5)</td> <td class="txt_left" colspan="7"><?=$detail5[0]?></td> <td><?=$row['currency']?> <?=number_format($detail5[1])?></td> </tr> <? } ?> <tr height="35"> <th colspan="8" style="text-align:center;">TOTAL DUE</th> <th><?=$row['currency']?> <?=number_format($row3[total_detail_amount])?></th> </tr> </table> </td> </tr> <tr> <td> <table border=0> <tr height="20"> <td colspan="11"> </td> </tr> </table> </td> </tr> <!-- ACCOUNT INFORMATION --> <tr> <td> <table cellspacing="0" cellpadding="2" bordercolor="#999999" bordercolordark="#FFFFFF" border="1" class="qtable"> <tr> <th colspan="2" rowspan="2">Account Information</th> <td colspan="3" class="txt_left" height="35"><?=$row3['account1']?></td> <td colspan="6" class="txt_left"><?=$row3['account1_val']?></td> </tr> <tr height="35"> <td colspan="3" class="txt_left"><?=$row3['account2']?></td> <td colspan="6" class="txt_left"><?=$row3['account2_val']?></td> </tr> <!-- <tr> <th colspan="2" rowspan="6">Account Information</th> <td colspan="3" class="txt_left" height="35">Bank Name</td> <td colspan="6" class="txt_left"><?=$row3['bank_name']?></td> </tr> <tr height="35"> <td colspan="3" class="txt_left">Account Name</td> <td colspan="6" class="txt_left"><?=$row3['account_name']?></td> </tr> <tr height="35"> <td colspan="3" class="txt_left">Account No</td> <td colspan="6" class="txt_left"><?=$row3['account_no']?></td> </tr> <tr height="35"> <td colspan="3" class="txt_left">SWIFT Code</td> <td colspan="6" class="txt_left"><?=$row3['swift_code']?></td> </tr> <tr height="35"> <td colspan="3" class="txt_left">Bank Add</td> <td colspan="6" class="txt_left"><?=$row3['bank_addr']?></td> </tr> <tr height="35"> <td colspan="3" class="txt_left">Bank Contact</td> <td colspan="6" class="txt_left"> <? echo " ".(string)$row3['bank_contact']; ?></td> </tr> --> </table> </td> </tr> <tr> <td> <table border=0> <tr height="20"> <td colspan="11"> </td> </tr> </table> </td> </tr> <!-- Cancellation Policy --> <tr> <td> <table cellspacing="0" cellpadding="2" bordercolor="#999999" bordercolordark="#FFFFFF" border="1" class="qtable"> <tr> <th colspan="2">Cancellation Policy</th> <td colspan="9" class="txt_left" style="min-height:35px"> <? $rule = stripslashes($row3['rule_refund']); $rule = nl2br($rule); //$rule = str_replace("\n", "<br style='mso-data-placement:same-cell'>", $rule); echo $rule; ?> </td> </tr> </table> </td> </tr> <tr> <td> <table border=0> <tr> <td colspan="11" height="20"> </td> </tr> </table> </td> </tr> <!-- Remarks --> <tr> <td> <table cellspacing="0" cellpadding="2" bordercolor="#999999" bordercolordark="#FFFFFF" border="1" class="qtable"> <tr> <th colspan="2">Remarks</th> <td colspan="9" class="txt_left" style="min-height:35px"> <? $remarks = stripslashes($row3['remarks']); $remarks = nl2br($remarks); //$remarks = str_replace("\n", "<br style='mso-data-placement:same-cell'>", $remarks); echo $remarks; ?> </td> </tr> </table> </td> </tr> <tr> <td> <table border=0> <tr> <td colspan="11" height="20"> </td> </tr> <tr> <td colspan="11" height="72" align="right"><img src="http://tourboss.co.kr/admin/erp/img/excel_sign_tktravel.jpg" alt="sign" border="0" width="700" height="72" /></td> </tr> <tr> <td colspan="11" height="20"> </td> </tr> <tr height="105"> <td colspan="11"><img src="http://tourboss.co.kr/admin/TCPDF/erp/images/pdf_footer_tktravel.jpg" width="700" height="105"></td> </tr> </table> </td> </tr> </table> </body> </html>