117 lines
5.9 KiB
Bash
117 lines
5.9 KiB
Bash
PORT=5000
|
|
NODE_ENV=production
|
|
# ─── CORS ─────────────────────────────────────────────────
|
|
# Comma-separated list of EXACT origins (scheme+host+port) allowed to make
|
|
# credentialed (cookie-carrying) requests to this API. Leave blank to reflect
|
|
# any origin back (fine on a private LAN — this is today's default). Once
|
|
# this app has a real public domain, set it, e.g.:
|
|
# CORS_ALLOWED_ORIGINS=https://portal.mitraindustries.com
|
|
CORS_ALLOWED_ORIGINS=https://erp.miplapp.in
|
|
# NOTE: The following app settings moved OUT of .env and are now edited from
|
|
# the Admin panel (System Settings tab), persisted in the app DB table
|
|
# ZAPP_SETTINGS (see services/appSettingsStore.js): BOM approval levels, skip
|
|
# "Checked By QC", enabled Production Order types, receipt full-qty gate,
|
|
# autoclave-rejection toggle, and the FG item-group list.
|
|
# ─── APP SQL Connection ───────────────────────────
|
|
APP_SQL_HOST=192.9.205.132
|
|
APP_SQL_SERVER_NAME=SAPSVR
|
|
APP_SQL_PORT=1433
|
|
APP_SQL_USER=SAP-ERP-USER
|
|
APP_SQL_PASSWORD=Admin@1234
|
|
APP_SQL_DATABASE=SAP-ERP-DEMO
|
|
# ─── SAP SQL Direct Connection ───────────────────────────
|
|
SQL_HOST=192.9.205.132
|
|
SQL_SERVER_NAME=SAPSVR
|
|
SQL_PORT=1433
|
|
SQL_USER=sa
|
|
SQL_PASSWORD=Edp2sYstem
|
|
SQL_DATABASE=Test_MI-NewDB2
|
|
# SQL_ENCRYPT=true ← uncomment only if SQL Server enforces encryption
|
|
|
|
# ─── SAP B1 Service Layer ─────────────────────────────────
|
|
SAP_B1_SERVER=https://192.9.205.132:50000
|
|
SAP_B1_COMPANY=Test_MI-NewDB2
|
|
SAP_B1_USER=manager
|
|
SAP_B1_PASSWORD=Mipl@123
|
|
SAP_DI_DB_TYPE=11
|
|
|
|
# ─── SAP B1 Purchase Request restricted user ─────────────────
|
|
# Must be a user listed in "Purchase Indent" approval template originators
|
|
# AND must NOT have "Approval Bypass" authorization in SAP B1 General Authorizations.
|
|
# When set, portal PRs will trigger SAP's approval template (AuthorizationStatus: dasPending).
|
|
SAP_B1_PR_USER=pur03
|
|
SAP_B1_PR_PASSWORD=12345
|
|
SAP_B1_PR_EMAIL=edp@mitraindustries.com
|
|
SAP_B1_PR_APPROVAL_TEMPLATE=Purchase Indent
|
|
|
|
# ─── TCS GSP (GSTR-1 Upload) ─────────────────────────────
|
|
# Excel upload URL: salesInvUpldForEXCEL/{CLIENT_CODE}/{MAPPING_CD}/{TEMPLATE_CD}/{GSTIN}/EXCEL/{period}?oprFlag=SALES
|
|
# (mirrors working JSON URL: salesInvUpld/{CLIENT_CODE}/{MAPPING_CD}/{TEMPLATE_CD}/{GSTIN}/JSON/{period}?oprFlag=SALES)
|
|
TCS_GSP_BASE_URL=https://g31.tcsgsp.in
|
|
TCS_GSP_USERNAME=API@mitrauser.com
|
|
TCS_GSP_PASSWORD=March@2026
|
|
TCS_GSP_GSTIN=06AAACM4564C1ZT
|
|
TCS_GSP_CLIENT_CODE=AAACM4564C
|
|
TCS_GSP_UPLOAD_GSTIN=06AAACM4564C1ZT
|
|
TCS_GSP_MAPPING_CD=MFHSIDTN0000005
|
|
TCS_GSP_TEMPLATE_CD=SalesInvoiceData802
|
|
# typeOfFileUpload path segment — required; GSTR1 is standard value for sales return
|
|
TCS_GSP_FILE_TYPE=JSON
|
|
|
|
# ─── JWT Secret ───────────────────────────────────────────
|
|
JWT_SECRET=sap-portal-super-secret-key-change-in-production
|
|
|
|
# ─── Central Auth SSO (Mitra Industry) ───────────────────
|
|
# CENTRAL_AUTH_API_URL is the Django BACKEND (port 8016), not the Next.js
|
|
# frontend (port 8017) users actually log into — the backend is what verifies
|
|
# the access token server-to-server. This app is registered there as
|
|
# CENTRAL_AUTH_APP_NAME exactly ("SAP ERP", with the space) — must match.
|
|
CENTRAL_AUTH_API_URL=http://14.99.235.114:8016
|
|
CENTRAL_AUTH_APP_NAME=SAP ERP
|
|
|
|
# ─── ITC-04 Job Work Challan (TCS GSP) ──────────────────
|
|
ITC04_M2JW_MAPPING_CD=MFHGSTTN0000880
|
|
ITC04_M2JW_TEMPLATE_CD=ITC04M2JWTemplate880
|
|
ITC04_JW2M_MAPPING_CD=MFHGSTTN0000881
|
|
ITC04_JW2M_TEMPLATE_CD=ITC04JW2MTemplate881
|
|
|
|
# ─── AI Chatbot (Google Gemini) ──────────────────────────
|
|
# Get free key from: https://aistudio.google.com/app/apikey
|
|
GEMINI_API_KEY=AIzaSyBW7sseRh5BdU_dtmNQqIEGjG3lMS7eWiw
|
|
|
|
# ─── SAP B1 Attachment Path (UNC Share) ───────────────────
|
|
SAP_ATTACHMENT_PATH=\\192.9.205.132\COAUpload
|
|
SAP_ATTACHMENT_SERVER_PATH=\\192.9.205.132\COAUpload
|
|
# ─── Windows Network Share Credentials ────────────────────
|
|
#SMB_USER=USER42
|
|
#SMB_PASSWORD=Asdf#2025#42!
|
|
# SMB_DOMAIN=WORKGROUP ← uncomment if Strategy B still fails
|
|
|
|
# ─── SMTP Email Notifications (Production module stage alerts) ────
|
|
# Fill in real SMTP credentials to enable stage-change emails (Work Order,
|
|
# Production Order, Issue for Production, Verify Work Order, Batch Issuance
|
|
# Intimation) — see services/mailer.js / services/notifyStore.js. Until
|
|
# SMTP_HOST is set, notifications are skipped (logged only, nothing crashes).
|
|
# The recipient list per step/module, and the on/off switch, are configured
|
|
# from Admin Settings (services/appSettingsStore.js) — not here.
|
|
SMTP_HOST=smtp.office365.com
|
|
SMTP_PORT=587
|
|
SMTP_SECURE=false
|
|
SMTP_USER=no-reply@mitraindustries.com
|
|
SMTP_PASSWORD=fzxkjxqkzvydjbfb
|
|
SMTP_FROM=SAP ERP Portal <no-reply@mitraindustries.com>
|
|
# Base URL used to build clickable links in notification emails.
|
|
APP_BASE_URL=http://localhost:5000
|
|
|
|
# ─── Sales Order module (replaces the msale portal) ─────────────
|
|
# API key for the external job that pushes invoice PDFs to /api/sales-ext
|
|
# (header MS-API-KEY). Leave unset to keep that endpoint disabled.
|
|
#SALES_EXT_API_KEY=
|
|
# One-time migration source (scripts/migrate-msale.js) — the LIVE msale MySQL copy.
|
|
#MSALE_MYSQL_HOST=localhost
|
|
#MSALE_MYSQL_PORT=3306
|
|
#MSALE_MYSQL_USER=root
|
|
#MSALE_MYSQL_PASSWORD=
|
|
#MSALE_MYSQL_DATABASE=u709187725_msale_db
|
|
# Extra folders to look for COA/attachment files (comma separated), besides SAP_ATTACHMENT_PATH
|
|
#SALES_COA_PATHS= |