mirror of
https://gitlab.com/mbugroup/lti-api.git
synced 2026-05-20 13:31:56 +00:00
FEAT[BE]: add default filterby become so_date in report markeing
This commit is contained in:
@@ -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"`
|
||||
|
||||
Reference in New Issue
Block a user