Code:
SELECT _DelDtl
IF cStatus='Yes' THEN
_DelPcs=_DelQty.DelQty/Lot_Desp.Tot_Desp*Colr_Desp.Tot_Desp
REPLACE Delvr_Pcs WITH IIF((_DelPcs - int(_DelPcs)) = 0.5,round((_DelQty.DelQty/Lot_Desp.Tot_Desp*Colr_Desp.Tot_Desp),0)- 0.5,round(_DelQty.DelQty/Lot_Desp.Tot_Desp*Colr_Desp.Tot_Desp,0))
ELSE
IF Lot_CI.Tot_CI=0
SELECT _DelDtl
REPLACE Delvr_Pcs WITH 0
ELSE
SELECT _DelDtl
_DelPcs=_DelQty.DelQty/Lot_CI.Tot_CI*_DelDtl.nCiQty
REPLACE Delvr_Pcs WITH IIF((_DelPcs- int(_DelPcs)) = 0.5,round((_DelQty.DelQty/Lot_CI.Tot_CI*_DelDtl.nCiQty),0)- 0.5,round(_DelQty.DelQty/Lot_CI.Tot_CI*_DelDtl.nCiQty,0))
ENDIF
ENDIF
This is my code and I did this for only 0.5 values.
as and example I can get ,
Code:
stylecode lotname lotcolor del_pcs
26752 A1 WHITE 1.5
26752 A1 BLACK 1.5
26752 A1 RED 1.5
26752 A1 BLUE 1.5
Now I have another and I need to get it like , 207/4*1=51.75. But it comes as 52 and I want to get my output as 207.
How can I get values with decimals and replace them into my _DelDtl? I need to replace them with decimals using my IIF statement.
Thank you