Skip to content

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

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

fix: write tracking to versandpakete table for UI visibility (#247)#248
Avatarsia wants to merge 1 commit intoOpenXE-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

…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 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.
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