PdcMaterialFile.ConvertQuantByUnitByMatNo: Difference between revisions
Jump to navigation
Jump to search
Created page with "== Declaration == ConvertQuantByUnitByMatNo() == Description == Converts a quantity from a unit to a unit by the LM_STAM and LM_GEW. == Notes == The function returns 0 if th..." |
|||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
== Declaration == | == Declaration == | ||
ConvertQuantByUnitByMatNo() | ConvertQuantByUnitByMatNo(Quantity as double, UnitFrom as string, UnitTo as string, MaterialNumber as string) as double | ||
== Description == | == Description == | ||
Line 12: | Line 12: | ||
<source lang="vb"> | <source lang="vb"> | ||
PDC.App.MasterData.MaterialFile.ConvertQuantByUnitByMatNo(dblQuantity, strUnitFrom, strUnitTo, strMaterialNo) | Dim QuantityConverted as Double = PDC.App.MasterData.MaterialFile.ConvertQuantByUnitByMatNo(dblQuantity, strUnitFrom, strUnitTo, strMaterialNo) | ||
</source> | </source> | ||
== Availability == | == Availability == | ||
Available since Juli 2020 (from version 5.6) | Available since Juli 2020 (from version 5.6) |
Latest revision as of 08:18, 29 June 2020
Declaration
ConvertQuantByUnitByMatNo(Quantity as double, UnitFrom as string, UnitTo as string, MaterialNumber as string) as double
Description
Converts a quantity from a unit to a unit by the LM_STAM and LM_GEW.
Notes
The function returns 0 if the LM_STAFM or LM_GEW isn't correctly filled.
This function executes an extra query to get the LM_STAFM, LM_GEW and LM_EENHD from the material as the base weight factor and then executes PdcMaterialFile.ConvertQuantByUnit.
Code example VB.NET
Dim QuantityConverted as Double = PDC.App.MasterData.MaterialFile.ConvertQuantByUnitByMatNo(dblQuantity, strUnitFrom, strUnitTo, strMaterialNo)
Availability
Available since Juli 2020 (from version 5.6)