<!doctype html>
<html  {$html_attrs}>
	<head>
				<meta http-equiv="X-UA-Compatible" content="IE=Edge">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<title>{$pagetitle}</title>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
	<base href="{$projectPath}">
		<link REL="stylesheet" href="styles/default.css?{$wizardBuildKey}" type="text/css">
	{BEGIN rtlCSS}
	<link REL="stylesheet" href="styles/defaultRTL.css?{$wizardBuildKey}" type="text/css">
	{END rtlCSS}
	{BEGIN styleCSSFiles}
	<link REL="stylesheet" href="{$stylepath}" type="text/css">
	{END styleCSSFiles}
	</head>

	<body class="{$stylename} function-rprint" {$bodyattrs}>
	{BEGIN body}
		{$header}
		<style>
			{$containerCss}
		</style>
		{$locking}
		<div class="r-small-page" 
			data-body-align="left"
			data-body-width="standard"
		>
							{BEGIN top_block}
<div class="r-form" data-location="top" id="form_top_{$pageid}" data-makeup="small" {$form_top} data-pageid="{$pageid}" >		
	 
		<div class="row">
			 
				<div 
	data-cellId="top_c2" data-pageid="{$pageid}"	{$cell_top_c2}
	class=" r-ori-vert			col-md-12
	
">
		 
		<h2 data-itemtype="print_header" data-itemid="print_header" {$item_print_header} data-pageid="{$pageid}" >{$pagetitlelabel Vinha_Report_Talea rprint}</h2>
	 
		{BEGIN printtabheader}
<span data-itemtype="print_subheader" data-itemid="print_subheader" {$item_print_subheader} data-pageid="{$pageid}" >
{$printtabheader_text}
</span>
{END printtabheader}
		</div>					</div>
	</div>		
{END top_block}
									{BEGIN above-grid_block}
<div class="r-form" data-location="above-grid" id="form_above-grid_{$pageid}" data-makeup="small" {$form_above-grid} data-pageid="{$pageid}" >		
	 
		<div class="row">
			 
				<div 
	data-cellId="above-grid_c1" data-pageid="{$pageid}"	{$cell_above-grid_c1}
	class=" r-ori-vert			col-md-12
	
">
		{BEGIN firstAboveGridCell}
		 
		<span data-itemtype="print_pages" data-itemid="print_pages" {$item_print_pages} data-pageid="{$pageid}" data-small >
	{$print_pages_labelprint_pages}
</span>			{END firstAboveGridCell}	
	</div>					</div>
	</div>		
{END above-grid_block}
									{BEGIN grid_block}
<style>
	td.pagesummary.pagesummary.pagesummary.pagesummary.pagesummary.pagesummary.pagesummary.pagesummary {
		background-color: #ffffbb;
	}
	td.globalsummary.globalsummary.globalsummary.globalsummary.globalsummary.globalsummary.globalsummary.globalsummary {background-color: #ffe0b0;
	}
	.rnr-report {
		width: 100%;
	}
	td {
		padding: 2px; 4px;
	}
			td.group_1{
			background-color: #90EE90;
		}
		td.nbgroup_1{
			background-color: #90EE90;
		}
		td.header_1 {
			background-color: #7ACA7A; 
			font-size: 120%;
			padding: 2px 8px;
			font-weight: bold;
		}
			td.group_2{
			background-color: #FFFFE0;
		}
		td.nbgroup_2{
			background-color: #FFFFE0;
		}
		td.header_2 {
			background-color: #D8D8BE; 
			font-size: 120%;
			padding: 2px 8px;
			font-weight: bold;
		}
		td.blackshade {
		font-size: 120%;
	}
	.summaryrow > * {
		border:solid #808080 1px; 
		border-left: none; 
		border-right: none;
	}
		.fieldnamesrow > * 
	{
		border:solid #808080 1px; 
		border-left: none; 
		border-right: none;
	}
	</style>
