FEAT[BE]: add default filterby become so_date in report markeing

This commit is contained in:
aguhh18
2026-01-20 22:42:16 +07:00
parent ad3bb0e29a
commit d50ab7cc97
3 changed files with 8 additions and 5 deletions
@@ -175,7 +175,6 @@ func (s *repportService) GetMarketing(c *fiber.Ctx, params *validation.Marketing
for customerID := range customerGroups {
transactions, err := s.CustomerPaymentRepo.GetCustomerPaymentTransactions(c.Context(), &customerID)
if err != nil {
s.Log.Warnf("Failed to get transactions for customer %d: %v", customerID, err)
continue
}
@@ -26,7 +26,7 @@ type MarketingQuery struct {
AreaId int64 `query:"area_id" validate:"omitempty"`
LocationId int64 `query:"location_id" validate:"omitempty"`
MarketingType string `query:"marketing_type" validate:"omitempty,oneof=ayam telur trading"`
FilterBy string `query:"filter_by" validate:"omitempty,oneof=so_date realization_date"`
FilterBy string `query:"filter_by" validate:"omitempty,oneof= so_date realization_date"`
StartDate string `query:"start_date" validate:"omitempty,datetime=2006-01-02"`
EndDate string `query:"end_date" validate:"omitempty,datetime=2006-01-02"`
SortBy string `query:"sort_by" validate:"omitempty,oneof=so_date realization_date customer warehouse product sales_person vehicle_number sales_amount hpp_amount qty average_weight total_weight sales_price hpp_price aging_days"`