HEX
Server: Microsoft-IIS/8.5
System: Windows NT YDAWBH120 6.3 build 9600 (Windows Server 2012 R2 Standard Edition) AMD64
User: tentjecom_web (0)
PHP: 7.4.14
Disabled: NONE
Upload Files
File: D:/HostingSpaces/SBogers10/molen.komma.pro/wwwroot/kms/bestelling_factuur.php
<?php

//ini_set('display_errors',1);
//error_reporting(E_ALL);

include("../all_kms_con.inc.php");


$order_id = $_GET['order_id'];
$order_id = checkData($order_id);

$q_nieuws = "SELECT kms_orders.order_id, kms_orders.ordernummer, kms_orders.bedrijfsnaam, kms_orders.voornaam, kms_orders.tussenvoegsel, kms_orders.achternaam, kms_orders.geslacht, 
kms_orders.emailadres, kms_orders.telefoonnummer, kms_orders.straatnaam, kms_orders.huisnummer, kms_orders.toevoeging, kms_orders.postcode, kms_orders.woonplaats, kms_orders.land, 
kms_orders.bezorgadresWijktAf, kms_orders.bedrijfsnaamBezorg, kms_orders.voornaamBezorg, kms_orders.tussenvoegselBezorg, kms_orders.achternaamBezorg, kms_orders.geslachtBezorg, 
kms_orders.straatnaamBezorg, kms_orders.huisnummerBezorg, kms_orders.toevoegingBezorg, kms_orders.postcodeBezorg, kms_orders.woonplaatsBezorg, kms_orders.landBezorg, kms_orders.subtotaalprijs, kms_orders.verzendkosten,
kms_orders.totaalprijs, kms_orders.verzendwijze, kms_orders.betaald, kms_orders.status, kms_orders.afleverdatum, kms_orders.datum, kms_orders.tijd FROM kms_orders WHERE kms_orders.order_id = '".$order_id."'";

$r_nieuws = mysql_query($q_nieuws);
$rec_nieuws = mysql_fetch_assoc($r_nieuws);

?>
    
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Factuur <?php echo(html_entity_decode($rec_nieuws['ordernummer'])); ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="author" content="Komma, (c) Komma Mediadesign, 2011. All Rights Reserved." />
<link rel="shortcut icon" href="img/favicon.ico" type="image/x-icon" />
<meta name="language" content="Nederlands" />
<meta name="date" content="<?php echo(date("D, d M Y G:i:s")." CET"); ?>" />
<link href="css-js/kms_factuur_pakbon.css" rel="stylesheet" type="text/css" />
    <link href="css-js/kms_factuur_pakbon.css" rel="stylesheet" type="text/css" media="print" />

</head>

<body>

<div id="bonContent">
<div class="columnLeft">

	<h1>FACTUUR</h1>
    <div class="datum">
		<strong>Datum:</strong> <span><?php echo(date_dutch($rec_nieuws['datum'])); ?></span>
        <br /><strong>Factuurnummer:</strong> <span><?php echo(html_entity_decode($rec_nieuws['ordernummer'])); ?></span>
    </div>    
	<br /><br /><br />


    <?php if($rec_nieuws['bezorgadresWijktAf'] == "yes"){ ?>
        <strong>Bezorgadres:</strong><br />
        <?php if(!empty($rec_nieuws['bedrijfsnaamBezorg'])){ echo(html_entity_decode($rec_nieuws['bedrijfsnaamBezorg'])); ?><br /><?php } ?>
        <?php if($rec_nieuws['geslachtBezorg'] == "man"){ echo("Dhr. "); }else{ echo("Mevr. "); } echo(html_entity_decode($rec_nieuws['voornaamBezorg'])." "); if(!empty($rec_nieuws['tussenvoegselBezorg'])){ echo(html_entity_decode($rec_nieuws['tussenvoegselBezorg']." ")); } echo(html_entity_decode($rec_nieuws['achternaamBezorg'])); ?><br />
        <?php echo(html_entity_decode($rec_nieuws['straatnaamBezorg']." ")); echo(html_entity_decode($rec_nieuws['huisnummerBezorg'])); echo(html_entity_decode($rec_nieuws['toevoegingBezorg'])); ?><br />
        <?php echo(html_entity_decode($rec_nieuws['postcodeBezorg']." ")); echo(html_entity_decode($rec_nieuws['woonplaatsBezorg'])); ?><br />
        <?php echo(html_entity_decode($rec_nieuws['landBezorg'])); ?><br /><br />
    <?php } ?>
    </div>
    
    <div class="columnRight">
            <?php if(!empty($rec_nieuws['bedrijfsnaam'])){ echo(html_entity_decode($rec_nieuws['bedrijfsnaam'])); ?><br /><?php } ?>
            <?php if($rec_nieuws['geslacht'] == "man"){ echo("Dhr. "); }else{ echo("Mevr. "); } echo(html_entity_decode($rec_nieuws['voornaam'])." "); if(!empty($rec_nieuws['tussenvoegsel'])){ echo(html_entity_decode($rec_nieuws['tussenvoegsel']." ")); } echo(html_entity_decode($rec_nieuws['achternaam'])); ?><br /><br />
            <?php echo(html_entity_decode($rec_nieuws['straatnaam']." ")); echo(html_entity_decode($rec_nieuws['huisnummer'])); echo(html_entity_decode($rec_nieuws['toevoeging']));?><br />
            <?php echo(html_entity_decode($rec_nieuws['postcode']." ")); echo(html_entity_decode($rec_nieuws['woonplaats'])); ?><br />
            <?php echo(html_entity_decode($rec_nieuws['land'])); ?>

    </div>
    
    <div class="clear_both"></div>

