From dbc5c6105031216c1e080c21f844fa4f0ce1a338 Mon Sep 17 00:00:00 2001 From: alexm Date: Mon, 2 May 2022 14:53:03 +0200 Subject: [PATCH] fix(diver-route): supplierAgencyTerm --- print/templates/reports/driver-route/sql/routes.sql | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/print/templates/reports/driver-route/sql/routes.sql b/print/templates/reports/driver-route/sql/routes.sql index 3fbe59b0d..4b6f6a318 100644 --- a/print/templates/reports/driver-route/sql/routes.sql +++ b/print/templates/reports/driver-route/sql/routes.sql @@ -14,5 +14,6 @@ FROM route r LEFT JOIN account.user u ON u.id = w.userFk LEFT JOIN agencyMode am ON am.id = r.agencyModeFk LEFT JOIN agency a ON a.id = am.agencyFk - LEFT JOIN supplier s ON s.id = a.supplierFk + LEFT JOIN supplierAgencyTerm sa ON sa.agencyFk = a.id + LEFT JOIN supplier s ON s.id = sa.supplierFk WHERE r.id IN(?) \ No newline at end of file