Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/Services/Estimate/EstimatePublicLinkService.php
Original file line number Diff line number Diff line change
Expand Up @@ -311,10 +311,10 @@ private function propagateEstimateStatus(int $estimateId): void
*/
private function fetchJobsWithItems(int $estimateId): array
{
$jobsStmt = $this->connection->pdo()->prepare('SELECT * FROM estimate_jobs WHERE estimate_id = :estimate_id ORDER BY position ASC');
$jobsStmt = $this->connection->pdo()->prepare('SELECT * FROM estimate_jobs WHERE estimate_id = :estimate_id ORDER BY display_order ASC');
$jobsStmt->execute(['estimate_id' => $estimateId]);

$itemStmt = $this->connection->pdo()->prepare('SELECT * FROM estimate_items WHERE job_id = :job_id ORDER BY position ASC');
$itemStmt = $this->connection->pdo()->prepare('SELECT * FROM estimate_items WHERE estimate_job_id = :job_id ORDER BY id ASC');

$results = [];
foreach ($jobsStmt->fetchAll(PDO::FETCH_ASSOC) as $jobRow) {
Expand Down
Loading