@extends('front.layouts.account')
<?php
$title = 'My Package';
$customerTypes = Config("params.customer_types");
$currency = Config("params.currency");
?>
@include('front/common/meta')
@section('content')

@if(isset($model->id))
<div class="col-lg-8 px-lg-5 shadow py-lg-5 py-3">
    <div class="row">
        <div class="col-md-6">
            <h3 class="h1 mb-lg-4">Billing Info</h3>
            <p class="lead" style="line-height: 1.8;"><?php echo $customer->title ?> <?php echo $customer->firstName ?> <?php echo $customer->lastName ?> <br>
                <?php echo $customer->phone ?> <br>
                <?php echo $customer->email ?> <br>
                <?php echo $address->address1 ?> <?php echo $address->address2 ?> <?php echo $address->city ?>, <?php echo $address->postcode ?> </p>
        </div>
        <div class="col-md-6 text-right">
            <h3 class="h1 text-primary">Invoice # <?php echo $model->invoiceNumber ?></h3>
            <h3>DATE : <?php echo date("d/m/Y", strtotime($model->startDate)) ?></h3>
        </div>
    </div>
    <div class="row pt-3">
        <div class="col-md-12">
            <h3>Package</h3>
            <div class="invoice-package-title mb-4 p-3 rounded-pill text-white package-header-bg-three">
                <div class="row mx-0">
                    <div class="col-md-6">
                        <h3 class="mb-0"><?php echo ucfirst($package["title"]) ?> Cover Plan</h3>
                    </div>
                    <div class="col-md-6 text-right">
                        <h3 class="mb-0">{{$currency["symbol"]}}{{numberformat($model->total)}} <?php echo ucfirst($type) ?></h3>

                    </div>
                </div>
            </div>




        </div>
        <div  class="col-md-12 mb-3">
            <h3 style="text-align: left;color: #F7941D; font-family: "Gilroy-bold", sans-serif;">What's Covered</h3>

        </div>
        <?php foreach ($facilities as $facility) { ?>
            <div class="col-md-4 mb-lg-5 mb-3">
                <i class="fas fa-check text-primary"></i> <strong><?php echo $facility->title; ?></strong>
            </div>
        <?php } ?>

        <table style="width: 100%; font-size: 18px;  line-height: 1.5; color: #4D4D4D; padding-top:30px;">
            <tbody>
                <tr style="font-size: 30px; color:#000;  font-weight: bold; font-size:22px;">
                    <td colspan="2" >Net Amount</td>
                    <td  style="text-align: right;">{{$currency["symbol"]}}{{numberformat($model->price)}}</td>
                </tr>
                <tr style="font-size: 30px; color:#000; font-weight: bold; font-size:22px;">
                    <td colspan="2">VAT Amount</td>
                    <td  style="text-align: right;">{{$currency["symbol"]}}{{numberformat($model->total - $model->price)}}</td>
                </tr>

                <tr style="font-size: 30px; color:#F7941D; font-weight: bold; font-size:22px;">
                    <td colspan="2">Total Amount</td>
                    <td  style="text-align: right;">{{$currency["symbol"]}}{{numberformat($model->total)}}</td>
                </tr>

                <tr style="font-size: 30px; color:#F7941D; font-weight: bold; font-size:22px;">
                    <td colspan="2">&nbsp;</td>                     
                </tr>

            </tbody>
        </table>


    </div>
</div>


@else
<div class="form-row mt-12">
    <div class="alert alert-warning" role="alert">
        You haven't subscribe to any of our packages.
    </div>
</div>
@endif

@endsection

@section('myscript')



@endsection