{extends file=$smarty.const.SMARTY_LAYOUT_CONTENT_LIST_TABLE_CURRENT_DATA}

{block name="listing-tr-extraData"}
	data-invoiceId="{$rowFields['idInvoice']}"
{/block}

{block name="listing-td-content-bankAccount"}
	{if $rowFields['idBankAccount']}
		{\Entity\AgencyBankAccount::select($rowFields['idBankAccount'])->account}
		[{\Entity\AgencyBankAccount::select($rowFields['idBankAccount'])->bank->name}]
	{/if}
{/block}

{block name="listing-td-content-docType"}
	{\App\Config\CashingDocuments::getInstance()->getName($rowFields['docType'])}
{/block}

{block name="listing-td-content-docNumber"}
	{if $rowFields['docNumber']}
		{$rowFields['docNumber']}
	{/if}
{/block}

{block name="listing-td-content-value"}
	{$rowFields['value']|priceFormat:$rowFields['currency']}
{/block}

{block name="listing-td-content-issued"}
	{if $rowFields['issueTime']}
		{$lang['index']['list']['issuedFlag']}
	{/if}
{/block}

{block name="listing-td-content-blocked"}
	{if $rowFields['blockTime']}
		{$lang['index']['list']['blockedFlag']}
	{/if}
{/block}

{block name="listing-td-content-voided"}
	{if $rowFields['voidTime']}
		{$lang['index']['list']['cancelledFlag']}
	{/if}
{/block}

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

{block name="listing-td-content-idImportedDoc"}
	{if $rowFields['idImportedDoc']}
		<div>{importedDocumentLabel ref={$rowFields['idImportedDoc']}}</div>
	{/if}
{/block}

{block name="listing-td-content-invoiceNumber"}
	<div>
		{$rowFields['invoiceNumber']} / {$rowFields['invoiceDate']|dateTimeFormat}
	</div>
	<div>{invoiceLabel ref=$rowFields['idInvoice']}</div>
{/block}

{block name="listing-td-content-clientName"}
	{if $rowFields['idCustomer']}
		{customerLabel ref=$rowFields['idCustomer']}
	{elseif $rowFields['idCorporate']}
		{corporateLabel ref=$rowFields['idCorporate']}
	{/if}
{/block}
