<?php if(isset($record) and empty($record)){ ?>
<div class="widget-title">
    <h4><i class="icon-reorder"></i> Detail</h4>
    <span class="tools"><a class="back_table" href="javascript:;">Back to listing</a></span>
</div>

<div class="widget-body">
    <table class="table table-borderless">
        <tr>
            <td class="span2 redMsg">No record found.</td>
            <td>&nbsp;</td>
        </tr>
        <tr>
            <td class="span2">&nbsp;</td>
            <td><input type="button" class="btn back_table btn-success form-submit" id="btn_submit" value="Back to listing" /></td>
        </tr>
    </table>
</div>
<?php } else { ?>
<div class="widget-title">
    <h4><i class="icon-reorder"></i> Transactions Details</h4>
    <span class="tools"><a class="back_table" href="javascript:;">Back to listing</a></span>
</div>
<div class="widget-body">
    <table class="table table-borderless">
        <tr>
        <td colspan="2" style="border: none !important;"><h4>Student Information</h4></td>
        </tr>
        <tr>
            <td class="span2">Student Name:</td>
            <td><?php echo $record['member']['v_first_name']." ".$record['member']['v_last_name']; ?></td>
        </tr>
        <tr>
            <td class="span2">Student ID:</td>
            <td><?php echo $record['member']['v_student_id']; ?></td>
        </tr>
        <tr>
            <td class="span2">Transaction Type:</td>
            <td><?php echo $record['e_transaction_type']; ?></td>
        </tr>
        <tr>
            <td class="span2">Transaction ID:</td>
            <td><?php echo $record['id']; ?></td>
        </tr>
        <tr><td colspan="2"></td></tr>
        <tr>
            <td colspan="2" style="border: none !important;"><h4>Trancation Details</h4></td>
        </tr>
        <?php if($record['e_transaction_type'] == 'Donation'): ?>
            <tr>
                <td class="span2">Date Sent:</td>
                <td><?php echo date('m/d/Y',strtotime($record['d_donation_sent_date'])); ?></td>
            </tr>
            <tr>
                <td class="span2">For Previous Month Of:</td>
                <td><?php echo $record['v_donation_prev_month']; ?></td>
            </tr>
            <tr>
                <td class="span2">Basis Of Tithe Amount:</td>
                <td><?php echo $record['i_donation_basic_tithe_amt'].'%'; ?></td>
            </tr>
            <tr>
                <td class="span2">Tithe Amount:</td>
                <td><?php echo $record['f_donation_tithe_amt']; ?></td>
            </tr>
            <tr>
                <td class="span2">Gift Offering:</td>
                <td><?php echo $record['f_donation_gift_offer']; ?></td>
            </tr>
            <tr>
                <td class="span2">Total Amount:</td>
                <td><?php echo $record['f_donation_total_amt']; ?></td>
            </tr>
            <tr>
                <td class="span2">Member Type:</td>
                <td><?php echo $record['v_member_type']; ?></td>
            </tr>
            <tr>
                <td class="span2">Receipt No:</td>
                <td><?php echo $record['v_receipt_number']; ?></td>
            </tr>
            <tr>
                <td class="span2">Date Received:</td>
                <td><?php echo date('m/d/Y',strtotime($record['d_date_received'])); ?></td>
            </tr>
            <tr>
                <td class="span2">Recorded By:</td>
                <td><?php echo $record['v_recorded_by']; ?></td>
            </tr>
        <?php else: ?>
            <tr>
                <td class="span2">Date:</td>
                <td><?php echo date('m/d/Y',strtotime($record['d_tuition_transaction_date'])); ?></td>
            </tr>
            <tr>
                <td class="span2">Tuition Contract:</td>
                <td><?php echo $record['f_tuition_Contract']; ?></td>
            </tr>
            <tr>
                <td class="span2">Previous Balance:</td>
                <td><?php echo $record['f_tuition_prev_balance']; ?></td>
            </tr>
            <tr>
                <td class="span2">Payment Received:</td>
                <td><?php echo $record['f_tuition_payment_received']; ?></td>
            </tr>
            <tr>
                <td class="span2">Present Balance:</td>
                <td><?php echo $record['f_tuition_present_balance']; ?></td>
            </tr>
            <tr>
                <td class="span2">Special Note:</td>
                <td><?php echo $record['v_tuition_special_note']; ?></td>
            </tr>
        <?php endif; ?>
        <tr>
            <td class="span2">&nbsp;</td>
            <td><input type="button" class="btn back_table btn-success form-submit" id="btn_submit" value="Back to listing" /></td>
        </tr>
      </table>
</div>
<?php } ?>