New: Add picto on tab titles
This commit is contained in:
parent
63fa194ff6
commit
8761c985b7
@ -219,7 +219,8 @@ else if ($_GET["id"] || $_GET["ref"])
|
||||
|
||||
$head=product_prepare_head($product, $user);
|
||||
$titre=$langs->trans("CardProduct".$product->type);
|
||||
dol_fiche_head($head, 'category', $titre);
|
||||
$picto=($product->type==1?'service':'product');
|
||||
dol_fiche_head($head, 'category', $titre,0,$picto);
|
||||
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
@ -123,7 +123,8 @@ if ($product->id)
|
||||
|
||||
$head=product_prepare_head($product, $user);
|
||||
$titre=$langs->trans("CardProduct".$product->type);
|
||||
dol_fiche_head($head, 'documents', $titre);
|
||||
$picto=($product->type==1?'service':'product');
|
||||
dol_fiche_head($head, 'documents', $titre, 0, $picto);
|
||||
|
||||
|
||||
// Construit liste des fichiers
|
||||
|
||||
@ -812,7 +812,8 @@ if ($_GET["id"] || $_GET["ref"])
|
||||
{
|
||||
$head=product_prepare_head($product, $user);
|
||||
$titre=$langs->trans("CardProduct".$product->type);
|
||||
dol_fiche_head($head, 'card', $titre);
|
||||
$picto=($product->type==1?'service':'product');
|
||||
dol_fiche_head($head, 'card', $titre, 0, $picto);
|
||||
print "\n<!-- CUT HERE -->\n";
|
||||
// Confirmation de la suppression de la facture
|
||||
if ($_GET["action"] == 'delete')
|
||||
|
||||
@ -20,11 +20,11 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
\file htdocs/product/fournisseurs.php
|
||||
\ingroup product
|
||||
\brief Page de l'onglet fournisseur de produits
|
||||
\version $Id$
|
||||
*/
|
||||
* \file htdocs/product/fournisseurs.php
|
||||
* \ingroup product
|
||||
* \brief Page de l'onglet fournisseur de produits
|
||||
* \version $Id$
|
||||
*/
|
||||
|
||||
require("./pre.inc.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/product.lib.php");
|
||||
@ -61,29 +61,29 @@ if ($conf->use_javascript_ajax && $conf->global->COMPANY_USE_SEARCH_TO_SELECT &&
|
||||
|
||||
if ($_GET["action"] == 'remove_pf')
|
||||
{
|
||||
$product = new ProductFournisseur($db);
|
||||
if ($product->fetch($_GET["id"]) > 0)
|
||||
{
|
||||
if ($_GET["rowid"])
|
||||
{
|
||||
$product = new ProductFournisseur($db);
|
||||
if ($product->fetch($_GET["id"]) > 0)
|
||||
{
|
||||
if ($_GET["rowid"])
|
||||
{
|
||||
$result=$product->remove_product_fournisseur_price($_GET["rowid"]);
|
||||
$_GET["action"] = '';
|
||||
$mesg = '<div class="ok">'.$langs->trans("PriceRemoved").'.</div>';
|
||||
$_GET["action"] = '';
|
||||
$mesg = '<div class="ok">'.$langs->trans("PriceRemoved").'.</div>';
|
||||
}
|
||||
else
|
||||
{
|
||||
// Deprecated. Should not occurs
|
||||
if ($product->remove_fournisseur($_GET["socid"]) > 0)
|
||||
{
|
||||
$_GET["action"] = '';
|
||||
$mesg = '<div class="ok">'.$langs->trans("SupplierRemoved").'.</div>';
|
||||
}
|
||||
else
|
||||
{
|
||||
$_GET["action"] = '';
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Deprecated. Should not occurs
|
||||
if ($product->remove_fournisseur($_GET["socid"]) > 0)
|
||||
{
|
||||
$_GET["action"] = '';
|
||||
$mesg = '<div class="ok">'.$langs->trans("SupplierRemoved").'.</div>';
|
||||
}
|
||||
else
|
||||
{
|
||||
$_GET["action"] = '';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($_POST["action"] == 'updateprice' && $_POST["cancel"] <> $langs->trans("Cancel"))
|
||||
@ -161,9 +161,9 @@ if ($_POST["action"] == 'updateprice' && $_POST["cancel"] <> $langs->trans("Canc
|
||||
|
||||
if ($_POST["cancel"] == $langs->trans("Cancel"))
|
||||
{
|
||||
$action = '';
|
||||
Header("Location: fournisseurs.php?id=".$_GET["id"]);
|
||||
exit;
|
||||
$action = '';
|
||||
Header("Location: fournisseurs.php?id=".$_GET["id"]);
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
@ -190,12 +190,13 @@ if ($_GET["id"] || $_GET["ref"])
|
||||
if ($_GET["action"] <> 'edit' && $_GET["action"] <> 're-edit')
|
||||
{
|
||||
/*
|
||||
* En mode visu
|
||||
*/
|
||||
* En mode visu
|
||||
*/
|
||||
|
||||
$head=product_prepare_head($product, $user);
|
||||
$titre=$langs->trans("CardProduct".$product->type);
|
||||
dol_fiche_head($head, 'suppliers', $titre);
|
||||
$picto=($product->type==1?'service':'product');
|
||||
dol_fiche_head($head, 'suppliers', $titre, 0, $picto);
|
||||
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
@ -20,10 +20,10 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
\file htdocs/product/photos.php
|
||||
\ingroup product
|
||||
\brief Onglet photos de la fiche produit
|
||||
\version $Id$
|
||||
* \file htdocs/product/photos.php
|
||||
* \ingroup product
|
||||
* \brief Onglet photos de la fiche produit
|
||||
* \version $Id$
|
||||
*/
|
||||
|
||||
require("./pre.inc.php");
|
||||
@ -75,7 +75,7 @@ if ($_GET["action"] == 'addthumb' && $_GET["file"])
|
||||
|
||||
|
||||
/*
|
||||
*
|
||||
* View
|
||||
*/
|
||||
|
||||
$html = new Form($db);
|
||||
@ -96,7 +96,8 @@ if ($_GET["id"] || $_GET["ref"])
|
||||
*/
|
||||
$head=product_prepare_head($product, $user);
|
||||
$titre=$langs->trans("CardProduct".$product->type);
|
||||
dol_fiche_head($head, 'photos', $titre);
|
||||
$picto=($product->type==1?'service':'product');
|
||||
dol_fiche_head($head, 'photos', $titre, 0, $picto);
|
||||
|
||||
/*
|
||||
* Confirmation de la suppression de photo
|
||||
|
||||
@ -120,7 +120,8 @@ llxHeader("","",$langs->trans("CardProduct".$product->type));
|
||||
|
||||
$head=product_prepare_head($product, $user);
|
||||
$titre=$langs->trans("CardProduct".$product->type);
|
||||
dol_fiche_head($head, 'price', $titre);
|
||||
$picto=($product->type==1?'service':'product');
|
||||
dol_fiche_head($head, 'price', $titre, 0, $picto);
|
||||
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
@ -146,7 +146,8 @@ if ($mesg) {
|
||||
|
||||
$head=product_prepare_head($product, $user);
|
||||
$titre=$langs->trans("CardProduct".$product->type);
|
||||
dol_fiche_head($head, 'subproduct', $titre);
|
||||
$picto=($product->type==1?'service':'product');
|
||||
dol_fiche_head($head, 'subproduct', $titre, 0, $picto);
|
||||
|
||||
/*
|
||||
* Fiche produit
|
||||
|
||||
@ -83,7 +83,8 @@ if ($_GET["id"] || $_GET["ref"])
|
||||
*/
|
||||
$head=product_prepare_head($product, $user);
|
||||
$titre=$langs->trans("CardProduct".$product->type);
|
||||
dol_fiche_head($head, 'referers', $titre);
|
||||
$picto=($product->type==1?'service':'product');
|
||||
dol_fiche_head($head, 'referers', $titre, 0, $picto);
|
||||
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
@ -19,11 +19,11 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
\file htdocs/product/stats/commande_fournisseur.php
|
||||
\ingroup product, service, commande
|
||||
\brief Page des stats des commandes fournisseurs pour un produit
|
||||
\version $Id$
|
||||
*/
|
||||
\file htdocs/product/stats/commande_fournisseur.php
|
||||
\ingroup product, service, commande
|
||||
\brief Page des stats des commandes fournisseurs pour un produit
|
||||
\version $Id$
|
||||
*/
|
||||
|
||||
|
||||
require("./pre.inc.php");
|
||||
@ -65,38 +65,39 @@ $html = new Form($db);
|
||||
|
||||
if ($_GET["id"] || $_GET["ref"])
|
||||
{
|
||||
$product = new Product($db);
|
||||
if ($_GET["ref"])
|
||||
{
|
||||
$result = $product->fetch('',$_GET["ref"]);
|
||||
$_GET["id"]=$product->id;
|
||||
}
|
||||
if ($_GET["id"]) $result = $product->fetch($_GET["id"]);
|
||||
$product = new Product($db);
|
||||
if ($_GET["ref"])
|
||||
{
|
||||
$result = $product->fetch('',$_GET["ref"]);
|
||||
$_GET["id"]=$product->id;
|
||||
}
|
||||
if ($_GET["id"]) $result = $product->fetch($_GET["id"]);
|
||||
|
||||
llxHeader("","",$langs->trans("CardProduct".$product->type));
|
||||
llxHeader("","",$langs->trans("CardProduct".$product->type));
|
||||
|
||||
if ($result > 0)
|
||||
{
|
||||
/*
|
||||
* En mode visu
|
||||
*/
|
||||
$head=product_prepare_head($product, $user);
|
||||
$titre=$langs->trans("CardProduct".$product->type);
|
||||
dol_fiche_head($head, 'referers', $titre);
|
||||
if ($result > 0)
|
||||
{
|
||||
/*
|
||||
* En mode visu
|
||||
*/
|
||||
$head=product_prepare_head($product, $user);
|
||||
$titre=$langs->trans("CardProduct".$product->type);
|
||||
$picto=($product->type==1?'service':'product');
|
||||
dol_fiche_head($head, 'referers', $titre, 0, $picto);
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
// Reference
|
||||
print '<tr>';
|
||||
print '<td width="15%">'.$langs->trans("Ref").'</td><td colspan="3">';
|
||||
print $html->showrefnav($product,'ref','',1,'ref');
|
||||
print '</td></tr>';
|
||||
// Reference
|
||||
print '<tr>';
|
||||
print '<td width="15%">'.$langs->trans("Ref").'</td><td colspan="3">';
|
||||
print $html->showrefnav($product,'ref','',1,'ref');
|
||||
print '</td></tr>';
|
||||
|
||||
// Libelle
|
||||
print '<tr><td>'.$langs->trans("Label").'</td><td colspan="3">'.$product->libelle.'</td></tr>';
|
||||
// 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="3">';
|
||||
// Prix
|
||||
print '<tr><td>'.$langs->trans("SellingPrice").'</td><td colspan="3">';
|
||||
if ($product->price_base_type == 'TTC')
|
||||
{
|
||||
print price($product->price_ttc).' '.$langs->trans($product->price_base_type);
|
||||
@ -107,88 +108,88 @@ if ($_GET["id"] || $_GET["ref"])
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
// Statut
|
||||
print '<tr><td>'.$langs->trans("Status").'</td><td colspan="3">';
|
||||
print $product->getLibStatut(2);
|
||||
print '</td></tr>';
|
||||
// Statut
|
||||
print '<tr><td>'.$langs->trans("Status").'</td><td colspan="3">';
|
||||
print $product->getLibStatut(2);
|
||||
print '</td></tr>';
|
||||
|
||||
show_stats_for_company($product,$socid);
|
||||
show_stats_for_company($product,$socid);
|
||||
|
||||
print "</table>";
|
||||
print '</div>';
|
||||
print "</table>";
|
||||
print '</div>';
|
||||
|
||||
$sql = "SELECT distinct(s.nom), s.rowid as socid, s.code_client, c.rowid, c.total_ht as total_ht, c.ref,";
|
||||
$sql.= " ".$db->pdate("c.date_creation")." as date, c.fk_statut as statut, c.rowid as commandeid";
|
||||
if (!$user->rights->societe->client->voir && !$socid) $sql .= ", sc.fk_soc, sc.fk_user ";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s";
|
||||
$sql.= ", ".MAIN_DB_PREFIX."commande_fournisseur as c";
|
||||
$sql.= ", ".MAIN_DB_PREFIX."commande_fournisseurdet as d";
|
||||
if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||
$sql.= " WHERE c.fk_soc = s.rowid";
|
||||
$sql.= " AND s.entity = ".$conf->entity;
|
||||
$sql.= " AND d.fk_commande = c.rowid";
|
||||
$sql.= " AND d.fk_product =".$product->id;
|
||||
if (!$user->rights->societe->client->voir && !$socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
|
||||
if ($socid) $sql.= " AND c.fk_soc = ".$socid;
|
||||
$sql.= " ORDER BY $sortfield $sortorder ";
|
||||
$sql.= $db->plimit($conf->liste_limit +1, $offset);
|
||||
$sql = "SELECT distinct(s.nom), s.rowid as socid, s.code_client, c.rowid, c.total_ht as total_ht, c.ref,";
|
||||
$sql.= " ".$db->pdate("c.date_creation")." as date, c.fk_statut as statut, c.rowid as commandeid";
|
||||
if (!$user->rights->societe->client->voir && !$socid) $sql .= ", sc.fk_soc, sc.fk_user ";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s";
|
||||
$sql.= ", ".MAIN_DB_PREFIX."commande_fournisseur as c";
|
||||
$sql.= ", ".MAIN_DB_PREFIX."commande_fournisseurdet as d";
|
||||
if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||
$sql.= " WHERE c.fk_soc = s.rowid";
|
||||
$sql.= " AND s.entity = ".$conf->entity;
|
||||
$sql.= " AND d.fk_commande = c.rowid";
|
||||
$sql.= " AND d.fk_product =".$product->id;
|
||||
if (!$user->rights->societe->client->voir && !$socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
|
||||
if ($socid) $sql.= " AND c.fk_soc = ".$socid;
|
||||
$sql.= " ORDER BY $sortfield $sortorder ";
|
||||
$sql.= $db->plimit($conf->liste_limit +1, $offset);
|
||||
|
||||
$result = $db->query($sql);
|
||||
if ($result)
|
||||
{
|
||||
$num = $db->num_rows($result);
|
||||
$result = $db->query($sql);
|
||||
if ($result)
|
||||
{
|
||||
$num = $db->num_rows($result);
|
||||
|
||||
print_barre_liste($langs->trans("SuppliersOrders"),$page,$_SERVER["PHP_SELF"],"&id=$product->id",$sortfield,$sortorder,'',$num,0,'');
|
||||
print_barre_liste($langs->trans("SuppliersOrders"),$page,$_SERVER["PHP_SELF"],"&id=$product->id",$sortfield,$sortorder,'',$num,0,'');
|
||||
|
||||
$i = 0;
|
||||
print "<table class=\"noborder\" width=\"100%\">";
|
||||
$i = 0;
|
||||
print "<table class=\"noborder\" width=\"100%\">";
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"c.rowid","","&id=".$_GET["id"],'',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"s.nom","","&id=".$_GET["id"],'',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("SupplierCode"),$_SERVER["PHP_SELF"],"s.code_client","","&id=".$_GET["id"],'',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("DateCreation"),$_SERVER["PHP_SELF"],"c.date_creation","","&id=".$_GET["id"],'align="center"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("AmountHT"),$_SERVER["PHP_SELF"],"c.total_ht","","&id=".$_GET["id"],'align="right"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"c.fk_statut","","&id=".$_GET["id"],'align="right"',$sortfield,$sortorder);
|
||||
print "</tr>\n";
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"c.rowid","","&id=".$_GET["id"],'',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"s.nom","","&id=".$_GET["id"],'',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("SupplierCode"),$_SERVER["PHP_SELF"],"s.code_client","","&id=".$_GET["id"],'',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("DateCreation"),$_SERVER["PHP_SELF"],"c.date_creation","","&id=".$_GET["id"],'align="center"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("AmountHT"),$_SERVER["PHP_SELF"],"c.total_ht","","&id=".$_GET["id"],'align="right"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"c.fk_statut","","&id=".$_GET["id"],'align="right"',$sortfield,$sortorder);
|
||||
print "</tr>\n";
|
||||
|
||||
$commandestatic=new Commande($db);
|
||||
$commandestatic=new Commande($db);
|
||||
|
||||
if ($num > 0)
|
||||
{
|
||||
$var=True;
|
||||
while ($i < $num && $i < $conf->liste_limit)
|
||||
{
|
||||
$objp = $db->fetch_object($result);
|
||||
$var=!$var;
|
||||
if ($num > 0)
|
||||
{
|
||||
$var=True;
|
||||
while ($i < $num && $i < $conf->liste_limit)
|
||||
{
|
||||
$objp = $db->fetch_object($result);
|
||||
$var=!$var;
|
||||
|
||||
print "<tr $bc[$var]>";
|
||||
print '<td><a href="'.DOL_URL_ROOT.'/fourn/commande/fiche.php?id='.$objp->commandeid.'">'.img_object($langs->trans("ShowOrder"),"order").' ';
|
||||
print $objp->ref;
|
||||
print "</a></td>\n";
|
||||
print '<td><a href="'.DOL_URL_ROOT.'/compta/fiche.php?socid='.$objp->socid.'">'.img_object($langs->trans("ShowCompany"),"company").' '.dol_trunc($objp->nom,44).'</a></td>';
|
||||
print "<td>".$objp->code_client."</td>\n";
|
||||
print "<td align=\"center\">";
|
||||
print dol_print_date($objp->date)."</td>";
|
||||
print "<td align=\"right\">".price($objp->total_ht)."</td>\n";
|
||||
print '<td align="right">'.$commandestatic->LibStatut($objp->statut,$objp->facture,5).'</td>';
|
||||
print "</tr>\n";
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
dol_print_error($db);
|
||||
}
|
||||
print "</table>";
|
||||
print '<br>';
|
||||
$db->free($result);
|
||||
}
|
||||
print "<tr $bc[$var]>";
|
||||
print '<td><a href="'.DOL_URL_ROOT.'/fourn/commande/fiche.php?id='.$objp->commandeid.'">'.img_object($langs->trans("ShowOrder"),"order").' ';
|
||||
print $objp->ref;
|
||||
print "</a></td>\n";
|
||||
print '<td><a href="'.DOL_URL_ROOT.'/compta/fiche.php?socid='.$objp->socid.'">'.img_object($langs->trans("ShowCompany"),"company").' '.dol_trunc($objp->nom,44).'</a></td>';
|
||||
print "<td>".$objp->code_client."</td>\n";
|
||||
print "<td align=\"center\">";
|
||||
print dol_print_date($objp->date)."</td>";
|
||||
print "<td align=\"right\">".price($objp->total_ht)."</td>\n";
|
||||
print '<td align="right">'.$commandestatic->LibStatut($objp->statut,$objp->facture,5).'</td>';
|
||||
print "</tr>\n";
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
dol_print_error($db);
|
||||
}
|
||||
print "</table>";
|
||||
print '<br>';
|
||||
$db->free($result);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
dol_print_error();
|
||||
dol_print_error();
|
||||
}
|
||||
|
||||
$db->close();
|
||||
|
||||
@ -84,7 +84,8 @@ if ($_GET["id"] || $_GET["ref"])
|
||||
*/
|
||||
$head=product_prepare_head($product,$user);
|
||||
$titre=$langs->trans("CardProduct".$product->type);
|
||||
dol_fiche_head($head, 'referers', $titre);
|
||||
$picto=($product->type==1?'service':'product');
|
||||
dol_fiche_head($head, 'referers', $titre, 0, $picto);
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
|
||||
@ -19,11 +19,11 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
\file htdocs/product/stats/facture.php
|
||||
\ingroup product, service, facture
|
||||
\brief Page des stats des factures clients pour un produit
|
||||
\version $Id$
|
||||
*/
|
||||
\file htdocs/product/stats/facture.php
|
||||
\ingroup product, service, facture
|
||||
\brief Page des stats des factures clients pour un produit
|
||||
\version $Id$
|
||||
*/
|
||||
|
||||
|
||||
require("./pre.inc.php");
|
||||
@ -69,39 +69,40 @@ $html = new Form($db);
|
||||
if ($_GET["id"] || $_GET["ref"])
|
||||
{
|
||||
$product = new Product($db);
|
||||
if ($_GET["ref"])
|
||||
{
|
||||
$result = $product->fetch('',$_GET["ref"]);
|
||||
$_GET["id"]=$product->id;
|
||||
}
|
||||
if ($_GET["id"]) $result = $product->fetch($_GET["id"]);
|
||||
if ($_GET["ref"])
|
||||
{
|
||||
$result = $product->fetch('',$_GET["ref"]);
|
||||
$_GET["id"]=$product->id;
|
||||
}
|
||||
if ($_GET["id"]) $result = $product->fetch($_GET["id"]);
|
||||
|
||||
llxHeader("","",$langs->trans("CardProduct".$product->type));
|
||||
llxHeader("","",$langs->trans("CardProduct".$product->type));
|
||||
|
||||
/*
|
||||
* En mode visu
|
||||
*/
|
||||
if ($result > 0)
|
||||
{
|
||||
$head=product_prepare_head($product, $user);
|
||||
/*
|
||||
* En mode visu
|
||||
*/
|
||||
if ($result > 0)
|
||||
{
|
||||
$head=product_prepare_head($product, $user);
|
||||
$titre=$langs->trans("CardProduct".$product->type);
|
||||
dol_fiche_head($head, 'referers', $titre);
|
||||
$picto=($product->type==1?'service':'product');
|
||||
dol_fiche_head($head, 'referers', $titre, 0, $picto);
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
// Reference
|
||||
print '<tr>';
|
||||
print '<td width="15%">'.$langs->trans("Ref").'</td><td colspan="3">';
|
||||
// Reference
|
||||
print '<tr>';
|
||||
print '<td width="15%">'.$langs->trans("Ref").'</td><td colspan="3">';
|
||||
print $html->showrefnav($product,'ref','',1,'ref');
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
// Libelle
|
||||
print '<tr><td>'.$langs->trans("Label").'</td><td colspan="3">'.$product->libelle.'</td>';
|
||||
print '</tr>';
|
||||
// Libelle
|
||||
print '<tr><td>'.$langs->trans("Label").'</td><td colspan="3">'.$product->libelle.'</td>';
|
||||
print '</tr>';
|
||||
|
||||
// Price
|
||||
print '<tr><td>'.$langs->trans("SellingPrice").'</td><td colspan="3">';
|
||||
// Price
|
||||
print '<tr><td>'.$langs->trans("SellingPrice").'</td><td colspan="3">';
|
||||
if ($product->price_base_type == 'TTC')
|
||||
{
|
||||
print price($product->price_ttc).' '.$langs->trans($product->price_base_type);
|
||||
@ -112,90 +113,90 @@ if ($_GET["id"] || $_GET["ref"])
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
// Statut
|
||||
print '<tr><td>'.$langs->trans("Status").'</td><td colspan="3">';
|
||||
// Statut
|
||||
print '<tr><td>'.$langs->trans("Status").'</td><td colspan="3">';
|
||||
print $product->getLibStatut(2);
|
||||
print '</td></tr>';
|
||||
print '</td></tr>';
|
||||
|
||||
show_stats_for_company($product,$socid);
|
||||
|
||||
print "</table>";
|
||||
print "</table>";
|
||||
|
||||
print '</div>';
|
||||
print '</div>';
|
||||
|
||||
|
||||
$sql = "SELECT distinct(s.nom), s.rowid as socid, s.code_client, f.facnumber, f.total as total_ht,";
|
||||
$sql.= " ".$db->pdate("f.datef")." as date, f.paye, f.fk_statut as statut, f.rowid as facid";
|
||||
if (!$user->rights->societe->client->voir && !$socid) $sql.= ", sc.fk_soc, sc.fk_user ";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s";
|
||||
$sql.= ", ".MAIN_DB_PREFIX."facture as f";
|
||||
$sql.= ", ".MAIN_DB_PREFIX."facturedet as d";
|
||||
if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||
$sql.= " WHERE f.fk_soc = s.rowid";
|
||||
$sql.= " AND s.entity = ".$conf->entity;
|
||||
$sql.= " AND d.fk_facture = f.rowid";
|
||||
$sql.= " AND d.fk_product =".$product->id;
|
||||
if (!$user->rights->societe->client->voir && !$socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
|
||||
if ($socid) $sql.= " AND f.fk_soc = $socid";
|
||||
$sql.= " ORDER BY $sortfield $sortorder ";
|
||||
$sql.= $db->plimit($conf->liste_limit +1, $offset);
|
||||
$sql = "SELECT distinct(s.nom), s.rowid as socid, s.code_client, f.facnumber, f.total as total_ht,";
|
||||
$sql.= " ".$db->pdate("f.datef")." as date, f.paye, f.fk_statut as statut, f.rowid as facid";
|
||||
if (!$user->rights->societe->client->voir && !$socid) $sql.= ", sc.fk_soc, sc.fk_user ";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s";
|
||||
$sql.= ", ".MAIN_DB_PREFIX."facture as f";
|
||||
$sql.= ", ".MAIN_DB_PREFIX."facturedet as d";
|
||||
if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||
$sql.= " WHERE f.fk_soc = s.rowid";
|
||||
$sql.= " AND s.entity = ".$conf->entity;
|
||||
$sql.= " AND d.fk_facture = f.rowid";
|
||||
$sql.= " AND d.fk_product =".$product->id;
|
||||
if (!$user->rights->societe->client->voir && !$socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
|
||||
if ($socid) $sql.= " AND f.fk_soc = $socid";
|
||||
$sql.= " ORDER BY $sortfield $sortorder ";
|
||||
$sql.= $db->plimit($conf->liste_limit +1, $offset);
|
||||
|
||||
$result = $db->query($sql);
|
||||
if ($result)
|
||||
{
|
||||
$num = $db->num_rows($result);
|
||||
$result = $db->query($sql);
|
||||
if ($result)
|
||||
{
|
||||
$num = $db->num_rows($result);
|
||||
|
||||
print_barre_liste($langs->trans("CustomersInvoices"),$page,$_SERVER["PHP_SELF"],"&id=$product->id",$sortfield,$sortorder,'',$num,0,'');
|
||||
print_barre_liste($langs->trans("CustomersInvoices"),$page,$_SERVER["PHP_SELF"],"&id=$product->id",$sortfield,$sortorder,'',$num,0,'');
|
||||
|
||||
$i = 0;
|
||||
print "<table class=\"noborder\" width=\"100%\">";
|
||||
$i = 0;
|
||||
print "<table class=\"noborder\" width=\"100%\">";
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"s.rowid","","&id=".$_GET["id"],'',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"s.nom","","&id=".$_GET["id"],'',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("CustomerCode"),$_SERVER["PHP_SELF"],"s.code_client","","&id=".$_GET["id"],'',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("DateCreation"),$_SERVER["PHP_SELF"],"f.datef","","&id=".$_GET["id"],'align="center"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("AmountHT"),$_SERVER["PHP_SELF"],"f.total_ht","","&id=".$_GET["id"],'align="right"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"f.paye,f.fk_statut","","&id=".$_GET["id"],'align="right"',$sortfield,$sortorder);
|
||||
print "</tr>\n";
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"s.rowid","","&id=".$_GET["id"],'',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"s.nom","","&id=".$_GET["id"],'',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("CustomerCode"),$_SERVER["PHP_SELF"],"s.code_client","","&id=".$_GET["id"],'',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("DateCreation"),$_SERVER["PHP_SELF"],"f.datef","","&id=".$_GET["id"],'align="center"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("AmountHT"),$_SERVER["PHP_SELF"],"f.total_ht","","&id=".$_GET["id"],'align="right"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"f.paye,f.fk_statut","","&id=".$_GET["id"],'align="right"',$sortfield,$sortorder);
|
||||
print "</tr>\n";
|
||||
|
||||
if ($num > 0)
|
||||
{
|
||||
$var=True;
|
||||
while ($i < $num && $i < $conf->liste_limit)
|
||||
{
|
||||
$objp = $db->fetch_object($result);
|
||||
$var=!$var;
|
||||
if ($num > 0)
|
||||
{
|
||||
$var=True;
|
||||
while ($i < $num && $i < $conf->liste_limit)
|
||||
{
|
||||
$objp = $db->fetch_object($result);
|
||||
$var=!$var;
|
||||
|
||||
print "<tr $bc[$var]>";
|
||||
print '<td>';
|
||||
$invoicestatic->id=$objp->facid;
|
||||
$invoicestatic->ref=$objp->facnumber;
|
||||
print "<tr $bc[$var]>";
|
||||
print '<td>';
|
||||
$invoicestatic->id=$objp->facid;
|
||||
$invoicestatic->ref=$objp->facnumber;
|
||||
print $invoicestatic->getNomUrl(1);
|
||||
print "</td>\n";
|
||||
print '<td><a href="'.DOL_URL_ROOT.'/compta/fiche.php?socid='.$objp->socid.'">'.img_object($langs->trans("ShowCompany"),"company").' '.dol_trunc($objp->nom,44).'</a></td>';
|
||||
print "<td>".$objp->code_client."</td>\n";
|
||||
print "<td align=\"center\">";
|
||||
print dol_print_date($objp->date)."</td>";
|
||||
print "<td align=\"right\">".price($objp->total_ht)."</td>\n";
|
||||
print '<td align="right">'.$invoicestatic->LibStatut($objp->paye,$objp->statut,5).'</td>';
|
||||
print "</tr>\n";
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
dol_print_error($db);
|
||||
}
|
||||
print "</table>";
|
||||
print '<br>';
|
||||
$db->free($result);
|
||||
}
|
||||
print "</td>\n";
|
||||
print '<td><a href="'.DOL_URL_ROOT.'/compta/fiche.php?socid='.$objp->socid.'">'.img_object($langs->trans("ShowCompany"),"company").' '.dol_trunc($objp->nom,44).'</a></td>';
|
||||
print "<td>".$objp->code_client."</td>\n";
|
||||
print "<td align=\"center\">";
|
||||
print dol_print_date($objp->date)."</td>";
|
||||
print "<td align=\"right\">".price($objp->total_ht)."</td>\n";
|
||||
print '<td align="right">'.$invoicestatic->LibStatut($objp->paye,$objp->statut,5).'</td>';
|
||||
print "</tr>\n";
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
dol_print_error($db);
|
||||
}
|
||||
print "</table>";
|
||||
print '<br>';
|
||||
$db->free($result);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
dol_print_error();
|
||||
dol_print_error();
|
||||
}
|
||||
|
||||
$db->close();
|
||||
|
||||
@ -85,7 +85,8 @@ if ($_GET["id"] || $_GET["ref"])
|
||||
*/
|
||||
$head=product_prepare_head($product, $user);
|
||||
$titre=$langs->trans("CardProduct".$product->type);
|
||||
dol_fiche_head($head, 'referers', $titre);
|
||||
$picto=($product->type==1?'service':'product');
|
||||
dol_fiche_head($head, 'referers', $titre, 0, $picto);
|
||||
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
@ -67,7 +67,8 @@ if ($_GET["id"] || $_GET["ref"])
|
||||
{
|
||||
$head=product_prepare_head($product, $user);
|
||||
$titre=$langs->trans("CardProduct".$product->type);
|
||||
dol_fiche_head($head, 'stats', $titre);
|
||||
$picto=($product->type==1?'service':'product');
|
||||
dol_fiche_head($head, 'stats', $titre, 0, $picto);
|
||||
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
@ -81,7 +81,8 @@ if ($_GET["id"] || $_GET["ref"])
|
||||
*/
|
||||
$head=product_prepare_head($product, $user);
|
||||
$titre=$langs->trans("CardProduct".$product->type);
|
||||
dol_fiche_head($head, 'referers', $titre);
|
||||
$picto=($product->type==1?'service':'product');
|
||||
dol_fiche_head($head, 'referers', $titre,0,$picto);
|
||||
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
@ -125,7 +125,8 @@ if ($_GET["id"] || $_GET["ref"])
|
||||
{
|
||||
$head=product_prepare_head($product, $user);
|
||||
$titre=$langs->trans("CardProduct".$product->type);
|
||||
dol_fiche_head($head, 'stock', $titre);
|
||||
$picto=($product->type==1?'service':'product');
|
||||
dol_fiche_head($head, 'stock', $titre, 0, $picto);
|
||||
|
||||
$html = new Form($db);
|
||||
|
||||
|
||||
@ -22,10 +22,10 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
\file htdocs/product/traduction.php
|
||||
\ingroup product
|
||||
\brief Page de traduction des produits
|
||||
\version $Revision$
|
||||
* \file htdocs/product/traduction.php
|
||||
* \ingroup product
|
||||
* \brief Page de traduction des produits
|
||||
* \version $Revision$
|
||||
*/
|
||||
|
||||
require("./pre.inc.php");
|
||||
@ -119,12 +119,11 @@ $_POST["cancel"] != $langs->trans("Cancel") &&
|
||||
if ( $product->setMultiLangs() > 0 )
|
||||
{
|
||||
$_GET["action"] = '';
|
||||
$mesg = 'Fiche mise <20> jour';
|
||||
}
|
||||
else
|
||||
{
|
||||
$_GET["action"] = 'edit';
|
||||
$mesg = 'Fiche non mise <20> jour !' . "<br>" . $product->mesg_error;
|
||||
$mesg = $product->mesg_error;
|
||||
}
|
||||
}
|
||||
|
||||
@ -134,7 +133,7 @@ if ($_GET["id"]) $result = $product->fetch($_GET["id"]);
|
||||
|
||||
|
||||
/*
|
||||
* Affichage
|
||||
* View
|
||||
*/
|
||||
|
||||
llxHeader("","",$langs->trans("Translation"));
|
||||
@ -143,7 +142,8 @@ $html = new Form($db);
|
||||
|
||||
$head=product_prepare_head($product, $user);
|
||||
$titre=$langs->trans("CardProduct".$product->type);
|
||||
dol_fiche_head($head, 'translation', $titre);
|
||||
$picto=($product->type==1?'service':'product');
|
||||
dol_fiche_head($head, 'translation', $titre, 0, $picto);
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
@ -253,6 +253,7 @@ if ($_GET["action"] == 'add' || ($user->rights->produit->creer || $user->rights-
|
||||
$select.= "<option value='$value'>$value</option>";
|
||||
$select.='</select>';
|
||||
|
||||
print '<br>';
|
||||
print '<form action="" method="post">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="action" value="vadd">';
|
||||
@ -264,7 +265,7 @@ if ($_GET["action"] == 'add' || ($user->rights->produit->creer || $user->rights-
|
||||
print '<tr><td valign="top" width="15%">'.$langs->trans('Note').'</td><td><textarea name="note" rows="3" cols="80"></textarea></td></tr>';
|
||||
print '</tr>';
|
||||
print '</table>';
|
||||
print '<br /><table class="noborder" width="100%">';
|
||||
print '<br /><table class="nobordernopadding" width="100%">';
|
||||
print '<tr><td colspan="3" align="center"><input type="submit" class="button" value="'.$langs->trans("Save").'"> ';
|
||||
print '<input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'"></td></tr>';
|
||||
print '</table>';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user