The goal is to retrieve the Ship Date and Packed Date for specific items within a Sales Order. The dates are tracked based on system notes that record changes in the status of each line item. Specifically, we are interested in two scenarios:
- Ship Date: The date when an item was marked as “Fulfilled.”
- Packed Date: The date when an item was marked as “Packed.”
Ship Date:
MAX(Case When ({item.id} IN (‘1001′,’1002′,’1003′,’1004′,’1005′) AND {linesystemnotes.field}=’Fulfilled’) then {linesystemnotes.date} end)
Packed date:
MAX(Case When ({item.id} IN (‘1001′,’1002′,’1003′,’1004′,’1005′) AND {linesystemnotes.field}=’Packed’) then {linesystemnotes.date} end)