login  Naam:   Wachtwoord: 
Registreer je!
 Forum

Formulier - factuur

Offline leeterske01 - 13/03/2008 16:03 (laatste wijziging 13/03/2008 16:16)
Avatar van leeterske01Nieuw lid De bedoeling is als een klant het bestelformulier invult en op "maak factuur" klikt er een factuur op het scherm verschijnt met de door de klant ingegeven gegevens in.
Code:
formulier.php
  1. <?php
  2. $link=mysql_connect("localhost","","") or die ("database niet bereikbaar");
  3. $formulier=mysql_select_db("cofep");
  4. ?>
  5. <html>
  6. <head>
  7. <title>COFETRANS</title>
  8. <style type="text/css">
  9. .style1 {
  10. font-size: 12px;
  11. font-weight: bold;}
  12. .style2 {font-size: 12px}
  13. .style5 {font-size: 14px; font-weight: bold; }
  14. .style6 {color: #FF0000}
  15. .style8 {color: #FF0000; font-size: 12px; }
  16. body {
  17. background-image: url(file:///C|/Documents%20and%20Settings/Jonathan%20/Mijn%20documenten/Mijn%20afbeeldingen/achtergrondcofep.jpg);
  18. }
  19. </style>
  20. <script language="javascript" type="text/javascript">
  21. <!--
  22.  
  23.  
  24. //valideer de aantalvelden
  25. function valideerAantal() {
  26. if(event.keyCode < 48 || event.keyCode > 57) {
  27. alert("Je mag enkel cijfers ingeven");
  28. event.returnValue = false;
  29. }
  30. }
  31. //bereken het totaal der aantallen
  32. function berekenAantal(){
  33. var temp;
  34. var total = 0;
  35. for(i=0;i<10;i++){
  36. temp = parseInt(eval("document.form1.aantal"+i+".value"));
  37. if(!isNaN(temp)){
  38. total += temp;
  39. }
  40. }
  41. document.form1.totaalAantal.value = total;
  42. }
  43. //doe enkele controles bij het submitten
  44. function submitcontroles(){
  45. //vergelijk het totaal aantal met het berekend totaal
  46. var controleAantal = parseInt(document.form1.controleAantal.value);
  47. var totaalAantal = parseInt(document.form1.totaalAantal.value);
  48. if(controleAantal != totaalAantal){
  49. alert("Aantal pakjes komt niet overeen met het berekend totaal!");
  50. event.returnValue = false;
  51. }
  52. //controleer of in elke gebruikte rij het aantal, gewicht en het volume ingevuld is
  53. var count = parseInt(document.form1.aantalRijen.value);
  54. for(var i = 0; i < count; i++){
  55. var tempaantal = eval("document.forms[0].aantal"+i+".value");
  56. var tempgewicht = eval("document.forms[0].gewicht"+i+".value");
  57. var tempvolume = parseFloat(eval("document.forms[0].volume"+i+".value"));
  58. if((tempaantal == "") || (tempgewicht == "") || (tempvolume == -1)){
  59. if(!((tempaantal == "") && (tempgewicht == "") && (tempvolume == -1))){
  60. alert("Niet alles is ingevuld in rij "+(i+1));
  61. event.returnValue = false;
  62. }
  63. }
  64. }
  65. if(document.form1.totaalGewicht.value > 1000) {
  66. alert("Het totaal gewicht mag niet meer bedragen dan 1000kg.");
  67. event.returnValue = false;
  68. }
  69. }
  70. //valideer de gewichtvelden
  71. function valideerGewicht(){
  72. if((event.keyCode < 46) || (event.keyCode > 46 && event.keyCode < 48) || (event.keyCode > 57)) {
  73. alert("Je mag enkel cijfers en een decimale punt ingeven");
  74. event.returnValue = false;
  75. }
  76. }
  77. //meer gewichtveld validatie
  78. function controleerGewicht(naam){
  79. var el = eval("document.form1."+naam);
  80. var test = el.value;
  81. if(test != ""){
  82. //controleren als er een decimale punt in zit
  83. if((x = test.indexOf(".")) != -1){
  84. test1 = parseInt(test.substr(0,x));
  85. test2 = parseInt(test.substr(x+1,test.length-x));
  86. //controleer het gedeelte voor de punt
  87. if((test1 >= 0) && (test1 < 250)){
  88. //controleer het gedeelte na de punt
  89. if((test2 >= 0) && (test2 < 10)){
  90. berekenGewicht();
  91. }
  92. else{
  93. alert("Gelieve maar 1 cijfer achter de komma op te geven!");
  94. event.returnValue = false;
  95. el.focus();
  96. el.select();
  97. }
  98. }
  99. else{
  100. alert("Gelieve een waarde kleiner dan 100 op te geven voor de komma!");
  101. event.returnValue = false;
  102. el.focus();
  103. el.select();
  104. }
  105. }
  106. else{
  107. //indien geen dec. punt, controleer dat gewicht < 100
  108. tmp = parseInt(eval("test"));
  109. if((tmp >= 0) && (tmp < 250)){
  110. berekenGewicht();
  111. }
  112. else{
  113. alert("Gelieve een waarde kleiner dan 250 op te geven!");
  114. event.returnValue = false;
  115. el.focus();
  116. el.select();
  117. }
  118. }
  119. }
  120. }
  121. //bereken het totaal der gewichten
  122. function berekenGewicht(){
  123. var temp;
  124. var x;
  125. var total = 0;
  126. for(i=0;i<10;i++){
  127. x = parseInt(eval("document.form1.aantal"+i+".value"));
  128. temp = parseFloat(eval("document.form1.gewicht"+i+".value"));
  129. if(!isNaN(temp) && !isNaN(x)){
  130. total += (x * temp);
  131. }
  132. }
  133. document.form1.totaalGewicht.value = total;
  134. }
  135. //kijken welke de geselecteerde zetcodes zijn
  136. function selectedCode(){
  137. var selVala;
  138. var selValb;
  139. for(var i = 0; i < document.form1.aanvragerZetcode.length; i++){
  140. if(document.form1.aanvragerZetcode.options[i].selected){
  141. selVala = document.form1.aanvragerZetcode.options[i].value;
  142. break;
  143. }
  144. }
  145. for(var i = 0; i < document.form1.bestemmelingZetcode.length; i++){
  146. if(document.form1.bestemmelingZetcode.options[i].selected){
  147. selValb = document.form1.bestemmelingZetcode.options[i].value;
  148. break;
  149. }
  150. }
  151. window.location="formulier.php?acode="+selVala+"&bcode="+selValb+" ";
  152. }
  153. //zet het aantal ingevulde rijen in een hidden veld
  154. function aantalIngevuld(tekstveld) {
  155. var waarde = tekstveld;
  156. if(waarde.length >= 1) {
  157. document.form1.aantalRijen.value ++;
  158. }
  159. }
  160. //bereken het totaal der volumes
  161. function berekenTotaalVolume() {
  162. var temp;
  163. var x;
  164. var total = 0;
  165. for(var i=0;i<10;i++){
  166. x = parseInt(eval("document.form1.aantal"+i+".value"));
  167. temp = parseFloat(eval("document.form1.volume"+i+".value"));
  168. if((temp != -1) && !isNaN(x)){
  169. total += (x * temp);
  170. }
  171. }
  172. var rlength = 2; // The number of decimal places to round to
  173. var newnumber = Math.round(total*Math.pow(10,rlength))/Math.pow(10,rlength);
  174. document.form1.totaalVolume.value = newnumber;
  175. }
  176. function openTarieven() {
  177. open("PrijzenEnVoorwaarden.php");
  178. }
  179. //-->
  180. </script>
  181. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></head>
  182.  
  183. <body>
  184. <form name="form1" method="GET" action="Factuur.php" onSubmit="submitcontroles()">
  185. <table width="60%" border="1" align="center" >
  186. <tr>
  187. <td><table width="100%" border="0" align="center">
  188. <tr>
  189. <td><div align="center" class="style5">COFETRANS</div></td>
  190. </tr>
  191. </table>
  192. <table width="100%" border="0" align="center">
  193. <tr>
  194. <td width="50%"><div align="center"><span class="style2">Tel : 011/634951</span></div></td>
  195. <td width="50%"><div align="center"><span class="style2">Fax : 011/611681 </span></div></td>
  196. </tr>
  197. <tr>
  198. <td><div align="center"><span class="style2">Code : BE01CRE </span></div></td>
  199. <td><div align="center"><span class="style2">E-mail : Cofetrans@cofep.be</span></div></td>
  200. </tr>
  201. <tr>
  202. <td><div align="center">
  203. <p class="style2">BTW NR : 428.179.774</p>
  204. </div></td>
  205. <td><div align="center"><span class="style2"> REK NR : 000-1988546-46 </span></div></td>
  206. </tr>
  207. <tr>
  208. <td colspan="2"><div align="center"><span class="style1">COFETRANS is een afdeling van CRECOR PEER </span></div></td>
  209. </tr>
  210. </table></td>
  211. </tr>
  212. </table>
  213. <p align="center">&nbsp;</p>
  214.  
  215. <table width="60%" border="1" align="center" >
  216. <tr>
  217. <td>
  218. <table width="100%" border="0" align="center">
  219. <tr>
  220. <td width="26%"><strong><span class="style2">Zet-code aanvrager : </span></strong></td>
  221. <td width="14%"><div align="right"><strong>BE01</strong> </div></td>
  222. <td width="18%">
  223. <select name="aanvragerZetcode" id="aanvragerZetcode" onChange="selectedCode()">
  224. <?php
  225. $sql="select code from formulier order by code";
  226. $acodeRijen = mysql_query($sql) or die("foutieve query");
  227. while ($row = mysql_fetch_row($acodeRijen))
  228. {$code=trim($row[0]);
  229. if ($code==$_GET['acode'])
  230. {echo "<option value= \"".$code."\" selected>".$code."</option>";}
  231. else
  232. {echo "<option value= \"".$code."\">".$code."</option>";}
  233. }
  234. mysql_free_result($acodeRijen);
  235. $sql="select plaats,email from formulier where code = '".$_GET['acode']."'";
  236. $bcodeRijen = mysql_query($sql) or die("foutieve query);
  237. $row = mysql_fetch_row($bcodeRijen)
  238.  
  239. ?>
  240. </select></td>
  241. <td width="42%">&nbsp;</td>
  242. </tr>
  243. </table>
  244. <table width="100%" border="0" align="center">
  245. <tr>
  246. <td width="8%">&nbsp;</td>
  247. <td width="32%"><span class="style1">Stad/Gemeente : </span></td>
  248. <td width="60%"><input name="aanvragerGemeente" value = <?php echo $row[0]; ?> type="text" id="aanvragerGemeente" size="24"></td>
  249. </tr>
  250. <tr>
  251. <td>&nbsp;</td>
  252. <td><span class="style1">E-mail adres : </span></td>
  253. <td><input name="aanvragerEmail" value = <?php echo $row[1]; ?> type="text" id="aanvragerEmail" size="24"></td>
  254. </tr>
  255. </table></td>
  256. </tr>
  257. </table>
  258.  
  259. <p>&nbsp;</p>
  260. <table width="60%" border="1" align="center">
  261. <tr>
  262. <td><table width="100%" border="0" align="center" >
  263. <tr>
  264. <td width="31%"><span class="style1">Zet-code bestemmeling : </span></td>
  265. <td width="9%"><div align="right"><strong>BE01</strong></div></td>
  266. <td width="60%"><select name="bestemmelingZetcode" id="bestemmelingZetcode" onChange="selectedCode()">
  267. <?php
  268. $sql="select code from formulier order by code";
  269. $bcodeRijen = mysql_query($sql) or die("foutieve query");
  270. while ($row = mysql_fetch_row($bcodeRijen))
  271. {$code=trim($row[0]);
  272. if ($code==$_GET['bcode'])
  273. {echo "<option value= \"".$code."\" selected>".$code."</option>";}
  274. else
  275. {echo "<option value= \"".$code."\">".$code."</option>";}
  276. }
  277.  
  278. mysql_free_result($bcodeRijen);
  279. $sql="select plaats,email from formulier where code = '".$_GET['bcode']."'";
  280. $bcodeRijen = mysql_query($sql) or die("foutieve query");
  281. $row = mysql_fetch_row($bcodeRijen)
  282.  
  283. ?>
  284. </select></td>
  285. </tr>
  286. </table>
  287. <table width="100%" border="0" align="center">
  288. <tr>
  289. <td width="8%">&nbsp;</td>
  290. <td width="32%"><span class="style1">Stad/Gemeente : </span></td>
  291. <td width="60%"><input name="bestemmelingGemeente" value = <?php echo $row[0]; ?> type="text" id="bestemmelingGemeente" size="24"></td>
  292. </tr>
  293. <tr>
  294. <td>&nbsp;</td>
  295. <td><span class="style1">E-mail adres : </span></td>
  296. <td><input name="bestemmelingEmail" value = <?php echo $row[1]; ?> type="text" id="bestemmelingEmail" size="24"></td>
  297. </tr>
  298. </table></td>
  299. </tr>
  300. </table>
  301. <p>&nbsp;</p>
  302. <table width="60%" border="1" align="center" bordercolor="#999999">
  303. <tr>
  304. <td><table width="100%" border="0" align="center">
  305. <tr>
  306. <td width="40%"><span class="style1">Nr verzendnota : </span></td>
  307. <td width="60%"><input name="nrverzendnota" type="text" id="nrverzendnota" size="5" maxlength="6" readonly="" value="910"></td>
  308. </tr>
  309. </table>
  310. <table width="100%" border="0" align="center">
  311. <tr>
  312. <td width="40%"><strong><span class="style2">Nr factuur : </span></strong></td>
  313. <td width="60%"><input name="nrfactuur" type="text" id="nrfactuur" size="5" maxlength="6" readonly="" value="910"></td>
  314. </tr>
  315. </table>
  316. <table width="100%" border="0" align="center">
  317. <tr>
  318. <td width="40%"><strong><span class="style2 style2">Datum aanvraag:</span></strong></td>
  319. <td width="60%"><span class="style2">
  320. <select name="aanvraagdag" id="aanvraagdag">
  321. <option value="1">1</option>
  322. <option value="2">2</option>
  323. <option value="3">3</option>
  324. <option value="4">4</option>
  325. <option value="5">5</option>
  326. <option value="6">6</option>
  327. <option value="7">7</option>
  328. <option value="8">8</option>
  329. <option value="9">9</option>
  330. <option value="10">10</option>
  331. <option value="11">11</option>
  332. <option value="12">12</option>
  333. <option value="13">13</option>
  334. <option value="14">14</option>
  335. <option value="15">15</option>
  336. <option value="16">16</option>
  337. <option value="17">17</option>
  338. <option value="18">18</option>
  339. <option value="19">19</option>
  340. <option value="20">20</option>
  341. <option value="21">21</option>
  342. <option value="22">22</option>
  343. <option value="23">23</option>
  344. <option value="24">24</option>
  345. <option value="25">25</option>
  346. <option value="26">26</option>
  347. <option value="27">27</option>
  348. <option value="28">28</option>
  349. <option value="29">29</option>
  350. <option value="30">30</option>
  351. <option value="31">31</option>
  352. </select>
  353. <select name="aanvraagmaand" id="aanvraagmaand">
  354. <option value="Januari">Januari</option>
  355. <option value="Februari">Februari</option>
  356. <option value="Maart">Maart</option>
  357. <option value="April">April</option>
  358. <option value="Mei">Mei</option>
  359. <option value="Juni">Juni</option>
  360. <option value="Juli">Juli</option>
  361. <option value="Augustus">Augustus</option>
  362. <option value="September">September</option>
  363. <option value="Oktober">Oktober</option>
  364. <option value="November">November</option>
  365. <option value="December">December</option>
  366. </select>
  367. <select name="aanvraagjaar" id="aanvraagjaar">
  368.  
  369. <option value="2008">2008</option>
  370. <option value="2009">2009</option>
  371. <option value="2010">2010</option>
  372. <option value="2011">2011</option>
  373. <option value="2012">2012</option>
  374. <option value="2013">2013</option>
  375. <option value="2014">2014</option>
  376. <option value="2015">2015</option>
  377. <option value="2016">2016</option>
  378. <option value="2017">2017</option>
  379. <option value="2018">2018</option>
  380. <option value="2019">2019</option>
  381. <option value="2020">2020</option>
  382. <option value="2020">2021</option>
  383. <option value="2020">2022</option>
  384. <option value="2020">2023</option>
  385. <option value="2020">2024</option>
  386. </select>
  387. </span></td>
  388. </tr>
  389. </table>
  390. <table width="100%" border="0" align="center">
  391. <tr>
  392. <td width="40%"><span class="style1">Gewenste leveringsdatum: </span></td>
  393. <td width="60%"><select name="leveringsdag" id="leveringsdag">
  394. <option value="1">1</option>
  395. <option value="2">2</option>
  396. <option value="3">3</option>
  397. <option value="4">4</option>
  398. <option value="5">5</option>
  399. <option value="6">6</option>
  400. <option value="7">7</option>
  401. <option value="8">8</option>
  402. <option value="9">9</option>
  403. <option value="10">10</option>
  404. <option value="11">11</option>
  405. <option value="12">12</option>
  406. <option value="13">13</option>
  407. <option value="14">14</option>
  408. <option value="15">15</option>
  409. <option value="16">16</option>
  410. <option value="17">17</option>
  411. <option value="18">18</option>
  412. <option value="19">19</option>
  413. <option value="20">20</option>
  414. <option value="21">21</option>
  415. <option value="22">22</option>
  416. <option value="23">23</option>
  417. <option value="24">24</option>
  418. <option value="25">25</option>
  419. <option value="26">26</option>
  420. <option value="27">27</option>
  421. <option value="28">28</option>
  422. <option value="29">29</option>
  423. <option value="30">30</option>
  424. <option value="31">31</option>
  425. </select>
  426. <select name="leveringsmaand" id="leveringsmaand">
  427. <option value="Januari">Januari</option>
  428. <option value="Februari">Februari</option>
  429. <option value="Maart">Maart</option>
  430. <option value="April">April</option>
  431. <option value="Mei">Mei</option>
  432. <option value="Juni">Juni</option>
  433. <option value="Juli">Juli</option>
  434. <option value="Augustus">Augustus</option>
  435. <option value="September">September</option>
  436. <option value="Oktober">Oktober</option>
  437. <option value="November">November</option>
  438. <option value="December">December</option>
  439. </select>
  440. <select name="leveringsjaar" id="leveringsjaar">
  441.  
  442. <option value="2008">2008</option>
  443. <option value="2009">2009</option>
  444. <option value="2010">2010</option>
  445. <option value="2011">2011</option>
  446. <option value="2012">2012</option>
  447. <option value="2013">2013</option>
  448. <option value="2014">2014</option>
  449. <option value="2015">2015</option>
  450. <option value="2016">2016</option>
  451. <option value="2017">2017</option>
  452. <option value="2018">2018</option>
  453. <option value="2019">2019</option>
  454. <option value="2020">2020</option>
  455. <option value="2020">2021</option>
  456. <option value="2020">2022</option>
  457. <option value="2020">2023</option>
  458. <option value="2020">2024</option>
  459. </select></td>
  460. </tr>
  461. </table>
  462. <table width="100%" border="0" align="center">
  463. <tr>
  464. <td width="174"><span class="style1">Aantal pakjes : </span></td>
  465. <td width="265"><input name="controleAantal" type="text" id="controleAantal" onKeyPress="valideerAantal()"></td>
  466. </tr>
  467. </table></td>
  468. </tr>
  469. </table>
  470. <p align="left">&nbsp;</p>
  471. <table width="60%" border="1" align="center" bordercolor="#999999">
  472. <tr>
  473. <td><table width="100%" border="0" align="center">
  474. <tr>
  475. <td width="24%"><strong><span class="style2">Beschrijving :</span></strong></td>
  476. <td width="76%"><div align="center" class="style5">
  477. <input name="aantalRijen" type="hidden" id="aantalRijen">
  478. </div></td>
  479. </tr>
  480. </table>
  481. <table width="100%" border="0" align="center">
  482. <tr>
  483. <td width="26%"><div align="right"><span class="style1">Aantal</span></div></td>
  484. <td width="18%"><div align="right"><span class="style1">Verpakking</span></div></td>
  485. <td width="26%"><div align="right"><span class="style1"><span class="style6">*</span>Gewicht/Pak (in kg)</span></div></td>
  486. <td width="30%"><div align="right"><span class="style1"><span class="style6">**</span>Volume/Pak (in m&sup3;)</span></div></td>
  487. </tr>
  488. <tr>
  489. <td><div align="right">
  490. <input name="aantal0" type="text" id="aantal0" onBlur="berekenAantal();aantalIngevuld(this.value)" onKeyPress="valideerAantal()" size="10" maxlength="3">
  491. </div></td>
  492. <td><div align="right">
  493. <select name="verpakking0" id="verpakking0">
  494. <option value="Karton">Karton</option>
  495. <option value="Pallet">Pallet</option>
  496. <option value="Plastiek">Plastiek</option>
  497. </select>
  498. </div></td>
  499. <td><div align="right">
  500. <input name="gewicht0" type="text" id="gewicht0" onBlur="controleerGewicht(this.name)" onKeyPress="valideerGewicht()" size="8" maxlength="5">
  501. </div></td>
  502. <td><div align="right">
  503. <select name="volume0" id="volume0" onChange="berekenTotaalVolume()">
  504. <option value="-1" selected></option>
  505. <option value="0.1">0.1</option>
  506. <option value="0.2">0.2</option>
  507. <option value="0.3">0.3</option>
  508. <option value="0.4">0.4</option>
  509. <option value="0.5">0.5</option>
  510. <option value="0.6">0.6</option>
  511. <option value="0.7">0.7</option>
  512. <option value="0.8">0.8</option>
  513. <option value="0.9">0.9</option>
  514. <option value="1.0">1.0</option>
  515. </select>
  516. </div></td>
  517. </tr>
  518. <tr>
  519. <td><div align="right">
  520. <input name="aantal1" type="text" id="aantal1" onBlur="berekenAantal();aantalIngevuld(this.value)" onKeyPress="valideerAantal()" size="10" maxlength="3">
  521. </div></td>
  522. <td><div align="right">
  523. <select name="verpakking1" id="verpakking1">
  524. <option value="Karton">Karton</option>
  525. <option value="Pallet">Pallet</option>
  526. <option value="Plastiek">Plastiek</option>
  527. </select>
  528. </div></td>
  529. <td><div align="right">
  530. <input name="gewicht1" type="text" id="gewicht1" onBlur="controleerGewicht(this.name)" onKeyPress="valideerGewicht()" size="8" maxlength="5">
  531. </div></td>
  532. <td><div align="right">
  533. <select name="volume1" id="volume1" onChange="berekenTotaalVolume()">
  534. <option value="-1" selected></option>
  535. <option value="0.1">0.1</option>
  536. <option value="0.2">0.2</option>
  537. <option value="0.3">0.3</option>
  538. <option value="0.4">0.4</option>
  539. <option value="0.5">0.5</option>
  540. <option value="0.6">0.6</option>
  541. <option value="0.7">0.7</option>
  542. <option value="0.8">0.8</option>
  543. <option value="0.9">0.9</option>
  544. <option value="1.0">1.0</option>
  545. </select>
  546. </div></td>
  547. </tr>
  548. <tr>
  549. <td><div align="right">
  550. <input name="aantal2" type="text" id="aantal2" onBlur="berekenAantal();aantalIngevuld(this.value)" onKeyPress="valideerAantal()" size="10" maxlength="3">
  551. </div></td>
  552. <td><div align="right">
  553. <select name="verpakking2" id="verpakking2">
  554. <option value="Karton">Karton</option>
  555. <option value="Pallet">Pallet</option>
  556. <option value="Plastiek">Plastiek</option>
  557. </select>
  558. </div></td>
  559. <td><div align="right">
  560. <input name="gewicht2" type="text" id="gewicht2" onBlur="controleerGewicht(this.name)" onKeyPress="valideerGewicht()" size="8" maxlength="5">
  561. </div></td>
  562. <td><div align="right">
  563. <select name="volume2" id="volume2" onChange="berekenTotaalVolume()">
  564. <option value="-1" selected></option>
  565. <option value="0.1">0.1</option>
  566. <option value="0.2">0.2</option>
  567. <option value="0.3">0.3</option>
  568. <option value="0.4">0.4</option>
  569. <option value="0.5">0.5</option>
  570. <option value="0.6">0.6</option>
  571. <option value="0.7">0.7</option>
  572. <option value="0.8">0.8</option>
  573. <option value="0.9">0.9</option>
  574. <option value="1.0">1.0</option>
  575. </select>
  576. </div></td>
  577. </tr>
  578. <tr>
  579. <td><div align="right">
  580. <input name="aantal3" type="text" id="aantal3" onBlur="berekenAantal();aantalIngevuld(this.value)" onKeyPress="valideerAantal()" size="10" maxlength="3">
  581. </div></td>
  582. <td><div align="right">
  583. <select name="verpakking3" id="verpakking3">
  584. <option value="Karton">Karton</option>
  585. <option value="Pallet">Pallet</option>
  586. <option value="Plastiek">Plastiek</option>
  587. </select>
  588. </div></td>
  589. <td><div align="right">
  590. <input name="gewicht3" type="text" id="gewicht3" onBlur="controleerGewicht(this.name)" onKeyPress="valideerGewicht()" size="8" maxlength="5">
  591. </div></td>
  592. <td><div align="right">
  593. <select name="volume3" id="volume3" onChange="berekenTotaalVolume()">
  594. <option value="-1" selected></option>
  595. <option value="0.1">0.1</option>
  596. <option value="0.2">0.2</option>
  597. <option value="0.3">0.3</option>
  598. <option value="0.4">0.4</option>
  599. <option value="0.5">0.5</option>
  600. <option value="0.6">0.6</option>
  601. <option value="0.7">0.7</option>
  602. <option value="0.8">0.8</option>
  603. <option value="0.9">0.9</option>
  604. <option value="1.0">1.0</option>
  605. </select>
  606. </div></td>
  607. </tr>
  608. <tr>
  609. <td><div align="right">
  610. <input name="aantal4" type="text" id="aantal4" onBlur="berekenAantal();aantalIngevuld(this.value)" onKeyPress="valideerAantal()" size="10" maxlength="3">
  611. </div></td>
  612. <td><div align="right">
  613. <select name="verpakking4" id="verpakking4">
  614. <option value="Karton">Karton</option>
  615. <option value="Pallet">Pallet</option>
  616. <option value="Plastiek">Plastiek</option>
  617. </select>
  618. </div></td>
  619. <td><div align="right">
  620. <input name="gewicht4" type="text" id="gewicht4" onBlur="controleerGewicht(this.name)" onKeyPress="valideerGewicht()" size="8" maxlength="5">
  621. </div></td>
  622. <td><div align="right">
  623. <select name="volume4" id="volume4" onChange="berekenTotaalVolume()">
  624. <option value="-1" selected></option>
  625. <option value="0.1">0.1</option>
  626. <option value="0.2">0.2</option>
  627. <option value="0.3">0.3</option>
  628. <option value="0.4">0.4</option>
  629. <option value="0.5">0.5</option>
  630. <option value="0.6">0.6</option>
  631. <option value="0.7">0.7</option>
  632. <option value="0.8">0.8</option>
  633. <option value="0.9">0.9</option>
  634. <option value="1.0">1.0</option>
  635. </select>
  636. </div></td>
  637. </tr>
  638. <tr>
  639. <td><div align="right">
  640. <input name="aantal5" type="text" id="aantal5" onBlur="berekenAantal();aantalIngevuld(this.value)" onKeyPress="valideerAantal()" size="10" maxlength="3">
  641. </div></td>
  642. <td><div align="right">
  643. <select name="verpakking5" id="verpakking5">
  644. <option value="Karton">Karton</option>
  645. <option value="Pallet">Pallet</option>
  646. <option value="Plastiek">Plastiek</option>
  647. </select>
  648. </div></td>
  649. <td><div align="right">
  650. <input name="gewicht5" type="text" id="gewicht5" onBlur="controleerGewicht(this.name)" onKeyPress="valideerGewicht()" size="8" maxlength="5">
  651. </div></td>
  652. <td><div align="right">
  653. <select name="volume5" id="volume5" onChange="berekenTotaalVolume()">
  654. <option value="-1" selected></option>
  655. <option value="0.1">0.1</option>
  656. <option value="0.2">0.2</option>
  657. <option value="0.3">0.3</option>
  658. <option value="0.4">0.4</option>
  659. <option value="0.5">0.5</option>
  660. <option value="0.6">0.6</option>
  661. <option value="0.7">0.7</option>
  662. <option value="0.8">0.8</option>
  663. <option value="0.9">0.9</option>
  664. <option value="1.0">1.0</option>
  665. </select>
  666. </div></td>
  667. </tr>
  668. <tr>
  669. <td><div align="right">
  670. <input name="aantal6" type="text" id="aantal6" onBlur="berekenAantal();aantalIngevuld(this.value)" onKeyPress="valideerAantal()" size="10" maxlength="3">
  671. </div></td>
  672. <td><div align="right">
  673. <select name="verpakking6" id="verpakking6">
  674. <option value="Karton">Karton</option>
  675. <option value="Pallet">Pallet</option>
  676. <option value="Plastiek">Plastiek</option>
  677. </select>
  678. </div></td>
  679. <td><div align="right">
  680. <input name="gewicht6" type="text" id="gewicht6" onBlur="controleerGewicht(this.name)" onKeyPress="valideerGewicht()" size="8" maxlength="5">
  681. </div></td>
  682. <td><div align="right">
  683. <select name="volume6" id="volume6" onChange="berekenTotaalVolume()">
  684. <option value="-1" selected></option>
  685. <option value="0.1">0.1</option>
  686. <option value="0.2">0.2</option>
  687. <option value="0.3">0.3</option>
  688. <option value="0.4">0.4</option>
  689. <option value="0.5">0.5</option>
  690. <option value="0.6">0.6</option>
  691. <option value="0.7">0.7</option>
  692. <option value="0.8">0.8</option>
  693. <option value="0.9">0.9</option>
  694. <option value="1.0">1.0</option>
  695. </select>
  696. </div></td>
  697. </tr>
  698. <tr>
  699. <td><div align="right">
  700. <input name="aantal7" type="text" id="aantal7" onBlur="berekenAantal();aantalIngevuld(this.value)" onKeyPress="valideerAantal()" size="10" maxlength="3">
  701. </div></td>
  702. <td><div align="right">
  703. <select name="verpakking7" id="verpakking7">
  704. <option value="Karton">Karton</option>
  705. <option value="Pallet">Pallet</option>
  706. <option value="Plastiek">Plastiek</option>
  707. </select>
  708. </div></td>
  709. <td><div align="right">
  710. <input name="gewicht7" type="text" id="gewicht7" onBlur="controleerGewicht(this.name)" onKeyPress="valideerGewicht()" size="8" maxlength="5">
  711. </div></td>
  712. <td><div align="right">
  713. <select name="volume7" id="volume7" onChange="berekenTotaalVolume()">
  714. <option value="-1" selected></option>
  715. <option value="0.1">0.1</option>
  716. <option value="0.2">0.2</option>
  717. <option value="0.3">0.3</option>
  718. <option value="0.4">0.4</option>
  719. <option value="0.5">0.5</option>
  720. <option value="0.6">0.6</option>
  721. <option value="0.7">0.7</option>
  722. <option value="0.8">0.8</option>
  723. <option value="0.9">0.9</option>
  724. <option value="1.0">1.0</option>
  725. </select>
  726. </div></td>
  727. </tr>
  728. <tr>
  729. <td><div align="right">
  730. <input name="aantal8" type="text" id="aantal8" onBlur="berekenAantal();aantalIngevuld(this.value)" onKeyPress="valideerAantal()" size="10" maxlength="3">
  731. </div></td>
  732. <td><div align="right">
  733. <select name="verpakking8" id="verpakking8">
  734. <option value="Karton">Karton</option>
  735. <option value="Pallet">Pallet</option>
  736. <option value="Plastiek">Plastiek</option>
  737. </select>
  738. </div></td>
  739. <td><div align="right">
  740. <input name="gewicht8" type="text" id="gewicht8" onBlur="controleerGewicht(this.name)" onKeyPress="valideerGewicht()" size="8" maxlength="5">
  741. </div></td>
  742. <td><div align="right">
  743. <select name="volume8" id="volume8" onChange="berekenTotaalVolume()">
  744. <option value="-1" selected></option>
  745. <option value="0.1">0.1</option>
  746. <option value="0.2">0.2</option>
  747. <option value="0.3">0.3</option>
  748. <option value="0.4">0.4</option>
  749. <option value="0.5">0.5</option>
  750. <option value="0.6">0.6</option>
  751. <option value="0.7">0.7</option>
  752. <option value="0.8">0.8</option>
  753. <option value="0.9">0.9</option>
  754. <option value="1.0">1.0</option>
  755. </select>
  756. </div></td>
  757. </tr>
  758. <tr>
  759. <td><div align="right">
  760. <input name="aantal9" type="text" id="aantal9" onBlur="berekenAantal();aantalIngevuld(this.value)" onKeyPress="valideerAantal()" size="10" maxlength="3">
  761. </div></td>
  762. <td><div align="right">
  763. <select name="verpakking9" id="verpakking9">
  764. <option value="Karton">Karton</option>
  765. <option value="Pallet">Pallet</option>
  766. <option value="Plastiek">Plastiek</option>
  767. </select>
  768. </div></td>
  769. <td><div align="right">
  770. <input name="gewicht9" type="text" id="gewicht9" onBlur="controleerGewicht(this.name)" onKeyPress="valideerGewicht()" size="8" maxlength="5">
  771. </div></td>
  772. <td><div align="right">
  773. <select name="volume9" id="volume9" onChange="berekenTotaalVolume()">
  774. <option value="-1" selected></option>
  775. <option value="0.1">0.1</option>
  776. <option value="0.2">0.2</option>
  777. <option value="0.3">0.3</option>
  778. <option value="0.4">0.4</option>
  779. <option value="0.5">0.5</option>
  780. <option value="0.6">0.6</option>
  781. <option value="0.7">0.7</option>
  782. <option value="0.8">0.8</option>
  783. <option value="0.9">0.9</option>
  784. <option value="1.0">1.0</option>
  785. </select>
  786. </div></td>
  787. </tr>
  788. <tr>
  789. <td><div align="right"> <span class="style1">Totaal:</span>
  790. <input name="totaalAantal" type="text" id="totaalAantal" size="10" readonly="">
  791. </div></td>
  792. <td><div align="right" class="style1"></div></td>
  793. <td><div align="right"> <span class="style1">Totaal:</span>
  794. <input name="totaalGewicht" type="text" size="8" maxlength="4" readonly="">
  795. </div></td>
  796. <td><div align="right"> <span class="style1">Totaal :</span>
  797. <input name="totaalVolume" type="text" size="8" readonly="">
  798. </div></td>
  799. </tr>
  800. </table>
  801. <p class="style8">* Een collo vanaf een gewicht van 50 kg wordt beschouwd als een pallet </p>
  802. <p class="style8">** Volumeco&euml;ffici&euml;nt van toepassing: 250 kg = 1 m&sup3;</p>
  803. <table width="100%" border="0" align="center">
  804. <tr>
  805. <td><div align="center">
  806. <input name="Maak een factuur" type="submit" id="Maak een factuur" value="Maak een factuur">
  807. <input type="button" name="Button" value="Bekijk Tarieven" onClick="openTarieven()">
  808. </div></td>
  809. </tr>
  810. </table>
  811. </td>
  812. </tr>
  813. </table>
  814. </form>
  815. </body>
  816. </html>

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Code (opmaak factuur)
factuur.php
  1. <html>
  2. <head>
  3. <title>Factuur</title>
  4. <style type="text/css">
  5. .style1 {
  6. font-size: 12px;
  7. font-weight: bold;
  8. }
  9. .style3 {font-size: 10px}
  10. .style4 {font-size: 12px}
  11. </style>
  12. </head>
  13. <body>
  14. <form name="form1" method="post" action="mailto:cofep@cofep.be" enctype="text/plain">
  15. <table width="62%" border="1" align="center" bordercolor="#FF0000"><tr><td><table width="100%" border="0" align="center"><td align="center"><span class="style8"><b>De factuur is pas definitief als u op verzenden klikt!</b></span></td></tr></table></td></tr></table><p>&nbsp;</p><table width="62%" border="1" align="center" bordercolor="#FF0000"><tr><td><table width="100%" border="0" align="center"><tr><td width="50%"><span class="style1">Gegevens aanvrager : </span></td><td width="50%"><span class="style1">Datum aanvraag : </span></td><tr><tr>
  16. <td>&nbsp;</td>
  17. <td>&nbsp;</td>
  18. </tr><tr>
  19. <td>&nbsp;</td>
  20. <td><span class="style1">Gewenste leveringsdatum : </span></td></tr><tr>
  21. <td>&nbsp;</td>
  22. <td>&nbsp;</td>
  23. </tr><tr><td>&nbsp;</td><td>&nbsp;</td></tr><tr><td><span class="style1">Gegevens bestemmeling : </span></td><td><span class="style1">Nr verzendnota : </span></td></tr><tr>
  24. <td>&nbsp;</td>
  25. <td>&nbsp;</td>
  26. </tr><tr>
  27. <td>&nbsp;</td>
  28. <td><span class="style1">Nr factuur : </span></td></tr><tr>
  29. <td height="16">&nbsp;</td>
  30. <td>&nbsp;</td>
  31. </tr></table></td></tr></table><p>&nbsp;</p><table width="62%" border="1" align="center" bordercolor="#FF0000">
  32. <tr><td height="49"><table width="100%" border="0" align="center"><tr><td width="81"><div align="center" class="style1"><div align="left">Aantal : </div></div></td><td width="105"><div align="center" class="style1"><div align="left">Verpakking : </div></div></td><td width="130"><div align="center" class="style1"><div align="left">Gewicht/pak (in kg) : </div></div></td><td width="130"><div align="center" class="style1"><div align="left">Volume/pak(in m&sup3;) : </div></div></td></tr><tr>
  33. <td>&nbsp;</td>
  34. <td>&nbsp;</td>
  35. <td>&nbsp;</td>
  36. <td>&nbsp;</td>
  37. </tr></table></td></tr></table>
  38. <p>&nbsp;</p><table width="62%" border="1" align="center" bordercolor="#FF0000"><tr><td><table width="100%" border="0" align="center"><tr><td width="25%"><div align="left"><span class="style1">Totaal aantal : </span></div></td>
  39. <td width="75%">&nbsp;</td>
  40. </tr><tr><td><span class="style1">Totaal gewicht : </span></td>
  41. <td>&nbsp;</td>
  42. </tr><tr><td><span class="style1">Totaal volume : </span></td>
  43. <td>&nbsp;</td>
  44. </tr><tr><td><span class="style1">Totale prijs: </span></td>
  45. <td>&nbsp;</td>
  46. </tr></table></td></tr></table>
  47. <p align="center"><input name="verzend" type="submit" value="Verzenden"></p>
  48. </form>
  49.  
  50. </body>
  51. </html>

1 antwoord

Gesponsorde links
Offline compudoc - 13/03/2008 16:12
Avatar van compudoc PHP beginner en wat gebeurt er nu dan wel of juist niet?
en je kan beter zulke lange code op plaatscode zetten of anders code tags erom heen [code ] en [/ code] (zonder spaties normaal)
Gesponsorde links
Dit onderwerp is gesloten.
Actieve forumberichten
© 2002-2024 Sitemasters.be - Regels - Laadtijd: 0.213s