
<style>
    table{
        margin: 20px auto;
        width: 100%;
    }

    caption{
        border:1px solid #000;
    }

    table, th, td {
        border:1px solid #000;
        border-collapse: collapse;
    }
    .table-2{
        border:0;
    }

    th{
        text-align: left;
    }

    h2{
        text-align: center;
    }

    .table-2 th{
        text-align: center;
    }

    table td {
        border:1px solid #111;
    }
</style>

<table class="table-black">
    <caption>{$headName}</caption>

    <tr>
        <th>Provider Name</th>
        <td>{if $branch } {$branch->branchName}{else} All {/if}</td>
    </tr>
    <tr>
        <th>Provider Id</th>
        <td>{if $branch } {$branch->branchId}  {else} All {/if}</td>
    </tr>
    <tr>
        <th>Batch Month</th>
        <td>{if $batchMonthFrom}{$batchMonthFrom}{else} -{/if}</td>
    </tr>
    <tr>
        <th>Date</th>
        <td>{$today}</td>
    </tr>
</table>


<h2>{$insuranceCompany->name}</h2>

<table class="table-2 table-black" >
    <tr>
        <th colspan="2" style="border:0">&nbsp;</th>
        <th colspan="4">Our patient</th>
    </tr>
    <tr>
        <th>1#</th>
        <th>Company Name</th>
        <th style="width:10%;">Gross Billed</th>
        <th style="width:10%;">Discount</th>
        <th style="width:10%;">deductible</th>
        <th style="width:10%;">Net Billed</th>
    </tr>
    {assign var=i value=1}
    {foreach $companyClientsBills as $data}
    <tr>
        <td>{$i}</td>
        <td> {$data->companyname}</td>
        <td>{$data->totalAccept}</td>
        <td>{$data->totalDiscount}</td>
        <td>{$data->totalCarry}</td>
        <td>{$data->totalNet}</td>
    </tr>
    {capture assign=i}{$i+1}{/capture}
    {/foreach}
    <tr>
        <th colspan="2">Total</th>
        <td>{$totalAccept}</td>
        <td>{$totalDiscount}</td>
        <td>{$totalCarry}</td>
        <td>{$totalNet}</td>
    </tr>

</table>


{literal}
<script>
    print_Custom('mycustomheader');
</script>
{/literal}

