Look: Modif esthtiques mineures. Ajout du picto statut sur les produits
This commit is contained in:
parent
d5537c3043
commit
5e3efc18f7
@ -152,8 +152,7 @@ print '<tr><td>'.$langs->trans("SellingPrice").'</td><td colspan="2">'.price($pr
|
||||
|
||||
// Statut
|
||||
print '<tr><td>'.$langs->trans("Status").'</td><td colspan="2">';
|
||||
if ($product->envente) print $langs->trans("OnSell");
|
||||
else print $langs->trans("NotOnSell");
|
||||
print $product->getLibStatut(2);
|
||||
print '</td></tr>';
|
||||
|
||||
print "</table>\n";
|
||||
|
||||
@ -167,14 +167,26 @@ if ($_GET["id"] || $_GET["ref"])
|
||||
// Libelle
|
||||
print '<tr><td>'.$langs->trans("Label").'</td><td>'.$product->libelle.'</td>';
|
||||
print '</tr>';
|
||||
|
||||
// Prix
|
||||
print '<tr><td>'.$langs->trans("SellingPrice").'</td><td colspan="2">'.price($product->price).'</td></tr>';
|
||||
|
||||
// Statut
|
||||
print '<tr><td>'.$langs->trans("Status").'</td><td colspan="2">';
|
||||
print $product->getLibStatut(2);
|
||||
print '</td></tr>';
|
||||
|
||||
print '</table><br/>';
|
||||
|
||||
// Formulaire ajout dans une categorie
|
||||
print '<table class="border" width="100%">';
|
||||
print '<form method="post" action="'.DOL_URL_ROOT.'/product/categorie.php?id='.$product->id.'">';
|
||||
print $html->select_all_categories($categorie->id_mere);
|
||||
print '<tr><td><input type="submit" class="button" value="'.$langs->trans("ClassifyInCategory").'"></td></tr>';
|
||||
print '</form></table><br/>';
|
||||
print '<table class="border" width="100%">';
|
||||
print '<tr><td>';
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("ClassifyInCategory").'">'. $html->select_all_categories($categorie->id_mere);
|
||||
print '</td></tr>';
|
||||
print '</table>';
|
||||
print '</form>';
|
||||
print '<br/>';
|
||||
|
||||
|
||||
$c = new Categorie($db);
|
||||
@ -194,7 +206,7 @@ if ($_GET["id"] || $_GET["ref"])
|
||||
print $langs->trans("ProductIsInCategories");
|
||||
print '<br/>';
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td colspan="2">'.$langs->trans("AllWays").'</td></tr>';
|
||||
print '<tr class="liste_titre"><td colspan="2">'.$langs->trans("Categories").'</td></tr>';
|
||||
|
||||
foreach ($cats as $cat)
|
||||
{
|
||||
@ -204,7 +216,7 @@ if ($_GET["id"] || $_GET["ref"])
|
||||
{
|
||||
$i = !$i;
|
||||
print "<tr ".$bc[$i]."><td>".$way."</td>";
|
||||
print "<td><a href= '".DOL_URL_ROOT."/product/categorie.php?id=".$product->id."&cat=".$cat->id."'>".$langs->trans("DeleteFromCat")."</a></td></tr>\n";
|
||||
print "<td>".img_delete($langs->trans("DeleteFromCat"))." <a href= '".DOL_URL_ROOT."/product/categorie.php?id=".$product->id."&cat=".$cat->id."'>".$langs->trans("DeleteFromCat")."</a></td></tr>\n";
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2003-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004-2006 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005 Marc Barilley / Ocebo <marc@ocebo.com>
|
||||
* Copyright (C) 2005 Regis Houssin <regis.houssin@cap-networks.com>
|
||||
* Copyright (C) 2005 Simon TOSSER <simon@kornog-computing.com>
|
||||
@ -220,6 +220,14 @@ if ($product->id)
|
||||
// Libelle
|
||||
print '<tr><td>'.$langs->trans("Label").'</td><td colspan="3">'.$product->libelle.'</td></tr>';
|
||||
|
||||
// Prix
|
||||
print '<tr><td>'.$langs->trans("SellingPrice").'</td><td colspan="2">'.price($product->price).'</td></tr>';
|
||||
|
||||
// Statut
|
||||
print '<tr><td>'.$langs->trans("Status").'</td><td colspan="2">';
|
||||
print $product->getLibStatut(2);
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans("NbOfAttachedFiles").'</td><td colspan="3">'.sizeof($filearray).'</td></tr>';
|
||||
print '<tr><td>'.$langs->trans("TotalSizeOfAttachedFiles").'</td><td colspan="3">'.$totalsize.' '.$langs->trans("bytes").'</td></tr>';
|
||||
print '</table>';
|
||||
|
||||
@ -70,7 +70,7 @@ if ($_POST["action"] == 'add' && $user->rights->produit->creer)
|
||||
$product->price = stripslashes($_POST["price"]);
|
||||
$product->tva_tx = $_POST["tva_tx"];
|
||||
$product->type = $_POST["type"];
|
||||
$product->envente = $_POST["statut"];
|
||||
$product->status = $_POST["statut"];
|
||||
$product->description = stripslashes($_POST["desc"]);
|
||||
$product->note = stripslashes($_POST["note"]);
|
||||
$product->duration_value = $_POST["duration_value"];
|
||||
@ -125,7 +125,7 @@ if ($_POST["action"] == 'update' &&
|
||||
$product->tva_tx = $_POST["tva_tx"];
|
||||
$product->description = stripslashes($_POST["desc"]);
|
||||
$product->note = stripslashes($_POST["note"]);
|
||||
$product->envente = $_POST["statut"];
|
||||
$product->status = $_POST["statut"];
|
||||
$product->seuil_stock_alerte = $_POST["seuil_stock_alerte"];
|
||||
$product->duration_value = $_POST["duration_value"];
|
||||
$product->duration_unit = $_POST["duration_unit"];
|
||||
@ -163,7 +163,7 @@ if ($_GET["action"] == 'clone' && $user->rights->produit->creer)
|
||||
if ($product->fetch($_GET["id"]) > 0)
|
||||
{
|
||||
$product->ref = "Clone ".$product->ref;
|
||||
$product->envente = 0;
|
||||
$product->status = 0;
|
||||
$product->id = null;
|
||||
|
||||
if ($product->check())
|
||||
@ -551,8 +551,7 @@ if ($_GET["id"] || $_GET["ref"])
|
||||
|
||||
// Statut
|
||||
print '<tr><td>'.$langs->trans("Status").'</td><td>';
|
||||
if ($product->envente) print $langs->trans("OnSell");
|
||||
else print $langs->trans("NotOnSell");
|
||||
print $product->getLibStatut(2);
|
||||
print '</td></tr>';
|
||||
|
||||
// TVA
|
||||
@ -635,7 +634,7 @@ if ($_GET["id"] || $_GET["ref"])
|
||||
print '</td></tr>';
|
||||
print '<tr><td>'.$langs->trans("Status").'</td><td colspan="2">';
|
||||
print '<select class="flat" name="statut">';
|
||||
if ($product->envente)
|
||||
if ($product->status)
|
||||
{
|
||||
print '<option value="1" selected="true">'.$langs->trans("OnSell").'</option>';
|
||||
print '<option value="0">'.$langs->trans("NotOnSell").'</option>';
|
||||
@ -719,7 +718,7 @@ if ($_GET["action"] == '')
|
||||
print "\n</div><br>\n";
|
||||
|
||||
|
||||
if ($_GET["id"] && $_GET["action"] == '' && $product->envente)
|
||||
if ($_GET["id"] && $_GET["action"] == '' && $product->status)
|
||||
{
|
||||
$propal = New Propal($db);
|
||||
|
||||
|
||||
@ -263,8 +263,7 @@ if ($_GET["id"] || $_GET["ref"])
|
||||
|
||||
// Statut
|
||||
print '<tr><td>'.$langs->trans("Status").'</td><td colspan="2">';
|
||||
if ($product->envente) print $langs->trans("OnSell");
|
||||
else print $langs->trans("NotOnSell");
|
||||
print $product->getLibStatut(2);
|
||||
print '</td></tr>';
|
||||
|
||||
print '</table>';
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004-2006 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -135,35 +135,39 @@ if ($result)
|
||||
print '<tr class="liste_titre"><td colspan="4">'.$langs->trans("LastRecordedProducts",$max).'</td></tr>';
|
||||
|
||||
$var=True;
|
||||
while ($i < $num)
|
||||
{
|
||||
$objp = $db->fetch_object($result);
|
||||
|
||||
//Multilangs
|
||||
if ($conf->global->PRODUIT_MULTILANGS == 1)
|
||||
{
|
||||
$sql = "SELECT label FROM ".MAIN_DB_PREFIX."product_det";
|
||||
$sql.= " WHERE fk_product=".$objp->rowid." AND lang='". $langs->getDefaultLang() ."'";
|
||||
$resultd = $db->query($sql);
|
||||
if ($resultd)
|
||||
{
|
||||
$objtp = $db->fetch_object($resultd);
|
||||
if ($objtp->label != '') $objp->label = $objtp->label;
|
||||
}
|
||||
}
|
||||
|
||||
$var=!$var;
|
||||
print "<tr $bc[$var]>";
|
||||
print '<td nowrap="nowrap"><a href="fiche.php?id='.$objp->rowid.'">';
|
||||
if ($objp->fk_product_type) print img_object($langs->trans("ShowService"),"service");
|
||||
else print img_object($langs->trans("ShowProduct"),"product");
|
||||
print "</a> <a href=\"fiche.php?id=$objp->rowid\">$objp->ref</a></td>\n";
|
||||
print "<td>$objp->label</td>";
|
||||
print "<td>".$staticproduct->typeprodser[$objp->fk_product_type]."</td>";
|
||||
print '<td align="center" nowrap="nowrap">'.($objp->envente?$langs->trans("OnSell"):$langs->trans("NotOnSell"))."</td>";
|
||||
print "</tr>\n";
|
||||
$i++;
|
||||
}
|
||||
|
||||
while ($i < $num)
|
||||
{
|
||||
$objp = $db->fetch_object($result);
|
||||
|
||||
//Multilangs
|
||||
if ($conf->global->PRODUIT_MULTILANGS == 1)
|
||||
{
|
||||
$sql = "SELECT label FROM ".MAIN_DB_PREFIX."product_det";
|
||||
$sql.= " WHERE fk_product=".$objp->rowid." AND lang='". $langs->getDefaultLang() ."'";
|
||||
$resultd = $db->query($sql);
|
||||
if ($resultd)
|
||||
{
|
||||
$objtp = $db->fetch_object($resultd);
|
||||
if ($objtp->label != '') $objp->label = $objtp->label;
|
||||
}
|
||||
}
|
||||
|
||||
$var=!$var;
|
||||
print "<tr $bc[$var]>";
|
||||
print '<td nowrap="nowrap"><a href="fiche.php?id='.$objp->rowid.'">';
|
||||
if ($objp->fk_product_type) print img_object($langs->trans("ShowService"),"service");
|
||||
else print img_object($langs->trans("ShowProduct"),"product");
|
||||
print "</a> <a href=\"fiche.php?id=$objp->rowid\">$objp->ref</a></td>\n";
|
||||
print '<td>'.dolibarr_trunc($objp->label,40).'</td>';
|
||||
print '<td>'.$staticproduct->typeprodser[$objp->fk_product_type]."</td>";
|
||||
print '<td align="left" nowrap="nowrap">';
|
||||
print $staticproduct->LibStatut($objp->envente,2);
|
||||
print "</td>";
|
||||
print "</tr>\n";
|
||||
$i++;
|
||||
}
|
||||
|
||||
$db->free();
|
||||
|
||||
print "</table>";
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004-2006 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005 Eric Seigne <eric.seigne@ryxeo.com>
|
||||
* Copyright (C) 2005 Regis Houssin <regis.houssin@cap-networks.com>
|
||||
*
|
||||
@ -194,8 +194,7 @@ if ($_GET["id"] || $_GET["ref"])
|
||||
|
||||
// Statut
|
||||
print '<tr><td>'.$langs->trans("Status").'</td><td colspan="2">';
|
||||
if ($product->envente) print $langs->trans("OnSell");
|
||||
else print $langs->trans("NotOnSell");
|
||||
print $product->getLibStatut(2);
|
||||
print '</td></tr>';
|
||||
|
||||
print "</table>\n";
|
||||
|
||||
@ -203,8 +203,7 @@ else
|
||||
print '<tr><td>'.$langs->trans("SellingPrice").'</td><td colspan="2">'.price($product->price).'</td></tr>';
|
||||
// Statut
|
||||
print '<tr><td>'.$langs->trans("Status").'</td><td colspan="2">';
|
||||
if ($product->envente) print $langs->trans("OnSell");
|
||||
else print $langs->trans("NotOnSell");
|
||||
print $product->getLibStatut(2);
|
||||
print '</td></tr>';
|
||||
|
||||
print "</table>\n";
|
||||
|
||||
@ -168,8 +168,7 @@ if ($_GET["id"])
|
||||
|
||||
// Statut
|
||||
print '<tr><td>'.$langs->trans("Status").'</td><td colspan="3">';
|
||||
if ($product->envente) print $langs->trans("OnSell");
|
||||
else print $langs->trans("NotOnSell");
|
||||
print $product->getLibStatut(2);
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td valign="top" width="25%">'.$langs->trans("Referers").'</td>';
|
||||
|
||||
@ -168,8 +168,7 @@ if ($_GET["id"])
|
||||
|
||||
// Statut
|
||||
print '<tr><td>'.$langs->trans("Status").'</td><td colspan="3">';
|
||||
if ($product->envente) print $langs->trans("OnSell");
|
||||
else print $langs->trans("NotOnSell");
|
||||
print $product->getLibStatut(2);
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td valign="top" width="25%">'.$langs->trans("Referers").'</td>';
|
||||
|
||||
@ -173,8 +173,7 @@ if ($_GET["id"] || $_GET["ref"])
|
||||
|
||||
// Statut
|
||||
print '<tr><td>'.$langs->trans("Status").'</td><td colspan="3">';
|
||||
if ($product->envente) print $langs->trans("OnSell");
|
||||
else print $langs->trans("NotOnSell");
|
||||
print $product->getLibStatut(2);
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td valign="top" width="28%">'.$langs->trans("Referers").'</td>';
|
||||
|
||||
@ -219,8 +219,7 @@ if ($_GET["id"] || $_GET["ref"])
|
||||
|
||||
// Statut
|
||||
print '<tr><td>'.$langs->trans("Status").'</td><td colspan="3">';
|
||||
if ($product->envente) print $langs->trans("OnSell");
|
||||
else print $langs->trans("NotOnSell");
|
||||
print $product->getLibStatut(2);
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td valign="top" width="28%">'.$langs->trans("Referers").'</td>';
|
||||
|
||||
@ -164,8 +164,7 @@ if ($_GET["id"])
|
||||
|
||||
// Statut
|
||||
print '<tr><td>'.$langs->trans("Status").'</td><td colspan="3">';
|
||||
if ($product->envente) print $langs->trans("OnSell");
|
||||
else print $langs->trans("NotOnSell");
|
||||
print $product->getLibStatut(2);
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td valign="top" width="25%">'.$langs->trans("Referers").'</td>';
|
||||
|
||||
@ -206,8 +206,7 @@ if ($_GET["id"] || $_GET["ref"])
|
||||
|
||||
// Statut
|
||||
print '<tr><td>'.$langs->trans("Status").'</td><td>';
|
||||
if ($product->envente) print $langs->trans("OnSell");
|
||||
else print $langs->trans("NotOnSell");
|
||||
print $product->getLibStatut(2);
|
||||
print '</td></tr>';
|
||||
|
||||
// TVA
|
||||
|
||||
Loading…
Reference in New Issue
Block a user