gemmer forkert i db!
hej til alle.jeg er igang med noget her men jeg syndes bare at der sker noget mærkligt den regner profiten forkert, den skal regnes ud fra købspris - totalbeløb (dem uden skat og forsikring)
koden kommer her :
<%
if session("login") = "" Then
Response.redirect("login.asp")
end if
%>
<%
Response.expires = 0
Response.expiresabsolute = Now() - 1
Response.addHeader "pragma", "no-cache"
Response.addHeader "cache-control", "private"
Response.CacheControl = "no-cache"
%>
<!--#include file="db.asp"-->
<%
response.buffer = true
'get action
a=request.form("a")
'get fields from form
x_Id = Request.Form("x_Id")
x_dato = Request.Form("x_dato")
x_Maaned = Request.Form("x_Maaned")
x_navn = Request.Form("x_navn")
x_adresse = Request.Form("x_adresse")
x_postnr = Request.Form("x_postnr")
x_city = Request.Form("x_city")
x_Telefon = Request.Form("x_Telefon")
x_Mobiltelefon = Request.Form("x_Mobiltelefon")
x_email = Request.Form("x_email")
x_Deltager = Request.Form("x_Deltager")
x_Tekst = Request.Form("x_Tekst")
x_afrejse = Request.Form("x_afrejse")
x_ankomst = Request.Form("x_ankomst")
x_afrejsedato = Request.Form("x_afrejsedato")
x_hjemrejsedato = Request.Form("x_hjemrejsedato")
x_Destairlines = Request.Form("x_Destairlines")
x_flightnr = Request.Form("x_flightnr")
x_Betbetingelser = Request.Form("x_Betbetingelser")
x_Betsenest = Request.Form("x_Betsenest")
x_Antal = Request.Form("x_Antal")
x_AntalBarn = Request.Form("x_AntalBarn")
x_Skat = Request.Form("x_Skat")
x_AntalInfant = Request.Form("x_AntalInfant")
x_HandlingFee = Request.Form("x_HandlingFee")
x_Voksen = Request.Form("x_Voksen")
x_Barn = Request.Form("x_Barn")
x_Skatbarn = Request.Form("x_Skatbarn")
x_Total = Request.Form("x_Total")
x_Handlingfeebarn = Request.Form("x_Handlingfeebarn")
x_Totalbarn = Request.Form("x_Totalbarn")
x_Infant = Request.Form("x_Infant")
x_medarbejder = Request.Form("x_medarbejder")
x_Skatinfant = Request.Form("x_Skatinfant")
x_Handlingfeeinfant = Request.Form("x_Handlingfeeinfant")
x_Totalinfant = Request.Form("x_Totalinfant")
x_KF8bspris = Request.Form("x_KF8bspris")
x_Billetnummer = Request.Form("x_Billetnummer")
x_Salgspris = Request.Form("x_Salgspris")
x_Totalalle = Request.Form("x_Totalalle")
x_Commision = Request.Form("x_Commision")
x_TotalAgent = Request.Form("x_TotalAgent")
x_Provision = Request.Form("x_Provision")
x_AntalVoksenSalg = Request.Form("x_AntalVoksenSalg")
x_AntalBarnSalg = Request.Form("x_AntalBarnSalg")
x_AntalInfantSalg = Request.Form("x_AntalInfantSalg")
x_PrisVoksenSalg = Request.Form("x_PrisVoksenSalg")
x_PrisBarnSalg = Request.Form("x_PrisBarnSalg")
x_PrisInfantSalg = Request.Form("x_PrisInfantSalg")
x_SkatVoksenSalg = Request.Form("x_SkatVoksenSalg")
x_SkatBarnSalg = Request.Form("x_SkatBarnSalg")
x_SkatInfantSalg = Request.Form("x_SkatInfantSalg")
x_TotalSalgVoksen = Request.Form("x_TotalSalgVoksen")
x_TotalSalgBarn = Request.Form("x_TotalSalgBarn")
x_TotalSalgInfant = Request.Form("x_TotalSalgInfant")
x_TotalSalg = Request.Form("x_TotalSalg")
x_Profit = Request.Form("x_Profit")
x_PrisTyrkietVoksen = Request.Form("x_PrisTyrkietVoksen")
x_PrisTyrkietBarn = Request.Form("x_PrisTyrkietBarn")
x_PrisTyrkietInfant = Request.Form("x_PrisTyrkietInfant")
x_Depositium = Request.Form("x_Depositium")
x_Restbelob = Request.Form("x_Restbelob")
x_afrejse1 = Request.Form("afrejse1")
x_ankomst1 = Request.Form("ankomst1")
x_flightnr1 = Request.Form("flightnr1")
x_afrejsedato1 = Request.Form("afrejsedato1")
x_depart = Request.Form("depart")
x_depart1 = Request.Form("depart1")
x_arrival = Request.Form("arrival")
x_arrival1 = Request.Form("arrival1")
x_forsikring = Request.Form("forsikring")
' Open Connection to the database
set conn = Server.CreateObject("ADODB.Connection")
conn.Open xDb_Conn_Str
Select Case a
Case "A": ' Add
' Open record
strsql = "SELECT * FROM [OpretBooking] WHERE 0 = 1"
set rs = Server.CreateObject("ADODB.Recordset")
rs.Open strsql, conn, 1, 2
rs.AddNew
tmpFld = x_dato
If IsDate(tmpFld) Then
rs("dato") = cDate(tmpFld)
Else
rs("dato") = Null
End If
tmpFld = Trim(x_Maaned)
If trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("Maaned") = tmpFld
tmpFld = Trim(x_Betbetingelser)
If trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("Betbetingelser") = tmpFld
tmpFld = Trim(x_navn)
If trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("navn") = tmpFld
tmpFld = Trim(x_adresse)
If trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("adresse") = tmpFld
tmpFld = x_postnr
If Not IsNumeric(tmpFld) Then tmpFld = 0
rs("postnr") = cLng(tmpFld)
tmpFld = Trim(x_city)
If trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("city") = tmpFld
tmpFld = x_Telefon
If Not IsNumeric(tmpFld) Then tmpFld = 0
rs("Telefon") = cLng(tmpFld)
tmpFld = x_Mobiltelefon
If Not IsNumeric(tmpFld) Then tmpFld = 0
rs("Mobiltelefon") = cLng(tmpFld)
tmpFld = Trim(x_email)
If trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("email") = tmpFld
tmpFld = Trim(x_Deltager)
If trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("Deltager") = tmpFld
tmpFld = Trim(x_Tekst)
If trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("Tekst") = tmpFld
tmpFld = Trim(x_afrejse)
If trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("afrejse") = tmpFld
tmpFld = Trim(x_ankomst)
If trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("ankomst") = tmpFld
tmpFld = x_afrejsedato
If IsDate(tmpFld) Then
rs("afrejsedato") = cDate(tmpFld)
Else
rs("afrejsedato") = Null
End If
tmpFld = x_hjemrejsedato
If IsDate(tmpFld) Then
rs("hjemrejsedato") = cDate(tmpFld)
Else
rs("hjemrejsedato") = Null
End If
tmpFld = Trim(x_Destairlines)
If trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("Destairlines") = tmpFld
tmpFld = Trim(x_flightnr)
If trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("flightnr") = tmpFld
tmpFld = x_Betsenest
If IsDate(tmpFld) Then
rs("Betsenest") = cDate(tmpFld)
Else
rs("Betsenest") = Null
End If
TotalFld=0
tmpFld = x_voksen
If Not IsNumeric(tmpFld) Then tmpFld = 0
rs("Voksen") = cDbl(tmpFld)
TotalFld=TotalFld+cDbl(tmpFld)
tmpFld = x_Antal
If Not IsNumeric(tmpFld) Then tmpFld = 0
rs("Antal") = cLng(tmpFld)
TotalFld=TotalFld*cDbl(tmpFld)
tmpFld = x_skat
If Not IsNumeric(tmpFld) Then tmpFld = 0
rs("Skat") = cDbl(tmpFld)
TotalFld=TotalFld+cLng(tmpFld)*rs("Antal")
tmpFld = x_Handlingfee
If Not IsNumeric(tmpFld) Then tmpFld = 0
rs("Handlingfee") = cDbl(tmpFld)
TotalFld=TotalFld+cLng(tmpFld)*rs("Antal")
tmpFld = x_PrisTyrkietVoksen
If Not IsNumeric(tmpFld) Then tmpFld = 0
rs("PrisTyrkietVoksen") = cDbl(tmpFld)
TotalFld=TotalFld+cLng(tmpFld)*rs("Antal")*("0,92")
rs("Total") = TotalFld
TotalFld=0
tmpFld = x_Barn
If Not IsNumeric(tmpFld) Then tmpFld = 0
rs("Barn") = cDbl(tmpFld)
TotalFld=TotalFld+cDbl(tmpFld)
tmpFld = x_AntalBarn
If Not IsNumeric(tmpFld) Then tmpFld = 0
rs("AntalBarn") = cLng(tmpFld)
TotalFld=TotalFld*cDbl(tmpFld)
tmpFld = x_Skatbarn
If Not IsNumeric(tmpFld) Then tmpFld = 0
rs("Skatbarn") = cDbl(tmpFld)
TotalFld=TotalFld+cLng(tmpFld)*rs("Antalbarn")
tmpFld = x_Handlingfeebarn
If Not IsNumeric(tmpFld) Then tmpFld = 0
rs("Handlingfeebarn") = cDbl(tmpFld)
TotalFld=TotalFld+cLng(tmpFld)*rs("Antalbarn")
tmpFld = x_PrisTyrkietBarn
If Not IsNumeric(tmpFld) Then tmpFld = 0
rs("PrisTyrkietBarn") = cDbl(tmpFld)
TotalFld=TotalFld+cLng(tmpFld)*rs("AntalBarn")*("0,92")
rs("Totalbarn") = TotalFld
TotalFld=0
tmpFld = x_Infant
If Not IsNumeric(tmpFld) Then tmpFld = 0
rs("Infant") = cDbl(tmpFld)
TotalFld=TotalFld+cDbl(tmpFld)
tmpFld = x_AntalInfant
If Not IsNumeric(tmpFld) Then tmpFld = 0
rs("AntalInfant") = cLng(tmpFld)
TotalFld=TotalFld*cDbl(tmpFld)
tmpFld = x_Skatinfant
If Not IsNumeric(tmpFld) Then tmpFld = 0
rs("Skatinfant") = cDbl(tmpFld)
TotalFld=TotalFld+cLng(tmpFld)*rs("Antalinfant")
tmpFld = x_Handlingfeeinfant
If Not IsNumeric(tmpFld) Then tmpFld = 0
rs("Handlingfeeinfant") = cDbl(tmpFld)
TotalFld=TotalFld+cLng(tmpFld)*rs("Antalinfant")
tmpFld = x_PrisTyrkietInfant
If Not IsNumeric(tmpFld) Then tmpFld = 0
rs("PrisTyrkietInfant") = cDbl(tmpFld)
TotalFld=TotalFld+cLng(tmpFld)*rs("AntalInfant")*("0,92")
rs("Totalinfant") = TotalFld
TotalFld=0
tmpFld = x_voksen
If Not IsNumeric(tmpFld) Then tmpFld = 0
rs("voksen") = cDbl(tmpFld)
TotalFld=TotalFld+cLng(tmpFld)*rs("antal")
tmpFld = x_skat
If Not IsNumeric(tmpFld) Then tmpFld = 0
rs("skat") = cDbl(tmpFld)
TotalFld=TotalFld+cLng(tmpFld)*rs("antal")
tmpFld = x_handlingfee
If Not IsNumeric(tmpFld) Then tmpFld = 0
rs("handlingfee") = cDbl(tmpFld)
TotalFld=TotalFld+cLng(tmpFld)*rs("antal")
tmpFld = x_Barn
If Not IsNumeric(tmpFld) Then tmpFld = 0
rs("Barn") = cDbl(tmpFld)
TotalFld=TotalFld+cLng(tmpFld)*rs("antalbarn")
tmpFld = x_Skatbarn
If Not IsNumeric(tmpFld) Then tmpFld = 0
rs("Skatbarn") = cDbl(tmpFld)
TotalFld=TotalFld+cLng(tmpFld)*rs("antalbarn")
tmpFld = x_Handlingfeebarn
If Not IsNumeric(tmpFld) Then tmpFld = 0
rs("Handlingfeebarn") = cDbl(tmpFld)
TotalFld=TotalFld+cLng(tmpFld)*rs("antalbarn")
tmpFld = x_Infant
If Not IsNumeric(tmpFld) Then tmpFld = 0
rs("Infant") = cDbl(tmpFld)
TotalFld=TotalFld+cLng(tmpFld)*rs("antalinfant")
tmpFld = x_Skatinfant
If Not IsNumeric(tmpFld) Then tmpFld = 0
rs("Skatinfant") = cDbl(tmpFld)
TotalFld=TotalFld+cLng(tmpFld)*rs("antalinfant")
tmpFld = x_Handlingfeeinfant
If Not IsNumeric(tmpFld) Then tmpFld = 0
rs("Handlingfeeinfant") = cDbl(tmpFld)
TotalFld=TotalFld+cLng(tmpFld)*rs("antalinfant")
tmpFld = x_PrisTyrkietVoksen
If Not IsNumeric(tmpFld) Then tmpFld = 0
rs("PrisTyrkietVoksen") = cDbl(tmpFld)
TotalFld=TotalFld+cLng(tmpFld)*rs("Antal")*("0,92")
tmpFld = x_PrisTyrkietBarn
If Not IsNumeric(tmpFld) Then tmpFld = 0
rs("PrisTyrkietBarn") = cDbl(tmpFld)
TotalFld=TotalFld+cLng(tmpFld)*rs("AntalBarn")*("0,92")
tmpFld = x_PrisTyrkietInfant
If Not IsNumeric(tmpFld) Then tmpFld = 0
rs("PrisTyrkietInfant") = cDbl(tmpFld)
TotalFld=TotalFld+cLng(tmpFld)*rs("AntalInfant")*("0,92")
rs("Totalalle") = TotalFld
TotalFld=0
tmpFld = x_PrisVoksenSalg
If Not IsNumeric(tmpFld) Then tmpFld = 0
rs("PrisVoksenSalg") = cDbl(tmpFld)
TotalFld=TotalFld+cDbl(tmpFld)
tmpFld = x_AntalVoksenSalg
If Not IsNumeric(tmpFld) Then tmpFld = 0
rs("AntalVoksenSalg") = cLng(tmpFld)
TotalFld=TotalFld*cDbl(tmpFld)
tmpFld = x_skatvoksensalg
If Not IsNumeric(tmpFld) Then tmpFld = 0
rs("Skatvoksensalg") = cDbl(tmpFld)
TotalFld=TotalFld+cLng(tmpFld)*rs("AntalVoksenSalg")
tmpFld = x_Provision
If Not IsNumeric(tmpFld) Then tmpFld = 0
rs("Provision") = cDbl(tmpFld)
TotalFld=TotalFld+cLng(tmpFld)
rs("TotalSalgVoksen") = TotalFld
TotalFld=0
tmpFld = x_PrisBarnSalg
If Not IsNumeric(tmpFld) Then tmpFld = 0
rs("PrisBarnSalg") = cDbl(tmpFld)
TotalFld=TotalFld+cDbl(tmpFld)
tmpFld = x_AntalBarnSalg
If Not IsNumeric(tmpFld) Then tmpFld = 0
rs("AntalBarnSalg") = cLng(tmpFld)
TotalFld=TotalFld*cDbl(tmpFld)
tmpFld = x_SkatbarnSalg
If Not IsNumeric(tmpFld) Then tmpFld = 0
rs("SkatbarnSalg") = cDbl(tmpFld)
TotalFld=TotalFld+cLng(tmpFld)*rs("AntalbarnSalg")
rs("TotalSalgbarn") = TotalFld
TotalFld=0
tmpFld = x_PrisInfantSalg
If Not IsNumeric(tmpFld) Then tmpFld = 0
rs("PrisInfantSalg") = cDbl(tmpFld)
TotalFld=TotalFld+cDbl(tmpFld)
tmpFld = x_AntalInfantSalg
If Not IsNumeric(tmpFld) Then tmpFld = 0
rs("AntalInfantSalg") = cLng(tmpFld)
TotalFld=TotalFld*cDbl(tmpFld)
tmpFld = x_SkatinfantSalg
If Not IsNumeric(tmpFld) Then tmpFld = 0
rs("SkatinfantSalg") = cDbl(tmpFld)
TotalFld=TotalFld+cLng(tmpFld)*rs("AntalInfantSalg")
rs("TotalSalginfant") = TotalFld
TotalFld=0
tmpFld = x_PrisVoksenSalg
If Not IsNumeric(tmpFld) Then tmpFld = 0
rs("PrisVoksenSalg") = cDbl(tmpFld)
TotalFld=TotalFld+cLng(tmpFld)*rs("antalVoksenSalg")
tmpFld = x_skatVoksenSalg
If Not IsNumeric(tmpFld) Then tmpFld = 0
rs("skatVoksenSalg") = cDbl(tmpFld)
TotalFld=TotalFld+cLng(tmpFld)*rs("antalVoksenSalg")
tmpFld = x_PrisBarnSalg
If Not IsNumeric(tmpFld) Then tmpFld = 0
rs("PrisBarnSalg") = cDbl(tmpFld)
TotalFld=TotalFld+cLng(tmpFld)*rs("antalbarnSalg")
tmpFld = x_SkatbarnSalg
If Not IsNumeric(tmpFld) Then tmpFld = 0
rs("SkatbarnSalg") = cDbl(tmpFld)
TotalFld=TotalFld+cLng(tmpFld)*rs("antalbarnSalg")
tmpFld = x_PrisInfantSalg
If Not IsNumeric(tmpFld) Then tmpFld = 0
rs("PrisInfantSalg") = cDbl(tmpFld)
TotalFld=TotalFld+cDbl(tmpFld)*rs("antalinfantSalg")
tmpFld = x_SkatinfantSalg
If Not IsNumeric(tmpFld) Then tmpFld = 0
rs("SkatinfantSalg") = cDbl(tmpFld)
TotalFld=TotalFld+cLng(tmpFld)*rs("antalinfantSalg")
rs("TotalSalg") = TotalFld
TotalFld=0
tmpFld = x_PrisVoksenSalg
If Not IsNumeric(tmpFld) Then tmpFld = 0
rs("PrisVoksenSalg") = cDbl(tmpFld)
TotalFld=TotalFld+cLng(tmpFld)*rs("antalVoksenSalg")
tmpFld = x_skatVoksenSalg
If Not IsNumeric(tmpFld) Then tmpFld = 0
rs("skatVoksenSalg") = cDbl(tmpFld)
TotalFld=TotalFld+cLng(tmpFld)*rs("antalVoksenSalg")
tmpFld = x_PrisBarnSalg
If Not IsNumeric(tmpFld) Then tmpFld = 0
rs("PrisBarnSalg") = cDbl(tmpFld)
TotalFld=TotalFld+cLng(tmpFld)*rs("antalbarnSalg")
tmpFld = x_SkatbarnSalg
If Not IsNumeric(tmpFld) Then tmpFld = 0
rs("SkatbarnSalg") = cDbl(tmpFld)
TotalFld=TotalFld+cLng(tmpFld)*rs("antalbarnSalg")
tmpFld = x_PrisInfantSalg
If Not IsNumeric(tmpFld) Then tmpFld = 0
rs("PrisInfantSalg") = cDbl(tmpFld)
TotalFld=TotalFld+cDbl(tmpFld)*rs("antalinfantSalg")
tmpFld = x_SkatinfantSalg
If Not IsNumeric(tmpFld) Then tmpFld = 0
rs("SkatinfantSalg") = cDbl(tmpFld)
TotalFld=TotalFld+cLng(tmpFld)*rs("antalinfantSalg")
tmpFld = x_Depositium
If Not IsNumeric(tmpFld) Then tmpFld = 0
rs("Depositium") = cDbl(tmpFld)
TotalFld=TotalFld-cLng(tmpFld)
rs("Restbelob") = TotalFld
tmpFld = Trim(x_medarbejder)
If trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("medarbejder") = tmpFld
tmpFld = x_Totalalle
If Not IsNumeric(tmpFld) Then tmpFld = 0
rs("Totalalle") = cDbl(tmpFld)
tmpFld = Trim(x_Billetnummer)
If trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("Billetnummer") = tmpFld
tmpFld = x_Salgspris
If Not IsNumeric(tmpFld) Then tmpFld = 0
rs("Salgspris") = cDbl(tmpFld)
TotalFld=0
tmpFld = x_PrisVoksenSalg
If Not IsNumeric(tmpFld) Then tmpFld = 0
rs("PrisVoksenSalg") = cDbl(tmpFld)
TotalFld=TotalFld+cLng(tmpFld)*rs("antalVoksenSalg")
tmpFld = x_skatVoksenSalg
If Not IsNumeric(tmpFld) Then tmpFld = 0
rs("skatVoksenSalg") = cDbl(tmpFld)
TotalFld=TotalFld+cLng(tmpFld)*rs("antalVoksenSalg")
tmpFld = x_Provision
If Not IsNumeric(tmpFld) Then tmpFld = 0
rs("Provision") = cDbl(tmpFld)
TotalFld=TotalFld+cLng(tmpFld)
tmpFld = x_PrisBarnSalg
If Not IsNumeric(tmpFld) Then tmpFld = 0
rs("PrisBarnSalg") = cDbl(tmpFld)
TotalFld=TotalFld+cLng(tmpFld)*rs("antalbarnSalg")
tmpFld = x_SkatbarnSalg
If Not IsNumeric(tmpFld) Then tmpFld = 0
rs("SkatbarnSalg") = cDbl(tmpFld)
TotalFld=TotalFld+cLng(tmpFld)*rs("antalbarnSalg")
tmpFld = x_PrisInfantSalg
If Not IsNumeric(tmpFld) Then tmpFld = 0
rs("PrisInfantSalg") = cDbl(tmpFld)
TotalFld=TotalFld+cLng(tmpFld)*rs("antalinfantSalg")
tmpFld = x_SkatinfantSalg
If Not IsNumeric(tmpFld) Then tmpFld = 0
rs("SkatinfantSalg") = cDbl(tmpFld)
TotalFld=TotalFld+cLng(tmpFld)*rs("antalinfantSalg")
tmpFld = x_voksen
If Not IsNumeric(tmpFld) Then tmpFld = 0
rs("voksen") = cDbl(tmpFld)
TotalFld=TotalFld-cLng(tmpFld)*rs("antal")
tmpFld = x_PrisTyrkietVoksen
If Not IsNumeric(tmpFld) Then tmpFld = 0
rs("PrisTyrkietVoksen") = cDbl(tmpFld)
TotalFld=TotalFld-cLng(tmpFld)*rs("Antal")*("0,92")
tmpFld = x_skat
If Not IsNumeric(tmpFld) Then tmpFld = 0
rs("skat") = cDbl(tmpFld)
TotalFld=TotalFld-cLng(tmpFld)*rs("antal")
tmpFld = x_handlingfee
If Not IsNumeric(tmpFld) Then tmpFld = 0
rs("handlingfee") = cDbl(tmpFld)
TotalFld=TotalFld-cLng(tmpFld)*rs("antal")
tmpFld = x_Barn
If Not IsNumeric(tmpFld) Then tmpFld = 0
rs("Barn") = cDbl(tmpFld)
TotalFld=TotalFld-cLng(tmpFld)*rs("antalbarn")
tmpFld = x_PrisTyrkietBarn
If Not IsNumeric(tmpFld) Then tmpFld = 0
rs("PrisTyrkietBarn") = cDbl(tmpFld)
TotalFld=TotalFld-cLng(tmpFld)*rs("antalBarn")*("0,92")
tmpFld = x_Skatbarn
If Not IsNumeric(tmpFld) Then tmpFld = 0
rs("Skatbarn") = cDbl(tmpFld)
TotalFld=TotalFld-cLng(tmpFld)*rs("antalbarn")
tmpFld = x_Handlingfeebarn
If Not IsNumeric(tmpFld) Then tmpFld = 0
rs("Handlingfeebarn") = cDbl(tmpFld)
TotalFld=TotalFld-cLng(tmpFld)*rs("antalbarn")
tmpFld = x_Infant
If Not IsNumeric(tmpFld) Then tmpFld = 0
rs("Infant") = cDbl(tmpFld)
TotalFld=TotalFld-cLng(tmpFld)*rs("antalinfant")
tmpFld = x_PrisTyrkietInfant
If Not IsNumeric(tmpFld) Then tmpFld = 0
rs("PrisTyrkietInfant") = cDbl(tmpFld)
TotalFld=TotalFld-cLng(tmpFld)*rs("antalInfant")*("0,92")
tmpFld = x_Skatinfant
If Not IsNumeric(tmpFld) Then tmpFld = 0
rs("Skatinfant") = cDbl(tmpFld)
TotalFld=TotalFld-cLng(tmpFld)*rs("antalinfant")
tmpFld = x_Handlingfeeinfant
If Not IsNumeric(tmpFld) Then tmpFld = 0
rs("Handlingfeeinfant") = cDbl(tmpFld)
TotalFld=TotalFld-cLng(tmpFld)*rs("antalinfant")
rs("Profit") = TotalFld
rs.Update
rs.Close
Set rs = Nothing
conn.Close
Set conn = Nothing
Response.Clear
Response.Redirect "OpretBookinglist.asp"
End Select
%>
<!--#include file="include.asp"-->
<html>
<head><title>Opret booking</title>
<script language="JavaScript" src="date_picker_datetr.js" type="text/javascript"></script>
</head>
<body>
<p> </p>
<table width="100%" border="0" cellspacing="0" cellpadding="10"><tr>
<td bgcolor="#FFFFFF">
<form name="online" method="post" action="">
<form onSubmit="return EW_checkMyForm(this);" action="OpretBookingadd.asp" method="post">
<input type="hidden" name="a" value="A">
<fieldset style="width: 627px; height: 134px; padding: 2">
<legend><font color="#336699"><b>Kunde Oplysninger</b></font></legend>
<table border="1" width="619" height="106" bgcolor="#FFFFFF" id="table10" style="border-collapse: collapse">
<tr>
<td width="104" height="28" bgcolor="#FFFFFF">
<font face="Verdana" size="1" color="#336699">Navn</font></td>
<td width="186" height="28" bgcolor="#FFFFFF" colspan="2">
<font size="1" face="Verdana">
<input type="text" name="x_navn" value="<%= x_navn %>" size=28 maxlength=50></font></td>
<td width="268" height="28" bgcolor="#FFFFFF">
</td>
<td width="52" height="28" bgcolor="#FFFFFF">
</td>
</tr>
<tr>
<td width="104" height="24"><font face="Verdana" size="1" color="#336699">
Adresse</font></td>
<td width="186" height="24" colspan="2"><font face="Arial" size="-1">
<input size="28" name="x_adresse" value="<%= x_adresse %>"></font></td>
<td width="268" height="24"> </td>
<td width="52" height="24"> </td>
</tr>
<tr>
<td width="104" height="23"><font face="Verdana" size="1" color="#336699">
Postnr. & by</font></td>
<td width="64" height="23"><font face="Arial" size="-1">
<input size="8" name="x_postnr" value="<%= x_postnr %>"></font></td>
<td width="113" height="23"><font face="Arial" size="-1">
<input size="15" name="x_city" value="<%= x_city %>"></font></td>
<td width="268" height="23"> </td>
<td width="52" height="23"> </td>
</tr>
<tr>
<td width="104" height="12"><font face="Verdana" size="1" color="#336699">
Telefon</font></td>
<td width="186" height="12" colspan="2"><font face="Arial" size="-1">
<input size="28" name="x_Telefon" value="<%= x_Telefon %>"></font></td>
<td width="268" height="12"> </td>
<td width="52" height="12"> </td>
</tr>
<tr>
<td width="104" height="6">
<font face="Verdana" size="1" color="#336699">Email</font></td>
<td width="186" height="6" colspan="2"><font face="Arial" size="-1">
<input size="28" name="x_email" value="<%= x_email %>"></font></td>
<td width="268" height="6"> </td>
<td width="52" height="6"> </td>
</tr>
<tr>
<td width="104" height="5"><font size="1" face="Verdana" color="#336699">Deltager liste</font></td>
<td width="186" height="5" colspan="2"><font size="1" face="Verdana">
<textarea cols=22 rows=3 name="x_Deltager"><%= x_Deltager %></textarea></font></td>
<td width="268" height="5"> </td>
<td width="52" height="5"> </td>
</tr>
</table>
</fieldset><br><fieldset style="width: 635px; height: 163px; padding: 2">
<legend><font color="#336699"><b>Booking</b></font></legend>
<table border="0" width="627" height="106" bgcolor="#336699" id="table2" style="border-collapse: collapse">
<tr>
<td width="104" height="28" bgcolor="#336699">
<b>
<font face="Verdana" size="1" color="#FFFFFF">Fra</font></b></td>
<td width="104" height="28" bgcolor="#336699">
<b>
<font face="Verdana" size="1" color="#FFFFFF">Til</font></b></td>
<td width="78" height="28" bgcolor="#336699">
<b>
<font size="1" face="Verdana" color="#FFFFFF">Flight</font></b></td>
<td width="78" height="28" bgcolor="#336699">
<b>
<font face="Verdana" size="1" color="#FFFFFF">Dato</font></b></td>
<td width="89" height="28" bgcolor="#336699">
<b>
<font face="Verdana" size="1" color="#FFFFFF">Depart</font></b></td>
<td width="57" height="28" bgcolor="#336699">
<b>
<font face="Verdana" size="1" color="#FFFFFF">Arrival</font></b></td>
</tr>
<tr>
<td width="104" height="24"><select size="1" name="x_afrejse">
<option><%= x_afrejse %></option>
<option selected>Copenhagen</option>
<option>Ankara</option>
<option>Stockholm</option>
</select></td>
<td width="104" height="24"><select size="1" name="x_ankomst">
<option><%= x_ankomst %></option>
<option selected>Copenhagen</option>
<option>Ankara</option>
<option>Stockholm</option>
</select></td>
<td width="78" height="24"><font size="1" face="Verdana"><input type="text" name="x_flightnr" value="<%= x_flightnr %>" size=10 maxlength=50></font></td>
<td width="78" height="24">
<table cellpadding="0" cellspacing="0" border="0" width="170" id="table3">
<tr>
<td>
<p align="left">
<font size="1">
<input name="x_afrejsedato" type="text" class="input3" id="departureDate" value="<%= x_afrejsedato %>" size="20" maxlength="10"></font></td>
<td align="right">
<p align="left">
<a href="java script:show_calendar('document.online.departureDate', document.online.departureDate.value, '../images');">
<img src="images/takvim.gif" width="29" height="22" border="0"></a></td>
</tr>
</table>
</td>
<td width="89" height="24"><font size="1" face="Verdana"><input type="text" name="x_depart" value="<%= x_depart %>" size="10"></font></td>
<td width="57" height="24"><font size="1" face="Verdana"><input type="text" name="x_arrival" value="<%= x_arrival %>" size="7"></font></td>
</tr>
<tr>
<td width="104" height="23"><select size="1" name="x_afrejse1">
<option><%= x_afrejse1 %></option>
<option selected>Copenhagen</option>
<option>Ankara</option>
<option>Stockholm</option>
</select></td>
<td width="104" height="23"><select size="1" name="x_ankomst1">
<option><%= x_ankomst1 %></option>
<option selected>Copenhagen</option>
<option>Ankara</option>
<option>Stockholm</option>
</select></td>
<td width="78" height="23"><font size="1" face="Verdana"><input type="text" name="x_flightnr1" value="<%= x_flightnr1 %>" size=10 maxlength=50></font></td>
<td width="78" height="23">
<table cellpadding="0" cellspacing="0" border="0" width="172" id="table4">
<tr>
<td>
<p align="left">
<font face="Arial, Helvetica" size="1">
<input name="x_afrejsedato1" type="text" class="input3" id="returnDate" size="20" maxlength="10" value="<%= x_afrejsedato1 %>"></font></td>
<td align="right">
<p align="left">
<a href="java script:show_calendar('document.online.returnDate', document.online.returnDate.value, '/images');">
<img src="images/takvim.gif" width="29" height="22" border="0"></a></td>
</tr>
</table>
</td>
<td width="89" height="23"><font size="1" face="Verdana"><input type="text" name="x_depart1" value="<%= x_depart1 %>" size="10"></font></td>
<td width="57" height="23"><font size="1" face="Verdana"><input type="text" name="x_arrival1" value="<%= x_arrival1 %>" size="7"></font></td>
</tr>
<tr>
<td width="104" height="12"><font face="Verdana" size="1" color="#FFFFFF">
Antal Voksne</font> </td>
<td width="104" height="12"><select size="1" name="x_AntalVoksenSalg">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
<option value="13">13</option>
<option value="14">14</option>
<option value="15">15</option>
<option value="16">16</option>
</select></td>
<td width="78" height="12"><font face="Verdana" size="1" color="#FFFFFF">
Antal børn</font></td>
<td width="78" height="12"><select size="1" name="x_AntalBarnSalg">
<option selected value="0">0</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
<option value="13">13</option>
<option value="14">14</option>
<option value="15">15</option>
<option value="16">16</option>
</select></td>
<td width="89" height="12"><font face="Verdana" size="1" color="#FFFFFF">
Antal Infant</font></td>
<td width="57" height="12"><select size="1" name="x_AntalInfantSalg">
<option selected value="0">0</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
<option value="13">13</option>
<option value="14">14</option>
<option value="15">15</option>
<option value="16">16</option>
</select></td>
</tr>
<tr>
<td width="104" height="11"><font face="Verdana" size="1" color="#FFFFFF"><b>Billet nr.</b></font></td>
<td width="104" height="11"><font size="1" face="Verdana">
<input type="text" name="x_Billetnummer" value="<%= x_Billetnummer %>" size="13"></font></td>
<td width="78" height="11"><font face="Verdana" size="1" color="#FFFFFF"><b>Airlines</b></font></td>
<td width="78" height="11"><font size="1" face="Verdana">
<input type="text" name="x_Destairlines" value="<%= x_Destairlines %>" size=13 maxlength=50></font></td>
<td width="89" height="11"> </td>
<td width="57" height="11"> </td>
</tr>
</table>
</fieldset><br><fieldset style="width: 636px; height: 150px; padding: 2">
<legend><b><font color="#336699">Betalling</font></b></legend>
<table border="1" width="628" height="124" bgcolor="#FFFFFF" id="table6" style="border-collapse: collapse">
<tr>
<td width="92" height="24" bgcolor="#FFFFFF">
<font face="Verdana" size="1" color="#336699">
Pris voksne </font></td>
<td width="121" height="24"><font color="#336699" size="1" face="Verdana">
<input name="x_PrisVoksenSalg" value="<%= x_PrisVoksenSalg %>" size="12"></font></td>
<td width="93" height="24" bgcolor="#FFFFFF">
<font face="Verdana" size="1" color="#336699">
Pris børn</font></td>
<td width="80" height="24"><font color="#336699" size="1" face="Verdana">
<input name="x_PrisBarnSalg" value="<%= x_PrisBarnSalg %>" size="11"></font></td>
<td width="82" height="24" bgcolor="#FFFFFF">
<font face="Verdana" size="1" color="#336699">
Pris Influent</font></td>
<td width="120" height="24"><font color="#336699" size="1" face="Verdana">
<input name="x_PrisInfantSalg" value="<%= x_PrisInfantSalg %>" size="7"></font></td>
</tr>
<tr>
<td width="92" height="24" bgcolor="#FFFFFF">
<font face="Verdana" size="1" color="#336699">Skatter </font></td>
<td width="121" height="24"><font color="#336699" face="Verdana" size="1">
<input name="x_SkatVoksenSalg" value="<%= x_SkatVoksenSalg %>" size=12 maxlength=50></font></td>
<td width="93" height="24"> </td>
<td width="80" height="24"><font color="#336699" face="Verdana" size="1">
<input name="x_SkatBarnSalg" value="<%= x_SkatBarnSalg %>" size=11 maxlength=50></font></td>
<td width="82" height="24"> </td>
<td width="120" height="24"><font color="#336699" size="1" face="Verdana">
<input name="x_SkatInfantSalg" value="<%= x_SkatInfantSalg %>" size=7 maxlength=50></font></td>
</tr>
<tr>
<td width="92" height="38"><font face="Verdana" size="1" color="#336699">Depositum</font></td>
<td width="121" height="38"><font face="Verdana" size="1">
<input name="x_Depositium" value="<%= x_Depositium %>" size="11" maxlength="50"></font></td>
<td width="93" height="38"><font size="1" face="Verdana" color="#336699">
Betales senest</font></td>
<td width="80" height="38"><font face="Verdana" size="1">
<input name="x_Betsenest" value="<%= x_Betsenest %>" size="11"></font></td>
<td width="82" height="38"><font face="Verdana" size="1" color="#336699">
Restbeløb</font></td>
<td width="120" height="38"><font size="1" face="Verdana">
<input name="x_restbelob" value="<%= x_restbelob %>" size="7"></font></td>
</tr>
<tr>
<td width="92" height="26"><font size="1" face="Verdana" color="#336699">Købs pris</font></td>
<td width="121" height="26"><font face="Verdana" size="1">
<input name="x_Totalalle" value="<%= x_Totalalle %>" size="10"></font></td>
<td width="93" height="26"> </td>
<td width="80" height="26"> </td>
<td width="82" height="26"><font face="Verdana" size="1" color="#336699">Forsikring</font></td>
<td width="120" height="26"><font size="1" face="Verdana">
<input name="x_forsikring" value="<%= x_forsikring %>" size="7"></font></td>
</tr>
</table>
</fieldset></p>
<p align="center">
<input type="submit" name="Action" value="Opret billet"></p>
<p> </p>
</form>
</td>
<td bgcolor="#FFFFFF">
</td>
</tr></table>
<!--#include file="footer.asp"-->
er der ikke nogen der gider hjælpe mig!
