alert('請選擇正確的合約。'); history.back();"; exit; } date_default_timezone_set('Asia/Hong_Kong'); ini_set('apc.cache_by_default', 0); if (PHP_SAPI == 'cli') die('This example should only be run from a Web Browser'); //get order data $order_id = (int)$_GET["order_id"]; if(!empty($order_id)){ $order_info = get_order($order_id); $order_room_info = get_order_room($order_id); $order_room_list_txt = ""; foreach($order_room_info as $order_room){ $room_info = get_room($order_room["room_id"]); $order_room_list_txt .= check_combine_room($room_info["code"]).", "; } $order_room_list_txt = substr_replace($order_room_list_txt, "", -2); $customer_info = get_customer($order_info["customer_id"]); $location_info = get_location($order_info["location_id"]); $Licensor_en = $location_info['contract_en']; $Licensor_tc = $location_info['contract_tc']; //紅酒倉 $sql = "SELECT * FROM otherspage WHERE ospageid = 3"; $row = bind_pdo($sql, null, "selectone"); $wine_terms = ""; $wine_terms_en = ""; if($order_info["location_id"] == 8){ $wine_terms = '
' . nl2br($row["wine_ospagedesc_tc"]); $wine_terms_en = '' . nl2br($row["wine_ospagedesc_en"]); } $terms_txt = '' . nl2br($row["ospagedesc_tc"]); $terms_txt_en = '' . nl2br($row["ospagedesc_en"]); if($order_info["customer_typeid"] == "PERSONAL"){ $idno = "Identification Number 身份證明號碼 :" . rsa_crypt($order_info["customer_identity_id"], 2); $name = "Name 姓名 :" . $order_info["customer_name"]; $display_name = $order_info["customer_name"]; }else{ $idno = "Business Registration No 商業登記證號碼 :" . rsa_crypt($order_info["customer_identity_id"], 2); $name = "Company Name 公司名稱 :" . $order_info["customer_companyname"]; $display_name = $order_info["customer_companyname"]; } $paymethod = get_master_type_code("PAYMENT_METHOD", $order_info["paymethod"]); if(empty($order_info["paymethod2"])) $order_info["paymethod2"] = $order_info["paymethod"]; $paymethod2 = get_master_type_code("PAYMENT_METHOD", $order_info["paymethod2"]); if($order_info["prepaid_month"] > 0){ $total_prepaid = $order_info["prepaid_amount"]+$order_info["total_order_product"]; $total_paid = $order_info["last_paid"]+$order_info["prepaid_amount"]+$order_info["total_order_product"]; //$total_remain = $order_info["total_discounted_price"]*$order_info["rent_month"]+$order_info["deposit"]+$order_info["total_order_product"]-$order_info["last_paid"]-$order_info["prepaid_amount"]-$order_info["free_first_month_deduct"]-$order_info["free_2_month_deduct"]; //kelvin, 20200803 $total_remain = $order_info["total_discounted_price"]*$order_info["rent_month"]+$order_info["deposit"]+$order_info["total_order_product"]-$order_info["last_paid"]-$total_prepaid-$order_info["free_first_month_deduct"]-$order_info["free_2_month_deduct"]-$order_info["discount_amount"]; }else{ //prevent error if($order_info["prepaid_month"] == 0){ $total_prepaid = 0; $total_paid = $order_info["last_paid"]; $total_remain = $order_info["total_discounted_price"]*$order_info["rent_month"]+$order_info["deposit"]+$order_info["total_order_product"]-$order_info["last_paid"]-$order_info["prepaid_amount"]-$order_info["free_first_month_deduct"]-$order_info["free_2_month_deduct"]-$order_info["discount_amount"]; } } //unit change if($order_info["createdate"] > "2017-04-27 18:00:00"){ $unit = "平方呎"; }else{ $unit = "立方呎"; } if($order_info['renew'] == 1){ $rent_txt = "租金以".$paymethod2["name_tc"]."支付"; $rent_txt2 = ""; }else{ $rent_txt = $paymethod["name_tc"] == "未付" ? "按金未付" : "按金以".$paymethod["name_tc"]."支付".($order_info["paymethod"] == "CREDIT_CARD"?" (並會扣除3%手續費)":""); $rent_txt2 = $paymethod2["name_tc"] == "未付" ? "租金未付" : "租金以".$paymethod2["name_tc"]."支付"; } $contact = ""; if($order_info["customer_typeid"] == "BUSINESS"){ $contact = "Contact Person 聯絡人 :" . $order_info["customer_name"] . "Unit Storage License Agreement
單位儲存許可協議書
| License Agreement Number 許可協議書編號: " . $order_info["code"] . " | Date 日期: " . date("Y-m-d") . " |
| Licensor: 許可人: |
$Licensor_en $Licensor_tc |
$idno
$name
Address 地址: " . rsa_crypt($order_info["customer_address"], 2) . "
$contact
Contact Phone 聯絡電話: " . rsa_crypt($order_info["customer_tel"], 2) . "
E-Mail Address 電郵地址: " . rsa_crypt($order_info["customer_email"], 2) . "
Unit Number 單位號碼: $order_room_list_txt
Customer I.D. 顧客編號: " . $order_info['customer_code'] . "
Approximate Size 大約面積: " . $order_info["roughly_size"].$unit . "
Effective Date 生效日期: " . $order_info["startdate"]." 至 ".$order_info["enddate"] . "
Smart Card No. 智能卡號碼: " . $order_info["room_key"] . "
| Fees and Charges 費用及收費 | 港幣 : HKD$" . numberformat($order_info["total_discounted_price"])." x ".$order_info["rent_month"] . "月 |
| Monthly License Fee 每月許可費: | (原價 : HKD$" . numberformat($order_info["total_retail_price"]) . ") |
| Effective Duration Fee 有效期價: | 港幣 : HKD$" . numberformat($order_info["total_discounted_price"]*$order_info["rent_month"]) . " |
| Deposit 按金: | 港幣 : HKD$" . numberformat($order_info["deposit"]) . " |
| Others 其他: | 港幣 : HKD$" . numberformat($order_info["total_order_product"]) . " |
| Discount 租金優惠: | 港幣 : -HKD$" . numberformat($order_info["free_first_month_deduct"]+$order_info["free_2_month_deduct"]) . " |
| Other Discount 其餘優惠: | 港幣 : -HKD$" . numberformat($order_info["discount_amount"]) . " |
| Total 合計: | 港幣 : HKD$" . numberformat(($order_info["total_discounted_price"]*$order_info["rent_month"])+$order_info["deposit"]+$order_info["total_order_product"]-$order_info["free_first_month_deduct"]-$order_info["free_2_month_deduct"]-$order_info["discount_amount"]) . " |
| Paid 已付費用: (預繳: HKD$" . numberformat($total_prepaid) . ") | 港幣 : -HKD$" . numberformat($total_paid) . " |
| Remaining Balance 餘款: | 港幣 : HKD$" . numberformat($total_remain) . " |
" . $order_info["remark"] . "
$rent_txt
$rent_txt2
I have read and agreed all the terms and conditions in this License Agreement and that of the company annexed hereto which this agreement is subject to my signature below indicates acceptance thereof.
In case of any disputes, In N Out International Corporate Limited reserves the right of final decision.
本人已經閱讀並同意本許可協議及借用條款及細則。
本人在下欄的簽署表示本人接受該等條文及聲明。
如有任何爭議 , 出入易國際有限公司保留最終之決定權。
|
Licensee Signature 被許可人簽署 Date 日期 " . date("Y-m-d") . " |
Licensor Signature 許可人簽署 _________________________________ |
按金發票
| 客戶編號 : | " . $customer_info["code"] . " | 發票日期 : | " . date("Y-m-d", strtotime($deposit_info["docdate"])) . " |
| 客戶姓名 : | " . $display_name . " | 發票編號 : | " . $deposit_info["deposit_code"] . " |
| 客戶地址 : | " . rsa_crypt($order_info["customer_address"], 2) . " |
| 服務詳情 : | 費用(HK$) |
| 按金 日期: " . $order_info['startdate'] . " 至 " . $order_info['enddate'] . " $items |
" . numberformat($deposit_info["deposit_amount"]) . " |
| " . numberformat($deposit_info["deposit_amount"]) . " | |
| 已付金額 | - 0.00 |
| 總金額 | " . numberformat($deposit_info["deposit_amount"]) . " |
備註: " . $deposit_info["remark"] . "
租金及其他發票
| 客戶編號 : | " . $customer_info["code"] . " | 發票日期 : | " . date("Y-m-d", strtotime($invoice_info["docdate"])) . " |
| 客戶姓名 : | " . $display_name . " | 發票編號 : | " . $invoice_info["invoice_code"] . " |
| 客戶地址 : | " . rsa_crypt($order_info["customer_address"], 2) . " |
| 服務詳情 : | 費用(HK$) |
| " . $invoice_total . " | |
| 已付金額 | " . "- " . numberformat($order_info["last_paid"]) . " |
| 總金額 | " . numberformat($invoice_info["amount"]) . " |
備註: " . $invoice_info["remark"] . "
按金付款收據
| 客戶編號 : | " . $pcustomer_info["code"] . " | 收據編號 : | " . $payment_info["code"] . " |
| 客戶姓名 : | " . $pcustomer_info["customer_name"] . " | 付款日期 : | " . $docdate->format("Y-m-d") . " |
| 客戶地址 : | " . rsa_crypt($pcustomer_info["address"], 2) . " | 付款方式 : | " . $pay1 . " |
| 付款詳情 : | 金額(HK$) |
| 總金額 | " . numberformat($total_amt) . " |
備註: " . $deposit_info["remark"] . "
正式收據
| 客戶編號 : | " . $pcustomer_info["code"] . " | 收據編號 : | " . $payment_info["code"] . " |
| 客戶姓名 : | " . $pcustomer_info["customer_name"] . " | 付款日期 : | " . $docdate->format("Y-m-d") . " |
| 客戶地址 : | " . rsa_crypt($pcustomer_info["address"], 2) . " | 付款方式 : | " . $pay2 . " |
| 付款詳情 : | 金額(HK$) |
| " . numberformat($total_ori_amt) . " | |
| 已付金額 | - " . numberformat($last_paid) . " |
| 總金額 | " . numberformat($thistype_total_amt) . " |