chore: update submodule references and documentation
Some checks failed
Deploy to Phoenix / deploy (push) Has been cancelled
Some checks failed
Deploy to Phoenix / deploy (push) Has been cancelled
- Marked submodules ai-mcp-pmm-controller, explorer-monorepo, and smom-dbis-138 as dirty to reflect recent changes. - Updated documentation to clarify operator script usage, including dotenv loading and task execution instructions. - Enhanced the README and various index files to provide clearer navigation and task completion guidance. Made-with: Cursor
This commit is contained in:
@@ -19,6 +19,7 @@ Scripts for the **OMNL** tenancy ([omnl.hybxfinance.io](https://omnl.hybxfinance
|
||||
| **omnl-office2-access-security-test.sh** | Security test: office-2 user must not see other offices’ data or achieve path traversal/command injection. Set office-2 user and password (e.g. `OMNL_OFFICE2_TEST_USER`, `OMNL_OFFICE2_TEST_PASSWORD`). See [OMNL_OFFICE_2_ACCESS_SECURITY_TEST.md](../../docs/04-configuration/mifos-omnl-central-bank/OMNL_OFFICE_2_ACCESS_SECURITY_TEST.md). |
|
||||
| **omnl-office-create-samama.sh** | Create Office for Samama Group LLC (Azerbaijan) and post 5B USD M1 from Head Office (Phase C pattern: HO Dr 2100 Cr 2410; office Dr 1410 Cr 2100). Idempotent by externalId. `SKIP_TRANSFER=1` to create office only. See [SAMAMA_OFFICE_AND_5B_M1_TRANSFER.md](../../docs/04-configuration/mifos-omnl-central-bank/SAMAMA_OFFICE_AND_5B_M1_TRANSFER.md). |
|
||||
| **omnl-office-create-pelican.sh** | Create Office for Pelican Motors And Finance LLC (Chalmette, LA). Idempotent by externalId `PEL-MOTORS-CHALMETTE-LA`. Use with omnl.hybx.global by setting `OMNL_FINERACT_BASE_URL`. See [PELICAN_MOTORS_OFFICE_RUNBOOK.md](../../docs/04-configuration/mifos-omnl-central-bank/PELICAN_MOTORS_OFFICE_RUNBOOK.md). |
|
||||
| **omnl-office-create-adf-singapore.sh** | Create Office for ADF ASIAN PACIFIC HOLDING SINGAPORE PTE LTD (child of OMNL Head Office). Idempotent by externalId `202328126M`. See [ADF_ASIAN_PACIFIC_SINGAPORE_OFFICE_RUNBOOK.md](../../docs/04-configuration/mifos-omnl-central-bank/ADF_ASIAN_PACIFIC_SINGAPORE_OFFICE_RUNBOOK.md). |
|
||||
| **resolve_ids.sh** | Resolve GL IDs (1410, 2100, 2410) and payment type; write `ids.env`. Run before closures/reconciliation/templates. See [OPERATING_RAILS.md](../../docs/04-configuration/mifos-omnl-central-bank/OPERATING_RAILS.md). |
|
||||
| **omnl-gl-closures-post.sh** | Post GL closures for Office 20 and HO (idempotent). `CLOSING_DATE=yyyy-MM-dd`, `DRY_RUN=1`. See [OPERATING_RAILS.md](../../docs/04-configuration/mifos-omnl-central-bank/OPERATING_RAILS.md). |
|
||||
| **omnl-reconciliation-office20.sh** | Snapshot Office 20 (offices + GL + trial balance), timestamp, sha256. `OUT_DIR=./reconciliation`. See [OPERATING_RAILS.md](../../docs/04-configuration/mifos-omnl-central-bank/OPERATING_RAILS.md). |
|
||||
@@ -107,6 +108,10 @@ bash scripts/omnl/omnl-office-create-samama.sh
|
||||
# Pelican Motors And Finance LLC — create office (omnl.hybx.global or omnl.hybxfinance.io)
|
||||
DRY_RUN=1 bash scripts/omnl/omnl-office-create-pelican.sh
|
||||
bash scripts/omnl/omnl-office-create-pelican.sh
|
||||
|
||||
# ADF Asian Pacific Holding Singapore Pte Ltd — create office (child of OMNL Head Office, externalId 202328126M)
|
||||
DRY_RUN=1 bash scripts/omnl/omnl-office-create-adf-singapore.sh
|
||||
bash scripts/omnl/omnl-office-create-adf-singapore.sh
|
||||
```
|
||||
|
||||
**Requirements:** `curl`, `jq` (for ledger posting and pretty-print in discovery).
|
||||
|
||||
75
scripts/omnl/omnl-office-create-adf-singapore.sh
Executable file
75
scripts/omnl/omnl-office-create-adf-singapore.sh
Executable file
@@ -0,0 +1,75 @@
|
||||
#!/usr/bin/env bash
|
||||
# OMNL Fineract — Create one Office for ADF ASIAN PACIFIC HOLDING SINGAPORE PTE LTD (child of OMNL Head Office).
|
||||
# Uses Fineract POST /offices (name, parentId, openingDate, externalId).
|
||||
# See docs/04-configuration/mifos-omnl-central-bank/ADF_ASIAN_PACIFIC_SINGAPORE_OFFICE_RUNBOOK.md
|
||||
#
|
||||
# Usage: run from repo root.
|
||||
# OPENING_DATE=2023-07-11 (default)
|
||||
# DRY_RUN=1 to print payload only, do not POST.
|
||||
#
|
||||
# For omnl.hybx.global set in .env:
|
||||
# OMNL_FINERACT_BASE_URL=https://omnl.hybx.global/fineract-provider/api/v1
|
||||
#
|
||||
# Requires: curl, jq.
|
||||
|
||||
set -euo pipefail
|
||||
REPO_ROOT="${REPO_ROOT:-$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)}"
|
||||
DRY_RUN="${DRY_RUN:-0}"
|
||||
OPENING_DATE="${OPENING_DATE:-2023-07-11}"
|
||||
ADF_SINGAPORE_EXTERNAL_ID="${ADF_SINGAPORE_EXTERNAL_ID:-202328126M}"
|
||||
ADF_SINGAPORE_OFFICE_NAME="${ADF_SINGAPORE_OFFICE_NAME:-ADF ASIAN PACIFIC HOLDING SINGAPORE PTE LTD}"
|
||||
|
||||
if [ -f "${REPO_ROOT}/omnl-fineract/.env" ]; then
|
||||
set +u
|
||||
source "${REPO_ROOT}/omnl-fineract/.env" 2>/dev/null || true
|
||||
set -u
|
||||
elif [ -f "${REPO_ROOT}/.env" ]; then
|
||||
set +u
|
||||
source "${REPO_ROOT}/.env" 2>/dev/null || true
|
||||
set -u
|
||||
fi
|
||||
|
||||
BASE_URL="${OMNL_FINERACT_BASE_URL:-}"
|
||||
TENANT="${OMNL_FINERACT_TENANT:-omnl}"
|
||||
USER="${OMNL_FINERACT_USER:-app.omnl}"
|
||||
PASS="${OMNL_FINERACT_PASSWORD:-}"
|
||||
|
||||
if [ -z "$BASE_URL" ] || [ -z "$PASS" ]; then
|
||||
echo "Set OMNL_FINERACT_BASE_URL and OMNL_FINERACT_PASSWORD (e.g. omnl-fineract/.env or .env)." >&2
|
||||
echo "For omnl.hybx.global use: OMNL_FINERACT_BASE_URL=https://omnl.hybx.global/fineract-provider/api/v1" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
CURL_OPTS=(-s -S -H "Fineract-Platform-TenantId: ${TENANT}" -H "Content-Type: application/json" -u "${USER}:${PASS}")
|
||||
|
||||
# Resolve existing office by externalId (idempotent)
|
||||
offices_json=$(curl "${CURL_OPTS[@]}" "${BASE_URL}/offices" 2>/dev/null)
|
||||
existing_id=$(echo "$offices_json" | jq -r --arg e "$ADF_SINGAPORE_EXTERNAL_ID" '.[] | select(.externalId == $e) | .id' 2>/dev/null | head -1)
|
||||
|
||||
if [ -n "$existing_id" ] && [ "$existing_id" != "null" ]; then
|
||||
echo "ADF Asian Pacific Singapore office already exists: officeId=$existing_id (externalId=$ADF_SINGAPORE_EXTERNAL_ID)" >&2
|
||||
echo "OFFICE_ID_ADF_SINGAPORE=$existing_id"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
payload=$(jq -n \
|
||||
--arg name "$ADF_SINGAPORE_OFFICE_NAME" \
|
||||
--arg openingDate "$OPENING_DATE" \
|
||||
--arg externalId "$ADF_SINGAPORE_EXTERNAL_ID" \
|
||||
'{ name: $name, parentId: 1, openingDate: $openingDate, externalId: $externalId, dateFormat: "yyyy-MM-dd", locale: "en" }')
|
||||
|
||||
if [ "$DRY_RUN" = "1" ]; then
|
||||
echo "DRY_RUN: would POST /offices with name=$ADF_SINGAPORE_OFFICE_NAME externalId=$ADF_SINGAPORE_EXTERNAL_ID openingDate=$OPENING_DATE" >&2
|
||||
echo "Payload: $payload" >&2
|
||||
exit 0
|
||||
fi
|
||||
|
||||
res=$(curl "${CURL_OPTS[@]}" -X POST -d "$payload" "${BASE_URL}/offices" 2>/dev/null) || true
|
||||
if echo "$res" | jq -e '.resourceId // .officeId' >/dev/null 2>&1; then
|
||||
ADF_OFFICE_ID=$(echo "$res" | jq -r '.resourceId // .officeId')
|
||||
echo "Created ADF Asian Pacific Singapore office: officeId=$ADF_OFFICE_ID" >&2
|
||||
echo "OFFICE_ID_ADF_SINGAPORE=$ADF_OFFICE_ID"
|
||||
else
|
||||
echo "Failed to create office: $res" >&2
|
||||
exit 1
|
||||
fi
|
||||
Reference in New Issue
Block a user