From 3070d1ef0182b4e3d098cdd8c2b32bfd93176314 Mon Sep 17 00:00:00 2001 From: jorgep Date: Tue, 18 Jun 2024 10:04:21 +0200 Subject: [PATCH] refactor: refs #6238 drop useless round --- .../methods/travel/extraCommunityFilter.js | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/modules/travel/back/methods/travel/extraCommunityFilter.js b/modules/travel/back/methods/travel/extraCommunityFilter.js index 107bf6f39..dcb704ff5 100644 --- a/modules/travel/back/methods/travel/extraCommunityFilter.js +++ b/modules/travel/back/methods/travel/extraCommunityFilter.js @@ -139,18 +139,18 @@ module.exports = Self => { IF(pkg.volume, pkg.volume, pkg.width * pkg.depth * pkg.height) / 1000000 ) as DECIMAL(10,0) ) as volumeKg, - ROUND(GREATEST( - CAST(SUM(b.weight * b.stickers) AS INT), - CAST( - SUM(vc.aerealVolumetricDensity * - b.stickers * - IF(pkg.volume, - pkg.volume, - pkg.width * pkg.depth * pkg.height - ) / 1000000 - ) AS INT + GREATEST( + CAST(SUM(b.weight * b.stickers) AS INT), + CAST( + SUM(vc.aerealVolumetricDensity * + b.stickers * + IF(pkg.volume, + pkg.volume, + pkg.width * pkg.depth * pkg.height + ) / 1000000 + ) AS INT ) - ) / t.kg * 100, 0) percentageKg + / t.kg * 100, 0) percentageKg FROM travel t LEFT JOIN supplier s ON s.id = t.cargoSupplierFk LEFT JOIN entry e ON e.travelFk = t.id