diff --git a/htdocs/product/sousproduits/fiche.php b/htdocs/product/sousproduits/fiche.php index 540c9885157..e1d9bb0dbc2 100644 --- a/htdocs/product/sousproduits/fiche.php +++ b/htdocs/product/sousproduits/fiche.php @@ -270,21 +270,24 @@ if ($id || $ref) print ''.$langs->trans("Label").''.$product->libelle.''; print ''; - + $product->get_sousproduits_arbo (); + print ''.$langs->trans("AssociatedProductsNumber").''.sizeof($product->get_arbo_each_prod()).''; // associations sousproduits - print ''; - $product->get_sousproduits_arbo(); $prods_arbo = $product->get_arbo_each_prod(); - foreach($prods_arbo as $key => $value) + if(sizeof($prods_arbo) > 0) { - // if($value[1] != $product->id) - print '
'.$value[1].' :: '.$value[0]; - } + print ''; + print ''.$langs->trans("ProductAssociationList").'
'; + foreach($prods_arbo as $key => $value) + { + // print $value[1].' :: '.$value[0].'
'; + print $value[0].'
'; + } print ''; - + } print "\n"; @@ -369,7 +372,11 @@ if ($id || $ref) print "\n"; print ''.$objp->ref.''; print ''.$objp->label.''; - print ''; + if($product->is_sousproduit($id, $objp->rowid)) + $addchecked = ' checked="true"'; + else + $addchecked = ''; + print ''; print ''; print ''; print '';