diff --git a/htdocs/admin/fckeditor.php b/htdocs/admin/fckeditor.php index 36f6d384c23..5ad6ea5b207 100644 --- a/htdocs/admin/fckeditor.php +++ b/htdocs/admin/fckeditor.php @@ -1,6 +1,6 @@ - * Copyright (C) 2005-2006 Regis Houssin + * Copyright (C) 2005-2007 Regis Houssin * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -40,6 +40,7 @@ $modules = array( 'SOCIETE' => 'FCKeditorForCompany', 'PRODUCTDESC' => 'FCKeditorForProduct', 'DETAILS' => 'FCKeditorForProductDetails', +'DETAILS_PERSO' => 'FCKeditorForProductDetailsPerso', 'MAILING' => 'FCKeditorForMailing', 'MEMBER' => 'FCKeditorForMembers' ); @@ -48,6 +49,7 @@ $conditions = array( 'SOCIETE' => $conf->societe->enabled, 'PRODUCTDESC' => ($conf->produit->enabled||$conf->service->enabled), 'DETAILS' => ($conf->facture->enabled||$conf->propal->enabled||$conf->commande->enabled), +'DETAILS_PERSO' => ($conf->facture->enabled||$conf->propal->enabled||$conf->commande->enabled), 'MAILING' => $conf->mailing->enabled, 'MEMBER' => $conf->adherent->enabled ); @@ -56,6 +58,7 @@ $picto = array( 'SOCIETE' => 'company', 'PRODUCTDESC' => 'product', 'DETAILS' => 'generic', +'DETAILS_PERSO' => 'generic', 'MAILING' => 'email', 'MEMBER' => 'user' ); @@ -66,7 +69,7 @@ foreach($modules as $const => $desc) if ($_GET["action"] == 'activate_'.strtolower($const)) { dolibarr_set_const($db, "FCKEDITOR_ENABLE_".$const, "1"); - //si fckeditor est activé dans la description produit/service, on l'active dans les documents + // Si fckeditor est activé dans la description produit/service, on l'active dans les formulaires if ($const == 'PRODUCTDESC') { dolibarr_set_const($db, "FCKEDITOR_ENABLE_DETAILS", "1"); @@ -77,10 +80,12 @@ foreach($modules as $const => $desc) if ($_GET["action"] == 'disable_'.strtolower($const)) { dolibarr_del_const($db, "FCKEDITOR_ENABLE_".$const); - //si fckeditor est desactivé dans les documents, on le désactive dans la description produit/service + // Si fckeditor est desactivé dans les formulaires, + // on le désactive dans la description produit/service et dans la description personnalisée if ($const == 'DETAILS') { dolibarr_del_const($db, "FCKEDITOR_ENABLE_PRODUCTDESC"); + dolibarr_del_const($db, "FCKEDITOR_ENABLE_DETAILS_PERSO"); } Header("Location: fckeditor.php"); exit; diff --git a/htdocs/admin/produit.php b/htdocs/admin/produit.php index f694141a2f4..4d3072ef021 100644 --- a/htdocs/admin/produit.php +++ b/htdocs/admin/produit.php @@ -113,7 +113,6 @@ else if ($_POST["action"] == 'sousproduits') else if ($_POST["action"] == 'changeproductdesc') { dolibarr_set_const($db, "PRODUIT_CHANGE_PROD_DESC", $_POST["activate_changeproductdesc"]); - dolibarr_set_const($db, "PRODUIT_DESC_IN_FORM", 0); Header("Location: produit.php"); exit; } @@ -264,22 +263,20 @@ print ""; print ''; print ''; -if ($conf->global->PRODUIT_CHANGE_PROD_DESC == 0) -{ - // Visualiser description produit dans les formulaires activation/desactivation - $var=!$var; - print "
"; - print ""; - print ""; - print ''.$langs->trans("ViewProductDescInFormAbility").''; - print ''; - print $html->selectyesno("activate_viewProdDescInForm",$conf->global->PRODUIT_DESC_IN_FORM,1); - print ''; - print ''; - print ""; - print ''; - print '
'; -} +// Visualiser description produit dans les formulaires activation/desactivation +$var=!$var; +print "
"; +print ""; +print ""; +print ''.$langs->trans("ViewProductDescInFormAbility").''; +print ''; +print $html->selectyesno("activate_viewProdDescInForm",$conf->global->PRODUIT_DESC_IN_FORM,1); +print ''; +print ''; +print ""; +print ''; +print '
'; + // Utilisation de l'écotaxe $var=!$var; diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php index cd3b002be54..d5a415de699 100644 --- a/htdocs/comm/propal.php +++ b/htdocs/comm/propal.php @@ -505,13 +505,15 @@ if ($_POST['action'] == "addligne" && $user->rights->propale->creer) } // La description de la ligne est celle saisie ou - // celle du produit si (non saisi + PRODUIT_CHANGE_PROD_DESC défini) - // \todo Ne faut-il pas rendre $conf->global->PRODUIT_CHANGE_PROD_DESC toujours a on - $desc=$_POST['np_desc']; - if (! $desc && $conf->global->PRODUIT_CHANGE_PROD_DESC) + // celle du produit si PRODUIT_CHANGE_PROD_DESC est défini + if ($conf->global->PRODUIT_CHANGE_PROD_DESC) { $desc = $prod->description; } + else + { + $desc = $_POST['np_desc']; + } $tva_tx = get_default_tva($mysoc,$soc,$prod->tva_tx); } @@ -851,7 +853,7 @@ if ($_GET['propalid'] > 0) print ''; - // date de livraison (conditonné sur PROPALE_ADD_SHIPPING_DATE car carac à + // date de livraison (conditionné sur PROPALE_ADD_SHIPPING_DATE car carac à // gérer par les commandes et non les propal if ($conf->expedition->enabled) { @@ -1045,9 +1047,7 @@ if ($_GET['propalid'] > 0) print ''.$langs->trans('Qty').''; print ''.$langs->trans('ReductionShort').''; print ''.$langs->trans('AmountHT').''; - print ' '; - print ' '; - print ' '; + print ' '; print "\n"; } $var=true; @@ -1068,26 +1068,21 @@ if ($_GET['propalid'] > 0) if ($objp->fk_product_type==1) print img_object($langs->trans('ShowService'),'service'); else print img_object($langs->trans('ShowProduct'),'product'); print ' '.$objp->ref.''; - print ' - '.nl2br($objp->product); - // \todo Ne faut-il pas rendre $conf->global->PRODUIT_CHANGE_PROD_DESC toujours a on - if ($conf->global->PRODUIT_DESC_IN_FORM && !$conf->global->PRODUIT_CHANGE_PROD_DESC) - { - print '
'.nl2br($objp->product_desc); - } + print ' - '.nl2br(stripslashes($objp->product)); + print_date_range($objp->date_start,$objp->date_end); - if ($objp->date_start && $objp->date_end) + if ($conf->global->PRODUIT_DESC_IN_FORM) { - print ' (Du '.dolibarr_print_date($objp->date_start).' au '.dolibarr_print_date($objp->date_end).')'; + if ($conf->global->PRODUIT_CHANGE_PROD_DESC) + { + print ($objp->description && $objp->description!=$objp->product)?'
'.stripslashes(nl2br($objp->description)):''; + } + else + { + print '
'.nl2br($objp->product_desc); + } } - if ($objp->date_start && ! $objp->date_end) - { - print ' (A partir du '.dolibarr_print_date($objp->date_start).')'; - } - if (! $objp->date_start && $objp->date_end) - { - print " (Jusqu'au ".dolibarr_print_date($objp->date_end).')'; - } - print ($objp->description && $objp->description!=$objp->product)?'
'.stripslashes(nl2br($objp->description)):''; + print ''; } else @@ -1116,18 +1111,7 @@ if ($_GET['propalid'] > 0) else { print nl2br($objp->description); - if ($objp->date_start && $objp->date_end) - { - print ' (Du '.dolibarr_print_date($objp->date_start).' au '.dolibarr_print_date($objp->date_end).')'; - } - if ($objp->date_start && ! $objp->date_end) - { - print ' (A partir du '.dolibarr_print_date($objp->date_start).')'; - } - if (! $objp->date_start && $objp->date_end) - { - print " (Jusqu'au ".dolibarr_print_date($objp->date_end).')'; - } + print_date_range($objp->date_start,$objp->date_end); } print "\n"; } @@ -1293,13 +1277,10 @@ if ($_GET['propalid'] > 0) print ''.$langs->trans('PriceUHT').''; print ''.$langs->trans('Qty').''; print ''.$langs->trans('ReductionShort').''; - print ' '; - print ' '; - print ' '; - print ' '; + print ' '; print "\n"; - // Ajout produit produits/services personalisés + // Ajout produit produits/services personnalisés print '
'; print ''; print ''; @@ -1307,7 +1288,19 @@ if ($_GET['propalid'] > 0) $var=true; print '\n"; - print ''; + print ''; + // éditeur wysiwyg + if ($conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_DETAILS_PERSO) + { + require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php"); + $doleditor=new DolEditor('np_desc','',100,'dolibarr_details'); + $doleditor->Create(); + } + else + { + print ''; + } + print ''; print ''; if($societe->tva_assuj == "0") { @@ -1329,6 +1322,21 @@ if ($_GET['propalid'] > 0) // Ajout de produits/services prédéfinis if ($conf->produit->enabled) { + print ''; + print ''; + if ($conf->service->enabled) + { + print $langs->trans('RecordedProductsAndServices'); + } + else + { + print $langs->trans('RecordedProducts'); + } + print ''; + print ''.$langs->trans('Qty').''; + print ''.$langs->trans('ReductionShort').''; + print ' '; + print ''; print ''; print ''; print ''; @@ -1336,7 +1344,7 @@ if ($_GET['propalid'] > 0) $var=!$var; print ''; - print ''; + print ''; // multiprix if($conf->global->PRODUIT_MULTIPRICES == 1) { @@ -1347,9 +1355,23 @@ if ($_GET['propalid'] > 0) $html->select_produits('','idprod','',$conf->produit->limit_size); } if (! $conf->global->PRODUIT_USE_SEARCH_TO_SELECT) print '
'; - print ''; + + if (! $conf->global->PRODUIT_CHANGE_PROD_DESC) + { + // éditeur wysiwyg + if ($conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_DETAILS_PERSO) + { + require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php"); + $doleditor=new DolEditor('np_desc','',100,'dolibarr_details'); + $doleditor->Create(); + } + else + { + print ''; + } + } + print ''; - print ' '; print ''; print '%'; @@ -1396,7 +1418,7 @@ if ($_GET['propalid'] > 0) */ print '
'; - if ($_GET['action'] != 'statut') + if ($_GET['action'] != 'statut' && $_GET['action'] <> 'editline') { // Valid diff --git a/htdocs/commande/fiche.php b/htdocs/commande/fiche.php index 509ae601487..41502604376 100644 --- a/htdocs/commande/fiche.php +++ b/htdocs/commande/fiche.php @@ -256,56 +256,58 @@ if ($_REQUEST['action'] == 'setremiseabsolue' && $user->rights->facture->creer) */ if ($_POST['action'] == 'addligne' && $user->rights->commande->creer) { - if ($_POST['qty'] && (($_POST['pu'] && $_POST['desc']) || $_POST['idprod'])) + if ($_POST['qty'] && (($_POST['pu'] && $_POST['np_desc']) || $_POST['idprod'])) + { + $commande = new Commande($db); + $ret=$commande->fetch($_POST['id']); + $soc = new Societe($db, $commande->socid); + $soc->fetch($commande->socid); + + if ($ret < 0) { - $commande = new Commande($db); - $ret=$commande->fetch($_POST['id']); - $soc = new Societe($db, $commande->socid); - $soc->fetch($commande->socid); + dolibarr_print_error($db,$commande->error); + exit; + } - if ($ret < 0) - { - dolibarr_print_error($db,$commande->error); - exit; - } - - // Ecrase $pu par celui du produit - // Ecrase $desc par celui du produit - // Ecrase $txtva par celui du produit - if ($_POST['idprod']) - { - $prod = new Product($db, $_POST['idprod']); - $prod->fetch($_POST['idprod']); - - $libelle = $prod->libelle; - - // multiprix - if ($conf->global->PRODUIT_MULTIPRICES == 1) + // Ecrase $pu par celui du produit + // Ecrase $desc par celui du produit + // Ecrase $txtva par celui du produit + if ($_POST['idprod']) + { + $prod = new Product($db, $_POST['idprod']); + $prod->fetch($_POST['idprod']); + + $libelle = $prod->libelle; + + // multiprix + if ($conf->global->PRODUIT_MULTIPRICES == 1) { $pu = $prod->multiprices[$soc->price_level]; } - else + else { $pu=$prod->price; } - - // La description de la ligne est celle saisie ou - // celle du produit si (non saisi + PRODUIT_CHANGE_PROD_DESC défini) - // \todo Ne faut-il pas rendre $conf->global->PRODUIT_CHANGE_PROD_DESC toujours a on - $desc=$_POST['np_desc']; - if (! $desc && $conf->global->PRODUIT_CHANGE_PROD_DESC) - { + + // La description de la ligne est celle saisie ou + // celle du produit si PRODUIT_CHANGE_PROD_DESC est défini + if ($conf->global->PRODUIT_CHANGE_PROD_DESC) + { $desc = $prod->description; + } + else + { + $desc=$_POST['np_desc']; + } + + $tva_tx = get_default_tva($mysoc,$soc,$prod->tva_tx); + } + else + { + $pu=$_POST['pu']; + $tva_tx=$_POST['tva_tx']; + $desc=$_POST['np_desc']; } - - $tva_tx = get_default_tva($mysoc,$soc,$prod->tva_tx); - } - else - { - $pu=$_POST['pu']; - $tva_tx=$_POST['tva_tx']; - $desc=$_POST['desc']; - } $commande->addline( $_POST['id'], @@ -1264,7 +1266,8 @@ else /* * Lignes de commandes */ - $sql = 'SELECT l.fk_product, l.description, l.price, l.qty, l.rowid, l.tva_tx, l.fk_remise_except, l.remise_percent, l.subprice, l.info_bits,'; + $sql = 'SELECT l.fk_product, l.description, l.price, l.qty, l.rowid, l.tva_tx, '; + $sql.= ' l.fk_remise_except, l.remise_percent, l.subprice, l.info_bits,'; $sql.= ' p.label as product, p.ref, p.fk_product_type, p.rowid as prodid, '; $sql.= ' p.description as product_desc'; $sql.= ' FROM '.MAIN_DB_PREFIX.'commandedet as l'; @@ -1288,9 +1291,7 @@ else print ''.$langs->trans('Qty').''; print ''.$langs->trans('ReductionShort').''; print ''.$langs->trans('AmountHT').''; - print ' '; - print ' '; - print ' '; + print ' '; print "\n"; } $var=true; @@ -1310,13 +1311,22 @@ else print ''; if ($objp->fk_product_type==1) print img_object($langs->trans('ShowService'),'service'); else print img_object($langs->trans('ShowProduct'),'product'); - print ' '.$objp->ref.' - '.nl2br($objp->product); - print ($objp->description && $objp->description!=$objp->product)?'
'.nl2br($objp->description):''; - // \todo Ne faut-il pas rendre $conf->global->PRODUIT_CHANGE_PROD_DESC toujours a on - if ($conf->global->PRODUIT_DESC_IN_FORM && !$conf->global->PRODUIT_CHANGE_PROD_DESC) + print ' '.$objp->ref.''; + print ' - '.nl2br(stripslashes($objp->product)); + print_date_range($objp->date_start,$objp->date_end); + + if ($conf->global->PRODUIT_DESC_IN_FORM) { - print '
'.nl2br($objp->product_desc); + if ($conf->global->PRODUIT_CHANGE_PROD_DESC) + { + print ($objp->description && $objp->description!=$objp->product)?'
'.nl2br(stripslashes($objp->description)):''; + } + else + { + print '
'.nl2br($objp->product_desc); + } } + print ''; } else @@ -1487,20 +1497,29 @@ else print ''.$langs->trans('PriceUHT').''; print ''.$langs->trans('Qty').''; print ''.$langs->trans('ReductionShort').''; - print ' '; - print ' '; - print ' '; - print ' '; + print ' '; print ''; - // Ajout produit produits/services personalisés + // Ajout produit produits/services personnalisés print ''; print ''; print ''; $var=true; print ''; - print ' '; + print ''; + // éditeur wysiwyg + if ($conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_DETAILS_PERSO) + { + require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php"); + $doleditor=new DolEditor('np_desc','',100,'dolibarr_details'); + $doleditor->Create(); + } + else + { + print ''; + } + print ''; print ''; if($soc->tva_assuj == "0") print '0'; @@ -1516,28 +1535,66 @@ else print ''; // Ajout de produits/services prédéfinis - print '
'; - print ''; - print ''; + if ($conf->produit->enabled) + { + print ''; + print ''; + if ($conf->service->enabled) + { + print $langs->trans('RecordedProductsAndServices'); + } + else + { + print $langs->trans('RecordedProducts'); + } + print ''; + print ''.$langs->trans('Qty').''; + print ''.$langs->trans('ReductionShort').''; + print ' '; + print ''; + + print ''; + print ''; + print ''; - $var=!$var; - print ''; - print ''; - // multiprix - if($conf->global->PRODUIT_MULTIPRICES == 1) - $html->select_produits('','idprod','',$conf->produit->limit_size,$soc->price_level); - else - $html->select_produits('','idprod','',$conf->produit->limit_size); - if (! $conf->global->PRODUIT_USE_SEARCH_TO_SELECT) print '
'; - print ''; - print ''; - print ' '; - print ''; - print '%'; - print ''; - print ''; + $var=!$var; + print ''; + print ''; + // multiprix + if($conf->global->PRODUIT_MULTIPRICES == 1) + { + $html->select_produits('','idprod','',$conf->produit->limit_size,$soc->price_level); + } + else + { + $html->select_produits('','idprod','',$conf->produit->limit_size); + } + + if (! $conf->global->PRODUIT_USE_SEARCH_TO_SELECT) print '
'; + + if (! $conf->global->PRODUIT_CHANGE_PROD_DESC) + { + // éditeur wysiwyg + if ($conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_DETAILS_PERSO) + { + require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php"); + $doleditor=new DolEditor('np_desc','',100,'dolibarr_details'); + $doleditor->Create(); + } + else + { + print ''; + } + } + + print ''; + print ''; + print '%'; + print ''; + print ''; - print '
'; + print ''; + } } print ''; print '
'; @@ -1545,7 +1602,7 @@ else /* * Boutons actions */ - if ($user->societe_id == 0) + if ($user->societe_id == 0 && $_GET['action'] <> 'editline') { print '
'; diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index 65d69d4c0ea..dce9ba2d1b3 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -713,7 +713,7 @@ if ($_POST['action'] == 'add' && $user->rights->facture->creer) */ if (($_POST['action'] == 'addligne' || $_POST['action'] == 'addligne_predef') && $user->rights->facture->creer) { - if ($_POST['qty'] && (($_POST['pu']!='' && $_POST['desc']) || $_POST['idprod'])) + if ($_POST['qty'] && (($_POST['pu']!='' && $_POST['np_desc']) || $_POST['idprod'])) { $fac = new Facture($db); $ret=$fac->fetch($_POST['facid']); @@ -773,13 +773,15 @@ if (($_POST['action'] == 'addligne' || $_POST['action'] == 'addligne_predef') && } // La description de la ligne est celle saisie ou - // celle du produit si (non saisi + PRODUIT_CHANGE_PROD_DESC défini) - // \todo Ne faut-il pas rendre $conf->global->PRODUIT_CHANGE_PROD_DESC toujours a on - $desc=$_POST['desc']; - if (! $desc && $conf->global->PRODUIT_CHANGE_PROD_DESC) + // celle du produit si PRODUIT_CHANGE_PROD_DESC défini + if ($conf->global->PRODUIT_CHANGE_PROD_DESC) { $desc = $prod->description; } + else + { + $desc=$_POST['np_desc']; + } $tva_tx = get_default_tva($mysoc,$fac->client,$prod->tva_tx); } @@ -787,7 +789,7 @@ if (($_POST['action'] == 'addligne' || $_POST['action'] == 'addligne_predef') && { $pu=$_POST['pu']; $tva_tx=$_POST['tva_tx']; - $desc=$_POST['desc']; + $desc=$_POST['np_desc']; } // Insere ligne @@ -1104,31 +1106,6 @@ if ($_REQUEST['action'] == 'builddoc') // En get ou en post } } -/********************************************************************* -* -* Fonctions internes -* -**********************************************************************/ -function print_date_range($date_start,$date_end) -{ - global $langs; - - if ($date_start && $date_end) - { - print ' ('.$langs->trans('DateFromTo',dolibarr_print_date($date_start),dolibarr_print_date($date_end)).')'; - } - if ($date_start && ! $date_end) - { - print ' ('.$langs->trans('DateFrom',dolibarr_print_date($date_start)).')'; - } - if (! $date_start && $date_end) - { - print ' ('.$langs->trans('DateUntil',dolibarr_print_date($date_end)).')'; - } -} - - - llxHeader('',$langs->trans('Bill'),'Facture'); $html = new Form($db); @@ -2231,9 +2208,7 @@ else print ''.$langs->trans('Qty').''; print ''.$langs->trans('ReductionShort').''; print ''.$langs->trans('TotalHT').''; - print ' '; - print ' '; - print ' '; + print ' '; print "\n"; } @@ -2257,12 +2232,17 @@ else print ' '.$objp->ref.''; print ' - '.nl2br(stripslashes($objp->product)); print_date_range($objp->date_start,$objp->date_end); - print ($objp->description && $objp->description!=$objp->product)?'
'.stripslashes(nl2br($objp->description)):''; - - // \todo Ne faut-il pas rendre $conf->global->PRODUIT_CHANGE_PROD_DESC toujours a on - if ($conf->global->PRODUIT_DESC_IN_FORM && !$conf->global->PRODUIT_CHANGE_PROD_DESC) + + if ($conf->global->PRODUIT_DESC_IN_FORM) { - print '
'.nl2br($objp->product_desc); + if ($conf->global->PRODUIT_CHANGE_PROD_DESC) + { + print ($objp->description && $objp->description!=$objp->product)?'
'.stripslashes(nl2br($objp->description)):''; + } + else + { + print '
'.nl2br($objp->product_desc); + } } print ''; @@ -2445,7 +2425,7 @@ else /* * Ajouter une ligne */ - if ($fac->statut == 0 && $user->rights->facture->creer && $_GET['action'] <> 'valid') + if ($fac->statut == 0 && $user->rights->facture->creer && $_GET['action'] <> 'valid' && $_GET['action'] <> 'editline') { print ''; print ''; @@ -2455,10 +2435,7 @@ else print ''.$langs->trans('PriceUHT').''; print ''.$langs->trans('Qty').''; print ''.$langs->trans('ReductionShort').''; - print ' '; - print ' '; - print ' '; - print ' '; + print ' '; print "\n"; // Ajout produit produits/services personalisés @@ -2468,8 +2445,19 @@ else $var=true; print ''; - print ''; - print ''; + print ''; + // éditeur wysiwyg + if ($conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_DETAILS_PERSO) + { + require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php"); + $doleditor=new DolEditor('np_desc','',100,'dolibarr_details'); + $doleditor->Create(); + } + else + { + print ''; + } + print ''; print ''; if($soc->tva_assuj == "0") print '0'; @@ -2496,29 +2484,65 @@ else // Ajout de produits/services prédéfinis if ($conf->produit->enabled) { - print '
'; + print ''; + print ''; + if ($conf->service->enabled) + { + print $langs->trans('RecordedProductsAndServices'); + } + else + { + print $langs->trans('RecordedProducts'); + } + print ''; + print ''.$langs->trans('Qty').''; + print ''.$langs->trans('ReductionShort').''; + print ' '; + print ''; + + print ''; print ''; print ''; $var=! $var; print ''; - print ''; + print ''; // multiprix if($conf->global->PRODUIT_MULTIPRICES == 1) - $html->select_produits('','idprod','',$conf->produit->limit_size,$soc->price_level); + { + $html->select_produits('','idprod','',$conf->produit->limit_size,$soc->price_level); + } else - $html->select_produits('','idprod','',$conf->produit->limit_size); + { + $html->select_produits('','idprod','',$conf->produit->limit_size); + } + if (! $conf->global->PRODUIT_USE_SEARCH_TO_SELECT) print '
'; - print ''; - print ' '; + + if (! $conf->global->PRODUIT_CHANGE_PROD_DESC) + { + // éditeur wysiwyg + if ($conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_DETAILS_PERSO) + { + require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php"); + $doleditor=new DolEditor('np_desc','',100,'dolibarr_details'); + $doleditor->Create(); + } + else + { + print ''; + } + } + + print ''; print ''; print '%'; - print ''; + print ''; print ''; if ($conf->service->enabled) { print ''; - print ''.$langs->trans('ServiceLimitedDuration').' '.$langs->trans('From').' '; + print ''.$langs->trans('ServiceLimitedDuration').' '.$langs->trans('From').' '; print $html->select_date('','date_start_predef',0,0,1,"addligne_predef"); print ' '.$langs->trans('to').' '; print $html->select_date('','date_end_predef',0,0,1,"addligne_predef"); diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 2a9be21eba4..166d6fe8b4f 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -722,6 +722,7 @@ FCKeditorForCompany=WYSIWIG creation/edition of companies description and note FCKeditorForProduct=WYSIWIG creation/edition of products/services description and note FCKeditorForMembers=WYSIWIG creation/edition of members description and note FCKeditorForProductDetails=WYSIWIG creation/edition of details lines for all entities (proposals, orders, invoices, etc...) +FCKeditorForProductDetailsPerso=WYSIWIG creation/edition of description for all personalized products (proposals, orders, invoices, etc...) FCKeditorForMailing=WYSIWIG creation/edition of mailings ##### OSCommerce 1 ##### OSCommerceErrorConnectOkButWrongDatabase=Connection succeeded but database doesn't look to be an OSCommerce database. diff --git a/htdocs/langs/en_US/products.lang b/htdocs/langs/en_US/products.lang index 2342db98bb5..404488fdbb2 100644 --- a/htdocs/langs/en_US/products.lang +++ b/htdocs/langs/en_US/products.lang @@ -115,3 +115,5 @@ PriceQty=Price for this quantity PriceQtyHT=Price for this quantity HT PriceQtyTTC=Price for this quantity TTC NoPriceDefinedForThisSupplier=No price/qty defined for this supplier/product +RecordedProducts=Products recorded +RecordedProductsAndServices=Products/services recorded \ No newline at end of file diff --git a/htdocs/langs/fr_FR/admin.lang b/htdocs/langs/fr_FR/admin.lang index 6be45332b0e..5790daf79b1 100644 --- a/htdocs/langs/fr_FR/admin.lang +++ b/htdocs/langs/fr_FR/admin.lang @@ -724,6 +724,7 @@ FCKeditorForCompany=Cr FCKeditorForProduct=Création/édition WYSIWIG des descriptions et notes des produits/services FCKeditorForMembers=Création/édition WYSIWIG des descriptions et notes des adhérents FCKeditorForProductDetails=Création/édition WYSIWIG des lignes details des produits (sur commandes, propales, factures, etc...) +FCKeditorForProductDetailsPerso=Création/édition WYSIWIG des descriptions des produits personnalisées (sur commandes, propales, factures, etc...) FCKeditorForMailing=Création/édition WYSIWIG des mailings ##### OSCommerce 1 ##### OSCommerceErrorConnectOkButWrongDatabase=La connexion a réussie mais la base ne semble pas etre une base OSCommerce. diff --git a/htdocs/langs/fr_FR/products.lang b/htdocs/langs/fr_FR/products.lang index 2654fcd3b9e..6a3d742ea2f 100644 --- a/htdocs/langs/fr_FR/products.lang +++ b/htdocs/langs/fr_FR/products.lang @@ -115,3 +115,5 @@ PriceQty=Prix pour la quantit PriceQtyHT=Prix pour la quantité HT PriceQtyTTC=Prix pour la quantité TTC NoPriceDefinedForThisSupplier=Aucun prix/qté défini pour ce fournisseur/produit +RecordedProducts=Produits en vente +RecordedProductsAndServices=Produits/services en vente diff --git a/htdocs/lib/functions.inc.php b/htdocs/lib/functions.inc.php index 3b7fee02fc6..dddfac452a8 100644 --- a/htdocs/lib/functions.inc.php +++ b/htdocs/lib/functions.inc.php @@ -2904,4 +2904,27 @@ function make_substitutions($chaine,$substitutionarray) return $result; } +/* + * \brief Formate l'affichage de date de début et de fin + * \param date_start date de début + * \param date_end date de fin + */ +function print_date_range($date_start,$date_end) +{ + global $langs; + + if ($date_start && $date_end) + { + print ' ('.$langs->trans('DateFromTo',dolibarr_print_date($date_start),dolibarr_print_date($date_end)).')'; + } + if ($date_start && ! $date_end) + { + print ' ('.$langs->trans('DateFrom',dolibarr_print_date($date_start)).')'; + } + if (! $date_start && $date_end) + { + print ' ('.$langs->trans('DateUntil',dolibarr_print_date($date_end)).')'; + } +} + ?>