New: Personalisation des services et produits par un picto diff閞ent.

This commit is contained in:
Laurent Destailleur 2005-02-01 16:57:45 +00:00
parent d2bd395c94
commit 45cdabcd90
14 changed files with 137 additions and 159 deletions

View File

@ -245,7 +245,7 @@ if ($_GET["action"] == 'payed' && $user->rights->facture->paiement)
if ($_POST["action"] == 'setremise' && $user->rights->facture->creer)
{
$fac = new Facture($db);
$fac->fetch($facid);
$fac->fetch($_GET["facid"]);
$fac->set_remise($user, $_POST["remise"]);
}
@ -839,7 +839,7 @@ else
if ($fac->mode_reglement == 3)
{
$head[$h][0] = DOL_URL_ROOT.'/compta/facture/prelevement.php?facid='.$fac->id;
$head[$h][1] = $langs->trans("Pr茅l猫vement");
$head[$h][1] = $langs->trans("StandingOrder");
$h++;
}
@ -859,7 +859,7 @@ else
*/
if ($_GET["action"] == 'delete')
{
$html->form_confirm($_SERVER["PHP_SELF"]."?facid=$fac->id","Supprimer la facture","Etes-vous s没r de vouloir supprimer cette facture ?","confirm_delete");
$html->form_confirm($_SERVER["PHP_SELF"]."?facid=$fac->id",$langs->trans("DeleteBill"),$langs->trans("ConfirmDeleteBill"),"confirm_delete");
}
/*
@ -971,18 +971,30 @@ else
print "<tr><td height=\"10\">".$langs->trans("Author")."</td><td colspan=\"3\">$author->fullname</td>";
print '<tr><td height=\"10\">Remise globale</td>';
print '<td align="right" colspan="2">'.$fac->remise_percent.'</td>';
print '<td>%</td></tr>';
print '<tr><td height=\"10\">'.$langs->trans("GlobalDiscount").'</td>';
if ($fac->brouillon == 1 && $user->rights->facture->creer)
{
print '<form action="facture.php?facid='.$fac->id.'" method="post">';
print '<input type="hidden" name="action" value="setremise">';
print '<td colspan="3"><input type="text" name="remise" size="3" value="'.$fac->remise_percent.'">% ';
print '<input type="submit" value="'.$langs->trans("Modify").'"></td>';
print '</form>';
}
else {
print '<td colspan="3">'.$fac->remise_percent.' %</td>';
}
print '</tr>';
print '<tr><td height=\"10\">'.$langs->trans("AmountHT").'</td>';
print '<td align="right" colspan="2"><b>'.price($fac->total_ht).'</b></td>';
print '<td>'.$conf->monnaie.' HT</td></tr>';
print '<td>'.$conf->monnaie.'</td></tr>';
print '<tr><td height=\"10\">'.$langs->trans("VAT").'</td><td align="right" colspan="2">'.price($fac->total_tva).'</td>';
print '<td>'.$conf->monnaie.'</td></tr>';
print '<tr><td height=\"10\">'.$langs->trans("AmountTTC").'</td><td align="right" colspan="2">'.price($fac->total_ttc).'</td>';
print '<td>'.$conf->monnaie.' TTC</td></tr>';
print '<td>'.$conf->monnaie.'</td></tr>';
print '<tr><td height=\"10\">'.$langs->trans("Status").'</td><td align="left" colspan="3">'.($fac->get_libstatut()).'</td></tr>';
if ($fac->note)
{
@ -994,22 +1006,16 @@ else
print "</table><br>";
if ($fac->brouillon == 1 && $user->rights->facture->creer)
{
print '<form action="facture.php?facid='.$fac->id.'" method="post">';
print '<input type="hidden" name="action" value="setremise">';
print '<table class="border"><tr><td>Remise</td><td align="right">';
print '<input type="text" name="remise" size="3" value="'.$fac->remise_percent.'">%';
print '<input type="submit" value="'.$langs->trans("Save").'">';
print '</td></tr></table></form>';
}
/*
* Lignes de factures
*
*/
$sql = "SELECT l.fk_product, l.description, l.price, l.qty, l.rowid, l.tva_taux, l.remise_percent, l.subprice, ".$db->pdate("l.date_start")." as date_start, ".$db->pdate("l.date_end")." as date_end ";
$sql .= " FROM ".MAIN_DB_PREFIX."facturedet as l WHERE l.fk_facture = $fac->id ORDER BY l.rowid";
$sql = "SELECT l.fk_product, l.description, l.price, l.qty, l.rowid, l.tva_taux, l.remise_percent, l.subprice,";
$sql .= $db->pdate("l.date_start")." as date_start, ".$db->pdate("l.date_end")." as date_end, ";
$sql .= " p.fk_product_type";
$sql .= " FROM ".MAIN_DB_PREFIX."facturedet as l LEFT JOIN ".MAIN_DB_PREFIX."product p ON l.fk_product=p.rowid";
$sql .= " WHERE l.fk_facture = ".$fac->id;
$sql .= " ORDER BY l.rowid";
$result = $db->query($sql);
if ($result)
@ -1025,7 +1031,7 @@ else
print '<td width="8%" align="right">'.$langs->trans("VAT").'</td>';
print '<td width="12%" align="right">P.U. HT</td>';
print '<td width="8%" align="right">'.$langs->trans("Quantity").'</td>';
print '<td width="8%" align="right">Remise</td>';
print '<td width="8%" align="right">'.$langs->trans("Discount").'</td>';
print '<td width="10%" align="right">'.$langs->trans("AmountHT").'</td>';
print '<td>&nbsp;</td><td>&nbsp;</td>';
print "</tr>\n";
@ -1038,7 +1044,10 @@ else
print "<tr $bc[$var]>";
if ($objp->fk_product > 0)
{
print '<td><a href="'.DOL_URL_ROOT.'/product/fiche.php?id='.$objp->fk_product.'">'.stripslashes(nl2br($objp->description)).'</a>';
print '<td><a href="'.DOL_URL_ROOT.'/product/fiche.php?id='.$objp->fk_product.'">';
if ($objp->fk_product_type) print img_object($langs->trans("ShowService"),"service");
else print img_object($langs->trans("ShowProduct"),"product");
print '</a> <a href="'.DOL_URL_ROOT.'/product/fiche.php?id='.$objp->fk_product.'">'.stripslashes(nl2br($objp->description)).'</a>';
if ($objp->date_start && $objp->date_end) { print " (Du ".dolibarr_print_date($objp->date_start)." au ".dolibarr_print_date($objp->date_end).")"; }
if ($objp->date_start && ! $objp->date_end) { print " (A partir du ".dolibarr_print_date($objp->date_start).")"; }
if (! $objp->date_start && $objp->date_end) { print " (Jusqu'au ".dolibarr_print_date($objp->date_end).")"; }
@ -1121,7 +1130,7 @@ else
}
else
{
dolibarr_print_error($db->error());
dolibarr_print_error($db);
}
/*

View File

@ -116,7 +116,7 @@ if ($conf->facture->enabled)
{
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print '<td colspan="2">Factures brouillons ('.$num.')</td></tr>';
print '<td colspan="2">'.$langs->trans("DraftBills").' ('.$num.')</td></tr>';
$var = True;
while ($i < $num && $i < 20)
{

View File

@ -21,7 +21,7 @@
*
*/
/*!
/**
\file htdocs/product/fiche.php
\ingroup product
\brief Page de la fiche produit
@ -177,7 +177,7 @@ if ($_POST["action"] == 'add_fourn' && $_POST["cancel"] <> $langs->trans("Cancel
if ($product->add_fournisseur($user, $_POST["id_fourn"], $_POST["ref_fourn"]) > 0)
{
$action = '';
$mesg = 'Founisseur ajout茅';
$mesg = $langs->trans("SupplierAdded");
}
else
{
@ -265,7 +265,7 @@ if ($_GET["action"] == 'create' && $user->rights->produit->creer)
print '<td>'.$langs->trans("Ref").'</td><td><input name="ref" size="20" value="'.$product->ref.'">';
if ($_error == 1)
{
print "Cette r茅f茅rence existe d茅j脿";
print $langs->trans("RefAlreadyExists");
}
print '</td></tr>';
print '<tr><td>'.$langs->trans("Label").'</td><td><input name="libelle" size="40" value="'.$product->libelle.'"></td></tr>';
@ -282,7 +282,7 @@ if ($_GET["action"] == 'create' && $user->rights->produit->creer)
print '<option value="0" selected>'.$langs->trans("NotOnSell").'</option>';
print '</td></tr>';
if ($_GET["type"] == 0 && defined("MAIN_MODULE_STOCK"))
if ($_GET["type"] == 0 && $conf->stick->enabled)
{
print "<tr>".'<td>Seuil stock</td><td colspan="2">';
print '<input name="seuil_stock_alerte" size="4" value="0">';
@ -332,14 +332,6 @@ else
* En mode visu
*/
// Zone recherche
print '<div class="formsearch">';
print '<form action="liste.php" method="post">';
print '<input type="hidden" name="type" value="'.$product->type.'">';
print $langs->trans("Ref").': <input class="flat" type="text" size="10" name="sref">&nbsp;<input class="flat" type="submit" value="'.$langs->trans("Go").'"> &nbsp;';
print $langs->trans("Label").': <input class="flat" type="text" size="20" name="snom">&nbsp;<input class="flat" type="submit" value="'.$langs->trans("Go").'">';
print '</form></div>';
$h=0;
$head[$h][0] = DOL_URL_ROOT."/product/fiche.php?id=".$product->id;
@ -623,28 +615,22 @@ print "\n<div class=\"tabsAction\">\n";
if ($_GET["action"] == '')
{
if ($product->type == 0 && $user->rights->produit->commander && $num_fournisseur == 1)
if ($product->type == 0 && $user->rights->produit->commander && $num_fournisseur == 1)
{
print '<a class="tabAction" href="fiche.php?action=fastappro&amp;id='.$product->id.'">'.$langs->trans("Commander").'</a>';
print '<a class="tabAction" href="fiche.php?action=fastappro&amp;id='.$product->id.'">'.$langs->trans("Commander").'</a>';
}
if ( $user->rights->produit->creer)
if ( $user->rights->produit->creer)
{
print '<a class="tabAction" href="fiche.php?action=edit_price&amp;id='.$product->id.'">'.$langs->trans("UpdatePrice").'</a>';
print '<a class="tabAction" href="fiche.php?action=edit_price&amp;id='.$product->id.'">'.$langs->trans("UpdatePrice").'</a>';
}
if ( $user->rights->produit->creer)
if ( $user->rights->produit->creer)
{
print '<a class="tabAction" href="fiche.php?action=edit&amp;id='.$product->id.'">'.$langs->trans("Edit").'</a>';
print '<a class="tabAction" href="fiche.php?action=edit&amp;id='.$product->id.'">'.$langs->trans("Edit").'</a>';
}
if ($product->type == 0 && $conf->stock->enabled)
{
print '<a class="tabAction" href="stock/product.php?id='.$product->id.'&amp;action=correction">Correction stock</a>';
}
}
if ($product->type == 0 && defined("MAIN_MODULE_STOCK"))
{
print '<a class="tabAction" href="stock/product.php?id='.$product->id.'&amp;action=correction">Correction stock</a>';
}
print "\n</div>\n";
@ -683,7 +669,7 @@ if ($_GET["id"] && $_GET["action"] == '' && $product->envente)
$objp = $db->fetch_object($i);
$var=!$var;
print "<tr $bc[$var]>";
print "<td><a href=\"../comm/propal.php?propalid=$objp->propalid\">$objp->ref</a></TD>\n";
print "<td><a href=\"../comm/propal.php?propalid=$objp->propalid\">$objp->ref</a></td>\n";
print "<td><a href=\"../comm/fiche.php?socid=$objp->idp\">$objp->nom</a></TD>\n";
print "<td>". strftime("%d %b",$objp->dp)."</td>\n";
print '<form method="POST" action="fiche.php?id='.$product->id.'">';
@ -755,8 +741,8 @@ if ($_GET["id"] && $_GET["action"] == '' && $product->envente)
$objp = $db->fetch_object( $i);
$var=!$var;
print "<TR $bc[$var]>";
print "<td><a href=\"../compta/facture.php?facid=$objp->factureid\">$objp->facnumber</a></TD>\n";
print "<tr $bc[$var]>";
print "<td><a href=\"../compta/facture.php?facid=$objp->factureid\">$objp->facnumber</a></td>\n";
print "<td><a href=\"../comm/fiche.php?socid=$objp->idp\">$objp->nom</a></TD>\n";
print "<td>". strftime("%d %b",$objp->df)."</td>\n";
print '<form method="POST" action="fiche.php?id='.$product->id.'">';

