<?php

// typicalfirstinvoice.tpl
// -----------------------------------------------------------------------------
// TypicalFirstInvoice template
//
// Revision   > $Rev: 77 $
// Date		  > $Date: 2009-06-17 16:45:34 +0100 (Wed, 17 Jun 2009) $
// Author     > RAK for DML
// Copyright  > (C) Digital Mail Limited (2005-2009)
// -----------------------------------------------------------------------------

?>

<!--------------------------->
<!-- TYPICAL FIRST INVOICE -->
<!--------------------------->

<script language="javascript" type="text/javascript">

// DEFINE INFOTEXT HERE

// CREATE 'PUBLIC' JS INTERFACE FOR COMPONENT
dmx.<?=$comp_name;?> = new Object();
dmx.<?=$comp_name;?>.name  = '<?=$comp_name;?>';
dmx.<?=$comp_name;?>.xclass = 'typicalfirstinvoice';

// -------------------------------------------------------------------------------------------------
// COMPONENT METHODS

dmx.<?=$comp_name;?>.kill = function()
{
	$('<?=$comp_name;?>').empty();
	$('<?=$comp_name;?>').style.display = 'none';
}

</script>

<div class="dmb0" style="<?=$comp_width;?>">
<div class="dmx">
<div class="typicalfirstinvoice">
<div class="<?=$comp_name?>">

<?php if ($showheader && $showborder) : ?>
<h1 class="bordered">
<?php if ($ajax) : ?><a href="#" onclick="<?=$button_func;?>"><img src="<?=$dmx_glib;?>interface/close_15.gif" alt="" width="15" height="15" border="0" class="close"></a><?php endif; ?>
First invoice<?php if (!$err_msg) : ?> for <?=$number;?><?php endif; ?>
</h1>
<?php elseif ($showheader) : ?>
<h1>First invoice for <?=$number;?></h1>
<?php endif; ?>

<?php if ($showborder) : ?>
<div class="border" style="<?=$box_size;?>">
<?php else: ?>
<div style="<?=$box_size;?>">
<?php endif; ?>

<?php if (!$err_msg) : ?>
	
	<?php if ($showpreamble) : ?>
	<?php if ($showheader && $showborder) : ?><h2>How much will it cost?</h2><?php endif; ?>
	<!-- HELPTEXT -->
		<!-- SERVICE GRAPHIC NUMBER, WITH ACTUAL NUMBER INSERTED -->
		<table border="0" cellspacing="0" cellpadding="0" class="sg_num"  style="margin: 5px 10px 10px 0px; float: left;">
		<tr>
			<td><img src="<?=$dmx_glib;?>numbers/butt_32.gif" alt="" width="12" height="32" border="0" align="middle"></td>
			<td class="mid"><?=$sg_num;?></td>
			<td><img src="<?=$dmx_glib;?>numbers/<?=$sg_service;?>_cap_32.gif" alt="" width="56" height="32" border="0" align="middle"></td>
		</tr>
		</table>
		<!-- END SERVICE GRAPHIC NUMBER, WITH ACTUAL NUMBER INSERTED -->
		<p>
		<b>Like all telephone numbers, this number's running costs depend on how much you use it</b> (although we're sure you'll find our call rates very competitive!).
		</p>
		
		<p style="clear: both;">
		This typical first invoice includes rental, and a suggested usage prepayment (which you can adjust before you actually pay).
		</p>
	<!-- END HELPTEXT -->
	<?php endif; ?>
        	
	<table class="detailed">
		<tr> 
			<td class="cell1i" colspan="3"><strong>First invoice for <?=$number;?></strong></td>
			<?php if ($showincludes) : ?><td class="cell1i">includes</td><?php endif; ?>
			<td class="cell1i">price</td>
		</tr>
 		
 		<?php for ($i=1; $i<=$num_lines; $i++) : ?>
 		<tr><td colspan="<?=($showincludes+4);?>" class="divider"><img src="<?=$dmx_glib;?>clear.gif" width="1" height="1" alt=""></td></tr>
		<tr> 
			<td class="cell1f"><?=$title[$i]?></td>
			<td class="cell_plain" colspan="2"><?=$description[$i]?></td>
			<?php if ($showincludes) : ?><td class="cell_plain" style="white-space: pre; padding-right: 5px;"><?=$includes[$i];?></td><?php endif; ?>
			<td class="cell2f" style="text-align: right;"><?=$currency_symbol;?><?=$price[$i];?></td>
		</tr>
		<?php endfor; ?>
		
		<!-- VAT & TOTAL -->
 		<tr><td colspan="<?=($showincludes+4);?>" class="divider"><img src="<?=$dmx_glib;?>clear.gif" width="1" height="1" alt=""></td></tr>
		<tr>
			<td colspan="<?=($showincludes+2);?>" rowspan="5" class="cell_plain" style="text-align: left; vertical-align: bottom">
				<div class="grabut_left"><span class="standard"><ul><li>
				<a href="<?=$button_url;?>" target="_self" onclick="<?=$button_func;?>"><?=$button_text;?></a>
				</li></ul></span></div>
			</td>
			<td class="cell2f" style="text-align: right; white-space: nowrap;">Net Total</td>
			<td class="cell2f" style="text-align: right; width: 1%;"><?=$currency_symbol;?><?=$total_net;?></td>
		</tr>
		<tr>
			<td class="cell2f" style="text-align: right; white-space: nowrap;">VAT</td>
			<td class="cell2f" style="text-align: right;"><?=$currency_symbol;?><?=$total_tax;?></td>
		</tr>
		<tr><td colspan="2" class="divider"><img src="<?=$dmx_glib;?>clear.gif" width="1" height="1" alt=""></td></tr>
		<tr>
			<td class="cell2i" style="text-align: right;"><span class="price"><strong>TOTAL</strong></span></td>
			<td class="cell2i" style="text-align: right;"><span class="price"><strong><?=$currency_symbol;?><?=$total_inc;?></strong></span></td>
		</tr>
		<tr><td colspan="2" class="divider" style="height: 1px;"><img src="<?=$dmx_glib;?>clear.gif" width="1" height="1" alt="" style="width: 1px; height: 1px;"></td></tr>
		<!-- END VAT & TOTAL -->

		<tr>
			<td></td>
			<td style="width: 99%";></td>
			<td colspan="<?=($showincludes+2);?>"></td>
		</tr>

	</table>
	
<?php else : ?>
<!-- ERROR HANDLING -->
<div style="vertical-align: middle;">
<img src="<?=$dmx_glib;?>interface/error_32.gif" alt="" width="36" height="32" border="0" style="float: left; padding: 0 10px 0 0;"><span class="error">ERROR<br><?=$err_msg;?></span>
</div>
<!-- END ERROR HANDLING -->
<?php endif; ?>

</div>

</div>
</div>
</div>
</div>

<!----------------------------------------->
<!-- END TYPICAL FIRST INVOICE COMPONENT -->
<!----------------------------------------->

