<?php
/**
 * @package     VikRentItems
 * @subpackage  com_vikrentitems
 * @author      Alessio Gaggii - e4j - Extensionsforjoomla.com
 * @copyright   Copyright (C) 2018 e4j - Extensionsforjoomla.com. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE
 * @link        https://vikwp.com
 */

/*
 * Some special tags between curly brackets can be used to display certain values such as:
 * {logo}, {company_name}, {order_id}, {order_status}, {order_date}, {customer_info},
 * {pickup_date}, {pickup_location}, {dropoff_date}, {dropoff_location}, {order_details}, {order_total},
 * {order_deposit}, {order_total_paid}, {order_link}, {footer_emailtext}
 *
 * The record of the order can be accessed from the following global array in case you need any extra content or to perform queries for a deeper customization level:
 * $order_details (order array)
 * Example: the ID of the order is contained in $order_details['id'] - you can see the whole array content with the PHP code "print_r($order_details);"
 *
 * It is also possible to access the customer information array by using this code:
 * $customer = VikRentItems::getCPinIstance()->getCustomerFromBooking($order_details['id']);
 * The variable $customer will always be an array, even if no customers were found. In this case, the array will be empty.
 * Debug the content of the array with the code "print_r($customer)" by placing it on any part of the PHP content below.
*/

defined('ABSPATH') or die('No script kiddies please!');

defined('_VIKRENTITEMSEXEC') OR die('Restricted Area');

?>

<center style="background: #fdfdfd; padding: 40px 0; color: #666; width: 100%; table-layout: fixed;">
    <p style="text-align: center;">{logo}</p>

    <div style="width:70%; padding-bottom: 20px; margin: 0 auto; font-family: 'Century Gothic', Tahoma, Arial;">
    <p style="text-align: center; font-size: 16px; font-weight: bold;">{company_name}</p>
        <div style="width:100%; float:none; clear:both; text-align: left;">
            <div style="background:#eee; border-radius:4px; border:1px solid #ddd; padding:10px; float:left; margin:0 5px 10px 0; height:25px; line-height:25px;">
                <?php echo JText::translate('VRIORDERNUMBER'); ?>: {order_id}
            </div>
            {confirmnumb_delimiter}
            <div style="background:#eee; border-radius:4px; border:1px solid #ddd; padding:10px; float:left; margin:0 5px 10px 0; height:25px; line-height:25px;">
                <span style="font-size: 16px; font-weight: bold;"><?php echo JText::translate('VRICONFIRMATIONNUMBER'); ?>: {confirmnumb}</span>
            </div>
            {/confirmnumb_delimiter}
            <div style="background:#eee; border-radius:4px; border:1px solid #ddd; padding:10px; float:left; margin:0 5px 10px 0; height:25px; line-height:25px;">
                <span style="font-size: 16px; font-weight: bold;"><?php echo JText::translate('VRLIBSEVEN'); ?>: <span class="{order_status_class}">{order_status}</span></span>
            </div>
            <div style="background:#eee; border-radius:4px; border:1px solid #ddd; padding:10px; float:left; margin:0 5px 10px 0; height:25px; line-height:25px;">
                <strong><?php echo JText::translate('VRLIBEIGHT'); ?>:</strong> {order_date}
            </div>
        </div>
        <div style="clear:both; float:none; padding:10px 20px; background: #fff; border:1px solid #eee; border-radius:4px; line-height:1.6em;">
            <h3 style="margin:0 0 10px 0; padding:0; font-size: 16px; font-weight: bold;"><?php echo JText::translate('VRLIBNINE'); ?>:</h3>
            {customer_info}
        </div>
        <div style="background:#fbfbfb; border:1px solid #eee; border-radius:4px; padding:10px 20px; margin:10px 0 0 0; text-align:left;">
            <div style="float:none; clear:both;">
                <div style="display:inline-block; border:1px solid #C9E9FC; border-radius:4px; padding:10px; margin:0 10px 0 0; background:#f6f6f6;">
                        
					<div>
						<span style="font-size: 14px; font-weight: bold;"><?php echo JText::translate('VRLIBELEVEN'); ?>:</span>
                    	<span style="font-size: 14px;">{pickup_date}</span>
 					</div>
					{if_pickup_location}
					<div>
                        <span style="font-size: 14px; font-weight: bold;"><?php echo JText::translate('VRRITIROITEM'); ?>: </span>
                        <span style="font-size: 14px;">{pickup_location}</span>
 					</div>	
                    {/if_pickup_location}
                </div>
                <div style="display: inline-block; border:1px solid #C9E9FC; border-radius:4px; padding:10px; margin:0 10px 0 0; background:#f6f6f6;">
                    <div>   
						<span style="font-size: 14px; font-weight: bold;"><?php echo JText::translate('VRLIBTWELVE'); ?>: </span>
                        <span style="font-size: 14px;">{dropoff_date}</span>
 					</div>
                    {if_dropoff_location}
					<div>
                        <span style="font-size: 14px; font-weight: bold;"><?php echo JText::translate('VRRETURNITEMORD'); ?>:</span>
                        <span style="font-size: 14px;">{dropoff_location}</span>
 					</div>
                    {/if_dropoff_location}
                </div>
            </div>
            <div>
                <p><span style="font-size: 16px; font-weight: bold;"><?php echo JText::translate('VRIORDERDETAILS'); ?>:</span></p>
                {order_details}
                <div style="margin:10px 0 0 0; color:#144D5C; border-top:1px solid #ddd; padding:10px 0 0 0;">
                    <span style="font-size: 14px; font-weight: bold;"><?php echo JText::translate('VRLIBSIX'); ?></span>
                    <span align="right"><strong>{order_total}</strong></span>
                </div>
                {order_deposit}
                {order_total_paid}
            </div>
            <br/>
            <p><br/>
                <span style="font-size:12px;">
                    <strong><?php echo JText::translate('VRLIBTENTHREE'); ?>:</strong><br/>
                    {order_link}
                </span><br/>
            </p>
            <span style="font-size:12px;">{footer_emailtext}</span>
        </div>
    </div>
</center>