Skip to content

Commit

Permalink
Merge branch 'integrationTesting' into B-21439-INT
Browse files Browse the repository at this point in the history
  • Loading branch information
CoryKleinjanCACI authored Jan 31, 2025
2 parents 70256a1 + 94d096b commit 0d9510d
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions pkg/services/move/move_fetcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -283,16 +283,16 @@ func (f moveFetcherBulkAssignment) FetchMovesForBulkAssignmentPaymentRequest(app
sqlQuery := `
SELECT
moves.id,
payment_requests.requested_at AS earliest_date
FROM payment_requests
INNER JOIN moves on moves.id = payment_requests.move_id
min(payment_requests.requested_at) AS earliest_date
FROM moves
INNER JOIN orders ON orders.id = moves.orders_id
INNER JOIN service_members ON orders.service_member_id = service_members.id
INNER JOIN payment_requests on payment_requests.move_id = moves.id
LEFT JOIN move_to_gbloc ON move_to_gbloc.move_id = moves.id
WHERE payment_requests.status = 'PENDING'
AND moves.show = $1
WHERE moves.show = $1
AND (orders.orders_type NOT IN ($2, $3, $4))
AND moves.tio_assigned_id IS NULL `
AND moves.tio_assigned_id IS NULL
AND payment_requests.status = 'PENDING' `
if gbloc == "USMC" {
sqlQuery += `
AND service_members.affiliation ILIKE 'MARINES' `
Expand All @@ -302,8 +302,8 @@ func (f moveFetcherBulkAssignment) FetchMovesForBulkAssignmentPaymentRequest(app
AND move_to_gbloc.gbloc = '` + gbloc + `' `
}
sqlQuery += `
GROUP BY moves.id, payment_requests.id
ORDER BY payment_requests.requested_at ASC`
GROUP BY moves.id
ORDER BY earliest_date ASC`

err := appCtx.DB().RawQuery(sqlQuery,
models.BoolPointer(true),
Expand Down

0 comments on commit 0d9510d

Please sign in to comment.