{extends file=$smarty.const.SMARTY_LAYOUT_CONTENT_LIST_TABLE_CURRENT_DATA}

{block name="record-id"}{$rowFields['entityType']}##{$rowFields['idEntityExtSys']}##{$rowFields['idSystem']}##{$rowFields['idEntityTina']}{/block}

{block name="listing-td-content-idSystem"}
	{importedDocumentsSystemLabel ref=$rowFields['idSystem'] format="%name%"}
{/block}

{block name="listing-td-content-entityType"}
	{$lang['formFields']['entityType_'][$rowFields['entityType']]}
{/block}

{block name="listing-td-content-idEntityTina"}
	{if $rowFields['entityType']=='user'}
		{userLabel ref=$rowFields['idEntityTina']}
	{elseif $rowFields['entityType']=='office'}
		{officeLabel ref=$rowFields['idEntityTina']}
	{elseif $rowFields['entityType']=='customer'}
		{customerLabel ref=$rowFields['idEntityTina']}
	{elseif $rowFields['entityType']=='corporate'}
		{corporateLabel ref=$rowFields['idEntityTina']}
	{elseif $rowFields['entityType']=='supplier'}
		{supplierLabel ref=$rowFields['idEntityTina']}
	{elseif $rowFields['entityType']=='city'}
		{cityLabel ref=$rowFields['idEntityTina']}
	{elseif $rowFields['entityType']=='agencyBankAccount'}
		{bankAccountLabel ref=$rowFields['idEntityTina']}
	{elseif $rowFields['entityType']=='docType'}
		{$components=$rowFields['idEntityTina']|split:':'}
		{$doc = $components[1]}
		{$category = $components[0]}

		{if $category=='cashing'}
			{\App\Config\CashingDocuments::getInstance()->getName($doc)}
		{elseif $category=='payment'}
			{\App\Config\PaymentDocuments::getInstance()->getName($doc)}
		{/if}

		<span style="float:right;">[{$category}]</span>
		
	{else}
		{$rowFields['idEntityTina']}
	{/if}
{/block}
