
    <table class="table table-striped table-hover table-bordered" id="presTable">
                            <thead>
                                <tr>
                                    <th class="col-md-1">
                                        Date
                                    </th>
                                    <th  class="col-md-1">
                                        Drug For
                                    </th>   
                                    <th>
                                        Drug Name
                                    </th>   
                                    
                                    <th class="col-md-1">
                                        Edit
                                    </th>
                                    <th class="col-md-1">
                                        Print
                                    </th>
                                    
                                </tr>
                            </thead>
                            
                            <tbody>
                                {assign var=i value=1}
                                {foreach  $dates as $date}
                                {if $countWife[$date["date"]] > 0 }
                                <tr>
                                  {if $countHusband[$date["date"]] > 0 }  <td rowspan="2"> {else} <td> {/if}
                                        {$date["date"]}  
                                    </td>
                                    <td>
                                        Wife
                                    </td>
                                    <td>
                                        {$date["drugdos"]}
                                    </td>
                                    
                                    <td>
                                        <a href="#"  class="btn green btn-block btn-xs editPre" data-for="0"  data-date="{$date['date']}" data-controller="infertility"> Edit </a>
                                    </td>
                                    <td>
                                        <a href="#"  class="btn green btn-block btn-xs printPre" data-for="0" data-date="{$date['date']}" data-controller="infertility"> Print </a>
                                    </td>
                                    
                                </tr>
                                {/if}
                                {if $countHusband[$date["date"]] > 0 }
                                <tr>
                                    {if $countWife[$date["date"]] > 0 }{else}  <td> {$date["date"]}</td>{/if}
                                    <td>
                                        Husband
                                    </td>
                                    <td>
                                        {$date["drugtype"]}
                                    </td>
                                    
                                    <td>
                                        <a href="#"  class="btn green btn-block btn-xs editPre" data-for="1" data-date="{$date['date']}" data-controller="infertility"> Edit </a>
                                    </td>
                                    <td>
                                        <a href="#"  class="btn green btn-block btn-xs printPre" data-for="1" data-date="{$date['date']}" data-controller="infertility"> Print </a>
                                    </td>
                                    
                                </tr>
                                {/if}
                                {capture assign=i}{$i+1}{/capture}
                                  {/foreach}
                            </tbody>
                            
                        </table>