<br /><br />

<h2>De door u bestelde artikelen:</h2>

<table cellpadding="20" cellspacing="0" border="0">
    <tr height="40">
        <th width="350" style="padding-left:10px;">Omschrijving</th>
        <th width="140">Artikelnr</th>
        <th width="140">Aantal</th>
        <th width="110">Prijs incl. BTW</th>
    </tr>

<?php	
	$q_order_articles = "SELECT kms_orders_articles.article_id, kms_orders_articles.naam, kms_orders_articles.artikelnummer, kms_orders_articles.categorie_id, kms_orders_articles.prijs, kms_orders_articles.gewicht, kms_orders_articles.order_aantal FROM kms_orders_articles WHERE kms_orders_articles.order_id = '".$order_id."' ORDER BY kms_orders_articles.naam ASC";

	$r_order_articles = mysql_query($q_order_articles);
	
	$kleur = true;
	
	while($rec_order_articles = mysql_fetch_assoc($r_order_articles)){ ?>
        <tr height="40" <?php if($kleur) { echo("class=\"kleur\""); $kleur = false; }else{ $kleur = true; }?>>

            <td style="padding-left:10px;"><?php echo(html_entity_decode($rec_order_articles['naam'])); ?> (<?php echo(html_entity_decode($rec_order_articles['gewicht'])); ?> kg)</td>
            
            <td><?php echo(html_entity_decode($rec_order_articles['artikelnummer'])); ?></td>

            <td><?php echo(html_entity_decode($rec_order_articles['order_aantal'])); ?></td>

            <td class="prijs">&euro; <?php echo(number_format(($rec_order_articles['prijs'] * $rec_order_articles['order_aantal']), 2, ',', '')); ?></td>

        </tr>
<?php } ?>

    <tr><td colspan="4">&nbsp;</td></tr>
    <tr><td colspan="4">&nbsp;</td></tr>
    <tr><td colspan="4">&nbsp;</td></tr>
    <tr style="height:18px;">
        <td colspan="2">&nbsp;</td>
        <td><strong>Subtotaal</strong></td>
        <td class="prijs"><?php echo("&euro; ".html_entity_decode(str_replace('.',',',formatPrice($rec_nieuws['subtotaalprijs'])))); ?></td>
    </tr>
    <tr style="height:18px;">
        <td colspan="2">&nbsp;</td>
        <td><strong>Verzendkosten</strong></td>
        <td class="prijs"><?php echo("&euro; ".html_entity_decode(str_replace('.',',',formatPrice($rec_nieuws['verzendkosten'])))); ?></td>
    </tr>
    <tr><td colspan="4">&nbsp;</td></tr>
    <tr><td colspan="4">&nbsp;</td></tr>
    <tr style="height:18px;">
        <td colspan="2">&nbsp;</td>
        <td><strong>Totaal incl. BTW</strong></td>
        <td class="prijs"><strong><?php echo("&euro; ".html_entity_decode(str_replace('.',',',formatPrice($rec_nieuws['totaalprijs'])))); ?></strong</td>
    </tr>
    <tr style="height:18px;">
        <td colspan="2">&nbsp;</td>
        <td>BTW Laag</td>
        <td class="prijs"><?php
            $btw = $rec_nieuws['totaalprijs'] - ($rec_nieuws['totaalprijs'] / 1.06);
            $btw = number_format($btw, 2, '.', '');
            echo("&euro; ".html_entity_decode(str_replace('.',',',formatPrice($btw)))); ?>
        </td>
    </tr>
    <tr><td colspan="4">&nbsp;</td></tr>
    <tr><td colspan="4">&nbsp;</td></tr>
    <tr>
        <td colspan="2">&nbsp;</td>
        <td colspan="2"><strong>Het bedrag is reeds betaald</strong></td>

    </tr>

</table>

</div>
</body>
</html>