Repository navigation
feat(pipelinq): build pos-refund-limit - #3739
Open
rubenvdlinde wants to merge 7 commits into
Open
rubenvdlinde wants to merge 7 commits into
rubenvdlinde wants to merge 7 commits into
Conversation
Assisted-by: ClaudeCode:claude-opus-5-5
rubenvdlinde
requested review from
Rem-Dam,
SudoThijn,
WilcoLouwerse,
bbrands02,
remko48 and
rjzondervan
as code owners
November 13, 2026 11:19
… keys [skip ci] Both this branch and another open branch appended keys at the end of the catalogues, so the two conflicted whenever merged together. The six keys now sit after "Refund amount"; no value changes. Assisted-by: ClaudeCode:claude-opus-5-5
…rule [skip ci] The complete transition lost its pos_managers authorization in favour of PosRefundManagerGuard, but the schema version stayed 1.0.0, so an upgraded instance's import would skip the schema and keep refusing every till user. The access change itself is the owner's decision 390 that the change cites. Assisted-by: ClaudeCode:claude-opus-5-5
# Conflicts: # src/views/settings/adminSections.json # tests/vitest/adminSections.spec.js
…he refund screen PosRefundManagerGuard read the limit through Application::APP_ID, which this file no longer imports after development moved the constant, so the guard would have failed with an unknown class. The refund limit helpers and the refund screen's new methods carry their @SPEC, and the guard's tests name their arguments. Assisted-by: ClaudeCode:claude-opus-5-5
Contributor
Quality Report — ConductionNL/pipelinq @
|
| Check | PHP | Vue | Security | License | Tests |
|---|---|---|---|---|---|
| lint | ✅ | ||||
| phpcs | ✅ | ||||
| phpmd | ❌ | ||||
| psalm | ❌ | ||||
| phpstan | ✅ | ||||
| phpmetrics | ✅ | ||||
| eslint | ✅ | ||||
| stylelint | ✅ | ||||
| build | ✅ | ||||
| check-manifest | ✅ | ||||
| check-vue-demi | ✅ | ||||
| test-l10n | ✅ | ||||
| format | ❌ | ||||
| check-schema-l10n | ❌ | ||||
| check-l10n-js | ✅ | ||||
| check-e2e-nav | ✅ | ||||
| check-lib-link | ✅ | ||||
| composer | ✅ | ✅ 109/109 | |||
| npm | ✅ | ✅ 646/646 | |||
| app:check-code | ⏭️ | ||||
| info.xml | ✅ | ||||
| REUSE | ❌ | ||||
| lockfile sync | ✅ | ||||
| PHPUnit | ❌ | ||||
| Newman | ❌ | ||||
| Playwright | ⏭️ deferred: E2E runs locally and on the promotion path only. This pull request targets development, so the suite is asked once per promotion into beta and main rather than once per push per open pull request. Run it locally with npx playwright test, or from the Actions tab on a branch with no open pull request into development. |
||||
| Hydra gates | ❌ |
Quality workflow — 2026-11-20 04:39 UTC
Download the full PDF report from the workflow artifacts.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Builds
openspec/changes/pos-refund-limit(REQ-PLG-007): a refund at or below a configurable limit needs no manager.Tasks done
pos.refund_limit(euros, empty by default) inSettingsService's tunables, edited in a "Refunds" section on the POS tab of the admin settings (adminSections.json,CnSettingsFieldsSection). A comma or a dot is accepted; empty, non-numeric or negative means no limit.PosRefundManagerGuard: a manager or admin is handled exactly as before. A non-manager may nowcompletea refund when a limit is set, the refund's gross (amount + tax, as recomputed server side) is at or below it, the original transaction exists andPosAccessPolicy::canAccessTransaction()admits them (own cashier, POS group or admin); the over-refund cap then applies as it does for a manager. Above the limit the till user gets "Een retour boven €X moet een beheerder verwerken."; with no limit the old message and behaviour stay.rejectstays manager-only (the change does not ask to open it).pipelinq_register.json, posRefundcomplete): the staticauthorization: ["pos_managers"]list is removed and the description says the guard decides. OpenRegister enforces that list before the guard runs, so with it in place a till user could never reach the limit rule. Managers are still checked by the guard (configured manager group or admin), so nobody who could not complete a refund before can now complete one above the limit.rejectkeeps its list.src/services/posRefundLimit.js. The server guard remains the authority.Tasks left, and why
@spectags are on the new methods and tests; the e2e test per scenario needs a live till and is not written here.Tests added
tests/Unit/Lifecycle/PosRefundManagerGuardTest.php+8 (18 in the file). A deliberately broken limit comparison made one fail.tests/vitest/posRefundLimit.spec.js(5),tests/vitest/posRefundBoardLook.spec.js+1 (the card's sentence for no limit, below and above),tests/vitest/adminSections.spec.jsregisters the new section.Checks
php -l, phpcs and phpstan clean on the touched PHP; eslint clean on the touched JS/Vue;
test:l10npasses, en/nl strings added and the JS catalogues rebuilt. PHP unit suite before: 6784 tests, 1 failure; after: 6792 tests, the same 1 failure (CrmPrivilegeRefusalGoldenTestTicketWooRequestController, inherited from development). Vitest before: 4327 passed; after: 4334 passed.Generated by Claude Code