From e95e612a447d0ec134619d0a85be4d6bfb92360c Mon Sep 17 00:00:00 2001 From: Jonathan Miller Date: Sat, 20 Jun 2026 21:42:23 -0500 Subject: [PATCH 01/17] =?UTF-8?q?Add=20ThankYou=20site=20view=20=E2=80=94?= =?UTF-8?q?=20donation=20confirmation=20with=20token=20verification,=20rec?= =?UTF-8?q?eipt=20display?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../site/src/View/ThankYou/HtmlView.php | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 source/packages/com_mokosuitenpo/site/src/View/ThankYou/HtmlView.php diff --git a/source/packages/com_mokosuitenpo/site/src/View/ThankYou/HtmlView.php b/source/packages/com_mokosuitenpo/site/src/View/ThankYou/HtmlView.php new file mode 100644 index 0000000..38af310 --- /dev/null +++ b/source/packages/com_mokosuitenpo/site/src/View/ThankYou/HtmlView.php @@ -0,0 +1,52 @@ +get(DatabaseInterface::class); + $donationId = Factory::getApplication()->getInput()->getInt('id', 0); + $token = Factory::getApplication()->getInput()->getString('token', ''); + + if (!$donationId || !$token) { + parent::display($tpl); + return; + } + + // Verify token matches donation (prevents enumeration) + $db->setQuery($db->getQuery(true) + ->select('d.*, cd.name AS donor_name, f.name AS fund_name, c.title AS campaign_title') + ->from($db->quoteName('#__mokosuitenpo_donations', 'd')) + ->join('INNER', $db->quoteName('#__mokosuitenpo_donors', 'don') . ' ON don.id = d.donor_id') + ->join('LEFT', $db->quoteName('#__contact_details', 'cd') . ' ON cd.id = don.contact_id') + ->join('LEFT', $db->quoteName('#__mokosuitenpo_funds', 'f') . ' ON f.id = d.fund_id') + ->join('LEFT', $db->quoteName('#__mokosuitenpo_campaigns', 'c') . ' ON c.id = d.campaign_id') + ->where('d.id = ' . (int) $donationId) + ->where($db->quoteName('d.confirmation_token') . ' = ' . $db->quote($token))); + $this->donation = $db->loadObject(); + + if ($this->donation) { + // Get tax receipt if generated + $db->setQuery($db->getQuery(true) + ->select('receipt_number, issued_date, amount') + ->from('#__mokosuitenpo_tax_receipts') + ->where('donation_id = ' . (int) $donationId)); + $this->receipt = $db->loadObject(); + } + + parent::display($tpl); + } +} -- 2.52.0 From 0d900b50d37dc7696047b16818252d96cf8b9e60 Mon Sep 17 00:00:00 2001 From: "gitea-actions[bot]" Date: Sun, 21 Jun 2026 02:42:35 +0000 Subject: [PATCH 02/17] chore(version): auto-bump patch 01.03.01-dev [skip ci] --- .mokogitea/workflows/issue-branch.yml | 2 +- source/packages/com_mokosuitenpo/mokosuitenpo.xml | 2 +- source/pkg_mokosuitenpo.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.mokogitea/workflows/issue-branch.yml b/.mokogitea/workflows/issue-branch.yml index c2b02a6..21914a3 100644 --- a/.mokogitea/workflows/issue-branch.yml +++ b/.mokogitea/workflows/issue-branch.yml @@ -5,7 +5,7 @@ # FILE INFORMATION # DEFGROUP: Gitea.Workflow # INGROUP: moko-platform.Automation -# VERSION: 01.00.00 +# VERSION: 01.03.01 # BRIEF: Auto-create feature branch when an issue is opened name: "Universal: Issue Branch" diff --git a/source/packages/com_mokosuitenpo/mokosuitenpo.xml b/source/packages/com_mokosuitenpo/mokosuitenpo.xml index a473900..6c8266c 100644 --- a/source/packages/com_mokosuitenpo/mokosuitenpo.xml +++ b/source/packages/com_mokosuitenpo/mokosuitenpo.xml @@ -7,7 +7,7 @@ GPL-3.0-or-later hello@mokoconsulting.tech https://mokoconsulting.tech - 01.03.00 + 01.03.01 8.3 MokoSuite NPO component Moko\Component\MokoSuiteNpo diff --git a/source/pkg_mokosuitenpo.xml b/source/pkg_mokosuitenpo.xml index 0274c16..23c5b73 100644 --- a/source/pkg_mokosuitenpo.xml +++ b/source/pkg_mokosuitenpo.xml @@ -2,7 +2,7 @@ Package - MokoSuite NPO mokosuitenpo - 01.03.00 + 01.03.01 2026-06-11 Moko Consulting hello@mokoconsulting.tech -- 2.52.0 From a4c8488781c8a30ff723986ef8e611853cdb76ee Mon Sep 17 00:00:00 2001 From: "gitea-actions[bot]" Date: Sun, 21 Jun 2026 02:42:44 +0000 Subject: [PATCH 03/17] chore(version): pre-release bump to 01.03.02-dev [skip ci] --- .mokogitea/workflows/issue-branch.yml | 2 +- source/packages/com_mokosuitenpo/mokosuitenpo.xml | 2 +- source/pkg_mokosuitenpo.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.mokogitea/workflows/issue-branch.yml b/.mokogitea/workflows/issue-branch.yml index 21914a3..130a094 100644 --- a/.mokogitea/workflows/issue-branch.yml +++ b/.mokogitea/workflows/issue-branch.yml @@ -5,7 +5,7 @@ # FILE INFORMATION # DEFGROUP: Gitea.Workflow # INGROUP: moko-platform.Automation -# VERSION: 01.03.01 +# VERSION: 01.03.02 # BRIEF: Auto-create feature branch when an issue is opened name: "Universal: Issue Branch" diff --git a/source/packages/com_mokosuitenpo/mokosuitenpo.xml b/source/packages/com_mokosuitenpo/mokosuitenpo.xml index 6c8266c..eaa541e 100644 --- a/source/packages/com_mokosuitenpo/mokosuitenpo.xml +++ b/source/packages/com_mokosuitenpo/mokosuitenpo.xml @@ -7,7 +7,7 @@ GPL-3.0-or-later hello@mokoconsulting.tech https://mokoconsulting.tech - 01.03.01 + 01.03.02 8.3 MokoSuite NPO component Moko\Component\MokoSuiteNpo diff --git a/source/pkg_mokosuitenpo.xml b/source/pkg_mokosuitenpo.xml index 23c5b73..c5de84d 100644 --- a/source/pkg_mokosuitenpo.xml +++ b/source/pkg_mokosuitenpo.xml @@ -2,7 +2,7 @@ Package - MokoSuite NPO mokosuitenpo - 01.03.01 + 01.03.02 2026-06-11 Moko Consulting hello@mokoconsulting.tech -- 2.52.0 From 5ca3c801141f1b9ed866f16ab27c5f09df2d4977 Mon Sep 17 00:00:00 2001 From: Jonathan Miller <1+jmiller@noreply.git.mokoconsulting.tech> Date: Sat, 20 Jun 2026 23:48:43 +0000 Subject: [PATCH 04/17] chore: sync ci-generic.yml from Template-Generic [skip ci] --- .mokogitea/workflows/ci-generic.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.mokogitea/workflows/ci-generic.yml b/.mokogitea/workflows/ci-generic.yml index 92d2685..18ae768 100644 --- a/.mokogitea/workflows/ci-generic.yml +++ b/.mokogitea/workflows/ci-generic.yml @@ -13,12 +13,6 @@ name: "Generic: Project CI" on: - pull_request: - branches: - - main - - dev - - dev/** - - rc/** workflow_dispatch: permissions: -- 2.52.0 From 63c4e832e8eb7461024ad7eff2c7e7d274296430 Mon Sep 17 00:00:00 2001 From: Jonathan Miller <1+jmiller@noreply.git.mokoconsulting.tech> Date: Sat, 20 Jun 2026 23:48:44 +0000 Subject: [PATCH 05/17] chore: sync gitleaks.yml from Template-Generic [skip ci] --- .mokogitea/workflows/gitleaks.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.mokogitea/workflows/gitleaks.yml b/.mokogitea/workflows/gitleaks.yml index 0c07612..196cf0c 100644 --- a/.mokogitea/workflows/gitleaks.yml +++ b/.mokogitea/workflows/gitleaks.yml @@ -25,10 +25,6 @@ name: "Universal: Secret Scanning" on: - pull_request: - branches: - - main - - 'dev/**' schedule: - cron: '0 5 * * 1' # Weekly Monday 05:00 UTC workflow_dispatch: -- 2.52.0 From 30b995bf2bcd954336fbcd92b6b85a820252554e Mon Sep 17 00:00:00 2001 From: Jonathan Miller <1+jmiller@noreply.git.mokoconsulting.tech> Date: Sat, 20 Jun 2026 23:48:44 +0000 Subject: [PATCH 06/17] chore: sync pr-check.yml from Template-Generic [skip ci] --- .mokogitea/workflows/pr-check.yml | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/.mokogitea/workflows/pr-check.yml b/.mokogitea/workflows/pr-check.yml index ea6ddd1..d34108c 100644 --- a/.mokogitea/workflows/pr-check.yml +++ b/.mokogitea/workflows/pr-check.yml @@ -4,8 +4,8 @@ # # FILE INFORMATION # DEFGROUP: Gitea.Workflow -# INGROUP: mokocli.CI -# REPO: https://git.mokoconsulting.tech/mokoconsulting-tech/mokocli +# INGROUP: moko-platform.CI +# REPO: https://git.mokoconsulting.tech/mokoconsulting-tech/moko-platform # PATH: /templates/workflows/universal/pr-check.yml.template # VERSION: 09.23.00 # BRIEF: PR gate — branch policy + code validation before merge @@ -96,6 +96,32 @@ jobs: echo "Branch policy: OK (${HEAD} → ${BASE})" echo "## Branch Policy: Passed" >> $GITHUB_STEP_SUMMARY + # ── Secret Scanning ────────────────────────────────────────────────── + gitleaks: + name: Secret Scan + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Install Gitleaks + run: | + GITLEAKS_VERSION="8.21.2" + curl -sSL "https://github.com/gitleaks/gitleaks/releases/download/v${GITLEAKS_VERSION}/gitleaks_${GITLEAKS_VERSION}_linux_x64.tar.gz" \ + | tar -xz -C /usr/local/bin gitleaks + + - name: Scan PR commits for secrets + run: | + if gitleaks detect --source . --verbose \ + --log-opts=${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }} 2>&1; then + echo "**No secrets detected.**" >> $GITHUB_STEP_SUMMARY + else + echo "::error::Potential secrets detected in PR commits" + exit 1 + fi + # ── Code Validation ──────────────────────────────────────────────────── validate: name: Validate PR -- 2.52.0 From ad26508b825536f914061cd83fbe96f3785bfe09 Mon Sep 17 00:00:00 2001 From: Jonathan Miller <1+jmiller@noreply.git.mokoconsulting.tech> Date: Sun, 21 Jun 2026 01:30:07 +0000 Subject: [PATCH 07/17] chore: sync auto-release.yml from Template-Generic [skip ci] --- .mokogitea/workflows/auto-release.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.mokogitea/workflows/auto-release.yml b/.mokogitea/workflows/auto-release.yml index 29ce950..6c65f3b 100644 --- a/.mokogitea/workflows/auto-release.yml +++ b/.mokogitea/workflows/auto-release.yml @@ -205,6 +205,12 @@ jobs: echo MOKO_CLI=/tmp/mokocli/cli >> $GITHUB_ENV fi + - name: "Detect platform" + id: platform + run: | + php ${MOKO_CLI}/platform_detect.php --path . --github-output 2>/dev/null || true + php ${MOKO_CLI}/manifest_read.php --path . --github-output 2>/dev/null || true + - name: "Determine version bump level" id: bump run: | @@ -228,6 +234,18 @@ jobs: --path . --stability stable ${BUMP_FLAG} --branch main \ --token "${{ secrets.MOKOGITEA_TOKEN }}" + - name: "Read published version" + id: version + run: | + VERSION=$(php ${MOKO_CLI}/version_read.php --path . 2>/dev/null || echo "") + VERSION=$(echo "$VERSION" | sed 's/-\(dev\|alpha\|beta\|rc\)$//') + [ -z "$VERSION" ] && VERSION="00.00.00" && echo "skip=true" >> "$GITHUB_OUTPUT" + echo "version=${VERSION}" >> "$GITHUB_OUTPUT" + echo "tag=stable" >> "$GITHUB_OUTPUT" + echo "release_tag=stable" >> "$GITHUB_OUTPUT" + echo "branch=main" >> "$GITHUB_OUTPUT" + echo "Published version: ${VERSION}" + - name: Update release notes and promote changelog run: | API_BASE="${GITEA_URL}/api/v1/repos/${GITEA_ORG}/${GITEA_REPO}" -- 2.52.0 From e475ab24aed43a85f101532f50f3ee4cad5745ab Mon Sep 17 00:00:00 2001 From: Jonathan Miller <1+jmiller@noreply.git.mokoconsulting.tech> Date: Sun, 21 Jun 2026 01:30:09 +0000 Subject: [PATCH 08/17] chore: sync rc-revert.yml from Template-Generic [skip ci] --- .mokogitea/workflows/rc-revert.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.mokogitea/workflows/rc-revert.yml b/.mokogitea/workflows/rc-revert.yml index f54b184..5e61de8 100644 --- a/.mokogitea/workflows/rc-revert.yml +++ b/.mokogitea/workflows/rc-revert.yml @@ -4,8 +4,8 @@ # # FILE INFORMATION # DEFGROUP: Gitea.Workflow -# INGROUP: MokoPlatform.Universal -# REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform +# INGROUP: mokocli.Universal +# REPO: https://git.mokoconsulting.tech/MokoConsulting/mokocli # PATH: /.mokogitea/workflows/rc-revert.yml # VERSION: 09.23.00 # BRIEF: Rename rc/ branch back to dev/ when PR is closed without merge -- 2.52.0 From 6687db05c4f74ebccedff1b84f457ba20fcfa80e Mon Sep 17 00:00:00 2001 From: Jonathan Miller <1+jmiller@noreply.git.mokoconsulting.tech> Date: Sun, 21 Jun 2026 01:30:10 +0000 Subject: [PATCH 09/17] chore: sync workflow-sync-trigger.yml from Template-Generic [skip ci] --- .mokogitea/workflows/workflow-sync-trigger.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.mokogitea/workflows/workflow-sync-trigger.yml b/.mokogitea/workflows/workflow-sync-trigger.yml index 7cb2d22..371910c 100644 --- a/.mokogitea/workflows/workflow-sync-trigger.yml +++ b/.mokogitea/workflows/workflow-sync-trigger.yml @@ -4,8 +4,8 @@ # # FILE INFORMATION # DEFGROUP: Gitea.Workflow -# INGROUP: MokoPlatform.Universal -# REPO: https://git.mokoconsulting.tech/MokoConsulting/mokoplatform +# INGROUP: mokocli.Universal +# REPO: https://git.mokoconsulting.tech/MokoConsulting/mokocli # PATH: /.mokogitea/workflows/workflow-sync-trigger.yml # VERSION: 01.01.00 # BRIEF: Trigger workflow sync to live repos when a PR is merged to main @@ -45,16 +45,16 @@ jobs: echo "platform=$PLATFORM" >> "$GITHUB_OUTPUT" echo "Platform: ${PLATFORM:-all}" - - name: Clone mokoplatform + - name: Clone mokocli env: MOKOGITEA_TOKEN: ${{ secrets.MOKOGITEA_TOKEN }} run: | GITEA_URL="${{ vars.GITEA_URL || 'https://git.mokoconsulting.tech' }}" - git clone --depth 1 "${GITEA_URL}/MokoConsulting/mokoplatform.git" /tmp/mokoplatform + git clone --depth 1 "${GITEA_URL}/MokoConsulting/mokocli.git" /tmp/mokocli - name: Install dependencies run: | - cd /tmp/mokoplatform + cd /tmp/mokocli composer install --no-dev --no-interaction --quiet 2>/dev/null || true - name: Run workflow sync @@ -70,4 +70,4 @@ jobs: ARGS="${ARGS} --platform-filter ${PLATFORM}" fi - php /tmp/mokoplatform/cli/workflow_sync.php ${ARGS} + php /tmp/mokocli/cli/workflow_sync.php ${ARGS} -- 2.52.0 From 032a1f3bdcb9ffb57823063512501c210c5c7581 Mon Sep 17 00:00:00 2001 From: Jonathan Miller Date: Sat, 20 Jun 2026 23:32:07 -0500 Subject: [PATCH 10/17] =?UTF-8?q?Add=20PledgeReminderHelper=20=E2=80=94=20?= =?UTF-8?q?unfulfilled=20pledge=20tracking,=20fulfillment=20summary?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/Helper/PledgeReminderHelper.php | 64 +++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 source/packages/plg_system_mokosuitenpo/src/Helper/PledgeReminderHelper.php diff --git a/source/packages/plg_system_mokosuitenpo/src/Helper/PledgeReminderHelper.php b/source/packages/plg_system_mokosuitenpo/src/Helper/PledgeReminderHelper.php new file mode 100644 index 0000000..0cadc19 --- /dev/null +++ b/source/packages/plg_system_mokosuitenpo/src/Helper/PledgeReminderHelper.php @@ -0,0 +1,64 @@ +get(DatabaseInterface::class); + + $db->setQuery($db->getQuery(true) + ->select('p.*, cd.name AS donor_name, cd.email_to') + ->select('COALESCE((SELECT SUM(d.amount) FROM #__mokosuitenpo_donations d WHERE d.pledge_id = p.id), 0) AS amount_fulfilled') + ->from($db->quoteName('#__mokosuitenpo_pledges', 'p')) + ->join('INNER', $db->quoteName('#__mokosuitenpo_donors', 'don') . ' ON don.id = p.donor_id') + ->join('LEFT', $db->quoteName('#__contact_details', 'cd') . ' ON cd.id = don.contact_id') + ->where($db->quoteName('p.status') . ' = ' . $db->quote('active')) + ->where('p.due_date IS NOT NULL') + ->where('p.due_date < DATE_SUB(CURDATE(), INTERVAL ' . (int) $overdueDays . ' DAY)') + ->having('amount_fulfilled < p.amount') + ->order('p.due_date ASC')); + + $pledges = $db->loadObjectList() ?: []; + + foreach ($pledges as &$p) { + $p->remaining = round((float) $p->amount - (float) $p->amount_fulfilled, 2); + $p->fulfillment_pct = (float) $p->amount > 0 ? round((float) $p->amount_fulfilled / (float) $p->amount * 100, 1) : 0; + } + + return $pledges; + } + + /** + * Get pledge fulfillment summary. + */ + public static function getFulfillmentSummary(): object + { + $db = Factory::getContainer()->get(DatabaseInterface::class); + + $db->setQuery($db->getQuery(true) + ->select('COUNT(*) AS total_pledges') + ->select('COALESCE(SUM(amount), 0) AS total_pledged') + ->select('COALESCE(SUM((SELECT COALESCE(SUM(d.amount), 0) FROM #__mokosuitenpo_donations d WHERE d.pledge_id = p.id)), 0) AS total_received') + ->from($db->quoteName('#__mokosuitenpo_pledges', 'p')) + ->where($db->quoteName('p.status') . ' IN (' . $db->quote('active') . ',' . $db->quote('completed') . ')')); + + $stats = $db->loadObject() ?: (object) ['total_pledges' => 0, 'total_pledged' => 0, 'total_received' => 0]; + $stats->outstanding = round((float) $stats->total_pledged - (float) $stats->total_received, 2); + $stats->fulfillment_rate = (float) $stats->total_pledged > 0 + ? round((float) $stats->total_received / (float) $stats->total_pledged * 100, 1) : 0; + + return $stats; + } +} -- 2.52.0 From 3d443b30920995f04a14340ded13a43027e0cadd Mon Sep 17 00:00:00 2001 From: "gitea-actions[bot]" Date: Sun, 21 Jun 2026 04:34:47 +0000 Subject: [PATCH 11/17] chore(version): auto-bump patch 01.03.03-dev [skip ci] --- .mokogitea/workflows/issue-branch.yml | 2 +- source/packages/com_mokosuitenpo/mokosuitenpo.xml | 2 +- source/pkg_mokosuitenpo.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.mokogitea/workflows/issue-branch.yml b/.mokogitea/workflows/issue-branch.yml index 130a094..78501e8 100644 --- a/.mokogitea/workflows/issue-branch.yml +++ b/.mokogitea/workflows/issue-branch.yml @@ -5,7 +5,7 @@ # FILE INFORMATION # DEFGROUP: Gitea.Workflow # INGROUP: moko-platform.Automation -# VERSION: 01.03.02 +# VERSION: 01.03.03 # BRIEF: Auto-create feature branch when an issue is opened name: "Universal: Issue Branch" diff --git a/source/packages/com_mokosuitenpo/mokosuitenpo.xml b/source/packages/com_mokosuitenpo/mokosuitenpo.xml index eaa541e..e792871 100644 --- a/source/packages/com_mokosuitenpo/mokosuitenpo.xml +++ b/source/packages/com_mokosuitenpo/mokosuitenpo.xml @@ -7,7 +7,7 @@ GPL-3.0-or-later hello@mokoconsulting.tech https://mokoconsulting.tech - 01.03.02 + 01.03.03 8.3 MokoSuite NPO component Moko\Component\MokoSuiteNpo diff --git a/source/pkg_mokosuitenpo.xml b/source/pkg_mokosuitenpo.xml index c5de84d..7e5ca18 100644 --- a/source/pkg_mokosuitenpo.xml +++ b/source/pkg_mokosuitenpo.xml @@ -2,7 +2,7 @@ Package - MokoSuite NPO mokosuitenpo - 01.03.02 + 01.03.03 2026-06-11 Moko Consulting hello@mokoconsulting.tech -- 2.52.0 From 98a0bd06377a3c17bca0497cd263d475357ed9de Mon Sep 17 00:00:00 2001 From: "gitea-actions[bot]" Date: Sun, 21 Jun 2026 04:34:55 +0000 Subject: [PATCH 12/17] chore(version): pre-release bump to 01.03.04-dev [skip ci] --- .mokogitea/workflows/issue-branch.yml | 2 +- source/packages/com_mokosuitenpo/mokosuitenpo.xml | 2 +- source/pkg_mokosuitenpo.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.mokogitea/workflows/issue-branch.yml b/.mokogitea/workflows/issue-branch.yml index 78501e8..33908da 100644 --- a/.mokogitea/workflows/issue-branch.yml +++ b/.mokogitea/workflows/issue-branch.yml @@ -5,7 +5,7 @@ # FILE INFORMATION # DEFGROUP: Gitea.Workflow # INGROUP: moko-platform.Automation -# VERSION: 01.03.03 +# VERSION: 01.03.04 # BRIEF: Auto-create feature branch when an issue is opened name: "Universal: Issue Branch" diff --git a/source/packages/com_mokosuitenpo/mokosuitenpo.xml b/source/packages/com_mokosuitenpo/mokosuitenpo.xml index e792871..354ca2a 100644 --- a/source/packages/com_mokosuitenpo/mokosuitenpo.xml +++ b/source/packages/com_mokosuitenpo/mokosuitenpo.xml @@ -7,7 +7,7 @@ GPL-3.0-or-later hello@mokoconsulting.tech https://mokoconsulting.tech - 01.03.03 + 01.03.04 8.3 MokoSuite NPO component Moko\Component\MokoSuiteNpo diff --git a/source/pkg_mokosuitenpo.xml b/source/pkg_mokosuitenpo.xml index 7e5ca18..3cd7963 100644 --- a/source/pkg_mokosuitenpo.xml +++ b/source/pkg_mokosuitenpo.xml @@ -2,7 +2,7 @@ Package - MokoSuite NPO mokosuitenpo - 01.03.03 + 01.03.04 2026-06-11 Moko Consulting hello@mokoconsulting.tech -- 2.52.0 From 3f75d06efccf252b6a00fdcd5569d18b8ec2e9ec Mon Sep 17 00:00:00 2001 From: Jonathan Miller Date: Sun, 21 Jun 2026 00:49:36 -0500 Subject: [PATCH 13/17] =?UTF-8?q?Add=20GrantReportingHelper=20=E2=80=94=20?= =?UTF-8?q?spending=20reports,=20funder=20compliance,=20deadline=20trackin?= =?UTF-8?q?g?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/Helper/GrantReportingHelper.php | 65 +++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 source/packages/plg_system_mokosuitenpo/src/Helper/GrantReportingHelper.php diff --git a/source/packages/plg_system_mokosuitenpo/src/Helper/GrantReportingHelper.php b/source/packages/plg_system_mokosuitenpo/src/Helper/GrantReportingHelper.php new file mode 100644 index 0000000..81c7a89 --- /dev/null +++ b/source/packages/plg_system_mokosuitenpo/src/Helper/GrantReportingHelper.php @@ -0,0 +1,65 @@ +get(DatabaseInterface::class); + + $db->setQuery($db->getQuery(true) + ->select('g.*, cd.name AS funder_name') + ->from($db->quoteName('#__mokosuitenpo_grants', 'g')) + ->join('LEFT', $db->quoteName('#__contact_details', 'cd') . ' ON cd.id = g.funder_contact_id') + ->where('g.id = ' . (int) $grantId)); + $grant = $db->loadObject(); + + if (!$grant) return (object) ['found' => false]; + + // Get expenses charged to this grant's fund + $db->setQuery($db->getQuery(true) + ->select('category, COUNT(*) AS count, COALESCE(SUM(amount), 0) AS spent') + ->from('#__mokosuitenpo_fund_expenses') + ->where('fund_id = ' . (int) ($grant->fund_id ?? 0)) + ->group('category') + ->order('spent DESC')); + $grant->spending_by_category = $db->loadObjectList() ?: []; + + $grant->total_spent = array_sum(array_column($grant->spending_by_category, 'spent')); + $grant->remaining = max(0, (float) ($grant->amount ?? 0) - (float) $grant->total_spent); + $grant->utilization_pct = (float) ($grant->amount ?? 0) > 0 + ? round((float) $grant->total_spent / (float) $grant->amount * 100, 1) : 0; + + return $grant; + } + + /** + * Get grants requiring reports soon. + */ + public static function getUpcomingReportDeadlines(int $days = 30): array + { + $db = Factory::getContainer()->get(DatabaseInterface::class); + + $db->setQuery($db->getQuery(true) + ->select('g.id, g.title, g.funder, g.report_due_date, g.amount') + ->select('DATEDIFF(g.report_due_date, CURDATE()) AS days_until_due') + ->from($db->quoteName('#__mokosuitenpo_grants', 'g')) + ->where($db->quoteName('g.status') . ' IN (' . $db->quote('active') . ',' . $db->quote('reporting') . ')') + ->where($db->quoteName('g.report_due_date') . ' IS NOT NULL') + ->where($db->quoteName('g.report_due_date') . ' BETWEEN CURDATE() AND DATE_ADD(CURDATE(), INTERVAL ' . (int) $days . ' DAY)') + ->order('g.report_due_date ASC')); + + return $db->loadObjectList() ?: []; + } +} -- 2.52.0 From 60c570c5fb5da68236d74b51b1bd012fd2595c80 Mon Sep 17 00:00:00 2001 From: "gitea-actions[bot]" Date: Sun, 21 Jun 2026 05:50:28 +0000 Subject: [PATCH 14/17] chore(version): auto-bump patch 01.03.05-dev [skip ci] --- .mokogitea/workflows/issue-branch.yml | 2 +- source/packages/com_mokosuitenpo/mokosuitenpo.xml | 2 +- source/pkg_mokosuitenpo.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.mokogitea/workflows/issue-branch.yml b/.mokogitea/workflows/issue-branch.yml index 33908da..79055bf 100644 --- a/.mokogitea/workflows/issue-branch.yml +++ b/.mokogitea/workflows/issue-branch.yml @@ -5,7 +5,7 @@ # FILE INFORMATION # DEFGROUP: Gitea.Workflow # INGROUP: moko-platform.Automation -# VERSION: 01.03.04 +# VERSION: 01.03.05 # BRIEF: Auto-create feature branch when an issue is opened name: "Universal: Issue Branch" diff --git a/source/packages/com_mokosuitenpo/mokosuitenpo.xml b/source/packages/com_mokosuitenpo/mokosuitenpo.xml index 354ca2a..26ed238 100644 --- a/source/packages/com_mokosuitenpo/mokosuitenpo.xml +++ b/source/packages/com_mokosuitenpo/mokosuitenpo.xml @@ -7,7 +7,7 @@ GPL-3.0-or-later hello@mokoconsulting.tech https://mokoconsulting.tech - 01.03.04 + 01.03.05 8.3 MokoSuite NPO component Moko\Component\MokoSuiteNpo diff --git a/source/pkg_mokosuitenpo.xml b/source/pkg_mokosuitenpo.xml index 3cd7963..fa09fef 100644 --- a/source/pkg_mokosuitenpo.xml +++ b/source/pkg_mokosuitenpo.xml @@ -2,7 +2,7 @@ Package - MokoSuite NPO mokosuitenpo - 01.03.04 + 01.03.05 2026-06-11 Moko Consulting hello@mokoconsulting.tech -- 2.52.0 From c8c93fa10fed7ceec08570cf9d891b24ec766f2d Mon Sep 17 00:00:00 2001 From: "gitea-actions[bot]" Date: Sun, 21 Jun 2026 05:50:53 +0000 Subject: [PATCH 15/17] chore(version): pre-release bump to 01.03.06-dev [skip ci] --- .mokogitea/workflows/issue-branch.yml | 2 +- source/packages/com_mokosuitenpo/mokosuitenpo.xml | 2 +- source/pkg_mokosuitenpo.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.mokogitea/workflows/issue-branch.yml b/.mokogitea/workflows/issue-branch.yml index 79055bf..312605d 100644 --- a/.mokogitea/workflows/issue-branch.yml +++ b/.mokogitea/workflows/issue-branch.yml @@ -5,7 +5,7 @@ # FILE INFORMATION # DEFGROUP: Gitea.Workflow # INGROUP: moko-platform.Automation -# VERSION: 01.03.05 +# VERSION: 01.03.06 # BRIEF: Auto-create feature branch when an issue is opened name: "Universal: Issue Branch" diff --git a/source/packages/com_mokosuitenpo/mokosuitenpo.xml b/source/packages/com_mokosuitenpo/mokosuitenpo.xml index 26ed238..ec195ea 100644 --- a/source/packages/com_mokosuitenpo/mokosuitenpo.xml +++ b/source/packages/com_mokosuitenpo/mokosuitenpo.xml @@ -7,7 +7,7 @@ GPL-3.0-or-later hello@mokoconsulting.tech https://mokoconsulting.tech - 01.03.05 + 01.03.06 8.3 MokoSuite NPO component Moko\Component\MokoSuiteNpo diff --git a/source/pkg_mokosuitenpo.xml b/source/pkg_mokosuitenpo.xml index fa09fef..66ddff0 100644 --- a/source/pkg_mokosuitenpo.xml +++ b/source/pkg_mokosuitenpo.xml @@ -2,7 +2,7 @@ Package - MokoSuite NPO mokosuitenpo - 01.03.05 + 01.03.06 2026-06-11 Moko Consulting hello@mokoconsulting.tech -- 2.52.0 From c056878e29ab7a1ca70cb7eb01333ce70005c41c Mon Sep 17 00:00:00 2001 From: "gitea-actions[bot]" Date: Sun, 21 Jun 2026 06:33:28 +0000 Subject: [PATCH 16/17] chore(version): auto-bump patch 01.03.07-dev [skip ci] --- .mokogitea/workflows/issue-branch.yml | 2 +- source/packages/com_mokosuitenpo/mokosuitenpo.xml | 2 +- source/pkg_mokosuitenpo.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.mokogitea/workflows/issue-branch.yml b/.mokogitea/workflows/issue-branch.yml index 75a6963..53040d4 100644 --- a/.mokogitea/workflows/issue-branch.yml +++ b/.mokogitea/workflows/issue-branch.yml @@ -5,7 +5,7 @@ # FILE INFORMATION # DEFGROUP: Gitea.Workflow # INGROUP: mokocli.Automation -# VERSION: 01.00.00 +# VERSION: 01.03.07 # BRIEF: Auto-create feature branch when an issue is opened name: "Universal: Issue Branch" diff --git a/source/packages/com_mokosuitenpo/mokosuitenpo.xml b/source/packages/com_mokosuitenpo/mokosuitenpo.xml index ec195ea..3519144 100644 --- a/source/packages/com_mokosuitenpo/mokosuitenpo.xml +++ b/source/packages/com_mokosuitenpo/mokosuitenpo.xml @@ -7,7 +7,7 @@ GPL-3.0-or-later hello@mokoconsulting.tech https://mokoconsulting.tech - 01.03.06 + 01.03.07 8.3 MokoSuite NPO component Moko\Component\MokoSuiteNpo diff --git a/source/pkg_mokosuitenpo.xml b/source/pkg_mokosuitenpo.xml index 66ddff0..1588282 100644 --- a/source/pkg_mokosuitenpo.xml +++ b/source/pkg_mokosuitenpo.xml @@ -2,7 +2,7 @@ Package - MokoSuite NPO mokosuitenpo - 01.03.06 + 01.03.07 2026-06-11 Moko Consulting hello@mokoconsulting.tech -- 2.52.0 From c7b6803c24fa2e34ac6b0b982c9d5b308df5923f Mon Sep 17 00:00:00 2001 From: "gitea-actions[bot]" Date: Sun, 21 Jun 2026 06:33:40 +0000 Subject: [PATCH 17/17] chore(version): pre-release bump to 01.03.08-dev [skip ci] --- .mokogitea/workflows/issue-branch.yml | 2 +- source/packages/com_mokosuitenpo/mokosuitenpo.xml | 2 +- source/pkg_mokosuitenpo.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.mokogitea/workflows/issue-branch.yml b/.mokogitea/workflows/issue-branch.yml index 53040d4..53d2e35 100644 --- a/.mokogitea/workflows/issue-branch.yml +++ b/.mokogitea/workflows/issue-branch.yml @@ -5,7 +5,7 @@ # FILE INFORMATION # DEFGROUP: Gitea.Workflow # INGROUP: mokocli.Automation -# VERSION: 01.03.07 +# VERSION: 01.03.08 # BRIEF: Auto-create feature branch when an issue is opened name: "Universal: Issue Branch" diff --git a/source/packages/com_mokosuitenpo/mokosuitenpo.xml b/source/packages/com_mokosuitenpo/mokosuitenpo.xml index 3519144..efdf2d9 100644 --- a/source/packages/com_mokosuitenpo/mokosuitenpo.xml +++ b/source/packages/com_mokosuitenpo/mokosuitenpo.xml @@ -7,7 +7,7 @@ GPL-3.0-or-later hello@mokoconsulting.tech https://mokoconsulting.tech - 01.03.07 + 01.03.08 8.3 MokoSuite NPO component Moko\Component\MokoSuiteNpo diff --git a/source/pkg_mokosuitenpo.xml b/source/pkg_mokosuitenpo.xml index 1588282..a2ed576 100644 --- a/source/pkg_mokosuitenpo.xml +++ b/source/pkg_mokosuitenpo.xml @@ -2,7 +2,7 @@ Package - MokoSuite NPO mokosuitenpo - 01.03.07 + 01.03.08 2026-06-11 Moko Consulting hello@mokoconsulting.tech -- 2.52.0