<?php 
} else {
    echo $this->loadTemplate('partial_amount', compact('currency', 'amount'));
    ?>
							<?php 
}
?>
						</h2>
						
						<div class="pp-plan-time text-muted">
							&nbsp;<?php 
echo $plan->isRecurring() !== false ? XiText::_('COM_PAYPLANS_PLAN_PRICE_TIME_SEPERATOR') : XiText::_('COM_PAYPLANS_PLAN_PRICE_TIME_SEPERATOR_FOR');
?>
&nbsp;
							<?php 
echo PayplansHelperFormat::planTime($plan->getExpiration());
?>
						</div>
				</div>
			 </div>  
			 
			 
			 <!-- =========================================
				Plan Description
			 ========================================== --> 
			 
			<div class="pp-plan-description">
				<?php 
echo $plan->getDescription(true);
?>
			</div>
echo PayplansHelperFormat::planTime(PayplansHelperPlan::convertIntoTimeArray($pInstance->getRawExpiration()));
?>
			</option>
			
			<?php 
foreach ($time_price['price'] as $key => $value) {
    ?>
				<option value="<?php 
    echo $value . '_' . $time_price['time'][$key];
    ?>
">
					<?php 
    $amount = $value;
    echo $this->_render('partial_amount', compact('currency', 'amount'), 'default') . ' ';
    echo $pInstance->isRecurring() !== false ? XiText::_('COM_PAYPLANS_PLAN_PRICE_TIME_SEPERATOR') : XiText::_('COM_PAYPLANS_PLAN_PRICE_TIME_SEPERATOR_FOR');
    echo PayplansHelperFormat::planTime(PayplansHelperPlan::convertIntoTimeArray($time_price['time'][$key]));
    ?>
				</option>
			<?php 
}
?>
		</select>
	</div>
</div>
<script>
(function($){
	$(document).ready(function (){
		var plan_id = <?php 
echo $plan->plan_id;
?>
;
        ?>
												</td>
											</tr>
											<tr>
												<td><?php 
        echo XiText::_('COM_PAYPLANS_DASHBOARD_SUBSCRIPTION_TIME');
        ?>
</td>
												<td>
													<span>
													<?php 
        if ($subscription->getExpirationDate()->toString() != null) {
            ?>
					
													  	<?php 
            echo '<em>' . PayplansHelperFormat::date($subscription->getSubscriptionDate()) . '</em> <span class="separator" style="text-transform: capitalize;font-weight: bold;">&nbsp;' . XiText::_('COM_PAYPLANS_ORDER_SUBSCRIPTIONS_TO') . '</span> ' . '<em>' . PayplansHelperFormat::date($subscription->getExpirationDate()) . '</em>';
            ?>
														<?php 
        } elseif ($subscription->getSubscriptionDate()->toString() == null) {
            ?>
														 		<?php 
            echo XiText::_('COM_PAYPLANS_ORDER_SUBSCRIPTION_NOT_ACTIVATED');
            ?>
														<?php 
        } else {
            ?>
													  	 		<?php 
            echo XiText::_('COM_PAYPLANS_ORDER_SUBSCRIPTION_TIME_LIFETIME');
            ?>
												  		<?php 
        }
?>
</span></td>
			</tr>
		
		<!-- Total Tax -->
		<!-- do not add if the amount is zero -->
		<tr class="tax-amount <?php 
echo $tax_amount != "0" ? '' : 'hide';
?>
"> 
			<td ><?php 
echo XiText::_('COM_PAYPLANS_ORDER_CONFIRM_TAX');
?>
</td>
			<td class="text-right pp-payment-header-price2"><span style="font-size: 11px;">(+)&nbsp;</span><span class="pp-amount"><?php 
echo PayplansHelperFormat::displayAmount($tax_amount);
?>
</span></td>
		</tr>
		
		<!-- Total Payable Amount -->
		<tr class="table-row-border">
			<td><?php 
echo XiText::_('COM_PAYPLANS_ORDER_CONFIRM_AMOUNT_PAYABLE');
?>
</td>
			<td class="text-right pp-payment-header-price payable first-amount">
				<?php 
$amount = $total;
?>
				<?php 
<?php

/**
* @copyright	Copyright (C) 2009 - 2015 Ready Bytes Software Labs Pvt. Ltd. All rights reserved.
* @license		GNU/GPL, see LICENSE.php
* @package		PayPlans
* @subpackage	Frontend
* @contact 		support+payplans@readybytes.in
*/
if (defined('_JEXEC') === false) {
    die;
}
$invoice_key = $invoice->getKey();
$created_date = PayplansHelperFormat::date($invoice->getCreatedDate());
//get paid-on date from wallet entry
$modification_date = PayplansHelperFormat::date($invoice->getPaidDate());
$payment = $invoice->getPayment();
$currency = $invoice->getCurrency();
// status of invoice
$class = '';
switch ($invoice->getStatus()) {
    case PayplansStatus::INVOICE_CONFIRMED:
        $class = 'label-danger';
        break;
    case PayplansStatus::INVOICE_PAID:
        $class = 'label-success';
        break;
    case PayplansStatus::INVOICE_REFUNDED:
        $class = 'label-default';
        break;
    default:
				<?php 
    $actualprices[$i] = isset($actualprices[$i]) ? $actualprices[$i] : 0;
    $actual = $amount = $units * $actualprices[$i];
    $currency = PayplansHelperFormat::currency(XiFactory::getCurrency(XiFactory::getConfig()->currency, array(), 'symbol'));
    echo $this->_render('partial_amount', compact('currency', 'amount'), 'default');
    ?>
				</td>
				
				<td class="col-sm-2 text-left">
						<?php 
    $discounted = $amount = $units * $prices[$i];
    $currency = PayplansHelperFormat::currency(XiFactory::getCurrency(XiFactory::getConfig()->currency, array(), 'symbol'));
    echo $this->_render('partial_amount', compact('currency', 'amount'), 'default');
    ?>
				</td>
				<td class="col-sm-2 text-left">
						<?php 
    $amount = $actual - $discounted;
    $currency = PayplansHelperFormat::currency(XiFactory::getCurrency(XiFactory::getConfig()->currency, array(), 'symbol'));
    echo $this->_render('partial_amount', compact('currency', 'amount'), 'default');
    ?>
				</td>
		</tr>
	<?php 
}
?>
	</table>
</div>