Prepare ERP source for Gitea deployment

This commit is contained in:
A R R R Associates
2026-06-20 15:01:44 +05:30
commit 5c75eb6bd9
450 changed files with 67698 additions and 0 deletions
+28
View File
@@ -0,0 +1,28 @@
import csv
import io
import re
PAN_RE = re.compile(r"^[A-Z]{5}[0-9]{4}[A-Z]$")
GSTIN_RE = re.compile(r"^[0-9]{2}[A-Z]{5}[0-9]{4}[A-Z][1-9A-Z]Z[0-9A-Z]$")
TAN_RE = re.compile(r"^[A-Z]{4}[0-9]{5}[A-Z]$")
MOBILE_RE = re.compile(r"^[6-9][0-9]{9}$")
PIN_RE = re.compile(r"^[0-9]{6}$")
def normalize_text(value):
if value is None:
return None
text = str(value).strip()
return text or None
def normalize_upper(value):
value = normalize_text(value)
return value.upper() if value else None
def build_csv(rows, headers):
output = io.StringIO()
writer = csv.writer(output)
writer.writerow(headers)
for row in rows:
writer.writerow(row)
return output.getvalue()