<h2>Audit Analysis Sheet</h2>

<div ng-if="!_printView && tab === 'master'">
    <h3>Client Master Data</h3>

    <table class="padded-table">
        <tr>
            <td>Client ID:</td>
            <td style="text-align: right;">{{ sourceData.ID }}</td>
        </tr>
        <tr>
            <td>Credit limit (USD):</td>
            <td style="text-align: right;">{{ sourceData.LIMIT_BAL }}</td>
        </tr>
        <tr>
            <td>Gender:</td>
            <td style="text-align: right;">{{ sourceData.SEX == 2 ? 'female' : 'male' }}</td>
        </tr>
        <tr>
            <td>Education Level:</td>
            <td style="text-align: right;">{{ sourceData.EDUCATION }}</td>
        </tr>
        <tr>
            <td>Marriage Status:</td>
            <td style="text-align: right;">{{ sourceData.MARRIAGE }}</td>
        </tr>
        <tr>
            <td>Age:</td>
            <td style="text-align: right;">{{ sourceData.AGE }}</td>
        </tr>
    </table>

    <hr>

    <h3>Asset Balances (loadable)</h3>

    <table class="padded-table">
        <tr>
            <td>Date of figures:</td>
            <td><input ng-model="resultsData.loadDate"></td>
        </tr>
        <tr>
            <td>Checking:</td>
            <td><input style="text-align: right;" ng-model="resultsData.checking"></td>
        </tr>
        <tr>
            <td>Savings:</td>
            <td><input style="text-align: right;" ng-model="resultsData.savings"></td>
        </tr>
        <tr>
            <td>Other Assets:</td>
            <td><input style="text-align: right;" ng-model="resultsData.otherAssets"></td>
        </tr>
    </table>

    <hr>

    <h3>Risk Evaluation</h3>

    <p><label>Risk evaluation:
      <select ng-model="resultsData.risk_evaluation">
          <option value=""></option>
          <option value="default_risk">Relevant default risk</option>
          <option value="low_risk">No indication of relevant default risk</option>
          <option value="investigate_further">Further investigation necessary</option>
          <option value="pending_response">Pending response from client adviser</option>
      </select>
    </label></p>

    <p><label>Comments: <br>
    <textarea ng-model="resultsData.evaluationComments" rows="5" cols="40"></textarea></label></p>

</div>

<div ng-if="!_printView && tab === 'payments'">
    <h3>Monthly Payment History</h3>

    <table class="padded-table">
        <tr>
            <th>&nbsp;</th>
            <th>Bill Amount</th>
            <th>Payment Amount</th>
            <th>Overdue months</th>
        </tr>
        <tr>
            <td>Previous month:</td>
            <td style="text-align: right;">{{ sourceData.BILL_AMT1 }}</td>
            <td style="text-align: right;">{{ sourceData.PAY_AMT1 }}</td>
            <td style="text-align: right;">{{ sourceData.PAY_0 }}</td>
        </tr>
        <tr>
            <td>Today - 2 months:</td>
            <td style="text-align: right;">{{ sourceData.BILL_AMT2 }}</td>
            <td style="text-align: right;">{{ sourceData.PAY_AMT2 }}</td>
            <td style="text-align: right;">{{ sourceData.PAY_2 }}</td>
        </tr>
        <tr>
            <td>Today - 3 months:</td>
            <td style="text-align: right;">{{ sourceData.BILL_AMT3 }}</td>
            <td style="text-align: right;">{{ sourceData.PAY_AMT3 }}</td>
            <td style="text-align: right;">{{ sourceData.PAY_3 }}</td>
        </tr>
        <tr>
            <td>Today - 4 months:</td>
            <td style="text-align: right;">{{ sourceData.BILL_AMT4 }}</td>
            <td style="text-align: right;">{{ sourceData.PAY_AMT4 }}</td>
            <td style="text-align: right;">{{ sourceData.PAY_4 }}</td>
        </tr>
        <tr>
            <td>Today - 5 months:</td>
            <td style="text-align: right;">{{ sourceData.BILL_AMT5 }}</td>
            <td style="text-align: right;">{{ sourceData.PAY_AMT5 }}</td>
            <td style="text-align: right;">{{ sourceData.PAY_5 }}</td>
        </tr>
        <tr>
            <td>Today - 6 months:</td>
            <td style="text-align: right;">{{ sourceData.BILL_AMT6 }}</td>
            <td style="text-align: right;">{{ sourceData.PAY_AMT6 }}</td>
            <td style="text-align: right;">{{ sourceData.PAY_6 }}</td>
        </tr>
    </table>
