modification of report, froms, models

This commit is contained in:
2026-02-17 16:54:43 +05:30
parent b8c289294d
commit 0ba78a0bd1
25 changed files with 92 additions and 404 deletions

View File

@@ -38,8 +38,9 @@ class MatCreditHandler:
(
data["financial_year"],
data["mat_credit"],
data["opening_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)
# --------------------------------------------------
@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()
cur = conn.cursor(dictionary=True)
try:
mat_created = float(mat_created or 0)
opening_balance = float(mat_created 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
cur.callproc(
"SaveOrUpdateMatCredit",
(year, mat_created, balance, remarks)
(year, mat_created, opening_balance, balance, remarks)
)
mat_id = None