{if phpaga_user_hasperm($smarty.const.PHPAGA_PERM_MANAGE_INVOICES) and !$percustomer} {literal} {/literal}