
<script type="text/javascript" src="../css/jquery.min.js"></script>
<link rel="stylesheet" type="text/css" href="../css/wizard.css" />
<script language="javascript" type="text/javascript" >
<!--
function confirmRefresh() {
var okToRefresh = confirm("Do you really want to cancel this entry?");
var url='showAllProducts.php?cat=Tiles and Accessories&productSelect=All&colorSelect=All'
if (okToRefresh)
	{
			window.location=url;
	}
}
// -->
</script>
<script language="JavaScript">
var needToConfirm = true;
  window.onbeforeunload = confirmExit;
   function confirmExit()
  {
    if (needToConfirm)
      return "You did not finish the wizard.\nIf you leave now your data will not be saved.";
  }
function MM_callJS(jsStr) { //v2.0
  return eval(jsStr)
}
function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}
</script>

<form id="feedbackform" method="get" action="outWiz6.php" >
      <table width=595 border="0" align="center" cellpadding="10" cellspacing="0" bordercolor="#0066FF" border-collapse="collapse">
          <tr>
            <td width="525" ><table width="575" align="center" id="tableResume" >
              <tr>
    <td width="119" align="left" valign="top"><span class="wizard">Delivery for:</span></td>
    <td width="180" align="left" valign="top"><strong><span class="wizard"><?php echo $_SESSION['CustomerNameText'] ?></span></strong></td>
    <td width="109" align="left" valign="top">Order No</td>
    <td width="164" align="left" valign="top"><?php echo $_SESSION['OrderNoText'] ?></td>
  </tr>
              <tr>
                <td align="left" valign="top">Delivery date:</td>
                <td colspan="2" align="left" valign="top"><?php echo date("d-m-Y", strtotime( $_SESSION['DeliveryDateText'] ))?></td>
                <td align="left" valign="top">&nbsp;</td>
              </tr>
              <tr>
                <td align="left" valign="top"><?php if ($_SESSION['delColText']=="C") {echo "Collect by";} if ($_SESSION['delColText']=="D") {echo "Deliver to";}?></td>
                <td colspan="2" align="left" valign="top"><?php echo $_SESSION['DeliverText1'] ?></td>
                <td align="left" valign="top">&nbsp;</td>
              </tr>
              <tr>
    <td align="left" valign="top"><span class="wizard">Delivery Address:</span></td>
    <td colspan="3" align="left" valign="top"><strong><span class="wizard"><?php echo $_SESSION['DeliverText2']?> <?php echo ", &nbsp;&nbsp;" ?>  <?php  echo $_SESSION['DeliverText3'] ?>
    </span></strong></td>
    </tr>
  <tr>
    <td align="left" valign="top">Cell:</td>
    <td align="left" valign="top"><?php echo $_SESSION['contactText'] ?></td>
    <td align="left" valign="top">&nbsp;</td>
    <td align="left" valign="top">&nbsp;</td>
  </tr>
  <tr>
    <td align="left" valign="top">Transporter:</td>
    <td align="left" valign="top"><?php echo $_SESSION['TransporterText'] ?></td>
    <td align="left" valign="top">Reg.No</td>
    <td align="left" valign="top"><?php echo $_SESSION['RegNoText'] ?></td>
  </tr>
  <tr>
    <td align="left" valign="top">Remarks</td>
    <td colspan="2" align="left" valign="top"><?php echo $_SESSION['RemarksText'] ?></td>
    <td align="left" valign="top">&nbsp;</td>
  </tr>
     </table>
              <br />
              <table width="575" align="center" id="tableResume" >
               <?php
			     $AllTotalText='0';
	             $i=0;
	            // $l=$_SESSION['line_no'];
	             While ($i < $_SESSION['orderNum'] ) {
					 if ($_SESSION['QuantityText'.$i]!=0) {?>
                 <tr>
                  <td width="58"><?php  echo $_SESSION['QuantityText'.$i] ?></td>
                  <td width="222" align="left"><?php echo $_SESSION['ProductNameText'.$i]; ?></td>
                  <td width="110" align="right"><?php  echo $_SESSION['PriceText'.$i] ?></td>
                  <td width="165" align="right"><?php  $TotalText =$_SESSION['QuantityText'.$i] * $_SESSION['PriceText'.$i];
				      echo number_format($TotalText , 2, '.', ', ')  ?><?php $AllTotalText = $AllTotalText + $TotalText; ?></td>
                </tr>
                 <?php 
					 }
	               $i++;
	               } ?>
                 <?php if ($_SESSION['PalletsText']!=0) {?> 
                 <tr>
                 <td width="58"><?php  echo $_SESSION['PalletsText'] ?></td>
                  <td width="222" align="left">Wooden pallets</td>
                  <td width="110" align="right"><?php  echo $_SESSION['PalletsPriceText'] ?></td>
                  <td width="165" align="right"><?php  $PalletsTotalText =$_SESSION['PalletsText'] * $_SESSION['PalletsPriceText']; echo number_format($PalletsTotalText , 2, '.', ', '); $AllTotalText = $AllTotalText + $PalletsTotalText; }?></td>
			    </tr>
                 <tr>
                   <td colspan="3" align="right">Sub total:&nbsp;&nbsp;</td>
                   <td align="right"><?php echo  number_format($AllTotalText , 2, '.', ', ')  ?></td>
                 </tr>
                 <tr>
                   <td colspan="3" align="right">VAT @ 12%</td>
                   <td align="right"><?php $VATText=$AllTotalText*0.12;  echo number_format($VATText , 2, '.', ', ') ?> </td>
                 </tr>
                 <tr>
                   <td colspan="3" align="right">Total</td>
                   <td align="right"><?php $grand_total = $AllTotalText+$VATText; echo number_format($grand_total , 2, '.', ', ') ?> </td>
                 </tr>
               
                   
              </table>
            <p class="wizard">
              <input name="s" type="hidden" id="s" value="5" />
              <input name="p" type="hidden" id="p" value="5" />
              <label class="std">If you want to make changes use the 'Prev' button to go back. <br />
                Click 'New' to make a new entry or to finish the wizard click 'Finish'.</label>
            </p>
            </td>
            
          </tr>
          <tr>
            <td>
              <table width="590" height="50" align="center" id="tableButtonBar">
                <tr>
                  <td width="117"><input type="button" name="lastprev_button" class="imagebutton" value="Prev" onclick="needToConfirm = false;MM_goToURL('parent','outWizbase.php?s=6&amp;p=3');return document.MM_returnValue" /></td>
                  <td width="115">&nbsp;</td>
                  <td width="99"><input name="cancelbutton" type="button" class="imagebutton" id="cancelbutton" onclick="javascript:confirmRefresh(); needToConfirm = false;" value="Cancel" /></td>
                  <td width="125"><input type="submit" name="new_button" class="imagebutton" id="new_button" value="New" onclick="needToConfirm = false; " /></td>
                  <td width="110"><input  name="finish_button" type="submit" class="imagebutton" id="finish_button" value="Finish" onclick="needToConfirm = false; "  /></td>
                </tr>
              </table></td>
          </tr>
        </table>
  </table>
 
</form>

