Commit Graph

12 Commits

Author SHA1 Message Date
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
ValdiANS 4b9e86427d feat: add date range filter to marketing list API
Added start_date, end_date, and filter_by query parameters to the
GET /api/marketing/ endpoint. Users can now filter marketing records
by a date range using either so_date (Sales Order date, default) or
created_at as the target column.

Changes:
- validation: added StartDate, EndDate (YYYY-MM-DD format), and
  FilterBy (oneof: so_date, created_at) to DeliveryOrderQuery struct
- controller: parse the three new query params in GetAll handler
- service: apply >=start / <end+1day date range filter in the query
  modifier using the existing utils.ParseDateRangeForQuery helper

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-02 13:19:52 +07:00
giovanni bfef144668 add filter warehouse to marketing;add detail export recording egg; adjust format export marketing 2026-05-31 16:23:22 +07:00
giovanni ef985b5da5 fix list penjualan and export penjualan dengan qty 2026-05-25 14:50:01 +07:00
giovanni 495f5f5cc1 adjust export format purchase and filter 2026-05-21 11:48:24 +07:00
giovanni 0357531e73 add sorting at marketing 2026-05-07 14:03:17 +07:00
Adnan Zahir e24e2ff123 feat: filter improvement 2026-04-23 00:17:24 +07:00
giovanni ff630a1ed0 add export po and marketing 2026-04-22 19:22:29 +07:00
Adnan Zahir 5e7c51e9c2 feat: export input progress report for expenses, marketings, purchases, and recordings 2026-04-21 21:24:19 +07:00
Adnan Zahir 0d04397bd5 feat: bulk approve endpoint for marketings and expenses 2026-04-21 20:06:37 +07:00
ragilap 77ec805931 [FEAT/BE] Add filter delivery order and adjust response purchase 2026-02-06 01:02:03 +07:00
aguhh18 d7c543bc9d Refactor[BE]: : delete sales orders and delivery order folder and refactor to just one root marketing folder 2025-12-09 19:24:17 +07:00