@@ -115,7 +115,7 @@ $this->setPageTitle(Html::encode($producer->type.' à '.$producer->city)) ; | |||
[ | |||
'attribute' => 'weight', | |||
'value' => function($model) { | |||
if(strlen($model->weight)) { | |||
if($model->unit == 'piece' && strlen($model->weight)) { | |||
return $model->weight.' g' ; | |||
} | |||
return '' ; |