diff --git a/internal/modules/master/production-standards/services/production-standard.service.go b/internal/modules/master/production-standards/services/production-standard.service.go index 406dccdc..b2128e88 100644 --- a/internal/modules/master/production-standards/services/production-standard.service.go +++ b/internal/modules/master/production-standards/services/production-standard.service.go @@ -387,16 +387,12 @@ func (s productionStandardService) EnsureWeekAvailable(ctx context.Context, stan return nil } - upperCategory := strings.ToUpper(category) - weekBase := 1 - if upperCategory == string(utils.ProjectFlockCategoryLaying) { - weekBase = config.LayingWeekStart() - } - week := ((day - 1) / 7) + weekBase + week := ((day - 1) / 7) + 1 if week <= 0 { return nil } + upperCategory := strings.ToUpper(category) if upperCategory == string(utils.ProjectFlockCategoryLaying) { detail, err := s.ProductionStandardDetailRepo.GetByStandardIDAndWeek(ctx, standardID, week) if err != nil {