<?php /* Smarty version 2.6.18, created on 2009-03-30 11:48:38
         compiled from beterv_matrix.tpl */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('modifier', 'substr', 'beterv_matrix.tpl', 10, false),array('modifier', 'array_sum', 'beterv_matrix.tpl', 16, false),array('modifier', 'number_format', 'beterv_matrix.tpl', 19, false),)), $this); ?>
<table cellspacing="0" class="beterv_matrix">
	<tr>
		<th>&nbsp;</th>
		<th>facturen</th>
		<th class="cur_q_l">huidig</th>
		<th class="cur_q_r">kwartaal</th>
		<?php $_from = $this->_tpl_vars['data']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['q_list'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['q_list']['total'] > 0):
    foreach ($_from as $this->_tpl_vars['d']):
        $this->_foreach['q_list']['iteration']++;
?>
			<?php if ($this->_foreach['q_list']['iteration'] > 1): ?>
								<th><?php echo ((is_array($_tmp=$this->_tpl_vars['d']['bek_kwartaal'])) ? $this->_run_mod_handler('substr', true, $_tmp, 0, 4) : substr($_tmp, 0, 4)); ?>
 Q<?php echo ((is_array($_tmp=$this->_tpl_vars['d']['bek_kwartaal'])) ? $this->_run_mod_handler('substr', true, $_tmp, -1) : substr($_tmp, -1)); ?>
</th>
			<?php endif; ?>
		<?php endforeach; endif; unset($_from); ?>
	</tr>
	<tr class="beterv_matrix_totaal">
		<td class="title">Totaal</td>
		<td><?php echo array_sum($this->_tpl_vars['list_totals_aantal']); ?>
</td>
		<td>100%</td>
		<?php $_from = $this->_tpl_vars['data']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['q_list'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['q_list']['total'] > 0):
    foreach ($_from as $this->_tpl_vars['index'] => $this->_tpl_vars['d']):
        $this->_foreach['q_list']['iteration']++;
?>
			<td><?php echo ((is_array($_tmp=$this->_tpl_vars['list_totals_bedrag'][$this->_tpl_vars['index']])) ? $this->_run_mod_handler('number_format', true, $_tmp, 0, ",", ".") : number_format($_tmp, 0, ",", ".")); ?>
</td>
		<?php endforeach; endif; unset($_from); ?>
	</tr>

	<?php $_from = $this->_tpl_vars['list_interval']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['i_key'] => $this->_tpl_vars['i_title']):
?>
		<?php $this->assign('bedrag_key', "bek_".($this->_tpl_vars['i_key'])."_bedrag"); ?>
		<?php $this->assign('aantal_key', "bek_".($this->_tpl_vars['i_key'])."_aantal"); ?>

		<tr class="beterv_matrix_<?php echo $this->_tpl_vars['i_key']; ?>
">
			<td class="title"><?php echo $this->_tpl_vars['i_title']; ?>
</td>
			<td><?php if ($this->_tpl_vars['list_totals_aantal'][$this->_tpl_vars['i_key']]): ?><?php echo $this->_tpl_vars['list_totals_aantal'][$this->_tpl_vars['i_key']]; ?>
<?php else: ?>&nbsp;<?php endif; ?></td>
			<td><?php if ($this->_tpl_vars['list_totals_aantal'][$this->_tpl_vars['i_key']]): ?><?php echo ((is_array($_tmp=$this->_tpl_vars['list_percentage'][$this->_tpl_vars['bedrag_key']])) ? $this->_run_mod_handler('number_format', true, $_tmp, 1, ",", ".") : number_format($_tmp, 1, ",", ".")); ?>
%<?php else: ?>&nbsp;<?php endif; ?></td>

			<?php $_from = $this->_tpl_vars['data']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['q_list'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['q_list']['total'] > 0):
    foreach ($_from as $this->_tpl_vars['d']):
        $this->_foreach['q_list']['iteration']++;
?>
				<td><?php if ($this->_tpl_vars['d'][$this->_tpl_vars['bedrag_key']]): ?><?php echo ((is_array($_tmp=$this->_tpl_vars['d'][$this->_tpl_vars['bedrag_key']])) ? $this->_run_mod_handler('number_format', true, $_tmp, 0, ",", ".") : number_format($_tmp, 0, ",", ".")); ?>
<?php else: ?>&nbsp;<?php endif; ?></td>
			<?php endforeach; endif; unset($_from); ?>

		</tr>
	<?php endforeach; endif; unset($_from); ?>
</table>
<style type="text/css">
<?php echo '
	table.beterv_matrix {
		width: 100%;
		font-size: 90%;
	}
		table.beterv_matrix th {
			padding: 3px 5px;
			font-weight: normal;
			border-right: 1px solid black;
			border-bottom: 0;
			width: 60px;
			text-align: right;
			line-height: 13px;
			white-space: nowrap;
		}
			table.beterv_matrix th.cur_q_l {
				text-align: right;
				border-right: 0;
				padding-right: 0;
			}
			table.beterv_matrix th.cur_q_r {
				text-align: left;
			}

		table.beterv_matrix td {
			padding: 3px;
			text-align: right;
			border-right: 1px solid black;
		}
			table.beterv_matrix td.title {
				text-align: left;
				white-space: nowrap;
			}

		table.beterv_matrix tr.beterv_matrix_totaal td {
			border-top: 2px solid black;
			border-bottom: 2px solid black;
			background-color: #C0C0C0;
		}

		table.beterv_matrix tr.beterv_matrix_0 td {}
		table.beterv_matrix tr.beterv_matrix_0_30 td {
			background-color: #C0C0C0;
		}
		table.beterv_matrix tr.beterv_matrix_31_60 td {}
		table.beterv_matrix tr.beterv_matrix_61_90 td {
			background-color: #C0C0C0;
		}
		table.beterv_matrix tr.beterv_matrix_91_120 td {}
		table.beterv_matrix tr.beterv_matrix_120 td {
			background-color: #C0C0C0;
		}

'; ?>

</style>
