Ejemplo n.º 1
0
 if ($search_accountancy_code_buy) {
     $param = "&search_accountancy_code_buy=" . $search_accountancy_code_buy;
 }
 // Add $param from extra fields
 foreach ($search_array_options as $key => $val) {
     $crit = $val;
     $tmpkey = preg_replace('/search_options_/', '', $key);
     if ($val != '') {
         $param .= '&search_options_' . $tmpkey . '=' . urlencode($val);
     }
 }
 print_barre_liste($texte, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_products.png');
 if (!empty($catid)) {
     print "<div id='ways'>";
     $c = new Categorie($db);
     $ways = $c->print_all_ways(' &gt; ', 'product/list.php');
     print " &gt; " . $ways[0] . "<br>\n";
     print "</div><br>";
 }
 if (!empty($canvas) && file_exists(DOL_DOCUMENT_ROOT . '/product/canvas/' . $canvas . '/actions_card_' . $canvas . '.class.php')) {
     $fieldlist = $object->field_list;
     $datas = $object->list_datas;
     $picto = 'title.png';
     $title_picto = img_picto('', $picto);
     $title_text = $title;
     // Default templates directory
     $template_dir = DOL_DOCUMENT_ROOT . '/product/canvas/' . $canvas . '/tpl/';
     // Check if a custom template is present
     if (file_exists(DOL_DOCUMENT_ROOT . '/theme/' . $conf->theme . '/tpl/product/' . $canvas . '/list.tpl.php')) {
         $template_dir = DOL_DOCUMENT_ROOT . '/theme/' . $conf->theme . '/tpl/product/' . $canvas . '/';
     }
Ejemplo n.º 2
0
	if (! empty($supplier->id)) $texte = $langs->trans("ListOfSupplierProductForSupplier",$supplier->nom);
	else $texte = $langs->trans("List");

	llxHeader("","",$texte);


	$param="&tobuy=$tobuy&sref=$sref&snom=$snom&fourn_id=$fourn_id".(isset($type)?"&amp;type=$type":"");
	print_barre_liste($texte, $page, "liste.php", $param, $sortfield, $sortorder,'',$num);


	if (isset($catid))
	{
		print "<div id='ways'>";
		$c = new Categorie ($db, $catid);
		$ways = $c->print_all_ways(' &gt; ','fourn/product/liste.php');
		print " &gt; ".$ways[0]."<br>\n";
		print "</div><br>";
	}


	print '<table class="liste" width="100%">';

	// Lignes des titres
	print "<tr class=\"liste_titre\">";
	print_liste_field_titre($langs->trans("Ref"),"liste.php", "p.ref",$param,"","",$sortfield,$sortorder);
	print_liste_field_titre($langs->trans("RefSupplierShort"),"liste.php", "pf.ref_fourn",$param,"","",$sortfield,$sortorder);
	print_liste_field_titre($langs->trans("Label"),"liste.php", "p.label",$param,"","",$sortfield,$sortorder);
	print_liste_field_titre($langs->trans("Supplier"),"liste.php", "pf.fk_soc",$param,"","",$sortfield,$sortorder);
	print_liste_field_titre($langs->trans("BuyingPrice"),"liste.php", "ppf.price",$param,"",'align="right"',$sortfield,$sortorder);
	print_liste_field_titre($langs->trans("QtyMin"),"liste.php", "ppf.qty",$param,"",'align="right"',$sortfield,$sortorder);
Ejemplo n.º 3
0
     }
     dol_fiche_head($head, $hselected, $langs->trans("CardProduct" . $product->type) . ' : ' . $product->ref);
     print $mesg;
     print '<table class="border" width="100%">';
     print "<tr>";
     print '<td>' . $langs->trans("Ref") . '</td><td>' . $product->ref . '</td>';
     print '<tr><td>' . $langs->trans("Label") . '</td><td>' . $product->libelle . '</td>';
     print "</table><br>\n";
     $c = new Categorie($db);
     $cats = $c->containing($_REQUEST['id'], 0);
     if (count($cats) > 0) {
         print "Vous avez stock� le produit dans les cat�gorie suivantes:<br/><br/>";
         print '<table class="noborder" width="100%">';
         print '<tr class="liste_titre"><td colspan="2">' . $langs->trans("AllWays") . '</td></tr>';
         foreach ($cats as $cat) {
             $ways = $cat->print_all_ways();
             foreach ($ways as $way) {
                 $i = !$i;
                 print "<tr " . $bc[$i] . "><td>" . $way . "</td>";
                 print "<td><a href= '" . DOL_URL_ROOT . "/fourn/product/categorie.php?id=" . $product->id . "&amp;cat=" . $cat->id . "'>" . $langs->trans("DeleteFromCat") . "</a></td></tr>\n";
             }
         }
         print "</table><br/><br/>\n";
     } else {
         if ($cats < 0) {
             print $langs->trans("ErrorUnknown");
         } else {
             print $langs->trans("NoCat") . "<br/><br/>";
         }
     }
 }