<div id="grid_block{$id}" class="rnr-report-gridblock">
						
 <!-- add to settings ? -->


<table class="table table-striped table-bordered rnr-b-grid rnr-gridtable" cellpadding="0" >
	<tbody>			
{BEGIN grid_row}
				<!--  group headers -->
	 
		{BEGIN Marza_newgroup}							
		<tr class="group-spliter-1"  >
			<td class="header_1" colspan="4">
				{$label Vinha_Report_Talea Marza }:&nbsp;
				{$xMarza_grval}
								<span data-itemtype="grid_field" data-field="Marza" data-itemid="grid_field2" data-pageid={$pageid} data-record-id="{$recId}">
{$Marza_grval}
</span>			</td>
		</tr>
		
				{END Marza_newgroup}
	 
		{BEGIN Talea_newgroup}							
		<tr class="group-spliter-2"  >
			<td class="header_2" colspan="4">
				{$label Vinha_Report_Talea Talea }:&nbsp;
				{$xTalea_grval}
								<span data-itemtype="grid_field" data-field="Talea" data-itemid="grid_field3" data-pageid={$pageid} data-record-id="{$recId}">
{$Talea_grval}
</span>			</td>
		</tr>
		
				<tr class="fieldnamesrow group-headers">
																								<td class="blackshade {$fieldclass_Varieta}">{$label Vinha_Report_Talea Varieta }</td>
														<td class="blackshade {$fieldclass_Totale}">{$label Vinha_Report_Talea Totale }</td>
														<td class="blackshade {$fieldclass_Quantidade_Vendida}">{$label Vinha_Report_Talea Quantidade_Vendida }</td>
														<td class="blackshade {$fieldclass_Stock}">{$label Vinha_Report_Talea Stock }</td>
									</tr>
				{END Talea_newgroup}
		

			<!--  data-->
		{BEGIN row_data}
		<tr >
																								<td class="data {$fieldclass_Varieta}">
			{$xVarieta_value}
						<span data-itemtype="grid_field" data-field="Varieta" data-itemid="grid_field4" data-pageid={$pageid} data-record-id="{$recId}">
{$Varieta_value}
</span>			</td>
														<td class="data {$fieldclass_Totale}">
			{$xTotale_value}
						<span data-itemtype="grid_field" data-field="Totale" data-itemid="grid_field5" data-pageid={$pageid} data-record-id="{$recId}">
{$Totale_value}
</span>			</td>
														<td class="data {$fieldclass_Quantidade_Vendida}">
			{$xQuantidade_Vendida_value}
						<span data-itemtype="grid_field" data-field="Quantidade_Vendida" data-itemid="grid_field6" data-pageid={$pageid} data-record-id="{$recId}">
{$Quantidade_Vendida_value}
</span>			</td>
														<td class="data {$fieldclass_Stock}">
			{$xStock_value}
						<span data-itemtype="grid_field" data-field="Stock" data-itemid="grid_field7" data-pageid={$pageid} data-record-id="{$recId}">
{$Stock_value}
</span>			</td>
									</tr>
		{END row_data}
	
	<!---  group summary-->
					{BEGIN Talea_endgroup}

		<tr >
					<td class="group_2" colspan="4">
				Resumo para {$label Vinha_Report_Talea Talea } {$Talea_grval} - <span class="summary-2" data-type="summary" data-value="{$groupTalea_total_cnt}">
					{$groupTalea_total_cnt}
				</span> Total de Registos			</td>			
				</tr>
		
					<!--  Sum -->
			<tr >
												<td class="group_2">
									Soma									&nbsp;
							
				</td>
												<td class="group_2 {$fieldclass_Totale}">
									&nbsp;
									<span class="summary-2" data-type="sum" data-value="{$groupTalea_totalTotale_sum}" data-field="Totale">					
						{$groupTalea_totalTotale_sum}
					</span>			
							
				</td>
												<td class="group_2 {$fieldclass_Quantidade_Vendida}">
									&nbsp;
									<span class="summary-2" data-type="sum" data-value="{$groupTalea_totalQuantidade_Vendida_sum}" data-field="Quantidade Vendida">					
						{$groupTalea_totalQuantidade_Vendida_sum}
					</span>			
							
				</td>
												<td class="group_2 {$fieldclass_Stock}">
									&nbsp;
									<span class="summary-2" data-type="sum" data-value="{$groupTalea_totalStock_sum}" data-field="Stock">					
						{$groupTalea_totalStock_sum}
					</span>			
							
				</td>
						</tr>
		
		
		
			

		{END Talea_endgroup}
							{BEGIN Marza_endgroup}

		<tr >
					<td class="group_1" colspan="4">
				Resumo para {$label Vinha_Report_Talea Marza } {$Marza_grval} - <span class="summary-1" data-type="summary" data-value="{$groupMarza_total_cnt}">
					{$groupMarza_total_cnt}
				</span> Total de Registos			</td>			
				</tr>
		
					<!--  Sum -->
			<tr >
												<td class="group_1">
									Soma									&nbsp;
							
				</td>
												<td class="group_1 {$fieldclass_Totale}">
									&nbsp;
									<span class="summary-1" data-type="sum" data-value="{$groupMarza_totalTotale_sum}" data-field="Totale">					
						{$groupMarza_totalTotale_sum}
					</span>			
							
				</td>
												<td class="group_1 {$fieldclass_Quantidade_Vendida}">
									&nbsp;
									<span class="summary-1" data-type="sum" data-value="{$groupMarza_totalQuantidade_Vendida_sum}" data-field="Quantidade Vendida">					
						{$groupMarza_totalQuantidade_Vendida_sum}
					</span>			
							
				</td>
												<td class="group_1 {$fieldclass_Stock}">
									&nbsp;
									<span class="summary-1" data-type="sum" data-value="{$groupMarza_totalStock_sum}" data-field="Stock">					
						{$groupMarza_totalStock_sum}
					</span>			
							
				</td>
						</tr>
		
		
		
			

		{END Marza_endgroup}
			
