
@if(!empty($account_history_data))

    @foreach($account_history_data as $revolving)
    @php
        $counter = 1;
        $sub_account_history_data = $revolving;
        $value_data = $revolving['data'];

        $transUnion = (array_shift($revolving['data']['TransUnion']));
        $experian = (array_shift($revolving['data']['Experian']));
        $equifax = (array_shift($revolving['data']['Equifax']));


    @endphp
         <table border="1" bordercolor="#eeeeee" cellpadding="0" cellspacing="0" width="560" >
        <tbody>
        <tr>
            <td>
                <table border="0" cellpadding="0" cellspacing="0" width="560">
                    <tbody>
                    <tr>
                        <td class="crWhiteTradelineHeader" width="5">
                        </td>
                        <td class="crWhiteTradelineHeader">
                            <b>
                                {{$revolving['title']}}
                            </b>
                        </td>
                    </tr>
                    </tbody>
                </table>
                <table border="0" bordercolor="#eeeeee" cellpadding="0" cellspacing="0" width="560">
                    <tbody>
                    <tr>
                        <td>
                            <table border="0" cellpadding="0" cellspacing="0" class="crLightTableBackground" width="558">
                                <tbody>
                                <tr>
                                    <td class="crTableHeader" width="138">               </td>
                                    <td class="tranunionHeaderColum" width="140">                TransUnion               </td>
                                    <td class="experianHeaderColum" width="140">                Experian               </td>
                                    <td class="equifaxHeaderColum" width="140">                Equifax               </td>
                                </tr>
                                @foreach($sub_account_history_data['key_data'] as $keys => $values)
                                    @php

                                        if(isRowVisibleInCreditReportHtml($keys,$sub_account_history_data)){
                                               continue;
                                           }
                                        $class = 'crLightTableBackground';
                                        $class1 = '';
                                           if($counter % 2 == 0){
                                               $class = 'crTableBackground';
                                               $class1 = 'accountHistoryColorRow';
                                           }

                                    @endphp
                                    <tr class="{{$class}}">
                                        <td class="{{$class1}}">
                                            <b>
                                               {{$values['title']}}:
                                            </b>
                                        </td>
                                        <td class="{{$class1}}" >

                                                    @if(!empty($value_data['TransUnion']))
                                                         @foreach($value_data['TransUnion'] as $transUnion)

                                                            {{ getCreditReportAccountHistoryInfo($transUnion,$keys) }}

                                                            <br/>
                                                         @endforeach
                                                    @else
                                                        --
                                                    @endif

                                        </td>
                                        <td class="{{$class1}}" >
                                            @if(!empty($value_data['Experian']))
                                                @foreach($value_data['Experian'] as $experian)

                                                    {{ getCreditReportAccountHistoryInfo($experian,$keys) }}
                                                    <br/>
                                                @endforeach
                                            @else
                                                --
                                            @endif

                                            </td>
                                        <td class="{{$class1}}">
                                                @if(!empty($value_data['Equifax']))
                                                    @foreach($value_data['Equifax'] as $equifax)

                                                        {{ getCreditReportAccountHistoryInfo($equifax,$keys) }}
                                                    <br/>
                                                    @endforeach
                                                @else
                                                    --
                                                 @endif

                                            </td>
                                    </tr>

                                      @php  $counter++ @endphp
                                    @endforeach
                                    </tbody>
                                </table>
                            </td>
                        </tr>
                        </tbody>
                    </table>
                </td>
            </tr>
            </tbody>
        </table>

          {{--    Two-Year payment history Start--}}

           @include('partials.credit_report.two_years_payment_history',['transUnion'=>$transUnion,'experian'=>$experian,'equifax'=>$equifax])

          {{-- Days Late - 7 Year History Start --}}

          @include('partials.credit_report.seven_years_account_history',['transUnion'=>$transUnion,'experian'=>$experian,'equifax'=>$equifax])

    @endforeach

@endif










