diff --git a/db/routines/vn/procedures/entry_getTransfer.sql b/db/routines/vn/procedures/entry_getTransfer.sql index 2c9fe8577..414f62429 100644 --- a/db/routines/vn/procedures/entry_getTransfer.sql +++ b/db/routines/vn/procedures/entry_getTransfer.sql @@ -179,14 +179,14 @@ BEGIN quantity - MOD(quantity , `grouping`) subQuantity, MOD(quantity, `grouping`) soll, ROUND((IF(volume > 0,volume, width * `depth` * IF(height = 0, `size` + 10, height))) / packing, 0) cm3, - buyingValue + comissionValue + freightValue Cost, + buyingValue + comissionValue + freightValue cost, @carriage := ROUND((IF(volume > 0, volume, width * `depth` * IF(height = 0, `size` + 10, height))) * m3 / 1000000 / Packing, 3) carriage, @comission := ROUND((buyingValue + comissionValue + freightValue) * commission / 100, 3) commission, ROUND(@packaging := (returnCost + IF(isPackageReturnable != 0, 0, value)) / packing, 3) packaging, @cost := IFNULL((buyingValue + comissionValue + freightValue), 0) + IFNULL(@packaging, 0) + IFNULL(@carriage, 0) + - IFNULL(@comission, 0) cost, + IFNULL(@comission, 0) expense, @rate3 := ROUND(@cost / ( (100 - rate3 - promo) / 100), 2) rate3, ROUND(@rate3 * (1 + ((rate2 - rate3)/100)), 2) rate2, FALSE selected