Utilisation du canvas
This commit is contained in:
parent
ded3e39248
commit
296abd180e
@ -179,6 +179,37 @@ if ($resql)
|
|||||||
print "</div><br />";
|
print "</div><br />";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$smarty->template_dir = DOL_DOCUMENT_ROOT;
|
||||||
|
|
||||||
|
if ($_GET["canvas"] <> '' && file_exists($smarty->template_dir . '/product/canvas/'.$_GET["canvas"].'/liste.tpl') )
|
||||||
|
{
|
||||||
|
$smartdatas = array();
|
||||||
|
while ($i < min($num,$limit))
|
||||||
|
{
|
||||||
|
$datas = array();
|
||||||
|
$objp = $db->fetch_object($resql);
|
||||||
|
|
||||||
|
$datas["id"] = $objp->rowid;
|
||||||
|
$datas["ref"] = $objp->ref;
|
||||||
|
$datas["titre"] = $objp->label;
|
||||||
|
$datas["casier"] = 0;
|
||||||
|
$datas["entrepot"] = 0;
|
||||||
|
$datas["ventes"] = 0;
|
||||||
|
$datas["stock"] = 0;
|
||||||
|
$datas["pages"] = 0;
|
||||||
|
$datas["prix"] = price($objp->price);
|
||||||
|
$datas["valo"] = 0;
|
||||||
|
|
||||||
|
array_push($smartdatas,$datas);
|
||||||
|
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
$smarty->assign('datas', $smartdatas);
|
||||||
|
|
||||||
|
$smarty->display('product/canvas/'.$_GET["canvas"].'/liste.tpl');
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
print '<form action="liste.php" method="post" name="formulaire">';
|
print '<form action="liste.php" method="post" name="formulaire">';
|
||||||
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
||||||
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||||
@ -251,9 +282,9 @@ if ($resql)
|
|||||||
if ($objp->fk_product_type) print img_object($langs->trans("ShowService"),"service");
|
if ($objp->fk_product_type) print img_object($langs->trans("ShowService"),"service");
|
||||||
else print img_object($langs->trans("ShowProduct"),"product");
|
else print img_object($langs->trans("ShowProduct"),"product");
|
||||||
print '</a> ';
|
print '</a> ';
|
||||||
print '<a href="fiche.php?id='.$objp->rowid.'">'.$objp->ref.'</a></td>';
|
print '<a href="fiche.php?id='.$objp->rowid.'">'.$objp->ref."</a></td>\n";
|
||||||
print '<td>'.$objp->label.'</td>';
|
print '<td>'.$objp->label.'</td>';
|
||||||
print '<td align="center">'.dolibarr_print_date($objp->datem).'</td>';
|
print '<td align="center">'.dolibarr_print_date($objp->datem)."</td>\n";
|
||||||
if ($conf->service->enabled && $type != 0)
|
if ($conf->service->enabled && $type != 0)
|
||||||
{
|
{
|
||||||
print '<td align="center">';
|
print '<td align="center">';
|
||||||
@ -286,6 +317,7 @@ if ($resql)
|
|||||||
print "</table>";
|
print "</table>";
|
||||||
print '</form>';
|
print '</form>';
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
dolibarr_print_error($db);
|
dolibarr_print_error($db);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user