{$_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 == 'DRAFT' || $invoice.state_id == 'ARCHIVED')}

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

{else} {$_show_payment_section = true} {if $invoice.state_id == 'PAID'}

[`Invoice is paid`]

{elseif $invoice.state_id == 'PROCESSING'}

[`Payment is in process`]

{elseif $invoice.state_id == '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 empty($html)} {else} {$html} {/if} {if $_show_payment_section} {include file="./invoice/payment.section.inc.html" inline} {/if} {if !$_is_include} {/if} {/if}