<% ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' System : StoreFront 2000 Version 4.04.0 ' Date : 1.6.2000 ' Author : LaGarde, Incorporated ' Description : StoreFront Invoice Printing Routines ' Notes : There are no configurable elements in this file. ' ' COPYRIGHT NOTICE ' ' The contents of this file is protected under the United States ' copyright laws as an unpublished work, and is confidential and ' proprietary to LaGarde, Incorporated. Its use or disclosure in ' whole or in part without the expressed written permission of ' LaGarde, Incorporated is expressely prohibited. ' ' (c) Copyright 1998 by LaGarde, Incorporated. All rights reserved. ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' %> Customer Invoice <% Dim DSN_Name DSN_Name = Session("DSN_Name") set Connection = Server.CreateObject("ADODB.Connection") Connection.Open DSN_Name SQL = "SELECT LCID FROM admin" set RSAdmin = Connection.Execute (SQL) session.LCID = RSAdmin("LCID") Set RSAdmin = nothing 'Report 3 is the Customer Invoice Report. SQLStmt = "SELECT * FROM Customer WHERE CUSTOMER_ID = " SQLStmt = SQLStmt & "" & Request("OrderID") & " " Set RSCustDetail = Connection.Execute(SQLStmt) SQLStmt = "SELECT orders.AttributeA, orders.AttributeB, orders.AttributeC, " _ & "orders.Product_ID, orders.Description, orders.Price, orders.Quantity, " _ & "orders.Total FROM orders WHERE ORDER_ID = " & Request("OrderID") & " " 'Response.Write (SQLStmt) Set RSOrderDetail = Connection.Execute(SQLStmt) GrandTotal = Ccur(RSCustDetail("GRAND_TOTAL")) SubTotal = Ccur(RSCustDetail("SUB_TOTAL")) Tax = ccur(RSCustDetail("TAX")) ShipAmt = ccur(RSCustDetail("SHIPPING_AMT")) HandlingCOD = FormatCurrency(GrandTotal-(SubTotal+Tax+ShipAmt)) %> <% Dim ShipMsg ShipMsg = RSCustDetail("SHIP_MESSAGE") If ShipMsg <> "" Then %> <% End If %> <% If (RSCustDetail("SHIP_STATE")) <> "" OR (RSCustDetail("SHIP_COUNTRY")) <> "" Then %> <% End If %> <% If Trim(RSCustDetail("PAYMENT_METHOD")) = "Credit Card" Then %> <% ElseIf Trim(RSCustDetail("PAYMENT_METHOD")) = "Electronic Check" Then %> <% End If %>
Sold To
<%= RSCustDetail("NAME") %> Order Date: <%= FormatDateTime(RSCustDetail("ORDER_DATE"),vbShortDate) %>
<%= RSCustDetail("COMPANY") %> Order No: <%=RSCustDetail("Customer_ID") %>
<%= RSCustDetail("ADDRESS_2") %> Payment Method: <%= Trim(RSCustDetail("PAYMENT_METHOD")) %>
<%= RSCustDetail("ADDRESS_1") %>
<%= RSCustDetail("CITY")&", "&RSCustDetail("STATE")&"   "&RSCustDetail("ZIP")&"    "&RSCustDetail("COUNTRY")%>
Special Instructions:
<%= ShipMsg %>
Ship To
<%= RSCustDetail("SHIP_NAME") %>
<%= RSCustDetail("SHIP_COMPANY") %>
<%= RSCustDetail("SHIP_ADDRESS_2") %>
<%= RSCustDetail("SHIP_ADDRESS_1") %>
<%= RSCustDetail("SHIP_CITY") %>
<%= RSCustDetail("SHIP_STATE") %>
<%= RSCustDetail("SHIP_ZIP") %>
<%= RSCustDetail("SHIP_COUNTRY") %>
Credit Card Information
Card Type: <%= RSCustDetail("CARD_TYPE") %>
Card Number: <%= RSCustDetail("CARD_NO") %>
Card Name: <%= RSCustDetail("NAME") %>
Expiration Date: <%= RSCustDetail("CARD_EXP") %>
E-Check Information
Customer Name: <%= RSCustDetail("NAME") %>
Bank Name: <%= RSCustDetail("BANK_NAME") %>
Routing Number: <%= RSCustDetail("ROUTING_NO") %>
Account Number: <%= RSCustDetail("CHK_ACCT_NO") %>
<% RSOrderDetail.MoveFirst CurrentRecord = 0 Do While NOT RSOrderDetail.EOF AttA = RSOrderDetail("AttributeA") AttB = RSOrderDetail("AttributeB") AttC = RSOrderDetail("AttributeC") If AttA <> "" Then ATTResponse = AttA End If If AttB <> "" Then ATTResponse = AttResponse&", "&AttB End If If AttC <> "" Then ATTResponse = AttResponse&", "&AttC End If ATTResponse = ATTResponse&" " %> <% AttResponse = "" RSOrderDetail.MoveNext CurrentRecord = CurrentRecord = 1 Loop %> <% If HandlingCOD > FormatCurrency(0) Then %> <% End If %>
Product Code Description Unit Price Quantity Total
<%= RSOrderDetail("PRODUCT_ID") %> <%= ATTResponse&RSOrderDetail("DESCRIPTION") %> <%= FormatCurrency(RSOrderDetail("PRICE")) %>  <%= RSOrderDetail("QUANTITY") %>  <%= FormatCurrency(RSOrderDetail("TOTAL")) %>            

Sub Total: <%= FormatCurrency(RSCustDetail("SUB_TOTAL")) %>            
Tax: <%= FormatCurrency(RSCustDetail("TAX")) %>            
<%=RSCustDetail("SHIPPING_METHOD") %> <%= FormatCurrency(RSCustDetail("SHIPPING_AMT")) %>            
Handling/COD Charges: <%= FormatCurrency(HandlingCOD) %>            
Total <%= FormatCurrency(RSCustDetail("GRAND_TOTAL")) %>            

<% Connection.Close Set Connection = Nothing %>