<link class="theme" rel="stylesheet" href="modules/EcmReports/tpls/PDF/css/style.css">
<h1>{$MOD.LBL_REPORT} {$MOD.LBL_REPORT_ECMWORKCARDS_PRODUCTS} </h1>
<table id="myTable" class="tablesorter tablesorter-blue" role="grid">
	<thead>
		<tr class="tablesorter-headerRow" role="row">
			<th width="40%" style = "border-bottom: 1px solid black;text-align: left">{$MOD.LBL_PRODUCTS}</th>
			<th width="15%" style = "border-bottom: 1px solid black;text-align: left">{$MOD.LBL_WORKER_NAME}</th>
			<th width="7%" style = "border-bottom: 1px solid black;text-align: left">{$MOD.LBL_ACTION_CODE}</th>
			<th width="30%" style = "border-bottom: 1px solid black;text-align: left">{$MOD.LBL_ACTION}</th>
			<th width="5%" style = "border-bottom: 1px solid black;text-align: left">{$MOD.LBL_QUANTITY}</th>
			<th width="5%" style = "border-bottom: 1px solid black;text-align: left">{$MOD.LBL_PW_QUANTITY}</th>
			<th width="11%" style = "border-bottom: 1px solid black;text-align: right">{$MOD.LBL_SUM_NETTO}</th>
			<th width="11%" style = "border-bottom: 1px solid black;text-align: right">{$MOD.LBL_SUM_BRUTTO}</th>
		</tr>
	</thead>
	<tbody>
		{foreach from=$data item=rekord key=kl}
			<tr id="parent_{$rekord.indeks}">
				<td style = "border-top: 1px solid black;border-left: 1px solid black;">{$rekord.code} {$rekord.name}</td>
				<td colspan="4" style = "border-top: 1px solid black;"></td>
				<td style = "border-top: 1px solid black;text-align: right">{$rekord.pw}</td>
				<td style = "border-top: 1px solid black;text-align: right">{$rekord.netto|number_format:2:",":"."}</td>
				<td style = "border-top: 1px solid black;border-right: 1px solid black;text-align: right">{$rekord.brutto|number_format:2:",":"."}</td>
			</tr>
			{foreach from=$rekord.actions key=klucz item=pracownik}
				{foreach from=$pracownik item=czynnosc}
					<tr name="child_{$rekord.indeks}" style="background-color: #e6e6e6;" role="row">
						<td style = "border-left: 1px solid black;text-align: left"></td>
						<td style = "text-align: left">{$klucz}</td>
						<td style = "text-align: left">{$czynnosc.actioncode}</td>
						<td style = "text-align: left">{$czynnosc.actionname}</td>
						<td style = "text-align: right">{$czynnosc.quantity}</td>
						<td style = "text-align: right">{$rekord.pw}</td>
						<td style = "text-align: right">{$czynnosc.netto|number_format:2:",":"."}</td>
						<td style = "border-right: 1px solid black;text-align: right">{$czynnosc.brutto|number_format:2:",":"."}</td>
					</tr>
				{/foreach}
			{/foreach}
		{/foreach}
	</tbody>
	<tfoot>
		<tr>
			<th style="text-align: left;">{$MOD.LBL_SUM}</th>
			<th colspan="5"></th>
			<th style="text-align: right;">{$suma.netto|number_format:2:",":"."}</th>
			<th style="text-align: right;">{$suma.brutto|number_format:2:",":"."}</th>
		</tr>
	</tfoot>
</table>