UoMConversion

Define Conversion between Stock and Production unit as Formula.

 

Example for Conversion from one to another unit.

Note: The system always calculates from FromUnitId to ToUnitId

if you work with Factor, the target quantity is

toQuantiy=fromQuantity * Factor

 

beasscript-logo-small

// work with QtyConversion
instance bsl b
b.get=UoMConversion/QtyConversion(<dw_1.item.me_verbrauch.value,bsl>,<dw_1.item.me_lager.value,bsl>,&

  <dw_1.item.abm1.value,num(6)>,<dw_1.item.abm2.value,num(6)>,<dw_1.item.abm3.value,num(6)>,&

  <dw_1.item.dichte.value,num(6)>,<bslitem.UnitGroupId>,<dw_1.item.menge_verbrauch.value,num(6)>)
dw_1.item.me_umr.value=<b.factor,#0.000000>
dw_1.item.menge_lager.value=<b.quantity,#0.000000>
 
// work with only Conversion
instance bsl b
b.get=UoMConversion/QtyConversion(<dw_1.item.me_verbrauch.value,bsl>,<dw_1.item.me_lager.value,bsl>,<dw_1.item.abm1.value,num(6)>,<dw_1.item.abm2.value,num(6)>,<dw_1.item.abm3.value,num(6)>,<dw_1.item.dichte.value,num(6)>,<bslitem.UnitGroupId>)
dw_1.item.me_umr.value=<b.factor,#0.000000>
// Note: in %() functions: don't work with < and >, only the variable name.
dw_1.item.menge_lager.value=%mul(dw_1.item.menge_verbrauch,b.factor)

 

 

 

 

Compatibility

Old scripts are compatible. But need more time, because not all the infomation is available and the system needs to select additional commands.

Old Syntax (Beas 2020/11 and older):

object=ue_artikelstamm=umrechnung=itemcode:unit_material

New (BeasScript):

dec ProdutionUnitQty
dec StockUnitQty
ProdutionUnitQty=10
b.get=UoMConversion/ItemConversion("unit_material","Pcs","m")
WhsUnitQty = <ProdutionUnitQty,dbnum> * <b.factor,dbnum>