{% extends "base.html" %}
{% block title %}{{ acct.name }} - BiweeklyBudget{% endblock %}
{% block body %}
{% include 'notifications.html' %}
            <div class="row" id="content-row">
                <div class="col-lg-12">
                    <div class="panel panel-default" id="panel-account">
                        <div class="panel-heading">
                            <i class="{{ acct|acct_icon }}"></i> {{ acct.name }} ({{ acct.id }})
                        </div>
                        <!-- /.panel-heading -->
                        <div class="panel-body">
                            <div class="table-responsive">
                                <table class="table table-bordered table-hover">
                                    <tbody>
                                        <tr>
                                            <th>Description</th>
                                            <td>{{ acct.description }}</td>
                                        </tr>
                                        <tr>
                                            <th>Type</th>
                                            <td>{{ acct.acct_type.name }}</td>
                                        </tr>
                                        <tr>
                                            <th>Ledger Balance</th>
                                            <td>{{ acct.balance.ledger|dollars }}</td>
                                        </tr>
                                        {% if acct.balance.avail is not none %}
                                        <tr>
                                            <th>Available Balance</th>
                                            <td>{{ acct.balance.avail|dollars }}</td>
                                        </tr>
                                        {% endif %}
                                        {% if acct.acct_type.name == 'Credit' %}
                                        <tr>
                                            <th>Credit Limit</th>
                                            <td>{{ acct.credit_limit|dollars }}</td>
                                        </tr>
                                        {% endif %}
                                        <tr>
                                            <th>Last OFX Data</th>
                                            {% if acct.is_stale %}
                                            <td class="data_age text-danger">{{ acct.ofx_statement.as_of|isodate }} ({{ acct.ofx_statement.as_of|ago }})</td>
                                            {% else %}
                                            <td class="data_age">{{ acct.ofx_statement.as_of|isodate }} ({{ acct.ofx_statement.as_of|ago }})</td>
                                            {% endif %}
                                        </tr>
                                        <tr>
                                            <th>Active?</th>
                                            {% if acct.is_active %}
                                            <td>{{ acct.is_active }}</td>
                                            {% else %}
                                            <td class="text-danger">{{ acct.is_active }}</td>
                                            {% endif %}
                                        </tr>
                                       <tr>
                                            <th>OFXGetter Config</th>
                                            <td><pre>{{ acct.ofxgetter_config_json }}</pre></td>
                                        </tr>
                                        <tr>
                                            <th>reconcile_trans</th>
                                            <td>{{ acct.reconcile_trans }}</td>
                                        </tr>
                                        <tr>
                                            <th>negate_ofx_amounts</th>
                                            <td>{{ acct.negate_ofx_amounts }}</td>
                                        </tr>
                                        <tr>
                                            <th>ofx_cat_memo_to_name</th>
                                            <td>{{ acct.ofx_cat_memo_to_name }}</td>
                                        </tr>
                                        <tr>
                                            <th>Interest Charge regex</th>
                                            <td><pre>{{ acct.re_interest_charge }}</pre></td>
                                        </tr>
                                        <tr>
                                            <th>Interest Paid regex</th>
                                            <td><pre>{{ acct.re_interest_paid }}</pre></td>
                                        </tr>
                                        <tr>
                                            <th>Payment regex</th>
                                            <td><pre>{{ acct.re_payment }}</pre></td>
                                        </tr>
                                        <tr>
                                            <th>Fee regex</th>
                                            <td><pre>{{ acct.re_fee }}</pre></td>
                                        </tr>
                                    </tbody>
                                </table>
                            </div>
                            <!-- /.table-responsive -->
                        </div>
                        <!-- /.panel-body -->
                    </div>
                    <!-- /.panel -->
                </div>
                <!-- /.col-lg-12 -->
            </div>
            <!-- /.row -->
{% endblock %}