Ejemplo n.º 4
0
     }
 } else {
     $texte = $langs->trans("ProductsAndServices");
 }
 $texte .= ' (' . $langs->trans("Stocks") . ')';
 llxHeader("", $texte, $helpurl);
 if ($sref || $snom || $sall || GETPOST('search')) {
     print_barre_liste($texte, $page, $_SERVER["PHP_SELF"], "&sref=" . $sref . "&snom=" . $snom . "&amp;sall=" . $sall . "&amp;tosell=" . $tosell . "&amp;tobuy=" . $tobuy . (!empty($search_categ) ? '&amp;search_categ=' . $search_categ : '') . (!empty($toolowstock) ? '&amp;toolowstock=' . $toolowstock : ''), $sortfield, $sortorder, '', $num);
 } else {
     print_barre_liste($texte, $page, $_SERVER["PHP_SELF"], "&sref={$sref}&snom={$snom}&fourn_id={$fourn_id}" . (isset($type) ? "&amp;type={$type}" : "") . (!empty($search_categ) ? '&amp;search_categ=' . $search_categ : '') . (!empty($toolowstock) ? '&amp;toolowstock=' . $toolowstock : ''), $sortfield, $sortorder, '', $num);
 }
 if (!empty($catid)) {
     print "<div id='ways'>";
     $c = new Categorie($db);
     $c->fetch($catid);
     $ways = $c->print_all_ways(' &gt; ', 'product/reassort.php');
     print " &gt; " . $ways[0] . "<br>\n";
     print "</div><br>";
 }
 print '<form action="' . $_SERVER["PHP_SELF"] . '" method="post" name="formulaire">';
 print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
 print '<input type="hidden" name="sortfield" value="' . $sortfield . '">';
 print '<input type="hidden" name="sortorder" value="' . $sortorder . '">';
 print '<input type="hidden" name="type" value="' . $type . '">';
 print '<table class="liste" width="100%">';
 // Filter on categories
 $moreforfilter = '';
 if (!empty($conf->categorie->enabled)) {
     $moreforfilter .= $langs->trans('Categories') . ': ';
     $moreforfilter .= $htmlother->select_categories(Categorie::TYPE_PRODUCT, $search_categ, 'search_categ');
     $moreforfilter .= ' &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ';
                 print '<a class="butActionDelete" href="' . $_SERVER["PHP_SELF"] . '?action=truncate">' . $langs->trans("Truncate") . '</a>';
                 print '<span id="action-position" class="butAction">' . $langs->trans('PrintLabels') . '</span>' . "\n";
                 print $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $id, $langs->trans('SelectPosition'), $langs->trans('ConfirmSelectPosition'), 'confirm_position', $formquestionposition, 'yes', 'action-position', 170, 400);
             }
         } else {
             print '<a class="butActionRefused" title="' . $langs->trans("ListTruncated") . '">' . $langs->trans("Truncate") . '</a>';
             print '<a class="butActionRefused" title="' . $langs->trans("ListTruncated") . '">' . $langs->trans("PrintLabels") . '</a>';
         }
     }
     print "</div>";
     print '<br>';
 }
 if (isset($catid)) {
     print "<div id='ways'>";
     $c = new Categorie($db, $catid);
     $ways = $c->print_all_ways(' &gt; ', 'labelprint/product_list.php');
     print " &gt; " . $ways[0] . "<br>\n";
     print "</div><br>";
 }
 print '<form action="' . $_SERVER["PHP_SELF"] . '" method="POST">';
 print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
 print '<input type="hidden" name="action" value="create">';
 print '<input type="hidden" name="sortfield" value="' . $sortfield . '">';
 print '<input type="hidden" name="sortorder" value="' . $sortorder . '">';
 print '<table class="liste" width="100%">';
 // Filter on categories
 $moreforfilter = '';
 if ($conf->categorie->enabled) {
     $moreforfilter .= $langs->trans('Categories') . ': ';
     $moreforfilter .= $htmlother->select_categories(0, $search_categ, 'search_categ');
     $moreforfilter .= ' &nbsp; &nbsp; &nbsp; ';