{% load i18n %}
<!DOCTYPE html>
<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" lang="en">

<head>
	<title></title>
    <!-- CSS only -->
    <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.15.4/css/all.css" integrity="sha384-DyZ88mC6Up2uqS4h/KRgHuoeGwBcD4Ng9SiP4dIRy0EXTlnuz47vAwmeGwVChigm" crossorigin="anonymous">
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-Zenh87qX5JnK2Jl0vWa8Ck2rdkQ2Bzep5IDxbcnCeuOxjzrPF/et3URy9Bv1WTRi" crossorigin="anonymous">
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
    <script src="https://kit.fontawesome.com/a0376f5300.js" crossorigin="anonymous"></script>
	<!-- JavaScript Bundle with Popper -->
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-OERcA2EqjJCMA+/3y+gxIOqMEjwtxJY7qPCqsdltbNJuaOe923+mo//f6V8Qbsw3" crossorigin="anonymous"></script>
	<style>
        .email-box {
            max-width: 600px;
            box-shadow: 1px 2px 17px #ffe5e5;
        }
        @import url('https://fonts.googleapis.com/css2?family=Oxanium:wght@300&display=swap');
        .bg {
            background: #f9f9f9;
            overflow-x: hidden;
        }
        @import url('https://fonts.googleapis.com/css2?family=Varela+Round&display=swap');
        @import url('https://fonts.googleapis.com/css2?family=Exo+2&display=swap');
        .vh-10 {
            height: 10vh;
        }
        .vh-20 {
            height: 20vh;
        }
        .oxanium {
            font-family: 'Oxanium', cursive;
        }
        .varela {
            font-family: 'Varela Round', sans-serif;
        }
        .exo {
            font-family: 'Exo 2', sans-serif;
        }
        .vh-30 {
            height: 30vh;
        }
        .vh-40 {
            height: 40vh;
        }
        .vh-50 {
            height: 50vh;
        }
        .vh-60 {
            height: 60vh;
        }
        .vh-70 {
            height: 70vh;
        }
        .vh-80 {
            height: 80vh;
        }
        .vh-90 {
            height: 90vh;
        }
        .absolute{
            position:absolute;
        }
        .decor-none {
            text-decoration: none;
        }
        .backdrop {
            backdrop-filter: blur(4px);
        }     
        .text-justify {
            text-align: justify;
        }
        .black {
            background: #000;
        }
        .bg-footer {
            background: linear-gradient(0deg, #000000 -87%, #120430 163%, #0133ff70 123%)!important;
        }
        .h-90 {
            height: 105%;
        }
        .min-vh-30 {
            min-height: 30vh
        }
        .bg-footer .footer-content {
            position: relative;
            bottom:10vh;
        }
        ul a {
            color: #272727;
            cursor: pointer;
            transition: all .3s ease;
        }
        ul a:hover {
            color: #cec9c9;
        }
        .h-30 {
            height: 35%;
        }
        .t-20 {
            top: -2%;
        }
        .blur {
            filter: blur(4px)
        }
        .b-25px {
            border-radius: 25px;
            box-shadow: 1px 1px 12px #b5c3ed3d;
        }
        .list-none {
            list-style: none;
        }
        hr {
            margin-top: 1rem;
            margin-bottom: 0rem;
            border: 0;
            border-top: 3px dashed black !important;
        }
        .social-links a {
            font-size: 24px;
            padding: 0 10px;
            line-height: 38px;
        }
        @media only screen and (min-width: 360px) and (max-width: 500px) {
            .elipse-mobile {
                position: relative;
                left: -90px;
                top:5%;
            }
            .t-20 {
                top: 7%;
                left: 16%;
            }
            .social-links a {
                font-size: 17px;
            }
            .h-30 {
                height: 24%;
            }
            .text-xmall {
                font-size: 12px !important;
                text-align: center !important;
            }
        }
        @media only screen and (min-width: 360px) and (max-width: 1000px) {
            .speace-top {
                margin-top: 50px
            }
        }
        @media only screen and (min-width: 500px) and (max-width: 1000px) {
            .h-30 {
                height: 36%;
            } 
            .t-20 {
                top:0%;
            }
            .h-90 {
                height: 120%;
            }
        }
    </style>
</head>

<body>
    <div id="recipt" class="container email-box min-vh-100 scroll-auto">
        <div class="row justify-content-center">
            <div class="col-12">
                <div class="row justify-content-center bg-footer">
                    <div class="col-lg-12 p-0">
                        <img class="w-100" src="https://get-stela.s3.amazonaws.com/img/header.png" alt=""> 
                    </div>
                </div>
                <div class="row justify-content-center">
                    <h1 class="text-capitalize oxanium fw-bold text-center fs-3 py-3">{{recipt.option}}</h1>
                </div>
                <div class="row justify-content-between">
                    <div class="col-md-6 col-lg-6">
                        <ul class="list-none p-2">
                            <li>{% trans "Created" %}:<b class="small"> {{recipt.created}}</b></li>
                            <li>N°: <b>{{recipt.invoice}}</b></li>
                        </ul>
                    </div>
                    <div class="col-md-6 col-lg-6">
                        <ul class="list-none p-2">
                            <li>{% trans "Client" %}: {{recipt.client}}</li>
                            <li>{% trans "Address" %}: {{recipt.address}}</li>
                        </ul>    
                    </div>
                </div>
                <hr>
                <div class="d-flex justify-content-center align-items-center my-3">
                    <a href="https://emmerut.com/billings/payments/{{recipt.id}}" class="btn btn-danger">Pay Billing</a>
                </div>
                <div class="row justify-content-center">
                    <h1 class="text-capitalize oxanium fw-bold text-center fs-5 py-3">{% trans "Cost items" %}</h1>
                </div>
                <div class="row">
                    <table id="example" class="compact table table-borderless table-hover">
                        <thead>
                            <tr class="text-center">
                                <th style="width: 70%;"></th>
                                <th style="width: 30%;"></th>
                            </tr>
                        </thead>
                        <tbody>
                            {% if recipt.custom_charge.all %}
                                {% for item in recipt.custom_charge.all %}
                                    {% if item.qty > 10 %}
                                        <tr>
                                            <td class="text-center">{{item.field}} {{item.qty}}</td>
                                            <td class="text-center oxanium"> <b>${{item.amount}}</b></td>
                                        </tr>
                                    {% else %}
                                        <tr>
                                            <td class="text-center">{{item.field}}</td>
                                            <td class="text-center oxanium"> <b>${{item.amount}}</b></td>
                                        </tr>
                                    {% endif %}
                                {% endfor %}                               
                            {% else %}
                                {% for item in recipt.charge.all %}
                                    {% if item.qty > 10 %}
                                        <tr>
                                            <td class="text-center">{{item.field}} {{item.qty}}</td>
                                            <td class="text-center oxanium"> <b>${{item.amount}}</b></td>
                                        </tr>
                                    {% else %}
                                        <tr>
                                            <td class="text-center">{{item.field}}</td>
                                            <td class="text-center oxanium"> <b>${{item.amount}}</b></td>
                                        </tr>
                                    {% endif %}
                                {% endfor %} 
                            {% endif %}
                        </tbody>
                    </table>
                </div>
                <hr>
                {% if recipt.custom_discounts.all %}            
                    <div class="row justify-content-center">
                        <h1 class="text-capitalize oxanium fw-bold text-center fs-5 py-3">{% trans "Discounts" %}</h1>
                    </div>
                    <div class="row">
                        <table id="example" class="compact table table-borderless table-hover">
                            <thead>
                                <tr class="text-center">
                                    <th style="width: 70%;"></th>
                                    <th style="width: 30%;"></th>
                                </tr>
                            </thead>
                            <tbody>
                                {% for item in recipt.custom_discounts.all %}
                                <tr>
                                    <td class="text-center">{{item.field}}</td>
                                    <td class="text-center oxanium"> <b>-${{item.amount}}</b></td>
                                </tr>
                                {% endfor %} 
                            </tbody>
                        </table>
                    </div>
                    <hr>
                {% else %}
                    {% if recipt.discounts.all  %}
                        <div class="row justify-content-center">
                            <h1 class="text-capitalize oxanium fw-bold text-center fs-5 py-3">{% trans "Discounts" %}</h1>
                        </div>
                        <div class="row">
                            <table id="example" class="compact table table-borderless table-hover">
                                <thead>
                                    <tr class="text-center">
                                        <th style="width: 70%;"></th>
                                        <th style="width: 30%;"></th>
                                    </tr>
                                </thead>
                                <tbody>
                                    {% for item in recipt.discounts.all %}
                                    <tr>
                                        <td class="text-center">{{item.field}} {{item.qty}}</td>
                                        <td class="text-center oxanium"> <b>-${{item.amount}}</b></td>
                                    </tr>
                                    {% endfor %} 
                                </tbody>
                            </table>
                        </div>
                        <hr>
                    {% endif %}
                {% endif %}
                <div class="row">
                    <table id="example" class="compact table table-borderless table-hover">
                        <thead>
                            <tr class="text-center">
                                <th style="width: 70%;"></th>
                                <th style="width: 30%;"></th>
                            </tr>
                        </thead>
                        <tbody>
                            {% if recipt.tax  %}
                                {% if recipt.custom_discounts.all %}
                                    <tr>                 
                                        <td class="text-right">{% trans "Subtotal" %}:</td>
                                        <td class="text-center oxanium"> <b>${{recipt.amount}}</b></td>
                                    </tr>
                                    <tr>
                                        <td class="text-right">{% trans "Discounts" %}:</td>
                                        <td class="text-center oxanium"> <b>-${{recipt.discount}}</b></td>
                                    </tr>
                                    <tr>
                                        <td class="text-right">{% trans "Tax" %}:</td>
                                        <td class="text-center oxanium"> <b>${{recipt.tax}}</b></td>
                                    </tr>
                                    <tr>
                                        <td class="text-right">{% trans "Total Amount" %}:</td>
                                        <td class="text-center oxanium"> <b>${{total}}</b></td>
                                    </tr>
                                {% elif recipt.discounts.all %}
                                    <tr>                 
                                        <td class="text-right">{% trans "Subtotal" %}:</td>
                                        <td class="text-center oxanium"> <b>${{recipt.amount}}</b></td>
                                    </tr>
                                    <tr>
                                        <td class="text-right">{% trans "Discounts" %}:</td>
                                        <td class="text-center oxanium"> <b>-${{recipt.discount}}</b></td>
                                    </tr>
                                    <tr>
                                        <td class="text-right">{% trans "Tax" %}:</td>
                                        <td class="text-center oxanium"> <b>${{recipt.tax}}</b></td>
                                    </tr>
                                    <tr>
                                        <td class="text-right">{% trans "Total Amount" %}:</td>
                                        <td class="text-center oxanium"> <b>${{total}}</b></td>
                                    </tr>
                                {% else %}
                                    <tr>                 
                                        <td class="text-right">{% trans "Subtotal" %}:</td>
                                        <td class="text-center oxanium"> <b>${{recipt.amount}}</b></td>
                                    </tr>
                                    <tr>
                                        <td class="text-right">{% trans "Discounts" %}:</td>
                                        <td class="text-center oxanium"> <b>-----</b></td>
                                    </tr>
                                    <tr>
                                        <td class="text-right">{% trans "Tax" %}:</td>
                                        <td class="text-center oxanium"> <b>${{recipt.tax}}</b></td>
                                    </tr>
                                    <tr>
                                        <td class="text-right">{% trans "Total Amount" %}:</td>
                                        <td class="text-center oxanium"> <b>${{total}}</b></td>
                                    </tr>
                                {% endif %}
                            {% else %}
                                {% if recipt.custom_discounts.all %}
                                    <tr>                 
                                        <td class="text-right">{% trans "Subtotal" %}:</td>
                                        <td class="text-center oxanium"> <b>${{recipt.amount}}</b></td>
                                    </tr>
                                    <tr>
                                        <td class="text-right">{% trans "Discounts" %}:</td>
                                        <td class="text-center oxanium"> <b>-${{recipt.discount}}</b></td>
                                    </tr>
                                    <tr>
                                        <td class="text-right">{% trans "Total Amount" %}:</td>
                                        <td class="text-center oxanium"> <b>${{total}}</b></td>
                                    </tr>
                                {% elif recipt.discounts.all %}
                                    <tr>                 
                                        <td class="text-right">{% trans "Subtotal" %}:</td>
                                        <td class="text-center oxanium"> <b>${{recipt.amount}}</b></td>
                                    </tr>
                                    <tr>
                                        <td class="text-right">{% trans "Discounts" %}:</td>
                                        <td class="text-center oxanium"> <b>-${{recipt.discount}}</b></td>
                                    </tr>
                                    <tr>
                                        <td class="text-right">{% trans "Total Amount" %}:</td>
                                        <td class="text-center oxanium"> <b>${{total}}</b></td>
                                    </tr>
                                {% else %}
                                    <tr>                 
                                        <td class="text-right">{% trans "Subtotal" %}:</td>
                                        <td class="text-center oxanium"> <b>${{recipt.amount}}</b></td>
                                    </tr>
                                    <tr>
                                        <td class="text-right">{% trans "Discounts" %}:</td>
                                        <td class="text-center oxanium"> <b>-----</b></td>
                                    </tr>
                                    <tr>
                                        <td class="text-right">{% trans "Total Amount" %}:</td>
                                        <td class="text-center oxanium"> <b>${{total}}</b></td>
                                    </tr>
                                {% endif %} 
                            {% endif %}
                        </tbody>
                    </table>
                </div>
                {% if recipt.report %}
                    <div class="row">
                        <h1 class="text-capitalize oxanium fw-bold fs-5 py-3 mx-2">{% trans "Service Report" %}:</h1>
                        {{recipt.report|safe}}
                    </div>    
                {% endif %}
                <div class="row justify-content-center min-vh-30">
                    <div class="col-lg-12 p-0">
                        <img class="w-100" src="https://get-stela.s3.amazonaws.com/img/footer.png" alt="">
                    </div>
                    <div class="col-12 footer-content">
                        <div class="row">
                            <div class="col-lg-8 text-dark text-justify">
                                <h3 class="small text-dark oxanium"><i class="fa-solid fa-location-dot mx-1"></i> Deere Park Cir, Apt 306, Bartlett IL United States</h3>
                                <h3 class="small text-dark oxanium"><i class="fa-brands fa-whatsapp mx-1"></i> +1 (619) 432-0711</h3>
                            </div>
                            <div class="col-lg-4">
                                <div class="row">
                                    <ul class="d-flex list-none fs-3 p-0 justify-content-evenly m-0">
                                        <li>
                                            <a href="https://www.instagram.com/usemmerut/" target=_blank><i class="fa-brands fa-instagram mx-1"></i></a>    
                                        </li>
                                        <li>
                                            <a href="https://www.linkedin.com/company/usemmerut/" target=_blank><i class="fa-brands fa-linkedin mx-1"></i></a>
                                        </li>
                                        <li>
                                            <a href="https://github.com/emmerut" target=_blank><i class="fa-brands fa-github mx-1"></i></a>
                                        </li>
                                        <li>
                                            <a href="https://www.tiktok.com/@emmerut.com?is_from_webapp=1&sender_device=pc" target=_blank><i class="fa-brands fa-tiktok mx-1"></i></a>
                                        </li>
                                    </ul>
                                    <a href="https://emmerut.com" class="fs-4 text-dark oxanium decor-none">emmerut.com</a>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="row">
                        <h1 class="text-dark text-center fs-5 mb-5">&#169; <span class="oxanium">Emmerut LLC | 2022</span></h1>
                    </div>
                </div>
            </div>
        </div>
    </div>
</body>
</html>