{extends file=$smarty.const.SMARTY_LAYOUT_CONTENT_LIST_TABLE_CURRENT_DATA}

{block name="listing-tr-class"}
	{if $rowFields['locked']  or $rowFields['idRealSupplier']}
		disabled
	{/if}
{/block}

{block name="listing-td-content-name"}
	<div class="
		{if $rowFields['idRealSupplier']}italic{/if}"
	>{supplierLabel ref={$rowFields['id']}}</div>
	<div class="grey italic">{$rowFields['companyPrefix']} {$rowFields['company']} {$rowFields['companySuffix']}</div>
{/block}

{block name="listing-td-content-idTrust"}
	{trustLabel ref=$rowFields['idTrust']}
{/block}

{block name="listing-td-content-category"}
	{$_LANG['generalData']['suppliers']['possibleCategories'][$rowFields['category']]}
{/block}

{block name="listing-td-content-countryCode"}
	{countryLabel ref=$rowFields['countryCode']}
{/block}

{block name="listing-td-content-codes"}
	{$codes = \Entity\Supplier::select($rowFields['id'])->codes}
	{foreach $codes as $key=>$code}
		{$codes[$key] = {"%s:%s"|sprintf:$supplierCodesCfg[$key]:$code}}
	{/foreach}
	{$codes|join:' | '}
{/block}

{block name="listing-td-content-addTime" append}
	<div>{userLabel ref=$rowFields['idAddUser']}</div>
{/block}

{block name="listing-td-content-duplicateStatus"}
	{$supplierObj = \Entity\Supplier::select($rowFields['id'])}

	{if $supplierObj->idRealSupplier}
		{$lang['index']['listCols']['isDuplicateCorporate']}
	{elseif $supplierObj->duplicatedSuppliersList}
		{$lang['index']['listCols']['hasDuplicateCorporate']}
	{/if}
{/block}

