{strip} {$_title = '[`Deals`]'}
{* HEADER *}
{if $funnels} {/if}
{* CONTENT *}
{if $funnel}
{foreach $funnel.stages as $_stage}
{$_stage.name|escape}
{if $_stage.amount}{$_stage.amount|wa_format_amount_currency:$funnel.currency_id}{/if}
{/foreach}
{if $funnels}
{if $deals} {function name="_renderTags" _tags=[]} {/function} {foreach $funnel.stages as $_stage}
{foreach $_stage.deals as $_deal} {$_now = date('Y-m-d H:i:s')} {$_contact = ifempty($_deal.contact, [])} {if !empty($_contact)} {$_photo = $_contact->getPhoto(32)} {/if} {$_deal_classes = []} {if $_deal.reminder_datetime && $_deal.reminder_datetime < $_now} {$_deal_classes[] = "overdue"} {/if} {if $_deal.id > $deal_max_id} {$_deal_classes[] = "highlighted"} {/if} {$_is_open = false} {if $_deal.status_id == "OPEN"} {$_is_open = true} {/if} {$_order_id = crmShop::getEncodedOrderId($_deal)} {$_shop_order = $deals[$_deal.id].shop_order|default:[]}
{if !empty($_photo)} {/if}
{if !empty($_contact)}
{$wa->crm->contactName($_contact.name)}
{/if} {if !empty($deal_tags[$_deal.id])}
{$_tags = $deal_tags[$_deal.id]} {if count($_tags) > 1} {_renderTags _tags=$_tags} {/if}
{/if}
{/foreach}
{/foreach} {elseif $is_deals_limit}

[`Kanban board deal quantity limit exceeded.`]

{_w('This section can display a maximum of %d deal.', 'This section can display a maximum of %d deals.', $max_kanban_deals)} {_w('You have now %d deal.', 'You have now %d deals.', $total_count)}

{else}

[`No deals found for given conditions`]

{/if}
{else}

[`Welcome to your new funnel!`]

[`Start by creating your first deal`]

{/if}
{/if}
{/strip}