29. marts 2006 - 13:03
Der er
14 kommentarer og 1 løsning
Udregning af Moms virker ikke?
Hej,
Jeg har brug for lidt hjælp.
Da jeg ikke kender noget som helst til ASP og programmering i det hele taget, håbede jeg på at der var nogle herinde som kunne hjælpe mig.
HTML-siden som jeg tester på findes hér:
www.renell.dk/serviceart_temp.html ASP-filen er hér:
www.renell.dk/mailer_temp.asp Mit problem er, at jeg ikke kan finde fejlen i udregningsmetoden af det lille system som beregner priserne.
Umiddelbart giver den det rigtige resultat bortset fra, at den lægger 3 til total-prisen, samtidig med, at den ikke lægger Moms oven i den endelige slutpris.
Er der nogle som kan hjælpe!? Please!?
Hvis der er andet jeg kan gøre for at gøre jeres hjælp lettere, så bare sig til!
Mvh
Bassa
Annonceindlæg fra Infor
29. marts 2006 - 13:21
#1
Du bliver nød til at vise noget kode, vi kan ikke se ASP koden ud fra det link du har vist :)
29. marts 2006 - 13:23
#2
Det vil være en stor hjælp at se den kode der beregner momsen. Det hjælper ikke en snus med de links du har sendt.
29. marts 2006 - 13:34
#3
Sorry! :) Hér er koden til hele beregnings-systemet: <%@ Language=VBScript %> <% Dim sSubject Dim sBody, sBodyHtml Dim iTotal, iXtraRengoring iTotal = 0 iXtraRengoring = 0 'Ønsker vedr. rengøring Dim bRengoringService, bRengoringGrill If Request.Form("RengoringService") = "ON" Then bRengoringService = True Else bRengoringService = False End If If Request.Form("RengoringGrill") = "ON" Then bRengoringGrill = True Else bRengoringGrill = False End If sBodyHtml = sBodyHtml & "<font size=""2"" face=""Verdana"">Dato: " & Now & "</font><br>" sBodyHtml = sBodyHtml & "<font size=""2"" face=""Verdana""><strong>Kunde oplysninger:</strong><br>" sBodyHtml = sBodyHtml & "Kontaktperson: " & Chr(9) & Request.Form("Kontaktperson") & "<br>" sBodyHtml = sBodyHtml & "Adresse: " & Chr(9) & Chr(9) & Request.Form("Adresse") & "<br>" sBodyHtml = sBodyHtml & "Postnr.: " & Chr(9) & Chr(9) & Request.Form("Postnr") & "<br>" sBodyHtml = sBodyHtml & "By: " & Chr(9) & Chr(9) & Chr(9) & Request.Form("By") & "<br>" sBodyHtml = sBodyHtml & "Telefon nr.: " & Chr(9) & Request.Form("Telefon nr.") & "<br>" sBodyHtml = sBodyHtml & "Email: " & Chr(9) & Chr(9) & Request.Form("Email") & "<br>" sBodyHtml = sBodyHtml & "Bemærkninger: " & Chr(9) & Chr(9) & Request.Form("Bemærkninger") & "<br>" sBodyHtml = sBodyHtml & "Levering: " & Chr(9) & Chr(9) & Request.Form("Levering") & "<br>" & "<br></font>" 'Overføre header til renell mail sBodyRenell = sBodyHtml sBodyHtml = sBodyHtml & "<font size=""2"" face=""Verdana""><strong>Din ordre:</strong></font>" sBodyHtml = sBodyHtml & "<table width=""89%"" border=""1"" bordercolor=""#AAAFB4""><tr>" sBodyHtml = sBodyHtml & " <td width=""11%"" height=""16"" bgcolor=""#F0F0F0""><font size=""2"" face=""Verdana""><strong>Varenr.:</strong></font></td>" sBodyHtml = sBodyHtml & " <td width=""63%"" bgcolor=""#DEE0E4""><font size=""2"" face=""Verdana""><strong>Varenavn:</strong></font></td>" sBodyHtml = sBodyHtml & " <td width=""15%"" bgcolor=""#F0F0F0""> <strong><font size=""2"" face=""Verdana"" align=""right"">Stk. pris kr.:</font></strong></td>" sBodyHtml = sBodyHtml & " <td width=""11%"" bgcolor=""#DEE0E4""><strong><font size=""2"" face=""Verdana"">Antal:</font></strong></td>" sBodyHtml = sBodyHtml & "</tr></table>" sBodyRenell = sBodyRenell & "<font size=""2"" face=""Verdana""><strong>Kundens ordre:</strong></font>" sBodyRenell = sBodyRenell & "<table width=""89%"" border=""0""><tr>" sBodyRenell = sBodyRenell & " <td width=""11%"" height=""16""><font size=""2"" face=""Verdana""><strong>Varenr.:</strong></font></td>" sBodyRenell = sBodyRenell & " <td width=""63%""><font size=""2"" face=""Verdana""><strong>Varenavn:</strong></font></td>" sBodyRenell = sBodyRenell & " <td width=""15%""><strong><font size=""2"" face=""Verdana"" align=""right"">Stk. pris kr.:</font></strong></td>" sBodyRenell = sBodyRenell & " <td width=""11%""><strong><font size=""2"" face=""Verdana"">Antal:</font></strong></td>" sBodyRenell = sBodyRenell & "</tr></table>" For each item In Request.Form If (LCase(Left(item, 5)) = "antal") And (IsNumeric(Request.Form(item))) Then sFormItemNumber = Replace(LCase(item), "antal", "") sBodyHtml = sBodyHtml & "<table width=""89%"" border=""1"" bordercolor=""#AAAFB4""><tr>" sBodyHtml = sBodyHtml & " <td width=""11%"" height=""16"" bgcolor=""#F0F0F0""><font size=""2"" face=""Verdana"">" & Request.Form("Varenummer" & sFormItemNumber) & "</font></td>" sBodyHtml = sBodyHtml & " <td width=""63%"" bgcolor=""#DEE0E4""><font size=""2"" face=""Verdana"">" & Request.Form("Varenavn" & sFormItemNumber) & "</font></td>" sBodyHtml = sBodyHtml & " <td width=""15%"" bgcolor=""#F0F0F0""><font size=""2"" face=""Verdana"" align=""right"">" & Request.Form("Stk. pris" & sFormItemNumber) & "</font></td>" sBodyHtml = sBodyHtml & " <td width=""11%"" bgcolor=""#DEE0E4""><font size=""2"" face=""Verdana"">" & Request.Form("Antal" & sFormItemNumber) & "</font></td>" sBodyHtml = sBodyHtml & "</tr></table>" sBodyRenell = sBodyRenell & "<table width=""89%"" border=""0""><tr>" sBodyRenell = sBodyRenell & " <td width=""11%"" height=""16""><font size=""2"" face=""Verdana"">" & Request.Form("Varenummer" & sFormItemNumber) & "</font></td>" sBodyRenell = sBodyRenell & " <td width=""63%""><font size=""2"" face=""Verdana"">" & Request.Form("Varenavn" & sFormItemNumber) & "</font></td>" sBodyRenell = sBodyRenell & " <td width=""15%""><font size=""2"" face=""Verdana"" align=""right"">" & Request.Form("Stk. pris" & sFormItemNumber) & "</font></td>" sBodyRenell = sBodyRenell & " <td width=""11%""><font size=""2"" face=""Verdana"">" & Request.Form("Antal" & sFormItemNumber) & "</font></td>" sBodyRenell = sBodyRenell & "</tr></table>" 'Prisberegninger If IsNumeric(Request.Form("Stk. pris" & sFormItemNumber)) Then iPrice = FormatNumber(Request.Form("Stk. pris" & sFormItemNumber)) iTotal = iTotal + (CDbl(iPrice)*Request.Form(item)) End If 'porcelæn & glas If bRengoringService And (Left(Trim(Request.Form("Varenummer" & sFormItemNumber)), 2) = "04" Or Left(Trim(Request.Form("Varenummer" & sFormItemNumber)), 2) = "06") Then 'If not = ikke pris for salt og peber bøsse If Not Trim(Request.Form("Varenummer" & sFormItemNumber)) = "04-400" Then iXtraRengoring = iXtraRengoring + 1*Request.Form(item) End If End If 'Kaffe kander If bRengoringService And (Trim(Request.Form("Varenummer" & sFormItemNumber)) = "05-400" Or Trim(Request.Form("Varenummer" & sFormItemNumber)) = "05-401") Then iXtraRengoring = iXtraRengoring + 1.5*Request.Form(item) End If 'bestik If bRengoringService And Left(Trim(Request.Form("Varenummer" & sFormItemNumber)), 2) = "07" Then iXtraRengoring = iXtraRengoring + .5*Request.Form(item) End If 'skåle og fade If bRengoringService And Left(Trim(Request.Form("Varenummer" & sFormItemNumber)), 2) = "08" Then iXtraRengoring = iXtraRengoring + 1.5*Request.Form(item) End If 'kopper If bRengoringService And (Left(Trim(Request.Form("Varenummer" & sFormItemNumber)),4) = "05-1" Or Left(Trim(Request.Form("Varenummer" & sFormItemNumber)),4) = "05-2" Or Left(Trim(Request.Form("Varenummer" & sFormItemNumber)),4) = "05-3") Then iXtraRengoring = iXtraRengoring + 1*Request.Form(item) End If 'grill If bRengoringGrill And (Trim(Request.Form("Varenummer" & sFormItemNumber)) = "10-100" Or Trim(Request.Form("Varenummer" & sFormItemNumber)) = "10-101") Then iXtraRengoring = iXtraRengoring + 350*Request.Form(item) End If End If Next 'Tilføjer pris for rengøring If iXtraRengoring > 0 Then 'kundens mail sBodyHtml = sBodyHtml & "<table width=""89%"" border=""1"" bordercolor=""#AAAFB4""><tr>" sBodyHtml = sBodyHtml & " <td width=""11%"" height=""16"" bgcolor=""#F0F0F0""> <font size=""2"" face=""Verdana""></font></td>" sBodyHtml = sBodyHtml & " <td width=""63%"" bgcolor=""#DEE0E4""><font size=""2"" face=""Verdana"" align=""right"">Rengøring af service, grill, m.m.</font></td>" sBodyHtml = sBodyHtml & " <td width=""15%"" bgcolor=""#F0F0F0""><font size=""2"" face=""Verdana"" align=""right"">" & FormatNumber(iXtraRengoring, 2) & "</font></td>" sBodyHtml = sBodyHtml & " <td width=""11%"" bgcolor=""#DEE0E4""><font size=""2"" face=""Verdana""> </font></td>" sBodyHtml = sBodyHtml & "</tr></table>" 'renell mail sBodyRenell = sBodyRenell & "<table width=""89%"" border=""0""><tr>" sBodyRenell = sBodyRenell & " <td width=""11%"" height=""16""> <font size=""2"" face=""Verdana""></font></td>" sBodyRenell = sBodyRenell & " <td width=""63%""><font size=""2"" face=""Verdana"" align=""right"">Rengøring af service, grill, m.m.</font></td>" sBodyRenell = sBodyRenell & " <td width=""15%""><font size=""2"" face=""Verdana"" align=""right"">" & FormatNumber(iXtraRengoring, 2) & "</font></td>" sBodyRenell = sBodyRenell & " <td width=""11%""><font size=""2"" face=""Verdana""> </font></td>" sBodyRenell = sBodyRenell & "</tr></table>" End If 'Føjer rengørings omkostninger til total If iXtraRengoring > 0 Then iTotal = iTotal + iXtraRengoring End If 'Kørsel If Request.Form("selKommune") = "Helsingør" Then 'iPriceKorsel = FormatNumber(300, 2) iPriceKorsel = 300 iTotal = iTotal + iPriceKorsel iKorselComment = False ElseIf Request.Form("selKommune") = "Øvrige" Then iPriceKorsel = "?" iKorselComment = True Else 'iPriceKorsel = FormatNumber(400, 2) iPriceKorsel = 400 iTotal = iTotal + iPriceKorsel iKorselComment = False End If 'Divide by 100 iTotal = (iTotal/100) 'kørsel kunde mail sBodyHtml = sBodyHtml & "<table width=""89%"" border=""1"" bordercolor=""#AAAFB4""><tr>" sBodyHtml = sBodyHtml & " <td width=""11%"" height=""16"" bgcolor=""#F0F0F0""> <font size=""2"" face=""Verdana""></font></td>" sBodyHtml = sBodyHtml & " <td width=""63%"" bgcolor=""#DEE0E4""><font size=""2"" face=""Verdana"" align=""right"">Kørsel</font></td>" sBodyHtml = sBodyHtml & " <td width=""15%"" bgcolor=""#F0F0F0""><font size=""2"" face=""Verdana"" align=""right"">" & FormatNumber(iPriceKorsel,2) & "</font></td>" sBodyHtml = sBodyHtml & " <td width=""11%"" bgcolor=""#DEE0E4""><font size=""2"" face=""Verdana""> </font></td>" sBodyHtml = sBodyHtml & "</tr></table>" 'kørsel renell mail sBodyRenell = sBodyRenell & "<table width=""89%"" border=""0""><tr>" sBodyRenell = sBodyRenell & " <td width=""11%"" height=""16""> <font size=""2"" face=""Verdana""></font></td>" sBodyRenell = sBodyRenell & " <td width=""63%""><font size=""2"" face=""Verdana"" align=""right"">Kørsel</font></td>" sBodyRenell = sBodyRenell & " <td width=""15%""><font size=""2"" face=""Verdana"" align=""right"">" & FormatNumber(iPriceKorsel,2) & "</font></td>" sBodyRenell = sBodyRenell & " <td width=""11%""><font size=""2"" face=""Verdana""> </font></td>" sBodyRenell = sBodyRenell & "</tr></table>" 'Tilføjer total linie sBodyHtml = sBodyHtml & "<table width=""89%"" border=""1"" bordercolor=""#AAAFB4""><tr>" sBodyHtml = sBodyHtml & " <td width=""11%"" height=""16"" bgcolor=""#F0F0F0""> <font size=""2"" face=""Verdana""></font></td>" sBodyHtml = sBodyHtml & " <td width=""63%"" bgcolor=""#DEE0E4""><font size=""2"" face=""Verdana"" align=""right"">Total incl. moms (moms udgør " & FormatNumber(iTotal-iTotal*0.75, 2) & "):</font></td>" sBodyHtml = sBodyHtml & " <td width=""15%"" bgcolor=""#F0F0F0""><font size=""2"" face=""Verdana"" align=""right""><u><strong>" & FormatNumber(iTotal, 2) & "</strong></u></font></td>" sBodyHtml = sBodyHtml & " <td width=""11%"" bgcolor=""#DEE0E4""><font size=""2"" face=""Verdana""> </font></td>" sBodyHtml = sBodyHtml & "</tr></table>" 'Føjer total til renell mail sBodyRenell = sBodyRenell & "<table width=""89%"" border=""0""><tr>" sBodyRenell = sBodyRenell & " <td width=""11%"" height=""16""> <font size=""2"" face=""Verdana""></font></td>" sBodyRenell = sBodyRenell & " <td width=""63%""><font size=""2"" face=""Verdana"" align=""right"">Total incl. moms (moms udgør " & FormatNumber(iTotal-iTotal*0.75, 2) & "):</font></td>" sBodyRenell = sBodyRenell & " <td width=""15%""><font size=""2"" face=""Verdana"" align=""right""><u><strong>" & FormatNumber(iTotal, 2) & "</strong></u></font></td>" sBodyRenell = sBodyRenell & " <td width=""11%""><font size=""2"" face=""Verdana""> </font></td>" sBodyRenell = sBodyRenell & "</tr></table>" 'Om kørsel 'sBodyHtml = sBodyHtml & "<font size=""2"" face=""Verdana""><i>OBS! Den oplyste pris er uden kørsel.</i></font><br>" 'sBodyHtml = sBodyHtml & "<font size=""2"" face=""Verdana"">Kørsel indenfor Helsingør Kommune kr. 300,00 incl. Moms.</font><br>" 'sBodyHtml = sBodyHtml & "<font size=""2"" face=""Verdana"">Kørsel til Fredensborg-Humlebæk, Græsted-Gilleleje, Karlebo og Hørsholm kommune kr. 400,00 incl. Moms.</font><br>" 'Forbehold sBodyHtml = sBodyHtml & "<br><br><font size=""1"" face=""Verdana""><i>Med forbehold for prisændringer, fejl, m.m.</i></font><br><br>" 'Hvis kommune = øvrige If iKorselComment Then sBodyHtml = sBodyHtml & "<br><br><font size=""1"" face=""Verdana""><i>Der er ikke medregnet pris for kørsel i dette tilbud, du vil blive kontaktet af Renell vedrørende prisen.</i></font><br><br>" sBodyRenell = sBodyRenell & "<br><br><font color=""red"" size=""1"" face=""Verdana""><i>Der er ikke medregnet pris for kørsel i dette tilbud, kontakt kunden vedrørende prisen.</i></font><br><br>" End if 'Hilsen sBodyHtml = sBodyHtml & "<font size=""2"" face=""Verdana"">Med venlig hilsen</font><br>" sBodyHtml = sBodyHtml & "<font size=""2"" face=""Verdana"">Renell</font><br>" 'mail to website Dim jmail Set jmail = Server.CreateObject("JMail.smtpmail") jmail.ServerAddress = "jaynet" jmail.ContentType = "text/html" jmail.AddRecipient "info@ufodesign.dk" jmail.Sender = "postmaster@renell.dk" jmail.SenderName = "Renell website" jmail.Subject = "Bestilling på nettet" jmail.Body = "<html><body>" & sBodyRenell & "</body></html>" jmail.Execute jmail.Close Set jmail = Nothing 'html to customer If Len(Request.Form("Email")) > 6 Then Set jmail = Server.CreateObject("JMail.smtpmail") jmail.ServerAddress = "jaynet" jmail.ContentType = "text/html" jmail.Sender = "postmaster@renell.dk" jmail.SenderName = "Renell website" jmail.Subject = "Bestilling hos Renell" jmail.AddRecipient Request.Form("Email") jmail.Body = "<html><body>" & sBodyHtml & "</body></html>" jmail.Execute jmail.close Set jmail = Nothing End If %> <html> <head> <title>Renell Service A/S</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" background="graphics/leftmenu_bg.gif" link="#032956" vlink="#000000" alink="#000000"> <table width="100%" border="0"> <tr> <td width="100%" align="center"><font face="Verdana" size="2" color="#000000"><br><br>Deres bestilling er afsendt til Renell.</font></td> </tr> </table> </body> </html>
29. marts 2006 - 13:39
#4
total prisen er den ikke incl. moms? Er det moms beløbet som er regnet forket ud?
29. marts 2006 - 13:43
#5
men det er her den regner momsen ud: sBodyHtml = sBodyHtml & " <td width=""63%"" bgcolor=""#DEE0E4""><font size=""2"" face=""Verdana"" align=""right"">Total incl. moms (moms udgør " & FormatNumber(iTotal-iTotal*0.75, 2) & "):</font></td>" sBodyHtml = sBodyHtml & " <td width=""15%"" bgcolor=""#F0F0F0""><font size=""2"" face=""Verdana"" align=""right""><u><strong>" & FormatNumber(iTotal, 2) & "</strong></u></font></td>" Det helt præsist dette som regner moms beløbet ud: FormatNumber(iTotal-iTotal*0.75, 2) Umiddelbart er den ikke helt ok, da momsen er 20% af total beløbet incl. moms. det skal være sådan her: FormatNumber(iTotal*0.20, 2)
29. marts 2006 - 14:11
#6
Jeg kan spørge på en anden måde.
Er beløbene på siden
www.renell.dk/serviceart_temp.html incl. moms?
Er beløbene incl. moms skulle det være nok at ændre det som har vist.
Hvis de ikke er med moms skal total (iTotal variablen) ganges med 1.25 når man ønsker prisen incl moms. Ønsker man moms beløbet ganger man med 0.25. Så skal du linier som jeg har vist i sidste kommentar rettes.
Nu har jeg kigge lidt mere og jeg tror problemet ligger i at dine priser på hmtl siden står med komma: 40,00 for 40kr. I ASP koden vil det blive til 4000 da man bruger . som skille tegn.
Jeg kan også se at du (eller den som har lavet koden) i koden delen med 100:
'Divide by 100
iTotal = (iTotal/100)
og det er sikkert for at få beløbet til at passe pga. det med komma.
De 3 kr som bliver lagt til som "moms" er højst sansynligt din kørsel som er 300 kr:
iPriceKorsel = 300
men da de ligges til som 300 og bagefter deler med 100 giver det 3 kr.
29. marts 2006 - 15:40
#7
Hej Eagleeye, Nej, priserne på de forskellige varer er eks. Moms, så Moms skal altså regnes ud på bundlinien sammen med totalbeløbet på de valgte + antal af varer. Kan du ordne det så det virker? Jeg har overhovedet ikke styr på noget som helst af alt det dér. :/ Mvh Bassa
29. marts 2006 - 15:47
#8
Eksempel på e-mail jeg lige har fået: Kæmpegrill 300,00 1 Rengøring af service, grill, m.m. 350.00 Kørsel 300.00 Total incl. moms (moms udgør 76.63): 306.50 Underligt? :)
29. marts 2006 - 15:59
#9
Underligt? Ja og så afligevel ikke for: 300,00 --> 30000kr+350kr+300kr = 30650 så deles med 10 og det giver 306.50 kr :) Du kan se det at grillen koster 300,00 med komma og rengøring koster 350.00 med punktum Problemet er at ASP koden bruger punktum som komma. Samt lave det såan total prisen er incl. moms og ikke nu hvor den er uden moms. Ja jeg kan rette koden til det jeg vil er at lave , om til . Jeg vil kigger på det og så poster jeg den nye koden om lidt.
29. marts 2006 - 16:14
#10
Faktisk tror jeg selv du kan rette det: Tilføj denne linie i toppen af din fil: <% session.LCID = 1030 %> og så sletter du disse to linier: 'Divide by 100 iTotal = (iTotal/100)
29. marts 2006 - 16:15
#11
Samt rette diss to linier: sBodyHtml = sBodyHtml & " <td width=""63%"" bgcolor=""#DEE0E4""><font size=""2"" face=""Verdana"" align=""right"">Total incl. moms (moms udgør " & FormatNumber(iTotal-iTotal*0.75, 2) & "):</font></td>" sBodyHtml = sBodyHtml & " <td width=""15%"" bgcolor=""#F0F0F0""><font size=""2"" face=""Verdana"" align=""right""><u><strong>" & FormatNumber(iTotal, 2) & "</strong></u></font></td>" Til dette så den ligger momsen til: sBodyHtml = sBodyHtml & " <td width=""63%"" bgcolor=""#DEE0E4""><font size=""2"" face=""Verdana"" align=""right"">Total incl. moms (moms udgør " & FormatNumber(iTotal*0.25, 2) & "):</font></td>" sBodyHtml = sBodyHtml & " <td width=""15%"" bgcolor=""#F0F0F0""><font size=""2"" face=""Verdana"" align=""right""><u><strong>" & FormatNumber(iTotal*1.25, 2) & "</strong></u></font></td>" og prøv at teste det igen.
29. marts 2006 - 16:34
#12
Det hjalp ikke, tværtimod. :(
29. marts 2006 - 16:38
#13
Den med LCID skal stå som nr.2... :) Her er koden rettet til prøv om den ikke vil køre: <%@ Language=VBScript %> <% Session.LCID = 1030 %> <% Dim sSubject Dim sBody, sBodyHtml Dim iTotal, iXtraRengoring iTotal = 0 iXtraRengoring = 0 'Ønsker vedr. rengøring Dim bRengoringService, bRengoringGrill If Request.Form("RengoringService") = "ON" Then bRengoringService = True Else bRengoringService = False End If If Request.Form("RengoringGrill") = "ON" Then bRengoringGrill = True Else bRengoringGrill = False End If sBodyHtml = sBodyHtml & "<font size=""2"" face=""Verdana"">Dato: " & Now & "</font><br>" sBodyHtml = sBodyHtml & "<font size=""2"" face=""Verdana""><strong>Kunde oplysninger:</strong><br>" sBodyHtml = sBodyHtml & "Kontaktperson: " & Chr(9) & Request.Form("Kontaktperson") & "<br>" sBodyHtml = sBodyHtml & "Adresse: " & Chr(9) & Chr(9) & Request.Form("Adresse") & "<br>" sBodyHtml = sBodyHtml & "Postnr.: " & Chr(9) & Chr(9) & Request.Form("Postnr") & "<br>" sBodyHtml = sBodyHtml & "By: " & Chr(9) & Chr(9) & Chr(9) & Request.Form("By") & "<br>" sBodyHtml = sBodyHtml & "Telefon nr.: " & Chr(9) & Request.Form("Telefon nr.") & "<br>" sBodyHtml = sBodyHtml & "Email: " & Chr(9) & Chr(9) & Request.Form("Email") & "<br>" sBodyHtml = sBodyHtml & "Bemærkninger: " & Chr(9) & Chr(9) & Request.Form("Bemærkninger") & "<br>" sBodyHtml = sBodyHtml & "Levering: " & Chr(9) & Chr(9) & Request.Form("Levering") & "<br>" & "<br></font>" 'Overføre header til renell mail sBodyRenell = sBodyHtml sBodyHtml = sBodyHtml & "<font size=""2"" face=""Verdana""><strong>Din ordre:</strong></font>" sBodyHtml = sBodyHtml & "<table width=""89%"" border=""1"" bordercolor=""#AAAFB4""><tr>" sBodyHtml = sBodyHtml & " <td width=""11%"" height=""16"" bgcolor=""#F0F0F0""><font size=""2"" face=""Verdana""><strong>Varenr.:</strong></font></td>" sBodyHtml = sBodyHtml & " <td width=""63%"" bgcolor=""#DEE0E4""><font size=""2"" face=""Verdana""><strong>Varenavn:</strong></font></td>" sBodyHtml = sBodyHtml & " <td width=""15%"" bgcolor=""#F0F0F0""> <strong><font size=""2"" face=""Verdana"" align=""right"">Stk. pris kr.:</font></strong></td>" sBodyHtml = sBodyHtml & " <td width=""11%"" bgcolor=""#DEE0E4""><strong><font size=""2"" face=""Verdana"">Antal:</font></strong></td>" sBodyHtml = sBodyHtml & "</tr></table>" sBodyRenell = sBodyRenell & "<font size=""2"" face=""Verdana""><strong>Kundens ordre:</strong></font>" sBodyRenell = sBodyRenell & "<table width=""89%"" border=""0""><tr>" sBodyRenell = sBodyRenell & " <td width=""11%"" height=""16""><font size=""2"" face=""Verdana""><strong>Varenr.:</strong></font></td>" sBodyRenell = sBodyRenell & " <td width=""63%""><font size=""2"" face=""Verdana""><strong>Varenavn:</strong></font></td>" sBodyRenell = sBodyRenell & " <td width=""15%""><strong><font size=""2"" face=""Verdana"" align=""right"">Stk. pris kr.:</font></strong></td>" sBodyRenell = sBodyRenell & " <td width=""11%""><strong><font size=""2"" face=""Verdana"">Antal:</font></strong></td>" sBodyRenell = sBodyRenell & "</tr></table>" For each item In Request.Form If (LCase(Left(item, 5)) = "antal") And (IsNumeric(Request.Form(item))) Then sFormItemNumber = Replace(LCase(item), "antal", "") sBodyHtml = sBodyHtml & "<table width=""89%"" border=""1"" bordercolor=""#AAAFB4""><tr>" sBodyHtml = sBodyHtml & " <td width=""11%"" height=""16"" bgcolor=""#F0F0F0""><font size=""2"" face=""Verdana"">" & Request.Form("Varenummer" & sFormItemNumber) & "</font></td>" sBodyHtml = sBodyHtml & " <td width=""63%"" bgcolor=""#DEE0E4""><font size=""2"" face=""Verdana"">" & Request.Form("Varenavn" & sFormItemNumber) & "</font></td>" sBodyHtml = sBodyHtml & " <td width=""15%"" bgcolor=""#F0F0F0""><font size=""2"" face=""Verdana"" align=""right"">" & Request.Form("Stk. pris" & sFormItemNumber) & "</font></td>" sBodyHtml = sBodyHtml & " <td width=""11%"" bgcolor=""#DEE0E4""><font size=""2"" face=""Verdana"">" & Request.Form("Antal" & sFormItemNumber) & "</font></td>" sBodyHtml = sBodyHtml & "</tr></table>" sBodyRenell = sBodyRenell & "<table width=""89%"" border=""0""><tr>" sBodyRenell = sBodyRenell & " <td width=""11%"" height=""16""><font size=""2"" face=""Verdana"">" & Request.Form("Varenummer" & sFormItemNumber) & "</font></td>" sBodyRenell = sBodyRenell & " <td width=""63%""><font size=""2"" face=""Verdana"">" & Request.Form("Varenavn" & sFormItemNumber) & "</font></td>" sBodyRenell = sBodyRenell & " <td width=""15%""><font size=""2"" face=""Verdana"" align=""right"">" & Request.Form("Stk. pris" & sFormItemNumber) & "</font></td>" sBodyRenell = sBodyRenell & " <td width=""11%""><font size=""2"" face=""Verdana"">" & Request.Form("Antal" & sFormItemNumber) & "</font></td>" sBodyRenell = sBodyRenell & "</tr></table>" 'Prisberegninger If IsNumeric(Request.Form("Stk. pris" & sFormItemNumber)) Then iPrice = FormatNumber(Request.Form("Stk. pris" & sFormItemNumber)) iTotal = iTotal + (CDbl(iPrice)*Request.Form(item)) End If 'porcelæn & glas If bRengoringService And (Left(Trim(Request.Form("Varenummer" & sFormItemNumber)), 2) = "04" Or Left(Trim(Request.Form("Varenummer" & sFormItemNumber)), 2) = "06") Then 'If not = ikke pris for salt og peber bøsse If Not Trim(Request.Form("Varenummer" & sFormItemNumber)) = "04-400" Then iXtraRengoring = iXtraRengoring + 1*Request.Form(item) End If End If 'Kaffe kander If bRengoringService And (Trim(Request.Form("Varenummer" & sFormItemNumber)) = "05-400" Or Trim(Request.Form("Varenummer" & sFormItemNumber)) = "05-401") Then iXtraRengoring = iXtraRengoring + 1.5*Request.Form(item) End If 'bestik If bRengoringService And Left(Trim(Request.Form("Varenummer" & sFormItemNumber)), 2) = "07" Then iXtraRengoring = iXtraRengoring + .5*Request.Form(item) End If 'skåle og fade If bRengoringService And Left(Trim(Request.Form("Varenummer" & sFormItemNumber)), 2) = "08" Then iXtraRengoring = iXtraRengoring + 1.5*Request.Form(item) End If 'kopper If bRengoringService And (Left(Trim(Request.Form("Varenummer" & sFormItemNumber)),4) = "05-1" Or Left(Trim(Request.Form("Varenummer" & sFormItemNumber)),4) = "05-2" Or Left(Trim(Request.Form("Varenummer" & sFormItemNumber)),4) = "05-3") Then iXtraRengoring = iXtraRengoring + 1*Request.Form(item) End If 'grill If bRengoringGrill And (Trim(Request.Form("Varenummer" & sFormItemNumber)) = "10-100" Or Trim(Request.Form("Varenummer" & sFormItemNumber)) = "10-101") Then iXtraRengoring = iXtraRengoring + 350*Request.Form(item) End If End If Next 'Tilføjer pris for rengøring If iXtraRengoring > 0 Then 'kundens mail sBodyHtml = sBodyHtml & "<table width=""89%"" border=""1"" bordercolor=""#AAAFB4""><tr>" sBodyHtml = sBodyHtml & " <td width=""11%"" height=""16"" bgcolor=""#F0F0F0""> <font size=""2"" face=""Verdana""></font></td>" sBodyHtml = sBodyHtml & " <td width=""63%"" bgcolor=""#DEE0E4""><font size=""2"" face=""Verdana"" align=""right"">Rengøring af service, grill, m.m.</font></td>" sBodyHtml = sBodyHtml & " <td width=""15%"" bgcolor=""#F0F0F0""><font size=""2"" face=""Verdana"" align=""right"">" & FormatNumber(iXtraRengoring, 2) & "</font></td>" sBodyHtml = sBodyHtml & " <td width=""11%"" bgcolor=""#DEE0E4""><font size=""2"" face=""Verdana""> </font></td>" sBodyHtml = sBodyHtml & "</tr></table>" 'renell mail sBodyRenell = sBodyRenell & "<table width=""89%"" border=""0""><tr>" sBodyRenell = sBodyRenell & " <td width=""11%"" height=""16""> <font size=""2"" face=""Verdana""></font></td>" sBodyRenell = sBodyRenell & " <td width=""63%""><font size=""2"" face=""Verdana"" align=""right"">Rengøring af service, grill, m.m.</font></td>" sBodyRenell = sBodyRenell & " <td width=""15%""><font size=""2"" face=""Verdana"" align=""right"">" & FormatNumber(iXtraRengoring, 2) & "</font></td>" sBodyRenell = sBodyRenell & " <td width=""11%""><font size=""2"" face=""Verdana""> </font></td>" sBodyRenell = sBodyRenell & "</tr></table>" End If 'Føjer rengørings omkostninger til total If iXtraRengoring > 0 Then iTotal = iTotal + iXtraRengoring End If 'Kørsel If Request.Form("selKommune") = "Helsingør" Then 'iPriceKorsel = FormatNumber(300, 2) iPriceKorsel = 300 iTotal = iTotal + iPriceKorsel iKorselComment = False ElseIf Request.Form("selKommune") = "Øvrige" Then iPriceKorsel = "?" iKorselComment = True Else 'iPriceKorsel = FormatNumber(400, 2) iPriceKorsel = 400 iTotal = iTotal + iPriceKorsel iKorselComment = False End If 'Divide by 100 'iTotal = (iTotal/100) 'fjernes da man ikke skal delen prisen længere 'kørsel kunde mail sBodyHtml = sBodyHtml & "<table width=""89%"" border=""1"" bordercolor=""#AAAFB4""><tr>" sBodyHtml = sBodyHtml & " <td width=""11%"" height=""16"" bgcolor=""#F0F0F0""> <font size=""2"" face=""Verdana""></font></td>" sBodyHtml = sBodyHtml & " <td width=""63%"" bgcolor=""#DEE0E4""><font size=""2"" face=""Verdana"" align=""right"">Kørsel</font></td>" sBodyHtml = sBodyHtml & " <td width=""15%"" bgcolor=""#F0F0F0""><font size=""2"" face=""Verdana"" align=""right"">" & FormatNumber(iPriceKorsel,2) & "</font></td>" sBodyHtml = sBodyHtml & " <td width=""11%"" bgcolor=""#DEE0E4""><font size=""2"" face=""Verdana""> </font></td>" sBodyHtml = sBodyHtml & "</tr></table>" 'kørsel renell mail sBodyRenell = sBodyRenell & "<table width=""89%"" border=""0""><tr>" sBodyRenell = sBodyRenell & " <td width=""11%"" height=""16""> <font size=""2"" face=""Verdana""></font></td>" sBodyRenell = sBodyRenell & " <td width=""63%""><font size=""2"" face=""Verdana"" align=""right"">Kørsel</font></td>" sBodyRenell = sBodyRenell & " <td width=""15%""><font size=""2"" face=""Verdana"" align=""right"">" & FormatNumber(iPriceKorsel,2) & "</font></td>" sBodyRenell = sBodyRenell & " <td width=""11%""><font size=""2"" face=""Verdana""> </font></td>" sBodyRenell = sBodyRenell & "</tr></table>" 'Tilføjer total linie sBodyHtml = sBodyHtml & "<table width=""89%"" border=""1"" bordercolor=""#AAAFB4""><tr>" sBodyHtml = sBodyHtml & " <td width=""11%"" height=""16"" bgcolor=""#F0F0F0""> <font size=""2"" face=""Verdana""></font></td>" sBodyHtml = sBodyHtml & " <td width=""63%"" bgcolor=""#DEE0E4""><font size=""2"" face=""Verdana"" align=""right"">Total incl. moms (moms udgør " & FormatNumber(iTotal-iTotal*0.75, 2) & "):</font></td>" sBodyHtml = sBodyHtml & " <td width=""15%"" bgcolor=""#F0F0F0""><font size=""2"" face=""Verdana"" align=""right""><u><strong>" & FormatNumber(iTotal, 2) & "</strong></u></font></td>" sBodyHtml = sBodyHtml & " <td width=""11%"" bgcolor=""#DEE0E4""><font size=""2"" face=""Verdana""> </font></td>" sBodyHtml = sBodyHtml & "</tr></table>" 'Føjer total til renell mail sBodyRenell = sBodyRenell & "<table width=""89%"" border=""0""><tr>" sBodyRenell = sBodyRenell & " <td width=""11%"" height=""16""> <font size=""2"" face=""Verdana""></font></td>" 'Disse to angater alle priser er incl. moms 'sBodyRenell = sBodyRenell & " <td width=""63%""><font size=""2"" face=""Verdana"" align=""right"">Total incl. moms (moms udgør " & FormatNumber(iTotal-iTotal*0.75, 2) & "):</font></td>" 'sBodyRenell = sBodyRenell & " <td width=""15%""><font size=""2"" face=""Verdana"" align=""right""><u><strong>" & FormatNumber(iTotal, 2) & "</strong></u></font></td>" 'Her rettet til de er excl. moms som så ligges til sBodyRenell = sBodyRenell & " <td width=""63%"" bgcolor=""#DEE0E4""><font size=""2"" face=""Verdana"" align=""right"">Total incl. moms (moms udgør " & FormatNumber(iTotal*0.25, 2) & "):</font></td>" sBodyRenell = sBodyRenell & " <td width=""15%"" bgcolor=""#F0F0F0""><font size=""2"" face=""Verdana"" align=""right""><u><strong>" & FormatNumber(iTotal*1.25, 2) & "</strong></u></font></td>" sBodyRenell = sBodyRenell & " <td width=""11%""><font size=""2"" face=""Verdana""> </font></td>" sBodyRenell = sBodyRenell & "</tr></table>" 'Om kørsel 'sBodyHtml = sBodyHtml & "<font size=""2"" face=""Verdana""><i>OBS! Den oplyste pris er uden kørsel.</i></font><br>" 'sBodyHtml = sBodyHtml & "<font size=""2"" face=""Verdana"">Kørsel indenfor Helsingør Kommune kr. 300,00 incl. Moms.</font><br>" 'sBodyHtml = sBodyHtml & "<font size=""2"" face=""Verdana"">Kørsel til Fredensborg-Humlebæk, Græsted-Gilleleje, Karlebo og Hørsholm kommune kr. 400,00 incl. Moms.</font><br>" 'Forbehold sBodyHtml = sBodyHtml & "<br><br><font size=""1"" face=""Verdana""><i>Med forbehold for prisændringer, fejl, m.m.</i></font><br><br>" 'Hvis kommune = øvrige If iKorselComment Then sBodyHtml = sBodyHtml & "<br><br><font size=""1"" face=""Verdana""><i>Der er ikke medregnet pris for kørsel i dette tilbud, du vil blive kontaktet af Renell vedrørende prisen.</i></font><br><br>" sBodyRenell = sBodyRenell & "<br><br><font color=""red"" size=""1"" face=""Verdana""><i>Der er ikke medregnet pris for kørsel i dette tilbud, kontakt kunden vedrørende prisen.</i></font><br><br>" End if 'Hilsen sBodyHtml = sBodyHtml & "<font size=""2"" face=""Verdana"">Med venlig hilsen</font><br>" sBodyHtml = sBodyHtml & "<font size=""2"" face=""Verdana"">Renell</font><br>" 'mail to website Dim jmail Set jmail = Server.CreateObject("JMail.smtpmail") jmail.ServerAddress = "jaynet" jmail.ContentType = "text/html" jmail.AddRecipient "info@ufodesign.dk" jmail.Sender = "postmaster@renell.dk" jmail.SenderName = "Renell website" jmail.Subject = "Bestilling på nettet" jmail.Body = "<html><body>" & sBodyRenell & "</body></html>" jmail.Execute jmail.Close Set jmail = Nothing 'html to customer If Len(Request.Form("Email")) > 6 Then Set jmail = Server.CreateObject("JMail.smtpmail") jmail.ServerAddress = "jaynet" jmail.ContentType = "text/html" jmail.Sender = "postmaster@renell.dk" jmail.SenderName = "Renell website" jmail.Subject = "Bestilling hos Renell" jmail.AddRecipient Request.Form("Email") jmail.Body = "<html><body>" & sBodyHtml & "</body></html>" jmail.Execute jmail.close Set jmail = Nothing End If %> <html> <head> <title>Renell Service A/S</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" background="graphics/leftmenu_bg.gif" link="#032956" vlink="#000000" alink="#000000"> <table width="100%" border="0"> <tr> <td width="100%" align="center"><font face="Verdana" size="2" color="#000000"><br><br>Deres bestilling er afsendt til Renell.</font></td> </tr> </table> </body> </html>
29. marts 2006 - 16:42
#14
Faktisk skal det være denne den før ikke fik opdateret sBodyHtml moms på total prisen: <%@ Language=VBScript %> <% Session.LCID = 1030 %> <% Dim sSubject Dim sBody, sBodyHtml Dim iTotal, iXtraRengoring iTotal = 0 iXtraRengoring = 0 'Ønsker vedr. rengøring Dim bRengoringService, bRengoringGrill If Request.Form("RengoringService") = "ON" Then bRengoringService = True Else bRengoringService = False End If If Request.Form("RengoringGrill") = "ON" Then bRengoringGrill = True Else bRengoringGrill = False End If sBodyHtml = sBodyHtml & "<font size=""2"" face=""Verdana"">Dato: " & Now & "</font><br>" sBodyHtml = sBodyHtml & "<font size=""2"" face=""Verdana""><strong>Kunde oplysninger:</strong><br>" sBodyHtml = sBodyHtml & "Kontaktperson: " & Chr(9) & Request.Form("Kontaktperson") & "<br>" sBodyHtml = sBodyHtml & "Adresse: " & Chr(9) & Chr(9) & Request.Form("Adresse") & "<br>" sBodyHtml = sBodyHtml & "Postnr.: " & Chr(9) & Chr(9) & Request.Form("Postnr") & "<br>" sBodyHtml = sBodyHtml & "By: " & Chr(9) & Chr(9) & Chr(9) & Request.Form("By") & "<br>" sBodyHtml = sBodyHtml & "Telefon nr.: " & Chr(9) & Request.Form("Telefon nr.") & "<br>" sBodyHtml = sBodyHtml & "Email: " & Chr(9) & Chr(9) & Request.Form("Email") & "<br>" sBodyHtml = sBodyHtml & "Bemærkninger: " & Chr(9) & Chr(9) & Request.Form("Bemærkninger") & "<br>" sBodyHtml = sBodyHtml & "Levering: " & Chr(9) & Chr(9) & Request.Form("Levering") & "<br>" & "<br></font>" 'Overføre header til renell mail sBodyRenell = sBodyHtml sBodyHtml = sBodyHtml & "<font size=""2"" face=""Verdana""><strong>Din ordre:</strong></font>" sBodyHtml = sBodyHtml & "<table width=""89%"" border=""1"" bordercolor=""#AAAFB4""><tr>" sBodyHtml = sBodyHtml & " <td width=""11%"" height=""16"" bgcolor=""#F0F0F0""><font size=""2"" face=""Verdana""><strong>Varenr.:</strong></font></td>" sBodyHtml = sBodyHtml & " <td width=""63%"" bgcolor=""#DEE0E4""><font size=""2"" face=""Verdana""><strong>Varenavn:</strong></font></td>" sBodyHtml = sBodyHtml & " <td width=""15%"" bgcolor=""#F0F0F0""> <strong><font size=""2"" face=""Verdana"" align=""right"">Stk. pris kr.:</font></strong></td>" sBodyHtml = sBodyHtml & " <td width=""11%"" bgcolor=""#DEE0E4""><strong><font size=""2"" face=""Verdana"">Antal:</font></strong></td>" sBodyHtml = sBodyHtml & "</tr></table>" sBodyRenell = sBodyRenell & "<font size=""2"" face=""Verdana""><strong>Kundens ordre:</strong></font>" sBodyRenell = sBodyRenell & "<table width=""89%"" border=""0""><tr>" sBodyRenell = sBodyRenell & " <td width=""11%"" height=""16""><font size=""2"" face=""Verdana""><strong>Varenr.:</strong></font></td>" sBodyRenell = sBodyRenell & " <td width=""63%""><font size=""2"" face=""Verdana""><strong>Varenavn:</strong></font></td>" sBodyRenell = sBodyRenell & " <td width=""15%""><strong><font size=""2"" face=""Verdana"" align=""right"">Stk. pris kr.:</font></strong></td>" sBodyRenell = sBodyRenell & " <td width=""11%""><strong><font size=""2"" face=""Verdana"">Antal:</font></strong></td>" sBodyRenell = sBodyRenell & "</tr></table>" For each item In Request.Form If (LCase(Left(item, 5)) = "antal") And (IsNumeric(Request.Form(item))) Then sFormItemNumber = Replace(LCase(item), "antal", "") sBodyHtml = sBodyHtml & "<table width=""89%"" border=""1"" bordercolor=""#AAAFB4""><tr>" sBodyHtml = sBodyHtml & " <td width=""11%"" height=""16"" bgcolor=""#F0F0F0""><font size=""2"" face=""Verdana"">" & Request.Form("Varenummer" & sFormItemNumber) & "</font></td>" sBodyHtml = sBodyHtml & " <td width=""63%"" bgcolor=""#DEE0E4""><font size=""2"" face=""Verdana"">" & Request.Form("Varenavn" & sFormItemNumber) & "</font></td>" sBodyHtml = sBodyHtml & " <td width=""15%"" bgcolor=""#F0F0F0""><font size=""2"" face=""Verdana"" align=""right"">" & Request.Form("Stk. pris" & sFormItemNumber) & "</font></td>" sBodyHtml = sBodyHtml & " <td width=""11%"" bgcolor=""#DEE0E4""><font size=""2"" face=""Verdana"">" & Request.Form("Antal" & sFormItemNumber) & "</font></td>" sBodyHtml = sBodyHtml & "</tr></table>" sBodyRenell = sBodyRenell & "<table width=""89%"" border=""0""><tr>" sBodyRenell = sBodyRenell & " <td width=""11%"" height=""16""><font size=""2"" face=""Verdana"">" & Request.Form("Varenummer" & sFormItemNumber) & "</font></td>" sBodyRenell = sBodyRenell & " <td width=""63%""><font size=""2"" face=""Verdana"">" & Request.Form("Varenavn" & sFormItemNumber) & "</font></td>" sBodyRenell = sBodyRenell & " <td width=""15%""><font size=""2"" face=""Verdana"" align=""right"">" & Request.Form("Stk. pris" & sFormItemNumber) & "</font></td>" sBodyRenell = sBodyRenell & " <td width=""11%""><font size=""2"" face=""Verdana"">" & Request.Form("Antal" & sFormItemNumber) & "</font></td>" sBodyRenell = sBodyRenell & "</tr></table>" 'Prisberegninger If IsNumeric(Request.Form("Stk. pris" & sFormItemNumber)) Then iPrice = FormatNumber(Request.Form("Stk. pris" & sFormItemNumber)) iTotal = iTotal + (CDbl(iPrice)*Request.Form(item)) End If 'porcelæn & glas If bRengoringService And (Left(Trim(Request.Form("Varenummer" & sFormItemNumber)), 2) = "04" Or Left(Trim(Request.Form("Varenummer" & sFormItemNumber)), 2) = "06") Then 'If not = ikke pris for salt og peber bøsse If Not Trim(Request.Form("Varenummer" & sFormItemNumber)) = "04-400" Then iXtraRengoring = iXtraRengoring + 1*Request.Form(item) End If End If 'Kaffe kander If bRengoringService And (Trim(Request.Form("Varenummer" & sFormItemNumber)) = "05-400" Or Trim(Request.Form("Varenummer" & sFormItemNumber)) = "05-401") Then iXtraRengoring = iXtraRengoring + 1.5*Request.Form(item) End If 'bestik If bRengoringService And Left(Trim(Request.Form("Varenummer" & sFormItemNumber)), 2) = "07" Then iXtraRengoring = iXtraRengoring + .5*Request.Form(item) End If 'skåle og fade If bRengoringService And Left(Trim(Request.Form("Varenummer" & sFormItemNumber)), 2) = "08" Then iXtraRengoring = iXtraRengoring + 1.5*Request.Form(item) End If 'kopper If bRengoringService And (Left(Trim(Request.Form("Varenummer" & sFormItemNumber)),4) = "05-1" Or Left(Trim(Request.Form("Varenummer" & sFormItemNumber)),4) = "05-2" Or Left(Trim(Request.Form("Varenummer" & sFormItemNumber)),4) = "05-3") Then iXtraRengoring = iXtraRengoring + 1*Request.Form(item) End If 'grill If bRengoringGrill And (Trim(Request.Form("Varenummer" & sFormItemNumber)) = "10-100" Or Trim(Request.Form("Varenummer" & sFormItemNumber)) = "10-101") Then iXtraRengoring = iXtraRengoring + 350*Request.Form(item) End If End If Next 'Tilføjer pris for rengøring If iXtraRengoring > 0 Then 'kundens mail sBodyHtml = sBodyHtml & "<table width=""89%"" border=""1"" bordercolor=""#AAAFB4""><tr>" sBodyHtml = sBodyHtml & " <td width=""11%"" height=""16"" bgcolor=""#F0F0F0""> <font size=""2"" face=""Verdana""></font></td>" sBodyHtml = sBodyHtml & " <td width=""63%"" bgcolor=""#DEE0E4""><font size=""2"" face=""Verdana"" align=""right"">Rengøring af service, grill, m.m.</font></td>" sBodyHtml = sBodyHtml & " <td width=""15%"" bgcolor=""#F0F0F0""><font size=""2"" face=""Verdana"" align=""right"">" & FormatNumber(iXtraRengoring, 2) & "</font></td>" sBodyHtml = sBodyHtml & " <td width=""11%"" bgcolor=""#DEE0E4""><font size=""2"" face=""Verdana""> </font></td>" sBodyHtml = sBodyHtml & "</tr></table>" 'renell mail sBodyRenell = sBodyRenell & "<table width=""89%"" border=""0""><tr>" sBodyRenell = sBodyRenell & " <td width=""11%"" height=""16""> <font size=""2"" face=""Verdana""></font></td>" sBodyRenell = sBodyRenell & " <td width=""63%""><font size=""2"" face=""Verdana"" align=""right"">Rengøring af service, grill, m.m.</font></td>" sBodyRenell = sBodyRenell & " <td width=""15%""><font size=""2"" face=""Verdana"" align=""right"">" & FormatNumber(iXtraRengoring, 2) & "</font></td>" sBodyRenell = sBodyRenell & " <td width=""11%""><font size=""2"" face=""Verdana""> </font></td>" sBodyRenell = sBodyRenell & "</tr></table>" End If 'Føjer rengørings omkostninger til total If iXtraRengoring > 0 Then iTotal = iTotal + iXtraRengoring End If 'Kørsel If Request.Form("selKommune") = "Helsingør" Then 'iPriceKorsel = FormatNumber(300, 2) iPriceKorsel = 300 iTotal = iTotal + iPriceKorsel iKorselComment = False ElseIf Request.Form("selKommune") = "Øvrige" Then iPriceKorsel = "?" iKorselComment = True Else 'iPriceKorsel = FormatNumber(400, 2) iPriceKorsel = 400 iTotal = iTotal + iPriceKorsel iKorselComment = False End If 'Divide by 100 'iTotal = (iTotal/100) 'Hack som fjernes 'kørsel kunde mail sBodyHtml = sBodyHtml & "<table width=""89%"" border=""1"" bordercolor=""#AAAFB4""><tr>" sBodyHtml = sBodyHtml & " <td width=""11%"" height=""16"" bgcolor=""#F0F0F0""> <font size=""2"" face=""Verdana""></font></td>" sBodyHtml = sBodyHtml & " <td width=""63%"" bgcolor=""#DEE0E4""><font size=""2"" face=""Verdana"" align=""right"">Kørsel</font></td>" sBodyHtml = sBodyHtml & " <td width=""15%"" bgcolor=""#F0F0F0""><font size=""2"" face=""Verdana"" align=""right"">" & FormatNumber(iPriceKorsel,2) & "</font></td>" sBodyHtml = sBodyHtml & " <td width=""11%"" bgcolor=""#DEE0E4""><font size=""2"" face=""Verdana""> </font></td>" sBodyHtml = sBodyHtml & "</tr></table>" 'kørsel renell mail sBodyRenell = sBodyRenell & "<table width=""89%"" border=""0""><tr>" sBodyRenell = sBodyRenell & " <td width=""11%"" height=""16""> <font size=""2"" face=""Verdana""></font></td>" sBodyRenell = sBodyRenell & " <td width=""63%""><font size=""2"" face=""Verdana"" align=""right"">Kørsel</font></td>" sBodyRenell = sBodyRenell & " <td width=""15%""><font size=""2"" face=""Verdana"" align=""right"">" & FormatNumber(iPriceKorsel,2) & "</font></td>" sBodyRenell = sBodyRenell & " <td width=""11%""><font size=""2"" face=""Verdana""> </font></td>" sBodyRenell = sBodyRenell & "</tr></table>" 'Tilføjer total linie sBodyHtml = sBodyHtml & "<table width=""89%"" border=""1"" bordercolor=""#AAAFB4""><tr>" sBodyHtml = sBodyHtml & " <td width=""11%"" height=""16"" bgcolor=""#F0F0F0""> <font size=""2"" face=""Verdana""></font></td>" 'Denne antager priserne er incl moms. 'sBodyHtml = sBodyHtml & " <td width=""63%"" bgcolor=""#DEE0E4""><font size=""2"" face=""Verdana"" align=""right"">Total incl. moms (moms udgør " & FormatNumber(iTotal-iTotal*0.75, 2) & "):</font></td>" 'sBodyHtml = sBodyHtml & " <td width=""15%"" bgcolor=""#F0F0F0""><font size=""2"" face=""Verdana"" align=""right""><u><strong>" & FormatNumber(iTotal, 2) & "</strong></u></font></td>" 'Rette til at priserne er excl. moms. sBodyHtml = sBodyHtml & " <td width=""63%"" bgcolor=""#DEE0E4""><font size=""2"" face=""Verdana"" align=""right"">Total incl. moms (moms udgør " & FormatNumber(iTotal*0.25, 2) & "):</font></td>" sBodyHtml = sBodyHtml & " <td width=""15%"" bgcolor=""#F0F0F0""><font size=""2"" face=""Verdana"" align=""right""><u><strong>" & FormatNumber(iTotal*1.25, 2) & "</strong></u></font></td>" sBodyHtml = sBodyHtml & " <td width=""11%"" bgcolor=""#DEE0E4""><font size=""2"" face=""Verdana""> </font></td>" sBodyHtml = sBodyHtml & "</tr></table>" 'Føjer total til renell mail sBodyRenell = sBodyRenell & "<table width=""89%"" border=""0""><tr>" sBodyRenell = sBodyRenell & " <td width=""11%"" height=""16""> <font size=""2"" face=""Verdana""></font></td>" 'Disse to angater alle priser er incl. moms 'sBodyRenell = sBodyRenell & " <td width=""63%""><font size=""2"" face=""Verdana"" align=""right"">Total incl. moms (moms udgør " & FormatNumber(iTotal-iTotal*0.75, 2) & "):</font></td>" 'sBodyRenell = sBodyRenell & " <td width=""15%""><font size=""2"" face=""Verdana"" align=""right""><u><strong>" & FormatNumber(iTotal, 2) & "</strong></u></font></td>" 'Her rettet til de er excl. moms som så ligges til sBodyRenell = sBodyRenell & " <td width=""63%"" bgcolor=""#DEE0E4""><font size=""2"" face=""Verdana"" align=""right"">Total incl. moms (moms udgør " & FormatNumber(iTotal*0.25, 2) & "):</font></td>" sBodyRenell = sBodyRenell & " <td width=""15%"" bgcolor=""#F0F0F0""><font size=""2"" face=""Verdana"" align=""right""><u><strong>" & FormatNumber(iTotal*1.25, 2) & "</strong></u></font></td>" sBodyRenell = sBodyRenell & " <td width=""11%""><font size=""2"" face=""Verdana""> </font></td>" sBodyRenell = sBodyRenell & "</tr></table>" 'Om kørsel 'sBodyHtml = sBodyHtml & "<font size=""2"" face=""Verdana""><i>OBS! Den oplyste pris er uden kørsel.</i></font><br>" 'sBodyHtml = sBodyHtml & "<font size=""2"" face=""Verdana"">Kørsel indenfor Helsingør Kommune kr. 300,00 incl. Moms.</font><br>" 'sBodyHtml = sBodyHtml & "<font size=""2"" face=""Verdana"">Kørsel til Fredensborg-Humlebæk, Græsted-Gilleleje, Karlebo og Hørsholm kommune kr. 400,00 incl. Moms.</font><br>" 'Forbehold sBodyHtml = sBodyHtml & "<br><br><font size=""1"" face=""Verdana""><i>Med forbehold for prisændringer, fejl, m.m.</i></font><br><br>" 'Hvis kommune = øvrige If iKorselComment Then sBodyHtml = sBodyHtml & "<br><br><font size=""1"" face=""Verdana""><i>Der er ikke medregnet pris for kørsel i dette tilbud, du vil blive kontaktet af Renell vedrørende prisen.</i></font><br><br>" sBodyRenell = sBodyRenell & "<br><br><font color=""red"" size=""1"" face=""Verdana""><i>Der er ikke medregnet pris for kørsel i dette tilbud, kontakt kunden vedrørende prisen.</i></font><br><br>" End if 'Hilsen sBodyHtml = sBodyHtml & "<font size=""2"" face=""Verdana"">Med venlig hilsen</font><br>" sBodyHtml = sBodyHtml & "<font size=""2"" face=""Verdana"">Renell</font><br>" 'mail to website Dim jmail Set jmail = Server.CreateObject("JMail.smtpmail") jmail.ServerAddress = "jaynet" jmail.ContentType = "text/html" jmail.AddRecipient "info@ufodesign.dk" jmail.Sender = "postmaster@renell.dk" jmail.SenderName = "Renell website" jmail.Subject = "Bestilling på nettet" jmail.Body = "<html><body>" & sBodyRenell & "</body></html>" jmail.Execute jmail.Close Set jmail = Nothing 'html to customer If Len(Request.Form("Email")) > 6 Then Set jmail = Server.CreateObject("JMail.smtpmail") jmail.ServerAddress = "jaynet" jmail.ContentType = "text/html" jmail.Sender = "postmaster@renell.dk" jmail.SenderName = "Renell website" jmail.Subject = "Bestilling hos Renell" jmail.AddRecipient Request.Form("Email") jmail.Body = "<html><body>" & sBodyHtml & "</body></html>" jmail.Execute jmail.close Set jmail = Nothing End If %> <html> <head> <title>Renell Service A/S</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" background="graphics/leftmenu_bg.gif" link="#032956" vlink="#000000" alink="#000000"> <table width="100%" border="0"> <tr> <td width="100%" align="center"><font face="Verdana" size="2" color="#000000"><br><br>Deres bestilling er afsendt til Renell.</font></td> </tr> </table> </body> </html>
29. marts 2006 - 22:41
#15
TAK! :)
Kurser inden for grundlæggende programmering