Merge branch 'feat/depresiasi-v2' into 'development'

adjust

See merge request mbugroup/lti-api!601
This commit is contained in:
Giovanni Gabriel Septriadi
2026-06-06 01:12:45 +00:00
2 changed files with 2 additions and 2 deletions
@@ -3216,7 +3216,7 @@ func (s *repportService) parseExpenseDepreciationV2Query(ctx *fiber.Ctx) (*valid
return nil, err
}
if locationScope.Restrict {
if locationScope.Restrict && locationID > 0 {
allowed := toInt64Slice(locationScope.IDs)
if len(allowed) == 0 {
return nil, fiber.NewError(fiber.StatusForbidden, "no location access")
@@ -96,7 +96,7 @@ type ExpenseDepreciationQuery struct {
type ExpenseDepreciationV2Query struct {
Limit int `query:"limit" validate:"omitempty,min=1,max=90"`
Period string `query:"period" validate:"required,datetime=2006-01-02"`
LocationID int64 `query:"location_id" validate:"required,gt=0"`
LocationID int64 `query:"location_id" validate:"omitempty,gt=0"`
ProjectFlockID int64 `query:"project_flock_id" validate:"required,gt=0"`
}