<%@ LANGUAGE="VBSCRIPT" %> <% PageStrings = "18, 33, 55, 56, 60, 75, 76, 80, 81, 82, 91, 92, 206, 233, 301, 304, 305, 643, 644, 645, 646, 647, 653, 825, 836" %> <% ON_ID = CInt(Request.QueryString("n")) if Request.QueryString("f") = "list" Then FromOrderList = "y" If IsNumeric(ON_ID) then If DBType = "mysql" Then theQuery = "SELECT * FROM tbl_InvoiceRows INNER JOIN tbl_OrderNumbers ON tbl_InvoiceRows.IR_OrderNumber = tbl_OrderNumbers.ON_ID INNER JOIN tbl_CardholderDetails ON tbl_OrderNumbers.ON_CardholderID = tbl_CardholderDetails.CD_ID WHERE ON_Sent='y' AND ON_ID = " & ON_ID Else theQuery = "SELECT * FROM tbl_InvoiceRows INNER JOIN (tbl_OrderNumbers INNER JOIN tbl_CardholderDetails ON tbl_OrderNumbers.ON_CardholderID = tbl_CardholderDetails.CD_ID) ON tbl_InvoiceRows.IR_OrderNumber = tbl_OrderNumbers.ON_ID WHERE ON_Sent='y' AND ON_ID = " & ON_ID End If Call ExecuteSQL(theQuery,cursortype,rs_main) IntNumRecs = rs_main.RecordCount If IntNumRecs>0 then CD_ID = rs_main("CD_ID") CD_CardholderName = SafeHTMLEncode(rs_main("CD_CardholderName")) CD_CardholderCompany = SafeHTMLEncode(rs_main("CD_CardholderCompany")) CD_CardholderStreetAddress = SafeHTMLEncode(rs_main("CD_CardholderStreetAddress")) CD_CardholderTownCity = SafeHTMLEncode(rs_main("CD_CardholderTownCity")) CD_CardholderCounty = SafeHTMLEncode(rs_main("CD_CardholderCounty")) CD_CardholderPostCode = SafeHTMLEncode(rs_main("CD_CardholderPostCode")) CD_CardholderCountry = SafeHTMLEncode(rs_main("CD_CardholderCountry")) ON_Details = rs_main("ON_Details") ON_TotalPrice = rs_main("ON_TotalPrice") ON_Date = rs_main("ON_Date") ON_Status = rs_main("ON_Status") ON_Details = rs_main("ON_Details") ON_LastModified = rs_main("ON_LastModified") ON_Sent = rs_main("ON_Sent") ON_Invoiced = rs_main("ON_Invoiced") ON_Shipped = rs_main("ON_Shipped") ON_Paid = rs_main("ON_Paid") ON_CouponCode = rs_main("ON_CouponCode") ON_CouponDiscountTotal = rs_main("ON_CouponDiscountTotal") ON_PricesIncTax = rs_main("ON_PricesIncTax") ON_TaxDue = rs_main("ON_TaxDue") numShippingPriceExTax = rs_main("ON_ShippingPrice") numShippingPriceIncTax = rs_main("ON_ShippingPrice") + rs_main("ON_ShippingTax") numTotal = rs_main("ON_TotalPrice") numDiscountPercentage = rs_main("ON_DiscountPercentage") CD_ID = rs_main("CD_ID") End if If ON_CouponCode<>"" then theQuery2 = "SELECT * FROM tbl_Coupons WHERE CP_CouponCode='" & ON_CouponCode & "'" Call ExecuteSQL(theQuery2,cursortype,rs_main2) CP_DiscountValue = rs_main2("CP_DiscountValue") CP_DiscountType = rs_main2("CP_DiscountType") If CP_DiscountType = "f" then CP_DiscountValue = ON_CouponDiscountTotal CP_CouponCode = rs_main2("CP_CouponCode") rs_main2.close End if end if %> Tax Invoice <% If IntNumRecs<1 then %>
<% WriteString("PageTitle_OrderStatus") %>
<% WriteString("ContentText_OrderNotFound") %>
<% WriteString("ContentText_LookupPage") %>
<% else %>
Tax Invoice

