feat(128): erli orders import

Phase 128 complete:
- add Erli /inbox order import with safe mark-read ACK
- add cron/manual import controls and sync state tracking
- map Erli orders into orderPRO aggregates with mapper tests and docs
This commit is contained in:
2026-05-15 23:54:22 +02:00
parent 3ea8cdc941
commit 2565d9b754
23 changed files with 1989 additions and 35 deletions

View File

@@ -5,19 +5,19 @@
See: .paul/PROJECT.md (updated 2026-05-07)
**Core value:** Sprzedawca moze obslugiwac zamowienia ze wszystkich kanalow sprzedazy i nadawac przesylki bez przelaczania sie miedzy platformami.
**Current focus:** v3.8 Erli Marketplace Integration - Phase 127 complete; Phase 128 ready to plan.
**Current focus:** v3.8 Erli Marketplace Integration - Phase 128 complete; Phase 129 ready to plan.
## Current Position
Milestone: v3.8 Erli Marketplace Integration
Phase: 128 of 132 (Erli Orders Import)
Phase: 129 of 132 (Erli Status Mapping + Sync)
Plan: Not started
Status: Ready to plan
Last activity: 2026-05-15 23:26 - Phase 127 complete; transitioned to Phase 128
Last activity: 2026-05-15 23:52 - Phase 128 complete; transitioned to Phase 129
Progress:
- Milestone v3.8: [##--------] ~16% (Phase 127 complete)
- Phase 128: [----------] 0% (not planned)
- Milestone v3.8: [####------] ~33% (Phases 127-128 complete)
- Phase 129: [----------] 0% (not planned)
## Loop Position
@@ -29,10 +29,10 @@ PLAN -> APPLY -> UNIFY
## Session Continuity
Last session: 2026-05-15 23:26
Stopped at: Phase 127 complete; Phase 128 ready to plan
Next action: $paul-plan for Phase 128 (Erli Orders Import)
Resume file: .paul/ROADMAP.md
Last session: 2026-05-15 23:52
Stopped at: Phase 128 complete
Next action: $paul-plan for Phase 129 (Erli Status Mapping + Sync)
Resume file: .paul/phases/128-erli-orders-import/128-01-SUMMARY.md
## Pending parallel work
- None — Phase 118, 121, 122 wszystkie zacommitowane (8f14851, 360eef1).
@@ -66,6 +66,8 @@ Branch: main
- Phase 121 transition note (rozwiązane): commit 360eef1 obejmuje Phase 121 i Phase 122 razem; per-faza hunk-split nie wykonany ze względu na nakładkowe modyfikacje plików.
- Phase 126 follow-up: manual smoke `/orders/1090/invoice/create` (JDG, NIP 5170167517) -> "Imie i nazwisko"="JACEK PYZIAK", "Nazwa firmy"="Project-Pro Pyziak Jacek" niezmieniona; drugi smoke na zamowieniu spolki z aktywnym KRS; `curl /api/nip/lookup?nip=5170167517` -> `data.is_jdg=true`.
- Phase 127 follow-up: uruchom `php bin/migrate.php` gdy lokalny MySQL/XAMPP jest online, zapisz prawdziwy klucz Erli w `/settings/integrations/erli`, wykonaj realny test polaczenia i potwierdz wpis w hubie integracji.
- Phase 128 follow-up: uruchom `php bin/migrate.php`, wlacz import Erli w `/settings/integrations/erli`, kliknij `Importuj zamowienia teraz`, potwierdz `orders.source='erli'` i sprawdz, ze przy bezblednym batchu inbox ACK `POST /inbox/mark-read` nie zostawia nieprzeczytanych zdarzen.
- Phase 128 verification gap: `vendor/bin/phpunit` nie istnieje w checkoutcie, wiec test `tests/Unit/ErliOrderMapperTest.php` nie zostal uruchomiony przez PHPUnit; wykonano `php -l` i runtime smoke mappera.
## Deferred to Next Milestones
@@ -76,4 +78,4 @@ Branch: main
## Skill Requirements
- `sonar-scanner` required after APPLY; Phase 116, Phase 117, Phase 121 and Phase 122 gaps documented because CLI was not available in PATH.
- `sonar-scanner` required after APPLY; Phase 116, Phase 117, Phase 121, Phase 122 and Phase 128 gaps documented because CLI was not available in PATH.