Compare commits
19 Commits
a0f4568ba2
...
swapnil-de
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
38c5de14ce | ||
|
|
684e41e5c3 | ||
| b8c289294d | |||
| 2058cfed95 | |||
|
|
b9a8b9c0a9 | ||
| e5c349bbf4 | |||
| 4d26ee4f0f | |||
| 6e4efad834 | |||
| 64fc455f5c | |||
| 33e27f73b5 | |||
| eb12d4cd2e | |||
|
|
32b6ab9b10 | ||
|
|
b8d540263b | ||
| 9b1b8732ef | |||
| ded8d1f3b2 | |||
| 1819c49433 | |||
| aaab008a9d | |||
| a9af2cde8a | |||
|
|
a8e47af61c |
3
.env
3
.env
@@ -18,8 +18,9 @@ DB_DIALECT=mysql
|
|||||||
# DB_DRIVER=pymysql
|
# DB_DRIVER=pymysql
|
||||||
DB_HOST=127.0.0.1
|
DB_HOST=127.0.0.1
|
||||||
# DB_HOST=db # this is production for use docker
|
# DB_HOST=db # this is production for use docker
|
||||||
|
DB_NAME=income_tax_db
|
||||||
DB_PORT=3306
|
DB_PORT=3306
|
||||||
DB_NAME=test_income_taxdb
|
# DB_NAME=test_income_taxdb
|
||||||
DB_USER=root
|
DB_USER=root
|
||||||
DB_PASSWORD=root
|
DB_PASSWORD=root
|
||||||
|
|
||||||
|
|||||||
13
.gitignore
vendored
13
.gitignore
vendored
@@ -3,6 +3,7 @@
|
|||||||
*.pyc
|
*.pyc
|
||||||
*.pyo
|
*.pyo
|
||||||
*.pyd
|
*.pyd
|
||||||
|
__pycache__
|
||||||
|
|
||||||
# Ingnor upload files
|
# Ingnor upload files
|
||||||
static/uploads/
|
static/uploads/
|
||||||
@@ -15,3 +16,15 @@ logs/
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Environment variables
|
||||||
|
.env
|
||||||
|
|
||||||
|
# Python cache
|
||||||
|
__pycache__/
|
||||||
|
*.pyc
|
||||||
|
|
||||||
|
# OS / Editor
|
||||||
|
.vscode/
|
||||||
|
.idea/
|
||||||
|
__pycache__/
|
||||||
|
*.pyc
|
||||||
|
|||||||
@@ -32,33 +32,35 @@ class AOHandler:
|
|||||||
|
|
||||||
# Add AO record
|
# Add AO record
|
||||||
def add_ao(self, data):
|
def add_ao(self, data):
|
||||||
fields = [
|
|
||||||
'year', 'gross_total_income', 'disallowance_14a', 'disallowance_37',
|
try:
|
||||||
'deduction_80ia_business', 'deduction_80ia_misc', 'deduction_80ia_other',
|
fields= [ 'year', 'gross_total_income', 'disallowance_14a', 'disallowance_37',
|
||||||
'deduction_sec37_disallowance', 'deduction_80g',
|
'deduction_80ia_business', 'deduction_80ia_misc', 'deduction_80ia_other', 'deduction_sec37_disallowance', 'deduction_80g',
|
||||||
'net_taxable_income', 'tax_30_percent', 'tax_book_profit_18_5',
|
'net_taxable_income', 'per_tax_a', 'tax_a_cal', 'per_surcharge_a', 'surcharge_a_cal', 'per_cess_a', 'edu_cess_a_cal', 'sum_of_a',
|
||||||
'tax_payable', 'surcharge', 'edu_cess',
|
'per_tax_b', 'tax_b_cal', 'per_surcharge_b', 'surcharge_b_cal', 'per_cess_b', 'edu_cess_b_cal', 'sum_of_b',
|
||||||
'total_tax_payable', 'mat_credit_created', 'mat_credit_utilized',
|
'tax_payable','total_tax_payable', 'opening_balance', 'mat_credit_created', 'mat_credit_utilized', 'closing_balance',
|
||||||
'interest_234c', 'total_tax', 'advance_tax', 'tds', 'tcs',
|
'interest_234c', 'total_tax', 'advance_tax', 'tds', 'tcs', 'sat', 'tax_on_assessment', 'refund',
|
||||||
'sat', 'tax_on_assessment', 'refund', 'Remarks'
|
'interest_244a_per143', 'refund_received', 'balance_receivable', 'remarks', 'created_at'
|
||||||
]
|
]
|
||||||
|
|
||||||
values = [data.get(f, 0) for f in fields]
|
values = [data.get(f, 0) for f in fields]
|
||||||
|
|
||||||
self.cursor.callproc("InsertAO", values)
|
self.cursor.callproc("InsertAO", values)
|
||||||
self.conn.commit()
|
self.conn.commit()
|
||||||
|
except Exception as e:
|
||||||
|
self.conn.rollback()
|
||||||
|
raise e
|
||||||
|
finally:
|
||||||
|
self.cursor.close()
|
||||||
|
self.conn.close()
|
||||||
|
|
||||||
# UPDATE AO RECORD by AO id
|
# UPDATE AO RECORD by AO id
|
||||||
def update_ao(self, id, data):
|
def update_ao(self, id, data):
|
||||||
fields = [
|
fields= [ 'year', 'gross_total_income', 'disallowance_14a', 'disallowance_37',
|
||||||
'year', 'gross_total_income', 'disallowance_14a', 'disallowance_37',
|
'deduction_80ia_business', 'deduction_80ia_misc', 'deduction_80ia_other', 'deduction_sec37_disallowance', 'deduction_80g',
|
||||||
'deduction_80ia_business', 'deduction_80ia_misc', 'deduction_80ia_other',
|
'net_taxable_income', 'per_tax_a', 'tax_a_cal', 'per_surcharge_a', 'surcharge_a_cal', 'per_cess_a', 'edu_cess_a_cal', 'sum_of_a',
|
||||||
'deduction_sec37_disallowance', 'deduction_80g',
|
'per_tax_b', 'tax_b_cal', 'per_surcharge_b', 'surcharge_b_cal', 'per_cess_b', 'edu_cess_b_cal', 'sum_of_b',
|
||||||
'net_taxable_income', 'tax_30_percent', 'tax_book_profit_18_5',
|
'tax_payable','total_tax_payable', 'opening_balance', 'mat_credit_created', 'mat_credit_utilized', 'closing_balance',
|
||||||
'tax_payable', 'surcharge', 'edu_cess',
|
'interest_234c', 'total_tax', 'advance_tax', 'tds', 'tcs', 'sat', 'tax_on_assessment', 'refund',
|
||||||
'total_tax_payable', 'mat_credit_created', 'mat_credit_utilized',
|
'interest_244a_per143', 'refund_received', 'balance_receivable', 'remarks', 'updated_at'
|
||||||
'interest_234c', 'total_tax', 'advance_tax', 'tds', 'tcs',
|
|
||||||
'sat', 'tax_on_assessment', 'refund', 'Remarks'
|
|
||||||
]
|
]
|
||||||
|
|
||||||
values = [id] + [data.get(f, 0) for f in fields]
|
values = [id] + [data.get(f, 0) for f in fields]
|
||||||
@@ -99,20 +101,35 @@ class AOHandler:
|
|||||||
"gross_total_income": "Gross Total Income",
|
"gross_total_income": "Gross Total Income",
|
||||||
"disallowance_14a": "Add: Disallowance u/s 14A",
|
"disallowance_14a": "Add: Disallowance u/s 14A",
|
||||||
"disallowance_37": "Add: Disallowance u/s 37",
|
"disallowance_37": "Add: Disallowance u/s 37",
|
||||||
|
"-" : "-",
|
||||||
"deduction_80ia_business": "Less: Deduction u/s 80IA - On Business Income",
|
"deduction_80ia_business": "Less: Deduction u/s 80IA - On Business Income",
|
||||||
"deduction_80ia_misc": "On Misc Receipts",
|
"deduction_80ia_misc": "On Misc Receipts",
|
||||||
"deduction_80ia_other": "On Other",
|
"deduction_80ia_other": "On Other",
|
||||||
"deduction_sec37_disallowance": "On Sec 37 Disallowance",
|
"deduction_sec37_disallowance": "On Sec 37 Disallowance",
|
||||||
"deduction_80g": "Less: Deduction u/s 80G",
|
"deduction_80g": "Less: Deduction u/s 80G",
|
||||||
"net_taxable_income": "Net Taxable Income",
|
"net_taxable_income": "Net Taxable Income",
|
||||||
"tax_30_percent": "Tax @ 30%",
|
"-" : "-",
|
||||||
"tax_book_profit_18_5": "Tax @ 18.5% on Book Profit",
|
"per_tax_a" : "Per% Tax @(A)",
|
||||||
|
"tax_a_cal" : "Tax cal(A)",
|
||||||
|
"per_surcharge_a" : "Per% surcharge @(A)",
|
||||||
|
"surcharge_a_cal" : "Surcharge cal (A)",
|
||||||
|
"per_cess_a" : "Per% cess(A)",
|
||||||
|
"edu_cess_a_cal" : "Edu cess cal(A)",
|
||||||
|
"sum_of_a" : "Sum of tax_cal(A)",
|
||||||
|
"-" : "-",
|
||||||
|
"per_tax_b" : "Per% Tax @(B)",
|
||||||
|
"tax_b_cal" : "Tax cal(B)",
|
||||||
|
"per_surcharge_b" : "Per% surcharge @(B)",
|
||||||
|
"surcharge_b_cal" : "Surcharge cal (B)",
|
||||||
|
"per_cess_b" : "Per% cess(B)",
|
||||||
|
"edu_cess_b_cal" : "Edu cess cal(B)",
|
||||||
|
"sum_of_b" : "Sum of tax_cal(B)",
|
||||||
"tax_payable": "Tax Payable",
|
"tax_payable": "Tax Payable",
|
||||||
"surcharge": "Surcharge",
|
|
||||||
"edu_cess": "Education Cess",
|
|
||||||
"total_tax_payable": "Total Tax Payable",
|
"total_tax_payable": "Total Tax Payable",
|
||||||
|
"opening_balance": "Opening Balance",
|
||||||
"mat_credit_created": "Add: MAT Credit Created",
|
"mat_credit_created": "Add: MAT Credit Created",
|
||||||
"mat_credit_utilized": "Less: MAT Credit Utilized",
|
"mat_credit_utilized": "Less: MAT Credit Utilized",
|
||||||
|
"closing_balance": "Closing Balance",
|
||||||
"interest_234c": "Add: Interest u/s 234C",
|
"interest_234c": "Add: Interest u/s 234C",
|
||||||
"total_tax": "Total Tax",
|
"total_tax": "Total Tax",
|
||||||
"advance_tax": "Advance Tax",
|
"advance_tax": "Advance Tax",
|
||||||
@@ -120,8 +137,11 @@ class AOHandler:
|
|||||||
"tcs": "TCS",
|
"tcs": "TCS",
|
||||||
"sat": "SAT",
|
"sat": "SAT",
|
||||||
"tax_on_assessment": "Tax on Regular Assessment",
|
"tax_on_assessment": "Tax on Regular Assessment",
|
||||||
"refund": "Refund",
|
"refund" : "Refund",
|
||||||
"Remarks": "Remarks"
|
"interest_244a_per143" : "Add : Interest u/s 244A as per 143",
|
||||||
|
"refund_received" : "Less : Refund Received on",
|
||||||
|
"balance_receivable" : "Balance Receivable",
|
||||||
|
"Remarks" : "Remarks"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Vertical AO structure
|
# Vertical AO structure
|
||||||
|
|||||||
@@ -35,15 +35,13 @@ class CITHandler:
|
|||||||
|
|
||||||
# INSERT CIT RECORD
|
# INSERT CIT RECORD
|
||||||
def add_cit(self, data):
|
def add_cit(self, data):
|
||||||
columns = [
|
columns= [ 'year', 'gross_total_income', 'disallowance_14a', 'disallowance_37',
|
||||||
'year', 'gross_total_income', 'disallowance_14a', 'disallowance_37',
|
'deduction_80ia_business', 'deduction_80ia_misc', 'deduction_80ia_other', 'deduction_sec37_disallowance', 'deduction_80g',
|
||||||
'deduction_80ia_business', 'deduction_80ia_misc', 'deduction_80ia_other',
|
'net_taxable_income', 'per_tax_a', 'tax_a_cal', 'per_surcharge_a', 'surcharge_a_cal', 'per_cess_a', 'edu_cess_a_cal', 'sum_of_a',
|
||||||
'deduction_sec37_disallowance', 'deduction_80g',
|
'per_tax_b', 'tax_b_cal', 'per_surcharge_b', 'surcharge_b_cal', 'per_cess_b', 'edu_cess_b_cal', 'sum_of_b',
|
||||||
'net_taxable_income', 'tax_30_percent', 'tax_book_profit_18_5',
|
'tax_payable','total_tax_payable', 'opening_balance', 'mat_credit_created', 'mat_credit_utilized', 'closing_balance',
|
||||||
'tax_payable', 'surcharge', 'edu_cess',
|
'interest_234c', 'total_tax', 'advance_tax', 'tds', 'tcs', 'sat', 'tax_on_assessment', 'refund',
|
||||||
'total_tax_payable', 'mat_credit_created', 'mat_credit_utilized',
|
'interest_244a_per143', 'refund_received', 'balance_receivable', 'remarks', 'created_at'
|
||||||
'interest_234c', 'total_tax', 'advance_tax', 'tds', 'tcs',
|
|
||||||
'sat', 'tax_on_assessment', 'refund', 'Remarks'
|
|
||||||
]
|
]
|
||||||
|
|
||||||
values = [data.get(col, 0) for col in columns]
|
values = [data.get(col, 0) for col in columns]
|
||||||
@@ -53,15 +51,13 @@ class CITHandler:
|
|||||||
|
|
||||||
# UPDATE CIT RECORD
|
# UPDATE CIT RECORD
|
||||||
def update_cit(self, id, data):
|
def update_cit(self, id, data):
|
||||||
columns = [
|
columns= [ 'year', 'gross_total_income', 'disallowance_14a', 'disallowance_37',
|
||||||
'year', 'gross_total_income', 'disallowance_14a', 'disallowance_37',
|
'deduction_80ia_business', 'deduction_80ia_misc', 'deduction_80ia_other', 'deduction_sec37_disallowance', 'deduction_80g',
|
||||||
'deduction_80ia_business', 'deduction_80ia_misc', 'deduction_80ia_other',
|
'net_taxable_income', 'per_tax_a', 'tax_a_cal', 'per_surcharge_a', 'surcharge_a_cal', 'per_cess_a', 'edu_cess_a_cal', 'sum_of_a',
|
||||||
'deduction_sec37_disallowance', 'deduction_80g',
|
'per_tax_b', 'tax_b_cal', 'per_surcharge_b', 'surcharge_b_cal', 'per_cess_b', 'edu_cess_b_cal', 'sum_of_b',
|
||||||
'net_taxable_income', 'tax_30_percent', 'tax_book_profit_18_5',
|
'tax_payable','total_tax_payable', 'opening_balance', 'mat_credit_created', 'mat_credit_utilized', 'closing_balance',
|
||||||
'tax_payable', 'surcharge', 'edu_cess',
|
'interest_234c', 'total_tax', 'advance_tax', 'tds', 'tcs', 'sat', 'tax_on_assessment', 'refund',
|
||||||
'total_tax_payable', 'mat_credit_created', 'mat_credit_utilized',
|
'interest_244a_per143', 'refund_received', 'balance_receivable', 'remarks', 'updated_at'
|
||||||
'interest_234c', 'total_tax', 'advance_tax', 'tds', 'tcs',
|
|
||||||
'sat', 'tax_on_assessment', 'refund', 'Remarks'
|
|
||||||
]
|
]
|
||||||
|
|
||||||
values = [id] + [data.get(col, 0) for col in columns]
|
values = [id] + [data.get(col, 0) for col in columns]
|
||||||
@@ -100,20 +96,35 @@ class CITHandler:
|
|||||||
"gross_total_income": "Gross Total Income",
|
"gross_total_income": "Gross Total Income",
|
||||||
"disallowance_14a": "Add: Disallowance u/s 14A",
|
"disallowance_14a": "Add: Disallowance u/s 14A",
|
||||||
"disallowance_37": "Add: Disallowance u/s 37",
|
"disallowance_37": "Add: Disallowance u/s 37",
|
||||||
|
"-" : "-",
|
||||||
"deduction_80ia_business": "Less: Deduction u/s 80IA - On Business Income",
|
"deduction_80ia_business": "Less: Deduction u/s 80IA - On Business Income",
|
||||||
"deduction_80ia_misc": "On Misc Receipts",
|
"deduction_80ia_misc": "On Misc Receipts",
|
||||||
"deduction_80ia_other": "On Other",
|
"deduction_80ia_other": "On Other",
|
||||||
"deduction_sec37_disallowance": "On Sec 37 Disallowance",
|
"deduction_sec37_disallowance": "On Sec 37 Disallowance",
|
||||||
"deduction_80g": "Less: Deduction u/s 80G",
|
"deduction_80g": "Less: Deduction u/s 80G",
|
||||||
"net_taxable_income": "Net Taxable Income",
|
"net_taxable_income": "Net Taxable Income",
|
||||||
"tax_30_percent": "Tax @ 30%",
|
"-" : "-",
|
||||||
"tax_book_profit_18_5": "Tax @ 18.5% on Book Profit",
|
"per_tax_a" : "Per% Tax @(A)",
|
||||||
|
"tax_a_cal" : "Tax cal(A)",
|
||||||
|
"per_surcharge_a" : "Per% surcharge @(A)",
|
||||||
|
"surcharge_a_cal" : "Surcharge cal (A)",
|
||||||
|
"per_cess_a" : "Per% cess(A)",
|
||||||
|
"edu_cess_a_cal" : "Edu cess cal(A)",
|
||||||
|
"sum_of_a" : "Sum of tax_cal(A)",
|
||||||
|
"-" : "-",
|
||||||
|
"per_tax_b" : "Per% Tax @(B)",
|
||||||
|
"tax_b_cal" : "Tax cal(B)",
|
||||||
|
"per_surcharge_b" : "Per% surcharge @(B)",
|
||||||
|
"surcharge_b_cal" : "Surcharge cal (B)",
|
||||||
|
"per_cess_b" : "Per% cess(B)",
|
||||||
|
"edu_cess_b_cal" : "Edu cess cal(B)",
|
||||||
|
"sum_of_b" : "Sum of tax_cal(B)",
|
||||||
"tax_payable": "Tax Payable",
|
"tax_payable": "Tax Payable",
|
||||||
"surcharge": "Surcharge @ %",
|
|
||||||
"edu_cess": "Education Cess @ %",
|
|
||||||
"total_tax_payable": "Total Tax Payable",
|
"total_tax_payable": "Total Tax Payable",
|
||||||
|
"opening_balance": "Opening Balance",
|
||||||
"mat_credit_created": "Add: MAT Credit Created",
|
"mat_credit_created": "Add: MAT Credit Created",
|
||||||
"mat_credit_utilized": "Less: MAT Credit Utilized",
|
"mat_credit_utilized": "Less: MAT Credit Utilized",
|
||||||
|
"closing_balance": "Closing Balance",
|
||||||
"interest_234c": "Add: Interest u/s 234C",
|
"interest_234c": "Add: Interest u/s 234C",
|
||||||
"total_tax": "Total Tax",
|
"total_tax": "Total Tax",
|
||||||
"advance_tax": "Advance Tax",
|
"advance_tax": "Advance Tax",
|
||||||
@@ -121,8 +132,11 @@ class CITHandler:
|
|||||||
"tcs": "TCS",
|
"tcs": "TCS",
|
||||||
"sat": "SAT",
|
"sat": "SAT",
|
||||||
"tax_on_assessment": "Tax on Regular Assessment",
|
"tax_on_assessment": "Tax on Regular Assessment",
|
||||||
"refund": "Refund",
|
"refund" : "Refund",
|
||||||
"Remarks": "Remarks"
|
"interest_244a_per143" : "Add : Interest u/s 244A as per 143",
|
||||||
|
"refund_received" : "Less : Refund Received on",
|
||||||
|
"balance_receivable" : "Balance Receivable",
|
||||||
|
"Remarks" : "Remarks"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Vertical CIT structure (single record per year)
|
# Vertical CIT structure (single record per year)
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
from flask import Flask, render_template, request, redirect, url_for, send_from_directory, abort, flash,send_file
|
from flask import (
|
||||||
|
render_template, request, send_file, jsonify
|
||||||
|
)
|
||||||
from werkzeug.utils import secure_filename
|
from werkzeug.utils import secure_filename
|
||||||
import pandas as pd
|
import pandas as pd
|
||||||
import os
|
import os
|
||||||
@@ -17,11 +19,33 @@ class DocumentHandler:
|
|||||||
self.isSuccess = False
|
self.isSuccess = False
|
||||||
self.resultMessage = ""
|
self.resultMessage = ""
|
||||||
|
|
||||||
# VIEW DOCUMENTS
|
# =========================
|
||||||
|
# Utility: Parse Year
|
||||||
|
# =========================
|
||||||
|
def parse_year(self, year_value):
|
||||||
|
if not year_value:
|
||||||
|
return None
|
||||||
|
|
||||||
|
year_value = year_value.strip()
|
||||||
|
|
||||||
|
if year_value.isdigit():
|
||||||
|
return int(year_value)
|
||||||
|
|
||||||
|
try:
|
||||||
|
# "AY 2026-2027" → 2026
|
||||||
|
return int(year_value.split()[1].split('-')[0])
|
||||||
|
except Exception:
|
||||||
|
return None
|
||||||
|
|
||||||
|
# =========================
|
||||||
|
# View Documents
|
||||||
|
# =========================
|
||||||
def View(self, request):
|
def View(self, request):
|
||||||
year = request.args.get('year', '')
|
year_raw = request.args.get('year', '')
|
||||||
stage = request.args.get('stage', '')
|
stage = request.args.get('stage', '')
|
||||||
|
|
||||||
|
year = self.parse_year(year_raw)
|
||||||
|
|
||||||
dbconfig = DBConfig()
|
dbconfig = DBConfig()
|
||||||
connection = dbconfig.get_db_connection()
|
connection = dbconfig.get_db_connection()
|
||||||
|
|
||||||
@@ -30,15 +54,13 @@ class DocumentHandler:
|
|||||||
return
|
return
|
||||||
|
|
||||||
cursor = connection.cursor(dictionary=True)
|
cursor = connection.cursor(dictionary=True)
|
||||||
# --- FILTER QUERY ---
|
|
||||||
cursor.callproc("GetDocuments", [year, stage])
|
cursor.callproc("GetDocuments", [year, stage])
|
||||||
|
|
||||||
# fetch first result set
|
|
||||||
for result in cursor.stored_results():
|
for result in cursor.stored_results():
|
||||||
self.documents = result.fetchall()
|
self.documents = result.fetchall()
|
||||||
break
|
break
|
||||||
|
|
||||||
# ---- GET YEARS FROM STORED PROCEDURE ----
|
|
||||||
cursor.callproc("GetYear")
|
cursor.callproc("GetYear")
|
||||||
|
|
||||||
for result in cursor.stored_results():
|
for result in cursor.stored_results():
|
||||||
@@ -49,55 +71,72 @@ class DocumentHandler:
|
|||||||
|
|
||||||
cursor.close()
|
cursor.close()
|
||||||
connection.close()
|
connection.close()
|
||||||
|
|
||||||
self.isSuccess = True
|
self.isSuccess = True
|
||||||
|
|
||||||
|
# =========================
|
||||||
# Upload Documents
|
# Upload Documents
|
||||||
|
# =========================
|
||||||
def Upload(self, request):
|
def Upload(self, request):
|
||||||
dbconfig = DBConfig()
|
dbconfig = DBConfig()
|
||||||
connection = dbconfig.get_db_connection()
|
connection = dbconfig.get_db_connection()
|
||||||
|
|
||||||
if connection:
|
if not connection:
|
||||||
cursor = connection.cursor()
|
return
|
||||||
files = request.files.getlist('documents')
|
|
||||||
year = request.form['year']
|
|
||||||
stage = request.form['stage']
|
|
||||||
|
|
||||||
for file in files:
|
cursor = connection.cursor()
|
||||||
extension = file.filename.rsplit('.', 1)[1]
|
|
||||||
if extension not in FileHandler.ALLOWED_EXTENSIONS:
|
|
||||||
print("Skip invalid file type : ",extension)
|
|
||||||
continue
|
|
||||||
|
|
||||||
filename = secure_filename(file.filename)
|
files = request.files.getlist('documents')
|
||||||
filepath = os.path.join(FileHandler.UPLOAD_FOLDER, filename)
|
year_raw = request.form.get('year')
|
||||||
file.save(filepath)
|
stage = request.form.get('stage')
|
||||||
|
|
||||||
cursor.callproc('InsertDocument', [ filename, filepath, extension, year, stage ])
|
year = self.parse_year(year_raw)
|
||||||
|
|
||||||
connection.commit()
|
if not year:
|
||||||
cursor.close()
|
self.resultMessage = "Invalid year selected."
|
||||||
connection.close()
|
return
|
||||||
# return redirect(url_for('view_documents'))
|
|
||||||
|
|
||||||
def Summary_report(self, request):
|
for file in files:
|
||||||
dbconfig = DBConfig()
|
if '.' not in file.filename:
|
||||||
connection = dbconfig.get_db_connection()
|
continue
|
||||||
|
|
||||||
year_str = request.args.get('year')
|
extension = file.filename.rsplit('.', 1)[1].lower()
|
||||||
|
|
||||||
# If year not selected
|
if extension not in FileHandler.ALLOWED_EXTENSIONS:
|
||||||
if not year_str or not year_str.isdigit():
|
print("Skipping invalid file:", extension)
|
||||||
yearGetter = YearGet()
|
continue
|
||||||
allYears = yearGetter.get_year_by_model("AllYearsInAllModel")
|
|
||||||
yearGetter.close()
|
filename = secure_filename(file.filename)
|
||||||
return render_template(
|
filepath = os.path.join(FileHandler.UPLOAD_FOLDER, filename)
|
||||||
'summary_reports.html',
|
|
||||||
years=allYears,
|
file.save(filepath)
|
||||||
message="Please select a valid year to download."
|
|
||||||
|
cursor.callproc(
|
||||||
|
'InsertDocument',
|
||||||
|
[filename, filepath, extension, year, stage]
|
||||||
)
|
)
|
||||||
|
|
||||||
# Convert year to int (IMPORTANT FIX)
|
connection.commit()
|
||||||
year = int(year_str)
|
cursor.close()
|
||||||
|
connection.close()
|
||||||
|
|
||||||
|
# =========================
|
||||||
|
# Summary Preview (JSON)
|
||||||
|
# =========================
|
||||||
|
def Summary_preview(self, request):
|
||||||
|
"""
|
||||||
|
Returns JSON preview of summary report for selected year.
|
||||||
|
"""
|
||||||
|
year_raw = request.args.get("year")
|
||||||
|
year = self.parse_year(year_raw)
|
||||||
|
|
||||||
|
if not year:
|
||||||
|
return jsonify([])
|
||||||
|
|
||||||
|
dbconfig = DBConfig()
|
||||||
|
connection = dbconfig.get_db_connection()
|
||||||
|
if not connection:
|
||||||
|
return jsonify([])
|
||||||
|
|
||||||
try:
|
try:
|
||||||
stages = {
|
stages = {
|
||||||
@@ -112,11 +151,151 @@ class DocumentHandler:
|
|||||||
for stage_name, table_name in stages.items():
|
for stage_name, table_name in stages.items():
|
||||||
cursor = connection.cursor(dictionary=True)
|
cursor = connection.cursor(dictionary=True)
|
||||||
cursor.callproc("sp_get_stage_data", [table_name, year])
|
cursor.callproc("sp_get_stage_data", [table_name, year])
|
||||||
|
|
||||||
rows = []
|
rows = []
|
||||||
for result in cursor.stored_results():
|
for result in cursor.stored_results():
|
||||||
rows = result.fetchall()
|
rows = result.fetchall()
|
||||||
|
stage_data[stage_name] = pd.DataFrame(rows) if rows else pd.DataFrame()
|
||||||
|
cursor.close()
|
||||||
|
|
||||||
|
columns = [
|
||||||
|
'gross_total_income', 'disallowance_14a',
|
||||||
|
'disallowance_37',
|
||||||
|
'gross_total_income'+'disallowance_14a'+'disallowance_37',
|
||||||
|
'deduction_80ia_business',
|
||||||
|
'deduction_80ia_misc',
|
||||||
|
'deduction_80ia_other',
|
||||||
|
'deduction_sec37_disallowance',
|
||||||
|
'deduction_80g', '-',
|
||||||
|
'net_taxable_income',
|
||||||
|
'-',
|
||||||
|
'per_tax_a',
|
||||||
|
'tax_a_cal',
|
||||||
|
'per_surcharge_a',
|
||||||
|
'surcharge_a_cal',
|
||||||
|
'per_cess_a',
|
||||||
|
'edu_cess_a_cal',
|
||||||
|
'sum_of_a',
|
||||||
|
'-',
|
||||||
|
'per_tax_b',
|
||||||
|
'tax_b_cal',
|
||||||
|
'per_surcharge_b',
|
||||||
|
'surcharge_b_cal',
|
||||||
|
'per_cess_b',
|
||||||
|
'edu_cess_b_cal',
|
||||||
|
'sum_of_b',
|
||||||
|
'-',
|
||||||
|
'tax_payable',
|
||||||
|
'total_tax_payable',
|
||||||
|
'opening_balance',
|
||||||
|
'mat_credit_created',
|
||||||
|
'mat_credit_utilized',
|
||||||
|
'closing_balance',
|
||||||
|
'interest_234c', 'total_tax',
|
||||||
|
'-', 'advance_tax', 'tds',
|
||||||
|
'tcs', 'sat',
|
||||||
|
'tax_on_assessment',
|
||||||
|
'refund',
|
||||||
|
'interest_244a_per143',
|
||||||
|
'refund_received',
|
||||||
|
'balance_receivable',
|
||||||
|
'Remarks'
|
||||||
|
]
|
||||||
|
|
||||||
|
particulars = [
|
||||||
|
"Gross Total Income", "Add: Disallowance u/s 14A",
|
||||||
|
"Add: Disallowance u/s 37", "GTI as per",
|
||||||
|
"Less: Deduction u/s 80IA - On Business Income",
|
||||||
|
"- On Misc Receipts", "- On Other",
|
||||||
|
"- On Sec 37 Disallowance",
|
||||||
|
"Less: Deduction u/s 80G", "-",
|
||||||
|
"Net Taxable Income", "-",
|
||||||
|
"Per% Tax @(A)",
|
||||||
|
"Tax cal(A)",
|
||||||
|
"Per% surcharge @(A)",
|
||||||
|
"Surcharge cal (A)",
|
||||||
|
"Per% cess(A)",
|
||||||
|
"Edu cess cal(A)",
|
||||||
|
"Sum of tax_cal(A)",
|
||||||
|
"-",
|
||||||
|
"Per% Tax @(B)",
|
||||||
|
"Tax cal(B)",
|
||||||
|
"Per% surcharge @(B)",
|
||||||
|
"Surcharge cal (B)",
|
||||||
|
"Per% cess(B)",
|
||||||
|
"Edu cess cal(B)",
|
||||||
|
"Sum of tax_cal(B)",
|
||||||
|
"-",
|
||||||
|
"Tax Payable",
|
||||||
|
"Total Tax Payable",
|
||||||
|
"Opening Balance:",
|
||||||
|
"Add: MAT Credit Created",
|
||||||
|
"Less: MAT Credit Utilized",
|
||||||
|
"Closing Balance",
|
||||||
|
"Add: Interest u/s 234C",
|
||||||
|
"Total Tax", "-",
|
||||||
|
"Advance Tax", "TDS", "TCS", "SAT",
|
||||||
|
"Tax on Regular Assessment",
|
||||||
|
"Refund", "Add : Interest u/s 244A as per 143",
|
||||||
|
"Less : Refund Received on:","Balance Receivable","Remarks"
|
||||||
|
]
|
||||||
|
|
||||||
|
def safe_get(df, col):
|
||||||
|
return df[col].values[0] if col in df.columns and not df.empty else 0
|
||||||
|
|
||||||
|
preview = []
|
||||||
|
for i, part in enumerate(particulars):
|
||||||
|
preview.append({
|
||||||
|
"Particular": part,
|
||||||
|
"ITR": safe_get(stage_data['ITR'], columns[i]),
|
||||||
|
"AO": safe_get(stage_data['AO'], columns[i]),
|
||||||
|
"CIT": safe_get(stage_data['CIT'], columns[i]),
|
||||||
|
"ITAT": safe_get(stage_data['ITAT'], columns[i]),
|
||||||
|
})
|
||||||
|
|
||||||
|
return jsonify(preview)
|
||||||
|
|
||||||
|
finally:
|
||||||
|
connection.close()
|
||||||
|
|
||||||
|
def Summary_report(self, request):
|
||||||
|
dbconfig = DBConfig()
|
||||||
|
connection = dbconfig.get_db_connection()
|
||||||
|
|
||||||
|
year_raw = request.args.get('year')
|
||||||
|
|
||||||
|
# Safely parse year to int
|
||||||
|
try:
|
||||||
|
year = int(year_raw)
|
||||||
|
except (TypeError, ValueError):
|
||||||
|
year = None
|
||||||
|
|
||||||
|
if not year:
|
||||||
|
yearGetter = YearGet()
|
||||||
|
allYears = yearGetter.get_year_by_model("AllYearsInAllModel")
|
||||||
|
yearGetter.close()
|
||||||
|
|
||||||
|
return render_template(
|
||||||
|
'summary_reports.html',
|
||||||
|
years=allYears,
|
||||||
|
message="Please select a valid year to download."
|
||||||
|
)
|
||||||
|
|
||||||
|
try:
|
||||||
|
stages = {
|
||||||
|
"ITR": "itr",
|
||||||
|
"AO": "ao",
|
||||||
|
"CIT": "cit",
|
||||||
|
"ITAT": "itat",
|
||||||
|
}
|
||||||
|
|
||||||
|
stage_data = {}
|
||||||
|
|
||||||
|
for stage_name, table_name in stages.items():
|
||||||
|
cursor = connection.cursor(dictionary=True)
|
||||||
|
cursor.callproc("sp_get_stage_data", [table_name, year])
|
||||||
|
rows = []
|
||||||
|
for result in cursor.stored_results():
|
||||||
|
rows = result.fetchall()
|
||||||
stage_data[stage_name] = pd.DataFrame(rows) if rows else pd.DataFrame()
|
stage_data[stage_name] = pd.DataFrame(rows) if rows else pd.DataFrame()
|
||||||
cursor.close()
|
cursor.close()
|
||||||
|
|
||||||
@@ -124,25 +303,85 @@ class DocumentHandler:
|
|||||||
return df[col].values[0] if col in df.columns and not df.empty else "-"
|
return df[col].values[0] if col in df.columns and not df.empty else "-"
|
||||||
|
|
||||||
particulars = [
|
particulars = [
|
||||||
"Gross Total Income", "Add: Disallowance u/s 14A", "Add: Disallowance u/s 37",
|
"Gross Total Income", "Add: Disallowance u/s 14A",
|
||||||
"GTI as per", "Less: Deduction u/s 80IA - On Business Income", "- On Misc Receipts",
|
"Add: Disallowance u/s 37", "GTI as per",
|
||||||
"- On Other", "- On Sec 37 Disallowance", "Less: Deduction u/s 80G", " ",
|
"Less: Deduction u/s 80IA - On Business Income",
|
||||||
"Net Taxable Income", "Tax @ 30%", "Tax @ 18.5% on Book Profit",
|
"- On Misc Receipts", "- On Other",
|
||||||
"Tax Payable", "Surcharge @ %", "Education Cess @ %", "Total Tax Payable","Add: MAT Credit Created",
|
"- On Sec 37 Disallowance",
|
||||||
"Less: MAT Credit Utilized", "Add: Interest u/s 234C", "Total Tax", " ",
|
"Less: Deduction u/s 80G", "-",
|
||||||
|
"Net Taxable Income", "-",
|
||||||
|
"Per% Tax @(A)",
|
||||||
|
"Tax cal(A)",
|
||||||
|
"Per% surcharge @(A)",
|
||||||
|
"Surcharge cal (A)",
|
||||||
|
"Per% cess(A)",
|
||||||
|
"Edu cess cal(A)",
|
||||||
|
"Sum of tax_cal(A)",
|
||||||
|
"-",
|
||||||
|
"Per% Tax @(B)",
|
||||||
|
"Tax cal(B)",
|
||||||
|
"Per% surcharge @(B)",
|
||||||
|
"Surcharge cal (B)",
|
||||||
|
"Per% cess(B)",
|
||||||
|
"Edu cess cal(B)",
|
||||||
|
"Sum of tax_cal(B)",
|
||||||
|
"-",
|
||||||
|
"Tax Payable",
|
||||||
|
"Total Tax Payable",
|
||||||
|
"Opening Balance",
|
||||||
|
"Add: MAT Credit Created",
|
||||||
|
"Less: MAT Credit Utilized",
|
||||||
|
"Closing Balance",
|
||||||
|
"Add: Interest u/s 234C",
|
||||||
|
"Total Tax", "-",
|
||||||
"Advance Tax", "TDS", "TCS", "SAT",
|
"Advance Tax", "TDS", "TCS", "SAT",
|
||||||
"Tax on Regular Assessment", "Refund" , "Remarks"
|
"Tax on Regular Assessment",
|
||||||
|
"Refund", "Add : Interest u/s 244A as per 143",
|
||||||
|
"Less : Refund Received on","Balance Receivable","Remarks"
|
||||||
]
|
]
|
||||||
|
|
||||||
columns = [
|
columns = [
|
||||||
'gross_total_income', 'disallowance_14a', 'disallowance_37',
|
'gross_total_income', 'disallowance_14a',
|
||||||
'-', 'deduction_80ia_business','deduction_80ia_misc',
|
'disallowance_37',
|
||||||
'deduction_80ia_other', 'deduction_sec37_disallowance','deduction_80g', '-',
|
'gross_total_income'+'disallowance_14a'+'disallowance_37',
|
||||||
'net_taxable_income', 'tax_30_percent','tax_book_profit_18_5',
|
'deduction_80ia_business',
|
||||||
'tax_payable','surcharge', 'edu_cess', 'total_tax_payable',
|
'deduction_80ia_misc',
|
||||||
'mat_credit_created','mat_credit_utilized' , 'interest_234c','total_tax', '-',
|
'deduction_80ia_other',
|
||||||
'advance_tax', 'tds', 'tcs', 'sat',
|
'deduction_sec37_disallowance',
|
||||||
'tax_on_assessment', 'refund', 'Remarks'
|
'deduction_80g', '-',
|
||||||
|
'net_taxable_income',
|
||||||
|
'-',
|
||||||
|
'per_tax_a',
|
||||||
|
'tax_a_cal',
|
||||||
|
'per_surcharge_a',
|
||||||
|
'surcharge_a_cal',
|
||||||
|
'per_cess_a',
|
||||||
|
'edu_cess_a_cal',
|
||||||
|
'sum_of_a',
|
||||||
|
'-',
|
||||||
|
'per_tax_b',
|
||||||
|
'tax_b_cal',
|
||||||
|
'per_surcharge_b',
|
||||||
|
'surcharge_b_cal',
|
||||||
|
'per_cess_b',
|
||||||
|
'edu_cess_b_cal',
|
||||||
|
'sum_of_b',
|
||||||
|
'-',
|
||||||
|
'tax_payable',
|
||||||
|
'total_tax_payable',
|
||||||
|
'opening_balance',
|
||||||
|
'mat_credit_created',
|
||||||
|
'mat_credit_utilized',
|
||||||
|
'closing_balance',
|
||||||
|
'interest_234c', 'total_tax',
|
||||||
|
'-', 'advance_tax', 'tds',
|
||||||
|
'tcs', 'sat',
|
||||||
|
'tax_on_assessment',
|
||||||
|
'refund',
|
||||||
|
'interest_244a_per143',
|
||||||
|
'refund_received',
|
||||||
|
'balance_receivable',
|
||||||
|
'Remarks'
|
||||||
]
|
]
|
||||||
|
|
||||||
data = {
|
data = {
|
||||||
@@ -155,56 +394,44 @@ class DocumentHandler:
|
|||||||
|
|
||||||
df = pd.DataFrame(data)
|
df = pd.DataFrame(data)
|
||||||
|
|
||||||
# ===== Excel Export =====
|
|
||||||
output = io.BytesIO()
|
output = io.BytesIO()
|
||||||
|
|
||||||
with pd.ExcelWriter(output, engine='xlsxwriter') as writer:
|
with pd.ExcelWriter(output, engine='xlsxwriter') as writer:
|
||||||
sheet_name = f"AY {year} - {year + 1}"
|
sheet_name = f"AY {year}-{year + 1}"
|
||||||
df.to_excel(writer, index=False, sheet_name=sheet_name, startrow=2)
|
df.to_excel(writer, index=False, sheet_name=sheet_name, startrow=2)
|
||||||
|
|
||||||
workbook = writer.book
|
workbook = writer.book
|
||||||
worksheet = writer.sheets[sheet_name]
|
worksheet = writer.sheets[sheet_name]
|
||||||
|
|
||||||
# ===== Company Heading =====
|
title = workbook.add_format({
|
||||||
company_heading = workbook.add_format({
|
|
||||||
'bold': True,
|
'bold': True,
|
||||||
'font_size': 14,
|
'font_size': 14,
|
||||||
'font_color': 'black',
|
'align': 'center'
|
||||||
'align': 'center',
|
|
||||||
'valign': 'middle'
|
|
||||||
})
|
})
|
||||||
|
|
||||||
worksheet.merge_range(
|
worksheet.merge_range(
|
||||||
0, 0, 0, len(df.columns) - 1,
|
0, 0, 0, len(df.columns) - 1,
|
||||||
"Laxmi Civil Engineering Services Pvt Ltd",
|
"Laxmi Civil Engineering Services Pvt Ltd",
|
||||||
company_heading
|
title
|
||||||
)
|
)
|
||||||
|
|
||||||
# ===== Header Format =====
|
|
||||||
header = workbook.add_format({
|
header = workbook.add_format({
|
||||||
'bold': True,
|
'bold': True,
|
||||||
'align': 'center',
|
'align': 'center',
|
||||||
'valign': 'middle',
|
|
||||||
'bg_color': '#007bff',
|
'bg_color': '#007bff',
|
||||||
'font_color': 'white',
|
'font_color': 'white',
|
||||||
'border': 1
|
'border': 1
|
||||||
})
|
})
|
||||||
|
|
||||||
cell = workbook.add_format({
|
cell = workbook.add_format({'border': 1})
|
||||||
'border': 1,
|
|
||||||
'align': 'left',
|
|
||||||
'valign': 'middle'
|
|
||||||
})
|
|
||||||
|
|
||||||
# Write headers
|
|
||||||
for col_num, col_name in enumerate(df.columns):
|
for col_num, col_name in enumerate(df.columns):
|
||||||
worksheet.write(2, col_num, col_name, header)
|
worksheet.write(2, col_num, col_name, header)
|
||||||
max_len = max(df[col_name].astype(str).map(len).max(), len(col_name)) + 2
|
worksheet.set_column(col_num, col_num, 25)
|
||||||
worksheet.set_column(col_num, col_num, max_len)
|
|
||||||
|
|
||||||
# Write data rows
|
for row in range(len(df)):
|
||||||
for row in range(3, len(df) + 3):
|
|
||||||
for col in range(len(df.columns)):
|
for col in range(len(df.columns)):
|
||||||
worksheet.write(row, col, df.iloc[row - 3, col], cell)
|
worksheet.write(row + 3, col, df.iloc[row, col], cell)
|
||||||
|
|
||||||
worksheet.freeze_panes(3, 1)
|
worksheet.freeze_panes(3, 1)
|
||||||
|
|
||||||
@@ -218,4 +445,4 @@ class DocumentHandler:
|
|||||||
)
|
)
|
||||||
|
|
||||||
finally:
|
finally:
|
||||||
connection.close()
|
connection.close()
|
||||||
@@ -31,16 +31,15 @@ class ITATHandler:
|
|||||||
|
|
||||||
# INSERT ITAT (PROC)
|
# INSERT ITAT (PROC)
|
||||||
def add_itat(self, data):
|
def add_itat(self, data):
|
||||||
columns = [
|
columns= [ 'year', 'gross_total_income', 'disallowance_14a', 'disallowance_37',
|
||||||
'year', 'gross_total_income', 'disallowance_14a', 'disallowance_37',
|
'deduction_80ia_business', 'deduction_80ia_misc', 'deduction_80ia_other', 'deduction_sec37_disallowance', 'deduction_80g',
|
||||||
'deduction_80ia_business', 'deduction_80ia_misc', 'deduction_80ia_other',
|
'net_taxable_income', 'per_tax_a', 'tax_a_cal', 'per_surcharge_a', 'surcharge_a_cal', 'per_cess_a', 'edu_cess_a_cal', 'sum_of_a',
|
||||||
'deduction_sec37_disallowance', 'deduction_80g',
|
'per_tax_b', 'tax_b_cal', 'per_surcharge_b', 'surcharge_b_cal', 'per_cess_b', 'edu_cess_b_cal', 'sum_of_b',
|
||||||
'net_taxable_income', 'tax_30_percent', 'tax_book_profit_18_5',
|
'tax_payable','total_tax_payable', 'opening_balance', 'mat_credit_created', 'mat_credit_utilized', 'closing_balance',
|
||||||
'tax_payable', 'surcharge', 'edu_cess',
|
'interest_234c', 'total_tax', 'advance_tax', 'tds', 'tcs', 'sat', 'tax_on_assessment', 'refund',
|
||||||
'total_tax_payable', 'mat_credit_created', 'mat_credit_utilized',
|
'interest_244a_per143', 'refund_received', 'balance_receivable', 'remarks', 'created_at'
|
||||||
'interest_234c', 'total_tax', 'advance_tax', 'tds', 'tcs',
|
]
|
||||||
'sat', 'tax_on_assessment', 'refund', 'Remarks'
|
|
||||||
]
|
|
||||||
values = [data.get(col, 0) for col in columns]
|
values = [data.get(col, 0) for col in columns]
|
||||||
|
|
||||||
self.cursor.callproc("InsertITAT", values)
|
self.cursor.callproc("InsertITAT", values)
|
||||||
@@ -48,16 +47,14 @@ class ITATHandler:
|
|||||||
|
|
||||||
# UPDATE ITAT (PROC)
|
# UPDATE ITAT (PROC)
|
||||||
def update_itat(self, id, data):
|
def update_itat(self, id, data):
|
||||||
columns = [
|
columns= [ 'year', 'gross_total_income', 'disallowance_14a', 'disallowance_37',
|
||||||
'year', 'gross_total_income', 'disallowance_14a', 'disallowance_37',
|
'deduction_80ia_business', 'deduction_80ia_misc', 'deduction_80ia_other', 'deduction_sec37_disallowance', 'deduction_80g',
|
||||||
'deduction_80ia_business', 'deduction_80ia_misc', 'deduction_80ia_other',
|
'net_taxable_income', 'per_tax_a', 'tax_a_cal', 'per_surcharge_a', 'surcharge_a_cal', 'per_cess_a', 'edu_cess_a_cal', 'sum_of_a',
|
||||||
'deduction_sec37_disallowance', 'deduction_80g',
|
'per_tax_b', 'tax_b_cal', 'per_surcharge_b', 'surcharge_b_cal', 'per_cess_b', 'edu_cess_b_cal', 'sum_of_b',
|
||||||
'net_taxable_income', 'tax_30_percent', 'tax_book_profit_18_5',
|
'tax_payable','total_tax_payable', 'opening_balance', 'mat_credit_created', 'mat_credit_utilized', 'closing_balance',
|
||||||
'tax_payable', 'surcharge', 'edu_cess',
|
'interest_234c', 'total_tax', 'advance_tax', 'tds', 'tcs', 'sat', 'tax_on_assessment', 'refund',
|
||||||
'total_tax_payable', 'mat_credit_created', 'mat_credit_utilized',
|
'interest_244a_per143', 'refund_received', 'balance_receivable', 'remarks', 'updated_at'
|
||||||
'interest_234c', 'total_tax', 'advance_tax', 'tds', 'tcs',
|
]
|
||||||
'sat', 'tax_on_assessment', 'refund', 'Remarks'
|
|
||||||
]
|
|
||||||
values = [id] + [data.get(col, 0) for col in columns]
|
values = [id] + [data.get(col, 0) for col in columns]
|
||||||
|
|
||||||
self.cursor.callproc("UpdateITAT", values)
|
self.cursor.callproc("UpdateITAT", values)
|
||||||
@@ -94,20 +91,35 @@ class ITATHandler:
|
|||||||
"gross_total_income": "Gross Total Income",
|
"gross_total_income": "Gross Total Income",
|
||||||
"disallowance_14a": "Add: Disallowance u/s 14A",
|
"disallowance_14a": "Add: Disallowance u/s 14A",
|
||||||
"disallowance_37": "Add: Disallowance u/s 37",
|
"disallowance_37": "Add: Disallowance u/s 37",
|
||||||
|
"-" : "-",
|
||||||
"deduction_80ia_business": "Less: Deduction u/s 80IA - On Business Income",
|
"deduction_80ia_business": "Less: Deduction u/s 80IA - On Business Income",
|
||||||
"deduction_80ia_misc": "On Misc Receipts",
|
"deduction_80ia_misc": "On Misc Receipts",
|
||||||
"deduction_80ia_other": "On Other",
|
"deduction_80ia_other": "On Other",
|
||||||
"deduction_sec37_disallowance": "On Sec 37 Disallowance",
|
"deduction_sec37_disallowance": "On Sec 37 Disallowance",
|
||||||
"deduction_80g": "Less: Deduction u/s 80G",
|
"deduction_80g": "Less: Deduction u/s 80G",
|
||||||
"net_taxable_income": "Net Taxable Income",
|
"net_taxable_income": "Net Taxable Income",
|
||||||
"tax_30_percent": "Tax @ 30%",
|
"-" : "-",
|
||||||
"tax_book_profit_18_5": "Tax @ 18.5% on Book Profit",
|
"per_tax_a" : "Per% Tax @(A)",
|
||||||
|
"tax_a_cal" : "Tax cal(A)",
|
||||||
|
"per_surcharge_a" : "Per% surcharge @(A)",
|
||||||
|
"surcharge_a_cal" : "Surcharge cal (A)",
|
||||||
|
"per_cess_a" : "Per% cess(A)",
|
||||||
|
"edu_cess_a_cal" : "Edu cess cal(A)",
|
||||||
|
"sum_of_a" : "Sum of tax_cal(A)",
|
||||||
|
"-" : "-",
|
||||||
|
"per_tax_b" : "Per% Tax @(B)",
|
||||||
|
"tax_b_cal" : "Tax cal(B)",
|
||||||
|
"per_surcharge_b" : "Per% surcharge @(B)",
|
||||||
|
"surcharge_b_cal" : "Surcharge cal (B)",
|
||||||
|
"per_cess_b" : "Per% cess(B)",
|
||||||
|
"edu_cess_b_cal" : "Edu cess cal(B)",
|
||||||
|
"sum_of_b" : "Sum of tax_cal(B)",
|
||||||
"tax_payable": "Tax Payable",
|
"tax_payable": "Tax Payable",
|
||||||
"surcharge": "Surcharge @ %",
|
|
||||||
"edu_cess": "Education Cess @ %",
|
|
||||||
"total_tax_payable": "Total Tax Payable",
|
"total_tax_payable": "Total Tax Payable",
|
||||||
"mat_credit_created": "Add: MAT Credit created",
|
"opening_balance": "Opening Balance",
|
||||||
|
"mat_credit_created": "Add: MAT Credit Created",
|
||||||
"mat_credit_utilized": "Less: MAT Credit Utilized",
|
"mat_credit_utilized": "Less: MAT Credit Utilized",
|
||||||
|
"closing_balance": "Closing Balance",
|
||||||
"interest_234c": "Add: Interest u/s 234C",
|
"interest_234c": "Add: Interest u/s 234C",
|
||||||
"total_tax": "Total Tax",
|
"total_tax": "Total Tax",
|
||||||
"advance_tax": "Advance Tax",
|
"advance_tax": "Advance Tax",
|
||||||
@@ -115,10 +127,13 @@ class ITATHandler:
|
|||||||
"tcs": "TCS",
|
"tcs": "TCS",
|
||||||
"sat": "SAT",
|
"sat": "SAT",
|
||||||
"tax_on_assessment": "Tax on Regular Assessment",
|
"tax_on_assessment": "Tax on Regular Assessment",
|
||||||
"refund": "Refund",
|
"refund" : "Refund",
|
||||||
"Remarks": "Remarks"
|
"interest_244a_per143" : "Add : Interest u/s 244A as per 143",
|
||||||
|
"refund_received" : "Less : Refund Received on",
|
||||||
|
"balance_receivable" : "Balance Receivable",
|
||||||
|
"Remarks" : "Remarks"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Vertical ITAT structure
|
# Vertical ITAT structure
|
||||||
data = []
|
data = []
|
||||||
for key, label in field_mapping.items():
|
for key, label in field_mapping.items():
|
||||||
|
|||||||
@@ -40,42 +40,46 @@ class ITRHandler:
|
|||||||
|
|
||||||
# INSERT ITR RECORD using procedure "add_itr"
|
# INSERT ITR RECORD using procedure "add_itr"
|
||||||
def add_itr(self, data):
|
def add_itr(self, data):
|
||||||
|
try:
|
||||||
|
columns= [ 'year', 'gross_total_income', 'disallowance_14a', 'disallowance_37',
|
||||||
|
'deduction_80ia_business', 'deduction_80ia_misc', 'deduction_80ia_other', 'deduction_sec37_disallowance', 'deduction_80g',
|
||||||
|
'net_taxable_income', 'per_tax_a', 'tax_a_cal', 'per_surcharge_a', 'surcharge_a_cal', 'per_cess_a', 'edu_cess_a_cal', 'sum_of_a',
|
||||||
|
'per_tax_b', 'tax_b_cal', 'per_surcharge_b', 'surcharge_b_cal', 'per_cess_b', 'edu_cess_b_cal', 'sum_of_b',
|
||||||
|
'tax_payable','total_tax_payable', 'opening_balance', 'mat_credit_created', 'mat_credit_utilized', 'closing_balance',
|
||||||
|
'interest_234c', 'total_tax', 'advance_tax', 'tds', 'tcs', 'sat', 'tax_on_assessment', 'refund',
|
||||||
|
'interest_244a_per143', 'refund_received', 'balance_receivable', 'remarks', 'created_at'
|
||||||
|
]
|
||||||
|
|
||||||
columns = [
|
values = [data.get(col, 0) for col in columns]
|
||||||
'year', 'gross_total_income', 'disallowance_14a', 'disallowance_37',
|
|
||||||
'deduction_80ia_business', 'deduction_80ia_misc', 'deduction_80ia_other',
|
# Call your stored procedure
|
||||||
'deduction_sec37_disallowance', 'deduction_80g',
|
self.cursor.callproc("InsertITR", values)
|
||||||
'net_taxable_income', 'tax_30_percent', 'tax_book_profit_18_5',
|
self.conn.commit()
|
||||||
'tax_payable', 'surcharge', 'edu_cess',
|
except Exception as e:
|
||||||
'total_tax_payable', 'mat_credit_created', 'mat_credit_utilized',
|
self.conn.rollback()
|
||||||
'interest_234c', 'total_tax', 'advance_tax', 'tds', 'tcs',
|
raise e
|
||||||
'sat', 'tax_on_assessment', 'refund', 'Remarks','created_at'
|
finally:
|
||||||
]
|
self.cursor.close()
|
||||||
values = [data.get(col, 0) for col in columns]
|
self.conn.close()
|
||||||
|
|
||||||
# Call your stored procedure
|
|
||||||
self.cursor.callproc("InsertITR", values)
|
|
||||||
self.conn.commit()
|
|
||||||
|
|
||||||
# update itr by id
|
# update itr by id
|
||||||
def update(self, id, data):
|
def update(self, id, data):
|
||||||
columns = [
|
columns= [ 'year', 'gross_total_income', 'disallowance_14a', 'disallowance_37',
|
||||||
'year', 'gross_total_income', 'disallowance_14a', 'disallowance_37',
|
'deduction_80ia_business', 'deduction_80ia_misc', 'deduction_80ia_other', 'deduction_sec37_disallowance', 'deduction_80g',
|
||||||
'deduction_80ia_business', 'deduction_80ia_misc', 'deduction_80ia_other',
|
'net_taxable_income', 'per_tax_a', 'tax_a_cal', 'per_surcharge_a', 'surcharge_a_cal', 'per_cess_a', 'edu_cess_a_cal', 'sum_of_a',
|
||||||
'deduction_sec37_disallowance', 'deduction_80g',
|
'per_tax_b', 'tax_b_cal', 'per_surcharge_b', 'surcharge_b_cal', 'per_cess_b', 'edu_cess_b_cal', 'sum_of_b',
|
||||||
'net_taxable_income', 'tax_30_percent', 'tax_book_profit_18_5',
|
'tax_payable','total_tax_payable', 'opening_balance', 'mat_credit_created', 'mat_credit_utilized', 'closing_balance',
|
||||||
'tax_payable', 'surcharge', 'edu_cess',
|
'interest_234c', 'total_tax', 'advance_tax', 'tds', 'tcs', 'sat', 'tax_on_assessment', 'refund',
|
||||||
'total_tax_payable', 'mat_credit_created', 'mat_credit_utilized',
|
'interest_244a_per143', 'refund_received', 'balance_receivable', 'remarks', 'updated_at'
|
||||||
'interest_234c', 'total_tax', 'advance_tax', 'tds', 'tcs',
|
]
|
||||||
'sat', 'tax_on_assessment', 'refund', 'Remarks'
|
|
||||||
]
|
|
||||||
|
|
||||||
values = [id] + [data.get(col, 0) for col in columns]
|
values = [id] + [data.get(col, 0) for col in columns]
|
||||||
self.cursor.callproc("UpdateITR", values)
|
self.cursor.callproc("UpdateITR", values)
|
||||||
self.conn.commit()
|
self.conn.commit()
|
||||||
|
|
||||||
|
|
||||||
# DELETE RECORD by ITR id
|
# DELETE RECORD by ITR id
|
||||||
def delete_itr_by_id(self, id):
|
def delete_itr_by_id(self, id):
|
||||||
self.cursor.callproc('DeleteITRById', [id])
|
self.cursor.callproc('DeleteITRById', [id])
|
||||||
self.conn.commit()
|
self.conn.commit()
|
||||||
@@ -101,20 +105,35 @@ class ITRHandler:
|
|||||||
"gross_total_income": "Gross Total Income",
|
"gross_total_income": "Gross Total Income",
|
||||||
"disallowance_14a": "Add: Disallowance u/s 14A",
|
"disallowance_14a": "Add: Disallowance u/s 14A",
|
||||||
"disallowance_37": "Add: Disallowance u/s 37",
|
"disallowance_37": "Add: Disallowance u/s 37",
|
||||||
|
"-" : "-",
|
||||||
"deduction_80ia_business": "Less: Deduction u/s 80IA - On Business Income",
|
"deduction_80ia_business": "Less: Deduction u/s 80IA - On Business Income",
|
||||||
"deduction_80ia_misc": "On Misc Receipts",
|
"deduction_80ia_misc": "On Misc Receipts",
|
||||||
"deduction_80ia_other": "On Other",
|
"deduction_80ia_other": "On Other",
|
||||||
"deduction_sec37_disallowance": "On Sec 37 Disallowance",
|
"deduction_sec37_disallowance": "On Sec 37 Disallowance",
|
||||||
"deduction_80g": "Less: Deduction u/s 80G",
|
"deduction_80g": "Less: Deduction u/s 80G",
|
||||||
"net_taxable_income": "Net Taxable Income",
|
"net_taxable_income": "Net Taxable Income",
|
||||||
"tax_30_percent": "Tax @ 30%",
|
"-" : "-",
|
||||||
"tax_book_profit_18_5": "Tax @ 18.5% on Book Profit",
|
"per_tax_a" : "Per% Tax @(A)",
|
||||||
|
"tax_a_cal" : "Tax cal(A)",
|
||||||
|
"per_surcharge_a" : "Per% surcharge @(A)",
|
||||||
|
"surcharge_a_cal" : "Surcharge cal (A)",
|
||||||
|
"per_cess_a" : "Per% cess(A)",
|
||||||
|
"edu_cess_a_cal" : "Edu cess cal(A)",
|
||||||
|
"sum_of_a" : "Sum of tax_cal(A)",
|
||||||
|
"-" : "-",
|
||||||
|
"per_tax_b" : "Per% Tax @(B)",
|
||||||
|
"tax_b_cal" : "Tax cal(B)",
|
||||||
|
"per_surcharge_b" : "Per% surcharge @(B)",
|
||||||
|
"surcharge_b_cal" : "Surcharge cal (B)",
|
||||||
|
"per_cess_b" : "Per% cess(B)",
|
||||||
|
"edu_cess_b_cal" : "Edu cess cal(B)",
|
||||||
|
"sum_of_b" : "Sum of tax_cal(B)",
|
||||||
"tax_payable": "Tax Payable",
|
"tax_payable": "Tax Payable",
|
||||||
"surcharge": "Surcharge @ %",
|
|
||||||
"edu_cess": "Education Cess @ %",
|
|
||||||
"total_tax_payable": "Total Tax Payable",
|
"total_tax_payable": "Total Tax Payable",
|
||||||
|
"opening_balance": "Opening Balance",
|
||||||
"mat_credit_created": "Add: MAT Credit Created",
|
"mat_credit_created": "Add: MAT Credit Created",
|
||||||
"mat_credit_utilized": "Less: MAT Credit Utilized",
|
"mat_credit_utilized": "Less: MAT Credit Utilized",
|
||||||
|
"closing_balance": "Closing Balance",
|
||||||
"interest_234c": "Add: Interest u/s 234C",
|
"interest_234c": "Add: Interest u/s 234C",
|
||||||
"total_tax": "Total Tax",
|
"total_tax": "Total Tax",
|
||||||
"advance_tax": "Advance Tax",
|
"advance_tax": "Advance Tax",
|
||||||
@@ -122,10 +141,14 @@ class ITRHandler:
|
|||||||
"tcs": "TCS",
|
"tcs": "TCS",
|
||||||
"sat": "SAT",
|
"sat": "SAT",
|
||||||
"tax_on_assessment": "Tax on Regular Assessment",
|
"tax_on_assessment": "Tax on Regular Assessment",
|
||||||
"refund": "Refund"
|
"refund" : "Refund",
|
||||||
|
"interest_244a_per143" : "Add : Interest u/s 244A as per 143",
|
||||||
|
"refund_received" : "Less : Refund Received on",
|
||||||
|
"balance_receivable" : "Balance Receivable",
|
||||||
|
"Remarks" : "Remarks"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Convert to vertical structure
|
# Convert to vertical structures
|
||||||
data = []
|
data = []
|
||||||
for key, label in field_mapping.items():
|
for key, label in field_mapping.items():
|
||||||
value = rows[0].get(key, 0)
|
value = rows[0].get(key, 0)
|
||||||
|
|||||||
@@ -1,40 +1,117 @@
|
|||||||
from flask import Blueprint, render_template, request, redirect, url_for, flash, session
|
from flask import Blueprint, render_template, request, redirect, url_for, flash, session
|
||||||
from flask import flash,redirect,url_for
|
<<<<<<< HEAD
|
||||||
|
import os
|
||||||
|
=======
|
||||||
|
>>>>>>> b9a8b9c0a9c322c129ac50b3dec0ffb3c6d82a83
|
||||||
from functools import wraps
|
from functools import wraps
|
||||||
from flask import session
|
from ldap3 import Server, Connection, ALL
|
||||||
|
from ldap3.core.exceptions import LDAPException
|
||||||
|
|
||||||
|
|
||||||
class LoginAuth:
|
class LoginAuth:
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
|
# Create Blueprint
|
||||||
self.bp = Blueprint("auth", __name__)
|
self.bp = Blueprint("auth", __name__)
|
||||||
|
|
||||||
|
# -------------------------------
|
||||||
|
# LDAP CONFIGURATION
|
||||||
|
# -------------------------------
|
||||||
|
<<<<<<< HEAD
|
||||||
|
self.LDAP_SERVER = os.getenv(
|
||||||
|
"LDAP_SERVER",
|
||||||
|
"ldap://host.docker.internal:389"
|
||||||
|
)
|
||||||
|
=======
|
||||||
|
self.LDAP_SERVER = "ldap://localhost:389"
|
||||||
|
>>>>>>> b9a8b9c0a9c322c129ac50b3dec0ffb3c6d82a83
|
||||||
|
|
||||||
|
self.BASE_DN = "ou=users,dc=lcepl,dc=org" # LDAP Users DN
|
||||||
|
|
||||||
|
# -------------------------------
|
||||||
# LOGIN ROUTE
|
# LOGIN ROUTE
|
||||||
|
# -------------------------------
|
||||||
@self.bp.route('/login', methods=['GET', 'POST'])
|
@self.bp.route('/login', methods=['GET', 'POST'])
|
||||||
def login():
|
def login():
|
||||||
if request.method == 'POST':
|
if request.method == 'POST':
|
||||||
username = request.form.get("username")
|
username = request.form.get("username")
|
||||||
password = request.form.get("password")
|
password = request.form.get("password")
|
||||||
|
<<<<<<< HEAD
|
||||||
|
if not username or not password:
|
||||||
|
flash("Username and password are required!", "danger")
|
||||||
|
return render_template("login.html")
|
||||||
|
user_dn = f"uid={username},{self.BASE_DN}"
|
||||||
|
server = Server(self.LDAP_SERVER, get_info=ALL)
|
||||||
|
=======
|
||||||
|
|
||||||
# Dummy validation — REPLACE with DB check later
|
if not username or not password:
|
||||||
if username == "admin" and password == "admin123":
|
flash("Username and password are required!", "danger")
|
||||||
session['user'] = username
|
return render_template("login.html")
|
||||||
flash("Login successful!", "success")
|
|
||||||
return redirect(url_for('welcome'))
|
|
||||||
else:
|
|
||||||
flash("Invalid username or password!", "danger")
|
|
||||||
|
|
||||||
|
user_dn = f"uid={username},{self.BASE_DN}"
|
||||||
|
server = Server(self.LDAP_SERVER, get_info=ALL)
|
||||||
|
|
||||||
|
>>>>>>> b9a8b9c0a9c322c129ac50b3dec0ffb3c6d82a83
|
||||||
|
try:
|
||||||
|
# Attempt LDAP bind
|
||||||
|
conn = Connection(server, user=user_dn, password=password, auto_bind=True)
|
||||||
|
if conn.bound:
|
||||||
|
<<<<<<< HEAD
|
||||||
|
|
||||||
|
=======
|
||||||
|
>>>>>>> b9a8b9c0a9c322c129ac50b3dec0ffb3c6d82a83
|
||||||
|
session['user'] = username
|
||||||
|
flash(f"Login successful! Welcome {username}", "success")
|
||||||
|
return redirect(url_for('welcome'))
|
||||||
|
else:
|
||||||
|
flash("Invalid username or password!", "danger")
|
||||||
|
except LDAPException as e:
|
||||||
|
flash(f"LDAP login failed: {str(e)}", "danger")
|
||||||
|
finally:
|
||||||
|
if 'conn' in locals():
|
||||||
|
conn.unbind()
|
||||||
|
<<<<<<< HEAD
|
||||||
|
# GET request: show login form
|
||||||
return render_template("login.html")
|
return render_template("login.html")
|
||||||
|
|
||||||
|
|
||||||
|
# LOGIN ROUTE
|
||||||
|
# @self.bp.route('/login', methods=['GET', 'POST'])
|
||||||
|
# def login():
|
||||||
|
# if request.method == 'POST':
|
||||||
|
# username = request.form.get("username")
|
||||||
|
# password = request.form.get("password")
|
||||||
|
# # Dummy validation — REPLACE with DB check later
|
||||||
|
# if username == "admin" and password == "admin123":
|
||||||
|
# session['user'] = username
|
||||||
|
# flash("Login successful!", "success")
|
||||||
|
# return redirect(url_for('welcome'))
|
||||||
|
# else:
|
||||||
|
# flash("Invalid username or password!", "danger")
|
||||||
|
# return render_template("login.html")
|
||||||
|
|
||||||
|
|
||||||
|
=======
|
||||||
|
|
||||||
|
# GET request: show login form
|
||||||
|
return render_template("login.html")
|
||||||
|
|
||||||
|
>>>>>>> b9a8b9c0a9c322c129ac50b3dec0ffb3c6d82a83
|
||||||
|
# -------------------------------
|
||||||
# LOGOUT ROUTE
|
# LOGOUT ROUTE
|
||||||
|
# -------------------------------
|
||||||
@self.bp.route('/logout')
|
@self.bp.route('/logout')
|
||||||
def logout():
|
def logout():
|
||||||
session.clear()
|
session.clear()
|
||||||
flash("Logged out successfully!", "success")
|
flash("Logged out successfully!", "success")
|
||||||
return redirect(url_for('auth.login'))
|
return redirect(url_for('auth.login'))
|
||||||
|
|
||||||
# ===================================================
|
# ===================================================
|
||||||
# LOGIN REQUIRED DECORATOR INSIDE CLASS
|
# LOGIN REQUIRED DECORATOR INSIDE CLASS
|
||||||
# ===================================================
|
# ===================================================
|
||||||
def login_required(self, f):
|
def login_required(self, f):
|
||||||
|
"""
|
||||||
|
Protect routes: redirect to login if user not authenticated.
|
||||||
|
"""
|
||||||
@wraps(f)
|
@wraps(f)
|
||||||
def wrapper(*args, **kwargs):
|
def wrapper(*args, **kwargs):
|
||||||
if "user" not in session:
|
if "user" not in session:
|
||||||
|
|||||||
@@ -1,15 +1,18 @@
|
|||||||
from AppCode.Config import DBConfig
|
from AppCode.Config import DBConfig
|
||||||
|
|
||||||
|
|
||||||
class MatCreditHandler:
|
class MatCreditHandler:
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
# db = DBConfig()
|
|
||||||
self.conn = DBConfig.get_db_connection()
|
self.conn = DBConfig.get_db_connection()
|
||||||
self.cursor = self.conn.cursor(dictionary=True)
|
self.cursor = self.conn.cursor(dictionary=True)
|
||||||
|
|
||||||
# get all Mat credit data
|
# --------------------------------------------------
|
||||||
|
# FETCH ALL MAT CREDIT + UTILIZATION (For UI Display)
|
||||||
|
# --------------------------------------------------
|
||||||
def fetch_all(self):
|
def fetch_all(self):
|
||||||
try:
|
try:
|
||||||
|
|
||||||
self.cursor.callproc("GetMatCedit")
|
self.cursor.callproc("GetMatCedit")
|
||||||
result_sets = self.cursor.stored_results()
|
result_sets = self.cursor.stored_results()
|
||||||
mat_rows = next(result_sets).fetchall()
|
mat_rows = next(result_sets).fetchall()
|
||||||
@@ -18,30 +21,78 @@ class MatCreditHandler:
|
|||||||
return mat_rows, utilization_rows
|
return mat_rows, utilization_rows
|
||||||
finally:
|
finally:
|
||||||
self.cursor.close()
|
self.cursor.close()
|
||||||
|
self.conn.close()
|
||||||
|
|
||||||
# Save Mat credit data single row
|
# --------------------------------------------------
|
||||||
|
# SAVE / UPDATE SINGLE MAT ROW (FROM MANUAL UI)
|
||||||
|
# --------------------------------------------------
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def save_single(data):
|
def save_single(data):
|
||||||
conn = DBConfig.get_db_connection()
|
conn = DBConfig.get_db_connection()
|
||||||
cur = conn.cursor(dictionary=True)
|
cur = conn.cursor(dictionary=True)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
# Save / Update MAT Credit
|
||||||
|
cur.callproc(
|
||||||
|
"SaveOrUpdateMatCredit",
|
||||||
|
(
|
||||||
|
data["financial_year"],
|
||||||
|
data["mat_credit"],
|
||||||
|
data["balance"],
|
||||||
|
data.get("remarks", "")
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
cur.callproc("SaveOrUpdateMatCredit",(
|
mat_id = None
|
||||||
data["financial_year"],
|
for result in cur.stored_results():
|
||||||
data["mat_credit"],
|
mat_id = result.fetchone()["mat_id"]
|
||||||
data["balance"]
|
|
||||||
))
|
|
||||||
|
|
||||||
result = next(cur.stored_results()).fetchone()
|
|
||||||
mat_id = result["mat_id"]
|
|
||||||
|
|
||||||
if not mat_id:
|
|
||||||
raise Exception("mat_id not returned from procedure")
|
|
||||||
|
|
||||||
|
# Save utilization rows
|
||||||
for u in data.get("utilization", []):
|
for u in data.get("utilization", []):
|
||||||
|
if float(u["amount"]) > 0:
|
||||||
|
cur.callproc(
|
||||||
|
"InsertMatUtilization",
|
||||||
|
(mat_id, u["year"], u["amount"])
|
||||||
|
)
|
||||||
|
|
||||||
|
conn.commit()
|
||||||
|
|
||||||
|
except Exception as e:
|
||||||
|
conn.rollback()
|
||||||
|
raise e
|
||||||
|
finally:
|
||||||
|
cur.close()
|
||||||
|
conn.close()
|
||||||
|
|
||||||
|
# --------------------------------------------------
|
||||||
|
# AUTO SAVE MAT FROM ITR (MAIN LOGIC)
|
||||||
|
# --------------------------------------------------
|
||||||
|
@staticmethod
|
||||||
|
def save_from_itr(year, mat_created, mat_utilized, remarks="Auto from"):
|
||||||
|
conn = DBConfig.get_db_connection()
|
||||||
|
cur = conn.cursor(dictionary=True)
|
||||||
|
|
||||||
|
try:
|
||||||
|
mat_created = float(mat_created or 0)
|
||||||
|
mat_utilized = float(mat_utilized or 0)
|
||||||
|
|
||||||
|
balance = mat_created - mat_utilized
|
||||||
|
|
||||||
|
# Save / Update MAT Credit
|
||||||
|
cur.callproc(
|
||||||
|
"SaveOrUpdateMatCredit",
|
||||||
|
(year, mat_created, balance, remarks)
|
||||||
|
)
|
||||||
|
|
||||||
|
mat_id = None
|
||||||
|
for result in cur.stored_results():
|
||||||
|
mat_id = result.fetchone()["mat_id"]
|
||||||
|
|
||||||
|
# Save utilization only if used
|
||||||
|
if mat_utilized > 0:
|
||||||
cur.callproc(
|
cur.callproc(
|
||||||
"InsertMatUtilization",
|
"InsertMatUtilization",
|
||||||
(mat_id, u["year"], u["amount"])
|
(mat_id, year, mat_utilized)
|
||||||
)
|
)
|
||||||
|
|
||||||
conn.commit()
|
conn.commit()
|
||||||
@@ -49,56 +100,29 @@ class MatCreditHandler:
|
|||||||
except Exception as e:
|
except Exception as e:
|
||||||
conn.rollback()
|
conn.rollback()
|
||||||
raise e
|
raise e
|
||||||
|
|
||||||
finally:
|
finally:
|
||||||
cur.close()
|
cur.close()
|
||||||
conn.close()
|
conn.close()
|
||||||
|
|
||||||
# save all Mat credit data
|
|
||||||
# @staticmethod
|
|
||||||
# def save_bulk(rows):
|
|
||||||
# conn = DBConfig.get_db_connection()
|
|
||||||
# cur = conn.cursor()
|
|
||||||
# skipped = []
|
|
||||||
|
|
||||||
# try:
|
# --------------------------------------------------
|
||||||
# for row in rows:
|
# DELETE MAT CREDIT SAFELY (OPTIONAL)
|
||||||
# cur.execute(
|
# --------------------------------------------------
|
||||||
# "SELECT id FROM mat_credit WHERE financial_year=%s",
|
def delete_by_year(self, financial_year):
|
||||||
# (row["financial_year"],)
|
try:
|
||||||
# )
|
self.cursor.execute(
|
||||||
# if cur.fetchone():
|
"DELETE FROM mat_credit WHERE financial_year=%s",
|
||||||
# skipped.append(row["financial_year"])
|
(financial_year,)
|
||||||
# continue
|
)
|
||||||
|
self.conn.commit()
|
||||||
|
finally:
|
||||||
|
self.cursor.close()
|
||||||
|
self.conn.close()
|
||||||
|
|
||||||
# cur.execute("""
|
# --------------------------------------------------
|
||||||
# INSERT INTO mat_credit (financial_year, mat_credit, balance)
|
# CLOSE CONNECTION (MANUAL USE)
|
||||||
# VALUES (%s,%s,%s)
|
# --------------------------------------------------
|
||||||
# """, (row["financial_year"], row["mat_credit"], row["balance"]))
|
|
||||||
|
|
||||||
# mat_id = cur.lastrowid
|
|
||||||
|
|
||||||
# for u in row["utilization"]:
|
|
||||||
# cur.execute("""
|
|
||||||
# INSERT INTO mat_utilization
|
|
||||||
# (mat_credit_id, utilized_year, utilized_amount)
|
|
||||||
# VALUES (%s,%s,%s)
|
|
||||||
# """, (mat_id, u["year"], u["amount"]))
|
|
||||||
|
|
||||||
# conn.commit()
|
|
||||||
# return skipped
|
|
||||||
|
|
||||||
# except Exception:
|
|
||||||
# conn.rollback()
|
|
||||||
# raise
|
|
||||||
|
|
||||||
# finally:
|
|
||||||
# cur.close()
|
|
||||||
# conn.close()
|
|
||||||
|
|
||||||
# CLOSE CONNECTION
|
|
||||||
def close(self):
|
def close(self):
|
||||||
self.cursor.close()
|
if self.cursor:
|
||||||
self.conn.close()
|
self.cursor.close()
|
||||||
|
if self.conn:
|
||||||
|
self.conn.close()
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
14
Dockerfile
14
Dockerfile
@@ -1,22 +1,12 @@
|
|||||||
FROM python:3.11-slim
|
FROM python:3.11-slim
|
||||||
|
|
||||||
# Prevent Python buffering
|
|
||||||
ENV PYTHONDONTWRITEBYTECODE=1
|
|
||||||
ENV PYTHONUNBUFFERED=1
|
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
# Install system deps (if needed later)
|
|
||||||
RUN apt-get update && apt-get install -y \
|
|
||||||
build-essential \
|
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
|
||||||
|
|
||||||
COPY requirements.txt .
|
COPY requirements.txt .
|
||||||
RUN pip install --no-cache-dir -r requirements.txt
|
RUN pip install --no-cache-dir -r requirements.txt
|
||||||
|
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
EXPOSE 5000
|
EXPOSE 5010
|
||||||
|
|
||||||
CMD ["python", "main.py"]
|
|
||||||
|
|
||||||
|
CMD ["gunicorn", "--bind", "0.0.0.0:5010", "main:app"]
|
||||||
|
|||||||
@@ -1,29 +1,40 @@
|
|||||||
version: "3.9"
|
version: "3.9"
|
||||||
|
|
||||||
services:
|
services:
|
||||||
|
|
||||||
db:
|
db:
|
||||||
image: mysql:8.0
|
image: mysql:8
|
||||||
container_name: income_tax_db
|
container_name: tax-mysql
|
||||||
restart: always
|
restart: always
|
||||||
environment:
|
environment:
|
||||||
MYSQL_ROOT_PASSWORD: root
|
MYSQL_ROOT_PASSWORD: tiger
|
||||||
MYSQL_DATABASE: test_income_taxdb
|
MYSQL_DATABASE: income_tax_db
|
||||||
ports:
|
|
||||||
- "3307:3306"
|
|
||||||
volumes:
|
volumes:
|
||||||
- mysql_data:/var/lib/mysql
|
- mysql_data:/var/lib/mysql
|
||||||
- ./db/income_tax.sql:/docker-entrypoint-initdb.d/income_tax.sql
|
|
||||||
|
|
||||||
web:
|
flaskapp:
|
||||||
build: .
|
build: .
|
||||||
container_name: income_tax_web
|
container_name: tax-flask
|
||||||
restart: always
|
restart: always
|
||||||
ports:
|
ports:
|
||||||
- "5010:5010"
|
- "5010:5010"
|
||||||
env_file:
|
|
||||||
- .env
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- db
|
- db
|
||||||
|
environment:
|
||||||
|
DB_HOST: db
|
||||||
|
DB_PORT: 3306
|
||||||
|
DB_USER: root
|
||||||
|
DB_PASSWORD: tiger
|
||||||
|
DB_NAME: income_tax_db
|
||||||
|
FLASK_HOST: 0.0.0.0
|
||||||
|
FLASK_PORT: 5010
|
||||||
|
FLASK_DEBUG: "false"
|
||||||
|
SECRET_KEY: secret1234
|
||||||
|
LDAP_SERVER: ldap://host.docker.internal:389 # 👈 ADD THIS
|
||||||
|
LOG_VIEW_SECRET: super-log-2026
|
||||||
|
volumes:
|
||||||
|
- /var/run/docker.sock:/var/run/docker.sock
|
||||||
|
- ./logs:/app/logs
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
mysql_data:
|
mysql_data:
|
||||||
|
|||||||
159
main.py
159
main.py
@@ -1,8 +1,7 @@
|
|||||||
from flask import Flask, render_template, request, redirect, url_for, send_from_directory, abort, flash,send_file ,jsonify
|
from flask import Flask, render_template, request, redirect, url_for, flash,send_file ,jsonify, session
|
||||||
import os
|
import os
|
||||||
from dotenv import load_dotenv
|
from dotenv import load_dotenv
|
||||||
load_dotenv()
|
load_dotenv()
|
||||||
import pandas as pd
|
|
||||||
from werkzeug.utils import secure_filename
|
from werkzeug.utils import secure_filename
|
||||||
from datetime import date
|
from datetime import date
|
||||||
from AppCode.Config import DBConfig
|
from AppCode.Config import DBConfig
|
||||||
@@ -22,10 +21,51 @@ from AppCode.MatCreditHandler import MatCreditHandler
|
|||||||
app = Flask(__name__)
|
app = Flask(__name__)
|
||||||
app.secret_key=os.getenv("SECRET_KEY")
|
app.secret_key=os.getenv("SECRET_KEY")
|
||||||
|
|
||||||
|
|
||||||
|
import logging
|
||||||
|
import sys
|
||||||
|
|
||||||
|
# Remove default handlers
|
||||||
|
if not os.path.exists("logs"):
|
||||||
|
os.mkdir("logs")
|
||||||
|
|
||||||
|
file_handler = logging.FileHandler("logs/app.log")
|
||||||
|
file_handler.setLevel(logging.INFO)
|
||||||
|
|
||||||
|
stream_handler = logging.StreamHandler()
|
||||||
|
stream_handler.setLevel(logging.INFO)
|
||||||
|
|
||||||
|
formatter = logging.Formatter(
|
||||||
|
"%(asctime)s | %(levelname)s | User:%(user)s | %(message)s"
|
||||||
|
)
|
||||||
|
|
||||||
|
file_handler.setFormatter(formatter)
|
||||||
|
stream_handler.setFormatter(formatter)
|
||||||
|
|
||||||
|
app.logger.setLevel(logging.INFO)
|
||||||
|
app.logger.addHandler(file_handler)
|
||||||
|
app.logger.addHandler(stream_handler)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
auth = LoginAuth()
|
auth = LoginAuth()
|
||||||
app.register_blueprint(auth.bp)
|
app.register_blueprint(auth.bp)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@app.before_request
|
||||||
|
def log_user_activity():
|
||||||
|
if request.endpoint and "static" not in request.endpoint:
|
||||||
|
user = session.get("user", "Anonymous")
|
||||||
|
ip = request.remote_addr
|
||||||
|
|
||||||
|
|
||||||
|
app.logger.info(
|
||||||
|
f"Accessed: {request.method} {request.path}",
|
||||||
|
extra={"user": user}
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
# welcome page
|
# welcome page
|
||||||
@app.route('/')
|
@app.route('/')
|
||||||
@auth.login_required
|
@auth.login_required
|
||||||
@@ -59,7 +99,6 @@ def view_documents():
|
|||||||
docHandler.View(request=request)
|
docHandler.View(request=request)
|
||||||
return render_template('view_docs.html', documents=docHandler.documents, years=docHandler.years)
|
return render_template('view_docs.html', documents=docHandler.documents, years=docHandler.years)
|
||||||
|
|
||||||
|
|
||||||
# Upload file documents
|
# Upload file documents
|
||||||
@app.route('/uploads/<filename>')
|
@app.route('/uploads/<filename>')
|
||||||
@auth.login_required
|
@auth.login_required
|
||||||
@@ -68,20 +107,26 @@ def uploaded_file(filename):
|
|||||||
filepath = os.path.join(FileHandler.UPLOAD_FOLDER, secure_filename(filename))
|
filepath = os.path.join(FileHandler.UPLOAD_FOLDER, secure_filename(filename))
|
||||||
|
|
||||||
if not os.path.exists(filepath):
|
if not os.path.exists(filepath):
|
||||||
abort(404)
|
flash("Unsupported file type for viewing", "warning")
|
||||||
|
return redirect(url_for('view_documents'))
|
||||||
|
|
||||||
file_ext = filename.rsplit('.', 1)[-1].lower()
|
file_ext = filename.rsplit('.', 1)[-1].lower()
|
||||||
# --- View Mode ---
|
# --- View Mode ---
|
||||||
if mode == 'view':
|
if mode == 'view':
|
||||||
|
# pdf
|
||||||
if file_ext == 'pdf':
|
if file_ext == 'pdf':
|
||||||
return send_file(filepath, mimetype='application/pdf')
|
return send_file(filepath, mimetype='application/pdf')
|
||||||
|
# Word
|
||||||
|
elif file_ext in ['doc', 'docx']:
|
||||||
|
return send_file(filepath, as_attachment=True)
|
||||||
|
# Excel
|
||||||
elif file_ext in ['xls', 'xlsx']:
|
elif file_ext in ['xls', 'xlsx']:
|
||||||
# Excel cannot be rendered in-browser by Flask; trigger download instead
|
|
||||||
return send_file(filepath, as_attachment=False, download_name=filename, mimetype='application/vnd.openxmlformats-officedocument.spreadsheetml.sheet')
|
return send_file(filepath, as_attachment=False, download_name=filename, mimetype='application/vnd.openxmlformats-officedocument.spreadsheetml.sheet')
|
||||||
else:
|
else:
|
||||||
return abort(415) # Unsupported type for viewing
|
flash("Unsupported file type for viewing", "warning")
|
||||||
|
return redirect(url_for('view_documents'))
|
||||||
|
|
||||||
return send_file(filepath, as_attachment=True)
|
return send_file(filepath, as_attachment=True, download_name=filename)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -105,20 +150,28 @@ def display_itr():
|
|||||||
def add_itr():
|
def add_itr():
|
||||||
if request.method == 'POST':
|
if request.method == 'POST':
|
||||||
itr = ITRHandler()
|
itr = ITRHandler()
|
||||||
|
mat = MatCreditHandler()
|
||||||
itr.add_itr(request.form)
|
itr.add_itr(request.form)
|
||||||
itr.close()
|
itr.close()
|
||||||
|
|
||||||
if 'documents' in request.files:
|
if 'documents' in request.files:
|
||||||
doc = DocumentHandler()
|
doc = DocumentHandler()
|
||||||
doc.Upload(request)
|
doc.Upload(request)
|
||||||
|
|
||||||
|
# AUTO SAVE MAT FROM ITR
|
||||||
|
mat.save_from_itr(
|
||||||
|
year=request.form["year"],
|
||||||
|
mat_created=float(request.form.get("mat_credit_created", 0)),
|
||||||
|
mat_utilized=float(request.form.get("mat_credit_utilized", 0)),
|
||||||
|
remarks="Created via ITR"
|
||||||
|
)
|
||||||
|
|
||||||
# flash("ITR record added successfully!", "success")
|
# flash("ITR record added successfully!", "success")
|
||||||
flash("ITR record and documents uploaded successfully!", "success")
|
flash("ITR record and documents uploaded successfully!", "success")
|
||||||
return redirect(url_for('display_itr'))
|
return redirect(url_for('display_itr'))
|
||||||
|
|
||||||
return render_template('add_itr.html',current_date=date.today().isoformat())
|
return render_template('add_itr.html',current_date=date.today().isoformat())
|
||||||
|
|
||||||
## 4. DELETE an ITR record
|
## 4. DELETE an ITR records
|
||||||
@app.route('/itr/delete/<int:id>', methods=['POST'])
|
@app.route('/itr/delete/<int:id>', methods=['POST'])
|
||||||
@auth.login_required
|
@auth.login_required
|
||||||
def delete_itr(id):
|
def delete_itr(id):
|
||||||
@@ -166,11 +219,25 @@ def display_ao():
|
|||||||
def add_ao():
|
def add_ao():
|
||||||
if request.method == 'POST':
|
if request.method == 'POST':
|
||||||
ao = AOHandler()
|
ao = AOHandler()
|
||||||
|
mat = MatCreditHandler()
|
||||||
ao.add_ao(request.form)
|
ao.add_ao(request.form)
|
||||||
ao.close()
|
ao.close()
|
||||||
|
|
||||||
|
if 'documents' in request.files:
|
||||||
|
doc = DocumentHandler()
|
||||||
|
doc.Upload(request)
|
||||||
|
|
||||||
|
# AUTO SAVE MAT FROM ITR
|
||||||
|
mat.save_from_itr(
|
||||||
|
year=request.form["year"],
|
||||||
|
mat_created=float(request.form.get("mat_credit_created", 0)),
|
||||||
|
mat_utilized=float(request.form.get("mat_credit_utilized", 0)),
|
||||||
|
remarks="Created via ao"
|
||||||
|
)
|
||||||
|
|
||||||
flash("AO record added successfully!", "success")
|
flash("AO record added successfully!", "success")
|
||||||
return redirect(url_for('display_ao'))
|
return redirect(url_for('display_ao'))
|
||||||
return render_template('add_ao.html')
|
return render_template('add_ao.html',current_date=date.today().isoformat())
|
||||||
|
|
||||||
# 3. UPDATE AO record
|
# 3. UPDATE AO record
|
||||||
@app.route('/ao/update/<int:id>', methods=['GET', 'POST'])
|
@app.route('/ao/update/<int:id>', methods=['GET', 'POST'])
|
||||||
@@ -224,12 +291,25 @@ def display_cit():
|
|||||||
def add_cit():
|
def add_cit():
|
||||||
if request.method == 'POST':
|
if request.method == 'POST':
|
||||||
cit = CITHandler()
|
cit = CITHandler()
|
||||||
|
mat = MatCreditHandler()
|
||||||
cit.add_cit(request.form)
|
cit.add_cit(request.form)
|
||||||
cit.close()
|
cit.close()
|
||||||
|
|
||||||
|
if 'documents' in request.files:
|
||||||
|
doc = DocumentHandler()
|
||||||
|
doc.Upload(request)
|
||||||
|
|
||||||
|
# AUTO SAVE MAT FROM ITR
|
||||||
|
mat.save_from_itr(
|
||||||
|
year=request.form["year"],
|
||||||
|
mat_created=float(request.form.get("mat_credit_created", 0)),
|
||||||
|
mat_utilized=float(request.form.get("mat_credit_utilized", 0)),
|
||||||
|
remarks="Created via cit"
|
||||||
|
)
|
||||||
flash("CIT record added successfully!", "success")
|
flash("CIT record added successfully!", "success")
|
||||||
return redirect(url_for('display_cit'))
|
return redirect(url_for('display_cit'))
|
||||||
|
|
||||||
return render_template('add_cit.html')
|
return render_template('add_cit.html', current_date=date.today().isoformat())
|
||||||
|
|
||||||
# 3 delete CIT records by id
|
# 3 delete CIT records by id
|
||||||
@app.route('/cit/delete/<int:id>', methods=['POST'])
|
@app.route('/cit/delete/<int:id>', methods=['POST'])
|
||||||
@@ -281,13 +361,27 @@ def display_itat():
|
|||||||
def add_itat():
|
def add_itat():
|
||||||
if request.method == 'POST':
|
if request.method == 'POST':
|
||||||
itat = ITATHandler()
|
itat = ITATHandler()
|
||||||
|
mat = MatCreditHandler()
|
||||||
data = {k: request.form.get(k, 0) for k in request.form}
|
data = {k: request.form.get(k, 0) for k in request.form}
|
||||||
itat.add_itat(data)
|
itat.add_itat(data)
|
||||||
itat.close()
|
itat.close()
|
||||||
|
|
||||||
|
if 'documents' in request.files:
|
||||||
|
doc = DocumentHandler()
|
||||||
|
doc.Upload(request)
|
||||||
|
|
||||||
|
# AUTO SAVE MAT FROM ITR
|
||||||
|
mat.save_from_itr(
|
||||||
|
year=request.form["year"],
|
||||||
|
mat_created=float(request.form.get("mat_credit_created", 0)),
|
||||||
|
mat_utilized=float(request.form.get("mat_credit_utilized", 0)),
|
||||||
|
remarks="Created via ITR"
|
||||||
|
)
|
||||||
|
|
||||||
flash("ITAT record added successfully!", "success")
|
flash("ITAT record added successfully!", "success")
|
||||||
return redirect(url_for('display_itat'))
|
return redirect(url_for('display_itat'))
|
||||||
|
|
||||||
return render_template('add_itat.html')
|
return render_template('add_itat.html',current_date=date.today().isoformat())
|
||||||
|
|
||||||
# 3.Update ITAT records by id
|
# 3.Update ITAT records by id
|
||||||
@app.route('/itat/update/<int:id>', methods=['GET', 'POST'])
|
@app.route('/itat/update/<int:id>', methods=['GET', 'POST'])
|
||||||
@@ -449,6 +543,17 @@ def summary_report():
|
|||||||
docHandler = DocumentHandler()
|
docHandler = DocumentHandler()
|
||||||
return docHandler.Summary_report(request=request)
|
return docHandler.Summary_report(request=request)
|
||||||
|
|
||||||
|
@app.route('/summary/download', methods=['GET'])
|
||||||
|
@auth.login_required
|
||||||
|
def download_summary():
|
||||||
|
year_raw = request.args.get('year')
|
||||||
|
if not year_raw:
|
||||||
|
return "Year parameter is required", 400
|
||||||
|
|
||||||
|
docHandler = DocumentHandler()
|
||||||
|
# reuse your existing Summary_report method
|
||||||
|
return docHandler.Summary_report(request=request)
|
||||||
|
|
||||||
|
|
||||||
# check year in table existe or not by using ajax calling.
|
# check year in table existe or not by using ajax calling.
|
||||||
# @app.route('/check_year', methods=['POST'])
|
# @app.route('/check_year', methods=['POST'])
|
||||||
@@ -519,6 +624,34 @@ def save_mat_row():
|
|||||||
finally:
|
finally:
|
||||||
mat.close()
|
mat.close()
|
||||||
|
|
||||||
|
@app.route("/summary/preview")
|
||||||
|
def summary_preview_route():
|
||||||
|
handler = DocumentHandler()
|
||||||
|
return handler.Summary_preview(request)
|
||||||
|
|
||||||
|
@app.route("/view_logs", methods=["GET", "POST"])
|
||||||
|
@auth.login_required
|
||||||
|
def view_logs():
|
||||||
|
secret = os.getenv("LOG_VIEW_SECRET")
|
||||||
|
|
||||||
|
if request.method == "POST":
|
||||||
|
entered = request.form.get("secret")
|
||||||
|
|
||||||
|
if entered != secret:
|
||||||
|
flash("Invalid secret!", "danger")
|
||||||
|
return render_template("view_logs_auth.html")
|
||||||
|
|
||||||
|
try:
|
||||||
|
with open("logs/app.log", "r") as f:
|
||||||
|
logs = f.readlines()
|
||||||
|
except FileNotFoundError:
|
||||||
|
logs = ["Log file not found"]
|
||||||
|
|
||||||
|
|
||||||
|
return render_template("view_logs.html", logs=logs)
|
||||||
|
|
||||||
|
return render_template("view_logs_auth.html")
|
||||||
|
|
||||||
# save mat credit bulk data
|
# save mat credit bulk data
|
||||||
# @app.route("/save_mat_all", methods=["POST"])
|
# @app.route("/save_mat_all", methods=["POST"])
|
||||||
# @auth.login_required
|
# @auth.login_required
|
||||||
|
|||||||
@@ -11,3 +11,5 @@ openpyxl==3.1.2
|
|||||||
xlrd==2.0.1
|
xlrd==2.0.1
|
||||||
|
|
||||||
gunicorn==21.2.0
|
gunicorn==21.2.0
|
||||||
|
|
||||||
|
ldap3
|
||||||
@@ -1,153 +1,278 @@
|
|||||||
/* ================= GLOBAL FORM ELEMENTS ================= */
|
/* ================= PAGE WRAPPER ================= */
|
||||||
|
.main {
|
||||||
|
margin-left: 260px;
|
||||||
|
width: calc(100% - 260px);
|
||||||
|
margin-top: 80px;
|
||||||
|
padding: 20px;
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ================= CONTAINER ================= */
|
||||||
|
.container {
|
||||||
|
width: 100%;
|
||||||
|
max-width: none;
|
||||||
|
margin: 0;
|
||||||
|
padding: 25px 30px;
|
||||||
|
background: #ffffff;
|
||||||
|
border-radius: 12px;
|
||||||
|
box-shadow: 0 8px 22px rgba(0, 0, 0, 0.08);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ================= PAGE TITLE ================= */
|
||||||
|
.container h2 {
|
||||||
|
text-align: center;
|
||||||
|
color: #007bff;
|
||||||
|
font-size: 22px;
|
||||||
|
font-weight: 700;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
h3 {
|
||||||
|
text-align: center;
|
||||||
|
margin-top: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ================= FORM ================= */
|
||||||
|
form {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
form label {
|
form label {
|
||||||
display: block;
|
display: block;
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
font-weight: bold;
|
font-weight: 600;
|
||||||
color: #333;
|
color: #333;
|
||||||
}
|
}
|
||||||
|
|
||||||
select {
|
/* ================= INPUTS ================= */
|
||||||
width: 100%;
|
form input,
|
||||||
max-width: 300px;
|
form select {
|
||||||
/* restrict width on desktop/laptop */
|
width: 100%;
|
||||||
padding: 10px 12px;
|
padding: 10px 12px;
|
||||||
border: 1px solid #ccc;
|
margin-top: 6px;
|
||||||
border-radius: 6px;
|
border: 1px solid #ccc;
|
||||||
margin-top: 6px;
|
border-radius: 6px;
|
||||||
font-size: 15px;
|
background-color: #f8f9ff;
|
||||||
background-color: white;
|
font-size: 14px;
|
||||||
cursor: pointer;
|
|
||||||
transition: 0.2s;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
select:focus {
|
form input:focus,
|
||||||
border-color: #007bff;
|
form select:focus {
|
||||||
box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
|
outline: none;
|
||||||
outline: none;
|
border-color: #007bff;
|
||||||
|
box-shadow: 0 0 6px rgba(0, 123, 255, 0.35);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ================= AUTO FIELDS ================= */
|
||||||
|
.auto {
|
||||||
|
background-color: #d5edd7;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ================= FORM GROUP ================= */
|
||||||
|
.form-group {
|
||||||
|
margin-bottom: 16px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Inline two columns */
|
||||||
|
.form-group.inline-2 {
|
||||||
|
flex-direction: row;
|
||||||
|
gap: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-group.inline-2 > div {
|
||||||
|
flex: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ================= BUTTONS ================= */
|
/* ================= BUTTONS ================= */
|
||||||
button {
|
button {
|
||||||
margin-top: 20px;
|
display: block;
|
||||||
padding: 10px 18px;
|
width: 60%;
|
||||||
background-color: #007bff;
|
margin: 25px auto 0;
|
||||||
color: white;
|
padding: 12px 20px;
|
||||||
border: none;
|
background-color: #28a745;
|
||||||
cursor: pointer;
|
color: #fff;
|
||||||
border-radius: 6px;
|
border: none;
|
||||||
font-size: 15px;
|
border-radius: 6px;
|
||||||
font-weight: 600;
|
font-size: 15px;
|
||||||
transition: 0.3s;
|
font-weight: 600;
|
||||||
|
cursor: pointer;
|
||||||
|
transition: 0.3s;
|
||||||
}
|
}
|
||||||
|
|
||||||
button:hover {
|
button:hover {
|
||||||
background-color: #0069d9;
|
background-color: #218838;
|
||||||
}
|
box-shadow: 0 4px 10px rgba(40, 167, 69, 0.35);
|
||||||
|
|
||||||
/* ================= MAIN CONTAINER ================= */
|
|
||||||
.main {
|
|
||||||
margin-left: 260px;
|
|
||||||
/* sidebar width if exists */
|
|
||||||
padding: 70px 30px 40px 30px;
|
|
||||||
/* top padding for navbar */
|
|
||||||
margin-top: 50px;
|
|
||||||
/* extra top spacing */
|
|
||||||
width: auto;
|
|
||||||
transition: 0.3s;
|
|
||||||
}
|
|
||||||
|
|
||||||
.container {
|
|
||||||
max-width: 800px;
|
|
||||||
margin: 0 auto;
|
|
||||||
background: #ffffff;
|
|
||||||
padding: 35px 40px;
|
|
||||||
border-radius: 12px;
|
|
||||||
box-shadow: 0 8px 22px rgba(0, 0, 0, 0.08);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ================= BACK BUTTON ================= */
|
/* ================= BACK BUTTON ================= */
|
||||||
.back-btn {
|
.back-btn {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
padding: 10px 18px;
|
padding: 10px 18px;
|
||||||
background-color: #007bff;
|
background-color: #007bff;
|
||||||
color: white;
|
color: #fff;
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
transition: 0.3s;
|
transition: 0.3s;
|
||||||
}
|
}
|
||||||
|
|
||||||
.back-btn:hover {
|
.back-btn:hover {
|
||||||
background-color: #006ae6;
|
background-color: #006ae6;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ================= MESSAGES ================= */
|
/* ================= STICKY FILTER BAR ================= */
|
||||||
|
.head {
|
||||||
|
position: sticky;
|
||||||
|
top: 60px;
|
||||||
|
background: #fff;
|
||||||
|
z-index: 1000;
|
||||||
|
padding: 15px 0;
|
||||||
|
border-bottom: 1px solid #ccc;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ================= SELECT + DOWNLOAD ================= */
|
||||||
|
.select-download-wrapper {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
gap: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.select-download-wrapper select {
|
||||||
|
max-width: 300px;
|
||||||
|
}
|
||||||
|
|
||||||
|
select {
|
||||||
|
width: 100%;
|
||||||
|
max-width: 300px;
|
||||||
|
padding: 10px 12px;
|
||||||
|
border: 1px solid #ccc;
|
||||||
|
border-radius: 6px;
|
||||||
|
margin-top: 6px;
|
||||||
|
font-size: 15px;
|
||||||
|
background-color: white;
|
||||||
|
cursor: pointer;
|
||||||
|
transition: 0.2s;
|
||||||
|
}
|
||||||
|
|
||||||
|
select:focus {
|
||||||
|
border-color: #007bff;
|
||||||
|
box-shadow: 0 0 5px rgba(0,123,255,0.5);
|
||||||
|
outline: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ================= DOWNLOAD BUTTON ================= */
|
||||||
|
#downloadBtn {
|
||||||
|
display: none;
|
||||||
|
padding: 10px 20px;
|
||||||
|
font-size: 16px;
|
||||||
|
background-color: #28a745;
|
||||||
|
color: #fff;
|
||||||
|
text-decoration: none;
|
||||||
|
border-radius: 4px;
|
||||||
|
white-space: nowrap;
|
||||||
|
transition: 0.3s;
|
||||||
|
}
|
||||||
|
|
||||||
|
#downloadBtn:hover {
|
||||||
|
background-color: #218838;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ================= TABLE PREVIEW ================= */
|
||||||
|
#previewContent {
|
||||||
|
max-height: 60vh;
|
||||||
|
overflow-y: auto;
|
||||||
|
overflow-x: auto;
|
||||||
|
width: 100%;
|
||||||
|
margin-top: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#previewContent table {
|
||||||
|
width: 100%;
|
||||||
|
min-width: 600px;
|
||||||
|
border-collapse: collapse;
|
||||||
|
}
|
||||||
|
|
||||||
|
#previewContent th,
|
||||||
|
#previewContent td {
|
||||||
|
padding: 10px;
|
||||||
|
border: 1px solid #ccc;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Sticky table header */
|
||||||
|
#previewContent th {
|
||||||
|
position: sticky;
|
||||||
|
top: 0;
|
||||||
|
background-color: #007bff;
|
||||||
|
color: #fff;
|
||||||
|
z-index: 10;
|
||||||
|
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ================= MESSAGE ================= */
|
||||||
.message {
|
.message {
|
||||||
margin-top: 15px;
|
margin-top: 15px;
|
||||||
color: #555;
|
color: #555;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ================= RESPONSIVE ================= */
|
/* ================= RESPONSIVE ================= */
|
||||||
|
|
||||||
/* Tablets (<= 992px) */
|
|
||||||
@media (max-width: 992px) {
|
@media (max-width: 992px) {
|
||||||
.main {
|
.main {
|
||||||
margin-left: 0;
|
margin-left: 0;
|
||||||
/* remove sidebar spacing */
|
width: 100%;
|
||||||
padding: 50px 20px 20px 20px;
|
padding: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container {
|
button {
|
||||||
padding: 25px 20px;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
select {
|
|
||||||
max-width: 100%;
|
@media (max-width: 768px) {
|
||||||
/* full width */
|
.container {
|
||||||
}
|
padding: 18px;
|
||||||
|
}
|
||||||
button {
|
|
||||||
width: 100%;
|
.container h2 {
|
||||||
/* full width */
|
font-size: 18px;
|
||||||
padding: 12px 0;
|
}
|
||||||
}
|
|
||||||
|
.form-group.inline-2 {
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 10px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Mobile (<= 576px) */
|
|
||||||
@media (max-width: 576px) {
|
@media (max-width: 576px) {
|
||||||
.main {
|
.main {
|
||||||
padding: 40px 15px 15px 15px;
|
padding: 15px;
|
||||||
}
|
margin-top: 70px;
|
||||||
|
}
|
||||||
|
|
||||||
.container {
|
#previewContent table {
|
||||||
padding: 20px;
|
min-width: 500px;
|
||||||
}
|
}
|
||||||
|
|
||||||
h2 {
|
#previewContent th,
|
||||||
font-size: 22px;
|
#previewContent td {
|
||||||
text-align: center;
|
font-size: 13px;
|
||||||
}
|
padding: 8px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
select {
|
@media (max-width: 420px) {
|
||||||
font-size: 14px;
|
form input,
|
||||||
padding: 10px;
|
form select {
|
||||||
}
|
font-size: 13px;
|
||||||
|
padding: 9px;
|
||||||
button {
|
}
|
||||||
font-size: 14px;
|
}
|
||||||
padding: 12px 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.back-btn {
|
|
||||||
width: 100%;
|
|
||||||
text-align: center;
|
|
||||||
padding: 12px 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.message {
|
|
||||||
font-size: 13px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
document.addEventListener("DOMContentLoaded", function () {
|
document.addEventListener("DOMContentLoaded", function () {
|
||||||
|
|
||||||
function getValue(id) {
|
function getValue(id) {
|
||||||
var el = document.getElementsByName(id)[0];
|
var el = document.getElementsByName(id)[0];
|
||||||
return el ? parseFloat(el.value) || 0 : 0;
|
return el ? parseFloat(el.value) || 0 : 0;
|
||||||
@@ -11,15 +10,14 @@ document.addEventListener("DOMContentLoaded", function () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
window.calculate = function () {
|
window.calculate = function () {
|
||||||
|
|
||||||
// --- BASIC INPUTS ---
|
// --- BASIC INPUTS ---
|
||||||
var gross_total_income = getValue("gross_total_income");
|
var gross_total_income = getValue("gross_total_income");
|
||||||
var disallowance_14a = getValue("disallowance_14a");
|
var disallowance_14a = getValue("disallowance_14a");
|
||||||
var disallowance_37 = getValue("disallowance_37");
|
var disallowance_37 = getValue("disallowance_37");
|
||||||
|
|
||||||
// -- total gross income --
|
// -- total gross income --
|
||||||
var gross_total = gross_total_income + disallowance_37 + disallowance_14a
|
var gross_total = gross_total_income + disallowance_37 + disallowance_14a;
|
||||||
// console.log("gross_total income:: " + gross_total)
|
setValue("gti_as_per_ao", gross_total);
|
||||||
|
|
||||||
// --- DEDUCTIONS ---
|
// --- DEDUCTIONS ---
|
||||||
var d80_business = getValue("deduction_80ia_business");
|
var d80_business = getValue("deduction_80ia_business");
|
||||||
@@ -27,6 +25,24 @@ document.addEventListener("DOMContentLoaded", function () {
|
|||||||
var d80_other = getValue("deduction_80ia_other");
|
var d80_other = getValue("deduction_80ia_other");
|
||||||
var d80_sec37 = getValue("deduction_sec37_disallowance");
|
var d80_sec37 = getValue("deduction_sec37_disallowance");
|
||||||
|
|
||||||
|
// -- TAX A CALCULATIONS --
|
||||||
|
var per_a = getValue("per_a");
|
||||||
|
var tax_a = getValue("tax_a");
|
||||||
|
var per_surcharge_a = getValue("per_surcharge_a");
|
||||||
|
var surcharge_a = getValue("surcharge_a");
|
||||||
|
var per_cess_a = getValue("per_cess_a");
|
||||||
|
var edu_cess_a = getValue("edu_cess_a");
|
||||||
|
|
||||||
|
// -- TAX b CALCULATIONS --
|
||||||
|
|
||||||
|
var tax_book_profit = getValue("tax_book_profit");
|
||||||
|
console.log(tax_book_profit);
|
||||||
|
|
||||||
|
var per_surcharge_b = getValue("per_surcharge_b");
|
||||||
|
var surcharge_b = getValue("surcharge_b");
|
||||||
|
var per_cess_b = getValue("per_cess_b");
|
||||||
|
var edu_cess_b = getValue("edu_cess_b");
|
||||||
|
|
||||||
var deduction = d80_business + d80_misc + d80_other + d80_sec37 - 1.35;
|
var deduction = d80_business + d80_misc + d80_other + d80_sec37 - 1.35;
|
||||||
|
|
||||||
var deduction_80g = getValue("deduction_80g");
|
var deduction_80g = getValue("deduction_80g");
|
||||||
@@ -35,27 +51,46 @@ document.addEventListener("DOMContentLoaded", function () {
|
|||||||
var net_taxable_income = gross_total - deduction - deduction_80g;
|
var net_taxable_income = gross_total - deduction - deduction_80g;
|
||||||
setValue("net_taxable_income", net_taxable_income);
|
setValue("net_taxable_income", net_taxable_income);
|
||||||
|
|
||||||
// --- TAX 30% ---
|
// --- TAX (A)% AMOUNT ---
|
||||||
var tax30 = net_taxable_income * 0.30;
|
var tax_a = net_taxable_income * (per_a / 100);
|
||||||
setValue("tax_30_percent", tax30);
|
setValue("tax_a", tax_a);
|
||||||
|
|
||||||
|
// --- SURCHARGE (A)% AMOUNT ---
|
||||||
|
var surcharge_a = tax_a * (per_surcharge_a / 100);
|
||||||
|
setValue("surcharge_a", surcharge_a);
|
||||||
|
|
||||||
|
// --- CESS (A)% AMOUNT ---
|
||||||
|
var edu_cess_a = (surcharge_a + tax_a) * (per_cess_a / 100);
|
||||||
|
setValue("edu_cess_a", edu_cess_a);
|
||||||
|
|
||||||
|
//SUM OF (A)%
|
||||||
|
var sum_of_a = tax_a + surcharge_a + edu_cess_a;
|
||||||
|
|
||||||
|
setValue("sum_of_a", sum_of_a);
|
||||||
|
|
||||||
|
//-----------------------------------------------------------------------------------------------------------
|
||||||
|
//-----------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
// --- SURCHARGE (B)% AMOUNT ---
|
||||||
|
var surcharge_b = tax_book_profit * (per_surcharge_b / 100);
|
||||||
|
setValue("surcharge_b", surcharge_b);
|
||||||
|
|
||||||
|
// --- CESS (B)% AMOUNT ---
|
||||||
|
var edu_cess_b = (surcharge_b + tax_book_profit) * (per_cess_b / 100);
|
||||||
|
setValue("edu_cess_b", edu_cess_b);
|
||||||
|
|
||||||
|
//SUM OF (B)%
|
||||||
|
var sum_of_b = tax_book_profit + surcharge_b + edu_cess_b;
|
||||||
|
|
||||||
|
setValue("sum_of_b", sum_of_b);
|
||||||
|
|
||||||
// --- TAX PAYABLE (18.5%) ---
|
// --- TAX PAYABLE (18.5%) ---
|
||||||
var tax185 = getValue("tax_book_profit_18_5");
|
var tax185 = getValue("tax_book_profit_18_5");
|
||||||
|
|
||||||
// --- Education Cess 3% ---
|
// --- Education Cess 3% ---
|
||||||
var tax_payable = (tax30 > tax185) ? tax30 : tax185;
|
var tax_payable = tax_a > tax_book_profit ? tax_a : tax_book_profit;
|
||||||
setValue("tax_payable", tax_payable);
|
setValue("tax_payable", tax_payable);
|
||||||
|
|
||||||
// // --- SURCHARGE ---
|
|
||||||
// var percent = getValue("persentage");
|
|
||||||
// var surcharge = tax_payable * (percent / 100);
|
|
||||||
// setValue("surcharge", surcharge);
|
|
||||||
|
|
||||||
// // --- edu_cess ---
|
|
||||||
// var per_cess = getValue("persentage_cess")
|
|
||||||
// var edu_cess = (tax_payable + surcharge) * (per_cess / 100);
|
|
||||||
// setValue("edu_cess", edu_cess);
|
|
||||||
|
|
||||||
// --- SURCHARGE ---
|
// --- SURCHARGE ---
|
||||||
var percent = getValue("persentage");
|
var percent = getValue("persentage");
|
||||||
var surcharge = tax_payable * (percent / 100);
|
var surcharge = tax_payable * (percent / 100);
|
||||||
@@ -67,14 +102,37 @@ document.addEventListener("DOMContentLoaded", function () {
|
|||||||
setValue("edu_cess", edu_cess);
|
setValue("edu_cess", edu_cess);
|
||||||
|
|
||||||
// --- total tax payable ---
|
// --- total tax payable ---
|
||||||
var total_tax_payable = tax_payable + surcharge + edu_cess;
|
var total_tax_payable = sum_of_a > sum_of_b ? sum_of_a : sum_of_b;
|
||||||
setValue("total_tax_payable", total_tax_payable);
|
setValue("total_tax_payable", total_tax_payable);
|
||||||
|
|
||||||
|
// // --- mat_credit_created --- new
|
||||||
|
// setValue("mat_credit_created", Math.max(tax185 - total_tax_payable, 0));
|
||||||
|
// // --- mat credit_utilized --- new
|
||||||
|
// setValue("mat_credit_utilized", Math.max(total_tax_payable - tax185, 0));
|
||||||
|
|
||||||
|
// --- MAT credit and utilized ---
|
||||||
|
var a = sum_of_a;
|
||||||
|
var b = sum_of_b;
|
||||||
|
var result = 0;
|
||||||
|
var zero = 0;
|
||||||
|
if (b > a) {
|
||||||
|
result = b - a;
|
||||||
|
setValue("mat_credit_created", result);
|
||||||
|
setValue("mat_credit_utilized", zero);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (a > b) {
|
||||||
|
result = a - b;
|
||||||
|
setValue("mat_credit_utilized", result);
|
||||||
|
setValue("mat_credit_created", zero);
|
||||||
|
}
|
||||||
|
|
||||||
// --- FINAL TAX ---
|
// --- FINAL TAX ---
|
||||||
var mat_credit = getValue("mat_credit_utilized");
|
var mat_credit_uti = getValue("mat_credit_utilized");
|
||||||
var interest_234c = getValue("interest_234c");
|
var interest_234c = getValue("interest_234c");
|
||||||
|
|
||||||
var total_tax = total_tax_payable + mat_credit + interest_234c;
|
// var total_tax = total_tax_payable + mat_credit + interest_234c;
|
||||||
|
var total_tax = total_tax_payable + interest_234c - mat_credit_uti;
|
||||||
setValue("total_tax", total_tax);
|
setValue("total_tax", total_tax);
|
||||||
|
|
||||||
// --- ASSESSMENT ---
|
// --- ASSESSMENT ---
|
||||||
@@ -88,4 +146,4 @@ document.addEventListener("DOMContentLoaded", function () {
|
|||||||
var refund = total_tax - all_tax;
|
var refund = total_tax - all_tax;
|
||||||
setValue("refund", refund);
|
setValue("refund", refund);
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
@@ -68,6 +68,28 @@ document.addEventListener("DOMContentLoaded", function () {
|
|||||||
var total_tax_payable = tax_payable + surcharge + edu_cess;
|
var total_tax_payable = tax_payable + surcharge + edu_cess;
|
||||||
setValue("total_tax_payable", total_tax_payable);
|
setValue("total_tax_payable", total_tax_payable);
|
||||||
|
|
||||||
|
|
||||||
|
// --- mat credit_utilized ---
|
||||||
|
var a = tax185
|
||||||
|
var b = total_tax_payable
|
||||||
|
var result = 0
|
||||||
|
if (a > b) {
|
||||||
|
result = a - b
|
||||||
|
setValue("mat_credit_created", result);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
setValue("mat_credit_created", result);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (b > a) {
|
||||||
|
result = b - a
|
||||||
|
setValue("mat_credit_utilized", result);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
setValue("mat_credit_utilized", result);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// --- FINAL TAX ---
|
// --- FINAL TAX ---
|
||||||
var mat_credit = getValue("mat_credit_utilized");
|
var mat_credit = getValue("mat_credit_utilized");
|
||||||
var interest_234c = getValue("interest_234c");
|
var interest_234c = getValue("interest_234c");
|
||||||
|
|||||||
@@ -1,87 +1,134 @@
|
|||||||
document.addEventListener("DOMContentLoaded", function () {
|
document.addEventListener("DOMContentLoaded", function () {
|
||||||
|
|
||||||
function getValue(id) {
|
function getValue(name) {
|
||||||
var el = document.getElementsByName(id)[0];
|
var el = document.getElementsByName(name)[0];
|
||||||
return el ? parseFloat(el.value) || 0 : 0;
|
return el ? parseFloat(el.value) || 0 : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
function setValue(id, val) {
|
function setValue(name, val) {
|
||||||
var el = document.getElementsByName(id)[0];
|
var el = document.getElementsByName(name)[0];
|
||||||
if (el) el.value = Number(val).toFixed(2);
|
if (el) el.value = Number(val).toFixed(2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ---- Track last edited field for Tax(A) ----
|
||||||
|
let lastEditedTaxA = null;
|
||||||
|
|
||||||
|
document.getElementsByName("per_tax_a")[0].addEventListener("input", () => {
|
||||||
|
lastEditedTaxA = "percentage";
|
||||||
|
});
|
||||||
|
|
||||||
|
document.getElementsByName("tax_a_cal")[0].addEventListener("input", () => {
|
||||||
|
lastEditedTaxA = "amount";
|
||||||
|
});
|
||||||
|
|
||||||
window.calculate = function () {
|
window.calculate = function () {
|
||||||
|
|
||||||
// --- BASIC INPUTS ---
|
// ---------------- BASIC INPUTS ----------------
|
||||||
var gross_total_income = getValue("gross_total_income");
|
var gross_total_income = getValue("gross_total_income");
|
||||||
var disallowance_14a = getValue("disallowance_14a");
|
var disallowance_14a = getValue("disallowance_14a");
|
||||||
var disallowance_37 = getValue("disallowance_37");
|
var disallowance_37 = getValue("disallowance_37");
|
||||||
|
|
||||||
// -- total gross income --
|
var gross_total = gross_total_income + disallowance_14a + disallowance_37;
|
||||||
var gross_total = gross_total_income + disallowance_37 + disallowance_14a
|
setValue("gti_as_per_ao", gross_total);
|
||||||
// console.log("gross_total income:: " + gross_total)
|
|
||||||
|
|
||||||
// --- DEDUCTIONS ---
|
// ---------------- DEDUCTIONS ----------------
|
||||||
var d80_business = getValue("deduction_80ia_business");
|
var d80_business = getValue("deduction_80ia_business");
|
||||||
var d80_misc = getValue("deduction_80ia_misc");
|
var d80_misc = getValue("deduction_80ia_misc");
|
||||||
var d80_other = getValue("deduction_80ia_other");
|
var d80_other = getValue("deduction_80ia_other");
|
||||||
var d80_sec37 = getValue("deduction_sec37_disallowance");
|
var d80_sec37 = getValue("deduction_sec37_disallowance");
|
||||||
|
var deduction_80g = getValue("deduction_80g");
|
||||||
|
|
||||||
var deduction = d80_business + d80_misc + d80_other + d80_sec37 - 1.35;
|
var deduction = d80_business + d80_misc + d80_other + d80_sec37 - 1.35;
|
||||||
|
|
||||||
var deduction_80g = getValue("deduction_80g");
|
|
||||||
|
|
||||||
// --- NET TAXABLE INCOME ---
|
|
||||||
var net_taxable_income = gross_total - deduction - deduction_80g;
|
var net_taxable_income = gross_total - deduction - deduction_80g;
|
||||||
setValue("net_taxable_income", net_taxable_income);
|
setValue("net_taxable_income", net_taxable_income);
|
||||||
|
|
||||||
// --- TAX 30% ---
|
// ================= TAX (A) – TWO WAY =================
|
||||||
var tax30 = net_taxable_income * 0.30;
|
var per_tax_a = getValue("per_tax_a");
|
||||||
setValue("tax_30_percent", tax30);
|
var tax_a_cal = getValue("tax_a_cal");
|
||||||
|
|
||||||
// --- TAX PAYABLE (18.5%) ---
|
if (net_taxable_income > 0) {
|
||||||
var tax185 = getValue("tax_book_profit_18_5");
|
if (lastEditedTaxA === "percentage") {
|
||||||
|
tax_a_cal = net_taxable_income * (per_tax_a / 100);
|
||||||
|
setValue("tax_a_cal", tax_a_cal);
|
||||||
|
}
|
||||||
|
else if (lastEditedTaxA === "amount") {
|
||||||
|
per_tax_a = (tax_a_cal / net_taxable_income) * 100;
|
||||||
|
setValue("per_tax_a", per_tax_a);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// --- Education Cess 3% ---
|
var per_surcharge_a = getValue("per_surcharge_a");
|
||||||
var tax_payable = (tax30 > tax185) ? tax30 : tax185;
|
var surcharge_a_cal = tax_a_cal * (per_surcharge_a / 100);
|
||||||
|
setValue("surcharge_a_cal", surcharge_a_cal);
|
||||||
|
|
||||||
|
var per_cess_a = getValue("per_cess_a");
|
||||||
|
var edu_cess_a_cal = (tax_a_cal + surcharge_a_cal) * (per_cess_a / 100);
|
||||||
|
setValue("edu_cess_a_cal", edu_cess_a_cal);
|
||||||
|
|
||||||
|
var sum_of_a = tax_a_cal + surcharge_a_cal + edu_cess_a_cal;
|
||||||
|
setValue("sum_of_a", sum_of_a);
|
||||||
|
|
||||||
|
// ================= TAX (B) =================
|
||||||
|
var tax_b_cal = getValue("tax_b_cal");
|
||||||
|
|
||||||
|
var per_surcharge_b = getValue("per_surcharge_b");
|
||||||
|
var surcharge_b_cal = tax_b_cal * (per_surcharge_b / 100);
|
||||||
|
setValue("surcharge_b_cal", surcharge_b_cal);
|
||||||
|
|
||||||
|
var per_cess_b = getValue("per_cess_b");
|
||||||
|
var edu_cess_b_cal = (tax_b_cal + surcharge_b_cal) * (per_cess_b / 100);
|
||||||
|
setValue("edu_cess_b_cal", edu_cess_b_cal);
|
||||||
|
|
||||||
|
var sum_of_b = tax_b_cal + surcharge_b_cal + edu_cess_b_cal;
|
||||||
|
setValue("sum_of_b", sum_of_b);
|
||||||
|
|
||||||
|
// ================= TAX PAYABLE =================
|
||||||
|
var tax_payable = (sum_of_a > sum_of_b) ? tax_a_cal : tax_b_cal;
|
||||||
setValue("tax_payable", tax_payable);
|
setValue("tax_payable", tax_payable);
|
||||||
|
|
||||||
// --- SURCHARGE ---
|
var total_tax_payable = (sum_of_a > sum_of_b) ? sum_of_a : sum_of_b;
|
||||||
var percent = getValue("persentage");
|
|
||||||
var surcharge = tax_payable * (percent / 100);
|
|
||||||
setValue("surcharge", surcharge);
|
|
||||||
|
|
||||||
// --- EDUCATION CESS ---
|
|
||||||
var per_cess = getValue("persentage_cess");
|
|
||||||
var edu_cess = (tax_payable + surcharge) * (per_cess / 100);
|
|
||||||
setValue("edu_cess", edu_cess);
|
|
||||||
|
|
||||||
// --- total tax payable ---
|
|
||||||
var total_tax_payable = tax_payable + surcharge + edu_cess;
|
|
||||||
setValue("total_tax_payable", total_tax_payable);
|
setValue("total_tax_payable", total_tax_payable);
|
||||||
|
|
||||||
// --- mat_credit_created --- new
|
// ================= MAT CREDIT =================
|
||||||
setValue("mat_credit_created", Math.max(tax185 - total_tax_payable, 0));
|
var mat_created = 0;
|
||||||
// --- mat credit_utilized --- new
|
var mat_utilized = 0;
|
||||||
setValue("mat_credit_utilized", Math.max(total_tax_payable - tax185, 0));
|
|
||||||
|
|
||||||
// --- FINAL TAX ---
|
if (sum_of_a < sum_of_b) {
|
||||||
var mat_credit = getValue("mat_credit_utilized");
|
mat_created = sum_of_b - sum_of_a;
|
||||||
|
} else {
|
||||||
|
mat_utilized = sum_of_a - sum_of_b;
|
||||||
|
}
|
||||||
|
|
||||||
|
setValue("mat_credit_created", mat_created);
|
||||||
|
setValue("mat_credit_utilized", mat_utilized);
|
||||||
|
|
||||||
|
// ================= Opening Balance and closing =================
|
||||||
|
var opening_balance = getValue("opening_balance");
|
||||||
|
var closing_balance = (opening_balance + mat_created) - mat_utilized
|
||||||
|
setValue("closing_balance", closing_balance);
|
||||||
|
|
||||||
|
// ================= FINAL TAX =================
|
||||||
var interest_234c = getValue("interest_234c");
|
var interest_234c = getValue("interest_234c");
|
||||||
|
|
||||||
// var total_tax = total_tax_payable + mat_credit + interest_234c;
|
var total_tax = total_tax_payable + interest_234c - mat_utilized;
|
||||||
var total_tax = total_tax_payable + mat_credit + interest_234c;
|
|
||||||
setValue("total_tax", total_tax);
|
setValue("total_tax", total_tax);
|
||||||
|
|
||||||
// --- ASSESSMENT ---
|
// ================= ADJUSTMENTS =================
|
||||||
var adv_tax = getValue("advance_tax");
|
var adv_tax = getValue("advance_tax");
|
||||||
var tds = getValue("tds");
|
var tds = getValue("tds");
|
||||||
var tcs = getValue("tcs");
|
var tcs = getValue("tcs");
|
||||||
var tax_on_regular_assessment = getValue("tax_on_assessment");
|
var tax_on_assessment = getValue("tax_on_assessment");
|
||||||
|
var interest_244a_per143 = getValue("interest_244a_per143");
|
||||||
|
var refund_received = getValue("refund_received");
|
||||||
|
|
||||||
var all_tax = adv_tax + tds + tcs + tax_on_regular_assessment;
|
var paid_tax = adv_tax + tds + tcs + tax_on_assessment;
|
||||||
|
|
||||||
var refund = total_tax - all_tax;
|
var refund = total_tax - paid_tax;
|
||||||
setValue("refund", refund);
|
setValue("refund", refund);
|
||||||
|
|
||||||
|
var balance_receivable = (refund + interest_244a_per143) - refund_received
|
||||||
|
setValue("balance_receivable", balance_receivable);
|
||||||
|
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|||||||
50
static/js/summary_preview.js
Normal file
50
static/js/summary_preview.js
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
document.getElementById("year").addEventListener("change", function () {
|
||||||
|
const year = this.value;
|
||||||
|
|
||||||
|
const downloadBtn = document.getElementById("downloadBtn");
|
||||||
|
const previewDiv = document.getElementById("preview");
|
||||||
|
const contentDiv = document.getElementById("previewContent");
|
||||||
|
|
||||||
|
if (!year) {
|
||||||
|
downloadBtn.style.display = "none";
|
||||||
|
previewDiv.style.display = "none";
|
||||||
|
contentDiv.innerHTML = "";
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
downloadBtn.href = `/summary/download?year=${year}`;
|
||||||
|
downloadBtn.style.display = "inline-block";
|
||||||
|
|
||||||
|
fetch(`/summary/preview?year=${year}`)
|
||||||
|
.then(res => res.json())
|
||||||
|
.then(data => {
|
||||||
|
let html = `<table>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>Particular</th>
|
||||||
|
<th>ITR</th>
|
||||||
|
<th>AO</th>
|
||||||
|
<th>CIT</th>
|
||||||
|
<th>ITAT</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>`;
|
||||||
|
|
||||||
|
data.forEach(row => {
|
||||||
|
html += `<tr>
|
||||||
|
<td>${row.Particular}</td>
|
||||||
|
<td>${row.ITR}</td>
|
||||||
|
<td>${row.AO}</td>
|
||||||
|
<td>${row.CIT}</td>
|
||||||
|
<td>${row.ITAT}</td>
|
||||||
|
</tr>`;
|
||||||
|
});
|
||||||
|
|
||||||
|
html += `</tbody></table>`;
|
||||||
|
contentDiv.innerHTML = html;
|
||||||
|
|
||||||
|
// Show preview
|
||||||
|
previewDiv.style.display = "block";
|
||||||
|
})
|
||||||
|
.catch(err => console.error("Preview load error:", err));
|
||||||
|
});
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
|
|
||||||
{% block title %}Add New AO Record{% endblock %}
|
{% block title %}Add New AO Record{% endblock %}
|
||||||
|
|
||||||
{% block extra_css %}
|
{% block extra_css %}
|
||||||
<!-- Child page CSS -->
|
<!-- Child page CSS -->
|
||||||
<link rel="stylesheet" href="{{ url_for('static', filename='css/add_model.css') }}">
|
<link rel="stylesheet" href="{{ url_for('static', filename='css/add_model.css') }}">
|
||||||
@@ -8,9 +9,9 @@
|
|||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="container">
|
<div class="container">
|
||||||
|
<h2 style="text-align:center;">New AO Form</h2>
|
||||||
<h2 style="text-align:center;">New Assessing Officer Form</h2>
|
<form id="ao" method="POST" enctype="multipart/form-data">
|
||||||
<form id="ao" method="POST">
|
<input type="hidden" name="stage" value="ao">
|
||||||
<div class="form-group full-width inline-2">
|
<div class="form-group full-width inline-2">
|
||||||
<div>
|
<div>
|
||||||
<label>Assessment Year:</label>
|
<label>Assessment Year:</label>
|
||||||
@@ -19,13 +20,13 @@
|
|||||||
-- Please select Assessment Year --
|
-- Please select Assessment Year --
|
||||||
</option>
|
</option>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div id="yearError" style="color:red; display:none; margin-bottom:10px;"></div>
|
<div id="yearError" style="color:red; display:none; margin-bottom:10px;"></div>
|
||||||
</div>
|
</div>
|
||||||
|
<div>
|
||||||
|
<label>Record Created Date:</label>
|
||||||
|
<input type="date" name="created_at" value="{{ current_date }}" required>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group full-width inline-2">
|
<div class="form-group full-width inline-2">
|
||||||
<div>
|
<div>
|
||||||
<label>Gross Total Income:</label>
|
<label>Gross Total Income:</label>
|
||||||
@@ -40,6 +41,12 @@
|
|||||||
<input type="number" name="disallowance_37" step="any" value="0.00" oninput="calculate()" required>
|
<input type="number" name="disallowance_37" step="any" value="0.00" oninput="calculate()" required>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="form-group full-width inline-2">
|
||||||
|
<div>
|
||||||
|
<label>GTI as per AO</label>
|
||||||
|
<input type="number" name="gti_as_per_ao" class="auto" step="any" value="0.00" readonly>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="form-group full-width inline-2">
|
<div class="form-group full-width inline-2">
|
||||||
<div>
|
<div>
|
||||||
@@ -52,13 +59,12 @@
|
|||||||
<input type="number" name="deduction_80ia_misc" step="any" value="0.00" oninput="calculate()" required>
|
<input type="number" name="deduction_80ia_misc" step="any" value="0.00" oninput="calculate()" required>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label>Less :Deduction 80IA Other Operating Revenue:</label>
|
<label>Less : Deduction 80IA Other Operating Revenue:</label>
|
||||||
<input type="number" name="deduction_80ia_other" step="any" value="0.00" oninput="calculate()" required>
|
<input type="number" name="deduction_80ia_other" step="any" value="0.00" oninput="calculate()" required>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group full-width inline-2">
|
<div class="form-group full-width inline-2">
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<label>Less :Deduction Sec 37 Disallowance:</label>
|
<label>Less :Deduction Sec 37 Disallowance:</label>
|
||||||
<input type="number" name="deduction_sec37_disallowance" step="any" value="0.00" oninput="calculate()"
|
<input type="number" name="deduction_sec37_disallowance" step="any" value="0.00" oninput="calculate()"
|
||||||
@@ -68,56 +74,101 @@
|
|||||||
<label>Less: Deduction 80G: </label>
|
<label>Less: Deduction 80G: </label>
|
||||||
<input type="number" name="deduction_80g" step="any" value="0.00" oninput="calculate()" required>
|
<input type="number" name="deduction_80g" step="any" value="0.00" oninput="calculate()" required>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
|
||||||
<label>Net Taxable Income:</label>
|
|
||||||
<input type="number" name="net_taxable_income" class="auto" step="any" value="0.00" readonly>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group full-width inline-2">
|
<div class="form-group full-width inline-2">
|
||||||
<div>
|
<div>
|
||||||
<label>Tax @ 30% (A):</label>
|
<label>Net Taxable Income:</label>
|
||||||
<input type="number" name="tax_30_percent" step="any" value="0.00" oninput="calculate()" required>
|
<input type="number" name="net_taxable_income" class="auto" step="any" value="0.00" readonly>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group full-width inline-2">
|
||||||
|
<div>
|
||||||
|
<label>Enter Percentage(%) calculate: Tax(A):</label>
|
||||||
|
<input type="number" name="per_tax_a" step="any" value="0.00" oninput="calculate()">
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<label>Tax @(A):</label>
|
||||||
|
<input type="number" name="tax_a_cal" step="any" value="0.00" oninput="calculate()">
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<label>Enter Percentage(%) calculate: Tax(B):</label>
|
||||||
|
<input type="number" name="per_tax_b" step="any" value="0.00" oninput="calculate()">
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label>Tax @ 18.5% on Book Profit (B):</label>
|
<label>Tax @ 18.5% on Book Profit (B):</label>
|
||||||
<input type="number" name="tax_book_profit_18_5" step="any" value="0.00" oninput="calculate()" required>
|
<input type="number" name="tax_b_cal" step="any" value="0.00" oninput="calculate()" required>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group full-width inline-2">
|
||||||
|
<div>
|
||||||
|
<label>Enter Percentage(%) Surcharge:Tax(A):</label>
|
||||||
|
<input type="number" name="per_surcharge_a" step="any" value="0.00" oninput="calculate()">
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<label>Surcharge on Tax(A):</label>
|
||||||
|
<input type="number" name="surcharge_a_cal" class="auto" value="0.00" readonly>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<label>Enter Percentage(%) Surcharge:Tax(B)</label>
|
||||||
|
<input type="number" name="per_surcharge_b" step="any" value="0.00" oninput="calculate()">
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<label>Surcharge on Tax(B):</label>
|
||||||
|
<input type="number" name="surcharge_b_cal" class="auto" value="0.00" readonly>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group full-width inline-2">
|
||||||
|
<div>
|
||||||
|
<label>Enter Percentage(%) Cess:Tax(A):</label>
|
||||||
|
<input type="number" name="per_cess_a" step="any" value="0.00" oninput="calculate()">
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<label>Education Cess:Tax(A): </label>
|
||||||
|
<input type="number" name="edu_cess_a_cal" class="auto" step="any" value="0.00" readonly>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<label>Enter Percentage(%) Cess:Tax(B):</label>
|
||||||
|
<input type="number" name="per_cess_b" step="any" value="0.00" oninput="calculate()">
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<label>Education Cess:Tax(B): </label>
|
||||||
|
<input type="number" name="edu_cess_b_cal" class="auto" step="any" value="0.00" readonly>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group full-width inline-2">
|
||||||
|
<div>
|
||||||
|
<label>Total cal Tax(A): </label>
|
||||||
|
<input type="number" name="sum_of_a" class="auto" step="any" value="0.00" readonly>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<label>Total cal Tax(B): </label>
|
||||||
|
<input type="number" name="sum_of_b" class="auto" step="any" value="0.00" readonly>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group full-width inline-2">
|
||||||
<div>
|
<div>
|
||||||
<label>Tax Payable (Higher of A or B):</label>
|
<label>Tax Payable (Higher of A or B):</label>
|
||||||
<input type="number" name="tax_payable" class="auto" step="any" value="0.00" readonly>
|
<input type="number" name="tax_payable" class="auto" step="any" value="0.00" readonly>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="form-group full-width inline-2">
|
|
||||||
<div>
|
|
||||||
<label>Enter Percentage (%) Surcharge:</label>
|
|
||||||
<input type="number" name="persentage" step="any" value="0.00" oninput="calculate()">
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<label>Surcharge:</label>
|
|
||||||
<input type="number" name="surcharge" class="auto" value="0.00" readonly>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<label>Enter Percentage (%) Cess:</label>
|
|
||||||
<input type="number" name="persentage_cess" step="any" value="0.00" oninput="calculate()">
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<label>Education Cess:</label>
|
|
||||||
<input type="number" name="edu_cess" class="auto" step="any" value="0.00" readonly>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<div class="form-group full-width inline-2">
|
|
||||||
<div>
|
<div>
|
||||||
<label>Total tax Payable:</label>
|
<label>Total tax Payable:</label>
|
||||||
<input type="number" name="total_tax_payable" class="auto" step="any" value="0.00" readonly>
|
<input type="number" name="total_tax_payable" class="auto" step="any" value="0.00" readonly>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group full-width inline-2">
|
||||||
|
<div>
|
||||||
|
<label>Opening Balance:</label>
|
||||||
|
<input type="number" name="opening_balance" step="any" value="0.00" oninput="calculate()">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="form-group full-width inline-2">
|
<div class="form-group full-width inline-2">
|
||||||
<div>
|
<div>
|
||||||
<label>Less :Mat Credit Created:</label>
|
<label>Less :Mat Credit Created:</label>
|
||||||
@@ -127,14 +178,24 @@
|
|||||||
<label>Less :Mat Credit Utilized:</label>
|
<label>Less :Mat Credit Utilized:</label>
|
||||||
<input type="number" name="mat_credit_utilized" step="any" value="0.00" oninput="calculate()" required>
|
<input type="number" name="mat_credit_utilized" step="any" value="0.00" oninput="calculate()" required>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group full-width inline-2">
|
||||||
|
<div>
|
||||||
|
<label>Closing Balance:</label>
|
||||||
|
<input type="number" name="closing_balance" step="any" value="0.00" oninput="calculate()">
|
||||||
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label>Add :Interest 234c:</label>
|
<label>Add :Interest 234c:</label>
|
||||||
<input type="number" name="interest_234c" step="any" value="0.00" oninput="calculate()" required>
|
<input type="number" name="interest_234c" step="any" value="0.00" oninput="calculate()" required>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
|
||||||
<label>Total Tax:</label>
|
<div class="form-group full-width inline-2">
|
||||||
<input type="number" name="total_tax" step="any" class="auto" value="0.00" readonly>
|
<div>
|
||||||
|
<label>Total Tax:</label>
|
||||||
|
<input type="number" name="total_tax" step="any" class="auto" value="0.00" readonly>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group full-width inline-2">
|
<div class="form-group full-width inline-2">
|
||||||
@@ -160,29 +221,48 @@
|
|||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label>Tax on Regular Assessment:</label>
|
<label>Tax on Regular Assessment:</label>
|
||||||
<input type="number" name="tax_on_assessment" step="any" value="0.00" oninput="calculate()" required>
|
<input type="number" name="tax_on_assessment" step="any" value="0.00" oninput="calculate()">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Refund:</label>
|
<label>Refund:</label>
|
||||||
<input type="number" name="refund" class="auto" step="any" value="0.00" readonly>
|
<input type="number" name="refund" class="auto" step="any" value="0.00" readonly>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group full-width inline-2">
|
||||||
<label>Remarks:</label>
|
<div class="form-group">
|
||||||
<input type="text" name="Remarks">
|
<label>Add : Interest u/s 244A as per 143:</label>
|
||||||
|
<input type="number" name="interest_244a_per143" step="any" value="0.00" oninput="calculate()">
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label>Less : Refund Received on:</label>
|
||||||
|
<input type="number" name="refund_received" step="any" value="0.00" oninput="calculate()">
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label>Balance Receivable:</label>
|
||||||
|
<input type="number" name="balance_receivable" class="auto" step="any" value="0.00"
|
||||||
|
oninput="calculate()">
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group full-width inline-2">
|
||||||
|
<div>
|
||||||
|
<label>Select Documents:</label>
|
||||||
|
<input type="file" name="documents" multiple>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<label>Remarks:</label>
|
||||||
|
<input type="text" name="Remarks">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<button type="submit">Submit</button>
|
<button type="submit">Submit</button>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block extra_js %}
|
{% block extra_js %}
|
||||||
<script src="{{ url_for('static', filename='js/ao_calc.js') }}"></script>
|
<script src="{{ url_for('static', filename='js/itr_calc.js') }}"></script>
|
||||||
<script src="{{ url_for('static', filename='js/year_dropdown.js') }}"></script>
|
<script src="{{ url_for('static', filename='js/year_dropdown.js') }}"></script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
@@ -9,7 +9,8 @@
|
|||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<h2 style="text-align:center;">New CIT Form </h2>
|
<h2 style="text-align:center;">New CIT Form </h2>
|
||||||
<form id="cit" method="POST">
|
<form id="cit" method="POST" enctype="multipart/form-data">
|
||||||
|
<input type="hidden" name="stage" value="itr">
|
||||||
<div class="form-group full-width inline-2">
|
<div class="form-group full-width inline-2">
|
||||||
<div>
|
<div>
|
||||||
<label>Assessment Year:</label>
|
<label>Assessment Year:</label>
|
||||||
@@ -20,6 +21,10 @@
|
|||||||
</select>
|
</select>
|
||||||
<div id="yearError" style="color:red; display:none; margin-bottom:10px;"></div>
|
<div id="yearError" style="color:red; display:none; margin-bottom:10px;"></div>
|
||||||
</div>
|
</div>
|
||||||
|
<div>
|
||||||
|
<label>Record Created Date:</label>
|
||||||
|
<input type="date" name="created_at" value="{{ current_date }}" required>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group full-width inline-2">
|
<div class="form-group full-width inline-2">
|
||||||
@@ -37,6 +42,13 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group full-width inline-2">
|
||||||
|
<div>
|
||||||
|
<label>GTI as per CIT</label>
|
||||||
|
<input type="number" name="gti_as_per_ao" class="auto" step="any" value="0.00" readonly>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="form-group full-width inline-2">
|
<div class="form-group full-width inline-2">
|
||||||
<div>
|
<div>
|
||||||
<label>Deduction 80IA Business Income:</label>
|
<label>Deduction 80IA Business Income:</label>
|
||||||
@@ -74,46 +86,91 @@
|
|||||||
|
|
||||||
<div class="form-group full-width inline-2">
|
<div class="form-group full-width inline-2">
|
||||||
<div>
|
<div>
|
||||||
<label>Tax @ 30% (A):</label>
|
<label>Enter Percentage(%) calculate: Tax(A):</label>
|
||||||
<input type="number" name="tax_30_percent" step="any" value="0.00" oninput="calculate()" required>
|
<input type="number" name="per_tax_a" step="any" value="0.00" oninput="calculate()">
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<label>Tax @(A):</label>
|
||||||
|
<input type="number" name="tax_a_cal" step="any" value="0.00" oninput="calculate()">
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<label>Enter Percentage(%) calculate: Tax(B):</label>
|
||||||
|
<input type="number" name="per_tax_b" step="any" value="0.00" oninput="calculate()">
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label>Tax @ 18.5% on Book Profit (B):</label>
|
<label>Tax @ 18.5% on Book Profit (B):</label>
|
||||||
<input type="number" name="tax_book_profit_18_5" step="any" value="0.00" oninput="calculate()" required>
|
<input type="number" name="tax_b_cal" step="any" value="0.00" oninput="calculate()" required>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group full-width inline-2">
|
||||||
|
<div>
|
||||||
|
<label>Enter Percentage(%) Surcharge:Tax(A):</label>
|
||||||
|
<input type="number" name="per_surcharge_a" step="any" value="0.00" oninput="calculate()">
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<label>Surcharge on Tax(A):</label>
|
||||||
|
<input type="number" name="surcharge_a_cal" class="auto" value="0.00" readonly>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<label>Enter Percentage(%) Surcharge:Tax(B)</label>
|
||||||
|
<input type="number" name="per_surcharge_b" step="any" value="0.00" oninput="calculate()">
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<label>Surcharge on Tax(B):</label>
|
||||||
|
<input type="number" name="surcharge_b_cal" class="auto" value="0.00" readonly>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group full-width inline-2">
|
||||||
|
<div>
|
||||||
|
<label>Enter Percentage(%) Cess:Tax(A):</label>
|
||||||
|
<input type="number" name="per_cess_a" step="any" value="0.00" oninput="calculate()">
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<label>Education Cess:Tax(A): </label>
|
||||||
|
<input type="number" name="edu_cess_a_cal" class="auto" step="any" value="0.00" readonly>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<label>Enter Percentage(%) Cess:Tax(B):</label>
|
||||||
|
<input type="number" name="per_cess_b" step="any" value="0.00" oninput="calculate()">
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<label>Education Cess:Tax(B): </label>
|
||||||
|
<input type="number" name="edu_cess_b_cal" class="auto" step="any" value="0.00" readonly>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group full-width inline-2">
|
||||||
|
<div>
|
||||||
|
<label>Total cal Tax(A): </label>
|
||||||
|
<input type="number" name="sum_of_a" class="auto" step="any" value="0.00" readonly>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<label>Total cal Tax(B): </label>
|
||||||
|
<input type="number" name="sum_of_b" class="auto" step="any" value="0.00" readonly>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group full-width inline-2">
|
||||||
<div>
|
<div>
|
||||||
<label>Tax Payable (Higher of A or B):</label>
|
<label>Tax Payable (Higher of A or B):</label>
|
||||||
<input type="number" name="tax_payable" class="auto" step="any" value="0.00" readonly>
|
<input type="number" name="tax_payable" class="auto" step="any" value="0.00" readonly>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group full-width inline-2">
|
|
||||||
<div>
|
|
||||||
<label>Enter Percentage (%) Surcharge:</label>
|
|
||||||
<input type="number" name="persentage" step="any" value="0.00" oninput="calculate()">
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<label>Surcharge:</label>
|
|
||||||
<input type="number" name="surcharge" class="auto" value="0.00" readonly>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<label>Enter Percentage (%) Cess:</label>
|
|
||||||
<input type="number" name="persentage_cess" step="any" value="0.00" oninput="calculate()">
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<label>Education Cess:</label>
|
|
||||||
<input type="number" name="edu_cess" class="auto" step="any" value="0.00" readonly>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group full-width inline-2">
|
|
||||||
<div>
|
<div>
|
||||||
<label>Total tax Payable:</label>
|
<label>Total tax Payable:</label>
|
||||||
<input type="number" name="total_tax_payable" class="auto" step="any" value="0.00" readonly>
|
<input type="number" name="total_tax_payable" class="auto" step="any" value="0.00" readonly>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group full-width inline-2">
|
||||||
|
<div>
|
||||||
|
<label>Opening Balance:</label>
|
||||||
|
<input type="number" name="opening_balance" step="any" value="0.00" oninput="calculate()">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="form-group full-width inline-2">
|
<div class="form-group full-width inline-2">
|
||||||
<div>
|
<div>
|
||||||
<label>Less :Mat Credit Created:</label>
|
<label>Less :Mat Credit Created:</label>
|
||||||
@@ -123,6 +180,12 @@
|
|||||||
<label>Less :Mat Credit Utilized:</label>
|
<label>Less :Mat Credit Utilized:</label>
|
||||||
<input type="number" name="mat_credit_utilized" step="any" value="0.00" oninput="calculate()" required>
|
<input type="number" name="mat_credit_utilized" step="any" value="0.00" oninput="calculate()" required>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group full-width inline-2">
|
||||||
|
<div>
|
||||||
|
<label>Closing Balance:</label>
|
||||||
|
<input type="number" name="closing_balance" step="any" value="0.00" oninput="calculate()">
|
||||||
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label>Add :Interest 234c:</label>
|
<label>Add :Interest 234c:</label>
|
||||||
<input type="number" name="interest_234c" step="any" value="0.00" oninput="calculate()" required>
|
<input type="number" name="interest_234c" step="any" value="0.00" oninput="calculate()" required>
|
||||||
@@ -166,9 +229,31 @@
|
|||||||
<input type="number" name="refund" class="auto" step="any" value="0.00" readonly>
|
<input type="number" name="refund" class="auto" step="any" value="0.00" readonly>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group full-width inline-2">
|
||||||
<label>Remarks:</label>
|
<div class="form-group">
|
||||||
<input type="text" name="Remarks">
|
<label>Add : Interest u/s 244A as per 143:</label>
|
||||||
|
<input type="number" name="interest_244a_per143" step="any" value="0.00" oninput="calculate()">
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label>Less : Refund Received on:</label>
|
||||||
|
<input type="number" name="refund_received" step="any" value="0.00" oninput="calculate()">
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label>Balance Receivable:</label>
|
||||||
|
<input type="number" name="balance_receivable" class="auto" step="any" value="0.00"
|
||||||
|
oninput="calculate()">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group full-width inline-2">
|
||||||
|
<div>
|
||||||
|
<label>Select Documents:</label>
|
||||||
|
<input type="file" name="documents" multiple>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<label>Remarks:</label>
|
||||||
|
<input type="text" name="Remarks">
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<button type="submit">Submit</button>
|
<button type="submit">Submit</button>
|
||||||
@@ -177,6 +262,6 @@
|
|||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block extra_js %}
|
{% block extra_js %}
|
||||||
<script src="{{ url_for('static', filename='js/cit_calc.js') }}"></script>
|
<script src="{{ url_for('static', filename='js/itr_calc.js') }}"></script>
|
||||||
<script src="{{ url_for('static', filename='js/year_dropdown.js') }}"></script>
|
<script src="{{ url_for('static', filename='js/year_dropdown.js') }}"></script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
@@ -10,8 +10,8 @@
|
|||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<h2 style="text-align:center;">New Income Tax Appellate Tribunal Form</h2>
|
<h2 style="text-align:center;">New Income Tax Appellate Tribunal Form</h2>
|
||||||
<form id="itat" method="POST" onsubmit="return showSuccessMessage()">
|
<form id="itat" method="POST" enctype="multipart/form-data" onsubmit="return showSuccessMessage()">
|
||||||
|
<input type="hidden" name="stage" value="itr">
|
||||||
<div class="form-group full-width inline-2">
|
<div class="form-group full-width inline-2">
|
||||||
<div>
|
<div>
|
||||||
<label>Assessment Year:</label>
|
<label>Assessment Year:</label>
|
||||||
@@ -22,6 +22,10 @@
|
|||||||
</select>
|
</select>
|
||||||
<div id="yearError" style="color:red; display:none; margin-bottom:10px;"></div>
|
<div id="yearError" style="color:red; display:none; margin-bottom:10px;"></div>
|
||||||
</div>
|
</div>
|
||||||
|
<div>
|
||||||
|
<label>Record Created Date:</label>
|
||||||
|
<input type="date" name="created_at" value="{{ current_date }}" required>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group full-width inline-2">
|
<div class="form-group full-width inline-2">
|
||||||
@@ -39,6 +43,13 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group full-width inline-2">
|
||||||
|
<div>
|
||||||
|
<label>GTI as per AO</label>
|
||||||
|
<input type="number" name="gti_as_per_ao" class="auto" step="any" value="0.00" readonly>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="form-group full-width inline-2">
|
<div class="form-group full-width inline-2">
|
||||||
<div>
|
<div>
|
||||||
<label>Less :Deduction 80IA Business Income:</label>
|
<label>Less :Deduction 80IA Business Income:</label>
|
||||||
@@ -55,8 +66,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="form-group full-width inline-2">
|
<div class="form-group full-width inline-2">
|
||||||
<div>
|
<div>
|
||||||
<label>Less :Deduction Sec 37 Disallowance:</label>
|
<label>Less :Deduction Sec 37 Disallowance:</label>
|
||||||
@@ -78,46 +87,91 @@
|
|||||||
|
|
||||||
<div class="form-group full-width inline-2">
|
<div class="form-group full-width inline-2">
|
||||||
<div>
|
<div>
|
||||||
<label>Tax @ 30% (A):</label>
|
<label>Enter Percentage(%) calculate: Tax(A):</label>
|
||||||
<input type="number" name="tax_30_percent" step="any" value="0.00" oninput="calculate()" required>
|
<input type="number" name="per_tax_a" step="any" value="0.00" oninput="calculate()">
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<label>Tax @(A):</label>
|
||||||
|
<input type="number" name="tax_a_cal" step="any" value="0.00" oninput="calculate()">
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<label>Enter Percentage(%) calculate: Tax(B):</label>
|
||||||
|
<input type="number" name="per_tax_b" step="any" value="0.00" oninput="calculate()">
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label>Tax @ 18.5% on Book Profit (B):</label>
|
<label>Tax @ 18.5% on Book Profit (B):</label>
|
||||||
<input type="number" name="tax_book_profit_18_5" step="any" value="0.00" oninput="calculate()" required>
|
<input type="number" name="tax_b_cal" step="any" value="0.00" oninput="calculate()" required>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group full-width inline-2">
|
||||||
|
<div>
|
||||||
|
<label>Enter Percentage(%) Surcharge:Tax(A):</label>
|
||||||
|
<input type="number" name="per_surcharge_a" step="any" value="0.00" oninput="calculate()">
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<label>Surcharge on Tax(A):</label>
|
||||||
|
<input type="number" name="surcharge_a_cal" class="auto" value="0.00" readonly>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<label>Enter Percentage(%) Surcharge:Tax(B)</label>
|
||||||
|
<input type="number" name="per_surcharge_b" step="any" value="0.00" oninput="calculate()">
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<label>Surcharge on Tax(B):</label>
|
||||||
|
<input type="number" name="surcharge_b_cal" class="auto" value="0.00" readonly>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group full-width inline-2">
|
||||||
|
<div>
|
||||||
|
<label>Enter Percentage(%) Cess:Tax(A):</label>
|
||||||
|
<input type="number" name="per_cess_a" step="any" value="0.00" oninput="calculate()">
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<label>Education Cess:Tax(A): </label>
|
||||||
|
<input type="number" name="edu_cess_a_cal" class="auto" step="any" value="0.00" readonly>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<label>Enter Percentage(%) Cess:Tax(B):</label>
|
||||||
|
<input type="number" name="per_cess_b" step="any" value="0.00" oninput="calculate()">
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<label>Education Cess:Tax(B): </label>
|
||||||
|
<input type="number" name="edu_cess_b_cal" class="auto" step="any" value="0.00" readonly>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group full-width inline-2">
|
||||||
|
<div>
|
||||||
|
<label>Total cal Tax(A): </label>
|
||||||
|
<input type="number" name="sum_of_a" class="auto" step="any" value="0.00" readonly>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<label>Total cal Tax(B): </label>
|
||||||
|
<input type="number" name="sum_of_b" class="auto" step="any" value="0.00" readonly>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group full-width inline-2">
|
||||||
<div>
|
<div>
|
||||||
<label>Tax Payable (Higher of A or B):</label>
|
<label>Tax Payable (Higher of A or B):</label>
|
||||||
<input type="number" name="tax_payable" class="auto" step="any" value="0.00" readonly>
|
<input type="number" name="tax_payable" class="auto" step="any" value="0.00" readonly>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group full-width inline-2">
|
|
||||||
<div>
|
|
||||||
<label>Enter Percentage (%) Surcharge:</label>
|
|
||||||
<input type="number" name="persentage" step="any" value="0.00" oninput="calculate()">
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<label>Surcharge:</label>
|
|
||||||
<input type="number" name="surcharge" class="auto" value="0.00" readonly>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div>
|
|
||||||
<label>Enter Percentage (%) Cess:</label>
|
|
||||||
<input type="number" name="persentage_cess" step="any" value="0.00" oninput="calculate()">
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<label>Education Cess:</label>
|
|
||||||
<input type="number" name="edu_cess" class="auto" step="any" value="0.00" readonly>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group full-width inline-2">
|
|
||||||
<div>
|
<div>
|
||||||
<label>Total tax Payable:</label>
|
<label>Total tax Payable:</label>
|
||||||
<input type="number" name="total_tax_payable" class="auto" step="any" value="0.00" readonly>
|
<input type="number" name="total_tax_payable" class="auto" step="any" value="0.00" readonly>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group full-width inline-2">
|
||||||
|
<div>
|
||||||
|
<label>Opening Balance:</label>
|
||||||
|
<input type="number" name="opening_balance" step="any" value="0.00" oninput="calculate()">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="form-group full-width inline-2">
|
<div class="form-group full-width inline-2">
|
||||||
<div>
|
<div>
|
||||||
<label>Less :Mat Credit Created:</label>
|
<label>Less :Mat Credit Created:</label>
|
||||||
@@ -127,6 +181,13 @@
|
|||||||
<label>Less :Mat Credit Utilized:</label>
|
<label>Less :Mat Credit Utilized:</label>
|
||||||
<input type="number" name="mat_credit_utilized" step="any" value="0.00" oninput="calculate()" required>
|
<input type="number" name="mat_credit_utilized" step="any" value="0.00" oninput="calculate()" required>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group full-width inline-2">
|
||||||
|
<div>
|
||||||
|
<label>Closing Balance:</label>
|
||||||
|
<input type="number" name="closing_balance" step="any" value="0.00" oninput="calculate()">
|
||||||
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label>Add :Interest 234c:</label>
|
<label>Add :Interest 234c:</label>
|
||||||
<input type="number" name="interest_234c" step="any" value="0.00" oninput="calculate()" required>
|
<input type="number" name="interest_234c" step="any" value="0.00" oninput="calculate()" required>
|
||||||
@@ -172,9 +233,31 @@
|
|||||||
<input type="number" name="refund" class="auto" step="any" value="0.00" readonly>
|
<input type="number" name="refund" class="auto" step="any" value="0.00" readonly>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group full-width inline-2">
|
||||||
<label>Remarks:</label>
|
<div class="form-group">
|
||||||
<input type="text" name="Remarks">
|
<label>Add : Interest u/s 244A as per 143:</label>
|
||||||
|
<input type="number" name="interest_244a_per143" step="any" value="0.00" oninput="calculate()">
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label>Less : Refund Received on:</label>
|
||||||
|
<input type="number" name="refund_received" step="any" value="0.00" oninput="calculate()">
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label>Balance Receivable:</label>
|
||||||
|
<input type="number" name="balance_receivable" class="auto" step="any" value="0.00"
|
||||||
|
oninput="calculate()">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group full-width inline-2">
|
||||||
|
<div>
|
||||||
|
<label>Select Documents:</label>
|
||||||
|
<input type="file" name="documents" multiple>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<label>Remarks:</label>
|
||||||
|
<input type="text" name="Remarks">
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<button type="submit">Submit</button>
|
<button type="submit">Submit</button>
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
<div id="yearError" style="color:red; display:none; margin-bottom:10px;"></div>
|
<div id="yearError" style="color:red; display:none; margin-bottom:10px;"></div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label>Created Date:</label>
|
<label>Record Created Date:</label>
|
||||||
<input type="date" name="created_at" value="{{ current_date }}" required>
|
<input type="date" name="created_at" value="{{ current_date }}" required>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -41,6 +41,12 @@
|
|||||||
<input type="number" name="disallowance_37" step="any" value="0.00" oninput="calculate()" required>
|
<input type="number" name="disallowance_37" step="any" value="0.00" oninput="calculate()" required>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="form-group full-width inline-2">
|
||||||
|
<div>
|
||||||
|
<label>GTI as per AO</label>
|
||||||
|
<input type="number" name="gti_as_per_ao" class="auto" step="any" value="0.00" readonly>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="form-group full-width inline-2">
|
<div class="form-group full-width inline-2">
|
||||||
<div>
|
<div>
|
||||||
@@ -79,44 +85,91 @@
|
|||||||
|
|
||||||
<div class="form-group full-width inline-2">
|
<div class="form-group full-width inline-2">
|
||||||
<div>
|
<div>
|
||||||
<label>Tax @ 30% (A):</label>
|
<label>Enter Percentage(%) calculate: Tax(A):</label>
|
||||||
<input type="number" name="tax_30_percent" step="any" value="0.00" oninput="calculate()" required>
|
<input type="number" name="per_tax_a" step="any" value="0.00" oninput="calculate()">
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<label>Tax @(A):</label>
|
||||||
|
<input type="number" name="tax_a_cal" step="any" value="0.00" oninput="calculate()">
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<label>Enter Percentage(%) calculate: Tax(B):</label>
|
||||||
|
<input type="number" name="per_tax_b" step="any" value="0.00" oninput="calculate()">
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label>Tax @ 18.5% on Book Profit (B):</label>
|
<label>Tax @ 18.5% on Book Profit (B):</label>
|
||||||
<input type="number" name="tax_book_profit_18_5" step="any" value="0.00" oninput="calculate()" required>
|
<input type="number" name="tax_b_cal" step="any" value="0.00" oninput="calculate()" required>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group full-width inline-2">
|
||||||
|
<div>
|
||||||
|
<label>Enter Percentage(%) Surcharge:Tax(A):</label>
|
||||||
|
<input type="number" name="per_surcharge_a" step="any" value="0.00" oninput="calculate()">
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<label>Surcharge on Tax(A):</label>
|
||||||
|
<input type="number" name="surcharge_a_cal" class="auto" value="0.00" readonly>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<label>Enter Percentage(%) Surcharge:Tax(B)</label>
|
||||||
|
<input type="number" name="per_surcharge_b" step="any" value="0.00" oninput="calculate()">
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<label>Surcharge on Tax(B):</label>
|
||||||
|
<input type="number" name="surcharge_b_cal" class="auto" value="0.00" readonly>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group full-width inline-2">
|
||||||
|
<div>
|
||||||
|
<label>Enter Percentage(%) Cess:Tax(A):</label>
|
||||||
|
<input type="number" name="per_cess_a" step="any" value="0.00" oninput="calculate()">
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<label>Education Cess:Tax(A): </label>
|
||||||
|
<input type="number" name="edu_cess_a_cal" class="auto" step="any" value="0.00" readonly>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<label>Enter Percentage(%) Cess:Tax(B):</label>
|
||||||
|
<input type="number" name="per_cess_b" step="any" value="0.00" oninput="calculate()">
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<label>Education Cess:Tax(B): </label>
|
||||||
|
<input type="number" name="edu_cess_b_cal" class="auto" step="any" value="0.00" readonly>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group full-width inline-2">
|
||||||
|
<div>
|
||||||
|
<label>Total cal Tax(A): </label>
|
||||||
|
<input type="number" name="sum_of_a" class="auto" step="any" value="0.00" readonly>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<label>Total cal Tax(B): </label>
|
||||||
|
<input type="number" name="sum_of_b" class="auto" step="any" value="0.00" readonly>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group full-width inline-2">
|
||||||
<div>
|
<div>
|
||||||
<label>Tax Payable (Higher of A or B):</label>
|
<label>Tax Payable (Higher of A or B):</label>
|
||||||
<input type="number" name="tax_payable" class="auto" step="any" value="0.00" readonly>
|
<input type="number" name="tax_payable" class="auto" step="any" value="0.00" readonly>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group full-width inline-2">
|
|
||||||
<div>
|
|
||||||
<label>Enter Percentage (%) Surcharge:</label>
|
|
||||||
<input type="number" name="persentage" step="any" value="0.00" oninput="calculate()">
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<label>Surcharge:</label>
|
|
||||||
<input type="number" name="surcharge" class="auto" value="0.00" readonly>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<label>Enter Percentage (%) Cess:</label>
|
|
||||||
<input type="number" name="persentage_cess" step="any" value="0.00" oninput="calculate()">
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<label>Education Cess: </label>
|
|
||||||
<input type="number" name="edu_cess" class="auto" step="any" value="0.00" readonly>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group full-width inline-2">
|
|
||||||
<div>
|
<div>
|
||||||
<label>Total tax Payable:</label>
|
<label>Total tax Payable:</label>
|
||||||
<input type="number" name="total_tax_payable" class="auto" step="any" value="0.00" readonly>
|
<input type="number" name="total_tax_payable" class="auto" step="any" value="0.00" readonly>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group full-width inline-2">
|
||||||
|
<div>
|
||||||
|
<label>Opening Balance:</label>
|
||||||
|
<input type="number" name="opening_balance" step="any" value="0.00" oninput="calculate()">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="form-group full-width inline-2">
|
<div class="form-group full-width inline-2">
|
||||||
<div>
|
<div>
|
||||||
<label>Less :Mat Credit Created:</label>
|
<label>Less :Mat Credit Created:</label>
|
||||||
@@ -126,6 +179,13 @@
|
|||||||
<label>Less :Mat Credit Utilized:</label>
|
<label>Less :Mat Credit Utilized:</label>
|
||||||
<input type="number" name="mat_credit_utilized" step="any" value="0.00" oninput="calculate()" required>
|
<input type="number" name="mat_credit_utilized" step="any" value="0.00" oninput="calculate()" required>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group full-width inline-2">
|
||||||
|
<div>
|
||||||
|
<label>Closing Balance:</label>
|
||||||
|
<input type="number" name="closing_balance" step="any" value="0.00" oninput="calculate()">
|
||||||
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label>Add :Interest 234c:</label>
|
<label>Add :Interest 234c:</label>
|
||||||
<input type="number" name="interest_234c" step="any" value="0.00" oninput="calculate()" required>
|
<input type="number" name="interest_234c" step="any" value="0.00" oninput="calculate()" required>
|
||||||
@@ -166,9 +226,28 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
|
||||||
<label>Refund:</label>
|
<div class="form-group full-width inline-2">
|
||||||
<input type="number" name="refund" class="auto" step="any" value="0.00" readonly>
|
<div class="form-group">
|
||||||
|
<label>Refund:</label>
|
||||||
|
<input type="number" name="refund" class="auto" step="any" value="0.00">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group full-width inline-2">
|
||||||
|
<div class="form-group">
|
||||||
|
<label>Add : Interest u/s 244A as per 143:</label>
|
||||||
|
<input type="number" name="interest_244a_per143" step="any" value="0.00" oninput="calculate()">
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label>Less : Refund Received on:</label>
|
||||||
|
<input type="number" name="refund_received" step="any" value="0.00" oninput="calculate()">
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label>Balance Receivable:</label>
|
||||||
|
<input type="number" name="balance_receivable" class="auto" step="any" value="0.00"
|
||||||
|
oninput="calculate()">
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group full-width inline-2">
|
<div class="form-group full-width inline-2">
|
||||||
|
|||||||
@@ -22,6 +22,8 @@
|
|||||||
<th>Gross Total Income</th>
|
<th>Gross Total Income</th>
|
||||||
<th>Net Taxable Income</th>
|
<th>Net Taxable Income</th>
|
||||||
<th>Total Tax</th>
|
<th>Total Tax</th>
|
||||||
|
<th>Refund</th>
|
||||||
|
<th>Created Record Date</th>
|
||||||
<th>Actions</th>
|
<th>Actions</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
@@ -31,7 +33,9 @@
|
|||||||
<td>AY {{ ao.year }}-{{ ao.year+1 }}</td>
|
<td>AY {{ ao.year }}-{{ ao.year+1 }}</td>
|
||||||
<td>{{ ao.gross_total_income }}</td>
|
<td>{{ ao.gross_total_income }}</td>
|
||||||
<td>{{ ao.net_taxable_income }}</td>
|
<td>{{ ao.net_taxable_income }}</td>
|
||||||
<td>{{ ao.total_tax }}</td>
|
<td>{{ ao.total_tax_payable }}</td>
|
||||||
|
<td>{{ "{:,.2f}".format(ao.refund) }}</td>
|
||||||
|
<td>{{ ao.created_at.strftime('%Y-%m-%d') }}</td>
|
||||||
<td>
|
<td>
|
||||||
<a href="{{ url_for('update_ao', id=ao.id) }}" class="btn btn-update">Edit</a>
|
<a href="{{ url_for('update_ao', id=ao.id) }}" class="btn btn-update">Edit</a>
|
||||||
|
|
||||||
|
|||||||
@@ -22,6 +22,7 @@
|
|||||||
<th>Net Taxable Income</th>
|
<th>Net Taxable Income</th>
|
||||||
<th>Total Tax Payable</th>
|
<th>Total Tax Payable</th>
|
||||||
<th>Refund</th>
|
<th>Refund</th>
|
||||||
|
<th>Created Record Date</th>
|
||||||
<th>Actions</th>
|
<th>Actions</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
@@ -33,6 +34,7 @@
|
|||||||
<td>{{ "{:,.2f}".format(record.net_taxable_income) }}</td>
|
<td>{{ "{:,.2f}".format(record.net_taxable_income) }}</td>
|
||||||
<td>{{ "{:,.2f}".format(record.total_tax_payable) }}</td>
|
<td>{{ "{:,.2f}".format(record.total_tax_payable) }}</td>
|
||||||
<td>{{ "{:,.2f}".format(record.refund) }}</td>
|
<td>{{ "{:,.2f}".format(record.refund) }}</td>
|
||||||
|
<td>{{ record.created_at.strftime('%Y-%m-%d') }}</td>
|
||||||
<td class="action-cell">
|
<td class="action-cell">
|
||||||
<a href="{{ url_for('update_cit', id=record.id) }}" class="btn btn-update">Edit</a>
|
<a href="{{ url_for('update_cit', id=record.id) }}" class="btn btn-update">Edit</a>
|
||||||
<form action="{{ url_for('delete_cit', id=record.id) }}" method="post"
|
<form action="{{ url_for('delete_cit', id=record.id) }}" method="post"
|
||||||
|
|||||||
@@ -20,10 +20,11 @@
|
|||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Year</th>
|
<th>Year</th>
|
||||||
<th>MAT Tax Credit</th>
|
<th>Gross Total Income</th>
|
||||||
<th>Surcharge</th>
|
<th>Net Taxable Income</th>
|
||||||
<th>Cess</th>
|
<th>Total Tax Payable</th>
|
||||||
<th>Total Credit</th>
|
<th>Refund</th>
|
||||||
|
<th>Created Record Date</th>
|
||||||
<th>Actions</th>
|
<th>Actions</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
@@ -35,7 +36,7 @@
|
|||||||
<td>{{ "{:,.2f}".format(record.net_taxable_income) }}</td>
|
<td>{{ "{:,.2f}".format(record.net_taxable_income) }}</td>
|
||||||
<td>{{ "{:,.2f}".format(record.total_tax_payable) }}</td>
|
<td>{{ "{:,.2f}".format(record.total_tax_payable) }}</td>
|
||||||
<td>{{ "{:,.2f}".format(record.refund) }}</td>
|
<td>{{ "{:,.2f}".format(record.refund) }}</td>
|
||||||
|
<td>{{ record.created_at.strftime('%Y-%m-%d') }}</td>
|
||||||
<td class="action-cell">
|
<td class="action-cell">
|
||||||
<a href="{{ url_for('update_itat', id=record.id) }}" class="btn btn-update">Edit</a>
|
<a href="{{ url_for('update_itat', id=record.id) }}" class="btn btn-update">Edit</a>
|
||||||
|
|
||||||
|
|||||||
@@ -42,7 +42,7 @@
|
|||||||
<tbody>
|
<tbody>
|
||||||
{% for row in mat_rows %}
|
{% for row in mat_rows %}
|
||||||
<tr>
|
<tr>
|
||||||
<td contenteditable="true">{{ row.financial_year }}</td>
|
<td contenteditable="false">{{ row.financial_year }}-{{ row.financial_year | int + 1 }}</td>
|
||||||
<td><input value="{{ row.mat_credit }}"></td>
|
<td><input value="{{ row.mat_credit }}"></td>
|
||||||
|
|
||||||
{% for y in added_years %}
|
{% for y in added_years %}
|
||||||
|
|||||||
@@ -1,32 +1,35 @@
|
|||||||
{% extends "base.html" %}
|
{% extends "base.html" %} {% block title %}Download Summary Report{% endblock %}
|
||||||
|
|
||||||
{% block title %}Download Summary Report{% endblock %}
|
|
||||||
|
|
||||||
{% block extra_css %}
|
{% block extra_css %}
|
||||||
<!-- Optional: Add page-specific CSS -->
|
<link rel="stylesheet" href="{{ url_for('static', filename='css/summary.css') }}" />
|
||||||
<link rel="stylesheet" href="{{ url_for('static', filename='css/summary.css') }}">
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block content %}
|
{% endblock %} {% block content %}
|
||||||
<div class="container">
|
<div class="container">
|
||||||
|
<div class="head">
|
||||||
<h2>Download Year-wise Summary Report</h2>
|
<h2>Download Year-wise Summary Report</h2>
|
||||||
|
|
||||||
{% if message %}
|
{% if message %}
|
||||||
<p class="message">{{ message }}</p>
|
<p class="message">{{ message }}</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<form method="GET" action="{{ url_for('summary_report') }}">
|
<div class="select-download-wrapper">
|
||||||
<label>Select Year:</label>
|
<select name="year" id="year" required>
|
||||||
<select name="year" id="year" required>
|
<option value="">-- Select Year --</option>
|
||||||
<option value="">-- Select Year --</option>
|
{% for year in years %}
|
||||||
{% for year in years %}
|
<option value="{{ year }}">AY {{ year }}-{{ year + 1 }}</option>
|
||||||
<option value="{{ year }}">AY {{ year }}-{{ year + 1 }}</option>
|
{% endfor %}
|
||||||
{% endfor %}
|
</select>
|
||||||
</select>
|
|
||||||
|
|
||||||
<button type="submit">Download Summary Report</button>
|
<a id="downloadBtn" href="#">Download Summary Report</a>
|
||||||
</form>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Preview Section -->
|
||||||
|
<div id="preview" style="display: none">
|
||||||
|
<h3>Summary Preview</h3>
|
||||||
|
|
||||||
|
<div id="previewContent"></div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
{% endblock %} {% block extra_js %}
|
||||||
|
<script src="{{ url_for('static', filename='js/summary_preview.js') }}"></script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
@@ -8,47 +8,67 @@
|
|||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<h2>Update AO Record for Year {{ record.year }}--{{ record.year + 1 }}</h2>
|
<h2>Update AO Record for Year {{ record.year }} - {{ record.year + 1 }}</h2>
|
||||||
<form method="POST" action="{{ url_for('update_ao', id=record.id) }}">
|
<form method="POST" action="{{ url_for('update_ao', id=record.id) }}">
|
||||||
<div class="form-group full-width inline-2">
|
<div class="form-group full-width inline-2">
|
||||||
<div>
|
<div>
|
||||||
<label>Year:</label>
|
<label>Year:</label>
|
||||||
<input type="tex" name="year" value="{{record.year}}" class="auto" readonly>
|
<input type="tex" name="year" value="{{record.year}}" class="auto" readonly>
|
||||||
</div>
|
</div>
|
||||||
|
<div>
|
||||||
|
<label>Created Date:</label>
|
||||||
|
<input type="date" name="created_at"
|
||||||
|
value="{{ record.created_at.strftime('%Y-%m-%d') if record.created_at else current_date }}"
|
||||||
|
readonly>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<label>Last Updated:</label>
|
||||||
|
<input type="date" name="updated_at"
|
||||||
|
value="{{ record.updated_at.strftime('%Y-%m-%d') if record.updated_at else current_date }}">
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group full-width inline-2">
|
<div class="form-group full-width inline-2">
|
||||||
<div>
|
<div>
|
||||||
<label>Gross Total Income:</label>
|
<label>Gross Total Income:</label>
|
||||||
<input type="number" name="gross_total_income" step="any" value="{{ record.gross_total_income}}"
|
<input type="number" name="gross_total_income" step="any" value="{{ record.gross_total_income }}"
|
||||||
oninput="calculate()" required>
|
oninput="calculate()" required>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label>Add :Disallowance u/s 14A:</label>
|
<label>Add :Disallowance u/s 14A:</label>
|
||||||
<input type="number" name="disallowance_14a" step="any" value="{{ record.disallowance_14a}}"
|
<input type="number" name="disallowance_14a" step="any" value="{{ record.disallowance_14a }}"
|
||||||
oninput="calculate()" required>
|
oninput="calculate()" required>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label>Add :Disallowance u/s 37:</label>
|
<label>Add :Disallowance u/s 37:</label>
|
||||||
<input type="number" name="disallowance_37" step="any" value="{{ record.disallowance_37}}"
|
<input type="number" name="disallowance_37" step="any" value="{{ record.disallowance_37 }}"
|
||||||
oninput="calculate()" required>
|
oninput="calculate()" required>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group full-width inline-2">
|
||||||
|
<div>
|
||||||
|
<label>GTI as per AO</label>
|
||||||
|
<input type="number" name="gti_as_per_ao" class="auto" step="any"
|
||||||
|
value="{{ record.gross_total_income + record.disallowance_37 + record.disallowance_14a }}"
|
||||||
|
readonly>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="form-group full-width inline-2">
|
<div class="form-group full-width inline-2">
|
||||||
<div>
|
<div>
|
||||||
<label>Less :Deduction 80IA Business Income:</label>
|
<label>Less :Deduction 80IA Business Income:</label>
|
||||||
<input type="number" name="deduction_80ia_business" step="any"
|
<input type="number" name="deduction_80ia_business" step="any"
|
||||||
value="{{ record.deduction_80ia_business}}" oninput="calculate()" required>
|
value="{{ record.deduction_80ia_business }}" oninput="calculate()" required>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label>Less :Deduction 80IA Misc:</label>
|
<label>Less :Deduction 80IA Misc:</label>
|
||||||
<input type="number" name="deduction_80ia_misc" step="any" value="{{ record.deduction_80ia_misc}}"
|
<input type="number" name="deduction_80ia_misc" step="any" value="{{ record.deduction_80ia_misc }}"
|
||||||
oninput="calculate()" required>
|
oninput="calculate()" required>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label>Less :Deduction 80IA Other Operating Revenue:</label>
|
<label>Less :Deduction 80IA Other Operating Revenue:</label>
|
||||||
<input type="number" name="deduction_80ia_other" step="any" value="{{ record.deduction_80ia_other}}"
|
<input type="number" name="deduction_80ia_other" step="any" value="{{ record.deduction_80ia_other }}"
|
||||||
oninput="calculate()" required>
|
oninput="calculate()" required>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -57,56 +77,117 @@
|
|||||||
<div>
|
<div>
|
||||||
<label>Less :Deduction Sec 37 Disallowance:</label>
|
<label>Less :Deduction Sec 37 Disallowance:</label>
|
||||||
<input type="number" name="deduction_sec37_disallowance" step="any"
|
<input type="number" name="deduction_sec37_disallowance" step="any"
|
||||||
value="{{ record.deduction_sec37_disallowance}}" oninput="calculate()" required>
|
value="{{ record.deduction_sec37_disallowance }}" oninput="calculate()" required>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label>Less: Deduction 80G: </label>
|
<label>Less: Deduction 80G: </label>
|
||||||
<input type="number" name="deduction_80g" step="any" value="{{ record.deduction_80g}}"
|
<input type="number" name="deduction_80g" step="any" value="{{ record.deduction_80g }}"
|
||||||
oninput="calculate()" required>
|
oninput="calculate()" required>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class=" form-group">
|
|
||||||
<label>Net Taxable Income:</label>
|
|
||||||
<input type="number" name="net_taxable_income" class="auto" step="any"
|
|
||||||
value="{{ record.net_taxable_income}}" readonly>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class=" form-group full-width inline-2">
|
<div class="form-group full-width inline-2">
|
||||||
<div>
|
<div>
|
||||||
<label>Tax @ 30% (A):</label>
|
<label>Net Taxable Income:</label>
|
||||||
<input type="number" name="tax_30_percent" step="any" value="{{ record.tax_30_percent}}"
|
<input type="number" name="net_taxable_income" class="auto" step="any"
|
||||||
oninput="calculate()" required>
|
value="{{ record.net_taxable_income }}" readonly>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group full-width inline-2">
|
||||||
|
<div>
|
||||||
|
<label>Enter Percentage(%) calculate: Tax(A):</label>
|
||||||
|
<input type="number" name="per_tax_a" step="any" value="{{ record.per_tax_a }}" oninput="calculate()">
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<label>Tax @(A):</label>
|
||||||
|
<input type="number" name="tax_a_cal" step="any" value="{{ record.tax_a_cal }}" oninput="calculate()">
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<label>Enter Percentage(%) calculate: Tax(B):</label>
|
||||||
|
<input type="number" name="per_tax_b" step="any" value="{{ record.per_tax_b }}" oninput="calculate()">
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label>Tax @ 18.5% on Book Profit (B):</label>
|
<label>Tax @ 18.5% on Book Profit (B):</label>
|
||||||
<input type="number" name="tax_book_profit_18_5" step="any" value="{{ record.tax_book_profit_18_5}}"
|
<input type="number" name="tax_b_cal" step="any" value="{{ record.tax_b_cal }}" oninput="calculate()"
|
||||||
oninput="calculate()" required>
|
required>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group full-width inline-2">
|
||||||
|
<div>
|
||||||
|
<label>Enter Percentage(%) Surcharge:Tax(A):</label>
|
||||||
|
<input type="number" name="per_surcharge_a" step="any" value="{{ record.per_surcharge_a }}"
|
||||||
|
oninput="calculate()">
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label>Tax Payable (Higher of A or B):</label>
|
<label>Surcharge on Tax(A):</label>
|
||||||
<input type="number" name="tax_payable" class="auto" step="any" value="{{ record.tax_payable}}"
|
<input type="number" name="surcharge_a_cal" class="auto" value="{{ record.surcharge_a_cal }}" readonly>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<label>Enter Percentage(%) Surcharge:Tax(B)</label>
|
||||||
|
<input type="number" name="per_surcharge_b" step="any" value="{{ record.per_surcharge_b}}"
|
||||||
|
oninput="calculate()">
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<label>Surcharge on Tax(B):</label>
|
||||||
|
<input type="number" name="surcharge_b_cal" class="auto" value="{{ record.surcharge_b_cal }}" readonly>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group full-width inline-2">
|
||||||
|
<div>
|
||||||
|
<label>Enter Percentage(%) Cess:Tax(A):</label>
|
||||||
|
<input type="number" name="per_cess_a" step="any" value="{{ record.per_cess_a }}" oninput="calculate()">
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<label>Education Cess:Tax(A): </label>
|
||||||
|
<input type="number" name="edu_cess_a_cal" class="auto" step="any" value="{{ record.edu_cess_a_cal }}"
|
||||||
|
readonly>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<label>Enter Percentage(%) Cess:Tax(B):</label>
|
||||||
|
<input type="number" name="per_cess_b" step="any" value="{{ record.per_cess_b }}" oninput="calculate()">
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<label>Education Cess:Tax(B): </label>
|
||||||
|
<input type="number" name="edu_cess_b_cal" class="auto" step="any" value="{{ record.edu_cess_b_cal }}"
|
||||||
readonly>
|
readonly>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group full-width inline-2">
|
<div class="form-group full-width inline-2">
|
||||||
<div>
|
<div>
|
||||||
<label>Surcharge:</label>
|
<label>Total cal Tax(A): </label>
|
||||||
<input type="number" name="surcharge" class="auto" value="{{ record.surcharge}}" readonly>
|
<input type="number" name="sum_of_a" class="auto" step="any" value="{{ record.sum_of_a }}" readonly>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label>Education Cess:</label>
|
<label>Total cal Tax(B): </label>
|
||||||
<input type="number" name="edu_cess" class="auto" step="any" value="{{ record.edu_cess}}" readonly>
|
<input type="number" name="sum_of_b" class="auto" step="any" value="{{ record.sum_of_b }}" readonly>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group full-width inline-2">
|
<div class="form-group full-width inline-2">
|
||||||
|
<div>
|
||||||
|
<label>Tax Payable (Higher of A or B):</label>
|
||||||
|
<input type="number" name="tax_payable" class="auto" step="any" value="{{ record.tax_payable }}"
|
||||||
|
readonly>
|
||||||
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label>Total tax Payable:</label>
|
<label>Total tax Payable:</label>
|
||||||
<input type="number" name="total_tax_payable" class="auto" step="any"
|
<input type="number" name="total_tax_payable" class="auto" step="any"
|
||||||
value="{{ record.total_tax_payable}}" readonly>
|
value="{{ record.total_tax_payable }}" readonly>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group full-width inline-2">
|
||||||
|
<div>
|
||||||
|
<label>Opening Balance:</label>
|
||||||
|
<input type="number" name="opening_balance" step="any" value="{{ record.opening_balance }}"
|
||||||
|
oninput="calculate()">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group full-width inline-2">
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<label>Less :Mat Credit Created:</label>
|
<label>Less :Mat Credit Created:</label>
|
||||||
<input type="number" name="mat_credit_created" step="any" value="{{ record.mat_credit_created }}"
|
<input type="number" name="mat_credit_created" step="any" value="{{ record.mat_credit_created }}"
|
||||||
@@ -117,9 +198,17 @@
|
|||||||
<input type="number" name="mat_credit_utilized" step="any" value="{{ record.mat_credit_utilized }}"
|
<input type="number" name="mat_credit_utilized" step="any" value="{{ record.mat_credit_utilized }}"
|
||||||
oninput="calculate()" required>
|
oninput="calculate()" required>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group full-width inline-2">
|
||||||
|
<div>
|
||||||
|
<label>Closing Balance:</label>
|
||||||
|
<input type="number" name="closing_balance" step="any" value="{{ record.closing_balance }}"
|
||||||
|
oninput="calculate()">
|
||||||
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label>Add :Interest 234c:</label>
|
<label>Add :Interest 234c:</label>
|
||||||
<input type="number" name="interest_234c" step="any" value="{{ record.interest_234c}}"
|
<input type="number" name="interest_234c" step="any" value="{{ record.interest_234c }}"
|
||||||
oninput="calculate()" required>
|
oninput="calculate()" required>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -127,46 +216,65 @@
|
|||||||
<div class="form-group full-width inline-2">
|
<div class="form-group full-width inline-2">
|
||||||
<div>
|
<div>
|
||||||
<label>Total Tax:</label>
|
<label>Total Tax:</label>
|
||||||
<input type="number" name="total_tax" step="any" class="auto" value="{{ record.total_tax}}" readonly>
|
<input type="number" name="total_tax" step="any" class="auto" value="{{ record.total_tax }}" readonly>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group full-width inline-2">
|
<div class="form-group full-width inline-2">
|
||||||
<div>
|
<div>
|
||||||
<label>Advance Tax:</label>
|
<label>Advance Tax:</label>
|
||||||
<input type="number" name="advance_tax" step="any" value="{{ record.advance_tax}}" oninput="calculate()"
|
<input type="number" name="advance_tax" step="any" value="{{ record.advance_tax }}"
|
||||||
required>
|
oninput="calculate()" required>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label>TDS :</label>
|
<label>TDS :</label>
|
||||||
<input type="number" name="tds" step="any" value="{{ record.tds}}" oninput="calculate()" required>
|
<input type="number" name="tds" step="any" value="{{ record.tds }}" oninput="calculate()" required>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label>TCS :</label>
|
<label>TCS :</label>
|
||||||
<input type="number" name="tcs" step="any" value="{{ record.tcs}}" oninput="calculate()" required>
|
<input type="number" name="tcs" step="any" value="{{ record.tcs }}" oninput="calculate()" required>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group full-width inline-2">
|
<div class="form-group full-width inline-2">
|
||||||
<div>
|
<div>
|
||||||
<label>SAT :</label>
|
<label>SAT :</label>
|
||||||
<input type="number" name="sat" step="any" value="{{ record.sat}}" oninput="calculate()" required>
|
<input type="number" name="sat" step="any" value="{{ record.sat }}" oninput="calculate()" required>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label>Tax on Regular Assessment:</label>
|
<label>Tax on Regular Assessment:</label>
|
||||||
<input type="number" name="tax_on_assessment" step="any" value="{{ record.tax_on_assessment}}"
|
<input type="number" name="tax_on_assessment" step="any" value="{{ record.tax_on_assessment }}"
|
||||||
oninput="calculate()" required>
|
oninput="calculate()">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label>Refund:</label>
|
||||||
|
<input type="number" name="refund" class="auto" step="any" value="{{ record.refund }}" readonly>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group full-width inline-2">
|
||||||
|
<div class="form-group">
|
||||||
|
<label>Add : Interest u/s 244A as per 143:</label>
|
||||||
|
<input type="number" name="interest_244a_per143" step="any" value="{{ record.interest_244a_per143 }}"
|
||||||
|
oninput="calculate()">
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label>Less : Refund Received on:</label>
|
||||||
|
<input type="number" name="refund_received" step="any" value="{{ record.refund_received }}"
|
||||||
|
oninput="calculate()">
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label>Balance Receivable:</label>
|
||||||
|
<input type="number" name="balance_receivable" class="auto" step="any"
|
||||||
|
value="{{ record.balance_receivable }}" oninput="calculate()">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group full-width inline-2">
|
||||||
<label>Refund:</label>
|
<div class="form-group">
|
||||||
<input type="number" name="refund" class="auto" step="any" value="{{ record.refund}}" readonly>
|
<label>Remarks:</label>
|
||||||
</div>
|
<input type="text" name="Remarks" value="{{ record.Remarks }}">
|
||||||
|
</div>
|
||||||
<div class="form-group">
|
|
||||||
<label>Remarks:</label>
|
|
||||||
<input type="text" name="Remarks" value="{{ record.remarks}}">
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<button type="submit">Update Record</button>
|
<button type="submit">Update Record</button>
|
||||||
|
|||||||
@@ -16,6 +16,17 @@
|
|||||||
<label>Year:</label>
|
<label>Year:</label>
|
||||||
<input type="tex" name="year" value="{{record.year}}" class="auto" readonly>
|
<input type="tex" name="year" value="{{record.year}}" class="auto" readonly>
|
||||||
</div>
|
</div>
|
||||||
|
<div>
|
||||||
|
<label>Created Date:</label>
|
||||||
|
<input type="date" name="created_at"
|
||||||
|
value="{{ record.created_at.strftime('%Y-%m-%d') if record.created_at else current_date }}"
|
||||||
|
readonly>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<label>Last Updated:</label>
|
||||||
|
<input type="date" name="updated_at"
|
||||||
|
value="{{ record.updated_at.strftime('%Y-%m-%d') if record.updated_at else current_date }}">
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group full-width inline-2">
|
<div class="form-group full-width inline-2">
|
||||||
@@ -35,6 +46,14 @@
|
|||||||
oninput="calculate()" required>
|
oninput="calculate()" required>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="form-group full-width inline-2">
|
||||||
|
<div>
|
||||||
|
<label>GTI as per AO</label>
|
||||||
|
<input type="number" name="gti_as_per_ao" class="auto" step="any"
|
||||||
|
value="{{ record.gross_total_income + record.disallowance_37 + record.disallowance_14a }}"
|
||||||
|
readonly>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="form-group full-width inline-2">
|
<div class="form-group full-width inline-2">
|
||||||
<div>
|
<div>
|
||||||
@@ -65,7 +84,6 @@
|
|||||||
<input type="number" name="deduction_80g" step="any" value="{{ record.deduction_80g}}"
|
<input type="number" name="deduction_80g" step="any" value="{{ record.deduction_80g}}"
|
||||||
oninput="calculate()" required>
|
oninput="calculate()" required>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class=" form-group">
|
<div class=" form-group">
|
||||||
<label>Net Taxable Income:</label>
|
<label>Net Taxable Income:</label>
|
||||||
@@ -73,42 +91,99 @@
|
|||||||
value="{{ record.net_taxable_income}}" readonly>
|
value="{{ record.net_taxable_income}}" readonly>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group full-width inline-2">
|
||||||
<div class=" form-group full-width inline-2">
|
|
||||||
<div>
|
<div>
|
||||||
<label>Tax @ 30% (A):</label>
|
<label>Enter Percentage(%) calculate: Tax(A):</label>
|
||||||
<input type="number" name="tax_30_percent" step="any" value="{{ record.tax_30_percent}}"
|
<input type="number" name="per_tax_a" step="any" value="{{ record.per_tax_a }}" oninput="calculate()">
|
||||||
oninput="calculate()" required>
|
</div>
|
||||||
|
<div>
|
||||||
|
<label>Tax @(A):</label>
|
||||||
|
<input type="number" name="tax_a_cal" step="any" value="{{ record.tax_a_cal }}" oninput="calculate()">
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<label>Enter Percentage(%) calculate: Tax(B):</label>
|
||||||
|
<input type="number" name="per_tax_b" step="any" value="{{ record.per_tax_b }}" oninput="calculate()">
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label>Tax @ 18.5% on Book Profit (B):</label>
|
<label>Tax @ 18.5% on Book Profit (B):</label>
|
||||||
<input type="number" name="tax_book_profit_18_5" step="any" value="{{ record.tax_book_profit_18_5}}"
|
<input type="number" name="tax_b_cal" step="any" value="{{ record.tax_b_cal }}" oninput="calculate()"
|
||||||
oninput="calculate()" required>
|
required>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group full-width inline-2">
|
||||||
|
<div>
|
||||||
|
<label>Enter Percentage(%) Surcharge:Tax(A):</label>
|
||||||
|
<input type="number" name="per_surcharge_a" step="any" value="{{ record.per_surcharge_a }}"
|
||||||
|
oninput="calculate()">
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label>Tax Payable (Higher of A or B):</label>
|
<label>Surcharge on Tax(A):</label>
|
||||||
<input type="number" name="tax_payable" class="auto" step="any" value="{{ record.tax_payable}}"
|
<input type="number" name="surcharge_a_cal" class="auto" value="{{ record.surcharge_a_cal }}" readonly>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<label>Enter Percentage(%) Surcharge:Tax(B)</label>
|
||||||
|
<input type="number" name="per_surcharge_b" step="any" value="{{ record.per_surcharge_b}}"
|
||||||
|
oninput="calculate()">
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<label>Surcharge on Tax(B):</label>
|
||||||
|
<input type="number" name="surcharge_b_cal" class="auto" value="{{ record.surcharge_b_cal }}" readonly>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group full-width inline-2">
|
||||||
|
<div>
|
||||||
|
<label>Enter Percentage(%) Cess:Tax(A):</label>
|
||||||
|
<input type="number" name="per_cess_a" step="any" value="{{ record.per_cess_a }}" oninput="calculate()">
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<label>Education Cess:Tax(A): </label>
|
||||||
|
<input type="number" name="edu_cess_a_cal" class="auto" step="any" value="{{ record.edu_cess_a_cal }}"
|
||||||
|
readonly>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<label>Enter Percentage(%) Cess:Tax(B):</label>
|
||||||
|
<input type="number" name="per_cess_b" step="any" value="{{ record.per_cess_b }}" oninput="calculate()">
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<label>Education Cess:Tax(B): </label>
|
||||||
|
<input type="number" name="edu_cess_b_cal" class="auto" step="any" value="{{ record.edu_cess_b_cal }}"
|
||||||
readonly>
|
readonly>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group full-width inline-2">
|
<div class="form-group full-width inline-2">
|
||||||
<div>
|
<div>
|
||||||
<label>Surcharge:</label>
|
<label>Total cal Tax(A): </label>
|
||||||
<input type="number" name="surcharge" class="auto" value="{{ record.surcharge}}" readonly>
|
<input type="number" name="sum_of_a" class="auto" step="any" value="{{ record.sum_of_a }}" readonly>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label>Education Cess:</label>
|
<label>Total cal Tax(B): </label>
|
||||||
<input type="number" name="edu_cess" class="auto" step="any" value="{{ record.edu_cess}}" readonly>
|
<input type="number" name="sum_of_b" class="auto" step="any" value="{{ record.sum_of_b }}" readonly>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group full-width inline-2">
|
<div class=" form-group full-width inline-2">
|
||||||
|
<div>
|
||||||
|
<label>Tax Payable (Higher of A or B):</label>
|
||||||
|
<input type="number" name="tax_payable" class="auto" step="any" value="{{ record.tax_payable}}"
|
||||||
|
readonly>
|
||||||
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label>Total tax Payable:</label>
|
<label>Total tax Payable:</label>
|
||||||
<input type="number" name="total_tax_payable" class="auto" step="any"
|
<input type="number" name="total_tax_payable" class="auto" step="any"
|
||||||
value="{{ record.total_tax_payable}}" readonly>
|
value="{{ record.total_tax_payable}}" readonly>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group full-width inline-2">
|
||||||
|
<div>
|
||||||
|
<label>Opening Balance:</label>
|
||||||
|
<input type="number" name="opening_balance" step="any" value="{{ record.opening_balance }}"
|
||||||
|
oninput="calculate()">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group full-width inline-2">
|
||||||
<div>
|
<div>
|
||||||
<label>Less :Mat Credit Created:</label>
|
<label>Less :Mat Credit Created:</label>
|
||||||
<input type="number" name="mat_credit_created" step="any" value="{{ record.mat_credit_created }}"
|
<input type="number" name="mat_credit_created" step="any" value="{{ record.mat_credit_created }}"
|
||||||
@@ -119,6 +194,14 @@
|
|||||||
<input type="number" name="mat_credit_utilized" step="any" value="{{ record.mat_credit_utilized }}"
|
<input type="number" name="mat_credit_utilized" step="any" value="{{ record.mat_credit_utilized }}"
|
||||||
oninput="calculate()" required>
|
oninput="calculate()" required>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group full-width inline-2">
|
||||||
|
<div>
|
||||||
|
<label>Closing Balance:</label>
|
||||||
|
<input type="number" name="closing_balance" step="any" value="{{ record.closing_balance }}"
|
||||||
|
oninput="calculate()">
|
||||||
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label>Add :Interest 234c:</label>
|
<label>Add :Interest 234c:</label>
|
||||||
<input type="number" name="interest_234c" step="any" value="{{ record.interest_234c}}"
|
<input type="number" name="interest_234c" step="any" value="{{ record.interest_234c}}"
|
||||||
@@ -166,6 +249,24 @@
|
|||||||
<input type="number" name="refund" class="auto" step="any" value="{{ record.refund}}" readonly>
|
<input type="number" name="refund" class="auto" step="any" value="{{ record.refund}}" readonly>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group full-width inline-2">
|
||||||
|
<div class="form-group">
|
||||||
|
<label>Add : Interest u/s 244A as per 143:</label>
|
||||||
|
<input type="number" name="interest_244a_per143" step="any" value="{{ record.interest_244a_per143 }}"
|
||||||
|
oninput="calculate()">
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label>Less : Refund Received on:</label>
|
||||||
|
<input type="number" name="refund_received" step="any" value="{{ record.refund_received }}"
|
||||||
|
oninput="calculate()">
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label>Balance Receivable:</label>
|
||||||
|
<input type="number" name="balance_receivable" class="auto" step="any"
|
||||||
|
value="{{ record.balance_receivable }}" oninput="calculate()">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Remarks:</label>
|
<label>Remarks:</label>
|
||||||
<input type="text" name="Remarks" value="{{ record.Remarks}}">
|
<input type="text" name="Remarks" value="{{ record.Remarks}}">
|
||||||
|
|||||||
@@ -14,6 +14,17 @@
|
|||||||
<label>Year:</label>
|
<label>Year:</label>
|
||||||
<input type="tex" name="year" value="{{record.year}}" class="auto" readonly>
|
<input type="tex" name="year" value="{{record.year}}" class="auto" readonly>
|
||||||
</div>
|
</div>
|
||||||
|
<div>
|
||||||
|
<label>Created Date:</label>
|
||||||
|
<input type="date" name="created_at"
|
||||||
|
value="{{ record.created_at.strftime('%Y-%m-%d') if record.created_at else current_date }}"
|
||||||
|
readonly>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<label>Last Updated:</label>
|
||||||
|
<input type="date" name="updated_at"
|
||||||
|
value="{{ record.updated_at.strftime('%Y-%m-%d') if record.updated_at else current_date }}">
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group full-width inline-2">
|
<div class="form-group full-width inline-2">
|
||||||
@@ -34,6 +45,15 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group full-width inline-2">
|
||||||
|
<div>
|
||||||
|
<label>GTI as per AO</label>
|
||||||
|
<input type="number" name="gti_as_per_ao" class="auto" step="any"
|
||||||
|
value="{{ record.gross_total_income + record.disallowance_37 + record.disallowance_14a }}"
|
||||||
|
readonly>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="form-group full-width inline-2">
|
<div class="form-group full-width inline-2">
|
||||||
<div>
|
<div>
|
||||||
<label>Less :Deduction 80IA Business Income:</label>
|
<label>Less :Deduction 80IA Business Income:</label>
|
||||||
@@ -64,6 +84,7 @@
|
|||||||
oninput="calculate()" required>
|
oninput="calculate()" required>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class=" form-group">
|
<div class=" form-group">
|
||||||
<label>Net Taxable Income:</label>
|
<label>Net Taxable Income:</label>
|
||||||
<input type="number" name="net_taxable_income" class="auto" step="any"
|
<input type="number" name="net_taxable_income" class="auto" step="any"
|
||||||
@@ -71,41 +92,101 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class=" form-group full-width inline-2">
|
<div class="form-group full-width inline-2">
|
||||||
<div>
|
<div>
|
||||||
<label>Tax @ 30% (A):</label>
|
<label>Enter Percentage(%) calculate: Tax(A):</label>
|
||||||
<input type="number" name="tax_30_percent" step="any" value="{{ record.tax_30_percent}}"
|
<input type="number" name="per_tax_a" step="any" value="{{ record.per_tax_a }}" oninput="calculate()">
|
||||||
oninput="calculate()" required>
|
</div>
|
||||||
|
<div>
|
||||||
|
<label>Tax @(A):</label>
|
||||||
|
<input type="number" name="tax_a_cal" step="any" value="{{ record.tax_a_cal }}" oninput="calculate()">
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<label>Enter Percentage(%) calculate: Tax(B):</label>
|
||||||
|
<input type="number" name="per_tax_b" step="any" value="{{ record.per_tax_b }}" oninput="calculate()">
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label>Tax @ 18.5% on Book Profit (B):</label>
|
<label>Tax @ 18.5% on Book Profit (B):</label>
|
||||||
<input type="number" name="tax_book_profit_18_5" step="any" value="{{ record.tax_book_profit_18_5}}"
|
<input type="number" name="tax_b_cal" step="any" value="{{ record.tax_b_cal }}" oninput="calculate()"
|
||||||
oninput="calculate()" required>
|
required>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group full-width inline-2">
|
||||||
|
<div>
|
||||||
|
<label>Enter Percentage(%) Surcharge:Tax(A):</label>
|
||||||
|
<input type="number" name="per_surcharge_a" step="any" value="{{ record.per_surcharge_a }}"
|
||||||
|
oninput="calculate()">
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label>Tax Payable (Higher of A or B):</label>
|
<label>Surcharge on Tax(A):</label>
|
||||||
<input type="number" name="tax_payable" class="auto" step="any" value="{{ record.tax_payable}}"
|
<input type="number" name="surcharge_a_cal" class="auto" value="{{ record.surcharge_a_cal }}" readonly>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<label>Enter Percentage(%) Surcharge:Tax(B)</label>
|
||||||
|
<input type="number" name="per_surcharge_b" step="any" value="{{ record.per_surcharge_b}}"
|
||||||
|
oninput="calculate()">
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<label>Surcharge on Tax(B):</label>
|
||||||
|
<input type="number" name="surcharge_b_cal" class="auto" value="{{ record.surcharge_b_cal }}" readonly>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group full-width inline-2">
|
||||||
|
<div>
|
||||||
|
<label>Enter Percentage(%) Cess:Tax(A):</label>
|
||||||
|
<input type="number" name="per_cess_a" step="any" value="{{ record.per_cess_a }}" oninput="calculate()">
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<label>Education Cess:Tax(A): </label>
|
||||||
|
<input type="number" name="edu_cess_a_cal" class="auto" step="any" value="{{ record.edu_cess_a_cal }}"
|
||||||
|
readonly>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<label>Enter Percentage(%) Cess:Tax(B):</label>
|
||||||
|
<input type="number" name="per_cess_b" step="any" value="{{ record.per_cess_b }}" oninput="calculate()">
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<label>Education Cess:Tax(B): </label>
|
||||||
|
<input type="number" name="edu_cess_b_cal" class="auto" step="any" value="{{ record.edu_cess_b_cal }}"
|
||||||
readonly>
|
readonly>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group full-width inline-2">
|
<div class="form-group full-width inline-2">
|
||||||
<div>
|
<div>
|
||||||
<label>Surcharge:</label>
|
<label>Total cal Tax(A): </label>
|
||||||
<input type="number" name="surcharge" class="auto" value="{{ record.surcharge}}" readonly>
|
<input type="number" name="sum_of_a" class="auto" step="any" value="{{ record.sum_of_a }}" readonly>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label>Education Cess:</label>
|
<label>Total cal Tax(B): </label>
|
||||||
<input type="number" name="edu_cess" class="auto" step="any" value="{{ record.edu_cess}}" readonly>
|
<input type="number" name="sum_of_b" class="auto" step="any" value="{{ record.sum_of_b }}" readonly>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group full-width inline-2">
|
<div class="form-group full-width inline-2">
|
||||||
|
<div>
|
||||||
|
<label>Tax Payable (Higher of A or B):</label>
|
||||||
|
<input type="number" name="tax_payable" class="auto" step="any" value="{{ record.tax_payable }}"
|
||||||
|
readonly>
|
||||||
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label>Total tax Payable:</label>
|
<label>Total tax Payable:</label>
|
||||||
<input type="number" name="total_tax_payable" class="auto" step="any"
|
<input type="number" name="total_tax_payable" class="auto" step="any"
|
||||||
value="{{ record.total_tax_payable}}" readonly>
|
value="{{ record.total_tax_payable }}" readonly>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group full-width inline-2">
|
||||||
|
<div>
|
||||||
|
<label>Opening Balance:</label>
|
||||||
|
<input type="number" name="opening_balance" step="any" value="{{ record.opening_balance }}"
|
||||||
|
oninput="calculate()">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group full-width inline-2">
|
||||||
<div>
|
<div>
|
||||||
<label>Less :Mat Credit Created:</label>
|
<label>Less :Mat Credit Created:</label>
|
||||||
<input type="number" name="mat_credit_created" step="any" value="{{ record.mat_credit_created }}"
|
<input type="number" name="mat_credit_created" step="any" value="{{ record.mat_credit_created }}"
|
||||||
@@ -116,6 +197,14 @@
|
|||||||
<input type="number" name="mat_credit_utilized" step="any" value="{{ record.mat_credit_utilized }}"
|
<input type="number" name="mat_credit_utilized" step="any" value="{{ record.mat_credit_utilized }}"
|
||||||
oninput="calculate()" required>
|
oninput="calculate()" required>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group full-width inline-2">
|
||||||
|
<div>
|
||||||
|
<label>Closing Balance:</label>
|
||||||
|
<input type="number" name="closing_balance" step="any" value="{{ record.closing_balance }}"
|
||||||
|
oninput="calculate()">
|
||||||
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label>Add :Interest 234c:</label>
|
<label>Add :Interest 234c:</label>
|
||||||
<input type="number" name="interest_234c" step="any" value="{{ record.interest_234c}}"
|
<input type="number" name="interest_234c" step="any" value="{{ record.interest_234c}}"
|
||||||
@@ -163,9 +252,29 @@
|
|||||||
<input type="number" name="refund" class="auto" step="any" value="{{ record.refund}}" readonly>
|
<input type="number" name="refund" class="auto" step="any" value="{{ record.refund}}" readonly>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group full-width inline-2">
|
||||||
<label>Remarks:</label>
|
<div class="form-group">
|
||||||
<input type="text" name="Remarks" value="{{ record.remarks}}">
|
<label>Add : Interest u/s 244A as per 143:</label>
|
||||||
|
<input type="number" name="interest_244a_per143" step="any" value="{{ record.interest_244a_per143 }}"
|
||||||
|
oninput="calculate()">
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label>Less : Refund Received on:</label>
|
||||||
|
<input type="number" name="refund_received" step="any" value="{{ record.refund_received }}"
|
||||||
|
oninput="calculate()">
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label>Balance Receivable:</label>
|
||||||
|
<input type="number" name="balance_receivable" class="auto" step="any"
|
||||||
|
value="{{ record.balance_receivable }}" oninput="calculate()">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group full-width inline-2">
|
||||||
|
<div class="form-group">
|
||||||
|
<label>Remarks:</label>
|
||||||
|
<input type="text" name="Remarks" value="{{ record.Remarks }}">
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<button type="submit">Update Record</button>
|
<button type="submit">Update Record</button>
|
||||||
|
|||||||
@@ -15,6 +15,17 @@
|
|||||||
<label>Year:</label>
|
<label>Year:</label>
|
||||||
<input type="tex" name="year" value="{{record.year}}" class="auto" readonly>
|
<input type="tex" name="year" value="{{record.year}}" class="auto" readonly>
|
||||||
</div>
|
</div>
|
||||||
|
<div>
|
||||||
|
<label>Created Date:</label>
|
||||||
|
<input type="date" name="created_at"
|
||||||
|
value="{{ record.created_at.strftime('%Y-%m-%d') if record.created_at else current_date }}"
|
||||||
|
readonly>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<label>Last Updated:</label>
|
||||||
|
<input type="date" name="updated_at"
|
||||||
|
value="{{ record.updated_at.strftime('%Y-%m-%d') if record.updated_at else current_date }}">
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group full-width inline-2">
|
<div class="form-group full-width inline-2">
|
||||||
@@ -35,6 +46,15 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group full-width inline-2">
|
||||||
|
<div>
|
||||||
|
<label>GTI as per AO</label>
|
||||||
|
<input type="number" name="gti_as_per_ao" class="auto" step="any"
|
||||||
|
value="{{ record.gross_total_income + record.disallowance_37 + record.disallowance_14a }}"
|
||||||
|
readonly>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="form-group full-width inline-2">
|
<div class="form-group full-width inline-2">
|
||||||
<div>
|
<div>
|
||||||
<label>Less :Deduction 80IA Business Income:</label>
|
<label>Less :Deduction 80IA Business Income:</label>
|
||||||
@@ -76,39 +96,99 @@
|
|||||||
|
|
||||||
<div class="form-group full-width inline-2">
|
<div class="form-group full-width inline-2">
|
||||||
<div>
|
<div>
|
||||||
<label>Tax @ 30% (A):</label>
|
<label>Enter Percentage(%) calculate: Tax(A):</label>
|
||||||
<input type="number" name="tax_30_percent" class="auto" step="any" value="{{ record.tax_30_percent }}"
|
<input type="number" name="per_tax_a" step="any" value="{{ record.per_tax_a }}" oninput="calculate()">
|
||||||
readonly>
|
</div>
|
||||||
|
<div>
|
||||||
|
<label>Tax @(A):</label>
|
||||||
|
<input type="number" name="tax_a_cal" step="any" value="{{ record.tax_a_cal }}" oninput="calculate()">
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<label>Enter Percentage(%) calculate: Tax(B):</label>
|
||||||
|
<input type="number" name="per_tax_b" step="any" value="{{ record.per_tax_b }}" oninput="calculate()">
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label>Tax @ 18.5% on Book Profit (B):</label>
|
<label>Tax @ 18.5% on Book Profit (B):</label>
|
||||||
<input type="number" name="tax_book_profit_18_5" step="any" value="{{ record.tax_book_profit_18_5 }}"
|
<input type="number" name="tax_b_cal" step="any" value="{{ record.tax_b_cal }}" oninput="calculate()"
|
||||||
oninput="calculate()" required>
|
required>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group full-width inline-2">
|
||||||
|
<div>
|
||||||
|
<label>Enter Percentage(%) Surcharge:Tax(A):</label>
|
||||||
|
<input type="number" name="per_surcharge_a" step="any" value="{{ record.per_surcharge_a }}"
|
||||||
|
oninput="calculate()">
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<label>Surcharge on Tax(A):</label>
|
||||||
|
<input type="number" name="surcharge_a_cal" class="auto" value="{{ record.surcharge_a_cal }}" readonly>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<label>Enter Percentage(%) Surcharge:Tax(B)</label>
|
||||||
|
<input type="number" name="per_surcharge_b" step="any" value="{{ record.per_surcharge_b}}"
|
||||||
|
oninput="calculate()">
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<label>Surcharge on Tax(B):</label>
|
||||||
|
<input type="number" name="surcharge_b_cal" class="auto" value="{{ record.surcharge_b_cal }}" readonly>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group full-width inline-2">
|
||||||
|
<div>
|
||||||
|
<label>Enter Percentage(%) Cess:Tax(A):</label>
|
||||||
|
<input type="number" name="per_cess_a" step="any" value="{{ record.per_cess_a }}" oninput="calculate()">
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<label>Education Cess:Tax(A): </label>
|
||||||
|
<input type="number" name="edu_cess_a_cal" class="auto" step="any" value="{{ record.edu_cess_a_cal }}"
|
||||||
|
readonly>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<label>Enter Percentage(%) Cess:Tax(B):</label>
|
||||||
|
<input type="number" name="per_cess_b" step="any" value="{{ record.per_cess_b }}" oninput="calculate()">
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<label>Education Cess:Tax(B): </label>
|
||||||
|
<input type="number" name="edu_cess_b_cal" class="auto" step="any" value="{{ record.edu_cess_b_cal }}"
|
||||||
|
readonly>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group full-width inline-2">
|
||||||
|
<div>
|
||||||
|
<label>Total cal Tax(A): </label>
|
||||||
|
<input type="number" name="sum_of_a" class="auto" step="any" value="{{ record.sum_of_a }}" readonly>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<label>Total cal Tax(B): </label>
|
||||||
|
<input type="number" name="sum_of_b" class="auto" step="any" value="{{ record.sum_of_b }}" readonly>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group full-width inline-2">
|
||||||
<div>
|
<div>
|
||||||
<label>Tax Payable (Higher of A or B):</label>
|
<label>Tax Payable (Higher of A or B):</label>
|
||||||
<input type="number" name="tax_payable" class="auto" step="any" value="{{ record.tax_payable }}"
|
<input type="number" name="tax_payable" class="auto" step="any" value="{{ record.tax_payable }}"
|
||||||
readonly>
|
readonly>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group full-width inline-2">
|
|
||||||
<div>
|
|
||||||
<label>Surcharge:</label>
|
|
||||||
<input type="number" name="surcharge" class="auto" value="{{ record.surcharge }}" readonly>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<label>Education Cess :</label>
|
|
||||||
<input type="number" name="edu_cess" class="auto" step="any" value="{{ record.edu_cess }}" readonly>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group full-width inline-2">
|
|
||||||
<div>
|
<div>
|
||||||
<label>Total tax Payable:</label>
|
<label>Total tax Payable:</label>
|
||||||
<input type="number" name="total_tax_payable" class="auto" step="any"
|
<input type="number" name="total_tax_payable" class="auto" step="any"
|
||||||
value="{{ record.total_tax_payable }}" readonly>
|
value="{{ record.total_tax_payable }}" readonly>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group full-width inline-2">
|
||||||
|
<div>
|
||||||
|
<label>Opening Balance:</label>
|
||||||
|
<input type="number" name="opening_balance" step="any" value="{{ record.opening_balance }}"
|
||||||
|
oninput="calculate()">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group full-width inline-2">
|
||||||
<div>
|
<div>
|
||||||
<label>Less :Mat Credit Created:</label>
|
<label>Less :Mat Credit Created:</label>
|
||||||
<input type="number" name="mat_credit_created" step="any" value="{{ record.mat_credit_created }}"
|
<input type="number" name="mat_credit_created" step="any" value="{{ record.mat_credit_created }}"
|
||||||
@@ -119,6 +199,14 @@
|
|||||||
<input type="number" name="mat_credit_utilized" step="any" value="{{ record.mat_credit_utilized }}"
|
<input type="number" name="mat_credit_utilized" step="any" value="{{ record.mat_credit_utilized }}"
|
||||||
oninput="calculate()" required>
|
oninput="calculate()" required>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group full-width inline-2">
|
||||||
|
<div>
|
||||||
|
<label>Closing Balance:</label>
|
||||||
|
<input type="number" name="closing_balance" step="any" value="{{ record.closing_balance }}"
|
||||||
|
oninput="calculate()">
|
||||||
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label>Add :Interest 234c:</label>
|
<label>Add :Interest 234c:</label>
|
||||||
<input type="number" name="interest_234c" step="any" value="{{ record.interest_234c }}"
|
<input type="number" name="interest_234c" step="any" value="{{ record.interest_234c }}"
|
||||||
@@ -165,23 +253,28 @@
|
|||||||
<input type="number" name="refund" class="auto" step="any" value="{{ record.refund }}" readonly>
|
<input type="number" name="refund" class="auto" step="any" value="{{ record.refund }}" readonly>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
|
||||||
<label>Remarks:</label>
|
|
||||||
<input type="text" name="Remarks" value="{{ record.Remarks }}">
|
|
||||||
</div>
|
|
||||||
<div class="form-group full-width inline-2">
|
<div class="form-group full-width inline-2">
|
||||||
<div>
|
<div class="form-group">
|
||||||
<label>Created Date:</label>
|
<label>Add : Interest u/s 244A as per 143:</label>
|
||||||
<input type="date" name="created_at"
|
<input type="number" name="interest_244a_per143" step="any" value="{{ record.interest_244a_per143 }}"
|
||||||
value="{{ record.created_at.strftime('%Y-%m-%d') if record.created_at else current_date }}"
|
oninput="calculate()">
|
||||||
readonly>
|
|
||||||
</div>
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label>Less : Refund Received on:</label>
|
||||||
|
<input type="number" name="refund_received" step="any" value="{{ record.refund_received }}"
|
||||||
|
oninput="calculate()">
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label>Balance Receivable:</label>
|
||||||
|
<input type="number" name="balance_receivable" class="auto" step="any"
|
||||||
|
value="{{ record.balance_receivable }}" oninput="calculate()">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div>
|
<div class="form-group full-width inline-2">
|
||||||
<label>Last Updated:</label>
|
<div class="form-group">
|
||||||
<input type="date" name="updated_at"
|
<label>Remarks:</label>
|
||||||
value="{{ record.updated_at.strftime('%Y-%m-%d') if record.updated_at else current_date }}"
|
<input type="text" name="Remarks" value="{{ record.Remarks }}">
|
||||||
readonly>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -27,7 +27,11 @@
|
|||||||
</select>
|
</select>
|
||||||
<button type="submit">Apply</button>
|
<button type="submit">Apply</button>
|
||||||
</form>
|
</form>
|
||||||
|
{% with messages = get_flashed_messages(with_categories=true) %}
|
||||||
|
{% for category, message in messages %}
|
||||||
|
<div class="alert alert-{{ category }}">{{ message }}</div>
|
||||||
|
{% endfor %}
|
||||||
|
{% endwith %}
|
||||||
<!-- DOCUMENT TABLE -->
|
<!-- DOCUMENT TABLE -->
|
||||||
<div class="table-responsive">
|
<div class="table-responsive">
|
||||||
<table>
|
<table>
|
||||||
|
|||||||
24
templates/view_logs.html
Normal file
24
templates/view_logs.html
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
<!doctype html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
|
<title>Document</title>
|
||||||
|
<style>
|
||||||
|
body {
|
||||||
|
background: black;
|
||||||
|
color: #00ff00;
|
||||||
|
font-family: monospace;
|
||||||
|
}
|
||||||
|
.log-box {
|
||||||
|
white-space: pre-wrap;
|
||||||
|
height: 90vh;
|
||||||
|
overflow-y: scroll;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h2>Application Logs</h2>
|
||||||
|
<div class="log-box">{% for line in logs %} {{ line }} {% endfor %}</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
90
templates/view_logs_auth.html
Normal file
90
templates/view_logs_auth.html
Normal file
@@ -0,0 +1,90 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>View Logs - Authorization</title>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
body {
|
||||||
|
margin: 0;
|
||||||
|
font-family: Arial, Helvetica, sans-serif;
|
||||||
|
background: linear-gradient(135deg, #0d47a1, #1976d2);
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
height: 100vh;
|
||||||
|
}
|
||||||
|
|
||||||
|
.container {
|
||||||
|
background: #ffffff;
|
||||||
|
padding: 40px;
|
||||||
|
width: 350px;
|
||||||
|
border-radius: 12px;
|
||||||
|
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
h2 {
|
||||||
|
margin-bottom: 25px;
|
||||||
|
color: #0d47a1;
|
||||||
|
}
|
||||||
|
|
||||||
|
input[type="password"] {
|
||||||
|
width: 100%;
|
||||||
|
padding: 12px;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
border-radius: 6px;
|
||||||
|
border: 1px solid #ccc;
|
||||||
|
font-size: 14px;
|
||||||
|
outline: none;
|
||||||
|
transition: border 0.3s;
|
||||||
|
}
|
||||||
|
|
||||||
|
input[type="password"]:focus {
|
||||||
|
border: 1px solid #1976d2;
|
||||||
|
}
|
||||||
|
|
||||||
|
button {
|
||||||
|
width: 100%;
|
||||||
|
padding: 12px;
|
||||||
|
background-color: #1976d2;
|
||||||
|
color: white;
|
||||||
|
border: none;
|
||||||
|
border-radius: 6px;
|
||||||
|
font-size: 15px;
|
||||||
|
cursor: pointer;
|
||||||
|
transition: background 0.3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
button:hover {
|
||||||
|
background-color: #0d47a1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.flash-message {
|
||||||
|
margin-top: 15px;
|
||||||
|
font-size: 14px;
|
||||||
|
color: red;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<div class="container">
|
||||||
|
<h2>Enter Secret to View Logs</h2>
|
||||||
|
|
||||||
|
<form method="POST">
|
||||||
|
<input type="password" name="secret" placeholder="Enter Secret Password" required>
|
||||||
|
<button type="submit">Open Logs</button>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
{% with messages = get_flashed_messages(with_categories=true) %}
|
||||||
|
{% for category, message in messages %}
|
||||||
|
<div class="flash-message">{{ message }}</div>
|
||||||
|
{% endfor %}
|
||||||
|
{% endwith %}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
Reference in New Issue
Block a user