
<table class="table table-striped table-hover table-bordered">
    <thead>
        <tr>
            <th class="bold col-md-1"> <div align="center">Date </div></th>
            <th class="bold col-md-1"> <div align="center">For </div></th>
            <th class="bold"> <div align="center">{$title} </div></th>
        </tr>
    </thead>


    <tbody>
        {foreach $dates as $inv}
        {if $countWife[$inv["date"]] > 0 }
        <tr>
            {if $countHusband[$inv["date"]] > 0 }  <td rowspan="2"> {else} <td> {/if}
                {$inv["date"]}
            </td>
            <td>
                Wife
            </td>
            <td colspan="3">

                {foreach $inv.rayswG as $invest}
                <label style=" width: 32%; float: left; text-align: left; ">
                    <span>
                        <input type="checkbox" class="iiin" data-tableName="{$invest->tableName}" data-id="{$invest->id}"  value="{$invest->origin->id}" name="internalCheck[]"  data-name="{$invest->invname}" data-price="{$invest->origin->price}">
                    </span> {$invest->invname} ( {$invest->origin->price} )
                </label>
                {/foreach}
                {foreach $inv.rayswA as $invest}

                <label style=" width: 32%; float: left; text-align: left; ">
                    <span>
                        <input type="checkbox" class="iiin" data-tableName="{$invest->tableName}" data-id="{$invest->id}"  value="{$invest->origin->id}" name="internalCheck[]"  data-name="{$invest->invname}" data-price="{$invest->origin->price}">
                    </span> {$invest->invname} ( {$invest->origin->price} )
                </label>
                {/foreach}
                {foreach $inv.rayswN as $invest}

                <label style=" width: 32%; float: left;  text-align: left;">
                    <span>
                        <input type="checkbox" class="iiin" data-tableName="{$invest->tableName}" data-id="{$invest->id}"  value="{$invest->origin->id}" name="internalCheck[]"  data-name="{$invest->invname}" data-price="{$invest->origin->price}">
                    </span> {$invest->invname} ( {$invest->origin->price} )
                </label>
                {/foreach}
            </td>

        </tr>
        {/if}
        {if $countHusband[$inv["date"]] > 0 }
        <tr>
            {if $countWife[$inv["date"]] > 0 }{else}  <td> {$inv["date"]}</td>{/if}
            <td>
                Husband
            </td>

            <td colspan="3">

                {foreach $inv.rayshG as $invest}

                <label style=" width: 32%; float: left; text-align: left; ">
                    <span>
                        <input type="checkbox" class="iiin" data-tableName="{$invest->tableName}" data-id="{$invest->id}"  value="{$invest->origin->id}" name="internalCheck[]"  data-name="{$invest->invname}" data-price="{$invest->origin->price}">
                    </span> {$invest->invname} ( {$invest->origin->price} )
                </label>
                {/foreach}
                {foreach $inv.rayshA as $invest}

                <label style=" width: 32%; float: left;  text-align: left;">
                    <span>
                        <input type="checkbox" class="iiin" data-tableName="{$invest->tableName}" data-id="{$invest->id}"  value="{$invest->origin->id}" name="internalCheck[]"  data-name="{$invest->invname}" data-price="{$invest->origin->price}">
                    </span> {$invest->invname} ( {$invest->origin->price} )
                </label>
                {/foreach}
                {foreach $inv.rayshN as $invest}

                <label style=" width: 32%; float: left; text-align: left;">
                    <span>
                        <input type="checkbox" class="iiin" data-tableName="{$invest->tableName}" data-id="{$invest->id}"  value="{$invest->origin->id}" name="internalCheck[]"  data-name="{$invest->invname}" data-price="{$invest->origin->price}">
                    </span> {$invest->invname} ( {$invest->origin->price} )
                </label>
                {/foreach}
            </td>

        </tr>
        {/if}

        {/foreach}
    </tbody>


</table>

<input type="hidden"  name="title"  id="title"  value="{$title}">