if (quantity.GetValueOrDefault() == 0 || quantityUnitMeasure == null) // invalid data, fix for CalculateProductsUnitPrice

           {
               return 0;
           }