refactor(shipping): simplify dimensional calculations and remove unused script

This commit is contained in:
Rodrigo Rodriguez (Pragmatismo) 2026-01-26 11:44:55 -03:00
parent 17a614974c
commit 20e502e0cb

View file

@ -21,8 +21,5 @@ volumetric_weight = volume / 5000
actual_weight = product.gross_weight * quantity actual_weight = product.gross_weight * quantity
billable = MAX actual_weight, volumetric_weight billable = MAX actual_weight, volumetric_weight
ground_cost = 5.99 + billable * 1.5
express_cost = 12.99 + billable * 2.5
overnight_cost = 24.99 + billable * 4.0
RETURN WITH product_id AS product_id, quantity AS quantity, length AS product.length, width AS product.width, height AS product.height, weight AS product.gross_weight, volume_cm3 AS volume, billable_weight_kg AS billable, ground_cost AS ground_cost, ground_days AS "5-7", express_cost AS express_cost, express_days AS "2-3", overnight_cost AS overnight_cost, overnight_days AS "1" RETURN WITH product_id AS product_id, quantity AS quantity, length AS product.length, width AS product.width, height AS product.height, weight AS product.gross_weight, volume_cm3 AS volume, billable_weight_kg AS billable