Files
lti-api/internal/modules/marketing
ValdiANS 981fb98248 fix: use soDate instead of deliveryDate for Delivery Order rows in marketing export
In the Excel export, Delivery Order rows were writing `group.DeliveryDate`
(the actual delivery date) to column B ("Tanggal"), while the web UI always
shows `so_date` for every row. This caused a visible mismatch — e.g. DO-01954
displayed "31 Mei 2026" on the web but "01-06-2026" in the exported file.

Changes:
- Remove the `doDate` variable from the DO branch; both the empty-deliveries
  fallback row and each per-delivery row now write `soDate` to column B,
  consistent with what the web shows
- Fix a pre-existing nil pointer dereference: `prod.ProductWarehouse.Warehouse`
  was accessed without a nil guard in the SO branch
- Update the export test to match the current 17-column layout (headers and
  row assertions were stale), and add a regression case that explicitly
  asserts a DO row with soDate=2026-05-31 / deliveryDate=2026-06-01 produces
  "31-05-2026" in column B

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-02 16:48:06 +07:00
..
2026-05-29 00:59:42 +07:00