<!--#include file="../../owFunctions/I_GeneralFunctions.asp"-->
<%sPath = "../"%>
<!--#include file="../../owTemplates/Template_AllLeft.asp"-->
<%
	'************************************************************************************
	'*																					*
	'*	MODIFICATION TO THIS SCRIPT OR ANY FILES INCLUDED WITH 							*
	'*		ONEWORLDSTORE IS DONE AT YOUR OWN RISK!										*
	'*	Product  : OneWorldStore														*
	'*	Version  : 9.0000																*
	'*	Modified : June 2004															*
	'*	Copyright:	Copyright (C) 2004 OneWorldStore.Com								*
	'*				Registration Number: 1024507										*
	'*				http://strategis.ic.gc.ca/											*
	'*																					*
	'************************************************************************************
	
	Dim sError, sCartTax, sTotal
	Dim aTaxStateInfo, aTaxCountryInfo, sOptionGroupsTotal, sShippingFee
	Dim sHandlingVisibility, sHandlingFee
	Dim sOriginalCreditPmt, sCurrentCreditOwed, sCreditPayoffDate
	Dim sDiscountCode, sDiscountAmount

	'************************************************************************************
	'*																					*
	'*																					*
	'*																					*
	'************************************************************************************
	Sub ActionSubroutine()
	
		sSubTotal	= 0
		sAction		= Trim(Request("sAction"))
		sIDOrder	= Trim(Request("idOrder"))
		sPM			= Trim(Request("sPM"))

		if ( NOT bHasAccount ) then
			response.redirect "../owCustomerAuthenticate.asp"
		Else
			If ( Trim(sIDOrder) = "" ) Then
				Call owMessage(LANG_DT( "ORDERDETAILS_MISSINGORDER", "Unable to find order. Please choose another order to manage." ), C_ERROR)
			Else
				sSQLText = "SELECT * FROM orders WHERE idOrder = " & sIDOrder
				Call DB_getFromDatabase(sSQLText, rsStoreData, "") 
				if  rsStoreData.eof then 
					Call owMessage(Replace(LANG_DT( "ORDERDETAILS_OSSOMGPRDER2", "Unable to find the order (1:) in the system." ), "1:", sIDOrder), C_ERROR)
				Else
					dToday					= CONVERSION_FormatDate(Now(), "S")
					sName					= rsStoreData("FName")
					sLastName				= rsStoreData("LName")
					sEmail					= rsStoreData("email")
					sPhone					= rsStoreData("phone")   
					sOrderDate				= rsStoreData("orderDate")   
					sTotal					= rsStoreData("total")
					sPaymentMethod			= rsStoreData("PaymentMethod")
					sShipmentDetails		= rsStoreData("ShipmentDetails")
					sCustomerComments		= rsStoreData("CustomerComments")
					sTaxAmount				= rsStoreData("taxAmount")
					sAddress				= rsStoreData("address")
					sZip					= rsStoreData("zip")
					sState					= rsStoreData("state")
					sStateCode				= rsStoreData("stateCode")
					sCity					= rsStoreData("city")
					sCountryCode			= rsStoreData("countryCode")
					sShippingName			= rsStoreData("ShippingName")
					sShippingLastName		= rsStoreData("ShippingLastName")
					sShippingaddress		= rsStoreData("shippingAddress")
					sShippingZip			= rsStoreData("shippingzip")
					sShippingState			= rsStoreData("shippingstate")
					sShippingStateCode		= rsStoreData("shippingstateCode")
					sShippingCity			= rsStoreData("shippingcity")
					sShippingcountryCode	= rsStoreData("shippingCountryCode")
					sOrderStatus			= rsStoreData("orderStatus")
					sTrackingNumber			= rsStoreData("TrackingNumber")
					sPaymentMethodFee		= rsStoreData("PaymentMethodFee")
					sShippingFee			= rsStoreData("ShippingFee")
					sTrackingNumber			= rsStoreData("TrackingNumber")
					sHandlingVisibility		= rsStoreData("HandlingVisibility")
					sHandlingFee			= rsStoreData("HandlingFee")
					sOriginalCreditPmt		= rsStoreData("OriginalCreditPmt")
					sCurrentCreditOwed		= rsStoreData("CurrentCreditOwed")
					sCreditPayoffDate		= rsStoreData("CreditPayoffDate")
					sDiscountCode			= rsStoreData("DiscountCode")
					sDiscountAmount			= rsStoreData("DiscountAmount")
					Call DB_closeRecordset(rsStoreData)

					%>
					<center>
					<%
					If ( sAction = "New" ) Then
						If ( sPM = "" ) Then
							sPM = 0
						Else
							sPM = CInt(sPM)
						End If
						Set objstrTemp = New StrConCatArray
						objstrTemp.Add "<b>" & LANG_DT( "ORDERDETAILS_THANKYOU", "Thank you for your purchase!" ) & "</b><br><br>" & LANG_DT( "ORDERDETAILS_PRINTPAGE", "Please Print this page for your records. A confirmation email has been sent to your email address" ) & ": " & sEmail & "."
						Select Case sPM
							Case C_PM_MAILIN
								objstrTemp.Add "<BR><BR>" & LANG_DT( "ORDERDETAILS_MAILTO", "Please mail your payment to" ) & ":<BR>"
								objstrTemp.Add sOWCompany
								objstrTemp.Add "<br>" & sOWCompanyAddress
								objstrTemp.Add "<br>" & sOWCompanyStateCode & " - " & sOWCompanyCity & " (" & sOWCompanyZip & ")"
								objstrTemp.Add "<br>" & sOWCompanyCountryCode
							Case C_PM_FAXIN
								objstrTemp.Add "<br><Br>" & LANG_DT( "ORDERDETAILS_FAXTO", "Please fax your payment information to" ) & ":<br>" & sOWCompanyFax
							Case C_PM_PHONEIN
								objstrTemp.Add "<br><Br>" & LANG_DT( "ORDERDETAILS_PHONETO", "Please call in your payment information at this number" ) & ":<Br>" & sOWCompanyPhone
						End Select
						Call owMessage(objstrTemp.Value, C_SUCCESS)
						Set objstrTemp = Nothing
					End If

					%>
					<table width=<%=sOWStoreTableWidth%> border=0 style='border: 1px solid AAAAAA;' cellpadding=5>
						<tr bgcolor="#eeeeee"> 
							<td height="14" colspan=2>
								<table width=100%>
									<tr>
										<td>
											<b><%=LANG_DT( "ORDERDETAILS_ORDERNUM", "Order number #" )%> <%=sOWOrderPrefix&sIDOrder%>
										</td>
										<td align=right>
											<b><div align=right><%="Date "%> <%=sOrderDate%></div>
										</td>
									</tr>
								</table>
							</td>
						</tr>
						<tr>
							<td colspan=2>
						<table width=100%>
							<tr>
								<td width=50% valign=top>
									<table width=100%>
										<tr>
											<td colspan=3 style='border-bottom: 1px solid #000000;' bgcolor=EEEEEE>
												<b><%=LANG_DT( "ORDERVERIFY_BILLINGADDRESS", "Billing Address" )%>:
											</td>
										</tr>
										<tr>
											<td style='border-bottom: 1px solid #EEEEEE;'>
												<%=LANG_DT( "ORDERVERIFY_NAME", "Name" )%>
											</td>
											<td style='border-bottom: 1px solid #EEEEEE;'>&nbsp;&nbsp;&nbsp;</td>
											<td style='border-bottom: 1px solid #EEEEEE;'>
												<%=sName&" "&sLastName%>
											</td>
										</tr>
										<tr>
											<td style='border-bottom: 1px solid #EEEEEE;'>
												<%=LANG_DT( "ORDERVERIFY_COUNTRY", "Country" )%>
											</td>
											<td style='border-bottom: 1px solid #EEEEEE;'>&nbsp;&nbsp;&nbsp;</td>
											<td style='border-bottom: 1px solid #EEEEEE;'>
												<%
												sSQLText = "SELECT CountryName FROM CountryCodes WHERE CountryCode = '" & SQLEncode(sCountryCode) & "'"
												Call DB_getFromDatabase(sSQLText, rsStoreData, "")
												If ( NOT rsStoreData.EOF ) Then
													Response.Write rsStoreData("CountryName")
												Else
													Response.Write sCountryCode
												End If
												Call DB_closeRecordset(rsStoreData)
												%>
											</td>
										</tr>
										<%If ( sStateCode <> "" ) Then%>
										<tr>
											<td style='border-bottom: 1px solid #EEEEEE;'>
												<%=STRUCTURE_TerritoryLabel(sCountryCode)%>
											</td>
											<td style='border-bottom: 1px solid #EEEEEE;'>&nbsp;&nbsp;&nbsp;</td>
											<td style='border-bottom: 1px solid #EEEEEE;'>
												<%
												sSQLText = "SELECT StateName FROM StateCodes WHERE StateCode = '" & SQLEncode(sStateCode) & "' AND CountryCode = '" & SQLEncode(sCountryCode) & "'"
												Call DB_getFromDatabase(sSQLText, rsStoreData, "")
												If ( NOT rsStoreData.EOF ) Then
													Response.Write rsStoreData("StateName")
												Else
													Response.Write sStateCode
												End If
												Call DB_closeRecordset(rsStoreData)
												%>
											</td>
										</tr>
										<%End If%>
										<%If ( sCity <> "" ) Then%>
										<tr>
											<td style='border-bottom: 1px solid #EEEEEE;'>
												<%=LANG_DT( "ORDERVERIFY_CITY", "City" )%>
											</td>
											<td style='border-bottom: 1px solid #EEEEEE;'>&nbsp;&nbsp;&nbsp;</td>
											<td style='border-bottom: 1px solid #EEEEEE;'>
												<%=sCity%>
											</td>
										</tr>
										<%End If%>
										<tr>
											<td style='border-bottom: 1px solid #EEEEEE;'>
												<%=STRUCTURE_PostalCodeLabel(sCountryCode)%>
											</td>
											<td style='border-bottom: 1px solid #EEEEEE;'>&nbsp;&nbsp;&nbsp;</td>
											<td style='border-bottom: 1px solid #EEEEEE;'>
												<%=sZip%>
											</td>
										</tr>
									</table>
								</td>
								<td style='border-right: 1px solid #000000;'>&nbsp;</td>
								<td width=50% valign=top>
									<table width=100%>
										<tr>
											<td colspan=3 style='border-bottom: 1px solid #000000;' bgcolor=EEEEEE>
												<b><%=LANG_DT( "ORDERVERIFY_SHIPPINGADDRESS", "Shipping Address" )%>:
											</td>
										</tr>
										<%If ( Trim(sShippingAddress) <> "" ) Then%>
										<tr>
											<td style='border-bottom: 1px solid #EEEEEE;'>
												<%=LANG_DT( "ORDERVERIFY_NAME", "Name" )%>
											</td>
											<td style='border-bottom: 1px solid #EEEEEE;'>&nbsp;&nbsp;&nbsp;</td>
											<td style='border-bottom: 1px solid #EEEEEE;'>
												<%=sShippingName & " " & sShippingLastName%>
											</td>
										</tr>
										<tr>
											<td style='border-bottom: 1px solid #EEEEEE;'>
												<%=LANG_DT( "ORDERVERIFY_COUNTRY", "Country" )%>
											</td>
											<td style='border-bottom: 1px solid #EEEEEE;'>&nbsp;&nbsp;&nbsp;</td>
											<td style='border-bottom: 1px solid #EEEEEE;'>
												<%
												sSQLText = "SELECT CountryName FROM CountryCodes WHERE CountryCode = '" & SQLEncode(sShippingCountryCode) & "'"
												Call DB_getFromDatabase(sSQLText, rsStoreData, "")
												If ( NOT rsStoreData.EOF ) Then
													Response.Write rsStoreData("CountryName")
												Else
													Response.Write sShippingCountryCode
												End If
												Call DB_closeRecordset(rsStoreData)
												%>
											</td>
										</tr>
										<%If ( sShippingState <> "" ) Then%>
										<tr>
											<td style='border-bottom: 1px solid #EEEEEE;'>
												<%=STRUCTURE_TerritoryLabel(sShippingCountryCode)%>
											</td>
											<td style='border-bottom: 1px solid #EEEEEE;'>&nbsp;&nbsp;&nbsp;</td>
											<td style='border-bottom: 1px solid #EEEEEE;'>
												<%
												sSQLText = "SELECT StateName FROM StateCodes WHERE StateCode = '" & SQLEncode(sShippingState) & "' AND CountryCode = '" & SQLEncode(sShippingCountryCode) & "'"
												Call DB_getFromDatabase(sSQLText, rsStoreData, "")
												If ( NOT rsStoreData.EOF ) Then
													Response.Write rsStoreData("StateName")
												Else
													Response.Write sShippingState
												End If
												Call DB_closeRecordset(rsStoreData)
												%>
											</td>
										</tr>
										<%End If%>
										<%If ( sShippingCity <> "" ) Then%>
										<tr>
											<td style='border-bottom: 1px solid #EEEEEE;'>
												<%=LANG_DT( "ORDERVERIFY_CITY", "City" )%>
											</td>
											<td style='border-bottom: 1px solid #EEEEEE;'>&nbsp;&nbsp;&nbsp;</td>
											<td style='border-bottom: 1px solid #EEEEEE;'>
												<%=sShippingCity%>
											</td>
										</tr>
										<%End If%>
										<tr>
											<td style='border-bottom: 1px solid #EEEEEE;'>
												<%=STRUCTURE_PostalCodeLabel(sShippingCountryCode)%>
											</td>
											<td style='border-bottom: 1px solid #EEEEEE;'>&nbsp;&nbsp;&nbsp;</td>
											<td style='border-bottom: 1px solid #EEEEEE;'>
												<%=sShippingZip%>
											</td>
										</tr>
										<%Else%>
										<tr>
											<td align=center valign=center>
												<br><br><b><%=LANG_DT( "ORDERVERIFY_SAMEASBILL", "Same as billing" )%>
											</td>
										</tr>
										<%End If%>
									</table>
								</td>
							</tr>
						</table>
							</td>
						</tr>
						<tr> 
							<td height="11"><%=LANG_DT( "ORDERDETAILS_EMAIL", "Email" )%></td>
							<td height="11"><%=sEmail%></td>
						</tr>
						<tr> 
							<td height="21"><%=LANG_DT( "ORDERDETAILS_PHONE", "Phone" )%></td>
							<td height="21"><%=sPhone%></td>
						</tr>
						<tr> 
							<td height="26"><%=LANG_DT( "ORDERDETAILS_SHIP", "Shipment" )%></td>
							<td height="26"><%=sShipmentDetails%></td>
						</tr>
						<tr> 
							<td height="9"><%=LANG_DT( "ORDERDETAILS_PAYMENT", "Payment" )%></td>
							<td height="9"><%=sPaymentMethod%>
								<%if sPaymentMethodFee<>"" And sPaymentMethodFee<>"0" then%>
								(<%=sPaymentMethodFee%>)
								<%End If%>
							</td>
						</tr>
						<tr>
							<td height="17"><%=LANG_DT( "ORDERDETAILS_STATUS", "Status" )%></td>
							<td height="17">
								<%
								Select Case sOrderStatus
									Case C_PENDING
										Response.Write LANG_DT( "PENDING", "In Progress" )
									Case C_DELIVERED
										Response.Write LANG_DT( "DELIVERED", "Delivered" )
									Case C_CANCELLED
										Response.Write LANG_DT( "CANCELLED", "Cancelled" )
									Case C_PAID
										Response.Write LANG_DT( "PAID", "Paid" )
									Case C_CHARGEBACK
										Response.Write LANG_DT( "CHARGEBACK", "ChargeBack" )
									Case C_REFUNDED
										Response.Write LANG_DT( "REFUNDED", "Refunded" )
									Case C_UNFINALIZED
										Response.Write LANG_DT( "UNFINALIZED", "Unfinalized" )
								End Select
								%>
							</td>
						</tr>
						<tR>
							<td><%=LANG_DT( "ORDERDETAILS_COMMENTS", "Comments" )%></td>
							<td>
								<%=sCustomerComments%>
							</td>
						</tR>
						<tr><td colspan=2><hr size=1 color=000000></td></tr>
						<tr> 
							<td colspan=2 width=100%>
								<table width=100% border=0 cellspacing="5" cellpadding="0">    
									<tr> 
										<td width="30%"> <b><%=LANG_DT( "ORDERDETAILS_SKU", "SKU" )%></b></td>
										<td width="40%"> <b><%=LANG_DT( "ORDERDETAILS_DESC", "Description" )%></b></td>
										<td width="10%"> <b><%=LANG_DT( "ORDERDETAILS_QTY", "Quantity" )%></b></td>
										<td width="10%"> <b><%=LANG_DT( "ORDERDETAILS_UPRICE", "Unit Price" )%></b></td>
										<td width="10%"> <b><%=LANG_DT( "ORDERDETAILS_PRICE", "Price" )%></b></td>
									</tr>
									<%
									' get order products contents
									sSQLText = "SELECT * FROM OrdersProdRef WHERE idOrder = " & sIDOrder
									Call DB_getFromDatabase(sSQLText, rsStoreData, "") 
									do while not rsStoreData.eof
										pDescription			= rsStoreData("description")		
										sQuantity				= rsStoreData("quantity")
										sUnitPrice				= rsStoreData("UnitPrice")
										sUnitBtoBPrice			= rsStoreData("UnitBtoBPrice")
										sUnitDealerPrice		= Cdbl(rsStoreData("UnitDealerPrice"))
										sIDOrderProd			= rsStoreData("IDOrderProd")
										%>
										<tr> 
											<td valign=top><a href="../../owProductDetail.asp?idProduct=<%=rsStoreData("idProduct")%>"><%=rsStoreData("sku")%></a> </td>
											<td valign=top>
												<%
												Response.Write pDescription
												Call DisplayOptions(sIDOrder, rsStoreData("idProduct"))
												
												If ( sUnitDealerPrice > 0 ) Then
													sRowPrice = Cdbl(sQuantity) * (sUnitDealerPrice + sOptionGroupsTotal)
												Else
													if ACCNT_InGroup(iLoginAccountUnq, C_GROUP_RETAIL) then
														sRowPrice = Cdbl(sQuantity) * (Cdbl(sUnitPrice) + sOptionGroupsTotal)
													else
														sRowPrice = Cdbl(sQuantity) * (Cdbl(sUnitBtoBPrice) + sOptionGroupsTotal)
													End If
												End If
												sSubTotal = sSubTotal + sRowPrice
												%>
											</td>
											<td valign=top><%=sQuantity%></td>
											<td valign=top>
												<%
												If ( sUnitDealerPrice > 0 ) Then
													Response.Write CONVERSION_Currency(sUnitDealerPrice)
												Else
													if ACCNT_InGroup(iLoginAccountUnq, C_GROUP_RETAIL) then
														Response.Write CONVERSION_Currency(sUnitPrice)
													else
														Response.Write CONVERSION_Currency(sUnitBtoBPrice)
													End If
												End If

												%>
											</td>
											<td valign=top><%=CONVERSION_Currency(sRowPrice)%> </td>
										</tr>     
										<%
										rsStoreData.movenext
									loop
									Call DB_closeRecordset(rsStoreData)
									%>          
								</table>         
							</td>
						</tr>
						<tr><td colspan=2><hr size=1 color=000000></td></tr>
						<%Call DisplayTaxes(sIDOrder)%>
					</table>
					<br> 
					<%
				End If 
			End If
		End If

	End Sub
	'************************************************************************************
	
	
	'************************************************************************************
	'*																					*
	'*																					*
	'*																					*
	'************************************************************************************
	Sub DisplayOptions(sIDOrder, idProduct)
	
		sOptionGroupsTotal = 0
		
		sSQLText = "SELECT * FROM OrdersProdOptions WHERE idProduct = " & idProduct & " AND idOrder = " & sIDOrder & " ORDER BY OptionGroupDescription"
		Call DB_getFromDatabase(sSQLText, rsStoreData2, "") 
		If ( NOT rsStoreData2.EOF ) Then
			Response.Write "<BR><table cellpadding=5 cellspacing=0 border=0 width=100" & "%" & ">"
			While ( NOT rsStoreData2.EOF )
				sPriceToAdd	= CDbl(Trim(rsStoreData2("priceToAdd")))
				sTextDetail	= Trim(rsStoreData2("TextDetail"))
				sTemp		= "<tr><td align=right valign=top>" & Trim(rsStoreData2("OptionGroupDescription")) & ": </td><td>" & Trim(rsStoreData2("optionDescription"))
				If ( sTextDetail <> "" ) Then
					sTemp = sTemp & "<bR><input type='text' name='' value=""" & Server.HTMLEncode(sTextDetail) & """ readonly>"
				End If
				sTemp = sTemp & "</td><td align=right>"
				If ( sPriceToAdd > 0 ) Then
					sTemp = sTemp & LANG_DT( "ORDERDETAILS_ADD", "Add" ) & ": " & CONVERSION_Currency(sPriceToAdd)
				End If
				Response.Write sTemp & "</td></tr>"
				sOptionGroupsTotal = sOptionGroupsTotal + sPriceToAdd        
				rsStoreData2.movenext
			Wend
			Response.Write "</table>"
		End If
		Call DB_closeRecordset(rsStoreData2)
	
	End Sub
	'************************************************************************************
	
	
	
	'************************************************************************************
	'*																					*
	'*																					*
	'*																					*
	'************************************************************************************
	Sub DisplayTaxes(sIDOrder)
	
		sCartTax = 0.00
		
		If ( sOWCurrencyCode <> "" ) Then
			sTempCurrencyCode = "(" & sOWCurrencyCode & ")"
		End If
		
		%>
		<tr> 
			<td colspan=2 align=right>
				<Table cellpadding=3 cellspacing=0 border=0>
					<tr> 
						<td align=right>
							<b><%=LANG_DT( "ORDERDETAILS_SUBTOTAL", "Subtotal" )%>: </b>
						</td>     
						<td width=50 bgcolor=EEEEEE>
							<%=CONVERSION_Currency(sSubTotal)%>
						</td>
					</tr>
					<tr>
						<td align=right>
							<b><%=LANG_DT( "ORDERDETAILS_SHIPPING", "Shipping" )%>:
						</td>
						<td>
							<%=CONVERSION_Currency(sShippingFee)%>
						</td>
					</tr>
					<%If ( sHandlingVisibility = "Y" ) Then%>
					<tr> 
						<td align=right><b><%=LANG_DT( "ORDERVERIFY_HANDLING", "Handling" )%>: </b></td>
						<td>
							<%=CONVERSION_Currency(sHandlingFee)%>
						</td>
					</tr>
					<%End If%>
					</tr>
					<%
					' get State/Provencial Taxes
					sSQLText = "SELECT TaxName, Percentage FROM OrdersTaxes WHERE idOrder = " & sIDOrder & " ORDER BY CountryCode, StateCode, ZipCode"
					Call DB_getFromDatabase(sSQLText, rsStoreData, "")
					If ( NOT rsStoreData.EOF ) Then
						While ( NOT rsStoreData.EOF )
							sCartTax = sCartTax + CDbl(Trim(rsStoreData("Percentage")))
							%>
							<tr> 
								<td align=right>
									<b><%=Trim(rsStoreData("TaxName"))%></b>
								</td>
								<td width=50 bgcolor=EEEEEE>
									<%=Trim(rsStoreData("Percentage"))%>%
								</td>
							</tr>
							<%
							rsStoreData.movenext
						Wend
					End If
					Call DB_closeRecordset(rsStoreData)
					%>
					<tr> 
						<td align=right>
							<b><%=LANG_DT( "ORDERDETAILS_TTLTAX", "Total Tax Percentile" )%>: </b>
						</td>     
						<td width=50 bgcolor=EEEEEE>
							<%=sCartTax%>%
						</td>
					</tr>
					<tr> 
						<td align=right>
							<b><%=LANG_DT( "ORDERDETAILS_TAX", "Tax Amount" )%>: </b>
						</td>     
						<td width=50 bgcolor=EEEEEE>
							<%=CONVERSION_Currency(sTaxAmount)%>
						</td>
					</tr>
					<%If ( sDiscountCode <> "" ) Then%>
					<tr>
						<td align=right>
							<b><%=LANG_DT( "ORDERVERIFY_DISC", "Discount" )%></b>: 
						</td>     
						<td width=50>
							<b><%=CONVERSION_Currency(sDiscountAmount)%></b>
						</td>
					</tr>
					<%End If%>
					<tr>
						<td align=right>
							<font size=+1><%=LANG_DT( "ORDERDETAILS_TOTAL", "Total" )%></font>&nbsp;<%=sTempCurrencyCode%>: 
						</td>     
						<td width=50>
							<font size=+1><u><%=CONVERSION_Currency(sTotal)%>
						</td>
					</tr>
					<%If ( sOriginalCreditPmt > 0 ) Then%>
					<tr>
						<td align=right>
							<%=LANG_DT( "ORDERDETAILS_CREDITUSED", "Credit used to pay for this order" )%>: 
						</td>     
						<td width=50>
							<%=CONVERSION_Currency(sOriginalCreditPmt)%>
						</td>
					</tr>
					<tr>
						<td align=right>
							<%=LANG_DT( "ORDERDETAILS_CREDITOWED", "Amount still owed" )%>: 
						</td>     
						<td width=50>
							<%=CONVERSION_Currency(sCurrentCreditOwed)%>
						</td>
					</tr>
					<tr>
						<td align=right>
							<%=LANG_DT( "ORDERDETAILS_FINALPAYDATE", "Final payoff date" )%>: 
						</td>     
						<td width=50>
							<%
							If ( sCreditPayoffDate = "" ) Or ( IsNull(sCreditPayoffDate) ) Then
								Response.Write "<b>" & LANG_DT( "ORDERDETAILS_STILLDUE", "Still Due" ) & "</b>"
							Else
								Response.Write sCreditPayoffDate
							End If
							%>
						</td>
					</tr>
					<%End If%>
				</table>
			</td>
		</tr>
		<%
		
	End Sub
	'************************************************************************************
%>