{include file="header.tpl" }
	<!-- Hor-Content -->
			<div class="hor-content main-content">
				<div class="container">

					<!--Page header-->
					<div class="page-header">

						<div class="page-leftheader">
							<ol class="breadcrumb">
								<li class="breadcrumb-item"><a href="/"><i class="fe fe-home mr-2 fs-14"></i>Home</a>
								</li>
								<li class="breadcrumb-item active" aria-current="page"><a href="#">Pay Portal</a>
								</li>
							</ol>
						</div>

						<div class="page-rightheader">
							<div class="btn btn-list">
								<a href="?a=deposit" class="btn btn-info"><i class="fe fe-settings mr-1"></i> Invest</a>
								<a href="?a=withdraw" class="btn btn-danger"><i class="fe fe-printer mr-1"></i> Withdraw </a>
							</div>
						</div>

					</div>
					<!--End Page header-->

					<!-- Row-1 -->
					<div class="row">

                        <div class="col-md-6 col-lg-6">
                            <div class="card overflow-hidden">
                                <div class="card-body">
<h5 class="card-title mb-3"><u>Payment Details:</u></h5>

{if $errors}
{if $errors.invalid_type} The Plan does not exist. {/if} 
{if $errors.not_enough_funds} You have no enough funds to complete the operation.<br>{/if}
{if $errors.less_min}The minimal spend amount for '{$plan_name}' is {$currency_sign}{$errors.less_min}.<br>{/if}
{if $errors.on_hold}Sorry, this amount on hold now.<br>{/if}
<br>
Click <a href="{"?a=deposit"|encurl}">here</a> and try again.

{else}

<table cellspacing=0 cellpadding=2 class="form deposit_confirm">
<tr>
 <th>Plan:</th>
 <td>{$deposit.name|escape:html}</td>
</tr>
<tr>
 <th>Profit:</th>
 <td>{$deposit.percent}% {if $deposit.period == 'end' || $deposit.period == 'endh'}after {$deposit.periods} {$deposit.time_units}{if $deposit.periods != 1}s{/if}{else}{$deposit.period_name} for {if $deposit.periods == 0}lifelong{else}{$deposit.periods} {$deposit.time_units}{if $deposit.periods != 1}s{/if} {if $deposit.work_week}(mon-fri){/if}{/if}{/if}</td>
</tr>
<tr>
 <th>Principal Return:</th>
 <td>{if $deposit.principal_return}Yes{if $deposit.principal_return_hold_percent > 0}, with {$deposit.principal_return_hold_percent|number_format:2}% fee{/if}{else}No (included in profit){/if}</td>
</tr>
<tr>
 <th>Principal Withdraw:</th>
 <td>
{if $deposit.principal_withdraw}Available with 
{foreach from=$deposit.principal_withdraw_terms item=t name=wpt}
{$t.percent}% fee {if $t.duration > 0}after {$t.duration} days{/if}{if !$smarty.foreach.wpt.last} or {/if}
{/foreach}
{if $deposit.principal_withdraw_duration_max} but before {$deposit.principal_withdraw_duration_max|number_format} days{/if}
{else}Not available{/if}
 </td>
</tr>
{if $deposit.compound != -1}
<tr>
 <th>Compound:</th>
 <td>{$deposit.compound|number_format}%</td>
</tr>
{/if}
{if $deposit.fees.fee}
<tr>
 <th>Credit Amount:</th>
 <td>{$deposit.user_amount|fiat:$deposit.ec}</td>
</tr>
<tr>
 <th>Deposit Fee:</th>
 <td>{$deposit.fees.fee|fiat:$deposit.ec} ({$deposit.fees.percent}%)</td>
</tr>
<tr>
 <th>Deposit:</th>
 <td>{$deposit.to_deposit|fiat:$deposit.ec}</td>
</tr>
{else}
<tr>
 <th>Amount:</th>
 <td>{$deposit.user_amount|fiat:$deposit.ec}</td>
</tr>
{/if}
</table>

<form name=spend method=post>

<input type=hidden name=a value=deposit>
<input type=hidden name=action value=confirm>
<input type=hidden name=type value={$type}>
<input type=hidden name=h_id value={$h_id}>
<input type=hidden name=amount value="{$famount}">
<input type=hidden name=compound value={$compound}>
<br><input type=submit value="Process" class="btn btn-primary"> &nbsp;
<input type=button class="btn btn-primary" value="Cancel" onclick="document.location='?a=deposit'">
</form>

{/if}
</div>
                            </div>
                        </div>                            

					</div>
					<!-- End Row-1 -->

				</div>
			</div>
			<!-- End hor-content-->
		</div>


{include file="footer.tpl"}
