diff --git a/htdocs/product/categorie.php b/htdocs/product/categorie.php index f949c8d28c3..1e351dd8828 100644 --- a/htdocs/product/categorie.php +++ b/htdocs/product/categorie.php @@ -2,7 +2,7 @@ /* Copyright (C) 2001-2007 Rodolphe Quiedeville * Copyright (C) 2005 Brice Davoleau * Copyright (C) 2005-2006 Regis Houssin - * Copyright (C) 2006 Laurent Destailleur + * Copyright (C) 2006-2007 Laurent Destailleur * Copyright (C) 2007 Patrick Raguin * * This program is free software; you can redistribute it and/or modify @@ -109,12 +109,7 @@ if ($_GET["id"] || $_GET["ref"]) print ""; // Reference print ''.$langs->trans("Ref").''; - $product->load_previous_next_ref(); - $previous_ref = $product->ref_previous?''.img_previous().'':''; - $next_ref = $product->ref_next?''.img_next().'':''; - if ($previous_ref || $next_ref) print '
'; - print ''.$product->ref.''; - if ($previous_ref || $next_ref) print ''.$previous_ref.''.$next_ref.'
'; + print $html->showrefnav($product,'ref'); print ''; print ''; @@ -123,7 +118,16 @@ if ($_GET["id"] || $_GET["ref"]) print ''; // Prix - print ''.$langs->trans("SellingPrice").''.price($product->price).''; + print ''.$langs->trans("SellingPrice").''; + if ($product->price_base_type == 'TTC') + { + print price($product->price_ttc).' '.$langs->trans($product->price_base_type); + } + else + { + print price($product->price).' '.$langs->trans($product->price_base_type); + } + print ''; // Statut print ''.$langs->trans("Status").''; diff --git a/htdocs/product/document.php b/htdocs/product/document.php index 3e20aa41434..c090de00a5c 100755 --- a/htdocs/product/document.php +++ b/htdocs/product/document.php @@ -82,6 +82,11 @@ if ($_POST["sendit"] && $conf->upload) } +/* + * + */ + +$html = new Form($db); llxHeader("","",$langs->trans("CardProduct".$product->type)); @@ -138,12 +143,7 @@ if ($product->id) // Reference print ''; print ''.$langs->trans("Ref").''; - $product->load_previous_next_ref(); - $previous_ref = $product->ref_previous?''.img_previous().'':''; - $next_ref = $product->ref_next?''.img_next().'':''; - if ($previous_ref || $next_ref) print '
'; - print ''.$product->ref.''; - if ($previous_ref || $next_ref) print ''.$previous_ref.''.$next_ref.'
'; + print $html->showrefnav($product,'ref'); print ''; print ''; @@ -151,7 +151,16 @@ if ($product->id) print ''.$langs->trans("Label").''.$product->libelle.''; // Prix - print ''.$langs->trans("SellingPrice").''.price($product->price).''; + print ''.$langs->trans("SellingPrice").''; + if ($product->price_base_type == 'TTC') + { + print price($product->price_ttc).' '.$langs->trans($product->price_base_type); + } + else + { + print price($product->price).' '.$langs->trans($product->price_base_type); + } + print ''; // Statut print ''.$langs->trans("Status").''; diff --git a/htdocs/product/fiche.php b/htdocs/product/fiche.php index b2957a5a33e..00773bc95be 100644 --- a/htdocs/product/fiche.php +++ b/htdocs/product/fiche.php @@ -719,12 +719,13 @@ if ($_GET["id"] || $_GET["ref"]) print ''.$langs->trans("SellingPrice").''; if ($product->price_base_type == 'TTC') { - print price($product->price_ttc).' '.$langs->trans($product->price_base_type).''; + print price($product->price_ttc).' '.$langs->trans($product->price_base_type); } else { - print price($product->price).' '.$langs->trans($product->price_base_type).''; + print price($product->price).' '.$langs->trans($product->price_base_type); } + print ''; } // Statut print ''.$langs->trans("Status").''; diff --git a/htdocs/product/fournisseurs.php b/htdocs/product/fournisseurs.php index 5a2721a4769..9bc32d376bc 100644 --- a/htdocs/product/fournisseurs.php +++ b/htdocs/product/fournisseurs.php @@ -159,6 +159,7 @@ if ($_POST["cancel"] == $langs->trans("Cancel")) /* * Affichage fiche */ +$html = new Form($db); if ($_GET["id"] || $_GET["ref"]) { @@ -190,12 +191,7 @@ if ($_GET["id"] || $_GET["ref"]) // Reference print ''; print ''.$langs->trans("Ref").''; - $product->load_previous_next_ref(); - $previous_ref = $product->ref_previous?''.img_previous().'':''; - $next_ref = $product->ref_next?''.img_next().'':''; - if ($previous_ref || $next_ref) print '
'; - print ''.$product->ref.''; - if ($previous_ref || $next_ref) print ''.$previous_ref.''.$next_ref.'
'; + print $html->showrefnav($product,'ref'); print ''; print ''; @@ -203,7 +199,16 @@ if ($_GET["id"] || $_GET["ref"]) print ''.$langs->trans("Label").''.$product->libelle.''; // Prix - print ''.$langs->trans("SellingPrice").''.price($product->price).''; + print ''.$langs->trans("SellingPrice").''; + if ($product->price_base_type == 'TTC') + { + print price($product->price_ttc).' '.$langs->trans($product->price_base_type); + } + else + { + print price($product->price).' '.$langs->trans($product->price_base_type); + } + print ''; // Statut print ''.$langs->trans("Status").''; diff --git a/htdocs/product/photos.php b/htdocs/product/photos.php index a80ea3b091c..9e5be3a85a2 100644 --- a/htdocs/product/photos.php +++ b/htdocs/product/photos.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2006 Laurent Destailleur + * Copyright (C) 2004-2007 Laurent Destailleur * Copyright (C) 2005 Eric Seigne * Copyright (C) 2005-2007 Regis Houssin * @@ -81,6 +81,7 @@ if ($_GET["action"] == 'addthumb' && $_GET["file"]) * */ +$html = new Form($db); if ($_GET["id"] || $_GET["ref"]) { @@ -108,12 +109,7 @@ if ($_GET["id"] || $_GET["ref"]) // Reference print ''; print ''.$langs->trans("Ref").''; - $product->load_previous_next_ref(); - $previous_ref = $product->ref_previous?''.img_previous().'':''; - $next_ref = $product->ref_next?''.img_next().'':''; - if ($previous_ref || $next_ref) print '
'; - print ''.$product->ref.''; - if ($previous_ref || $next_ref) print ''.$previous_ref.''.$next_ref.'
'; + print $html->showrefnav($product,'ref'); print ''; print ''; @@ -122,7 +118,16 @@ if ($_GET["id"] || $_GET["ref"]) print ''; // Prix - print ''.$langs->trans("SellingPrice").''.price($product->price).''; + print ''.$langs->trans("SellingPrice").''; + if ($product->price_base_type == 'TTC') + { + print price($product->price_ttc).' '.$langs->trans($product->price_base_type); + } + else + { + print price($product->price).' '.$langs->trans($product->price_base_type); + } + print ''; // Statut print ''.$langs->trans("Status").''; diff --git a/htdocs/product/price.php b/htdocs/product/price.php index 57a7ee5fcaf..87c3c48c1bf 100644 --- a/htdocs/product/price.php +++ b/htdocs/product/price.php @@ -138,12 +138,7 @@ print ''; // Reference print ''; print ''; print ''; diff --git a/htdocs/product/stats/commande.php b/htdocs/product/stats/commande.php index 0162b0ac360..67992ce1859 100644 --- a/htdocs/product/stats/commande.php +++ b/htdocs/product/stats/commande.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2006 Laurent Destailleur + * Copyright (C) 2004-2007 Laurent Destailleur * Copyright (C) 2005 Regis Houssin * * This program is free software; you can redistribute it and/or modify @@ -68,6 +68,7 @@ else * Affiche fiche * */ +$html = new Form($db); if ($_GET["id"] || $_GET["ref"]) @@ -93,12 +94,7 @@ if ($_GET["id"] || $_GET["ref"]) // Reference print ''; print ''; print ''; @@ -107,7 +103,16 @@ if ($_GET["id"] || $_GET["ref"]) print ''; // Prix - print ''; + print ''; // Statut print ''; print ''; // Libelle print ''; // Prix - print ''; + print ''; // Statut print ''; print ''; print ''; @@ -104,7 +99,16 @@ if ($_GET["id"] || $_GET["ref"]) print ''; // Prix - print ''; + print ''; // Statut print ''; print ''; print ''; @@ -101,7 +97,16 @@ if ($_GET["id"] || $_GET["ref"]) print ''; // Prix - print ''; + print ''; // Statut print ''; print ''; print ''; @@ -102,7 +97,16 @@ if ($_GET["id"] || $_GET["ref"]) print ''; // Prix - print ''; + print ''; // Statut print ''; print ''; print ''; // Libelle print ''; - print ''; + print ''; // Statut print ''; print ''; print ''; @@ -105,7 +100,16 @@ if ($_GET["id"] || $_GET["ref"]) print ''; // Prix - print ''; + print ''; // Statut print '
'.$langs->trans("Ref").''; -$product->load_previous_next_ref(); -$previous_ref = $product->ref_previous?''.img_previous().'':''; -$next_ref = $product->ref_next?''.img_next().'':''; -if ($previous_ref || $next_ref) print '
'; -print ''.$product->ref.''; -if ($previous_ref || $next_ref) print ''.$previous_ref.''.$next_ref.'
'; +print $html->showrefnav($product,'ref'); print '
'.$langs->trans("Ref").''; - $product->load_previous_next_ref(); - $previous_ref = $product->ref_previous?''.img_previous().'':''; - $next_ref = $product->ref_next?''.img_next().'':''; - if ($previous_ref || $next_ref) print '
'; - print ''.$product->ref.''; - if ($previous_ref || $next_ref) print ''.$previous_ref.''.$next_ref.'
'; + print $html->showrefnav($product,'ref'); print '
'.$langs->trans("SellingPrice").''.price($product->price).'
'.$langs->trans("SellingPrice").''; + if ($product->price_base_type == 'TTC') + { + print price($product->price_ttc).' '.$langs->trans($product->price_base_type); + } + else + { + print price($product->price).' '.$langs->trans($product->price_base_type); + } + print '
'.$langs->trans("Status").''; diff --git a/htdocs/product/stats/commande_fournisseur.php b/htdocs/product/stats/commande_fournisseur.php index 5ceefe64b5a..f5b026bb64f 100644 --- a/htdocs/product/stats/commande_fournisseur.php +++ b/htdocs/product/stats/commande_fournisseur.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2006 Laurent Destailleur + * Copyright (C) 2004-2007 Laurent Destailleur * Copyright (C) 2005 Regis Houssin * * This program is free software; you can redistribute it and/or modify @@ -67,6 +67,7 @@ else * Affiche fiche * */ +$html = new Form($db); if ($_GET["id"] || $_GET["ref"]) { @@ -90,19 +91,23 @@ if ($_GET["id"] || $_GET["ref"]) // Reference print '
'.$langs->trans("Ref").''; - $product->load_previous_next_ref(); - $previous_ref = $product->ref_previous?''.img_previous().'':''; - $next_ref = $product->ref_next?''.img_next().'':''; - if ($previous_ref || $next_ref) print '
'; - print ''.$product->ref.''; - if ($previous_ref || $next_ref) print ''.$previous_ref.''.$next_ref.'
'; + print $html->showrefnav($product,'ref'); print '
'.$langs->trans("Label").''.$product->libelle.'
'.$langs->trans("SellingPrice").''.price($product->price).'
'.$langs->trans("SellingPrice").''; + if ($product->price_base_type == 'TTC') + { + print price($product->price_ttc).' '.$langs->trans($product->price_base_type); + } + else + { + print price($product->price).' '.$langs->trans($product->price_base_type); + } + print '
'.$langs->trans("Status").''; diff --git a/htdocs/product/stats/contrat.php b/htdocs/product/stats/contrat.php index 8cf3276811c..76e81ec5c74 100644 --- a/htdocs/product/stats/contrat.php +++ b/htdocs/product/stats/contrat.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2006 Laurent Destailleur + * Copyright (C) 2004-2007 Laurent Destailleur * Copyright (C) 2005 Regis Houssin * * This program is free software; you can redistribute it and/or modify @@ -66,7 +66,7 @@ else * Affiche fiche * */ - +$html = new Form($db); if ($_GET["id"] || $_GET["ref"]) { @@ -90,12 +90,7 @@ if ($_GET["id"] || $_GET["ref"]) // Reference print '
'.$langs->trans("Ref").''; - $product->load_previous_next_ref(); - $previous_ref = $product->ref_previous?''.img_previous().'':''; - $next_ref = $product->ref_next?''.img_next().'':''; - if ($previous_ref || $next_ref) print '
'; - print ''.$product->ref.''; - if ($previous_ref || $next_ref) print ''.$previous_ref.''.$next_ref.'
'; + print $html->showrefnav($product,'ref'); print '
'.$langs->trans("SellingPrice").''.price($product->price).'
'.$langs->trans("SellingPrice").''; + if ($product->price_base_type == 'TTC') + { + print price($product->price_ttc).' '.$langs->trans($product->price_base_type); + } + else + { + print price($product->price).' '.$langs->trans($product->price_base_type); + } + print '
'.$langs->trans("Status").''; diff --git a/htdocs/product/stats/facture.php b/htdocs/product/stats/facture.php index 70ecc07d11b..449d46ad36f 100644 --- a/htdocs/product/stats/facture.php +++ b/htdocs/product/stats/facture.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2006 Laurent Destailleur + * Copyright (C) 2004-2007 Laurent Destailleur * Copyright (C) 2005-2006 Regis Houssin * * This program is free software; you can redistribute it and/or modify @@ -62,6 +62,7 @@ if ($user->societe_id > 0) * Affiche fiche * */ +$html = new Form($db); if ($_GET["id"] || $_GET["ref"]) @@ -87,12 +88,7 @@ if ($_GET["id"] || $_GET["ref"]) // Reference print '
'.$langs->trans("Ref").''; - $product->load_previous_next_ref(); - $previous_ref = $product->ref_previous?''.img_previous().'':''; - $next_ref = $product->ref_next?''.img_next().'':''; - if ($previous_ref || $next_ref) print '
'; - print ''.$product->ref.''; - if ($previous_ref || $next_ref) print ''.$previous_ref.''.$next_ref.'
'; + print $html->showrefnav($product,'ref'); print '
'.$langs->trans("SellingPrice").''.price($product->price).'
'.$langs->trans("SellingPrice").''; + if ($product->price_base_type == 'TTC') + { + print price($product->price_ttc).' '.$langs->trans($product->price_base_type); + } + else + { + print price($product->price).' '.$langs->trans($product->price_base_type); + } + print '
'.$langs->trans("Status").''; diff --git a/htdocs/product/stats/facture_fournisseur.php b/htdocs/product/stats/facture_fournisseur.php index dd186934b90..ff0a8cdab2e 100644 --- a/htdocs/product/stats/facture_fournisseur.php +++ b/htdocs/product/stats/facture_fournisseur.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2006 Laurent Destailleur + * Copyright (C) 2004-2007 Laurent Destailleur * Copyright (C) 2005-2006 Regis Houssin * * This program is free software; you can redistribute it and/or modify @@ -63,7 +63,7 @@ if ($user->societe_id > 0) * Affiche fiche * */ - +$html = new Form($db); if ($_GET["id"] || $_GET["ref"]) { @@ -88,12 +88,7 @@ if ($_GET["id"] || $_GET["ref"]) // Reference print '
'.$langs->trans("Ref").''; - $product->load_previous_next_ref(); - $previous_ref = $product->ref_previous?''.img_previous().'':''; - $next_ref = $product->ref_next?''.img_next().'':''; - if ($previous_ref || $next_ref) print '
'; - print ''.$product->ref.''; - if ($previous_ref || $next_ref) print ''.$previous_ref.''.$next_ref.'
'; + print $html->showrefnav($product,'ref'); print '
'.$langs->trans("SellingPrice").''.price($product->price).'
'.$langs->trans("SellingPrice").''; + if ($product->price_base_type == 'TTC') + { + print price($product->price_ttc).' '.$langs->trans($product->price_base_type); + } + else + { + print price($product->price).' '.$langs->trans($product->price_base_type); + } + print '
'.$langs->trans("Status").''; diff --git a/htdocs/product/stats/fiche.php b/htdocs/product/stats/fiche.php index 68503a40d3d..c0835008f88 100644 --- a/htdocs/product/stats/fiche.php +++ b/htdocs/product/stats/fiche.php @@ -1,6 +1,6 @@ - * Copyright (c) 2004-2006 Laurent Destailleur + * Copyright (c) 2004-2007 Laurent Destailleur * Copyright (C) 2005 Regis Houssin * Copyright (C) 2005 Eric Seigne * @@ -56,6 +56,8 @@ $mesg = ''; /* * */ +$html = new Form($db); + if ($_GET["id"] || $_GET["ref"]) { $product = new Product($db); @@ -81,19 +83,23 @@ if ($_GET["id"] || $_GET["ref"]) // Reference print '
'.$langs->trans("Ref").''; - $product->load_previous_next_ref(); - $previous_ref = $product->ref_previous?''.img_previous().'':''; - $next_ref = $product->ref_next?''.img_next().'':''; - if ($previous_ref || $next_ref) print '
'; - print ''.$product->ref.''; - if ($previous_ref || $next_ref) print ''.$previous_ref.''.$next_ref.'
'; + print $html->showrefnav($product,'ref'); print '
'.$langs->trans("Label").''.$product->libelle.'
'.$langs->trans("SellingPrice").''.price($product->price).'
'.$langs->trans("SellingPrice").''; + if ($product->price_base_type == 'TTC') + { + print price($product->price_ttc).' '.$langs->trans($product->price_base_type); + } + else + { + print price($product->price).' '.$langs->trans($product->price_base_type); + } + print '
'.$langs->trans("Status").''; diff --git a/htdocs/product/stats/propal.php b/htdocs/product/stats/propal.php index 1a1f7164185..c2c1695b43b 100644 --- a/htdocs/product/stats/propal.php +++ b/htdocs/product/stats/propal.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2006 Laurent Destailleur + * Copyright (C) 2004-2007 Laurent Destailleur * * 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 @@ -66,7 +66,7 @@ else * Affiche fiche * */ - +$html = new Form($db); if ($_GET["id"] || $_GET["ref"]) { @@ -91,12 +91,7 @@ if ($_GET["id"] || $_GET["ref"]) // Reference print '
'.$langs->trans("Ref").''; - $product->load_previous_next_ref(); - $previous_ref = $product->ref_previous?''.img_previous().'':''; - $next_ref = $product->ref_next?''.img_next().'':''; - if ($previous_ref || $next_ref) print '
'; - print ''.$product->ref.''; - if ($previous_ref || $next_ref) print ''.$previous_ref.''.$next_ref.'
'; + print $html->showrefnav($product,'ref'); print '
'.$langs->trans("SellingPrice").''.price($product->price).'
'.$langs->trans("SellingPrice").''; + if ($product->price_base_type == 'TTC') + { + print price($product->price_ttc).' '.$langs->trans($product->price_base_type); + } + else + { + print price($product->price).' '.$langs->trans($product->price_base_type); + } + print '
'.$langs->trans("Status").'';