<% strAddress = (CD_CardholderName & "
" &_ CD_CardholderCompany & "
" &_ CD_CardholderStreetAddress & "
" &_ CD_CardholderTownCity & "
" &_ CD_CardholderCounty & "
" &_ CD_CardholderPostCode & "
" &_ CD_CardholderCountry & "
") strAddress = replace(strAddress,"

","
") response.write(strAddress) %>
Synergy Washrooms
ABN: ??
PO Box 123, Botany, NSW, Australia, 2019.
eMail: info@synergywashrooms.com.au
Phone: 1800 633 779
Fax: 1800 888 768
www.synergywashrooms.com.au

<% If Application(HASHKEYNUMBERXYZ & "ordertracking") = "y" then %>
<% WriteString("ContentText_OrderNumber") %> <% =ON_ID %>
<% WriteString("ContentText_OrderDate") %> <% =FriendlyDate(ON_Date,"d") %>
<% WriteString("ContentText_LastUpdate") %> <% =FriendlyDate(ON_LastModified,"t") %> (GMT -05:00)
<% WriteString("ContentText_OrderStatus") %>
<% If ON_Sent = "y" then %>img_template/tick1.gif"><% else %>img_template/notick1.gif"><% end if %> <% WriteString("ContentText_OrderStatusSent") %>
<% If ON_Paid = "y" then %>img_template/tick1.gif"><% else %>img_template/notick1.gif"><% end if %> <% WriteString("ContentText_OrderStatusPaid") %>
<% If ON_Invoiced = "y" then %>img_template/tick1.gif"><% else %>img_template/notick1.gif"><% end if %> <% WriteString("ContentText_OrderStatusInvoiced") %>
<% WriteString("ContentText_OrderProgress") %> <% =safeHTMLencode(ON_Status) %>

<% If ON_PricesIncTax = "y" then %> <% Else %> <% End if %> <% do while NOT rs_main.EOF %> <% If ON_PricesIncTax = "y" then If Application(HASHKEYNUMBERXYZ & "showtaxdisplay") = "y" then %> <% Else %> <% End if %> <% Else %> <% End if %> <% numRowPriceExTax = Round((rs_main("IR_Quantity") * (rs_main("IR_PricePerItem") - rs_main("IR_TaxPerItem"))) - 0.0001, 2) numRowPriceIncTax = rs_main("IR_PricePerItem") * rs_main("IR_Quantity") 'Price of row inc tax (row = items x qty) rs_main.movenext loop taxRate = 10 numTotalPriceExTax = Round(((numTotal / (100 + taxRate)) * 100), 2) numTotalTaxAmount = Round(((numTotal / (100 + taxRate)) * taxRate), 2) 'Running total of order price ex tax If ON_TaxDue=1 then strOrderValueTotal = GetString("ContentText_OrderValue") & " = " & Application(HASHKEYNUMBERXYZ & "currencyunit") & " " & Pounds(numTotal) & "
" Else strOrderValueTotal = GetString("ContentText_OrderValue") & " = " & Application(HASHKEYNUMBERXYZ & "currencyunit") & " " & Pounds(numTotalPriceExTax) & "
" strTaxTotal = GetString("ContentText_Tax") & " = " & Application(HASHKEYNUMBERXYZ & "currencyunit") & " " & Pounds(numTotalTaxAmount) & "
" End if %>
Order Details<% WriteString("ContentText_ExTax") %> (<% =Application(HASHKEYNUMBERXYZ & "currencyunit") %>)  <% WriteString("ContentText_Tax") %> (<% =Application(HASHKEYNUMBERXYZ & "currencyunit") %>) <% WriteString("ContentText_Price") %> (<% =Application(HASHKEYNUMBERXYZ & "currencyunit") %>)  <% WriteString("ContentText_Tax") %> (%) <% WriteString("ContentText_Qty") %> <% WriteString("ContentText_Total") %> (<% =Application(HASHKEYNUMBERXYZ & "currencyunit") %>)
<% response.write(rs_main("IR_VersionName")) %>
<% response.write(rs_main("IR_VersionCode")) %><% response.write(Pounds(rs_main("IR_PricePerItem") - rs_main("IR_TaxPerItem"))) %> <% response.write(Pounds(rs_main("IR_TaxPerItem"))) %><% response.write(Pounds(rs_main("IR_PricePerItem") + rs_main("IR_TaxPerItem"))) %><% response.write(rs_main("IR_Quantity")) %> <% response.write(Pounds(rs_main("IR_PricePerItem") * rs_main("IR_Quantity"))) %><% response.write(Pounds(rs_main("IR_PricePerItem"))) %> <% response.write(rs_main("IR_TaxPerItem")*100) %> <% response.write(rs_main("IR_Quantity")) %> <% response.write(Pounds(0.0001 + (rs_main("IR_PricePerItem") * rs_main("IR_Quantity") * (1 + rs_main("IR_TaxPerItem"))))) %>
 
<% If ON_CouponCode <> "" then If CP_DiscountType = "p" then strCouponDiscount = GetString("ContentText_CouponDiscount") & " = " & CP_DiscountValue & "%
" Else strCouponDiscount = GetString("ContentText_CouponDiscount") & " = " & Application(HASHKEYNUMBERXYZ & "currencyunit") & " " & Pounds(CP_DiscountValue) & "
" End if End if If numDiscountPercentage <> 0 then strDiscountPercentage = GetString("ContentText_Discount") & " = " & Pounds(numDiscountPercentage) & "%
" End if strTotal = "" & GetString("ContentText_Total") & " = " & Application(HASHKEYNUMBERXYZ & "currencyunit") & " " & Pounds(numTotal) & "
" response.write(strCouponDiscount & strDiscountPercentage & strOrderValueTotal & strTaxTotal & strTotal) %>
<% end if %>

Print

<< Back to Invoice List
<% end if rs_main.close %>
<% DataConn.Close set DataConn = nothing %>