diff --git a/htdocs/commande/fiche.php b/htdocs/commande/fiche.php index f435ca75520..91cd840d681 100644 --- a/htdocs/commande/fiche.php +++ b/htdocs/commande/fiche.php @@ -1857,7 +1857,7 @@ else if ($conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_DETAILS) { require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php"); - $doleditor=new DolEditor('eldesc',$objp->description,200,'dolibarr_details'); + $doleditor=new DolEditor('eldesc',$objp->description,140,'dolibarr_details'); $doleditor->Create(); } else diff --git a/htdocs/expedition/fiche.php b/htdocs/expedition/fiche.php index 131d5b84559..892a749b730 100644 --- a/htdocs/expedition/fiche.php +++ b/htdocs/expedition/fiche.php @@ -96,6 +96,7 @@ if ($_POST["action"] == 'add') $expedition->expedition_method_id = $_POST["expedition_method_id"]; $expedition->tracking_number = $_POST["tracking_number"]; + //var_dump($_POST);exit; for ($i = 0 ; $i < sizeof($object->lignes) ; $i++) { $qty = "qtyl".$i; @@ -400,19 +401,10 @@ if ($_GET["action"] == 'create') print ''."\n"; } - // Warehouse (id forced) - if ($conf->stock->enabled && $_GET["entrepot_id"]) - { - print ''.$langs->trans("Warehouse").''; - print ''; - $ents = $entrepot->list_array(); - print ''.img_object($langs->trans("ShowWarehouse"),'stock').' '.$ents[$_GET["entrepot_id"]].''; - print ''; - } - if ($object->note && ! $user->societe_id) { - print ''.$langs->trans("NotePrivate").': '.nl2br($object->note).""; + print ''.$langs->trans("NotePrivate").''; + print ''.nl2br($object->note).""; } print ''; @@ -558,36 +550,46 @@ if ($_GET["action"] == 'create') $stock = $product->stock_entrepot[$_REQUEST["entrepot_id"]]; $stock+=0; // Convertit en numerique $defaultqty=min($quantityToBeDelivered, $stock); - if ($line->product_type == 1 || $defaultqty < 0) $defaultqty=0; + if (($line->product_type == 1 && empty($conf->global->STOCK_SUPPORTS_SERVICES)) || $defaultqty < 0) $defaultqty=0; } - // Quantity + // Quantity to send print ''; - print ''; - print ''; - if ($line->product_type == 1) print ' ('.$langs->trans("Service").')'; + if ($line->product_type == 0 || ! empty($conf->global->STOCK_SUPPORTS_SERVICES)) + { + print ''; + print ''; + } + else print '0'; print ''; // Stock if ($conf->stock->enabled) { - if ($_REQUEST["entrepot_id"]) + print ''; + if ($line->product_type == 0 || ! empty($conf->global->STOCK_SUPPORTS_SERVICES)) { - print ''; - $formproduct->selectWarehouses($_REQUEST["entrepot_id"],'entl'.$indiceAsked,'',1,0,$line->fk_product); - //print $stock; - if ($stock < $quantityToBeDelivered) + // Show warehous + if ($_REQUEST["entrepot_id"]) { - print ' '.img_warning($langs->trans("StockTooLow")); + $formproduct->selectWarehouses($_REQUEST["entrepot_id"],'entl'.$indiceAsked,'',1,0,$line->fk_product); + //print $stock.' '.$quantityToBeDelivered; + //if ($stock >= 0 && $stock < $quantityToBeDelivered) + if ($stock < $quantityToBeDelivered) + { + print ' '.img_warning($langs->trans("StockTooLow")); + } + } + else + { + $formproduct->selectWarehouses('','entl'.$indiceAsked,'',1,0,$line->fk_product); } - print ''; } else { - print ''; - $formproduct->selectWarehouses('','entl'.$indiceAsked,'',1,0,$line->fk_product); - print ''; + print $langs->trans("Service"); } + print ''; } } /*else diff --git a/htdocs/expedition/shipment.php b/htdocs/expedition/shipment.php index 95c2b82b042..c00f49a420c 100644 --- a/htdocs/expedition/shipment.php +++ b/htdocs/expedition/shipment.php @@ -489,9 +489,9 @@ if ($id > 0 || ! empty($ref)) print $quantite_livree; print ''; - // Qty remaind to ship + // Qty remains to ship print ''; - if ($objp->product_type == 0) + if ($type == 0 || ! empty($conf->global->STOCK_SUPPORTS_SERVICES)) { $reste_a_livrer[$objp->fk_product] = $objp->qty - $quantite_livree; $reste_a_livrer_total += $reste_a_livrer[$objp->fk_product]; diff --git a/htdocs/lib/doleditor.class.php b/htdocs/lib/doleditor.class.php index 5babe057756..abe739f2412 100644 --- a/htdocs/lib/doleditor.class.php +++ b/htdocs/lib/doleditor.class.php @@ -19,7 +19,7 @@ /** * \file htdocs/lib/doleditor.class.php - * \brief Classe permettant de g�rer FCKEditor + * \brief Class to manage a WYSIWYG editor * \version $Id$ */ @@ -38,13 +38,13 @@ class DolEditor /** \brief DolEditor \param htmlname Nom formulaire html WYSIWIG - \param content Contenu �dition WYSIWIG - \param height Hauteur en pixel de la zone �dition - \param toolbarname Nom barre de menu �diteur + \param content Contenu edition WYSIWIG + \param height Hauteur en pixel de la zone edition + \param toolbarname Nom barre de menu editeur \param toolbarlocation Emplacement de la barre de menu : - 'In' chaque fen�tre d'�dition a �a propre barre d'outils - 'Out:nom' partage de la barre d'outils o� 'nom' est le nom du DIV qui affiche la barre - \param toolbarstartexpanded visible ou non au d�marrage + 'In' chaque fenetre d'edition a la propre barre d'outils + 'Out:nom' partage de la barre d'outils ou 'nom' est le nom du DIV qui affiche la barre + \param toolbarstartexpanded visible ou non au demarrage \param modulepart modulepart pour protection wrapper download viewimage */ function DolEditor($htmlname,$content,$height=200,$toolbarname='Basic',$toolbarlocation='In',$toolbarstartexpanded=false,$uselocalbrowser=true) diff --git a/htdocs/product/stock/index.php b/htdocs/product/stock/index.php index 2b6a5628aee..d9bef68d9c3 100644 --- a/htdocs/product/stock/index.php +++ b/htdocs/product/stock/index.php @@ -119,6 +119,7 @@ $sql.= " AND m.fk_entrepot = s.rowid"; $sql.= " AND s.entity = ".$conf->entity; if (!$user->rights->produit->hidden) $sql.=' AND (p.hidden=0 OR p.fk_product_type != 0)'; if (!$user->rights->service->hidden) $sql.=' AND (p.hidden=0 OR p.fk_product_type != 1)'; +if (empty($conf->global->STOCK_SUPPORTS_SERVICES)) $sql.= " AND p.fk_product_type = 0"; $sql.= $db->order("datem","DESC"); $sql.= $db->plimit($max,0); diff --git a/htdocs/product/stock/mouvement.php b/htdocs/product/stock/mouvement.php index c56e54cf770..2c52f7b3f2a 100644 --- a/htdocs/product/stock/mouvement.php +++ b/htdocs/product/stock/mouvement.php @@ -87,6 +87,7 @@ $sql.= " AND m.fk_entrepot = s.rowid"; $sql.= " AND s.entity = ".$conf->entity; if (!$user->rights->produit->hidden) $sql.=' AND (p.hidden=0 OR p.fk_product_type != 0)'; if (!$user->rights->service->hidden) $sql.=' AND (p.hidden=0 OR p.fk_product_type != 1)'; +if (empty($conf->global->STOCK_SUPPORTS_SERVICES)) $sql.= " AND p.fk_product_type = 0"; if ($_GET["id"]) { $sql.= " AND s.rowid ='".$_GET["id"]."'";