{$_is_include = false} {$_hide_payments = false} {if !empty($is_include)} {$_is_include = true} {$_hide_payments = true} {/if} {if !$_is_include} {/if}
{if $wa->getEnv() == 'frontend' && ($invoice.state_id == crmInvoiceModel::STATE_DRAFT || $invoice.state_id == crmInvoiceModel::STATE_ARCHIVED)}

[`Invoice has been canceled and no longer valid`]

{else} {$_show_payment_section = true} {if empty($style_version)} {if $invoice.state_id == crmInvoiceModel::STATE_PAID}

[`Invoice is paid`]

{elseif $invoice.state_id == crmInvoiceModel::STATE_PROCESSING}

[`Payment is in process`]

{elseif $invoice.state_id == crmInvoiceModel::STATE_PENDING && waRequest::get('result')} {if waRequest::get('result') == 'success'}

[`Payment is in process`]

{$_show_payment_section = false} {elseif waRequest::get('result') == 'fail'}

[`Payment error`]

{/if} {/if} {/if}
{if empty($html)} {if !empty($use_skeleton)}
{for $i = 0 to 9} {/for}
{/if} {else} {$html} {/if}
{if empty($style_version) && $_show_payment_section} {include file="./invoice/payment.section.inc.html" inline} {/if} {if !$_is_include} {/if} {if !empty($style_version) && !$wa->crm->isPremium()} {/if} {/if} {if !empty($use_skeleton)} {/if}