{% extends "base.html" %}
{% block title %}Update ITAT Record{% endblock %}
{% block extra_css %}
<!-- Child page CSS -->
<link rel="stylesheet" href="{{ url_for('static', filename='css/add_itat.css') }}">
{% endblock %}
{% block content %}

<div class="container">

    <h2>Update ITAT Record for Year {{ record.year }}</h2>

    <form method="POST" action="{{ url_for('update_itat', id=record.id) }}">

        <label>Year:</label>
        <input type="number" name="year" step="1" value="{{ record.year }}" readonly>

        <label>MAT Tax Credit:</label>
        <input type="number" name="mat_tax_credit" step="0.01" value="{{ record.mat_tax_credit }}" required>

        <label>Surcharge:</label>
        <input type="number" name="surcharge" step="0.01" value="{{ record.surcharge }}" required>

        <label>Cess:</label>
        <input type="number" name="cess" step="0.01" value="{{ record.cess }}" required>

        <label>Total Credit:</label>
        <input type="number" name="total_credit" step="0.01" value="{{ record.total_credit }}" required>

        <button type="submit">Update Record</button>
    </form>

</div>

{% endblock %}

{% block extra_js %}
<script src="{{ url_for('static', filename='js/toggle.js') }}"></script>
<script src="{{ url_for('static', filename='js/cit_calc.js') }}"></script>
<script src="{{ url_for('static', filename='js/year_dropdown.js') }}"></script>
{% endblock %}