{literal}
<style>
    center {
        margin-top: 15px;
    }

    th {
        background-color: #2D2D2D !important;
        background: #2D2D2D !important;
        border: 0px solid #000000 !important;
        border-width: 1px 1px 1px 1px !important;
        font-size: 15px !important;
        font-family: Arial !important;
        font-weight: bold !important;
        text-align: center !important;
    }

    td {
        border: 1px solid #000000 !important;
        padding: 0px 3px !important;
        font-size: 13px !important;
        font-family: tahoma !important;
        color: #000000 !important;
    }

</style>
{/literal}


<center><h4 class="modal-title">Customer debit note</h4></center>

<table class="table table-hover portlet light bg-inverse" id="repTable" style="width: 100%;">
    <thead>
        <tr>
            <th>   From</th>
            <td>{$fdate}</td>
            <th>   To</th>
            <td>{$todate}</td>
        </tr>

        <tr>
            <th>   Customer</th>
            <td colspan="3">{$orgName}</td>
        </tr>
    </thead>
</table>

<table class="table table-hover portlet light bg-inverse" id="repTable" style="width: 100%;">
    <thead>
        <tr>
            <th style="width: 10px !important;">#</th>
            <th>   Pt. Code</th>
            <th>   Reg. Date</th>
            <th >   Pt. Ref No.</th>
            <th>   Pt. Name</th>
            <th style="text-align:left ;">
                <span style="float:left ; width: 80%;">Service</span>
                <span style="float:right ; width: 20%;">Price</span>
            </th>
            <!--th>   Service      </th>
            <th>   Service    Price  </th-->
            <th>   Amount Due   </th>
            <th>   Vat   </th>
            <th>  Total  Amount Due   </th>
        </tr>
    </thead>
    <tbody>
        {assign var="i" value="1"}
        {foreach $allData as $data}
        <tr class="odd " >
            <td>{$i}</td>
            <td>{$data.code}</td>
            <td>{$data.visitdate}</td>
            <td>{$data.statusno}</td>
            <td>{$data.patient_name}</td>
            <td>{$data.testsWithPrice}</td>
            <!--td>{$data.tests}</td>
            <td>{$data.price}</td-->
            <td>{$data.cost}</td>
            <td>{$data.vat}</td>
            <td>{$data.total}</td>
        </tr>
        {assign var="i" value={$i+1}}
        {/foreach}
    </tbody>
</table>

<div id="totalDiv">
    {if !empty($allData)}
    <table class="table table-hover portlet light bg-inverse ">
        <tr>
        <tr>
            <th>   Amount Due      </th>
            <td>{$totalCost} </td>
            <th>   Vat     </th>
            <td>{$totalVat} </td>
            <th>  Total  Amount Due     </th>
            <td>{$totalDue} </td>
        </tr>
    </table>
    {/if}
</div>

