<?php $__env->startSection('logo'); ?>
    <div id="logo">
        <img src="<?php echo $logo; ?>" alt="Company Logo" title="Company Logo" style="max-width: 250px">
    </div>
    <div id="company">
        <h2 class="name"><b>Invoice From</b></h2><br>
        <?php if(isset($editable)): ?>
            <div style="float:right;">
                <p><a href="#" id="InvoiceTemplateHeader" title="Invoice Header Content" data-inputclass="editable-textarea" class="invoice-editable form-control autogrow " style="height: auto" data-name="Header" data-type="textarea" data-placeholder="Press Ctrl + Enter to save" data-title="Header"><?php echo ($InvoiceTemplate->Header); ?></a></p>
                <h3><a href="#" style="display: none;" id="InvoiceTemplateName" data-placeholder="Press Ctrl + Enter to save" class="invoice-editable form-control" data-name="Name" data-type="text" title="Template Name"><?php echo $InvoiceTemplate->Name; ?></a></h3>
            </div>
        <?php else: ?>
            <div><?php echo nl2br($InvoiceTemplate->Header); ?></div>
        <?php endif; ?>
    </div>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('invoice_from'); ?>
        <table border="0" width="100%" cellpadding="0" cellspacing="0">
            <tr>
                <td class="col-md-6"  valign="top" >
                		<br>
                        <strong>Invoice To</strong>
                        <p> <?php echo Form::select('InvoiceToInfo', Invoice::$invoice_account_info, (!empty(Input::get('InvoiceToInfo'))?explode(',',Input::get('InvoiceFromInfo')):[]), array("class"=>"select2","multiple","data-allow-clear"=>"true","data-placeholder"=>"Select Account Info")); ?> </p>
                        <!--<p>John Doe
                        <br />
                        Mr Nilson Otto
                        <br />
                        FoodMaster Ltd</p>-->
                </td>
                <td class="col-md-6 text-right"  valign="top" >
                    <p>
                        <h2>Invoice No: <?php echo $InvoiceTemplate->InvoiceNumberPrefix.$InvoiceTemplate->InvoiceStartNumber; ?></h2><br>
                        <b>Invoice Date: </b><?php echo date('d-m-Y'); ?><br>
                        <b>Due Date: </b><?php echo date('d-m-Y',strtotime('+5 days')); ?></p>
                 </td>
                </tr>
                <tr>

            </tr>
        </table>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('usage_invoice_duration'); ?>
<?php if($InvoiceTemplate->ShowBillingPeriod == 1): ?>
            <table border="1" cellspacing="0" cellpadding="0" class="table table-bordered" style="width: 100%; ">
                <thead>
                <tr>
                    <th colspan="2" style="text-align: center; padding: 0;margin: 0" >Invoice Period</th>

                </tr>
                <tr>
                    <th style="text-align: center;">From</th>
                    <th style="text-align: center;">To</th>
                </tr>
                </thead>
                <tbody>
                <tr>
                    <td style="text-align: center;" >Fubruary 1,2006</td>
                    <td style="text-align: center;" >Fubruary 28,2006</td>
                </tr>
                </tbody>
            </table>
<?php endif; ?>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('usage_invoice_prevbal'); ?>

            <?php if($InvoiceTemplate->ShowPrevBal): ?>
            <table class="table table-bordered" style="width: 100%; text-align: right;">
                <tbody>
                <tr>
                    <td style="text-align: left;">Previous Balance</td>
                    <td style="text-align: right;">19.39</td>
                </tr>
                <tr>
                    <td style="border-top: 1px solid black;text-align: left;">Payments</td>
                    <td style="border-top: 1px solid black; text-align: right;">24.08</td>
                </tr>
                <tr>
                    <td style="border-top: 1px solid black;text-align: left;">Charges for this period</td>
                    <td style="border-top: 1px solid black; text-align: right;">90.18</td>
                </tr>
                <tr>
                    <td style="border-top: 2px solid black;text-align: left;">Total Due (USD)</td>
                    <td style="border-top: 2px solid black; text-align: right;">84.49</td>
                </tr>
                </tbody>
            </table>
            <?php endif; ?>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('items'); ?>
<h4>Item</h4>
                  <table  border="1"  width="100%" cellpadding="0" cellspacing="0" class="bg_graycolor invoice_total col-md-12 table table-bordered">
                  <thead>
                  <tr>
                      <th style="text-align: center;">Title</th>
                      <th style="text-align: left;">Description</th>
                      <th style="text-align: center;">Quantity</th>
                      <th style="text-align: center;">Price</th>
                      <th style="text-align: center;">Line Total</th>
                      <?php /*<th style="text-align: center;">Tax</th>*/ ?>
                      <th style="text-align: center;">Tax Amount</th>

                  </tr>
                  </thead>
                  <tbody>
                  <tr>
                      <td style="text-align: center;"  >Item 1</td>
                      <td style="text-align: left;" >Item Description</td>
                      <td style="text-align: center;" >2</td>
                      <td style="text-align: center;" >25</td>
                      <td style="text-align: center;" >50</td>
                      <?php /*<td style="text-align: center;" >VAT 20%</td>*/ ?>
                      <td style="text-align: center;" >10</td>
                  </tr>
                  </tbody>
              </table>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('subscriptiontotal'); ?>
<table  border="1"  width="100%" cellpadding="0" cellspacing="0" class="bg_graycolor invoice_total col-md-12 table table-bordered">

    <tfoot>
    <tr>
        <td>Usage</td>
        <td class="text-right">50.00</td>
    </tr>
    <tr>
        <td>Subscription</td>
        <td class="text-right">10.00</td>
    </tr>
    </tfoot>