</div>

<div ng-if="_printView">
    <h3>Client Master Data</h3>

    <table class="padded-table">
        <tr>
            <td>Client ID:</td>
            <td style="text-align: right;">{{ sourceData.ID }}</td>
        </tr>
        <tr>
            <td>Credit limit (USD):</td>
            <td style="text-align: right;">{{ sourceData.LIMIT_BAL }}</td>
        </tr>
        <tr>
            <td>Gender:</td>
            <td style="text-align: right;">{{ sourceData.SEX == 2 ? 'female' : 'male' }}</td>
        </tr>
        <tr>
            <td>Education Level:</td>
            <td style="text-align: right;">{{ sourceData.EDUCATION }}</td>
        </tr>
        <tr>
            <td>Marriage Status:</td>
            <td style="text-align: right;">{{ sourceData.MARRIAGE }}</td>
        </tr>
        <tr>
            <td>Age:</td>
            <td style="text-align: right;">{{ sourceData.AGE }}</td>
        </tr>
    </table>

    <hr>

    <h3>Asset Balances</h3>

    <table class="padded-table">
        <tr>
            <td>Date of figures:</td>
            <td>{{ resultsData.loadDate }}</td>
        </tr>
        <tr>
            <td>Checking:</td>
            <td style="text-align: right;">{{ resultsData.checking }}</td>
        </tr>
        <tr>
            <td>Savings:</td>
            <td style="text-align: right;">{{ resultsData.savings }}</td>
        </tr>
        <tr>
            <td>Other Assets:</td>
            <td style="text-align: right;">{{ resultsData.otherAssets }}</td>
        </tr>
    </table>

    <hr>

    <h3>Risk Evaluation</h3>

    <p><b>Risk evaluation: </b> {{resultsData.risk_evaluation}}</p>

    <p><b>Comments:</b> <br>
        {{resultsData.evaluationComments}}</p>


    <h3>Monthly Payment History</h3>

    <table class="padded-table">
        <tr>
            <th>&nbsp;</th>
            <th>Bill Amount</th>
            <th>Payment Amount</th>
            <th>Overdue months</th>
        </tr>
        <tr>
            <td>Previous month:</td>
            <td style="text-align: right;">{{ sourceData.BILL_AMT1 }}</td>
            <td style="text-align: right;">{{ sourceData.PAY_AMT1 }}</td>
            <td style="text-align: right;">{{ sourceData.PAY_0 }}</td>
        </tr>
        <tr>
            <td>Today - 2 months:</td>
            <td style="text-align: right;">{{ sourceData.BILL_AMT2 }}</td>
            <td style="text-align: right;">{{ sourceData.PAY_AMT2 }}</td>
            <td style="text-align: right;">{{ sourceData.PAY_2 }}</td>
        </tr>
        <tr>
            <td>Today - 3 months:</td>
            <td style="text-align: right;">{{ sourceData.BILL_AMT3 }}</td>
            <td style="text-align: right;">{{ sourceData.PAY_AMT3 }}</td>
            <td style="text-align: right;">{{ sourceData.PAY_3 }}</td>
        </tr>
        <tr>
            <td>Today - 4 months:</td>
            <td style="text-align: right;">{{ sourceData.BILL_AMT4 }}</td>
            <td style="text-align: right;">{{ sourceData.PAY_AMT4 }}</td>
            <td style="text-align: right;">{{ sourceData.PAY_4 }}</td>
        </tr>
        <tr>
            <td>Today - 5 months:</td>
            <td style="text-align: right;">{{ sourceData.BILL_AMT5 }}</td>
            <td style="text-align: right;">{{ sourceData.PAY_AMT5 }}</td>
            <td style="text-align: right;">{{ sourceData.PAY_5 }}</td>
        </tr>
        <tr>
            <td>Today - 6 months:</td>
            <td style="text-align: right;">{{ sourceData.BILL_AMT6 }}</td>
            <td style="text-align: right;">{{ sourceData.PAY_AMT6 }}</td>
            <td style="text-align: right;">{{ sourceData.PAY_6 }}</td>
        </tr>
    </table>
</div>

