Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
- <html>
- <head>
- <title>Invoice</title>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <meta http-equiv="pragma" content="no-cache,no-follow">
- <LINK rel="stylesheet" type="text/css" href="../../structure/controlmanagement/res32/style.css">
- <LINK rel="stylesheet" type="text/css" href="../../structure/controlmanagement/res32/indexStyle.css">
- <style type="text/css">
- <!--
- .style9 {
- font-size: 11px;
- font-family: Arial, Helvetica, sans-serif;
- font-weight: bold;
- }
- .style1 { font-size: 11px;
- font-weight: bold;
- }
- .style15 {
- font-family: Arial, Helvetica, sans-serif;
- font-size: 10px;
- }
- .style16 {font-size: 10px}
- .style17 {font-family: Arial, Helvetica, sans-serif}
- -->
- </style>
- </head>
- <body class="bdy1" topmargin="0" leftmargin="0" bgcolor="#0066CC">
- <p>
- </p>
- <table width="630" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFBEF">
- <tr>
- <td bgcolor="#FFE49D">
- <div align="right"><a style="cursor:hand" onClick="javascript:window.print()"><img src="../hPrin.gif" alt="Print Me" width="19" height="21"></a></div></td>
- </tr>
- <tr>
- <td bgcolor="#FFE49D">
- <table width="99%" border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td width="20%" class="style9"><div align="center"><img src="../logo.jpg" width="97" height="124"></div></td>
- <td width="74%" class="style9"><div align="right"><span class="style1">
- <script language="javascript" src="../../structure/controlmanagement/res32/scripts/comp.js"></script>
- </span></div></td>
- <td width="6%" class="style9"> </td>
- </tr>
- </table></td>
- </tr>
- <tr>
- <td bgcolor="#FFE49D"><hr></td>
- </tr>
- <tr>
- <td> </td>
- </tr>
- <tr>
- <td>
- <%
- function DecryptData(s)
- dim sp
- dim dStr
- dim decry_strat
- dim decry_str
- dim decr
- dim i,temp
- dStr=s
- sp=split(dStr,"Z")
- decry_strat=eval(mid(sp(0),2,1))
- decr=decry_strat
- 'Response.write Chr(sp(1))
- 'Response.Write ubound(sp)
- for i=2 to ubound(sp)
- decry_str=decry_str & chr(cint("&H" + sp(i-1))-decr)
- decr=decr + decry_strat
- next
- DecryptData =decry_str
- end function
- 'response.write DecryptData(strReverse(request.QueryString("id")))
- dim reserveId,spTb,cCurr,canxw,numad,cy1,cy2
- ' reserveId = request.QueryString("resId")
- reserveId = DecryptData(strReverse(request.QueryString("id")))
- if reserveId = "" then
- ' response.write typename(request.QueryString("resId"))
- else
- ' response.Write Server.MapPath("../../access_db/PeterEngland.mdb")
- ' reserveId = 75
- spTb = "   "
- dim con,rec,sql_srchstring
- Set con = Server.CreateObject("ADODB.Connection")
- con.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="& Server.MapPath("../../access_db/PeterEngland.mdb")& ";Jet OLEDB:Database Password=arabia70_"
- Set rec = Server.CreateObject("ADODB.Recordset")
- sql_srchstring = "select * from Tbl_Reservation_Info,Tbl_Res_RateInfo where Tbl_Reservation_Info.Res_Invoice_Id="& int(reserveId) &" and Tbl_Reservation_Info.Res_Id= Tbl_Res_RateInfo.Trv_ResId"
- rec.open sql_srchstring ,con,1,3
- cCurr = rec.fields("Res_Currency")
- setCurrency(cCurr)
- canxw = rec.fields("Res_Canx")
- canw = rec.fields("Res_Cancel_Waiver")
- ' numad = rec.fields("Res_Currency")
- tfs = rec.fields("Res_Trfs")
- canxTot = rec.fields("Res_Canx")
- tfsTot = rec.fields("Res_Trfs")
- paySrc = rec.fields("Res_Cc_name")
- paySurch = rec.fields("Res_Cc_charge")
- paySurchg = rec.fields("Res_Cc_Amount")
- grTot = rec.fields("Res_Grand_Total")
- netTot = rec.fields("Res_Net_Tot")
- misc1 = rec.fields("Res_Misc1")
- misc2 = rec.fields("Res_Misc2")
- misct1 = rec.fields("Res_Text1")
- misct2 = rec.fields("Res_Text2")
- if rec.fields("Res_Invoice_Id") <> 0 then
- response.write "<center><h3>INVOICE</h3></center>"
- else
- response.write "<center><h3>PROFORMA INVOICE</h3></center>"
- end if
- function setCurrency(cR)
- if cR = "GBP" then
- cy1 = "Pounds"
- cy2 = "Pence"
- elseif cR = "AED" then
- cy1 = "Dirhams"
- cy2 = "Fils"
- elseif cR = "USD" then
- cy1 = "Dollars"
- cy2 = "Cents"
- end if
- end function
- function getRAgtName(agId)
- Set recA = Server.CreateObject("ADODB.Recordset")
- sql_srchstring = "select * from Tbl_Identity where Identity_Id=" & agId
- recA.open sql_srchstring ,con,1,3
- getRAgtName = recA.fields(1)
- recA.close
- end function
- response.Write "<table BORDER=0 class = 'tdPerson' width=630 border=0 ALIGN=CENTER><tr><td><table>" ' Personal Info
- 'response.write "<tr><td>Personal Information</td></tr>"
- response.write "<tr><td>"& rec.fields("Res_Title") &" "& rec.fields("Res_Name") &"</td></tr>"
- response.write "<tr><td>"& rec.fields("Res_Cc_Billing") &"</td></tr>"
- response.write "<tr><td>"& rec.fields("Res_Country") &"</td></tr>"
- response.write "<tr><td>Tel : "& rec.fields("Res_Office_Tel") &"</td></tr>"
- response.write "<tr><td>Fax : "& rec.fields("Res_Fax") &"</td></tr>"
- response.write "<tr><td>Email : <a href=mailto:"& rec.fields("Res_Email") & ">"& rec.fields("Res_Email") &"</a></td></tr>"
- 'response.write "<tr><td>Ident : "& rec.fields("Res_Staff_Id") &"</td></tr>"
- response.write "<tr><td>Flight Details : "& rec.fields("Res_Flight_Details") &"</td></tr></table></td>"
- response.Write "<td valign=bottom><table >"
- response.write "<tr><td> </td></tr>"
- if rec.fields("Res_Invoice_Id") = 0 then
- response.write "<tr><td>Invoice No. : MH - "& rec.fields("Res_Id") & "</td></tr>"
- else
- response.write "<tr><td>Invoice No. : MH - "& rec.fields("Res_Invoice_Id") & "</td></tr>"
- end if
- response.write "<tr><td>"& formatDateTime(rec.fields("Res_Date"),1) &"</td></tr>"
- ' response.write "<tr><td>Status : Proforma</td></tr>"
- response.write "<tr><td>Booking taken by : "& getRAgtName(rec.fields("Res_Agent")) &"</td></tr>"
- 'response.write "<tr><td>Agent : "& getTAgtName(rec.fields("Res_Travel_Agent")) &"</td></tr>"
- response.Write "<tr><td> </td></tr>"
- ' response.Write "<tr><td> Payment Type : "& paySrc &"</td></tr>"
- ' response.Write "<tr><td> Payment Id : "& payNum &"</td></tr>"
- 'response.Write "<tr><td> Payment Exp : "& payExp &"</td></tr>"
- response.write "<tr><td></td></tr></table>"
- response.Write "</td></tr></table><hr>"
- '...................................................................................................................
- response.Write "<table width=500 border=0 align=center><tr>" ' invice tabel starts
- response.write "<td width=500>" ' first colum starts here
- setInvoice
- setMisccharges
- response.write "</td>"
- 'response.write "<td>" ' second colum starts here
- 'response.write "</td>"
- response.Write "</tr></table><hr>" ' invoice tbl ends here
- function setInvoice
- while not rec.eof
- response.Write "<table border=0 class='tblCommon' width=500>"
- response.Write "<tr><td>"& listHotelName(rec.fields("Trv_Hotel")) &"</td></tr>"
- numAd = rec.fields("Trv_Adults")
- response.Write "<tr><td>Arrival : "& formatDateTime(rec.fields("Trv_Arrival"),1) & spTb &" Departure : "& formatDateTime(rec.fields("Trv_Depart"),1) &"</td></tr>"
- response.Write "<tr><td>"& spTb & "Meal Plan : " & rec.fields("Trv_MealPlan") &" </td></tr>"
- listRoomdetails(rec.fields("Trv_ResHotelId"))
- response.Write "</table><br>"
- rec.movenext
- wend
- end function
- function setMisccharges
- response.Write "<table border=0 class='tblCommon' width=500 valign=bottom>"
- response.Write "<tr><td align=right width=420>Transfers : "& cCurr &" "& tfs & spTb &"</td><td align=right ><b>"& tfsTot &".00</b></td></tr>"
- if canw <> "" then
- response.Write "<tr><td align=right width=420>"& canw & spTb & " </td><td align=right><b>"& canxw &".00</b></td></tr>"
- end if
- if misc1 <> "0" then
- response.Write "<tr><td align=right width=420>"& misct1 & spTb &" </td><td align=right><b>"& misc1 &".00</b></td></tr>"
- end if
- if misc2 <> "0" then
- response.Write "<tr><td align=right width=420>"& misct2 & spTb &" </td><td align=right><b>"& misc2 &".00</b></td></tr>"
- end if
- response.Write "<tr><td>"&spTb &"</td></tr>"
- response.Write "<tr><td align=right width=420>Grand Total"& spTb &" </td><td align=right><b>"& grTot &".00</b></td></tr>"
- if paySurch <> 0 then
- response.Write "<tr><td align=right width=420>Payment by "& paySrc &" ( Surcharge : "& paySurch &"%)</td><td align=right><b>"& paySurchg &"</b></td></tr>"
- else
- response.Write "<tr><td align=right width=420>Payment by "& paySrc &" ( No Surcharges)</td align=right><td>0.00</td></tr>"
- end if
- response.Write "<tr><td align=right width=420><b>Net Total</b>"& spTb &" </td><td align=right ><b>"& netTot &"</b></td></tr>"
- response.Write "</table><table class='tblCommon' align=right><tr><td><b>"& ConvertCurrencyToEnglish(netTot) &"</b></td></tr></table>"
- end function
- function listRoomdetails(htlId)
- ' response.write htlId
- dim con1,rec1,sql_srchstring1
- Set con1 = Server.CreateObject("ADODB.Connection")
- con1.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="& Server.MapPath("../../access_db/PeterEngland.mdb")& ";Jet OLEDB:Database Password=arabia70_"
- Set rec1 = Server.CreateObject("ADODB.Recordset")
- sql_srchstring1 = "select * from Tbl_Res_RoomInfo where Tbl_Res_RoomInfo.Htl_Res=" & htlId
- rec1.open sql_srchstring1,con1,1,3
- ' response.Write rec1.recordcount
- while not rec1.eof
- response.Write "<tr><td width=420>"& spTb & rec1.fields(2) & " " & rec1.fields(3) & " rooms X " & rec1.fields(4) & " nights X "& cCurr & " " & rec1.fields(5) &" per room per night</td><td align=right><b>"& rec1.fields(6) &".00</b></td></tr>"
- rec1.movenext
- wend
- end function
- function listHotelName(htlId)
- ' response.write htlId
- dim con1,rec1
- Set con1 = Server.CreateObject("ADODB.Connection")
- con1.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="& Server.MapPath("../../access_db/PeterEngland.mdb")& ";Jet OLEDB:Database Password=arabia70_"
- Set rec1 = Server.CreateObject("ADODB.Recordset")
- qry = "select * from Tbl_Hotel_Info where Tbl_Hotel_Info.Htl_Id=" & htlId
- rec1.open qry,con1,1,3
- response.Write "<tr><td><b>"& rec1.fields(1) &"</b></td></tr>"
- response.Write "<tr><td>"& rec1.fields(3) & " " & rec1.fields(2) &"</td></tr>"
- rec1.close
- con1.close
- end function
- Function ConvertCurrencyToEnglish(ByVal strAmount)
- Dim Temp, Cy2
- Dim Dollars, Cents
- Dim DecimalPlace, Count
- ReDim Place(9)
- Place(2) = " Thousand "
- Place(3) = " Million "
- Place(4) = " Billion "
- Place(5) = " Trillion "
- ' Convert strAmount to a string, trimming extra spaces.
- strAmount = Trim(cStr(strAmount))
- ' Find decimal place.
- DecimalPlace = InStr(strAmount, ".")
- ' If we find decimal place...
- If DecimalPlace > 0 Then
- ' Convert cents
- Temp = Left(Mid(strAmount, DecimalPlace + 1) & "00", 2)
- Cents = ConvertTens(Temp)
- ' Strip off cents from remainder to convert.
- strAmount = Trim(Left(strAmount, DecimalPlace - 1))
- End If
- Count = 1
- Do While strAmount <> ""
- ' Convert last 3 digits of strAmount to English dollars.
- Temp = ConvertHundreds(Right(strAmount, 3))
- If Temp <> "" Then Dollars = Temp & Place(Count) & Dollars
- If Len(strAmount) > 3 Then
- ' Remove last 3 converted digits from strAmount.
- strAmount = Left(strAmount, Len(strAmount) - 3)
- Else
- strAmount = ""
- End If
- Count = Count + 1
- Loop
- ' Clean up dollars.
- Select Case Dollars
- Case ""
- Dollars = cy1
- Case "One"
- Dollars = cy1
- Case Else
- Dollars = Dollars & " "& cy1
- End Select
- ' Clean up cents.
- if cCurr = "USD" then
- cy2 = "Cents"
- elseif cCurr = "AED" then
- cy2 = "Fils"
- else
- cy2 = "Pence"
- end if
- Select Case Cents
- Case ""
- ' Cents = " And No Cents"
- Case "One"
- Cents = cy2
- Case Else
- Cents = " And " & Cents & cy2
- End Select
- ConvertCurrencyToEnglish = Dollars & Cents
- End Function
- Private Function ConvertHundreds(ByVal strAmount)
- Dim Result
- ' Exit if there is nothing to convert.
- If eVal(strAmount) = 0 Then Exit Function
- ' Append leading zeros to number.
- strAmount = Right("000" & strAmount, 3)
- ' Do we have a hundreds place digit to convert?
- If Left(strAmount, 1) <> "0" Then
- Result = ConvertDigit(Left(strAmount, 1)) & " Hundred "
- End If
- ' Do we have a tens place digit to convert?
- If Mid(strAmount, 2, 1) <> "0" Then
- Result = Result & ConvertTens(Mid(strAmount, 2))
- Else
- ' If not, then convert the ones place digit.
- Result = Result & ConvertDigit(Mid(strAmount, 3))
- End If
- ConvertHundreds = Trim(Result)
- End Function
- Private Function ConvertTens(ByVal MyTens)
- Dim Result
- ' Is value between 10 and 19?
- If eVal(Left(MyTens, 1)) = 1 Then
- Select Case eVal(MyTens)
- Case 10: Result = "Ten"
- Case 11: Result = "Eleven"
- Case 12: Result = "Twelve"
- Case 13: Result = "Thirteen"
- Case 14: Result = "Fourteen"
- Case 15: Result = "Fifteen"
- Case 16: Result = "Sixteen"
- Case 17: Result = "Seventeen"
- Case 18: Result = "Eighteen"
- Case 19: Result = "Nineteen"
- Case Else
- End Select
- Else
- ' .. otherwise it's between 20 and 99.
- Select Case eVal(Left(MyTens, 1))
- Case 2: Result = "Twenty "
- Case 3: Result = "Thirty "
- Case 4: Result = "Forty "
- Case 5: Result = "Fifty "
- Case 6: Result = "Sixty "
- Case 7: Result = "Seventy "
- Case 8: Result = "Eighty "
- Case 9: Result = "Ninety "
- Case Else
- End Select
- ' Convert ones place digit.
- Result = Result & ConvertDigit(Right(MyTens, 1))
- End If
- ConvertTens = Result
- End Function
- Private Function ConvertDigit(ByVal MyDigit)
- Select Case eVal(MyDigit)
- Case 1: ConvertDigit = "One"
- Case 2: ConvertDigit = "Two"
- Case 3: ConvertDigit = "Three"
- Case 4: ConvertDigit = "Four"
- Case 5: ConvertDigit = "Five"
- Case 6: ConvertDigit = "Six"
- Case 7: ConvertDigit = "Seven"
- Case 8: ConvertDigit = "Eight"
- Case 9: ConvertDigit = "Nine"
- Case Else: ConvertDigit = ""
- End Select
- End Function
- end if
- %></td>
- </tr>
- <tr>
- <td><div align="center">
- <table width="99%" border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td><ul><li class="style16">
- <div align="left"><span class="style17">Cancellation requests should be made 3 days prior to arrival.If we receive your notification of cancellation or booking amendment request after 1 day prior to your check-in date, cancellation fees will be charged as stipulated by the respective hotel. Please note cancellation fees may range from the equivalent of one night stay up to the full amount for the entire stay. Depending on the nature of the amendment request, our standard cancellation conditions may apply. Please note that no refunds will be made for no-shows or early check-outs.</span></div>
- </li>
- <li class="style15">
- <div align="left">The Hotel Voucher will be made out to the guest name as defined in your booking and must be presented upon check-in at the hotel. </div>
- </li>
- <li class="style15">
- <div align="left">For Airport transfers, flight details must be adviced / updated with us. Early check-in subject to availability. </div>
- </li>
- <li class="style15">
- <div align="left"><span class="style17">It is our sincere intention to provide you with the best service possible. For issues related to your booking or for any urgent enquiries, we encourage you to call 7 days / 24 hours on <strong>00-971-50-6791104</strong></span><br>
- </div>
- </li>
- </ul></td>
- </tr>
- <tr>
- <td> </td>
- </tr>
- </table>
- </div></td>
- </tr>
- </table>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement