<?php use App\Library\Tool; ?>
<!-- current plan -->
<div class="card">
<div class="card-header border-bottom">
<h4 class="card-title"><?php echo e(__('locale.labels.current_plan')); ?></h4>
</div>
<div class="card-body my-2 py-25">
<div class="row">
<div class="col-md-6">
<div class="mb-2 pb-50">
<h5><?php echo __('locale.subscription.current_plan_information', ['plan_name' => $plan->name]); ?></h5>
<span><?php echo e($plan->description); ?></span>
</div>
<div class="mb-2 pb-50">
<h5><?php echo __('locale.subscription.active_until', ['date' => Tool::formatDateTime($subscription->current_period_ends_at)]); ?></h5>
<span><?php echo e(__('locale.subscription.current_plan_notification')); ?></span>
</div>
<div class="mb-1">
<h5><?php echo e(Tool::format_price($plan->price, $plan->currency->format)); ?> <?php echo e(__('locale.labels.per')); ?> <?php echo e($plan->displayFrequencyTime()); ?>
<?php if($plan->is_popular): ?>
<span class="badge badge-light-primary ms-50"><?php echo e(__('locale.labels.popular')); ?></span>
<?php endif; ?>
</h5>
<span><?php echo e($plan->description); ?></span>
</div>
</div>
<?php if($subscription->status == 'new'): ?>
<div class="row">
<div class="col-md-6">
<button class="btn btn-warning waves-effect" type="button" disabled="">
<span class="spinner-border spinner-border-sm" role="status" aria-hidden="true"></span>
<span class="text-uppercase"><?php echo e(__('locale.subscription.payment_is_being_verified')); ?></span>
</button>
</div>
</div>
<?php else: ?>
<div class="col-12">
<a href="<?php echo e(route('customer.subscriptions.renew', $subscription->uid)); ?>" class="btn btn-primary me-1 mt-1"><i data-feather="repeat"></i> <?php echo e(__('locale.labels.renew')); ?></a>
<a href="<?php echo e(route('customer.subscriptions.change_plan', $subscription->uid)); ?>" class="btn btn-success me-1 mt-1"><i data-feather="refresh-cw"></i> <?php echo e(__('locale.labels.change_plan')); ?></a>
<span class="btn btn-danger mt-1 action-cancel" data-id=<?php echo e($subscription->uid); ?>><i data-feather="stop-circle"></i> <?php echo e(__('locale.buttons.cancel')); ?></span>
</div>
<?php endif; ?>
</div>
</div>
</div>
<!-- / current plan -->
<div class="card">
<div class="card-header border-bottom">
<h4 class="card-title"><?php echo e(__('locale.labels.plan_details')); ?></h4>
</div>
<div class="table-responsive">
<table class="table">
<tbody>
<tr>
<td> <?php echo e(__('locale.labels.plan_name')); ?> </td>
<td class="text-primary font-medium-2"> <?php echo e($plan->name); ?> </td>
</tr>
<tr>
<td> <?php echo e(__('locale.plans.price')); ?> </td>
<td> <?php echo e(Tool::format_price($plan->price, $plan->currency->format)); ?> </td>
</tr>
<tr>
<td> <?php echo e(__('locale.labels.renew')); ?> </td>
<td> <?php echo e(__('locale.labels.every')); ?> <?php echo e($plan->displayFrequencyTime()); ?> </td>
</tr>
<tr>
<td> <?php echo e(__('locale.labels.sms_credit')); ?> </td>
<td> <?php echo e($plan->displayTotalQuota()); ?> </td>
</tr>
<tr>
<td> <?php echo e(__('locale.plans.create_own_sending_server')); ?> </td>
<td>
<?php if($plan->getOption('create_sending_server') == 'yes'): ?>
<?php echo e(__('locale.labels.yes')); ?>
<?php else: ?>
<?php echo e(__('locale.labels.no')); ?>
<?php endif; ?>
</td>
</tr>
<tr>
<td> <?php echo e(__('locale.customer.sender_id_verification')); ?> </td>
<td>
<?php if($plan->getOption('sender_id_verification') == 'yes'): ?>
<?php echo e(__('locale.labels.yes')); ?>
<?php else: ?>
<?php echo e(__('locale.labels.no')); ?>
<?php endif; ?>
</td>
</tr>
<tr>
<td> <?php echo e(__('locale.labels.cutting_system_available')); ?> </td>
<td>
<?php echo e(__('locale.labels.yes')); ?>
</td>
</tr>
<tr>
<td> <?php echo e(__('locale.labels.api_access')); ?> </td>
<td>
<?php if($plan->getOption('api_access') == 'yes'): ?>
<?php echo e(__('locale.labels.yes')); ?>
<?php else: ?>
<?php echo e(__('locale.labels.no')); ?>
<?php endif; ?>
</td>
</tr>
<tr>
<td><?php echo e(__('locale.plans.max_contact_list')); ?></td>
<td><?php echo e($plan->displayMaxList()); ?></td>
</tr>
<tr>
<td><?php echo e(__('locale.plans.max_contact')); ?></td>
<td><?php echo e($plan->displayMaxContact()); ?></td>
</tr>
<tr>
<td><?php echo e(__('locale.plans.max_contact_per_list')); ?></td>
<td><?php echo e($plan->displayMaxContactPerList()); ?></td>
</tr>
<tr>
<td><?php echo e(__('locale.labels.text_messages')); ?></td>
<td><?php echo e($plan->getOption('plain_sms')); ?> <?php echo e(__('locale.labels.credit_per_sms')); ?></td>
</tr>
<tr>
<td><?php echo e(__('locale.labels.voice_messages')); ?></td>
<td><?php echo e($plan->getOption('voice_sms')); ?> <?php echo e(__('locale.labels.credit_per_sms')); ?></td>
</tr>
<tr>
<td><?php echo e(__('locale.labels.picture_messages')); ?></td>
<td><?php echo e($plan->getOption('mms_sms')); ?> <?php echo e(__('locale.labels.credit_per_sms')); ?></td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="card">
<div class="card-header border-bottom">
<h4 class="card-title"><?php echo e(__('locale.labels.transactions')); ?></h4>
</div>
<div class="card-body my-2 py-25">
<div class="row">
<p><?php echo __('locale.description.subscription_logs'); ?></p>
<div class="col-12">
<ul class="nav nav-pills mb-2 mt-3 text-uppercase" role="tablist">
<li class="nav-item">
<a class="nav-link active" id="account-tab" data-bs-toggle="tab" href="#logs" aria-controls="logs" role="tab" aria-selected="true">
<i data-feather="database" class="mr-25"></i><?php echo e(__('locale.subscription.logs')); ?>
</a>
</li>
<li class="nav-item">
<a class="nav-link" id="information-tab" data-bs-toggle="tab" href="#transactions" aria-controls="transactions" role="tab" aria-selected="false">
<i data-feather="shopping-cart"></i><?php echo e(__('locale.labels.transactions')); ?>
</a>
</li>
</ul>
<div class="tab-content">
<div class="tab-pane active" id="logs" aria-labelledby="account-tab" role="tabpanel">
<div class="row table-responsive">
<table class="table">
<thead class="thead-primary">
<tr>
<th scope="col"><?php echo e(__('locale.labels.created_at')); ?></th>
<th scope="col"><?php echo e(__('locale.labels.message')); ?></th>
</tr>
</thead>
<tbody>
<?php $__empty_1 = true; $__currentLoopData = $subscription->getLogs(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $log): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
<tr>
<td> <?php echo e(Tool::customerDateTime($log->created_at)); ?> </td>
<td> <?php echo __('locale.subscription.log_' . $log->type, $log->getData()); ?> </td>
</tr>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
<tr>
<td class="text-center" colspan="5">
<?php echo e(__('locale.datatables.no_results')); ?>
</td>
</tr>
<?php endif; ?>
</tbody>
</table>
</div>
</div>
<div class="tab-pane" id="transactions" aria-labelledby="information-tab" role="tabpanel">
<div class="row table-responsive">
<table class="table">
<thead class="thead-primary">
<tr>
<th scope="col"><?php echo e(__('locale.labels.created_at')); ?></th>
<th scope="col"><?php echo e(__('locale.labels.title')); ?></th>
<th scope="col"><?php echo e(__('locale.labels.amount')); ?></th>
<th scope="col"><?php echo e(__('locale.labels.status')); ?></th>
</tr>
</thead>
<tbody>
<?php $__empty_1 = true; $__currentLoopData = $subscription->getTransactions(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $invoice): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
<tr>
<td><?php echo e(Tool::customerDateTime($invoice->created_at)); ?></td>
<td>
<?php echo $invoice->title; ?>
<?php if($invoice->description): ?>
<div class="small text-muted"><?php echo $invoice->description; ?></div>
<?php endif; ?>
</td>
<td><?php echo e($invoice->amount); ?></td>
<td>
<?php if($invoice->status == 'failed'): ?>
<span class="badge text-uppercase bg-danger">
<?php elseif($invoice->status == 'pending' || $invoice->status == 'plan_change' || $invoice->status == 'renew' ): ?>
<span class="badge text-uppercase bg-warning">
<?php elseif($invoice->status == 'auto_charge'): ?>
<span class="badge text-uppercase bg-info">
<?php else: ?>
<span class="badge text-uppercase bg-success">
<?php endif; ?>
<?php echo e(str_replace('_', ' ', $invoice->status)); ?>
</span>
</span>
</span>
</span>
</td>
</tr>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
<tr>
<td class="text-center" colspan="5">
<?php echo e(__('locale.datatables.no_results')); ?>
</td>
</tr>
<?php endif; ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<?php /**PATH /home/bouloter/sms/resources/views/customer/Accounts/_subscriptions.blade.php ENDPATH**/ ?>