cherokee
6th October 2003, 22:12
Hello everyone,
Does anyone knows why in BaaN IVc in the Item Master weight field is in Kg only?
Regards,
Carlos Gonzalez
vahdani
6th October 2003, 23:02
The weight field is purely for information and is not used as such anywhere else in Baan. You can in fact put any other numeric info in this field and change the label (Weight in ounces, Viscosity,..) to suit you.
cherokee
6th October 2003, 23:13
It seems ... but the field has this code...
then what for it converts to the base unit?
field.tiitm001.wght: |EV#10225487
on.input: |EV#10225487
if in.ret = CTRL_R then
select tcmcs001.cuni
from tcmcs001
where tcmcs001.cuni = "kg "
or tcmcs001.cuni = " kg"
order by tcmcs001._index1
selectdo
tiitm001.wght = tiitm.dll0003.conv.factor("",
tiitm001.reli, tiitm001.citg,
tiitm001.cuni, tcmcs001.cuni)
if tiitm001.wght <> 0 then
tiitm001.wght = 1/tiitm001.wght |#10225487.n
break
endif
endselect
input.again()
endif
vahdani
6th October 2003, 23:28
Hi Carlos
the piece of code dates back to 1996 and is there to set the default weight when Ctrl-R is pressed. I would concider this to be a historic relict. As you can see "kg" is hardcoded in the script which is in any case bad programming practice! Probably done by a novice programmer:)
Martin Jung
7th October 2003, 18:19
and is not used as such anywhere else in Baan
except Transportation :)
Regards,
Martin