ckassab
4th December 2004, 01:17
Hi:
Is there a standard baan function or dll to convert a quantity between units?
Thank you for your help
Carlos Kassab
theierm
6th December 2004, 09:36
function extern domain tcconv tiitm.dll0003.conv.factor(
domain tccprj i.cprj,
domain tcitem i.item,
domain tccitg i.citg,
domain tccuni i.basu,
domain tccuni i.unit,
...)
|
| Purpose: For a given (customized) item the conversion factor is returned.
| On three levels the conversion can be present. This routine
| will search as follows:
| 1 item level
| 2 itemgroup level
| 3 general level
| Input : - project (mandatory if it concerns a customized item)
| - itemcode, (mandatory if you want to search on item level)
| - itemgroup (not mandatory but it will speed up things)
| - base unit (not mandatory but it will speed up things,
| mandatory if you don't fill in itemcode)
| - Unit (mandatory)
| If you don't specify itemgroup or base unit this routine will
| read these fields from the item table or unit*parameter table.
| - Other available arguments:
| Number of args | Meaning
| -----------------------------------------------------------
| 5 | arg. 6 will be assumed to be true.
| 6 | When no conv. factor has been found and this
| | flag = true; '0' will be returned else '1'
| 12 | arg. 6 - 12 : all record fields (tiitm004) are
| | returned; in sequence : cprj, item,
| | citg, basu, cuni, conv.factor, rpow.
| 13 | arg. 6 -12 are the same as above.
| | arg. 13 has the same meaning as argument '6'
| Output : 0 if no factor is found else the conv. has been found.
|