diff --git a/htdocs/product/fiche.php b/htdocs/product/fiche.php index 1f35eb4a41a..66d075b0b8f 100644 --- a/htdocs/product/fiche.php +++ b/htdocs/product/fiche.php @@ -997,23 +997,6 @@ if ($id || $ref) if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionnarySetup"),1); print ''; - // Hidden - /* - if ((! $product->isservice() && $user->rights->produit->hidden) - || ($product->isservice() && $user->rights->service->hidden)) - { - print ''.$langs->trans("HiddenIntoCombo").''; - print $html->selectyesno('hidden',$product->hidden); - print ''; - } - else - { - print ''.$langs->trans("HiddenIntoCombo").''; - print yn("No"); - print ''; - } - */ - // Note print ''.$langs->trans("NoteNotVisibleOnBill").''; require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php"); @@ -1054,11 +1037,13 @@ if ($id || $ref) if (empty($usecanvas)) { - // En mode visu + $isphoto=$product->is_photo_available($conf->product->dir_output); + + // En mode visu print ''; // Ref - print ''; @@ -1067,8 +1052,12 @@ if ($id || $ref) // Label print ''; - $nblignes=5; - if ($product->is_photo_available($conf->product->dir_output)) + $nblignes=9; + if ($product->type!=1) $nblignes++; + if ($product->isservice()) $nblignes++; + else $nblignes+=4; + + if ($isphoto) { // Photo print ''; + // Origin country code print ''; - // Hidden - /* - if ((! $product->isservice() && $user->rights->produit->hidden) - || ($product->isservice() && $user->rights->service->hidden)) - { - print '\n"; - } - else - { - print ''; - } - */ // Note print ''; diff --git a/htdocs/product/liste.php b/htdocs/product/liste.php index bdad4cf0d05..1605189bb41 100644 --- a/htdocs/product/liste.php +++ b/htdocs/product/liste.php @@ -307,7 +307,7 @@ if ($resql) if ($conf->barcode->enabled) print_liste_field_titre($langs->trans("BarCode"),"liste.php", "p.barcode",$param,"","",$sortfield,$sortorder); print_liste_field_titre($langs->trans("DateModification"),"liste.php", "p.tms",$param,"",'align="center"',$sortfield,$sortorder); if ($conf->service->enabled && $type != 0) print_liste_field_titre($langs->trans("Duration"),"liste.php", "p.duration",$param,"",'align="center"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("SellingPrice"),"liste.php", "p.price",$param,"",'align="right"',$sortfield,$sortorder); + if (empty($conf->global->PRODUIT_MULTIPRICES)) print_liste_field_titre($langs->trans("SellingPrice"),"liste.php", "p.price",$param,"",'align="right"',$sortfield,$sortorder); if ($conf->stock->enabled && $user->rights->stock->lire && $type != 1) print ''; print_liste_field_titre($langs->trans("Sell"),"liste.php", "p.tosell",$param,"",'align="right"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("Buy"),"liste.php", "p.tobuy",$param,"",'align="right"',$sortfield,$sortorder); @@ -330,24 +330,35 @@ if ($resql) print ''; + + // Duration if ($conf->service->enabled && $type != 0) { print ''; } - print ''; + + // Sell price + if (empty($conf->global->PRODUIT_MULTIPRICES)) + { + print ''; + } + + // Stock if ($conf->stock->enabled && $user->rights->stock->lire && $type != 1) { print ''; } - print ''; + print ''; } - // Price - print ''; + // Sell price + if (empty($conf->global->PRODUIT_MULTIPRICES)) + { + print ''; + } // Show stock if ($conf->stock->enabled && $user->rights->stock->lire && $type != 1) diff --git a/htdocs/product/price.php b/htdocs/product/price.php index 59a42787d04..60825f58da1 100644 --- a/htdocs/product/price.php +++ b/htdocs/product/price.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2010 Laurent Destailleur + * Copyright (C) 2004-2011 Laurent Destailleur * Copyright (C) 2005 Eric Seigne * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2006 Andre Cianfarani @@ -114,7 +114,7 @@ $html = new Form($db); $product = new Product($db); if ($_GET["ref"]) $result = $product->fetch('',$_GET["ref"]); -if ($_GET["id"]) $result = $product->fetch($_GET["id"]); +if ($_GET["id"]) $result = $product->fetch($_GET["id"]); llxHeader("","",$langs->trans("CardProduct".$product->type)); @@ -136,8 +136,10 @@ print ''; // Label print ''; -$nblignes=4; -if ($product->is_photo_available($conf->product->dir_output)) +$isphoto=$product->is_photo_available($conf->product->dir_output); + +$nblignes=5; +if ($isphoto) { // Photo print ''; // MultiPrix -if($conf->global->PRODUIT_MULTIPRICES) +if ($conf->global->PRODUIT_MULTIPRICES) { if ($socid) { diff --git a/htdocs/societe/soc.php b/htdocs/societe/soc.php index ad3054e894e..3c4c3cf1524 100644 --- a/htdocs/societe/soc.php +++ b/htdocs/societe/soc.php @@ -1377,8 +1377,8 @@ else // Status print ''; - $activity_status = $soc->status == 1 ? $langs->trans('InActivity') : $langs->trans('ActivityCeased'); // nouvelle entrée statut activité - print ''; // Barcode
'.$langs->trans("Ref").''; + print ''.$langs->trans("Ref").''; print $html->showrefnav($product,'ref','',1,'ref'); print '
'.$langs->trans("Label").''.$product->libelle.''; @@ -1175,25 +1164,10 @@ if ($id || $ref) // Custom code print '
'.$langs->trans("CustomCode").''.$product->customcode.'
'.$langs->trans("CountryOrigin").''.getCountry($product->country_id,0,$db).'
'.$langs->trans("HiddenIntoCombo").''; - print yn($product->hidden); - print "
'.$langs->trans("HiddenIntoCombo").''; - print yn("No"); - print '
'.$langs->trans("Note").''.(dol_textishtml($product->note)?$product->note:dol_nl2br($product->note,1,true)).'
'.$langs->trans("PhysicalStock").''; print ' '; print ''; print ' '; print ''; - print ' '; - print ''; + print ' '; + print ''; print ' '; print ''; + + print ''; print ' '; print ''; print ''; print ''; @@ -414,11 +425,14 @@ if ($resql) print ''; - if ($objp->price_base_type == 'TTC') print price($objp->price_ttc).' '.$langs->trans("TTC"); - else print price($objp->price).' '.$langs->trans("HT"); - print ''; + if ($objp->price_base_type == 'TTC') print price($objp->price_ttc).' '.$langs->trans("TTC"); + else print price($objp->price).' '.$langs->trans("HT"); + print '
'.$langs->trans("Label").''.$product->libelle.''; @@ -148,7 +150,7 @@ if ($product->is_photo_available($conf->product->dir_output)) print '
'.$langs->trans("Status").''.$activity_status; + print ''; + print $soc->getLibStatut(2); print '