$productstatic->type = $value['type']; $productstatic->label = $value['label']; if ($value['level'] <= 1) { $class = $class == 'impair' ? 'pair' : 'impair'; print '<tr class="' . $class . '">'; $notdefined = 0; $productstatic->ref = $value['ref']; $nb_of_subproduct = $value['nb']; print '<td>' . $productstatic->getNomUrl(1, 'composition') . '</td>'; print '<td>' . $productstatic->label . '</td>'; // Best buying price print '<td align="right">'; if ($product_fourn->find_min_price_product_fournisseur($productstatic->id) > 0) { print ' ' . $langs->trans("BuyingPriceMinShort") . ': '; if ($product_fourn->product_fourn_price_id > 0) { print $product_fourn->display_price_product_fournisseur(0, 0); } else { print $langs->trans("NotDefined"); $notdefined++; $atleastonenotdefined++; } } print '</td>'; $totalline = price2num($value['nb'] * $product_fourn->fourn_unitprice, 'MT'); $total += $totalline; print '<td align="right">'; print $notdefined ? '' : ($value['nb'] > 1 ? $value['nb'] . 'x' : '') . price($product_fourn->fourn_unitprice, '', '', 0, 0, -1, $conf->currency); print '</td>'; // Stock if (!empty($conf->stock->enabled)) { print '<td align="right">' . $value['stock'] . '</td>';
print price($objp->price_ttc) . ' ' . $langs->trans("TTC"); } else { print price($objp->price) . ' ' . $langs->trans("HT"); } } print '</td>'; } // Better buy price if (!empty($arrayfields['p.minbuyprice']['checked'])) { print '<td align="right">'; if ($objp->tobuy && $objp->minsellprice != '') { //print price($objp->minsellprice).' '.$langs->trans("HT"); if ($product_fourn->find_min_price_product_fournisseur($objp->rowid) > 0) { if ($product_fourn->product_fourn_price_id > 0) { if (!empty($conf->fournisseur->enabled) && $user->rights->fournisseur->lire) { $htmltext = $product_fourn->display_price_product_fournisseur(1, 1, 0, 1); print $form->textwithpicto(price($product_fourn->fourn_unitprice) . ' ' . $langs->trans("HT"), $htmltext); } else { print price($product_fourn->fourn_unitprice) . ' ' . $langs->trans("HT"); } } } } print '</td>'; } if (!empty($conf->stock->enabled) && $user->rights->stock->lire && $type != 1) { if ($objp->fk_product_type != 1) { $product_static->id = $objp->rowid; $product_static->load_stock(); } }
print '<tr>'; print '<td width="15%">'.$langs->trans("Ref").'</td><td colspan="2">'; print $form->showrefnav($product,'ref','',1,'ref'); print '</td>'; print '</tr>'; // Label print '<tr><td>'.$langs->trans("Label").'</td><td colspan="2">'.$product->libelle.'</td></tr>'; // Minimum Price print '<tr><td>'.$langs->trans("BuyingPriceMin").'</td>'; print '<td colspan="2">'; $product_fourn = new ProductFournisseur($db); if ($product_fourn->find_min_price_product_fournisseur($product->id) > 0) { if ($product_fourn->product_fourn_price_id > 0) print $product_fourn->display_price_product_fournisseur(); else print $langs->trans("NotDefined"); } print '</td></tr>'; // Status (to buy) print '<tr><td>'.$langs->trans("Status").' ('.$langs->trans("Buy").')</td><td>'; print $product->getLibStatut(2,1); print '</td></tr>'; print '</table>'; print "</div>\n"; dol_htmloutput_mesg($mesg);