diff --git a/htdocs/product/fiche.php b/htdocs/product/fiche.php index 4df16af5fae..df928630cf4 100644 --- a/htdocs/product/fiche.php +++ b/htdocs/product/fiche.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2001-2006 Rodolphe Quiedeville * Copyright (C) 2004-2006 Laurent Destailleur * Copyright (C) 2005 Eric Seigne * Copyright (C) 2005-2006 Régis Houssin @@ -38,6 +38,7 @@ require_once(DOL_DOCUMENT_ROOT."/product.class.php"); require_once(DOL_DOCUMENT_ROOT."/commande/commande.class.php"); $langs->load("bills"); +$langs->load("products"); $mesg = ''; @@ -410,7 +411,7 @@ if ($_GET["action"] == 'create' && $user->rights->produit->creer) { print ''.$langs->trans("SellingPrice").''; } - $langs->load("bills"); + print ''.$langs->trans("VATRate").''; print $html->select_tva("tva_tx",$conf->defaulttx,$mysoc,''); print ''; @@ -486,11 +487,8 @@ if ($_GET["action"] == 'create' && $user->rights->produit->creer) */ if ($_GET["id"] || $_GET["ref"]) { - - llxHeader("","",$langs->trans("CardProduct".$product->type)); - - $product = new Product($db); + if ($_GET["ref"]) { $result = $product->fetch('',$_GET["ref"]); @@ -500,6 +498,9 @@ if ($_GET["id"] || $_GET["ref"]) { $result = $product->fetch($_GET["id"]); } + + llxHeader("","",$langs->trans("CardProduct".$product->type)); + if ( $result ) { @@ -580,7 +581,7 @@ if ($_GET["id"] || $_GET["ref"]) print ''; // TVA - $langs->load("bills"); + print ''.$langs->trans("VATRate").''.$product->tva_tx.'%'; // Stock @@ -653,7 +654,7 @@ if ($_GET["id"] || $_GET["ref"]) print ''.$langs->trans("Ref").''; print ''.$langs->trans("Label").''; - $langs->load("bills"); + print ''.$langs->trans("VATRate").''; print $html->select_tva("tva_tx", $product->tva_tx, $mysoc, '', $product->tva_tx); print ''; @@ -1015,7 +1016,7 @@ if ($_GET["id"] && $_GET["action"] == '' && $product->status) // Factures if($conf->facture->enabled && $user->rights->facture->creer) { - $langs->load("bills"); + print ''; print_titre($langs->trans("AddToMyBills"));