</table>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('total'); ?>
<table  border="1"  width="100%" cellpadding="0" cellspacing="0" class="bg_graycolor invoice_total col-md-12 table table-bordered">

    <tfoot>
    <tr>
        <td>Sub Total</td>
        <td>50.00</td>
    </tr>
    <tr>
        <td>TAX</td>
        <td>10.00</td>
    </tr>
    <tr>
        <td>Invoice Total </td>
        <td>60.00 USD</td>
    </tr>
    </tfoot>
</table>
 <?php $__env->stopSection(); ?>
 <?php $__env->startSection('terms'); ?>

    <?php if(isset($editable)): ?>
        <p><a href="#" id="InvoiceTemplateTerms" class="invoice-editable form-control" style="height: auto" data-name="Terms" data-type="textarea" data-placeholder="Press Ctrl + Enter to save" data-title="Terms"><?php echo $InvoiceTemplate->Terms; ?></a></p>
    <?php else: ?>
        <p><?php echo nl2br($InvoiceTemplate->Terms); ?></p>
    <?php endif; ?>
 <?php $__env->stopSection(); ?>

 <?php $__env->startSection('footerterms'); ?>
    <div id="pdf_footer" class="">
    <table>
        <tbody>
            <tr>
          <td>
     <?php if(isset($editable)): ?>
         <p><a href="#" id="InvoiceTemplateFooter" class="invoice-editable form-control" style="height: auto" data-name="FooterTerm" data-type="textarea" data-placeholder="Press Ctrl + Enter to save" data-title="FooterTerm"><?php echo $InvoiceTemplate->FooterTerm; ?></a></p>
     <?php else: ?>
          <?php echo nl2br($InvoiceTemplate->FooterTerm); ?>

     <?php endif; ?>
                </td>
             </tr>
           </tbody></table>
     </div>
  <?php $__env->stopSection(); ?>

 <?php $__env->startSection('sub_usage'); ?>


        <?php if(isset($editable)): ?>
            <hr>
        <?php endif; ?>

        <?php if($InvoiceTemplate->InvoicePages == 'single_with_detail'): ?>
            <div class="page_break"> </div>
            <br/><br/><br/>
        <?php endif; ?>
     	<h4>Subscription Charges</h4>
            <table border="1"  width="100%" cellpadding="0" cellspacing="0" class="invoice col-md-12 table table-bordered">
                <thead>
                <tr>
                    <th style="text-align: center;">Title</th>
                    <th style="text-align: left;">Description</th>
                    <th style="text-align: center;">Price</th>
                    <th style="text-align: center;">Quantity</th>
                    <th style="text-align: center;">Date From</th>
                    <th style="text-align: center;">Date To</th>
                    <th style="text-align: center;">Line Total</th>
                </tr>
                </thead>
                <tbody>
                <tr>
                    <td style="text-align: center;"  >Fubruary 1,2006</td>
                    <td style="text-align: left;" >Usage From 22-06-2015 To 28-06-2015</td>
                    <td style="text-align: center;" >25</td>
                    <td style="text-align: center;" >1</td>
                    <td style="text-align: center;" >12-12-2015</td>
                    <td style="text-align: center;" >19-12-2015</td>
                    <td style="text-align: center;" >25</td>
                </tr>
                </tbody>
            </table>
            <br>
            <h4>Call Charges</h4>
            <table border="1"  width="100%" cellpadding="0" cellspacing="0" class="invoice col-md-12 table table-bordered">
                <thead>
                <tr>
                    <th style="text-align: center;">Title</th>
                    <th style="text-align: left;">Description</th>
                    <th style="text-align: center;">Price</th>
                    <th style="text-align: center;">Quantity</th>
                    <th style="text-align: center;">Date From</th>
                    <th style="text-align: center;">Date To</th>
                    <th style="text-align: center;">Line Total</th>
                </tr>
                </thead>
                <tbody>
                <tr>
                    <td style="text-align: center;"  >Fubruary 1,2006</td>
                    <td style="text-align: left;" >Usage From 22-06-2015 To 28-06-2015</td>
                    <td style="text-align: center;" >25</td>
                    <td style="text-align: center;" >1</td>
                    <td style="text-align: center;" >12-12-2015</td>
                    <td style="text-align: center;" >19-12-2015</td>
                    <td style="text-align: center;" >25</td>
                </tr>
                </tbody>
            </table>
            <br>
            <h4>Additional Charges</h4>
            <table border="1"  width="100%" cellpadding="0" cellspacing="0" class="invoice col-md-12 table table-bordered">
                <thead>
                <tr>
                    <th style="text-align: center;">Title</th>
                    <th style="text-align: left;">Description</th>
                    <th style="text-align: center;">Price</th>
                    <th style="text-align: center;">Quantity</th>
                    <th style="text-align: center;">Date</th>
                    <th style="text-align: center;">Line Total</th>
                </tr>
                </thead>
                <tbody>
                <tr>
                    <td style="text-align: center;"  >Yealink</td>
                    <td style="text-align: left;" >Yealink</td>
                    <td style="text-align: center;" >25</td>
                    <td style="text-align: center;" >1</td>
                    <td style="text-align: center;" >12-12-2015</td>
                    <td style="text-align: center;" >25</td>
                </tr>
                </tbody>
            </table>
            
<style>
#pdf_footer table {
	width:100%;
}
</style>
 <?php $__env->stopSection(); ?>