{END grid_row}

	{BEGIN summary_header}
	<tr class="summary-header">
						
						
							<td class="blackshade {$fieldclass_Varieta}">{$label Vinha_Report_Talea Varieta }</td>
				
							<td class="blackshade {$fieldclass_Totale}">{$label Vinha_Report_Talea Totale }</td>
				
							<td class="blackshade {$fieldclass_Quantidade_Vendida}">{$label Vinha_Report_Talea Quantidade_Vendida }</td>
				
							<td class="blackshade {$fieldclass_Stock}">{$label Vinha_Report_Talea Stock }</td>
				
			
	</tr>
	{END summary_header}			




    
    

	<!-- global summary-->
	{BEGIN global_summary}
    <tr class="summaryrow summary-global">
        <td class="globalsummary" colspan="6">
            Resumo Global {$global_total_cnt} - Total de Registos        </td>
    </tr>

	    <!--  Sum -->
    <tr class="summary-global">
					
                <td class="globalsummary">Soma</td>
        		
					
                <td class="globalsummary {$fieldclass_Totale}">
            {$global_totalTotale_sum}
        </td>
        		
					
                <td class="globalsummary {$fieldclass_Quantidade_Vendida}">
            {$global_totalQuantidade_Vendida_sum}
        </td>
        		
					
                <td class="globalsummary {$fieldclass_Stock}">
            {$global_totalStock_sum}
        </td>
        		
		</tr>
	
	
	
		{END global_summary}

	</tbody>
</table>			</div>
{END grid_block}									{BEGIN below-grid_block}
<div class="r-form" data-location="below-grid" id="form_below-grid_{$pageid}" data-makeup="small" {$form_below-grid} data-pageid="{$pageid}" >		
	</div>		
{END below-grid_block}
			</div>
		{$footer}
	{END body}
	</body>
</html>
