{% extends 'money/base.html' %}
<!--
#-- ***************************************************************************
#--
#-- version 1.00  : 1 July 2014
#-- version 2.00  : 22-Aug-2014 Change Logic to get all values for request.user
#-- version 2.01  : 23-Aug-2014 Rename Pockets - old_money to initial_amount
#                                                pocket_amount  to rename as sum_pocket
#                                                Summ_old_money_Pockets to Summ_initial_amount_Pockets
#-- version 2.02  : 23-Aug-2014 Logic to make Pocket Total Amount Functional
#-- version 2.03  : 26-Aug-2014 Summary to show only for User who is logged in
#-- version 2.04  : 26-Aug-2014 Fix add_expenditure and add_bank transactions to have only pockets of user logged in
#-- version 2.05  : 27-Aug-2014 add decorators - login_required
#-- version 2.06  : 27-Aug-2014 Alert if trying to add expenditure without pockets
#--
#-- version 1.00    : 1 July 2014
#-- version 2.00    :   22-Aug-2014 :   Adding Bootstrap sb-admin-2 to the base-Template and doing changes here
#                                       http://startbootstrap.com/template-overviews/sb-admin-2/
#-- version 2.01    :   2-Sept-2014 :   Bootstrapping add_expenditure.html
#-- version 2.07    :   3-Sept-2014 :   Fixing Table bootstrapping
#-- version 2.09    :   4-Sept-2014 :   add_expenditure - Link for Now below datetimepicker
#-- version 2.10    :   4-Sept-2014 :   edit_expenditure - Same as in
#                                       add_expenditure - on expenditure delete - delete pocket total
#                                      views.py - edit_expenditure
#-- version 2.11    :   4-Sept-2014 :  changed Edit_Expenditure form as only delete expenditure form
#                                       changes in - views.py forms.py
#-- version 2.12    :   4-Sept-2014 :   fluid bootstrap in all forms
#-- Authors - Paarth Batra
#--
#-- ***************************************************************************

#-- ***************************************************************************
-->
{% block title %}Edit Bank Transactions{% endblock %}

{% block body_block %}
    <div class="span12">
        {% if user.is_authenticated %}
            <div class="row">
                <form id="expenditure_form" role="form" class="form-inline" method="post"
                      action="/money/edit_bankTransactions/">
                    {% csrf_token %}
                    <div class="col-lg-6">
                        <br>

                        <div class="alert alert-info" role="alert"><strong>Delete Bank Transactions</strong></div>
                        <div class="table-responsive table-scrollable">
                            <table border=10 class="table table-striped table-bordered table-hover ">
                                <thead>
                                <hr>
                                <tr>
                                    <th>Serial No.</th>
                                    <th><label>Date:</label></th>
                                    <th><label for="id_description">Description:</label></th>
                                    <th><label for="id_amount">Amount</label></th>
                                    <th>Pocket</th>
                                    <th>Credit or Debit</th>
                                    <th></th>
                                    <th><label for="id_delete">Delete</label></th>
                                </tr>
                                </thead>
                                <tbody>
                                {{ formset.management_form }}
                                {% for form in formset %}
                                    <tr>
                                        <td>{{ forloop.counter }}</td>
                                        {% for field in form %}
                                            <td>  {{ field.class }} {{ field }}

                                            </td>

                                        {% endfor %}
                                    </tr>
                                    <br>

                                {% endfor %}
                                </tbody>
                            </table>
                        </div>
                        <!-- /.table-responsive -->
                        <!-- /.col-lg-6 -->
                    </div>
                    <input type="submit" class="btn btn-primary" name="submit" value="Delete"/>
                </form>
                <!--row-->
            </div>
        {% else %}
            <h1> Dont Try to be over smart - Log in here </h1>
            <ui>
                <li><a href="/money/register/">Register</a></li>
                <li><a href="/money/login/">Login</a></li>
            </ui>
        {% endif %}
        <!--span 12-->
    </div>
{% endblock %}