View File

@ -89,14 +89,6 @@ if ($_GET["id"])
* En mode visu
*/
// Zone recherche
print '<div class="formsearch">';
print '<form action="liste.php" method="post">';
print '<input type="hidden" name="type" value="'.$product->type.'">';
print $langs->trans("Ref").': <input class="flat" type="text" size="10" name="sref">&nbsp;<input class="flat" type="submit" value="'.$langs->trans("Go").'"> &nbsp;';
print $langs->trans("Label").': <input class="flat" type="text" size="20" name="snom">&nbsp;<input class="flat" type="submit" value="'.$langs->trans("Go").'">';
print '</form></div>';
$h=0;
$head[$h][0] = DOL_URL_ROOT."/product/fiche.php?id=".$product->id;
@ -136,9 +128,8 @@ if ($_GET["id"])
print($mesg);
print '<table class="border" width="100%">';
print "<tr>";
print '<td width="20%">'.$langs->trans("Ref").'</td><td width="30%">'.$product->ref.'</td>';
print '<td width="20%">';
print '<tr><td width="20%">'.$langs->trans("Ref").'</td><td colspan="3">'.$product->ref.'</td></tr>';
print '<tr><td width="20%">'.$langs->trans("Status").'</td><td colspan="3">';
if ($product->envente)
{
print $langs->trans("OnSell");
@ -163,7 +154,7 @@ if ($_GET["id"])
print $langs->trans("Suppliers").'</td>';
print '<td>'.$langs->trans("Ref").'</td>';
print '<td align="center">'.$langs->trans("Qty").'</td>';
print '<td align="right">Prix d\'achat</td>';
print '<td align="right">'.$langs->trans("BuiingPrice").'</td>';
print '</tr>';
$sql = "SELECT s.nom, s.idp, pf.ref_fourn, pfp.price, pfp.quantity";

View File

@ -53,19 +53,25 @@ if ($_POST["action"] == 'update')
llxHeader("","",$langs->trans("ProductsAndServices"));
print '<div class="formsearch"><form action="liste.php" method="post">';
print '<input type="hidden" name="type" value="'.$product->type.'">';
print $langs->trans("Ref").': <input class="flat" type="text" size="10" name="sref">&nbsp;<input class="button" type="submit" value="'.$langs->trans("Go").'">';
print ' &nbsp; ';
print $langs->trans("Label").': <input class="flat" type="text" size="20" name="snom">&nbsp;<input class="button" type="submit" value="'.$langs->trans("Go").'">';
print '</form></div>';
print_titre($langs->trans("ProductsAndServices"));
print '<table border="0" width="100%">';
print '<tr><td valign="top" width="30%">';
/*
* Zone recherche produit/service
*/
print '<form method="post" action="liste.php">';
print '<table class="noborder" width="100%">';
print "<tr class=\"liste_titre\">";
print '<td colspan="3">'.$langs->trans("Search").'</td></tr>';
print "<tr $bc[0]><td>";
print $langs->trans("Ref").' :</td><td><input class="flat" type="text" size="20" name="sf_ref"></td><td><input type="submit" value="'.$langs->trans("Search").'" class="button"></td></tr>';
print "<tr $bc[0]><td>";
print $langs->trans("Label").':</td><td><input class="flat" type="text" size="20" name="snom"></td><td><input class="button" type="submit" value="'.$langs->trans("Search").'"></td></tr>';
print "</table></form><br>";
/*
* Nombre de produits et/ou services
@ -140,7 +146,8 @@ if ($result)
$var=!$var;
print "<tr $bc[$var]>";
print "<td><a href=\"fiche.php?id=$objp->rowid\">";
print img_file();
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>".$typeprodser[$objp->fk_product_type]."</td>";

View File

@ -52,13 +52,8 @@ if ($page < 0) {
$limit = $conf->liste_limit;
$offset = $limit * $page ;
if ($sortfield == "") {
$sortfield="p.ref"; }
if ($sortorder == "")
{
$sortorder="DESC";
}
if (! $sortfield) $sortfield="p.ref";
if (! $sortorder) $sortorder="DESC";
if ($_POST["button_removefilter"] == $langs->trans("RemoveFilter")) {
$sref="";
@ -73,7 +68,7 @@ if ($_POST["button_removefilter"] == $langs->trans("RemoveFilter")) {
$title=$langs->trans("ProductsAndServices");
$sql = "SELECT p.rowid, p.label, p.price, p.ref";
$sql = "SELECT p.rowid, p.label, p.price, p.ref, p.fk_product_type";
$sql .= " FROM ".MAIN_DB_PREFIX."product as p";
if ($_GET["fourn_id"] > 0)
@ -89,11 +84,11 @@ if ($_POST["mode"] == 'search')
}
else
{
if (strlen($type) == 0)
$sql .= " WHERE 1=1";
if (isset($_GET["type"]) || isset($_POST["type"]))
{
$type = 0;
$sql .= " AND p.fk_product_type = ".(isset($_GET["type"])?$_GET["type"]:$_POST["type"]);
}
$sql .= " WHERE p.fk_product_type = ".$type;
if ($sref)
{
$sql .= " AND p.ref like '%".$sref."%'";
@ -123,34 +118,41 @@ $result = $db->query($sql) ;
if ($result)
{
$num = $db->num_rows();
$i = 0;
$num = $db->num_rows();
$i = 0;
if ($num == 1 && (isset($_POST["sall"]) or $snom or $sref))
if ($num == 1 && (isset($_POST["sall"]) or $snom or $sref))
{
$objp = $db->fetch_object($i);
Header("Location: fiche.php?id=$objp->rowid");
$objp = $db->fetch_object($i);
Header("Location: fiche.php?id=$objp->rowid");
}
if (isset($envente) && $envente == 0)
{
if (isset($_POST["type"]) || isset($_GET["type"])) {
if ($type) { $texte = $langs->trans("ServicesNotOnSell"); }
else { $texte = $langs->trans("ProductsNotOnSell"); }
} else {
$texte = $langs->trans("ProductsAndServicesNotOnSell");
}
if (isset($_GET["envente"]) || isset($_POST["envente"])) {
$envente = (isset($_GET["envente"])?$_GET["envente"]:$_POST["envente"]);
}
else
else {
$envente=1;
}
if (! $envente)
{
$envente=1;
if (isset($_POST["type"]) || isset($_GET["type"])) {
if ($type) { $texte = $langs->trans("ServicesOnSell"); }
else { $texte = $langs->trans("ProductsOnSell"); }
} else {
$texte = $langs->trans("ProductsAndServicesOnSell");
}
if (isset($_GET["type"]) || isset($_POST["type"])) {
$type=isset($_GET["type"])?$_GET["type"]:$_POST["type"];
if ($type) { $texte = $langs->trans("ServicesNotOnSell"); }
else { $texte = $langs->trans("ProductsNotOnSell"); }
} else {
$texte = $langs->trans("ProductsAndServicesNotOnSell");
}
}
else
{
if (isset($_POST["type"]) || isset($_GET["type"])) {
if ($type) { $texte = $langs->trans("ServicesOnSell"); }
else { $texte = $langs->trans("ProductsOnSell"); }
} else {
$texte = $langs->trans("ProductsAndServicesOnSell");
}
}
llxHeader("","",$texte);
@ -200,8 +202,9 @@ if ($result)
$var=!$var;
print "<tr $bc[$var]><td>";
print "<a href=\"fiche.php?id=$objp->rowid\">";
print img_file();
print "</a>&nbsp;";
if ($objp->fk_product_type) print img_object($langs->trans("ShowService"),"service");
else print img_object($langs->trans("ShowProduct"),"product");
print "</a> ";
print "<a href=\"fiche.php?id=$objp->rowid\">$objp->ref</a></td>\n";
print "<td>$objp->label</td>\n";
print '<td align="right">'.price($objp->price).'</td>';

View File

@ -24,7 +24,7 @@
/** \file htdocs/product/popuprop.php
\ingroup propal, produit
\brief Liste des produits par popularit茅
\brief Liste des produits/services par popularit茅
\version $Revision$
*/
@ -63,7 +63,7 @@ if ( $db->query($sql) )
$afficher_pagesuivante = -1;
}
print_barre_liste("Liste des produits par popularit茅", $page, "popuprop.php","","","","",$afficher_pagesuivante);
print_barre_liste("Liste des produits et services par popularit茅", $page, "popuprop.php","","","","",$afficher_pagesuivante);
print '<table class="noborder" width="100%">';
@ -73,8 +73,9 @@ print_liste_field_titre($langs->trans("Label"),"popuprop.php", "p.label","","","
print_liste_field_titre("Nb. de proposition","popuprop.php", "c","","",'align="right"',$sortfield);
print "</tr>\n";
$sql = "select p.rowid, p.label, p.ref, count(*) as c from ".MAIN_DB_PREFIX."propaldet as pd, ".MAIN_DB_PREFIX."product as p where p.rowid = pd.fk_product group by (p.rowid)";
$sql = "SELECT p.rowid, p.label, p.ref, fk_product_type, count(*) as c";
$sql .= " FROM ".MAIN_DB_PREFIX."propaldet as pd, ".MAIN_DB_PREFIX."product as p";
$sql .= " WHERE p.rowid = pd.fk_product group by (p.rowid)";
$sql .= " ORDER BY $sortfield $sortorder ";
$sql .= $db->plimit( $limit ,$offset);
@ -90,7 +91,11 @@ if ( $db->query($sql) )
$objp = $db->fetch_object( $i);
$var=!$var;
print "<tr $bc[$var]>";
print "<td><a href=\"fiche.php?id=$objp->rowid\">$objp->ref</a></td>\n";
print "<td><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> ";
print "<a href=\"fiche.php?id=$objp->rowid\">$objp->ref</a></td>\n";
print "<td>$objp->label</td>\n";
print '<td align="right">'.$objp->c.'</td>';
print "</tr>\n";

View File

@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2001-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 20004 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004-2005 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
@ -21,7 +21,7 @@
*
*/
/*!
/**
\file htdocs/product/price.php
\ingroup product
\brief Page de la fiche produit
@ -59,15 +59,6 @@ $product = new Product($db);
$result = $product->fetch($_GET["id"]);
// Zone recherche
print '<div class="formsearch">';
print '<form action="liste.php" method="post">';
print '<input type="hidden" name="type" value="'.$product->type.'">';
print $langs->trans("Ref").': <input class="flat" type="text" size="10" name="sref">&nbsp;<input class="flat" type="submit" value="'.$langs->trans("Go").'"> &nbsp;';
print $langs->trans("Label").': <input class="flat" type="text" size="20" name="snom">&nbsp;<input class="flat" type="submit" value="'.$langs->trans("Go").'">';
print '</form></div>';
$h=0;
$head[$h][0] = DOL_URL_ROOT."/product/fiche.php?id=".$product->id;

View File

@ -109,15 +109,7 @@ if ($_GET["id"])
$mesg = $langs->trans("ChartGenerated");
}
// Zone recherche
print '<div class="formsearch">';
print '<form action="../liste.php" method="post">';
print '<input type="hidden" name="type" value="'.$product->type.'">';
print $langs->trans("Ref").': <input class="flat" type="text" size="10" name="sref">&nbsp;<input class="flat" type="submit" value="'.$langs->trans("Go").'"> &nbsp;';
print $langs->trans("Label").': <input class="flat" type="text" size="20" name="snom">&nbsp;<input class="flat" type="submit" value="'.$langs->trans("Go").'">';
print '</form></div>';
$h=0;
$head[$h][0] = DOL_URL_ROOT."/product/fiche.php?id=".$product->id;
@ -133,7 +125,7 @@ if ($_GET["id"])
if ($conf->stock->enabled)
{
$head[$h][0] = DOL_URL_ROOT."/product/stock/product.php?id=".$product->id;
$head[$h][1] = 'Stock';
$head[$h][1] = $langs->trans('Stock');
$h++;
}
@ -154,9 +146,10 @@ if ($_GET["id"])
print '<table class="border" width="100%"><tr>';
print '<td width="20%">'.$langs->trans("Ref").'</td><td width="40%"><a href="../fiche.php?id='.$product->id.'">'.$product->ref.'</a></td>';
print '<td width="20%">'.$langs->trans("Ref").'</td>';
print '<td width="40%">'.$product->ref.'</td>';
print '<td>'.$langs->trans("Statistics").'</td></tr>';
print "<tr><td>".$langs->trans("Label")."</td><td>$product->libelle</td>";
print '<tr><td>'.$langs->trans("Label").'</td><td>'.$product->libelle.'</td>';
print '<td valign="top" rowspan="2">';
// Propals
if ($conf->propal->enabled) {

View File

@ -102,16 +102,6 @@ if ($_GET["id"])
if ( $product->fetch($_GET["id"]))
{
// Zone recherche
print '<div class="formsearch">';
print '<form action="liste.php" method="post">';
print '<input type="hidden" name="type" value="'.$product->type.'">';
print $langs->trans("Ref").': <input class="flat" type="text" size="10" name="sref">&nbsp;<input class="flat" type="submit" value="'.$langs->trans("Go").'"> &nbsp;';
print $langs->trans("Label").': <input class="flat" type="text" size="20" name="snom">&nbsp;<input class="flat" type="submit" value="'.$langs->trans("Go").'">';
print '</form></div>';
$h=0;
$head[$h][0] = DOL_URL_ROOT."/product/fiche.php?id=".$product->id;
@ -145,7 +135,7 @@ if ($_GET["id"])
print '<table class="border" width="100%">';
print "<tr>";
print '<td width="20%">'.$langs->trans("Ref").'</td><td width="40%"><a href="../fiche.php?id='.$product->id.'">'.$product->ref.'</a></td>';
print '<td width="20%">'.$langs->trans("Ref").'</td><td width="40%">'.$product->ref.'</td>';
print '<td width="40%">';
if ($product->envente)
{
@ -194,9 +184,9 @@ if ($_GET["id"])
*
*/
print '<br><table class="border" width="100%">';
print '<tr class="liste_titre"><td width="40%">Entrep么t</td><td width="60%">Valeur du stock</td></tr>';
print '<tr class="liste_titre"><td width="40%">'.$langs->trans("Warehouse").'</td><td width="60%">Valeur du stock</td></tr>';
$sql = "SELECT e.rowid, e.label, ps.reel FROM ".MAIN_DB_PREFIX."entrepot as e, ".MAIN_DB_PREFIX."product_stock as ps";
$sql .= " WHERE ps.fk_entrepot = e.rowid AND ps.fk_product = $product->id";
$sql .= " WHERE ps.fk_entrepot = e.rowid AND ps.fk_product = ".$product->id;
$sql .= " ORDER BY lower(e.label)";
if ($db->query($sql))
@ -227,9 +217,10 @@ if ($_GET["id"])
print "<form action=\"product.php?id=$product->id\" method=\"post\">\n";
print '<input type="hidden" name="action" value="correct_stock">';
print '<table class="border" width="100%"><tr>';
print '<td width="20%">Entrep么t</td><td width="20%"><select name="id_entrepot">';
print '<td width="20%">'.$langs->trans("Warehouse").'</td><td width="20%"><select name="id_entrepot">';
$sql = "SELECT e.rowid, e.label FROM ".MAIN_DB_PREFIX."entrepot as e WHERE statut = 1";
$sql = "SELECT e.rowid, e.label FROM ".MAIN_DB_PREFIX."entrepot as e";
$sql .= " WHERE statut = 1";
$sql .= " ORDER BY lower(e.label)";
if ($db->query($sql))
@ -265,9 +256,10 @@ if ($_GET["id"])
print "<form action=\"product.php?id=$product->id\" method=\"post\">\n";
print '<input type="hidden" name="action" value="transfert_stock">';
print '<table class="border" width="100%"><tr>';
print '<td width="20%">Source</td><td width="20%"><select name="id_entrepot_source">';
print '<td width="20%">'.$langs->trans("Source").'</td><td width="20%"><select name="id_entrepot_source">';
$sql = "SELECT e.rowid, e.label FROM ".MAIN_DB_PREFIX."entrepot as e WHERE statut = 1";
$sql = "SELECT e.rowid, e.label FROM ".MAIN_DB_PREFIX."entrepot as e";
$sql .= " WHERE statut = 1";
$sql .= " ORDER BY lower(e.label)";
if ($db->query($sql))
@ -283,9 +275,10 @@ if ($_GET["id"])
}
print '</select></td>';
print '<td width="20%">Destination</td><td width="20%"><select name="id_entrepot_destination">';
print '<td width="20%">'.$langs->trans("Target").'</td><td width="20%"><select name="id_entrepot_destination">';
$sql = "SELECT e.rowid, e.label FROM ".MAIN_DB_PREFIX."entrepot as e WHERE statut = 1";
$sql = "SELECT e.rowid, e.label FROM ".MAIN_DB_PREFIX."entrepot as e";
$sql .= " WHERE statut = 1";
$sql .= " ORDER BY lower(e.label)";
if ($db->query($sql))
@ -317,7 +310,7 @@ if ($_GET["id"])
print "<form action=\"product.php?id=$product->id\" method=\"post\">\n";
print '<input type="hidden" name="action" value="create_stock">';
print '<table class="border" width="100%"><tr>';
print '<td width="20%">Entrep么t</td><td width="40%"><select name="id_entrepot">';
print '<td width="20%">'.$langs->trans("Warehouse").'</td><td width="40%"><select name="id_entrepot">';
$sql = "SELECT e.rowid, e.label FROM ".MAIN_DB_PREFIX."entrepot as e";
$sql .= " ORDER BY lower(e.label)";

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB