<div class="modal-dialog modal-lg">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h4 class="modal-title">Journal Details</h4>
            </div>
            <div class="modal-body">
                <table class="table table-striped table-bordered">
                    <thead>
                        <tr>
                            <th>Sl.</th>
                            <th>Date</th>
                            <th>Debit Account</th>
                            <th>Credit Account</th>
                            <th>Amount</th>
                            <th>Description</th>
                            <th>Created By</th>
                        </tr>
                    </thead>
                    <tbody>
                    @if($journal)
                    <?php $index=1; ?>
                    @foreach($journal as $jrnl)
                        <tr>
                            <td>{{ $index }}</td>
                            <td>{{ date('d M, Y',strtotime($jrnl->created_at)) }}</td>
                            <td>{{ $jrnl->debit?$jrnl->debit->name:'' }}</td>
                            <td>{{ $jrnl->credit?$jrnl->credit->name:'' }}</td>
                            <td>{{ $jrnl->amount }}</td>
                            <td>{{ $jrnl->description }}</td>
                            <td>{{ $jrnl->user?$jrnl->user->name:'' }}</td>
                        </tr>
                    <?php $index++; ?>
                    @endforeach
                    @endif
                    </tbody>
                </table>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
            <!--    <button type="button" class="btn btn-primary">Save changes</button> -->
            </div>
        </div>
    </div>