
{section name="rows" start=0 loop=$pivotDisplayMatrix_height}

	{assign var="i" value=$smarty.section.rows.index}

	<tr>

		{section name="cols" start=0 loop=$pivotDisplayMatrix_width}

			{assign var="j" value=$smarty.section.cols.index}

			{assign var=thisCell value=$pivotDisplayMatrix.$i.$j}

			{if $thisCell}
				<td class="region_{$thisCell.region}"
					{if $thisCell.colspan>1}colspan="{$thisCell.colspan}"{/if}
					{if $thisCell.rowspan>1}rowspan="{$thisCell.rowspan}"{/if}
				>
					{if !$thisCell.type or $thisCell.type=='string' or $thisCell.type=='numeric'}
						{$thisCell.content}
					{/if}
					{if $thisCell.type=='price'}
						{$thisCell.content|priceFormat}
					{/if}
					{if $thisCell.type=='date'}
						{if $thisCell.content and $thisCell.content!='0000-00-00'}
							{$thisCell.content|dateTimeFormat}
						{/if}
					{/if}
					{if $thisCell.type=='yearMonth'}
						{if $thisCell.content and $thisCell.content!='0000-00-00'}
							{$thisCell.content|substr:5:2} {$thisCell.content|substr:0:4}
						{/if}
					{/if}
					{if $thisCell.type=='year'}
						{if $thisCell.content and $thisCell.content!='0000-00-00'}
							{$thisCell.content|substr:0:4}
						{/if}
					{/if}
					{if $thisCell.type=='datetime'}
						{if $thisCell.content}
							{$thisCell.content|dateTimeFormat:'dateWithHMS'}
						{/if}
					{/if}
					{if $thisCell.type=='boolean' and !is_null($thisCell.content)}
						{if $thisCell.content}{$_LANG.yes}{else}{$_LANG.no}{/if}
					{/if}

				</td>
			{/if}

		{/section}

	</tr>

{/section}