<ul>
    {if $payment->status==Payments_model::S_PLANNED && $payment->object_is_editable}
        {include file="r_basic/functionmenuitem.tpl" title=$i.calcexp_approve
            action="calculateaccordingexpenditure_level_of_completion.approve('{$payment->id}');"}                            
    {/if}
    {if $payment->status==Payments_model::S_PLANNED}
        {if !$user_can_correspondence}
            {include file="r_basic/functionmenuitem.tpl" title=$i.calcexp_transfer
                icon="planned_to_invoiced" action="alert('`$i.basic_correspondence` - `$i.basic_no_access` (`$i.rights_r3`)');"}
        {elseif !$user_can_feeadmin}
            {include file="r_basic/functionmenuitem.tpl" title=$i.calcexp_transfer
                icon="planned_to_invoiced" action="alert('`$i.basic_feeadmin` - `$i.basic_no_access` (`$i.rights_r1`)');"}
        {else}
            {include file="r_basic/functionmenuitem.tpl" title=$i.calcexp_transfer
                icon="planned_to_invoiced" action="calculateaccordingexpenditure_level_of_completion.transfer('{$payment->id}');"}
        {/if}
    {/if}
    {if $has_right_opentasks}
        {include file="r_basic/functionmenuhrefitem.tpl" title=$i.basic_add_opentask icon="opentasks"
        action={site_url url="start/open/opentasks/index/`$xjxcookie`/add_for_level_of_completion/`$payment->id`"}}
    {/if}
    {foreach from=$corr_list item=corr_item key=index}
        {include file="r_basic/functionmenuhrefitem.tpl" title=$corr_item->subject icon="correspondence"
            action={site_url url="start/open/correspondence/index/`$xjxcookie`/view/`$corr_item->id`"}}
        {if !empty($corr_item->fees)}
            {foreach from=$corr_item->fees item=fee_item key=index}
                {include file="r_basic/functionmenuhrefitem.tpl" title="{$i.basic_feeadmin} - {$fee_item->fee_no}" icon="fees"
                    action={site_url url="start/open/feeadmin/index/`$xjxcookie`/view/`$fee_item->id`"}}
                {if $show_ebInterface || $show_zugferd || $show_xRechnung || $show_fatturaPA}
                    {include file="r_basic/functionmenuhrefitem.tpl" title="{$i.basic_e_invoice} - {$fee_item->fee_no}" icon="e_invoice"
                        action={site_url url="start/open/feeadmin/index/`$xjxcookie`/e_invoice/{$payment->id}/{$fee_item->id}/"}}
                {/if}
            {/foreach}
        {/if}
    {/foreach}
</ul>
