Compare commits
7 Commits
e5c349bbf4
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 529380c42a | |||
| f8c23d119d | |||
| dd7b7be4b9 | |||
| 63bcbeb9a2 | |||
| 0ba78a0bd1 | |||
| b8c289294d | |||
| 2058cfed95 |
24
.gitignore
vendored
24
.gitignore
vendored
@@ -1,28 +1,18 @@
|
|||||||
# Python
|
# Python
|
||||||
*.__pycache__
|
*.__pycache__
|
||||||
*.pyc
|
*.pyc
|
||||||
*.pyo
|
*.pyos
|
||||||
*.pyd
|
*.pyd
|
||||||
__pycache__
|
__pycache__
|
||||||
|
.vscode/
|
||||||
|
.idea/
|
||||||
|
|
||||||
# Ingnor upload files
|
# Ignore upload files
|
||||||
static/uploads/
|
static/uploads/
|
||||||
|
|
||||||
# Ignore files
|
|
||||||
venv
|
|
||||||
|
|
||||||
# Ignore Log files ss
|
|
||||||
logs/
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Environment variables
|
# Environment variables
|
||||||
.env
|
.env
|
||||||
|
venv
|
||||||
|
|
||||||
# Python cache
|
# Ignore Log files
|
||||||
__pycache__/
|
logs/
|
||||||
*.pyc
|
|
||||||
|
|
||||||
# OS / Editor
|
|
||||||
.vscode/
|
|
||||||
.idea/
|
|
||||||
@@ -19,7 +19,7 @@ class AOHandler:
|
|||||||
|
|
||||||
return records
|
return records
|
||||||
|
|
||||||
# get ao recourd
|
# get ao record
|
||||||
def get_ao_by_id(self, id):
|
def get_ao_by_id(self, id):
|
||||||
self.cursor.callproc('GetAOById', [id])
|
self.cursor.callproc('GetAOById', [id])
|
||||||
records = []
|
records = []
|
||||||
@@ -34,17 +34,14 @@ class AOHandler:
|
|||||||
def add_ao(self, data):
|
def add_ao(self, data):
|
||||||
|
|
||||||
try:
|
try:
|
||||||
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', 'created_at'
|
||||||
'interest_234c', 'total_tax', 'advance_tax', 'tds', 'tcs',
|
|
||||||
'sat', 'tax_on_assessment', 'refund', '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()
|
||||||
@@ -57,15 +54,13 @@ class AOHandler:
|
|||||||
|
|
||||||
# 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]
|
||||||
@@ -106,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",
|
||||||
@@ -128,6 +138,9 @@ class AOHandler:
|
|||||||
"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"
|
"Remarks" : "Remarks"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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','created_at'
|
|
||||||
]
|
]
|
||||||
|
|
||||||
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",
|
||||||
@@ -122,6 +133,9 @@ class CITHandler:
|
|||||||
"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"
|
"Remarks" : "Remarks"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
from flask import (
|
from flask import render_template, request, send_file, jsonify
|
||||||
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
|
||||||
@@ -23,13 +21,6 @@ class DocumentHandler:
|
|||||||
# Utility: Parse Year
|
# Utility: Parse Year
|
||||||
# =========================
|
# =========================
|
||||||
def parse_year(self, year_value):
|
def parse_year(self, year_value):
|
||||||
"""
|
|
||||||
Accepts:
|
|
||||||
- '2026'
|
|
||||||
- 'AY 2026-2027'
|
|
||||||
Returns:
|
|
||||||
- 2026 (int)
|
|
||||||
"""
|
|
||||||
if not year_value:
|
if not year_value:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
@@ -118,10 +109,7 @@ class DocumentHandler:
|
|||||||
|
|
||||||
file.save(filepath)
|
file.save(filepath)
|
||||||
|
|
||||||
cursor.callproc(
|
cursor.callproc('InsertDocument',[filename, filepath, extension, year, stage])
|
||||||
'InsertDocument',
|
|
||||||
[filename, filepath, extension, year, stage]
|
|
||||||
)
|
|
||||||
|
|
||||||
connection.commit()
|
connection.commit()
|
||||||
cursor.close()
|
cursor.close()
|
||||||
@@ -131,9 +119,7 @@ class DocumentHandler:
|
|||||||
# Summary Preview (JSON)
|
# Summary Preview (JSON)
|
||||||
# =========================
|
# =========================
|
||||||
def Summary_preview(self, request):
|
def Summary_preview(self, request):
|
||||||
"""
|
|
||||||
Returns JSON preview of summary report for selected year.
|
|
||||||
"""
|
|
||||||
year_raw = request.args.get("year")
|
year_raw = request.args.get("year")
|
||||||
year = self.parse_year(year_raw)
|
year = self.parse_year(year_raw)
|
||||||
|
|
||||||
@@ -166,24 +152,46 @@ class DocumentHandler:
|
|||||||
|
|
||||||
columns = [
|
columns = [
|
||||||
'gross_total_income', 'disallowance_14a',
|
'gross_total_income', 'disallowance_14a',
|
||||||
'disallowance_37', '-',
|
'disallowance_37',
|
||||||
|
'gross_total_income'+'disallowance_14a'+'disallowance_37',
|
||||||
'deduction_80ia_business',
|
'deduction_80ia_business',
|
||||||
'deduction_80ia_misc',
|
'deduction_80ia_misc',
|
||||||
'deduction_80ia_other',
|
'deduction_80ia_other',
|
||||||
'deduction_sec37_disallowance',
|
'deduction_sec37_disallowance',
|
||||||
'deduction_80g', '-',
|
'deduction_80g', '-',
|
||||||
'net_taxable_income',
|
'net_taxable_income',
|
||||||
'tax_30_percent',
|
'-',
|
||||||
'tax_book_profit_18_5',
|
'per_tax_a',
|
||||||
'tax_payable', 'surcharge',
|
'tax_a_cal',
|
||||||
'edu_cess', 'total_tax_payable',
|
'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_created',
|
||||||
'mat_credit_utilized',
|
'mat_credit_utilized',
|
||||||
|
'closing_balance',
|
||||||
'interest_234c', 'total_tax',
|
'interest_234c', 'total_tax',
|
||||||
'-', 'advance_tax', 'tds',
|
'-', 'advance_tax', 'tds',
|
||||||
'tcs', 'sat',
|
'tcs', 'sat',
|
||||||
'tax_on_assessment',
|
'tax_on_assessment',
|
||||||
'refund', 'Remarks'
|
'refund',
|
||||||
|
'interest_244a_per143',
|
||||||
|
'refund_received',
|
||||||
|
'balance_receivable',
|
||||||
|
'Remarks'
|
||||||
]
|
]
|
||||||
|
|
||||||
particulars = [
|
particulars = [
|
||||||
@@ -192,18 +200,36 @@ class DocumentHandler:
|
|||||||
"Less: Deduction u/s 80IA - On Business Income",
|
"Less: Deduction u/s 80IA - On Business Income",
|
||||||
"- On Misc Receipts", "- On Other",
|
"- On Misc Receipts", "- On Other",
|
||||||
"- On Sec 37 Disallowance",
|
"- On Sec 37 Disallowance",
|
||||||
"Less: Deduction u/s 80G", " ",
|
"Less: Deduction u/s 80G", "-",
|
||||||
"Net Taxable Income", "Tax @ 30%",
|
"Net Taxable Income", "-",
|
||||||
"Tax @ 18.5% on Book Profit",
|
"Per% Tax @(A)",
|
||||||
"Tax Payable", "Surcharge @ %",
|
"Tax cal(A)",
|
||||||
"Education Cess @ %", "Total Tax Payable",
|
"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 of Mat Credit:",
|
||||||
"Add: MAT Credit Created",
|
"Add: MAT Credit Created",
|
||||||
"Less: MAT Credit Utilized",
|
"Less: MAT Credit Utilized",
|
||||||
|
"Closing Balance",
|
||||||
"Add: Interest u/s 234C",
|
"Add: Interest u/s 234C",
|
||||||
"Total Tax", " ",
|
"Total Tax", "-",
|
||||||
"Advance Tax", "TDS", "TCS", "SAT",
|
"Advance Tax", "TDS", "TCS", "SAT",
|
||||||
"Tax on Regular Assessment",
|
"Tax on Regular Assessment",
|
||||||
"Refund", "Remarks"
|
"Refund", "Add : Interest u/s 244A as per 143",
|
||||||
|
"Less : Refund Received on:","Balance Receivable","Remarks"
|
||||||
]
|
]
|
||||||
|
|
||||||
def safe_get(df, col):
|
def safe_get(df, col):
|
||||||
@@ -275,40 +301,80 @@ class DocumentHandler:
|
|||||||
"Less: Deduction u/s 80IA - On Business Income",
|
"Less: Deduction u/s 80IA - On Business Income",
|
||||||
"- On Misc Receipts", "- On Other",
|
"- On Misc Receipts", "- On Other",
|
||||||
"- On Sec 37 Disallowance",
|
"- On Sec 37 Disallowance",
|
||||||
"Less: Deduction u/s 80G", " ",
|
"Less: Deduction u/s 80G", "-",
|
||||||
"Net Taxable Income", "Tax @ 30%",
|
"Net Taxable Income", "-",
|
||||||
"Tax @ 18.5% on Book Profit",
|
"Per% Tax @(A)",
|
||||||
"Tax Payable", "Surcharge @ %",
|
"Tax cal(A)",
|
||||||
"Education Cess @ %", "Total Tax Payable",
|
"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 of Mat Credit",
|
||||||
"Add: MAT Credit Created",
|
"Add: MAT Credit Created",
|
||||||
"Less: MAT Credit Utilized",
|
"Less: MAT Credit Utilized",
|
||||||
|
"Closing Balance",
|
||||||
"Add: Interest u/s 234C",
|
"Add: Interest u/s 234C",
|
||||||
"Total Tax", " ",
|
"Total Tax", "-",
|
||||||
"Advance Tax", "TDS", "TCS", "SAT",
|
"Advance Tax", "TDS", "TCS", "SAT",
|
||||||
"Tax on Regular Assessment",
|
"Tax on Regular Assessment",
|
||||||
"Refund", "Remarks"
|
"Refund", "Add : Interest u/s 244A as per 143",
|
||||||
|
"Less : Refund Received on","Balance Receivable","Remarks"
|
||||||
]
|
]
|
||||||
|
|
||||||
columns = [
|
columns = [
|
||||||
'gross_total_income', 'disallowance_14a',
|
'gross_total_income', 'disallowance_14a',
|
||||||
'disallowance_37', '-',
|
'disallowance_37',
|
||||||
|
'gross_total_income'+'disallowance_14a'+'disallowance_37',
|
||||||
'deduction_80ia_business',
|
'deduction_80ia_business',
|
||||||
'deduction_80ia_misc',
|
'deduction_80ia_misc',
|
||||||
'deduction_80ia_other',
|
'deduction_80ia_other',
|
||||||
'deduction_sec37_disallowance',
|
'deduction_sec37_disallowance',
|
||||||
'deduction_80g', '-',
|
'deduction_80g', '-',
|
||||||
'net_taxable_income',
|
'net_taxable_income',
|
||||||
'tax_30_percent',
|
'-',
|
||||||
'tax_book_profit_18_5',
|
'per_tax_a',
|
||||||
'tax_payable', 'surcharge',
|
'tax_a_cal',
|
||||||
'edu_cess', 'total_tax_payable',
|
'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_created',
|
||||||
'mat_credit_utilized',
|
'mat_credit_utilized',
|
||||||
|
'closing_balance',
|
||||||
'interest_234c', 'total_tax',
|
'interest_234c', 'total_tax',
|
||||||
'-', 'advance_tax', 'tds',
|
'-', 'advance_tax', 'tds',
|
||||||
'tcs', 'sat',
|
'tcs', 'sat',
|
||||||
'tax_on_assessment',
|
'tax_on_assessment',
|
||||||
'refund', 'Remarks'
|
'refund',
|
||||||
|
'interest_244a_per143',
|
||||||
|
'refund_received',
|
||||||
|
'balance_receivable',
|
||||||
|
'Remarks'
|
||||||
]
|
]
|
||||||
|
|
||||||
data = {
|
data = {
|
||||||
@@ -330,26 +396,9 @@ class DocumentHandler:
|
|||||||
workbook = writer.book
|
workbook = writer.book
|
||||||
worksheet = writer.sheets[sheet_name]
|
worksheet = writer.sheets[sheet_name]
|
||||||
|
|
||||||
title = workbook.add_format({
|
title = workbook.add_format({'bold': True,'font_size': 14,'align': 'center'})
|
||||||
'bold': True,
|
worksheet.merge_range(0, 0, 0, len(df.columns) - 1,"Laxmi Civil Engineering Services Pvt Ltd",title)
|
||||||
'font_size': 14,
|
header = workbook.add_format({'bold': True,'align': 'center', 'bg_color': '#007bff','font_color': 'white','border': 1 })
|
||||||
'align': 'center'
|
|
||||||
})
|
|
||||||
|
|
||||||
worksheet.merge_range(
|
|
||||||
0, 0, 0, len(df.columns) - 1,
|
|
||||||
"Laxmi Civil Engineering Services Pvt Ltd",
|
|
||||||
title
|
|
||||||
)
|
|
||||||
|
|
||||||
header = workbook.add_format({
|
|
||||||
'bold': True,
|
|
||||||
'align': 'center',
|
|
||||||
'bg_color': '#007bff',
|
|
||||||
'font_color': 'white',
|
|
||||||
'border': 1
|
|
||||||
})
|
|
||||||
|
|
||||||
cell = workbook.add_format({'border': 1})
|
cell = workbook.add_format({'border': 1})
|
||||||
|
|
||||||
for col_num, col_name in enumerate(df.columns):
|
for col_num, col_name in enumerate(df.columns):
|
||||||
@@ -373,4 +422,3 @@ class DocumentHandler:
|
|||||||
|
|
||||||
finally:
|
finally:
|
||||||
connection.close()
|
connection.close()
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,12 @@ class FileHandler:
|
|||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def CHeckExistingOrCreateNewUploadFolder():
|
def CHeckExistingOrCreateNewUploadFolder():
|
||||||
#Wheteher path exists
|
# Whether path exists
|
||||||
os.makedirs(FileHandler.UPLOAD_FOLDER, exist_ok=True)
|
os.makedirs(FileHandler.UPLOAD_FOLDER, exist_ok=True)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def CheckExistingOrCreateNewLoggerFolder():
|
||||||
|
if not os.path.exists("logs"):
|
||||||
|
os.mkdir("logs")
|
||||||
|
return
|
||||||
@@ -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,15 +47,13 @@ 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]
|
||||||
|
|
||||||
@@ -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",
|
||||||
@@ -116,6 +128,9 @@ class ITATHandler:
|
|||||||
"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"
|
"Remarks" : "Remarks"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,8 @@
|
|||||||
import mysql.connector
|
import mysql.connector
|
||||||
import pandas as pd
|
import pandas as pd
|
||||||
import io
|
import io
|
||||||
from flask import send_file, render_template, request
|
|
||||||
|
|
||||||
from AppCode.Config import DBConfig
|
from AppCode.Config import DBConfig
|
||||||
|
|
||||||
|
|
||||||
class ITRHandler:
|
class ITRHandler:
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
@@ -25,38 +22,33 @@ class ITRHandler:
|
|||||||
def get_itr_by_id(self, id):
|
def get_itr_by_id(self, id):
|
||||||
# Call stored procedure
|
# Call stored procedure
|
||||||
self.cursor.callproc('GetITRById', [id])
|
self.cursor.callproc('GetITRById', [id])
|
||||||
|
|
||||||
# Fetch result
|
# Fetch result
|
||||||
records = []
|
records = []
|
||||||
for result in self.cursor.stored_results():
|
for result in self.cursor.stored_results():
|
||||||
records = result.fetchall()
|
records = result.fetchall()
|
||||||
|
|
||||||
if records:
|
if records:
|
||||||
print(records[0])
|
print(records[0])
|
||||||
return records[0] # return single record
|
return records[0] # return single record
|
||||||
|
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
|
||||||
# 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:
|
try:
|
||||||
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','created_at'
|
|
||||||
]
|
]
|
||||||
values = [data.get(col, 0) for col in columns]
|
|
||||||
|
|
||||||
|
values = [data.get(col, 0) for col in columns]
|
||||||
# Call your stored procedure
|
# Call your stored procedure
|
||||||
self.cursor.callproc("InsertITR", values)
|
self.cursor.callproc("InsertITR", values)
|
||||||
self.conn.commit()
|
self.conn.commit()
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
self.conn.rollback()
|
self.conn.rollback()
|
||||||
raise e
|
raise e
|
||||||
@@ -67,15 +59,13 @@ class ITRHandler:
|
|||||||
|
|
||||||
# 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]
|
||||||
@@ -109,20 +99,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",
|
||||||
@@ -130,10 +135,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)
|
||||||
@@ -149,13 +158,8 @@ class ITRHandler:
|
|||||||
writer.sheets["ITR Report"] = worksheet
|
writer.sheets["ITR Report"] = worksheet
|
||||||
|
|
||||||
# Formats
|
# Formats
|
||||||
title_fmt = workbook.add_format({
|
title_fmt = workbook.add_format({"bold": True, "align": "center", "valign": "vcenter","font_size": 14})
|
||||||
"bold": True, "align": "center", "valign": "vcenter",
|
header_fmt = workbook.add_format({"bold": True, "border": 1, "align": "center"})
|
||||||
"font_size": 14
|
|
||||||
})
|
|
||||||
header_fmt = workbook.add_format({
|
|
||||||
"bold": True, "border": 1, "align": "center"
|
|
||||||
})
|
|
||||||
cell_fmt = workbook.add_format({"border": 1})
|
cell_fmt = workbook.add_format({"border": 1})
|
||||||
num_fmt = workbook.add_format({"border": 1, "num_format": "#,##0.00"})
|
num_fmt = workbook.add_format({"border": 1, "num_format": "#,##0.00"})
|
||||||
|
|
||||||
|
|||||||
@@ -1,22 +1,49 @@
|
|||||||
import os
|
import os
|
||||||
from flask import Flask, render_template, request, redirect, url_for, send_from_directory, flash, jsonify, json
|
import logging
|
||||||
from flask import current_app
|
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from flask_login import LoginManager, UserMixin, login_user, logout_user, login_required, current_user
|
from flask import session, request, current_app
|
||||||
|
|
||||||
|
|
||||||
class LogHelper:
|
class LogHelper:
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def setup_logger(app):
|
||||||
|
if not os.path.exists("logs"):
|
||||||
|
os.makedirs("logs")
|
||||||
|
|
||||||
|
formatter = logging.Formatter("%(asctime)s | %(levelname)s | User:%(user)s | IP:%(ip)s | %(message)s")
|
||||||
|
|
||||||
|
file_handler = logging.FileHandler("logs/app.log")
|
||||||
|
file_handler.setLevel(logging.INFO)
|
||||||
|
file_handler.setFormatter(formatter)
|
||||||
|
|
||||||
|
stream_handler = logging.StreamHandler()
|
||||||
|
stream_handler.setLevel(logging.INFO)
|
||||||
|
stream_handler.setFormatter(formatter)
|
||||||
|
|
||||||
|
app.logger.setLevel(logging.INFO)
|
||||||
|
app.logger.addHandler(file_handler)
|
||||||
|
app.logger.addHandler(stream_handler)
|
||||||
|
|
||||||
|
# ---------------------------------------
|
||||||
|
# Log User Activity
|
||||||
|
# ---------------------------------------
|
||||||
|
@staticmethod
|
||||||
|
def log_request():
|
||||||
|
if request.endpoint and "static" not in request.endpoint:
|
||||||
|
user = session.get("user", "Anonymous")
|
||||||
|
ip = request.remote_addr
|
||||||
|
|
||||||
|
current_app.logger.info(
|
||||||
|
f"{request.method} {request.path}",
|
||||||
|
extra={"user": user, "ip": ip}
|
||||||
|
)
|
||||||
|
|
||||||
|
# ---------------------------------------
|
||||||
|
# Custom Action Logging
|
||||||
|
# ---------------------------------------
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def log_action(action, details=""):
|
def log_action(action, details=""):
|
||||||
"""Log user actions with timestamp, user, action, and details."""
|
user = session.get("user", "Anonymous")
|
||||||
logData = LogData()
|
ip = request.remote_addr
|
||||||
logData.WriteLog(action, details="")
|
current_app.logger.info(f"{action} | {details}",extra={"user": user, "ip": ip})
|
||||||
|
|
||||||
|
|
||||||
class LogData:
|
|
||||||
filepath = ""
|
|
||||||
timestamp = None
|
|
||||||
|
|
||||||
def __init__(self):
|
|
||||||
self.filepath = os.path.join(current_app.root_path, 'activity.log')
|
|
||||||
self.timestamp = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
|
|
||||||
|
|||||||
@@ -1,39 +1,59 @@
|
|||||||
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
|
import os
|
||||||
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__)
|
||||||
|
|
||||||
# LOGIN ROUTE
|
# LDAP CONFIG
|
||||||
@self.bp.route('/login', methods=['GET', 'POST'])
|
self.LDAP_SERVER = os.getenv("LDAP_SERVER", "ldap://host.docker.internal:389")
|
||||||
def login():
|
self.BASE_DN = "ou=users,dc=lcepl,dc=org"
|
||||||
if request.method == 'POST':
|
|
||||||
|
# Register Routes
|
||||||
|
self.bp.add_url_rule("/login", view_func=self.login, methods=["GET", "POST"])
|
||||||
|
self.bp.add_url_rule("/logout", view_func=self.logout)
|
||||||
|
|
||||||
|
# ================= LOGIN =================
|
||||||
|
def login(self):
|
||||||
|
if request.method == "POST":
|
||||||
username = request.form.get("username")
|
username = request.form.get("username")
|
||||||
password = request.form.get("password")
|
password = request.form.get("password")
|
||||||
|
|
||||||
# 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'))
|
user_dn = f"uid={username},{self.BASE_DN}"
|
||||||
|
server = Server(self.LDAP_SERVER, get_info=ALL)
|
||||||
|
|
||||||
|
try:
|
||||||
|
conn = Connection(server, user=user_dn, password=password, auto_bind=True)
|
||||||
|
|
||||||
|
if conn.bound:
|
||||||
|
session["user"] = username
|
||||||
|
flash(f"Login successful! Welcome {username}", "success")
|
||||||
|
conn.unbind()
|
||||||
|
return redirect(url_for("welcome"))
|
||||||
else:
|
else:
|
||||||
flash("Invalid username or password!", "danger")
|
flash("Invalid username or password!", "danger")
|
||||||
|
|
||||||
|
except LDAPException as e:
|
||||||
|
flash(f"LDAP login failed: {str(e)}", "danger")
|
||||||
|
|
||||||
return render_template("login.html")
|
return render_template("login.html")
|
||||||
|
|
||||||
# LOGOUT ROUTE
|
# ================= LOGOUT =================
|
||||||
@self.bp.route('/logout')
|
def logout(self):
|
||||||
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 =================
|
||||||
# LOGIN REQUIRED DECORATOR INSIDE CLASS
|
|
||||||
# ===================================================
|
|
||||||
def login_required(self, f):
|
def login_required(self, f):
|
||||||
@wraps(f)
|
@wraps(f)
|
||||||
def wrapper(*args, **kwargs):
|
def wrapper(*args, **kwargs):
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ class MatCreditHandler:
|
|||||||
def fetch_all(self):
|
def fetch_all(self):
|
||||||
try:
|
try:
|
||||||
|
|
||||||
self.cursor.callproc("GetMatCedit")
|
self.cursor.callproc("GetMatCredit")
|
||||||
result_sets = self.cursor.stored_results()
|
result_sets = self.cursor.stored_results()
|
||||||
mat_rows = next(result_sets).fetchall()
|
mat_rows = next(result_sets).fetchall()
|
||||||
utilization_rows = next(result_sets).fetchall()
|
utilization_rows = next(result_sets).fetchall()
|
||||||
@@ -38,8 +38,9 @@ class MatCreditHandler:
|
|||||||
(
|
(
|
||||||
data["financial_year"],
|
data["financial_year"],
|
||||||
data["mat_credit"],
|
data["mat_credit"],
|
||||||
|
data["opening_balance"],
|
||||||
data["balance"],
|
data["balance"],
|
||||||
data.get("remarks", "")
|
data.get("remarks", "update on manually on mat credit from ui")
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -68,20 +69,21 @@ class MatCreditHandler:
|
|||||||
# AUTO SAVE MAT FROM ITR (MAIN LOGIC)
|
# AUTO SAVE MAT FROM ITR (MAIN LOGIC)
|
||||||
# --------------------------------------------------
|
# --------------------------------------------------
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def save_from_itr(year, mat_created, mat_utilized, remarks="Auto from"):
|
def save_from_itr(year, mat_created, opening_balance, mat_utilized, remarks):
|
||||||
conn = DBConfig.get_db_connection()
|
conn = DBConfig.get_db_connection()
|
||||||
cur = conn.cursor(dictionary=True)
|
cur = conn.cursor(dictionary=True)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
mat_created = float(mat_created or 0)
|
mat_created = float(mat_created or 0)
|
||||||
|
opening_balance = float(mat_created or 0)
|
||||||
mat_utilized = float(mat_utilized or 0)
|
mat_utilized = float(mat_utilized or 0)
|
||||||
|
|
||||||
balance = mat_created - mat_utilized
|
balance = opening_balance + mat_created - mat_utilized
|
||||||
|
|
||||||
# Save / Update MAT Credit
|
# Save / Update MAT Credit
|
||||||
cur.callproc(
|
cur.callproc(
|
||||||
"SaveOrUpdateMatCredit",
|
"SaveOrUpdateMatCredit",
|
||||||
(year, mat_created, balance, remarks)
|
(year, mat_created, opening_balance, balance, remarks)
|
||||||
)
|
)
|
||||||
|
|
||||||
mat_id = None
|
mat_id = None
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
38
Dockerfile
38
Dockerfile
@@ -1,22 +1,36 @@
|
|||||||
|
# -------------- development's Dockerfile ----------------
|
||||||
|
# FROM python:3.11-slim
|
||||||
|
|
||||||
|
# # Prevent Python buffering
|
||||||
|
# ENV PYTHONDONTWRITEBYTECODE=1
|
||||||
|
# ENV PYTHONUNBUFFERED=1
|
||||||
|
|
||||||
|
# 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 .
|
||||||
|
# RUN pip install --no-cache-dir -r requirements.txt
|
||||||
|
# COPY . .
|
||||||
|
# EXPOSE 5000
|
||||||
|
# CMD ["python", "main.py"]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# -------------- Production Dockerfile ----------------
|
||||||
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"]
|
||||||
|
# end
|
||||||
@@ -1,29 +1,42 @@
|
|||||||
version: "3.9"
|
version: "3.9"
|
||||||
|
|
||||||
services:
|
services:
|
||||||
|
|
||||||
|
# Database connection
|
||||||
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:
|
# Application config
|
||||||
|
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
|
||||||
|
LOG_VIEW_SECRET: super-log-2026
|
||||||
|
volumes:
|
||||||
|
- /var/run/docker.sock:/var/run/docker.sock
|
||||||
|
- ./logs:/app/logs
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
mysql_data:
|
mysql_data:
|
||||||
119
main.py
119
main.py
@@ -1,8 +1,6 @@
|
|||||||
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()
|
|
||||||
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
|
||||||
@@ -15,17 +13,28 @@ from AppCode.AOHandler import AOHandler
|
|||||||
from AppCode.CITHandler import CITHandler
|
from AppCode.CITHandler import CITHandler
|
||||||
from AppCode.ITATHandler import ITATHandler
|
from AppCode.ITATHandler import ITATHandler
|
||||||
from AppCode.MatCreditHandler import MatCreditHandler
|
from AppCode.MatCreditHandler import MatCreditHandler
|
||||||
import subprocess
|
import logging
|
||||||
|
import sys
|
||||||
|
from AppCode.Log import LogHelper
|
||||||
|
|
||||||
|
# Loading env file
|
||||||
|
load_dotenv()
|
||||||
|
|
||||||
# Server
|
# Server
|
||||||
app = Flask(__name__)
|
app = Flask(__name__)
|
||||||
app.secret_key=os.getenv("SECRET_KEY")
|
app.secret_key=os.getenv("SECRET_KEY")
|
||||||
|
|
||||||
|
# login auth
|
||||||
auth = LoginAuth()
|
auth = LoginAuth()
|
||||||
app.register_blueprint(auth.bp)
|
app.register_blueprint(auth.bp)
|
||||||
|
|
||||||
|
# LOGGING SETUP
|
||||||
|
LogHelper.setup_logger(app)
|
||||||
|
|
||||||
|
@app.before_request
|
||||||
|
def log_all_requests():
|
||||||
|
LogHelper.log_request()
|
||||||
|
|
||||||
|
|
||||||
# welcome page
|
# welcome page
|
||||||
@app.route('/')
|
@app.route('/')
|
||||||
@@ -48,6 +57,7 @@ def upload_file():
|
|||||||
FileHandler.CHeckExistingOrCreateNewUploadFolder()
|
FileHandler.CHeckExistingOrCreateNewUploadFolder()
|
||||||
docHandler = DocumentHandler()
|
docHandler = DocumentHandler()
|
||||||
docHandler.Upload(request=request)
|
docHandler.Upload(request=request)
|
||||||
|
LogHelper.log_action("UPLOAD", "Document uploaded")
|
||||||
return redirect(url_for('view_documents'))
|
return redirect(url_for('view_documents'))
|
||||||
return render_template('upload.html')
|
return render_template('upload.html')
|
||||||
|
|
||||||
@@ -70,7 +80,7 @@ def uploaded_file(filename):
|
|||||||
if not os.path.exists(filepath):
|
if not os.path.exists(filepath):
|
||||||
flash("Unsupported file type for viewing", "warning")
|
flash("Unsupported file type for viewing", "warning")
|
||||||
return redirect(url_for('view_documents'))
|
return redirect(url_for('view_documents'))
|
||||||
|
LogHelper.log_action("VIEW FILE", filename)
|
||||||
file_ext = filename.rsplit('.', 1)[-1].lower()
|
file_ext = filename.rsplit('.', 1)[-1].lower()
|
||||||
# --- View Mode ---
|
# --- View Mode ---
|
||||||
if mode == 'view':
|
if mode == 'view':
|
||||||
@@ -122,10 +132,11 @@ def add_itr():
|
|||||||
mat.save_from_itr(
|
mat.save_from_itr(
|
||||||
year=request.form["year"],
|
year=request.form["year"],
|
||||||
mat_created=float(request.form.get("mat_credit_created", 0)),
|
mat_created=float(request.form.get("mat_credit_created", 0)),
|
||||||
|
opening_balance=float(request.form.get("opening_balance", 0)),
|
||||||
mat_utilized=float(request.form.get("mat_credit_utilized", 0)),
|
mat_utilized=float(request.form.get("mat_credit_utilized", 0)),
|
||||||
remarks="Created via ITR"
|
remarks="Created via ITR"
|
||||||
)
|
)
|
||||||
|
LogHelper.log_action("ADD ITR Record", f"Year: {request.form['year']}")
|
||||||
# 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'))
|
||||||
@@ -139,6 +150,7 @@ def delete_itr(id):
|
|||||||
itr = ITRHandler()
|
itr = ITRHandler()
|
||||||
itr.delete_itr_by_id(id=id)
|
itr.delete_itr_by_id(id=id)
|
||||||
itr.close()
|
itr.close()
|
||||||
|
LogHelper.log_action("ITR record deleted successfully!", id)
|
||||||
return redirect(url_for('display_itr'))
|
return redirect(url_for('display_itr'))
|
||||||
|
|
||||||
## 3. UPDATE an existing ITR record
|
## 3. UPDATE an existing ITR record
|
||||||
@@ -151,6 +163,17 @@ def update_itr(id):
|
|||||||
data = {k: request.form.get(k, 0) for k in request.form}
|
data = {k: request.form.get(k, 0) for k in request.form}
|
||||||
itr.update(id, data)
|
itr.update(id, data)
|
||||||
itr.close()
|
itr.close()
|
||||||
|
mat = MatCreditHandler()
|
||||||
|
|
||||||
|
# AUTO SAVE MAT FROM ITR
|
||||||
|
mat.save_from_itr(
|
||||||
|
year=request.form["year"],
|
||||||
|
mat_created=float(request.form.get("mat_credit_created", 0)),
|
||||||
|
opening_balance=float(request.form.get("opening_balance", 0)),
|
||||||
|
mat_utilized=float(request.form.get("mat_credit_utilized", 0)),
|
||||||
|
remarks="Updated via ITR"
|
||||||
|
)
|
||||||
|
LogHelper.log_action("ITR record updated successfully!", data)
|
||||||
return redirect(url_for('display_itr'))
|
return redirect(url_for('display_itr'))
|
||||||
|
|
||||||
record = itr.get_itr_by_id(id)
|
record = itr.get_itr_by_id(id)
|
||||||
@@ -158,8 +181,6 @@ def update_itr(id):
|
|||||||
return render_template('update_itr.html', record=record, current_date=date.today().isoformat())
|
return render_template('update_itr.html', record=record, current_date=date.today().isoformat())
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## ===============================================
|
## ===============================================
|
||||||
## AO (Assessing Officer) Routes
|
## AO (Assessing Officer) Routes
|
||||||
## ===============================================
|
## ===============================================
|
||||||
@@ -192,10 +213,11 @@ def add_ao():
|
|||||||
mat.save_from_itr(
|
mat.save_from_itr(
|
||||||
year=request.form["year"],
|
year=request.form["year"],
|
||||||
mat_created=float(request.form.get("mat_credit_created", 0)),
|
mat_created=float(request.form.get("mat_credit_created", 0)),
|
||||||
|
opening_balance=float(request.form.get("opening_balance", 0)),
|
||||||
mat_utilized=float(request.form.get("mat_credit_utilized", 0)),
|
mat_utilized=float(request.form.get("mat_credit_utilized", 0)),
|
||||||
remarks="Created via ao"
|
remarks="Created via ao"
|
||||||
)
|
)
|
||||||
|
LogHelper.log_action("AO record added successfully!", "")
|
||||||
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',current_date=date.today().isoformat())
|
return render_template('add_ao.html',current_date=date.today().isoformat())
|
||||||
@@ -214,6 +236,15 @@ def update_ao(id):
|
|||||||
data = request.form.to_dict()
|
data = request.form.to_dict()
|
||||||
ao.update_ao(id, data)
|
ao.update_ao(id, data)
|
||||||
ao.close()
|
ao.close()
|
||||||
|
mat = MatCreditHandler()
|
||||||
|
mat.save_from_itr(
|
||||||
|
year=request.form["year"],
|
||||||
|
mat_created=float(request.form.get("mat_credit_created", 0)),
|
||||||
|
opening_balance=float(request.form.get("opening_balance", 0)),
|
||||||
|
mat_utilized=float(request.form.get("mat_credit_utilized", 0)),
|
||||||
|
remarks="Created via ao"
|
||||||
|
)
|
||||||
|
LogHelper.log_action("AO record updated successfully!", data)
|
||||||
flash("AO record updated successfully!", "success")
|
flash("AO record updated successfully!", "success")
|
||||||
return redirect(url_for('display_ao'))
|
return redirect(url_for('display_ao'))
|
||||||
|
|
||||||
@@ -228,6 +259,7 @@ def delete_ao(id):
|
|||||||
ao = AOHandler()
|
ao = AOHandler()
|
||||||
ao.delete_ao_by_id(id=id)
|
ao.delete_ao_by_id(id=id)
|
||||||
ao.close()
|
ao.close()
|
||||||
|
LogHelper.log_action("AO deleted successfully!", id)
|
||||||
flash("AO deleted successfully!", "success")
|
flash("AO deleted successfully!", "success")
|
||||||
return redirect(url_for('display_ao'))
|
return redirect(url_for('display_ao'))
|
||||||
|
|
||||||
@@ -264,9 +296,11 @@ def add_cit():
|
|||||||
mat.save_from_itr(
|
mat.save_from_itr(
|
||||||
year=request.form["year"],
|
year=request.form["year"],
|
||||||
mat_created=float(request.form.get("mat_credit_created", 0)),
|
mat_created=float(request.form.get("mat_credit_created", 0)),
|
||||||
|
opening_balance=float(request.form.get("opening_balance", 0)),
|
||||||
mat_utilized=float(request.form.get("mat_credit_utilized", 0)),
|
mat_utilized=float(request.form.get("mat_credit_utilized", 0)),
|
||||||
remarks="Created via cit"
|
remarks="Created via cit"
|
||||||
)
|
)
|
||||||
|
LogHelper.log_action("CIT record added successfully!", "")
|
||||||
flash("CIT record added successfully!", "success")
|
flash("CIT record added successfully!", "success")
|
||||||
return redirect(url_for('display_cit'))
|
return redirect(url_for('display_cit'))
|
||||||
|
|
||||||
@@ -279,6 +313,7 @@ def delete_cit(id):
|
|||||||
cit = CITHandler()
|
cit = CITHandler()
|
||||||
cit.delete_cit(id)
|
cit.delete_cit(id)
|
||||||
cit.close()
|
cit.close()
|
||||||
|
LogHelper.log_action("CIT record deleted successfully!", id)
|
||||||
flash("CIT record deleted successfully!", "success")
|
flash("CIT record deleted successfully!", "success")
|
||||||
return redirect(url_for('display_cit'))
|
return redirect(url_for('display_cit'))
|
||||||
|
|
||||||
@@ -297,6 +332,16 @@ def update_cit(id):
|
|||||||
data = {k: request.form.get(k, 0) for k in request.form}
|
data = {k: request.form.get(k, 0) for k in request.form}
|
||||||
cit.update_cit(id, data)
|
cit.update_cit(id, data)
|
||||||
cit.close()
|
cit.close()
|
||||||
|
mat = MatCreditHandler()
|
||||||
|
# AUTO SAVE MAT FROM ITR
|
||||||
|
mat.save_from_itr(
|
||||||
|
year=request.form["year"],
|
||||||
|
mat_created=float(request.form.get("mat_credit_created", 0)),
|
||||||
|
opening_balance=float(request.form.get("opening_balance", 0)),
|
||||||
|
mat_utilized=float(request.form.get("mat_credit_utilized", 0)),
|
||||||
|
remarks="Updated via cit"
|
||||||
|
)
|
||||||
|
LogHelper.log_action("CIT record updated successfully!", data)
|
||||||
return redirect(url_for('display_cit'))
|
return redirect(url_for('display_cit'))
|
||||||
|
|
||||||
cit.close()
|
cit.close()
|
||||||
@@ -335,10 +380,11 @@ def add_itat():
|
|||||||
mat.save_from_itr(
|
mat.save_from_itr(
|
||||||
year=request.form["year"],
|
year=request.form["year"],
|
||||||
mat_created=float(request.form.get("mat_credit_created", 0)),
|
mat_created=float(request.form.get("mat_credit_created", 0)),
|
||||||
|
opening_balance=float(request.form.get("opening_balance", 0)),
|
||||||
mat_utilized=float(request.form.get("mat_credit_utilized", 0)),
|
mat_utilized=float(request.form.get("mat_credit_utilized", 0)),
|
||||||
remarks="Created via ITR"
|
remarks="Created via ITAT"
|
||||||
)
|
)
|
||||||
|
LogHelper.log_action("ITAT record added successfully!", data)
|
||||||
flash("ITAT record added successfully!", "success")
|
flash("ITAT record added successfully!", "success")
|
||||||
return redirect(url_for('display_itat'))
|
return redirect(url_for('display_itat'))
|
||||||
|
|
||||||
@@ -358,6 +404,16 @@ def update_itat(id):
|
|||||||
if request.method == 'POST':
|
if request.method == 'POST':
|
||||||
itat.update_itat(id, request.form)
|
itat.update_itat(id, request.form)
|
||||||
itat.close()
|
itat.close()
|
||||||
|
mat = MatCreditHandler()
|
||||||
|
mat.save_from_itr(
|
||||||
|
year=request.form["year"],
|
||||||
|
mat_created=float(request.form.get("mat_credit_created", 0)),
|
||||||
|
opening_balance=float(request.form.get("opening_balance", 0)),
|
||||||
|
mat_utilized=float(request.form.get("mat_credit_utilized", 0)),
|
||||||
|
remarks="Updated via ITAT"
|
||||||
|
)
|
||||||
|
|
||||||
|
LogHelper.log_action("ITAT Record Updated!", id)
|
||||||
flash("ITAT Record Updated!", "success")
|
flash("ITAT Record Updated!", "success")
|
||||||
return redirect(url_for('display_itat'))
|
return redirect(url_for('display_itat'))
|
||||||
|
|
||||||
@@ -370,6 +426,7 @@ def update_itat(id):
|
|||||||
def delete_itat(id):
|
def delete_itat(id):
|
||||||
itat = ITATHandler()
|
itat = ITATHandler()
|
||||||
itat.delete_itat_by_id(id)
|
itat.delete_itat_by_id(id)
|
||||||
|
LogHelper.log_action("itat record of by id:", id)
|
||||||
itat.close()
|
itat.close()
|
||||||
flash("ITAT Record Deleted!", "success")
|
flash("ITAT Record Deleted!", "success")
|
||||||
return redirect(url_for('display_itat'))
|
return redirect(url_for('display_itat'))
|
||||||
@@ -398,7 +455,7 @@ def itr_report():
|
|||||||
|
|
||||||
if output is None:
|
if output is None:
|
||||||
return "No records found for the selected year."
|
return "No records found for the selected year."
|
||||||
|
LogHelper.log_action("itr report download", selected_year)
|
||||||
return send_file(
|
return send_file(
|
||||||
output,
|
output,
|
||||||
mimetype='application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
|
mimetype='application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
|
||||||
@@ -425,7 +482,7 @@ def ao_report():
|
|||||||
|
|
||||||
if output is None:
|
if output is None:
|
||||||
return "No records found for the selected year."
|
return "No records found for the selected year."
|
||||||
|
LogHelper.log_action("ao report download", selected_year)
|
||||||
return send_file(
|
return send_file(
|
||||||
output,
|
output,
|
||||||
mimetype="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
mimetype="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
||||||
@@ -453,7 +510,7 @@ def cit_report():
|
|||||||
|
|
||||||
if output is None:
|
if output is None:
|
||||||
return "No records found for the selected year."
|
return "No records found for the selected year."
|
||||||
|
LogHelper.log_action("cit report download", selected_year)
|
||||||
return send_file(
|
return send_file(
|
||||||
output,
|
output,
|
||||||
mimetype='application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
|
mimetype='application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
|
||||||
@@ -482,7 +539,7 @@ def itat_report():
|
|||||||
|
|
||||||
if output is None:
|
if output is None:
|
||||||
return "No records found for the selected year."
|
return "No records found for the selected year."
|
||||||
|
LogHelper.log_action("itat report download", selected_year)
|
||||||
return send_file(
|
return send_file(
|
||||||
output,
|
output,
|
||||||
mimetype='application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
|
mimetype='application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
|
||||||
@@ -512,7 +569,7 @@ def download_summary():
|
|||||||
return "Year parameter is required", 400
|
return "Year parameter is required", 400
|
||||||
|
|
||||||
docHandler = DocumentHandler()
|
docHandler = DocumentHandler()
|
||||||
# reuse your existing Summary_report method
|
LogHelper.log_action("/summary/download | download summary sheet !",year_raw)
|
||||||
return docHandler.Summary_report(request=request)
|
return docHandler.Summary_report(request=request)
|
||||||
|
|
||||||
|
|
||||||
@@ -524,7 +581,7 @@ def download_summary():
|
|||||||
# table_name = data.get("table")
|
# table_name = data.get("table")
|
||||||
# year = data.get("year")
|
# year = data.get("year")
|
||||||
|
|
||||||
# check_year_obj = YearGet()
|
# check_year_obj = YearGet()ss
|
||||||
# result = check_year_obj.CheckYearExists(table_name, year)
|
# result = check_year_obj.CheckYearExists(table_name, year)
|
||||||
# check_year_obj.close()
|
# check_year_obj.close()
|
||||||
# return result
|
# return result
|
||||||
@@ -564,6 +621,7 @@ def mat_credit():
|
|||||||
utilization_map.setdefault(
|
utilization_map.setdefault(
|
||||||
u["mat_credit_id"], {}
|
u["mat_credit_id"], {}
|
||||||
)[u["utilized_year"]] = u["utilized_amount"]
|
)[u["utilized_year"]] = u["utilized_amount"]
|
||||||
|
LogHelper.log_action("/mat_credit| Save mat credit !",all_years)
|
||||||
|
|
||||||
return render_template(
|
return render_template(
|
||||||
"mat_credit.html",
|
"mat_credit.html",
|
||||||
@@ -579,6 +637,7 @@ def save_mat_row():
|
|||||||
mat = MatCreditHandler()
|
mat = MatCreditHandler()
|
||||||
try:
|
try:
|
||||||
mat.save_single(request.json)
|
mat.save_single(request.json)
|
||||||
|
LogHelper.log_action("/save_mat_row", "Save Mat row!")
|
||||||
return jsonify({"message": "Row saved successfully"})
|
return jsonify({"message": "Row saved successfully"})
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
return jsonify({"error": str(e)}), 500
|
return jsonify({"error": str(e)}), 500
|
||||||
@@ -602,6 +661,30 @@ def summary_preview_route():
|
|||||||
# except Exception as e:
|
# except Exception as e:
|
||||||
# return jsonify({"error": str(e)}), 500
|
# return jsonify({"error": str(e)}), 500
|
||||||
|
|
||||||
|
|
||||||
|
@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")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# run server
|
# run server
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
app.run(
|
app.run(
|
||||||
|
|||||||
@@ -11,3 +11,7 @@ openpyxl==3.1.2
|
|||||||
xlrd==2.0.1
|
xlrd==2.0.1
|
||||||
|
|
||||||
gunicorn==21.2.0
|
gunicorn==21.2.0
|
||||||
|
|
||||||
|
XlsxWriter==3.2.0
|
||||||
|
|
||||||
|
ldap3
|
||||||
@@ -1,11 +1,11 @@
|
|||||||
/* ================= PAGE WRAPPER ================= */
|
/* ================= PAGE WRAPPER ================= */
|
||||||
.main {
|
/* .main {
|
||||||
margin-left: 260px;
|
margin-left: 260px;
|
||||||
width: calc(100% - 260px);
|
width: calc(100% - 260px);
|
||||||
margin-top: 80px;
|
margin-top: 80px;
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
transition: all 0.3s ease;
|
transition: all 0.3s ease;
|
||||||
}
|
} */
|
||||||
|
|
||||||
/* ================= CONTAINER ================= */
|
/* ================= CONTAINER ================= */
|
||||||
.container {
|
.container {
|
||||||
@@ -98,12 +98,12 @@ button:hover {
|
|||||||
/* ================= MOBILE ================= */
|
/* ================= MOBILE ================= */
|
||||||
@media (max-width: 768px) {
|
@media (max-width: 768px) {
|
||||||
|
|
||||||
.main {
|
/* .main {
|
||||||
margin-left: 0;
|
margin-left: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: 15px;
|
padding: 15px;
|
||||||
margin-top: 70px;
|
margin-top: 70px;
|
||||||
}
|
} */
|
||||||
|
|
||||||
.container {
|
.container {
|
||||||
padding: 18px;
|
padding: 18px;
|
||||||
|
|||||||
@@ -1,24 +1,24 @@
|
|||||||
/* ================= RESET ================= */
|
/* ================= RESET ================= */
|
||||||
* {
|
/* * {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
font-family: "Segoe UI", sans-serif;
|
font-family: "Segoe UI", sans-serif;
|
||||||
}
|
} */
|
||||||
|
|
||||||
/* ================= BODY ================= */
|
/* ================= BODY ================= */
|
||||||
body {
|
/* body {
|
||||||
background-color: #f4f7f6;
|
background-color: #f4f7f6;
|
||||||
}
|
} */
|
||||||
|
|
||||||
/* ================= MAIN CONTENT ================= */
|
/* ================= MAIN CONTENT ================= */
|
||||||
.main {
|
/* .main {
|
||||||
margin-left: 260px;
|
margin-left: 260px;
|
||||||
padding: 30px;
|
padding: 30px;
|
||||||
width: calc(100% - 260px);
|
width: calc(100% - 260px);
|
||||||
margin-top: 80px;
|
margin-top: 80px;
|
||||||
transition: 0.3s;
|
transition: 0.3s;
|
||||||
}
|
} */
|
||||||
|
|
||||||
/* ================= CONTAINER ================= */
|
/* ================= CONTAINER ================= */
|
||||||
.container {
|
.container {
|
||||||
@@ -133,11 +133,11 @@ tr:nth-child(even) {
|
|||||||
/* ================= TABLET ================= */
|
/* ================= TABLET ================= */
|
||||||
@media (max-width: 992px) {
|
@media (max-width: 992px) {
|
||||||
|
|
||||||
.main {
|
/* .main {
|
||||||
margin-left: 0;
|
margin-left: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
}
|
} */
|
||||||
|
|
||||||
.container {
|
.container {
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
|
|||||||
@@ -177,7 +177,8 @@ body {
|
|||||||
|
|
||||||
.nav-left h3 {
|
.nav-left h3 {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
max-width: 160px;
|
/* max-width: 160px; */
|
||||||
|
max-width: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav-logo {
|
.nav-logo {
|
||||||
|
|||||||
@@ -108,18 +108,38 @@ a {
|
|||||||
width: calc(100% - 250px);
|
width: calc(100% - 250px);
|
||||||
height: calc(100vh - 60px);
|
height: calc(100vh - 60px);
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
flex-direction: column; /* 🔥 important */
|
||||||
/* ✅ vertical center */
|
padding: 20px 30px;
|
||||||
justify-content: center;
|
|
||||||
/* ✅ horizontal center */
|
|
||||||
padding: 30px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.main-top-bar {
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-start; /* or flex-end */
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Back button styling */
|
||||||
|
.back-btn {
|
||||||
|
padding: 8px 16px;
|
||||||
|
background-color: #6c757d;
|
||||||
|
color: #fff;
|
||||||
|
text-decoration: none;
|
||||||
|
border-radius: 6px;
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: 500;
|
||||||
|
transition: 0.2s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.back-btn:hover {
|
||||||
|
background-color: #545b62;
|
||||||
|
transform: translateY(-1px);
|
||||||
|
}
|
||||||
/* ================= CONTAINER ================= */
|
/* ================= CONTAINER ================= */
|
||||||
.container {
|
.container {
|
||||||
|
margin: auto; /* 🔥 centers card vertically & horizontally */
|
||||||
width: 100%;
|
width: 100%;
|
||||||
max-width: 680px;
|
max-width: 680px;
|
||||||
/* 🔥 laptop & desktop size */
|
|
||||||
background: #ffffff;
|
background: #ffffff;
|
||||||
padding: 45px 55px;
|
padding: 45px 55px;
|
||||||
border-radius: 14px;
|
border-radius: 14px;
|
||||||
@@ -220,6 +240,23 @@ button:hover {
|
|||||||
height: auto;
|
height: auto;
|
||||||
padding: 20px 15px;
|
padding: 20px 15px;
|
||||||
}
|
}
|
||||||
|
.toggle-btn {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar {
|
||||||
|
left: -100%;
|
||||||
|
width: 85%;
|
||||||
|
max-width: 280px;
|
||||||
|
transition: 0.3s;
|
||||||
|
z-index: 2000;
|
||||||
|
box-shadow: 4px 0 15px rgba(0,0,0,0.2);
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar.show {
|
||||||
|
left: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
.container {
|
.container {
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
|
|||||||
105
static/index.css
105
static/index.css
@@ -1,105 +0,0 @@
|
|||||||
body {
|
|
||||||
font-family: Arial, sans-serif;
|
|
||||||
background-color: #f2f6fc;
|
|
||||||
margin: 0;
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.container {
|
|
||||||
max-width: 800px;
|
|
||||||
margin: 40px auto;
|
|
||||||
padding: 30px;
|
|
||||||
background-color: #ffffff;
|
|
||||||
border-radius: 12px;
|
|
||||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
|
|
||||||
}
|
|
||||||
|
|
||||||
h2 {
|
|
||||||
text-align: center;
|
|
||||||
color: #333;
|
|
||||||
margin-bottom: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
form label {
|
|
||||||
display: block;
|
|
||||||
margin-top: 15px;
|
|
||||||
font-weight: 500;
|
|
||||||
color: #444;
|
|
||||||
}
|
|
||||||
|
|
||||||
form input[type="number"] {
|
|
||||||
width: 100%;
|
|
||||||
padding: 8px 10px;
|
|
||||||
margin-top: 5px;
|
|
||||||
border: 1px solid #ccc;
|
|
||||||
border-radius: 6px;
|
|
||||||
font-size: 14px;
|
|
||||||
}
|
|
||||||
|
|
||||||
form button {
|
|
||||||
margin-top: 25px;
|
|
||||||
background-color: #007BFF;
|
|
||||||
color: white;
|
|
||||||
padding: 12px 20px;
|
|
||||||
border: none;
|
|
||||||
border-radius: 6px;
|
|
||||||
font-size: 16px;
|
|
||||||
cursor: pointer;
|
|
||||||
width: 100%;
|
|
||||||
transition: background-color 0.3s ease;
|
|
||||||
}
|
|
||||||
|
|
||||||
form button:hover {
|
|
||||||
background-color: #0056b3;
|
|
||||||
}
|
|
||||||
|
|
||||||
input[type="file"] {
|
|
||||||
padding: 10px 12px;
|
|
||||||
border: 1px solid #ccc;
|
|
||||||
border-radius: 6px;
|
|
||||||
font-size: 16px;
|
|
||||||
transition: border-color 0.3s ease;
|
|
||||||
}
|
|
||||||
|
|
||||||
input[type="file"]:focus {
|
|
||||||
border-color: #007BFF;
|
|
||||||
outline: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* Back button styling */
|
|
||||||
.back-btn {
|
|
||||||
display: inline-block;
|
|
||||||
margin-bottom: 20px;
|
|
||||||
padding: 10px 18px;
|
|
||||||
background: #6c757d;
|
|
||||||
color: white;
|
|
||||||
font-size: 15px;
|
|
||||||
font-weight: 600;
|
|
||||||
border-radius: 6px;
|
|
||||||
text-decoration: none;
|
|
||||||
transition: background 0.3s ease;
|
|
||||||
}
|
|
||||||
|
|
||||||
.back-btn:hover {
|
|
||||||
background: #5a6268;
|
|
||||||
}
|
|
||||||
|
|
||||||
.form-group select {
|
|
||||||
width: 100%;
|
|
||||||
padding: 10px 12px;
|
|
||||||
border: 1px solid #cbd3da;
|
|
||||||
border-radius: 8px;
|
|
||||||
font-size: 16px;
|
|
||||||
background-color: #fdfdfd;
|
|
||||||
height: 40px;
|
|
||||||
cursor: pointer;
|
|
||||||
transition: all 0.25s ease-in-out;
|
|
||||||
}
|
|
||||||
|
|
||||||
.form-group select:focus {
|
|
||||||
border-color: #007BFF;
|
|
||||||
background: #ffffff;
|
|
||||||
box-shadow: 0 0 8px rgba(0, 123, 255, 0.25);
|
|
||||||
outline: none;
|
|
||||||
}
|
|
||||||
@@ -18,7 +18,6 @@ document.addEventListener("DOMContentLoaded", function () {
|
|||||||
// -- 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;
|
||||||
setValue("gti_as_per_ao", gross_total);
|
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");
|
||||||
|
|||||||
@@ -13,11 +13,11 @@ document.addEventListener("DOMContentLoaded", function () {
|
|||||||
// ---- Track last edited field for Tax(A) ----
|
// ---- Track last edited field for Tax(A) ----
|
||||||
let lastEditedTaxA = null;
|
let lastEditedTaxA = null;
|
||||||
|
|
||||||
document.getElementsByName("per_a")[0].addEventListener("input", () => {
|
document.getElementsByName("per_tax_a")[0].addEventListener("input", () => {
|
||||||
lastEditedTaxA = "percentage";
|
lastEditedTaxA = "percentage";
|
||||||
});
|
});
|
||||||
|
|
||||||
document.getElementsByName("tax_30_percent")[0].addEventListener("input", () => {
|
document.getElementsByName("tax_a_cal")[0].addEventListener("input", () => {
|
||||||
lastEditedTaxA = "amount";
|
lastEditedTaxA = "amount";
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -44,47 +44,47 @@ document.addEventListener("DOMContentLoaded", function () {
|
|||||||
setValue("net_taxable_income", net_taxable_income);
|
setValue("net_taxable_income", net_taxable_income);
|
||||||
|
|
||||||
// ================= TAX (A) – TWO WAY =================
|
// ================= TAX (A) – TWO WAY =================
|
||||||
var per_a = getValue("per_a");
|
var per_tax_a = getValue("per_tax_a");
|
||||||
var tax30 = getValue("tax_30_percent");
|
var tax_a_cal = getValue("tax_a_cal");
|
||||||
|
|
||||||
if (net_taxable_income > 0) {
|
if (net_taxable_income > 0) {
|
||||||
if (lastEditedTaxA === "percentage") {
|
if (lastEditedTaxA === "percentage") {
|
||||||
tax30 = net_taxable_income * (per_a / 100);
|
tax_a_cal = net_taxable_income * (per_tax_a / 100);
|
||||||
setValue("tax_30_percent", tax30);
|
setValue("tax_a_cal", tax_a_cal);
|
||||||
}
|
}
|
||||||
else if (lastEditedTaxA === "amount") {
|
else if (lastEditedTaxA === "amount") {
|
||||||
per_a = (tax30 / net_taxable_income) * 100;
|
per_tax_a = (tax_a_cal / net_taxable_income) * 100;
|
||||||
setValue("per_a", per_a);
|
setValue("per_tax_a", per_tax_a);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var per_surcharge_a = getValue("per_surcharge_a");
|
var per_surcharge_a = getValue("per_surcharge_a");
|
||||||
var surcharge_a = tax30 * (per_surcharge_a / 100);
|
var surcharge_a_cal = tax_a_cal * (per_surcharge_a / 100);
|
||||||
setValue("surcharge_a", surcharge_a);
|
setValue("surcharge_a_cal", surcharge_a_cal);
|
||||||
|
|
||||||
var per_cess_a = getValue("per_cess_a");
|
var per_cess_a = getValue("per_cess_a");
|
||||||
var edu_cess_a = (tax30 + surcharge_a) * (per_cess_a / 100);
|
var edu_cess_a_cal = (tax_a_cal + surcharge_a_cal) * (per_cess_a / 100);
|
||||||
setValue("edu_cess_a", edu_cess_a);
|
setValue("edu_cess_a_cal", edu_cess_a_cal);
|
||||||
|
|
||||||
var sum_of_a = tax30 + surcharge_a + edu_cess_a;
|
var sum_of_a = tax_a_cal + surcharge_a_cal + edu_cess_a_cal;
|
||||||
setValue("sum_of_a", sum_of_a);
|
setValue("sum_of_a", sum_of_a);
|
||||||
|
|
||||||
// ================= TAX (B) =================
|
// ================= TAX (B) =================
|
||||||
var tax185 = getValue("tax_book_profit_18_5");
|
var tax_b_cal = getValue("tax_b_cal");
|
||||||
|
|
||||||
var per_surcharge_b = getValue("per_surcharge_b");
|
var per_surcharge_b = getValue("per_surcharge_b");
|
||||||
var surcharge_b = tax185 * (per_surcharge_b / 100);
|
var surcharge_b_cal = tax_b_cal * (per_surcharge_b / 100);
|
||||||
setValue("surcharge_b", surcharge_b);
|
setValue("surcharge_b_cal", surcharge_b_cal);
|
||||||
|
|
||||||
var per_cess_b = getValue("per_cess_b");
|
var per_cess_b = getValue("per_cess_b");
|
||||||
var edu_cess_b = (tax185 + surcharge_b) * (per_cess_b / 100);
|
var edu_cess_b_cal = (tax_b_cal + surcharge_b_cal) * (per_cess_b / 100);
|
||||||
setValue("edu_cess_b", edu_cess_b);
|
setValue("edu_cess_b_cal", edu_cess_b_cal);
|
||||||
|
|
||||||
var sum_of_b = tax185 + surcharge_b + edu_cess_b;
|
var sum_of_b = tax_b_cal + surcharge_b_cal + edu_cess_b_cal;
|
||||||
setValue("sum_of_b", sum_of_b);
|
setValue("sum_of_b", sum_of_b);
|
||||||
|
|
||||||
// ================= TAX PAYABLE =================
|
// ================= TAX PAYABLE =================
|
||||||
var tax_payable = (sum_of_a > sum_of_b) ? tax30 : tax185;
|
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);
|
||||||
|
|
||||||
var total_tax_payable = (sum_of_a > sum_of_b) ? sum_of_a : sum_of_b;
|
var total_tax_payable = (sum_of_a > sum_of_b) ? sum_of_a : sum_of_b;
|
||||||
|
|||||||
@@ -62,8 +62,10 @@ function addRow() {
|
|||||||
tr.innerHTML = `
|
tr.innerHTML = `
|
||||||
<td contenteditable="true"></td>
|
<td contenteditable="true"></td>
|
||||||
<td><input></td>
|
<td><input></td>
|
||||||
|
<td><input></td>
|
||||||
${utilizedCols}
|
${utilizedCols}
|
||||||
<td><input></td>
|
<td><input></td>
|
||||||
|
<td><input></td>
|
||||||
<td>
|
<td>
|
||||||
<button onclick="saveRow(this)">Save</button>
|
<button onclick="saveRow(this)">Save</button>
|
||||||
</td>
|
</td>
|
||||||
@@ -88,6 +90,7 @@ function saveRow(btn) {
|
|||||||
let payload = {
|
let payload = {
|
||||||
financial_year: financialYear,
|
financial_year: financialYear,
|
||||||
mat_credit: inputs[0].value || 0,
|
mat_credit: inputs[0].value || 0,
|
||||||
|
opening_balance: inputs[1].value || 0,
|
||||||
balance: inputs[inputs.length - 1].value || 0,
|
balance: inputs[inputs.length - 1].value || 0,
|
||||||
utilization: []
|
utilization: []
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
{% 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(AO) Form</h2>
|
||||||
<form id="ao" method="POST" enctype="multipart/form-data">
|
<form id="ao" method="POST" enctype="multipart/form-data">
|
||||||
<input type="hidden" name="stage" value="ao">
|
<input type="hidden" name="stage" value="ao">
|
||||||
<div class="form-group full-width inline-2">
|
<div class="form-group full-width inline-2">
|
||||||
@@ -86,22 +86,20 @@
|
|||||||
<div class="form-group full-width inline-2">
|
<div class="form-group full-width inline-2">
|
||||||
<div>
|
<div>
|
||||||
<label>Enter Percentage(%) calculate: Tax(A):</label>
|
<label>Enter Percentage(%) calculate: Tax(A):</label>
|
||||||
<input type="number" name="per_a" step="any" value="0.00" oninput="calculate()">
|
<input type="number" name="per_tax_a" step="any" value="0.00" oninput="calculate()">
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label>Tax @(A):</label>
|
<label>Tax @(A):</label>
|
||||||
<input type="number" name="tax_a" class="auto" step="any" value="0.00" oninput="calculate()" readonly>
|
<input type="number" name="tax_a_cal" step="any" value="0.00" oninput="calculate()">
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label>Enter Percentage(%) calculate: Tax(B):</label>
|
<label>Enter Percentage(%) calculate: Tax(B):</label>
|
||||||
<input type="number" name="per_b" step="any" value="0.00" placeholder="Field Currently Unavailable"
|
<input type="number" name="per_tax_b" step="any" value="0.00" oninput="calculate()">
|
||||||
oninput="calculate()">
|
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label>Tax @ on Book Profit(B):</label>
|
<label>Tax @ 18.5% on Book Profit (B):</label>
|
||||||
<input type="number" name="tax_book_profit" 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>
|
||||||
|
|
||||||
<div class="form-group full-width inline-2">
|
<div class="form-group full-width inline-2">
|
||||||
@@ -111,7 +109,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label>Surcharge on Tax(A):</label>
|
<label>Surcharge on Tax(A):</label>
|
||||||
<input type="number" name="surcharge_a" class="auto" value="0.00" readonly>
|
<input type="number" name="surcharge_a_cal" class="auto" value="0.00" readonly>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
@@ -120,7 +118,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label>Surcharge on Tax(B):</label>
|
<label>Surcharge on Tax(B):</label>
|
||||||
<input type="number" name="surcharge_b" class="auto" value="0.00" readonly>
|
<input type="number" name="surcharge_b_cal" class="auto" value="0.00" readonly>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -131,7 +129,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label>Education Cess:Tax(A): </label>
|
<label>Education Cess:Tax(A): </label>
|
||||||
<input type="number" name="edu_cess_a" class="auto" step="any" value="0.00" readonly>
|
<input type="number" name="edu_cess_a_cal" class="auto" step="any" value="0.00" readonly>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label>Enter Percentage(%) Cess:Tax(B):</label>
|
<label>Enter Percentage(%) Cess:Tax(B):</label>
|
||||||
@@ -139,7 +137,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label>Education Cess:Tax(B): </label>
|
<label>Education Cess:Tax(B): </label>
|
||||||
<input type="number" name="edu_cess_b" class="auto" step="any" value="0.00" readonly>
|
<input type="number" name="edu_cess_b_cal" class="auto" step="any" value="0.00" readonly>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group full-width inline-2">
|
<div class="form-group full-width inline-2">
|
||||||
@@ -231,6 +229,7 @@
|
|||||||
<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 full-width inline-2">
|
<div class="form-group full-width inline-2">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Add : Interest u/s 244A as per 143:</label>
|
<label>Add : Interest u/s 244A as per 143:</label>
|
||||||
@@ -264,6 +263,6 @@
|
|||||||
{% 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 %}
|
||||||
@@ -45,7 +45,7 @@
|
|||||||
<div class="form-group full-width inline-2">
|
<div class="form-group full-width inline-2">
|
||||||
<div>
|
<div>
|
||||||
<label>GTI as per CIT</label>
|
<label>GTI as per CIT</label>
|
||||||
<input type="number" name="gti_as_per_cit" class="auto" step="any" value="0.00" readonly>
|
<input type="number" name="gti_as_per_ao" class="auto" step="any" value="0.00" readonly>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -87,20 +87,19 @@
|
|||||||
<div class="form-group full-width inline-2">
|
<div class="form-group full-width inline-2">
|
||||||
<div>
|
<div>
|
||||||
<label>Enter Percentage(%) calculate: Tax(A):</label>
|
<label>Enter Percentage(%) calculate: Tax(A):</label>
|
||||||
<input type="number" name="per_a" step="any" value="0.00" oninput="calculate()">
|
<input type="number" name="per_tax_a" step="any" value="0.00" oninput="calculate()">
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label>Tax @(A):</label>
|
<label>Tax @(A):</label>
|
||||||
<input type="number" name="tax_30_percent" class="auto" step="any" value="0.00" oninput="calculate()"
|
<input type="number" name="tax_a_cal" step="any" value="0.00" oninput="calculate()">
|
||||||
readonly>
|
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label>Enter Percentage(%) calculate: Tax(B):</label>
|
<label>Enter Percentage(%) calculate: Tax(B):</label>
|
||||||
<input type="number" name="per_b" step="any" value="0.00" oninput="calculate()">
|
<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>
|
||||||
|
|
||||||
@@ -111,7 +110,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label>Surcharge on Tax(A):</label>
|
<label>Surcharge on Tax(A):</label>
|
||||||
<input type="number" name="surcharge_a" class="auto" value="0.00" readonly>
|
<input type="number" name="surcharge_a_cal" class="auto" value="0.00" readonly>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
@@ -120,7 +119,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label>Surcharge on Tax(B):</label>
|
<label>Surcharge on Tax(B):</label>
|
||||||
<input type="number" name="surcharge_b" class="auto" value="0.00" readonly>
|
<input type="number" name="surcharge_b_cal" class="auto" value="0.00" readonly>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -131,7 +130,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label>Education Cess:Tax(A): </label>
|
<label>Education Cess:Tax(A): </label>
|
||||||
<input type="number" name="edu_cess_a" class="auto" step="any" value="0.00" readonly>
|
<input type="number" name="edu_cess_a_cal" class="auto" step="any" value="0.00" readonly>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label>Enter Percentage(%) Cess:Tax(B):</label>
|
<label>Enter Percentage(%) Cess:Tax(B):</label>
|
||||||
@@ -139,7 +138,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label>Education Cess:Tax(B): </label>
|
<label>Education Cess:Tax(B): </label>
|
||||||
<input type="number" name="edu_cess_b" class="auto" step="any" value="0.00" readonly>
|
<input type="number" name="edu_cess_b_cal" class="auto" step="any" value="0.00" readonly>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
{% 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(ITAT) Form</h2>
|
||||||
<form id="itat" method="POST" enctype="multipart/form-data" onsubmit="return showSuccessMessage()">
|
<form id="itat" method="POST" enctype="multipart/form-data" onsubmit="return showSuccessMessage()">
|
||||||
<input type="hidden" name="stage" value="itr">
|
<input type="hidden" name="stage" value="itr">
|
||||||
<div class="form-group full-width inline-2">
|
<div class="form-group full-width inline-2">
|
||||||
@@ -88,20 +88,19 @@
|
|||||||
<div class="form-group full-width inline-2">
|
<div class="form-group full-width inline-2">
|
||||||
<div>
|
<div>
|
||||||
<label>Enter Percentage(%) calculate: Tax(A):</label>
|
<label>Enter Percentage(%) calculate: Tax(A):</label>
|
||||||
<input type="number" name="per_a" step="any" value="0.00" oninput="calculate()">
|
<input type="number" name="per_tax_a" step="any" value="0.00" oninput="calculate()">
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label>Tax @(A):</label>
|
<label>Tax @(A):</label>
|
||||||
<input type="number" name="tax_30_percent" class="auto" step="any" value="0.00" oninput="calculate()"
|
<input type="number" name="tax_a_cal" step="any" value="0.00" oninput="calculate()">
|
||||||
readonly>
|
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label>Enter Percentage(%) calculate: Tax(B):</label>
|
<label>Enter Percentage(%) calculate: Tax(B):</label>
|
||||||
<input type="number" name="per_b" step="any" value="0.00" oninput="calculate()">
|
<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>
|
||||||
|
|
||||||
@@ -112,17 +111,19 @@
|
|||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label>Surcharge on Tax(A):</label>
|
<label>Surcharge on Tax(A):</label>
|
||||||
<input type="number" name="surcharge_a" class="auto" value="0.00" readonly>
|
<input type="number" name="surcharge_a_cal" class="auto" value="0.00" readonly>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<label>Enter Percentage(%) Surcharge:Tax(B)</label>
|
<label>Enter Percentage(%) Surcharge:Tax(B)</label>
|
||||||
<input type="number" name="per_surcharge_b" step="any" value="0.00" oninput="calculate()">
|
<input type="number" name="per_surcharge_b" step="any" value="0.00" oninput="calculate()">
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label>Surcharge on Tax(B):</label>
|
<label>Surcharge on Tax(B):</label>
|
||||||
<input type="number" name="surcharge_b" class="auto" value="0.00" readonly>
|
<input type="number" name="surcharge_b_cal" class="auto" value="0.00" readonly>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group full-width inline-2">
|
<div class="form-group full-width inline-2">
|
||||||
<div>
|
<div>
|
||||||
<label>Enter Percentage(%) Cess:Tax(A):</label>
|
<label>Enter Percentage(%) Cess:Tax(A):</label>
|
||||||
@@ -130,7 +131,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label>Education Cess:Tax(A): </label>
|
<label>Education Cess:Tax(A): </label>
|
||||||
<input type="number" name="edu_cess_a" class="auto" step="any" value="0.00" readonly>
|
<input type="number" name="edu_cess_a_cal" class="auto" step="any" value="0.00" readonly>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label>Enter Percentage(%) Cess:Tax(B):</label>
|
<label>Enter Percentage(%) Cess:Tax(B):</label>
|
||||||
@@ -138,9 +139,10 @@
|
|||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label>Education Cess:Tax(B): </label>
|
<label>Education Cess:Tax(B): </label>
|
||||||
<input type="number" name="edu_cess_b" class="auto" step="any" value="0.00" readonly>
|
<input type="number" name="edu_cess_b_cal" class="auto" step="any" value="0.00" readonly>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group full-width inline-2">
|
<div class="form-group full-width inline-2">
|
||||||
<div>
|
<div>
|
||||||
<label>Total cal Tax(A): </label>
|
<label>Total cal Tax(A): </label>
|
||||||
|
|||||||
@@ -86,19 +86,19 @@
|
|||||||
<div class="form-group full-width inline-2">
|
<div class="form-group full-width inline-2">
|
||||||
<div>
|
<div>
|
||||||
<label>Enter Percentage(%) calculate: Tax(A):</label>
|
<label>Enter Percentage(%) calculate: Tax(A):</label>
|
||||||
<input type="number" name="per_a" step="any" value="0.00" oninput="calculate()">
|
<input type="number" name="per_tax_a" step="any" value="0.00" oninput="calculate()">
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label>Tax @(A):</label>
|
<label>Tax @(A):</label>
|
||||||
<input type="number" name="tax_30_percent" step="any" value="0.00" oninput="calculate()">
|
<input type="number" name="tax_a_cal" step="any" value="0.00" oninput="calculate()">
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label>Enter Percentage(%) calculate: Tax(B):</label>
|
<label>Enter Percentage(%) calculate: Tax(B):</label>
|
||||||
<input type="number" name="per_b" step="any" value="0.00" oninput="calculate()">
|
<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>
|
||||||
|
|
||||||
@@ -109,7 +109,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label>Surcharge on Tax(A):</label>
|
<label>Surcharge on Tax(A):</label>
|
||||||
<input type="number" name="surcharge_a" class="auto" value="0.00" readonly>
|
<input type="number" name="surcharge_a_cal" class="auto" value="0.00" readonly>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
@@ -118,7 +118,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label>Surcharge on Tax(B):</label>
|
<label>Surcharge on Tax(B):</label>
|
||||||
<input type="number" name="surcharge_b" class="auto" value="0.00" readonly>
|
<input type="number" name="surcharge_b_cal" class="auto" value="0.00" readonly>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -129,7 +129,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label>Education Cess:Tax(A): </label>
|
<label>Education Cess:Tax(A): </label>
|
||||||
<input type="number" name="edu_cess_a" class="auto" step="any" value="0.00" readonly>
|
<input type="number" name="edu_cess_a_cal" class="auto" step="any" value="0.00" readonly>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label>Enter Percentage(%) Cess:Tax(B):</label>
|
<label>Enter Percentage(%) Cess:Tax(B):</label>
|
||||||
@@ -137,9 +137,10 @@
|
|||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label>Education Cess:Tax(B): </label>
|
<label>Education Cess:Tax(B): </label>
|
||||||
<input type="number" name="edu_cess_b" class="auto" step="any" value="0.00" readonly>
|
<input type="number" name="edu_cess_b_cal" class="auto" step="any" value="0.00" readonly>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group full-width inline-2">
|
<div class="form-group full-width inline-2">
|
||||||
<div>
|
<div>
|
||||||
<label>Total cal Tax(A): </label>
|
<label>Total cal Tax(A): </label>
|
||||||
@@ -171,7 +172,7 @@
|
|||||||
|
|
||||||
<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>Add :Mat Credit Created:</label>
|
||||||
<input type="number" name="mat_credit_created" step="any" value="0.00" oninput="calculate()" required>
|
<input type="number" name="mat_credit_created" step="any" value="0.00" oninput="calculate()" required>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
|
|||||||
@@ -7,8 +7,13 @@
|
|||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
<div class="main-top-bar">
|
||||||
|
<a href="{{ url_for('reports') }}" class="back-btn">
|
||||||
|
← Back to Reports
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<h2>Download AO Report</h2>
|
<h2>Download Assessing Officer(AO) Report</h2>
|
||||||
<form method="GET" action="{{ url_for('ao_report') }}" target="_blank">
|
<form method="GET" action="{{ url_for('ao_report') }}" target="_blank">
|
||||||
<label for="year">Select Year:</label><br>
|
<label for="year">Select Year:</label><br>
|
||||||
<select name="year" id="year" required>
|
<select name="year" id="year" required>
|
||||||
|
|||||||
@@ -7,6 +7,11 @@
|
|||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
<div class="main-top-bar">
|
||||||
|
<a href="{{ url_for('reports') }}" class="back-btn">
|
||||||
|
← Back to Reports
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<h2>Download CIT Report</h2>
|
<h2>Download CIT Report</h2>
|
||||||
<form method="GET" action="{{ url_for('cit_report') }}" target="_blank">
|
<form method="GET" action="{{ url_for('cit_report') }}" target="_blank">
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<h2 style="text-align: center;">Assessing Officer Records 👨💼</h2>
|
<h2 style="text-align: center;">Assessing Officer(AO) Records 👨💼</h2>
|
||||||
<!-- Add AO Record Button -->
|
<!-- Add AO Record Button -->
|
||||||
<div style="text-align: right; margin-bottom: 10px;">
|
<div style="text-align: right; margin-bottom: 10px;">
|
||||||
<a href="{{ url_for('add_ao') }}" class="btn btn-add">➕ Add AO Record</a>
|
<a href="{{ url_for('add_ao') }}" class="btn btn-add">➕ Add AO Record</a>
|
||||||
@@ -22,6 +22,7 @@
|
|||||||
<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>Created Record Date</th>
|
||||||
<th>Actions</th>
|
<th>Actions</th>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -32,7 +33,8 @@
|
|||||||
<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>{{ 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"
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<h2 style="text-align: center;">Income Tax Appellate Tribunal Records 📄</h2>
|
<h2 style="text-align: center;">Income Income Tax Appellate Tribunal(ITAT) Records 📄</h2>
|
||||||
<div style="text-align: right; margin-bottom: 10px;">
|
<div style="text-align: right; margin-bottom: 10px;">
|
||||||
|
|
||||||
<a href="{{ url_for('add_itat') }}" class="btn btn-add">➕ Add New Record</a>
|
<a href="{{ url_for('add_itat') }}" class="btn btn-add">➕ Add New Record</a>
|
||||||
@@ -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>
|
||||||
|
|
||||||
|
|||||||
@@ -7,8 +7,13 @@
|
|||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
<div class="main-top-bar">
|
||||||
|
<a href="{{ url_for('reports') }}" class="back-btn">
|
||||||
|
← Back to Reports
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<h2>Download ITAT Report</h2>
|
<h2>Download Income Tax Appellate Tribunal(ITAT) Report</h2>
|
||||||
<form method="GET" action="{{ url_for('itat_report') }}" target="_blank">
|
<form method="GET" action="{{ url_for('itat_report') }}" target="_blank">
|
||||||
<label for="year">Select Year:</label><br>
|
<label for="year">Select Year:</label><br>
|
||||||
<select name="year" id="year" required>
|
<select name="year" id="year" required>
|
||||||
|
|||||||
@@ -7,8 +7,13 @@
|
|||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
<div class="main-top-bar">
|
||||||
|
<a href="{{ url_for('reports') }}" class="back-btn">
|
||||||
|
← Back to Reports
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<h2>Download ITR Report</h2>
|
<h2>Download Income Tax Return(ITR) Report</h2>
|
||||||
<form method="GET" action="{{ url_for('itr_report') }}" target="_blank">
|
<form method="GET" action="{{ url_for('itr_report') }}" target="_blank">
|
||||||
<label for="year">Select Year:</label><br>
|
<label for="year">Select Year:</label><br>
|
||||||
<select name="year" id="year" required>
|
<select name="year" id="year" required>
|
||||||
|
|||||||
@@ -29,12 +29,14 @@
|
|||||||
<tr id="tableHeader">
|
<tr id="tableHeader">
|
||||||
<th>AY</th>
|
<th>AY</th>
|
||||||
<th>MAT Credit</th>
|
<th>MAT Credit</th>
|
||||||
|
<th>Opening balance</th>
|
||||||
|
|
||||||
{% for y in added_years %}
|
{% for y in added_years %}
|
||||||
<th>Utilized {{ y }}</th>
|
<th>Utilized {{ y }}</th>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
<th>Balance</th>
|
<th>Closing Balance</th>
|
||||||
|
<th>Remarks</th>
|
||||||
<th>Action</th>
|
<th>Action</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
@@ -44,6 +46,7 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td contenteditable="false">{{ row.financial_year }}-{{ row.financial_year | int + 1 }}</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>
|
||||||
|
<td><input value="{{ row.opening_balance }}"></td>
|
||||||
|
|
||||||
{% for y in added_years %}
|
{% for y in added_years %}
|
||||||
<td>
|
<td>
|
||||||
@@ -52,6 +55,7 @@
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
<td><input value="{{ row.balance }}"></td>
|
<td><input value="{{ row.balance }}"></td>
|
||||||
|
<td><input value="{{ row.remarks }}"></td>
|
||||||
<td><button onclick="saveRow(this)">Save</button></td>
|
<td><button onclick="saveRow(this)">Save</button></td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|||||||
@@ -8,10 +8,10 @@
|
|||||||
<div class="container">
|
<div class="container">
|
||||||
<h2>Reports</h2>
|
<h2>Reports</h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="{{ url_for('itr_report') }}">→ View ITR Reports</a></li>
|
<li><a href="{{ url_for('itr_report') }}">→ View Income Tax Return(ITR) Reports</a></li>
|
||||||
<li><a href="{{ url_for('ao_report') }}">→ View AO Reports</a></li>
|
<li><a href="{{ url_for('ao_report') }}">→ View Assessing Officer(AO) Reports</a></li>
|
||||||
<li><a href="{{ url_for('cit_report') }}">→ View CIT Reports</a></li>
|
<li><a href="{{ url_for('cit_report') }}">→ View CIT Reports</a></li>
|
||||||
<li><a href="{{ url_for('itat_report') }}">→ View ITAT Reports</a></li>
|
<li><a href="{{ url_for('itat_report') }}">→ View Income Tax Appellate Tribunal(ITAT) Reports</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
@@ -1,169 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html>
|
|
||||||
|
|
||||||
<head>
|
|
||||||
<title>{{ stage }} Reports</title>
|
|
||||||
<link rel="stylesheet" href="{{ url_for('static', filename='index.css') }}">
|
|
||||||
<style>
|
|
||||||
body {
|
|
||||||
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
|
||||||
background-color: #f0f2f5;
|
|
||||||
margin: 0;
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.container {
|
|
||||||
max-width: 960px;
|
|
||||||
margin: 40px auto;
|
|
||||||
padding: 30px;
|
|
||||||
background-color: #fff;
|
|
||||||
border-radius: 12px;
|
|
||||||
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
|
|
||||||
}
|
|
||||||
|
|
||||||
h2 {
|
|
||||||
color: #333;
|
|
||||||
text-align: center;
|
|
||||||
margin-bottom: 30px;
|
|
||||||
font-size: 28px;
|
|
||||||
}
|
|
||||||
|
|
||||||
form {
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
gap: 15px;
|
|
||||||
margin-bottom: 30px;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
}
|
|
||||||
|
|
||||||
label {
|
|
||||||
font-weight: 600;
|
|
||||||
font-size: 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
select {
|
|
||||||
padding: 8px 14px;
|
|
||||||
font-size: 16px;
|
|
||||||
border: 1px solid #ccc;
|
|
||||||
border-radius: 6px;
|
|
||||||
outline: none;
|
|
||||||
transition: border 0.2s;
|
|
||||||
}
|
|
||||||
|
|
||||||
select:focus {
|
|
||||||
border-color: #007bff;
|
|
||||||
}
|
|
||||||
|
|
||||||
table {
|
|
||||||
width: 100%;
|
|
||||||
border-collapse: collapse;
|
|
||||||
margin-top: 20px;
|
|
||||||
font-size: 15px;
|
|
||||||
}
|
|
||||||
|
|
||||||
th,
|
|
||||||
td {
|
|
||||||
padding: 12px;
|
|
||||||
border: 1px solid #ddd;
|
|
||||||
text-align: left;
|
|
||||||
}
|
|
||||||
|
|
||||||
th {
|
|
||||||
background-color: #007bff;
|
|
||||||
color: white;
|
|
||||||
}
|
|
||||||
|
|
||||||
tr:nth-child(even) td {
|
|
||||||
background-color: #f9fbfc;
|
|
||||||
}
|
|
||||||
|
|
||||||
tr:hover td {
|
|
||||||
background-color: #eef5ff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.btn-download {
|
|
||||||
background-color: #28a745;
|
|
||||||
color: white;
|
|
||||||
border: none;
|
|
||||||
padding: 7px 14px;
|
|
||||||
border-radius: 5px;
|
|
||||||
text-decoration: none;
|
|
||||||
font-size: 14px;
|
|
||||||
cursor: pointer;
|
|
||||||
transition: background-color 0.2s;
|
|
||||||
}
|
|
||||||
|
|
||||||
.btn-download:hover {
|
|
||||||
background-color: #218838;
|
|
||||||
}
|
|
||||||
|
|
||||||
.no-data {
|
|
||||||
text-align: center;
|
|
||||||
color: #777;
|
|
||||||
font-size: 16px;
|
|
||||||
margin-top: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Back button styling */
|
|
||||||
.back-btn {
|
|
||||||
display: inline-block;
|
|
||||||
margin-bottom: 20px;
|
|
||||||
padding: 10px 18px;
|
|
||||||
background: #6c757d;
|
|
||||||
color: white;
|
|
||||||
font-size: 15px;
|
|
||||||
font-weight: 600;
|
|
||||||
border-radius: 6px;
|
|
||||||
text-decoration: none;
|
|
||||||
transition: background 0.3s ease;
|
|
||||||
}
|
|
||||||
|
|
||||||
.back-btn:hover {
|
|
||||||
background: #5a6268;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body>
|
|
||||||
<div class="container">
|
|
||||||
|
|
||||||
<h2>{{ stage }} Reports</h2>
|
|
||||||
|
|
||||||
<form method="GET">
|
|
||||||
<input type="hidden" name="stage" value="{{ stage }}">
|
|
||||||
<label for="year">Select Year:</label>
|
|
||||||
<select name="year" id="year" onchange="this.form.submit()">
|
|
||||||
<option value="">-- All Years --</option>
|
|
||||||
{% for y in years %}
|
|
||||||
<option value="{{ y }}" {% if y==request.args.get('year') %}selected{% endif %}>{{ y }}</option>
|
|
||||||
{% endfor %}
|
|
||||||
</select>
|
|
||||||
</form>
|
|
||||||
|
|
||||||
{% if documents %}
|
|
||||||
<table>
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th>Year</th>
|
|
||||||
<th>Action</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
{% for doc in documents %}
|
|
||||||
<tr>
|
|
||||||
<td>{{ doc.year }}</td>
|
|
||||||
<td>
|
|
||||||
<a class="btn-download" href="{{ url_for('download_report', doc_id=doc.id) }}">Download</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
{% endfor %}
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
{% else %}
|
|
||||||
<p class="no-data">No reports found for this selection.</p>
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
|
|
||||||
</html>
|
|
||||||
@@ -8,13 +8,24 @@
|
|||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<h2>Update AO Record for Year {{ record.year }} - {{ record.year + 1 }}</h2>
|
<h2>Update Assessing Officer(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">
|
||||||
@@ -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>
|
||||||
@@ -64,49 +84,110 @@
|
|||||||
<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>
|
||||||
|
<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 }}"
|
||||||
@@ -117,6 +198,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 }}"
|
||||||
@@ -134,8 +223,8 @@
|
|||||||
<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>
|
||||||
@@ -155,34 +244,36 @@
|
|||||||
<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>
|
</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="{{ 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">
|
<div class="form-group">
|
||||||
<label>Remarks:</label>
|
<label>Add : Interest u/s 244A as per 143:</label>
|
||||||
<input type="text" name="Remarks" value="{{ record.remarks}}">
|
<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 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>Remarks:</label>
|
||||||
<input type="date" name="created_at"
|
<input type="text" name="Remarks" value="{{ record.Remarks }}">
|
||||||
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 }}"
|
|
||||||
readonly>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -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}}">
|
||||||
|
|||||||
@@ -7,13 +7,24 @@
|
|||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<h2>Update ITAT Record for Year {{ record.year }}</h2>
|
<h2>Update Income Tax Appellate Tribunal(ITAT) Record for Year {{ record.year }}</h2>
|
||||||
<form method="POST" action="{{ url_for('update_itat', id=record.id) }}">
|
<form method="POST" action="{{ url_for('update_itat', 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">
|
||||||
@@ -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"
|
||||||
@@ -73,39 +94,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" 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>
|
||||||
|
|
||||||
|
<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 }}"
|
||||||
@@ -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 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 full-width inline-2">
|
||||||
<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 }}">
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<button type="submit">Update Record</button>
|
<button type="submit">Update Record</button>
|
||||||
|
|||||||
@@ -8,13 +8,24 @@
|
|||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<h2>Update ITR Record for Year {{record.year}} - {{record.year+1}}</h2>
|
<h2>Update Income Tax Return (ITR) Record for Year {{record.year}} - {{record.year+1}}</h2>
|
||||||
<form method="POST" action="{{ url_for('update_itr', id=record.id) }}">
|
<form method="POST" action="{{ url_for('update_itr', 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">
|
||||||
@@ -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,24 +253,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 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 full-width inline-2">
|
||||||
<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 }}">
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group full-width inline-2">
|
|
||||||
<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 }}"
|
|
||||||
readonly>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<button type="submit">Update Record</button>
|
<button type="submit">Update Record</button>
|
||||||
|
|||||||
@@ -27,11 +27,7 @@
|
|||||||
</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>
|
||||||
|
|||||||
28
templates/view_logs.html
Normal file
28
templates/view_logs.html
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
<!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>
|
||||||
87
templates/view_logs_auth.html
Normal file
87
templates/view_logs_auth.html
Normal file
@@ -0,0 +1,87 @@
|
|||||||
|
<!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