Skip to content

fix: write tracking to versandpakete table for UI visibility (#247)#248

Open
Avatarsia wants to merge 1 commit into
OpenXE-org:masterfrom
Avatarsia:fix/versandpakete-247
Open

fix: write tracking to versandpakete table for UI visibility (#247)#248
Avatarsia wants to merge 1 commit into
OpenXE-org:masterfrom
Avatarsia:fix/versandpakete-247

Conversation

@Avatarsia

Copy link
Copy Markdown
Contributor

Summary

  • API tracking creation (POST /v1/trackingnummern) now also writes to the versandpakete table
  • Sets lieferschein.versand_status = 1 so the Pakete tab shows the tracking

Problem

The API wrote tracking numbers only to the legacy versand table, but the UI Pakete tab reads exclusively from versandpakete. Tracking created via API was invisible in the UI.

Root Cause

The old versand-based display in lieferschein.php was replaced with the new versandpakete-based system, but the REST API was never updated to match.

API (before fix) UI API (after fix)
Writes to versand Yes No Yes (backward compat)
Writes to versandpakete No Yes Yes
Sets versand_status No Yes Yes

Changes

classes/Modules/Api/Controller/Version1/TrackingNumberController.php:

  • After existing versand INSERT, also INSERT into versandpakete with lieferschein_ohne_pos link
  • Sets lieferschein.versand_status = 1

Test plan

  • Create tracking via API — verify it appears in UI Pakete tab
  • Create tracking via UI — verify unchanged behavior
  • Verify versand table still gets the entry (backward compat)

Fixes #247

Avatarsia pushed a commit to Avatarsia/OpenXE that referenced this pull request Apr 9, 2026
All four are single-file Avatarsia-authored bug fixes that are
also open upstream PRs on openxe-org:

- fix/250-wiedervorlage-sidebar-counter (PR OpenXE-org#253)
  www/eproosystem.php +2/-2: reactivate Wiedervorlagen counter

- fix/dateien-stichwoerter-245 (PR OpenXE-org#246)
  classes/Modules/Api/Controller/Version1/FileController.php +2/-2:
  fix variable scoping in POST /v1/dateien stichwoerter

- fix/versandpakete-247 (PR OpenXE-org#248)
  classes/Modules/Api/Controller/Version1/TrackingNumberController.php +25:
  write tracking numbers into the versandpakete table so the UI
  shows them

- fix/player-custom-module-support (PR OpenXE-org#256)
  phpwf/class.player.php +12/-2: support _custom.php extension
  files for page controllers, analogous to class.erpapi_custom.php

Each branch is based on an older origin/master snapshot, but
since origin/master is strictly behind upstream/master (zero
divergent commits), git merges only the new commits during
integration without re-applying the upstream drift.
@Avatarsia
Avatarsia force-pushed the fix/versandpakete-247 branch 2 times, most recently from eeda701 to 91fb198 Compare May 7, 2026 20:18
@Avatarsia

Copy link
Copy Markdown
Contributor Author

Force-Push-Hinweis: Branch wurde direkt auf upstream/master rebased, sodass der Diff jetzt nur noch den eigentlichen Fix zeigt — ohne die ~150 Fork-internen Commits, die vorher mitliefen. Code-Endstand byte-identisch, nur die Commit-SHAs sind neu.

Bestehende Inline-Kommentare auf alten SHAs erscheinen jetzt als „outdated" — gerne nochmal kommentieren auf den neuen Commits, falls noch was offen ist.

Avatarsia pushed a commit to Avatarsia/OpenXE that referenced this pull request May 20, 2026
All four are single-file Avatarsia-authored bug fixes that are
also open upstream PRs on openxe-org:

- fix/250-wiedervorlage-sidebar-counter (PR OpenXE-org#253)
  www/eproosystem.php +2/-2: reactivate Wiedervorlagen counter

- fix/dateien-stichwoerter-245 (PR OpenXE-org#246)
  classes/Modules/Api/Controller/Version1/FileController.php +2/-2:
  fix variable scoping in POST /v1/dateien stichwoerter

- fix/versandpakete-247 (PR OpenXE-org#248)
  classes/Modules/Api/Controller/Version1/TrackingNumberController.php +25:
  write tracking numbers into the versandpakete table so the UI
  shows them

- fix/player-custom-module-support (PR OpenXE-org#256)
  phpwf/class.player.php +12/-2: support _custom.php extension
  files for page controllers, analogous to class.erpapi_custom.php

Each branch is based on an older origin/master snapshot, but
since origin/master is strictly behind upstream/master (zero
divergent commits), git merges only the new commits during
integration without re-applying the upstream drift.
…org#247)

The API wrote tracking numbers only to the legacy 'versand' table,
but the UI Pakete tab reads exclusively from 'versandpakete'.
Now also inserts into versandpakete with lieferschein_ohne_pos link
and sets lieferschein.versand_status = 1.

Fixes: OpenXE-org#247
@Avatarsia
Avatarsia force-pushed the fix/versandpakete-247 branch from 91fb198 to 39e6585 Compare May 20, 2026 10:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: API-Trackingnummern erscheinen nicht im UI (versand vs versandpakete Tabellen-Mismatch)

1 participant