Commit Graph

3 Commits

Author SHA1 Message Date
Samer Salameh 514a76d7c7 Billing: raise max sent weight (الوزن المرسل) from 50000 to 60000
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-19 11:47:34 +03:00
Samer Salameh e5159c7383 Billing: port new Invoice.cfc rules; invoice/document number mapping; grid tweaks
- addBillingInfo: price = GRAINS_WAGE rate and fine price = GRAINS_FINE rate of the
  claim's cargo type on the loading date; final cost = wage - shortage fine; invoice
  cargo-family check (38 / 74 / 39+41); archived-invoice and duplicate-permit checks;
  first billing creates the INVOICE row; unclosed permit is closed with a "Billing Close."
  event; company name from NTP_TENDERS_COMPANIES; raw permit weights no longer stored.
- getBillingInfo: permits since 2020, tender company name, last invoice per user, already-billed check.
- "رقم المطالبة" is stored in INVOICENUMBER and "رقم المستند" in SERIALNO (digits only).
- Wages grid shows the wage with 4 decimals; invoices grid gets a company-number column;
  count / sent / received weight columns centred.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-16 16:54:31 +03:00
Samer Salameh 0c0b64239c Initial commit: NTP V2 (.NET 10 API + React web) with Dev, QA and Production environments
Rebuild of the legacy ColdFusion NTP Grains module: Orders, Permits, Registry and Reports on a Dapper/Oracle API with a
metadata-driven React front end (Arabic RTL default, English LTR, light and dark).

Environments
- API: appsettings.{Development,QA,Production}.json carry only non-secret settings. Connection strings, Jwt__Key, CORS origin and
  super users come from the server environment. Production and QA CORS origins fail closed until set. launchSettings gets a QA profile.
- Web: Vite modes qa and production (web/.env.qa, web/.env.production), configurable VITE_API_BASE, scripts build:qa and build:prod.
- docs/ENVIRONMENTS.md documents the three environments, required settings and a new-environment checklist.

Security and access
- Backend-driven permissions (GET /auth/permissions, [RequirePermission]) from GRAINS_SCREEN_PERMISSIONS; SU always allowed.
  SQL in db/ (grains-screen-permissions.sql, registry-create-permissions.sql).
- OracleCredentialGuard stops retrying an account after ORA-01017 so a misconfigured copy cannot lock the database account.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-11 11:56:48 +03:00