@ -202,17 +202,18 @@ namespace CowOutputClient
}
}
private void SetStandardWeight ( GoodsWeightFloat_Detail floatData , ProCataGoods detail , decimal? num , WeightInfo weight )
private bool SetStandardWeight ( GoodsWeightFloat_Detail floatData , ProCataGoods detail , decimal? num , WeightInfo weight )
{
if ( floatData ! = null & & floatData . StandardWeight ! = null ) {
if ( ! CheckGoodsWeight ( detail , num , floatData ) ) {
return ;
return false ;
} else {
weight . Weight = floatData . StandardWeight . Value ;
}
} else {
weight . Weight = num . Value ;
}
return true ;
}
private void ReadWeight ( ProCataGoods detail )
@ -255,10 +256,12 @@ namespace CowOutputClient
weight . SecondNum = goodsWeight ;
}
} else if ( rbSelectedNum . IsChecked = = true ) {
SetStandardWeight ( floatData , detail , num , weight ) ;
if ( ! SetStandardWeight ( floatData , detail , num , weight ) )
return ;
weight . SecondNum = goodsWeight ;
} else {
SetStandardWeight ( floatData , detail , goodsWeight ? ? 0 , weight ) ;
if ( ! SetStandardWeight ( floatData , detail , goodsWeight ? ? 0 , weight ) )
return ;
}
weight . SubWeight = tare ;
weight . NetWeight = weight . Weight - ( weight . SubWeight ? ? 0 ) ;