<form id="calcexp_level_of_completion_transfer_form" action=""  method="POST" onsubmit="return false;" class="bigform">
    <fieldset class="noborder sepnext">
        {include file='r/hidden.tpl' name="calcexp_level_of_completion_transfer_id" default=$payment->id}
        {include file='Calcexp/_level_of_completion_details.tpl'}
    </fieldset>
    <fieldset class="noborder">
        
        {include file='r/ajaxselect.tpl' name='calcexp_level_of_completion_transfer_receiver' title="correspondence_receiver"
            class="required addressselect fulltext_search t-mid" default_id=$project_offer->address_id default=$project_offer->address_name}
            {* Validation not working for: filter_project_participants_project_field!!! *}
        
        {include file='r/input.tpl' name="calcexp_level_of_completion_transfer_fee_no" title="correspondence_fee_no" add_icons_file="fee_number"
            collapse='formcoll' class="required t-mid" maxlength=30}
        
        {include file='r/select.tpl' name="calcexp_level_of_completion_transfer_account_name" title="fees_fee_account_name" list=$fee_accounts_list 
            collapse='formcoll'
            id="id" text="name" class="required is_fee_account" noempty=TRUE}
            
        {if empty($fee_categories)}
            <p class="formstyle"></p>
        {else}
            {include file='r/select.tpl' name="calcexp_level_of_completion_transfer_fee_category_name" title="fees_fee_category_name" class=""
                list=$fee_categories id="id" text="name"}
        {/if}
        {include file='r/date.tpl' name="calcexp_level_of_completion_transfer_fee_date" title="fees_fee_date" default=$payment_today 
            add_icons_file=warning_small past_span_text={$i.fees_fee_date_info} warningsmaller=true
            class="required dateUS"}

        {include file='r/textarea.tpl' name="calcexp_level_of_completion_transfer_fees_purpose" title="fees_purpose"
            class="t-midlong" maxlength=240 default=$payment->correspondence_type_name}

        {include file='r/hidden.tpl' name="calcexp_level_of_completion_transfer_last_fee_date" default=$last_fee_date}
    </fieldset>

    {if $project_use_currency}
        <fieldset class="noborder">
            {include file='r/hidden.tpl' name="calcexp_level_of_completion_transfer_currency_id" default=$offer_components[0]->ontop->currency_id}
            {include file='r/hidden.tpl' name="calcexp_level_of_completion_transfer_today" default=$payment_today}
            
            {include file='r/input.tpl' name="calcexp_level_of_completion_transfer_exchange_rate" title="fees_exchange_rate" class="required numberi18n" collapse="formcoll"
                add_icons_file="calcexp_exchange_rate_use" readonly=$offer_components[0]->ontop->with_old_hoai
                default={isfloat value=$offer_components[0]->ontop->exchange_rate maxf=10}}
            {include file='r/view.tpl' name="calcexp_level_of_completion_transfer_exchange_rate_system" title="calcexp_current_system_exch" class="numberi18n" collapse="formcoll"
                default={isfloat value=$allocations_currency_exchange_rate maxf=10}}
        </fieldset>
    {/if}
    
    {if $payment->fee_type eq Payments_model::T_FINAL}
        <fieldset class="noborder">
            <legend style="padding-bottom: 0;">{$i.fees_retention_title}</legend>
            {include file='r/radio.tpl' name="calcexp_level_of_completion_transfer_retention_type" title="fees_retention_type" 
                list=$retention_type_list id="id" text="name" default=$project_offer->retention_type
                collapse='formcoll'}
            {include file='r/date.tpl' name="calcexp_level_of_completion_transfer_retention_date" title="fees_retention_date" 
                default=$project_offer_retention_date
                class="dateUS" collapse='formcoll'}
            {include file='r/input.tpl' name="calcexp_level_of_completion_transfer_retention" title="fees_retention" 
                default={isfloat value=$project_offer->retention maxf=10}
                add_icons_file=warning_small past_span_text={$i.fees_retention_info} warningsmaller=true
                class="numberi18n t-small"}
        </fieldset>
    {/if}
    
    <fieldset class="noborder">
        {include file='Calcexp/_level_of_completion_details_table.tpl' transfer_mode=true}
    </fieldset>
</form>
