From 5dbf26a344200fc341dda56d5ef57478fa3f5c0e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 14 Jul 2006 13:37:43 +0000 Subject: [PATCH] =?UTF-8?q?Look:=20Modif=20esth=E9tiques=20mineures?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/product/fiche.php | 689 ++++++++++++++++++++------------------- 1 file changed, 351 insertions(+), 338 deletions(-) diff --git a/htdocs/product/fiche.php b/htdocs/product/fiche.php index d6417f6b37b..75000cccb21 100644 --- a/htdocs/product/fiche.php +++ b/htdocs/product/fiche.php @@ -87,7 +87,7 @@ if ($_POST["action"] == 'add' && $user->rights->produit->creer) $product->multiprices["$i"] = ""; } } - + if ( $value != $current_lang ) $e_product = $product; $id = $product->create($user); @@ -106,8 +106,8 @@ if ($_POST["action"] == 'add' && $user->rights->produit->creer) } // Action mise a jour d'un produit ou service -if ($_POST["action"] == 'update' && - $_POST["cancel"] <> $langs->trans("Cancel") && +if ($_POST["action"] == 'update' && + $_POST["cancel"] <> $langs->trans("Cancel") && $user->rights->produit->creer) { $product = new Product($db); @@ -177,7 +177,7 @@ if ($_GET["action"] == 'clone' && $user->rights->produit->creer) else if ($id == -3) { $db->rollback(); - + $_error = 1; $_GET["action"] = ""; dolibarr_print_error($product->db); @@ -185,12 +185,12 @@ if ($_GET["action"] == 'clone' && $user->rights->produit->creer) else { $db->rollback(); - + dolibarr_print_error($product->db); } } } - else + else { $db->rollback(); @@ -206,7 +206,7 @@ if ($_POST["action"] == 'confirm_delete' && $_POST["confirm"] == 'yes' && $user- $product = new Product($db); $product->fetch($_GET["id"]); $result = $product->delete($_GET["id"]); - + if ($result == 0) { llxHeader(); @@ -229,7 +229,7 @@ if ($_POST["action"] == 'addinpropal') { $propal = New Propal($db); $result=$propal->fetch($_POST["propalid"]); - if ($result <= 0) + if ($result <= 0) { dolibarr_print_error($db,$propal->error); exit; @@ -237,15 +237,15 @@ if ($_POST["action"] == 'addinpropal') $soc = new Societe($db); $soc->fetch($propal->socidp,$user); - + $prod = new Product($db, $_GET['id']); $result=$prod->fetch($_GET['id']); - if ($result <= 0) + if ($result <= 0) { dolibarr_print_error($db,$prod->error); exit; } - + // multiprix if ($conf->global->PRODUIT_MULTIPRICES == 1) { @@ -255,7 +255,7 @@ if ($_POST["action"] == 'addinpropal') { $pu=$prod->price; } - + $desc = $prod->description; $tva_tx = get_default_tva($mysoc,$soc,$prod->tva_tx); @@ -271,7 +271,7 @@ if ($_POST["action"] == 'addinpropal') Header("Location: ../comm/propal.php?propalid=".$propal->id); return; } - + $mesg = $langs->trans("ErrorUnknown").": $result"; } @@ -282,13 +282,13 @@ if ($_POST["action"] == 'addincommande') { $product = new Product($db); $result = $product->fetch($_GET["id"]); - + $commande = New Commande($db); $commande->fetch($_POST["commandeid"]); - + $soc = new Societe($db); $soc->fetch($commande->socidp,$user); - + // multiprix if ($conf->global->PRODUIT_MULTIPRICES == 1) { @@ -298,7 +298,7 @@ if ($_POST["action"] == 'addincommande') { $pu=$product->price; } - + $tva_tx = get_default_tva($mysoc,$soc,$product->tva_tx); $result = $commande->addline($commande->id, @@ -307,7 +307,7 @@ if ($_POST["action"] == 'addincommande') $pu, $_POST["qty"], $tva_tx, - $product->id, + $product->id, $_POST["remise_percent"]); Header("Location: ../commande/fiche.php?id=".$commande->id); @@ -321,13 +321,13 @@ if ($_POST["action"] == 'addinfacture' && $user->rights->facture->creer) { $product = new Product($db); $result = $product->fetch($_GET["id"]); - + $facture = New Facture($db); $facture->fetch($_POST["factureid"]); - + $soc = new Societe($db); $soc->fetch($facture->socidp,$user); - + // multiprix if ($conf->global->PRODUIT_MULTIPRICES == 1) { @@ -337,7 +337,7 @@ if ($_POST["action"] == 'addinfacture' && $user->rights->facture->creer) { $pu=$product->price; } - + $tva_tx = get_default_tva($mysoc,$soc,$product->tva_tx); $facture->addline($facture->id, @@ -387,16 +387,16 @@ $html = new Form($db); if ($_GET["action"] == 'create' && $user->rights->produit->creer) { $product = new Product($db); - + if ($mesg) print "$mesg\n"; - + if ($_error == 1) { $product = $e_product; } llxHeader("","",$langs->trans("CardProduct".$product->type)); - + print '
'; print ''; print ''."\n"; @@ -414,7 +414,7 @@ if ($_GET["action"] == 'create' && $user->rights->produit->creer) } print ''; print ''.$langs->trans("Label").''; - + if($conf->global->PRODUIT_MULTIPRICES == 1) { print ''.$langs->trans("SellingPrice").' 1'; @@ -507,7 +507,7 @@ if ($_GET["id"] || $_GET["ref"]) $head[$h][0] = DOL_URL_ROOT."/product/price.php?id=".$product->id; $head[$h][1] = $langs->trans("Price"); $h++; - + //affichage onglet catégorie if ($conf->categorie->enabled) { @@ -542,7 +542,7 @@ if ($_GET["id"] || $_GET["ref"]) $h++; } } - + // Multilangs if($conf->global->MAIN_MULTILANGS) { @@ -569,8 +569,8 @@ if ($_GET["id"] || $_GET["ref"]) $head[$h][1] = $langs->trans('AssociatedProducts'); $h++; } - - + + $head[$h][0] = DOL_URL_ROOT."/product/stats/facture.php?id=".$product->id; $head[$h][1] = $langs->trans('Referers'); $h++; @@ -579,10 +579,10 @@ if ($_GET["id"] || $_GET["ref"]) $head[$h][1] = $langs->trans('Documents'); $h++; - + $titre=$langs->trans("CardProduct".$product->type); dolibarr_fiche_head($head, $hselected, $titre); - + // Confirmation de la suppression de la facture if ($_GET["action"] == 'delete') { @@ -593,7 +593,7 @@ if ($_GET["id"] || $_GET["ref"]) print($mesg); - + print ''; print ""; @@ -611,7 +611,7 @@ if ($_GET["id"] || $_GET["ref"]) print ''.$product->ref.''; if ($previous_ref || $next_ref) print '
'.$previous_ref.''.$next_ref.'
'; print ''; - + if ($product->is_photo_available($conf->produit->dir_output)) { // Photo @@ -619,13 +619,13 @@ if ($_GET["id"] || $_GET["ref"]) $nbphoto=$product->show_photo($conf->produit->dir_output,1); print ''; } - + print ''; // Libelle print ''.$langs->trans("Label").''.$product->libelle.''; print ''; - + // MultiPrix if($conf->global->PRODUIT_MULTIPRICES == 1) { @@ -643,12 +643,12 @@ if ($_GET["id"] || $_GET["ref"]) print ''.$langs->trans("SellingPrice").''.price($product->price).''; print ''; } - + // Statut print ''.$langs->trans("Status").''; print $product->getLibStatut(2); print ''; - + // TVA $langs->load("bills"); print ''.$langs->trans("VATRate").''.$product->tva_tx.'%'; @@ -750,7 +750,7 @@ if ($_GET["id"] || $_GET["ref"]) { print ''; } - + // Description print ''.$langs->trans("Description").''; print '