Identify Product Cost Rollup Failed Due to Unit of Measure Mismatch

From KeystoneIntranet
Jump to navigation Jump to search

In recent versions of Keystone, we’ve enhanced ability to convert unit of measures. This has been added to allow better mix design handling and reporting.

A consequence of this new ability, is that it will expose problematic error conditions that exist in customer’s data. The main problem occurs when a is setup as a product with 1 u/m type (e.g. volume), but then when used as a component it’s setup with another u/m type (e.g. weight)

For example, you might setup product SUPER20 is in product maint. with a u/m of Y (typical of a product that is sold as a separate line admix). Then if you use this product as an ingredient on a mix design, you might change the u/m to OZ. When the system attempts to run a product cost rollup, it will get an error trying to convert OZ to Y.

The correct setup for an admixes that may both be sold as a per yard add-on, and also be used as an ingredient, is to setup 2 separate products. (e.g. ZSUPER20 the ingredient, and SUPER20 (Y) the sellable product).


To Detect product structure with u/m type mismatches , you can use this query:

select p1.product_class,p1.product_code,p1.description_1,p1.standard_cost, 
  p1.unit_of_measure,p2.unit_of_measure "Comp Prod UMS",x.comp_ums,x.qty_assembly,
  u2.ums_type "Comp Prod UMS Type",ux.ums_type "Str Ums Type"
from artprod p1 
inner join artprstr x on p1.product_code=x.assy_product_code 
inner join artprod p2 
     on x.comp_product_code=p2.product_code 
inner join artums u2 on u2.unit_of_measure=p2.unit_of_measure
inner join artums ux on ux.unit_of_measure=x.comp_ums
where u2.ums_type<>ux.ums_type
order by p1.product_class, p1.product_code,p1.description_1,p1.standard_cost

A similar problem can happen when selling a product. If during ticketing, the unit of measure is changed between u/m types you can create the same problem. I have not created a query for this, but it shouldn’t be too hard to do this if we need to.