From a299551a3818a61f7fb7e5315b1567b598e02826 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 20 Aug 2005 18:57:13 +0000 Subject: [PATCH] =?UTF-8?q?New:=20Ajout=20d'un=20champ=20note=20sur=20les?= =?UTF-8?q?=20produits=20non=20destin=E9=20=E0=20etre=20visible=20sur=20le?= =?UTF-8?q?s=20factures=20ou=20propales.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/product/fiche.php | 133 ++++++++++++++++++++++----------------- 1 file changed, 77 insertions(+), 56 deletions(-) diff --git a/htdocs/product/fiche.php b/htdocs/product/fiche.php index f14bde9c518..4174e294561 100644 --- a/htdocs/product/fiche.php +++ b/htdocs/product/fiche.php @@ -69,6 +69,7 @@ if ($_POST["action"] == 'add' && $user->rights->produit->creer) $product->type = $_POST["type"]; $product->envente = $_POST["statut"]; $product->description = $_POST["desc"]; + $product->note = $_POST["note"]; $product->duration_value = $_POST["duration_value"]; $product->duration_unit = $_POST["duration_unit"]; $product->seuil_stock_alerte = $_POST["seuil_stock_alerte"]; @@ -105,6 +106,7 @@ if ($_POST["action"] == 'update' && $product->price = $_POST["price"]; $product->tva_tx = $_POST["tva_tx"]; $product->description = $_POST["desc"]; + $product->note = $_POST["note"]; $product->envente = $_POST["statut"]; $product->seuil_stock_alerte = $_POST["seuil_stock_alerte"]; $product->duration_value = $_POST["duration_value"]; @@ -196,9 +198,9 @@ if ($_POST["cancel"] == $langs->trans("Cancel")) Header("Location: fiche.php?id=".$_POST["id"]); } -// Le produit n'est pas encore chargé a ce stade -//llxHeader("","",$langs->trans("CardProduct".$product->type)); -llxHeader("","",$langs->trans("CardProduct0")); + + +llxHeader("","",$langs->trans("CardProductService")); /* @@ -206,69 +208,77 @@ llxHeader("","",$langs->trans("CardProduct0")); */ if ($_GET["action"] == 'create' && $user->rights->produit->creer) { - $html = new Form($db); - $product = new Product($db); - if ($_error == 1) + $html = new Form($db); + $product = new Product($db); + if ($_error == 1) { - $product = $e_product; + $product = $e_product; } - print '
'; - print ''; - print ''."\n"; + print ''; + print ''; + print ''."\n"; - if ($_GET["type"]==0) { $title=$langs->trans("NewProduct"); } - if ($_GET["type"]==1) { $title=$langs->trans("NewService"); } - print_fiche_titre($title); - - print ''; - print ''; - print '"; + + print ''; + print '
'.$langs->trans("Ref").''; - if ($_error == 1) + if ($_GET["type"]==0) { $title=$langs->trans("NewProduct"); } + if ($_GET["type"]==1) { $title=$langs->trans("NewService"); } + print_fiche_titre($title); + + print ''; + print ''; + print ''; - print ''; - print ''; - - $langs->load("bills"); - print ''; - - print ''; - - if ($_GET["type"] == 0 && $conf->stick->enabled) + print ''; + print ''; + print ''; + + $langs->load("bills"); + print ''; + + print ''; + + if ($_GET["type"] == 0 && $conf->stick->enabled) { - print "".''; + print "".''; } - else + else { - print ''; + print ''; } - print '"; - if ($_GET["type"] == 1) + + // Description + print '"; + + if ($_GET["type"] == 1) { - print ''; + print ''; } - - print ''; - print '
'.$langs->trans("Ref").''; + if ($_error == 1) { - print $langs->trans("RefAlreadyExists"); + print $langs->trans("RefAlreadyExists"); } - print '
'.$langs->trans("Label").'
'.$langs->trans("SellingPrice").'
'.$langs->trans("VATRate").''; - print $html->select_tva("tva_tx",$conf->defaulttx); - print '
'.$langs->trans("Status").''; - print '
'.$langs->trans("Label").'
'.$langs->trans("SellingPrice").'
'.$langs->trans("VATRate").''; + print $html->select_tva("tva_tx",$conf->defaulttx); + print '
'.$langs->trans("Status").''; + print '
Seuil stock'; - print ''; - print '
Seuil stock'; + print ''; + print '
'.$langs->trans("Description").''; - print '
'.$langs->trans("Description").''; + print '
'.$langs->trans("Duration").'  '; - print ''.$langs->trans("Day").' '; - print ''.$langs->trans("Week").' '; - print ''.$langs->trans("Month").' '; - print ''.$langs->trans("Year").' '; - print '
'.$langs->trans("Duration").'  '; + print ''.$langs->trans("Day").' '; + print ''.$langs->trans("Week").' '; + print ''.$langs->trans("Month").' '; + print ''.$langs->trans("Year").' '; + print '
 
'; - print ''; + + // Note + print '
'.$langs->trans("Note").''; + print '
 
'; + print ''; } @@ -436,6 +446,9 @@ if ($_GET["id"]) print ''; } + // Note + print ''.$langs->trans("Note").''.nl2br($product->note).''; + print "\n"; print "\n"; @@ -479,7 +492,7 @@ if ($_GET["id"]) print ''; } print ''; - if ($product->type == 0 && defined("MAIN_MODULE_STOCK")) + if ($product->type == 0 && $conf->stock->enabled) { print "".'Seuil stock'; print ''; @@ -489,8 +502,10 @@ if ($_GET["id"]) { print ''; } + + // Description print ''.$langs->trans("Description").''; - print '"; @@ -509,6 +524,12 @@ if ($_GET["id"]) print ''; } + // Note + print ''.$langs->trans("NoteNotVisibleOnBill").''; + print '"; + print ' '; print ''; print '';