From 8761c985b7330ddde84f382151acc32879d1197e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 6 Aug 2009 13:21:23 +0000 Subject: [PATCH] New: Add picto on tab titles --- htdocs/categories/categorie.php | 3 +- htdocs/product/document.php | 3 +- htdocs/product/fiche.php | 3 +- htdocs/product/fournisseurs.php | 65 +++--- htdocs/product/photos.php | 13 +- htdocs/product/price.php | 3 +- htdocs/product/sousproduits/fiche.php | 3 +- htdocs/product/stats/commande.php | 3 +- htdocs/product/stats/commande_fournisseur.php | 201 +++++++++--------- htdocs/product/stats/contrat.php | 3 +- htdocs/product/stats/facture.php | 193 ++++++++--------- htdocs/product/stats/facture_fournisseur.php | 3 +- htdocs/product/stats/fiche.php | 3 +- htdocs/product/stats/propal.php | 3 +- htdocs/product/stock/product.php | 3 +- htdocs/product/traduction.php | 19 +- 16 files changed, 270 insertions(+), 254 deletions(-) diff --git a/htdocs/categories/categorie.php b/htdocs/categories/categorie.php index f273e637bc1..a0b0c3c3327 100644 --- a/htdocs/categories/categorie.php +++ b/htdocs/categories/categorie.php @@ -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 ''; diff --git a/htdocs/product/document.php b/htdocs/product/document.php index 22a00e95b13..9f8939b3c0a 100755 --- a/htdocs/product/document.php +++ b/htdocs/product/document.php @@ -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 diff --git a/htdocs/product/fiche.php b/htdocs/product/fiche.php index 2d59529d174..bfa9bf2042d 100644 --- a/htdocs/product/fiche.php +++ b/htdocs/product/fiche.php @@ -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\n"; // Confirmation de la suppression de la facture if ($_GET["action"] == 'delete') diff --git a/htdocs/product/fournisseurs.php b/htdocs/product/fournisseurs.php index 12f32e1f047..426f2c5bce4 100644 --- a/htdocs/product/fournisseurs.php +++ b/htdocs/product/fournisseurs.php @@ -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 = '
'.$langs->trans("PriceRemoved").'.
'; + $_GET["action"] = ''; + $mesg = '
'.$langs->trans("PriceRemoved").'.
'; } - else - { - // Deprecated. Should not occurs - if ($product->remove_fournisseur($_GET["socid"]) > 0) - { - $_GET["action"] = ''; - $mesg = '
'.$langs->trans("SupplierRemoved").'.
'; - } - else - { - $_GET["action"] = ''; - } - } - } + else + { + // Deprecated. Should not occurs + if ($product->remove_fournisseur($_GET["socid"]) > 0) + { + $_GET["action"] = ''; + $mesg = '
'.$langs->trans("SupplierRemoved").'.
'; + } + 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 '
'; diff --git a/htdocs/product/photos.php b/htdocs/product/photos.php index 13c06ef5709..f187b75e801 100644 --- a/htdocs/product/photos.php +++ b/htdocs/product/photos.php @@ -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 diff --git a/htdocs/product/price.php b/htdocs/product/price.php index f53cf804218..28493b81ef5 100644 --- a/htdocs/product/price.php +++ b/htdocs/product/price.php @@ -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 '
'; diff --git a/htdocs/product/sousproduits/fiche.php b/htdocs/product/sousproduits/fiche.php index 25bf3f3d8e5..dfce8c21627 100644 --- a/htdocs/product/sousproduits/fiche.php +++ b/htdocs/product/sousproduits/fiche.php @@ -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 diff --git a/htdocs/product/stats/commande.php b/htdocs/product/stats/commande.php index c3c89b5f7c6..95fa54dd0a6 100644 --- a/htdocs/product/stats/commande.php +++ b/htdocs/product/stats/commande.php @@ -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 '
'; diff --git a/htdocs/product/stats/commande_fournisseur.php b/htdocs/product/stats/commande_fournisseur.php index ba5f775d7f6..65f4d0dc3f9 100644 --- a/htdocs/product/stats/commande_fournisseur.php +++ b/htdocs/product/stats/commande_fournisseur.php @@ -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 '
'; + print '
'; - // Reference - print ''; - print ''; + // Reference + print ''; + print ''; - // Libelle - print ''; + // Libelle + print ''; - // Prix - print ''; - // Statut - print ''; + // Statut + print ''; - show_stats_for_company($product,$socid); + show_stats_for_company($product,$socid); - print "
'.$langs->trans("Ref").''; - print $html->showrefnav($product,'ref','',1,'ref'); - print '
'.$langs->trans("Ref").''; + print $html->showrefnav($product,'ref','',1,'ref'); + print '
'.$langs->trans("Label").''.$product->libelle.'
'.$langs->trans("Label").''.$product->libelle.'
'.$langs->trans("SellingPrice").''; + // Prix + print '
'.$langs->trans("SellingPrice").''; 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 '
'.$langs->trans("Status").''; - print $product->getLibStatut(2); - print '
'.$langs->trans("Status").''; + print $product->getLibStatut(2); + print '
"; - print ''; + print ""; + print ''; - $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 ""; + $i = 0; + print "
"; - print ''; - 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 "\n"; + print ''; + 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 "\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 ""; - print '\n"; - print ''; - print "\n"; - print ""; - print "\n"; - print ''; - print "\n"; - $i++; - } - } - } - else - { - dol_print_error($db); - } - print "
'.img_object($langs->trans("ShowOrder"),"order").' '; - print $objp->ref; - print "'.img_object($langs->trans("ShowCompany"),"company").' '.dol_trunc($objp->nom,44).'".$objp->code_client.""; - print dol_print_date($objp->date)."".price($objp->total_ht)."'.$commandestatic->LibStatut($objp->statut,$objp->facture,5).'
"; - print '
'; - $db->free($result); - } + print ""; + print ''.img_object($langs->trans("ShowOrder"),"order").' '; + print $objp->ref; + print "\n"; + print ''.img_object($langs->trans("ShowCompany"),"company").' '.dol_trunc($objp->nom,44).''; + print "".$objp->code_client."\n"; + print ""; + print dol_print_date($objp->date).""; + print "".price($objp->total_ht)."\n"; + print ''.$commandestatic->LibStatut($objp->statut,$objp->facture,5).''; + print "\n"; + $i++; + } + } + } + else + { + dol_print_error($db); + } + print ""; + print '
'; + $db->free($result); + } } else { - dol_print_error(); + dol_print_error(); } $db->close(); diff --git a/htdocs/product/stats/contrat.php b/htdocs/product/stats/contrat.php index 6ef5a87632f..b4261e0b19e 100644 --- a/htdocs/product/stats/contrat.php +++ b/htdocs/product/stats/contrat.php @@ -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 ''; diff --git a/htdocs/product/stats/facture.php b/htdocs/product/stats/facture.php index 682d3471400..b9e360318a5 100644 --- a/htdocs/product/stats/facture.php +++ b/htdocs/product/stats/facture.php @@ -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 '
'; - // Reference - print ''; - print ''; + print ''; - print ''; + print ''; + print ''; - // Libelle - print ''; - print ''; + // Libelle + print ''; + print ''; - // Price - print ''; - // Statut - print ''; + print ''; show_stats_for_company($product,$socid); - print "
'.$langs->trans("Ref").''; + // Reference + print '
'.$langs->trans("Ref").''; print $html->showrefnav($product,'ref','',1,'ref'); - print '
'.$langs->trans("Label").''.$product->libelle.'
'.$langs->trans("Label").''.$product->libelle.'
'.$langs->trans("SellingPrice").''; + // Price + print '
'.$langs->trans("SellingPrice").''; 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 '
'.$langs->trans("Status").''; + // Statut + print '
'.$langs->trans("Status").''; print $product->getLibStatut(2); - print '
"; + print ""; - print ''; + print ''; - $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 ""; + $i = 0; + print "
"; - print ''; - 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 "\n"; + print ''; + 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 "\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 ""; - print '"; + print '\n"; - print ''; - print "\n"; - print ""; - print "\n"; - print ''; - print "\n"; - $i++; - } - } - } - else - { - dol_print_error($db); - } - print "
'; - $invoicestatic->id=$objp->facid; - $invoicestatic->ref=$objp->facnumber; + print "
'; + $invoicestatic->id=$objp->facid; + $invoicestatic->ref=$objp->facnumber; print $invoicestatic->getNomUrl(1); - print "'.img_object($langs->trans("ShowCompany"),"company").' '.dol_trunc($objp->nom,44).'".$objp->code_client.""; - print dol_print_date($objp->date)."".price($objp->total_ht)."'.$invoicestatic->LibStatut($objp->paye,$objp->statut,5).'
"; - print '
'; - $db->free($result); - } + print "\n"; + print ''.img_object($langs->trans("ShowCompany"),"company").' '.dol_trunc($objp->nom,44).''; + print "".$objp->code_client."\n"; + print ""; + print dol_print_date($objp->date).""; + print "".price($objp->total_ht)."\n"; + print ''.$invoicestatic->LibStatut($objp->paye,$objp->statut,5).''; + print "\n"; + $i++; + } + } + } + else + { + dol_print_error($db); + } + print ""; + print '
'; + $db->free($result); + } } else { - dol_print_error(); + dol_print_error(); } $db->close(); diff --git a/htdocs/product/stats/facture_fournisseur.php b/htdocs/product/stats/facture_fournisseur.php index 641c3ce735b..3d813060a21 100644 --- a/htdocs/product/stats/facture_fournisseur.php +++ b/htdocs/product/stats/facture_fournisseur.php @@ -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 ''; diff --git a/htdocs/product/stats/fiche.php b/htdocs/product/stats/fiche.php index c2e24136e3a..9c45e28cb0c 100644 --- a/htdocs/product/stats/fiche.php +++ b/htdocs/product/stats/fiche.php @@ -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 '
'; diff --git a/htdocs/product/stats/propal.php b/htdocs/product/stats/propal.php index c2096a61d08..214d265d9d9 100644 --- a/htdocs/product/stats/propal.php +++ b/htdocs/product/stats/propal.php @@ -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 '
'; diff --git a/htdocs/product/stock/product.php b/htdocs/product/stock/product.php index 243397841c1..69605c6fa37 100644 --- a/htdocs/product/stock/product.php +++ b/htdocs/product/stock/product.php @@ -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); diff --git a/htdocs/product/traduction.php b/htdocs/product/traduction.php index 2d03ec30bea..0638fe6e4ed 100644 --- a/htdocs/product/traduction.php +++ b/htdocs/product/traduction.php @@ -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 � jour'; } else { $_GET["action"] = 'edit'; - $mesg = 'Fiche non mise � jour !' . "
" . $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 '
'; @@ -253,6 +253,7 @@ if ($_GET["action"] == 'add' || ($user->rights->produit->creer || $user->rights- $select.= ""; $select.=''; + print '
'; print ''; print ''; print ''; @@ -264,7 +265,7 @@ if ($_GET["action"] == 'add' || ($user->rights->produit->creer || $user->rights- print ''; print ''; print '
'.$langs->trans('Note').'
'; - print '
'; + print '
'; print ''; print '
 '; print '
';