") ' Set up drop down box ... if RS2.RecordCount = 0 then wl("
") wl("") wl("") wl("" & argDiscountName & " Discount Schedule") wl(" | ") wl("
") wl(" |
") wl("") wl("Quantity | ") wl("Price | ") wl("
") Line = 1 Do While (Not rs.EOF) ' Display non-zero discounts only ... If (rs("DiscountValue") > 0) Then Select Case True Case LCase(rs("DiscountType")) = "percent" If (Trim(LCase(cstDiscountAmountFormat)) = "units") Then DiscountNote = OurFormatCurrency(((100.0 - CDbl(rs("DiscountValue"))) * CDbl(argUnitPrice)) / 100.0) & " ea." Else DiscountNote = "Less " & rs("DiscountValue") & "% " End If Case LCase(rs("DiscountType")) = "per unit" If (Trim(LCase(cstDiscountAmountFormat)) = "units") Then DiscountNote = OurFormatCurrency(argUnitPrice - rs("DiscountValue")) & " ea." Else DiscountNote = "Less " & OurFormatCurrency(rs("DiscountValue")) & " ea." End If Case LCase(rs("DiscountType")) = "per order" DiscountNote = "Less " & OurFormatCurrency(rs("DiscountValue")) & " " End Select Else ' No discounts specified, display base price ... DiscountNote = OurFormatCurrency(argUnitPrice) & " ea." End If wl("") ' Show last line of discount table as Qty+ instead of a range ... If (Line <> rs.RecordCount) Then wl("" & rs("MinQty") & " - " & rs("MaxQty") & " | ") Else wl("" & rs("MinQty") & " + | ") End If wl("" & DiscountNote & " | ") wl("
") Line = Line + 1 rs.MoveNext Loop wl("
") end if rs.Close set rs = Nothing If (rs2.RecordCount = 0) Then rs2.Close set rs2 = Nothing wl ("