This commit is contained in:
parent
87feddaedb
commit
3070d1ef01
|
@ -139,18 +139,18 @@ module.exports = Self => {
|
||||||
IF(pkg.volume, pkg.volume, pkg.width * pkg.depth * pkg.height) / 1000000
|
IF(pkg.volume, pkg.volume, pkg.width * pkg.depth * pkg.height) / 1000000
|
||||||
) as DECIMAL(10,0)
|
) as DECIMAL(10,0)
|
||||||
) as volumeKg,
|
) as volumeKg,
|
||||||
ROUND(GREATEST(
|
GREATEST(
|
||||||
CAST(SUM(b.weight * b.stickers) AS INT),
|
CAST(SUM(b.weight * b.stickers) AS INT),
|
||||||
CAST(
|
CAST(
|
||||||
SUM(vc.aerealVolumetricDensity *
|
SUM(vc.aerealVolumetricDensity *
|
||||||
b.stickers *
|
b.stickers *
|
||||||
IF(pkg.volume,
|
IF(pkg.volume,
|
||||||
pkg.volume,
|
pkg.volume,
|
||||||
pkg.width * pkg.depth * pkg.height
|
pkg.width * pkg.depth * pkg.height
|
||||||
) / 1000000
|
) / 1000000
|
||||||
) AS INT
|
) AS INT
|
||||||
)
|
)
|
||||||
) / t.kg * 100, 0) percentageKg
|
/ t.kg * 100, 0) percentageKg
|
||||||
FROM travel t
|
FROM travel t
|
||||||
LEFT JOIN supplier s ON s.id = t.cargoSupplierFk
|
LEFT JOIN supplier s ON s.id = t.cargoSupplierFk
|
||||||
LEFT JOIN entry e ON e.travelFk = t.id
|
LEFT JOIN entry e ON e.travelFk = t.id
|
||||||
|
|
Loading…
Reference in New Issue