From f6a4277525271172a6403061c01df89f130080f9 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Mon, 6 Aug 2012 20:38:03 +0200 Subject: [PATCH 01/19] Fix: remove unused file and missing print --- .../plugins/fileupload/cors/result.html | 20 ------------------- htdocs/main.inc.php | 2 +- 2 files changed, 1 insertion(+), 21 deletions(-) delete mode 100644 htdocs/includes/jquery/plugins/fileupload/cors/result.html diff --git a/htdocs/includes/jquery/plugins/fileupload/cors/result.html b/htdocs/includes/jquery/plugins/fileupload/cors/result.html deleted file mode 100644 index 7c98026846f..00000000000 --- a/htdocs/includes/jquery/plugins/fileupload/cors/result.html +++ /dev/null @@ -1,20 +0,0 @@ - - - - - -jQuery Iframe Transport Plugin Redirect Page - - - \ No newline at end of file diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index f26d9481dfc..e45040779c4 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -1006,7 +1006,7 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs print ''."\n"; print ''."\n"; print ''."\n"; - ''."\n"; + print ''."\n"; } // jQuery DataTables if (! empty($conf->global->MAIN_USE_JQUERY_DATATABLES)) From d5ce19840cbbfe388119046b36582088b892e4c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a?= Date: Mon, 6 Aug 2012 21:22:45 +0200 Subject: [PATCH 02/19] Added missing translations --- htdocs/langs/en_US/stocks.lang | 1 + htdocs/langs/es_ES/stocks.lang | 1 + 2 files changed, 2 insertions(+) diff --git a/htdocs/langs/en_US/stocks.lang b/htdocs/langs/en_US/stocks.lang index 823cb5cc04f..1654d4bb197 100644 --- a/htdocs/langs/en_US/stocks.lang +++ b/htdocs/langs/en_US/stocks.lang @@ -33,6 +33,7 @@ StockCorrection=Correct stock StockMovement=Transfer StockMovements=Stock transfers NumberOfUnit=Number of units +UnitPurchaseValue=Unit purchase price TotalStock=Total in stock StockTooLow=Stock too low EnhancedValue=Value diff --git a/htdocs/langs/es_ES/stocks.lang b/htdocs/langs/es_ES/stocks.lang index f9cbb5ededd..061d01ed587 100644 --- a/htdocs/langs/es_ES/stocks.lang +++ b/htdocs/langs/es_ES/stocks.lang @@ -33,6 +33,7 @@ StockCorrection=Corrección stock StockMovement=Transferencia StockMovements=Movimientos de stock NumberOfUnit=Número de piezas +UnitPurchaseValue=Precio de compra unitario TotalStock=Total en stock StockTooLow=Stock insuficiente EnhancedValue=Valor From 26e9a5c877eff7e039360b75a67f8a5f62ed466f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a?= Date: Tue, 7 Aug 2012 00:59:20 +0200 Subject: [PATCH 03/19] Added missing change in changelog --- ChangeLog | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index e048f09a897..1ea99586972 100644 --- a/ChangeLog +++ b/ChangeLog @@ -26,9 +26,9 @@ For users: - New: Suggest a method to generate a backup file for user with no access to mysqldump binary. - New: Can correct stock of a warehouse from warehouse card. -- New: task #185 : Can input amount when correcting stock to recalculate PMP. -- New: [ task #454 ] Add "No category" into filters on category. -- New: Update language files (de, tr, pt). +- New: [ task #185 ]: Can input amount when correcting stock to recalculate PMP. +- New: [ task #454 ]: Add "No category" into filters on category. +- New: Update language files (de, tr, pt, ca_ES, es_ES). - New: Auto check box on page to edit interface options of user. - New: Add great britain provinces. - New: Update libs/tools/logo for DoliWamp. From cbd54291b11f77a93b1fb72774027be704fd3751 Mon Sep 17 00:00:00 2001 From: Christophe Battarel Date: Tue, 7 Aug 2012 09:46:26 +0200 Subject: [PATCH 04/19] also take lines without buying_price in commissions --- htdocs/commissions/index.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/htdocs/commissions/index.php b/htdocs/commissions/index.php index d7e024990d0..d36a075bcc2 100644 --- a/htdocs/commissions/index.php +++ b/htdocs/commissions/index.php @@ -160,8 +160,6 @@ else $sql.= " AND f.fk_statut > 1"; $sql.= " AND s.entity = ".$conf->entity; $sql.= " AND d.fk_facture = f.rowid"; -if ($conf->global->COMMISSION_BASE == "MARGIN") - $sql.= " AND d.buy_price_ht IS NOT NULL AND d.buy_price_ht <> 0"; if ($agentid > 0) $sql.= " AND sc.fk_user = $agentid"; if (!empty($startdate)) From 5d9f16ca20cf8763acaf79d1eab6122bef1a4f11 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 7 Aug 2012 11:33:11 +0200 Subject: [PATCH 05/19] New: More surface control on stock correction page --- ChangeLog | 1 + htdocs/core/lib/functions.lib.php | 1 + htdocs/product/stock/product.php | 218 ++++++++++++++++++------------ 3 files changed, 133 insertions(+), 87 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1ea99586972..63952957652 100644 --- a/ChangeLog +++ b/ChangeLog @@ -30,6 +30,7 @@ For users: - New: [ task #454 ]: Add "No category" into filters on category. - New: Update language files (de, tr, pt, ca_ES, es_ES). - New: Auto check box on page to edit interface options of user. +- New: More surface control on stock correction page. - New: Add great britain provinces. - New: Update libs/tools/logo for DoliWamp. - Fix: No images into product description lines as PDF generation does diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index c61c16e108f..48e02b5b6fc 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -3472,6 +3472,7 @@ function get_date_range($date_start,$date_end,$format = '',$outputlangs='') */ function setEventMessage($mesgstring, $style='mesgs') { + if (! in_array($style,array('mesgs','warnings','errors'))) dol_print_error('','Bad parameter for setEventMessage'); $_SESSION['dol_events'][$style][] = $mesgstring; } diff --git a/htdocs/product/stock/product.php b/htdocs/product/stock/product.php index 47aa0792f55..e232a92df65 100644 --- a/htdocs/product/stock/product.php +++ b/htdocs/product/stock/product.php @@ -42,6 +42,8 @@ $cancel=GETPOST('cancel'); // Security check $id = GETPOST('id')?GETPOST('id'):GETPOST('ref'); $ref = GETPOST('ref'); +$stocklimit = GETPOST('stocklimit'); +$cancel = GETPOST('cancel'); $fieldid = isset($_GET["ref"])?'ref':'rowid'; if ($user->societe_id) $socid=$user->societe_id; $result=restrictedArea($user,'produit&stock',$id,'product&product','','',$fieldid); @@ -59,96 +61,125 @@ if ($cancel) $action=''; if ($action == 'setstocklimit') { $product = new Product($db); - $result=$product->fetch($_POST['id']); - $product->seuil_stock_alerte=$_POST["stocklimit"]; + $result=$product->fetch($id); + $product->seuil_stock_alerte=$stocklimit; $result=$product->update($product->id,$user,1,0,1); if ($result < 0) { $mesg=join(',',$product->errors); } - $POST["action"]=""; - $id=$_POST["id"]; - $_GET["id"]=$_POST["id"]; + $action=''; } // Correct stock -if ($action == "correct_stock" && ! $_POST["cancel"]) +if ($action == "correct_stock" && ! $cancel) { - //if ($_POST["price"] == '') $_POST["price"] = 0; - if (isset($_POST["price"])) $priceunit=price2num($_POST["price"]); - if (is_numeric($_POST["nbpiece"]) && $id) + if (! (GETPOST("id_entrepot") > 0)) { - $product = new Product($db); - $result=$product->fetch($id); - - $result=$product->correct_stock( - $user, - $_POST["id_entrepot"], - $_POST["nbpiece"], - $_POST["mouvement"], - $_POST["label"], - $priceunit - ); // We do not change value of stock for a correction - - if ($result > 0) + setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Warehouse")), 'errors'); + $error++; + $action='correction'; + } + if (! GETPOST("nbpiece")) + { + setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("NumberOfUnit")), 'errors'); + $error++; + $action='correction'; + } + + if (! $error) + { + $priceunit=price2num(GETPOST("price")); + if (is_numeric(GETPOST("nbpiece")) && $id) { - header("Location: ".$_SERVER["PHP_SELF"]."?id=".$product->id); - exit; + $product = new Product($db); + $result=$product->fetch($id); + + $result=$product->correct_stock( + $user, + GETPOST("id_entrepot"), + GETPOST("nbpiece"), + GETPOST("mouvement"), + GETPOST("label"), + $priceunit + ); // We do not change value of stock for a correction + + if ($result > 0) + { + header("Location: ".$_SERVER["PHP_SELF"]."?id=".$product->id); + exit; + } } } } // Transfer stock from a warehouse to another warehouse -if ($action == "transfert_stock" && ! $_POST["cancel"]) +if ($action == "transfert_stock" && ! $cancel) { - if ($_POST["id_entrepot_source"] <> $_POST["id_entrepot_destination"]) - { - if (is_numeric($_POST["nbpiece"]) && $id) + if (! (GETPOST("id_entrepot_source") > 0) || ! (GETPOST("id_entrepot_destination") > 0)) + { + setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Warehouse")), 'errors'); + $error++; + $action='transfert'; + } + if (! GETPOST("nbpiece")) + { + setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("NumberOfUnit")), 'errors'); + $error++; + $action='transfert'; + } + + if (! $error) + { + if (GETPOST("id_entrepot_source") <> GETPOST("id_entrepot_destination")) { - $product = new Product($db); - $result=$product->fetch($id); - - $db->begin(); - - $product->load_stock(); // Load array product->stock_warehouse - - // Define value of products moved - $pricesrc=0; - if (isset($product->stock_warehouse[$_POST["id_entrepot_source"]]->pmp)) $pricesrc=$product->stock_warehouse[$_POST["id_entrepot_source"]]->pmp; - $pricedest=$pricesrc; - - //print 'price src='.$pricesrc.', price dest='.$pricedest;exit; - - // Remove stock - $result1=$product->correct_stock( - $user, - $_POST["id_entrepot_source"], - $_POST["nbpiece"], - 1, - $_POST["label"], - $pricesrc - ); - - // Add stock - $result2=$product->correct_stock( - $user, - $_POST["id_entrepot_destination"], - $_POST["nbpiece"], - 0, - $_POST["label"], - $pricedest - ); - - if ($result1 >= 0 && $result2 >= 0) + if (is_numeric(GETPOST("nbpiece")) && $id) { - $db->commit(); - header("Location: product.php?id=".$product->id); - exit; - } - else - { - $mesg=$product->error; - $db->rollback(); + $product = new Product($db); + $result=$product->fetch($id); + + $db->begin(); + + $product->load_stock(); // Load array product->stock_warehouse + + // Define value of products moved + $pricesrc=0; + if (isset($product->stock_warehouse[GETPOST("id_entrepot_source")]->pmp)) $pricesrc=$product->stock_warehouse[GETPOST("id_entrepot_source")]->pmp; + $pricedest=$pricesrc; + + //print 'price src='.$pricesrc.', price dest='.$pricedest;exit; + + // Remove stock + $result1=$product->correct_stock( + $user, + GETPOST("id_entrepot_source"), + GETPOST("nbpiece"), + 1, + GETPOST("label"), + $pricesrc + ); + + // Add stock + $result2=$product->correct_stock( + $user, + GETPOST("id_entrepot_destination"), + GETPOST("nbpiece"), + 0, + GETPOST("label"), + $pricedest + ); + + if ($result1 >= 0 && $result2 >= 0) + { + $db->commit(); + header("Location: product.php?id=".$product->id); + exit; + } + else + { + $mesg=$product->error; + $db->rollback(); + } } } } @@ -162,11 +193,11 @@ if ($action == "transfert_stock" && ! $_POST["cancel"]) $formproduct=new FormProduct($db); -if ($_GET["id"] || $_GET["ref"]) +if ($id > 0 || $ref) { $product = new Product($db); - if ($_GET["ref"]) $result = $product->fetch('',$_GET["ref"]); - if ($_GET["id"]) $result = $product->fetch($_GET["id"]); + if ($ref) $result = $product->fetch('',$ref); + if ($id > 0) $result = $product->fetch($id); $help_url='EN:Module_Stocks_En|FR:Module_Stock|ES:Módulo_Stocks'; llxHeader("",$langs->trans("CardProduct".$product->type),$help_url); @@ -180,7 +211,8 @@ if ($_GET["id"] || $_GET["ref"]) $form = new Form($db); - print($mesg); + if ($mesg) print($mesg); + dol_htmloutput_events(); print ''; @@ -329,6 +361,20 @@ if ($_GET["id"] || $_GET["ref"]) */ if ($action == "correction") { + print ''; + print_titre($langs->trans("StockCorrection")); print ''."\n"; print ''; @@ -339,23 +385,23 @@ if ($_GET["id"] || $_GET["ref"]) print ''; print ''; print ''; print ''; - print ''; + print ''; print ''; // Label print ''; print ''; print ''; - print ''; + print ''; print ''; print '
'.$langs->trans("Warehouse").''; - print $formproduct->selectWarehouses($_GET["dwid"],'id_entrepot','',1); + print $formproduct->selectWarehouses(($_GET["dwid"]?$_GET["dwid"]:GETPOST('id_entrepot')),'id_entrepot','',1); print ''; - print ''; print ''; print ''; print ''.$langs->trans("NumberOfUnit").''.$langs->trans("NumberOfUnit").'
'.$langs->trans("Label").''; - print ''; + print ''; print ''.$langs->trans("UnitPurchaseValue").''.$langs->trans("UnitPurchaseValue").'
'; @@ -378,19 +424,19 @@ if ($_GET["id"] || $_GET["ref"]) print ''; print ''.$langs->trans("WarehouseSource").''; - print $formproduct->selectWarehouses($_GET["dwid"],'id_entrepot_source','',1); + print $formproduct->selectWarehouses(($_GET["dwid"]?$_GET["dwid"]:GETPOST('id_entrepot_source')),'id_entrepot_source','',1); print ''; print ''.$langs->trans("WarehouseTarget").''; - print $formproduct->selectWarehouses('','id_entrepot_destination','',1); + print $formproduct->selectWarehouses(GETPOST('id_entrepot_destination'),'id_entrepot_destination','',1); print ''; - print ''.$langs->trans("NumberOfUnit").''; + print ''.$langs->trans("NumberOfUnit").''; print ''; // Label print ''; print ''.$langs->trans("Label").''; print ''; - print ''; + print ''; print ''; print ''; @@ -536,9 +582,7 @@ print ""; print ""; +llxFooter(); $db->close(); - - -llxFooter(); ?> From 71a4a2b7f9fd910974aeec3e3d3c92d7b3669aba Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Tue, 7 Aug 2012 11:48:28 +0200 Subject: [PATCH 06/19] Fix: dol_htmloutput_events() already loaded in footer --- htdocs/product/stock/product.php | 39 +++++++++++++------------------- 1 file changed, 16 insertions(+), 23 deletions(-) diff --git a/htdocs/product/stock/product.php b/htdocs/product/stock/product.php index e232a92df65..7d15898deea 100644 --- a/htdocs/product/stock/product.php +++ b/htdocs/product/stock/product.php @@ -48,8 +48,6 @@ $fieldid = isset($_GET["ref"])?'ref':'rowid'; if ($user->societe_id) $socid=$user->societe_id; $result=restrictedArea($user,'produit&stock',$id,'product&product','','',$fieldid); -$mesg = ''; - /* * Actions @@ -65,9 +63,7 @@ if ($action == 'setstocklimit') $product->seuil_stock_alerte=$stocklimit; $result=$product->update($product->id,$user,1,0,1); if ($result < 0) - { - $mesg=join(',',$product->errors); - } + setEventMessage($product->errors, 'errors'); $action=''; } @@ -76,7 +72,7 @@ if ($action == "correct_stock" && ! $cancel) { if (! (GETPOST("id_entrepot") > 0)) { - setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Warehouse")), 'errors'); + setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Warehouse")), 'errors'); $error++; $action='correction'; } @@ -86,7 +82,7 @@ if ($action == "correct_stock" && ! $cancel) $error++; $action='correction'; } - + if (! $error) { $priceunit=price2num(GETPOST("price")); @@ -94,7 +90,7 @@ if ($action == "correct_stock" && ! $cancel) { $product = new Product($db); $result=$product->fetch($id); - + $result=$product->correct_stock( $user, GETPOST("id_entrepot"), @@ -103,7 +99,7 @@ if ($action == "correct_stock" && ! $cancel) GETPOST("label"), $priceunit ); // We do not change value of stock for a correction - + if ($result > 0) { header("Location: ".$_SERVER["PHP_SELF"]."?id=".$product->id); @@ -128,7 +124,7 @@ if ($action == "transfert_stock" && ! $cancel) $error++; $action='transfert'; } - + if (! $error) { if (GETPOST("id_entrepot_source") <> GETPOST("id_entrepot_destination")) @@ -137,18 +133,18 @@ if ($action == "transfert_stock" && ! $cancel) { $product = new Product($db); $result=$product->fetch($id); - + $db->begin(); - + $product->load_stock(); // Load array product->stock_warehouse - + // Define value of products moved $pricesrc=0; if (isset($product->stock_warehouse[GETPOST("id_entrepot_source")]->pmp)) $pricesrc=$product->stock_warehouse[GETPOST("id_entrepot_source")]->pmp; $pricedest=$pricesrc; - + //print 'price src='.$pricesrc.', price dest='.$pricedest;exit; - + // Remove stock $result1=$product->correct_stock( $user, @@ -158,7 +154,7 @@ if ($action == "transfert_stock" && ! $cancel) GETPOST("label"), $pricesrc ); - + // Add stock $result2=$product->correct_stock( $user, @@ -168,7 +164,7 @@ if ($action == "transfert_stock" && ! $cancel) GETPOST("label"), $pricedest ); - + if ($result1 >= 0 && $result2 >= 0) { $db->commit(); @@ -177,7 +173,7 @@ if ($action == "transfert_stock" && ! $cancel) } else { - $mesg=$product->error; + setEventMessage($product->error, 'errors'); $db->rollback(); } } @@ -211,9 +207,6 @@ if ($id > 0 || $ref) $form = new Form($db); - if ($mesg) print($mesg); - dol_htmloutput_events(); - print ''; // Ref @@ -373,8 +366,8 @@ if ($id > 0 || $ref) init_price(); }); }); - '; - + '; + print_titre($langs->trans("StockCorrection")); print ''."\n"; print ''; From 5564421e3f243b109edc0b481b7031e38186db28 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Tue, 7 Aug 2012 12:00:22 +0200 Subject: [PATCH 07/19] Fix: update method return $this->error not $this->errors --- htdocs/product/stock/product.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/product/stock/product.php b/htdocs/product/stock/product.php index 7d15898deea..714a8d71291 100644 --- a/htdocs/product/stock/product.php +++ b/htdocs/product/stock/product.php @@ -63,7 +63,7 @@ if ($action == 'setstocklimit') $product->seuil_stock_alerte=$stocklimit; $result=$product->update($product->id,$user,1,0,1); if ($result < 0) - setEventMessage($product->errors, 'errors'); + setEventMessage($product->error, 'errors'); $action=''; } From 803f840761400f768d8a6d997da92d0c9249ac94 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 7 Aug 2012 13:12:20 +0200 Subject: [PATCH 08/19] Qual: Rename label to avoid confusion. Qual: Fix code to reflect documentation. --- htdocs/commande/liste.php | 3 +- htdocs/commande/orderstoinvoice.php | 362 +++++++++++++----------- htdocs/core/menus/standard/eldy.lib.php | 4 +- htdocs/langs/en_US/orders.lang | 8 +- htdocs/langs/fr_FR/orders.lang | 8 +- 5 files changed, 205 insertions(+), 180 deletions(-) diff --git a/htdocs/commande/liste.php b/htdocs/commande/liste.php index 5efeaad7b04..9416732af77 100644 --- a/htdocs/commande/liste.php +++ b/htdocs/commande/liste.php @@ -98,7 +98,8 @@ $formother = new FormOther($db); $formfile = new FormFile($db); $companystatic = new Societe($db); -llxHeader(); +$help_url="EN:Module_Customers_Orders|FR:Module_Commandes_Clients|ES:Módulo_Pedidos_de_clientes"; +llxHeader('',$langs->trans("Orders"),$help_url); $sql = 'SELECT s.nom, s.rowid as socid, s.client, c.rowid, c.ref, c.total_ht, c.ref_client,'; $sql.= ' c.date_valid, c.date_commande, c.date_livraison, c.fk_statut, c.facture as facturee'; diff --git a/htdocs/commande/orderstoinvoice.php b/htdocs/commande/orderstoinvoice.php index cae2461a780..b99b92391a9 100755 --- a/htdocs/commande/orderstoinvoice.php +++ b/htdocs/commande/orderstoinvoice.php @@ -29,10 +29,12 @@ require("../main.inc.php"); require_once(DOL_DOCUMENT_ROOT."/core/class/html.formfile.class.php"); -require_once(DOL_DOCUMENT_ROOT ."/commande/class/commande.class.php"); +require_once(DOL_DOCUMENT_ROOT."/compta/facture/class/facture.class.php"); +require_once(DOL_DOCUMENT_ROOT."/commande/class/commande.class.php"); require_once(DOL_DOCUMENT_ROOT."/core/class/html.formother.class.php"); require_once(DOL_DOCUMENT_ROOT."/core/lib/date.lib.php"); require_once(DOL_DOCUMENT_ROOT."/core/lib/report.lib.php"); +if ($conf->projet->enabled) require_once(DOL_DOCUMENT_ROOT."/core/lib/project.lib.php"); $langs->load('orders'); $langs->load('deliveries'); @@ -73,10 +75,9 @@ if ($action == 'create') } } $now=dol_now(); -$html = new Form($db); -$formfile = new FormFile($db); -$companystatic = new Societe($db); -$htmlother = new FormOther($db); + +$viewstatut=GETPOST('viewstatut'); + /* * Actions @@ -267,30 +268,30 @@ if (($action == 'create' || $action == 'add') && empty($mesgs)) { $fk_parent_line = 0; } - $result = $object->addline( - $id, - $desc, - $lines[$i]->subprice, - $lines[$i]->qty, - $lines[$i]->tva_tx, - $lines[$i]->localtax1_tx, - $lines[$i]->localtax2_tx, - $lines[$i]->fk_product, - $lines[$i]->remise_percent, - $date_start, - $date_end, - 0, - $lines[$i]->info_bits, - $lines[$i]->fk_remise_except, - 'HT', - 0, - $product_type, - $lines[$i]->rang, - $lines[$i]->special_code, - $object->origin, - $lines[$i]->rowid, - $fk_parent_line - ); + $result = $object->addline( + $id, + $desc, + $lines[$i]->subprice, + $lines[$i]->qty, + $lines[$i]->tva_tx, + $lines[$i]->localtax1_tx, + $lines[$i]->localtax2_tx, + $lines[$i]->fk_product, + $lines[$i]->remise_percent, + $date_start, + $date_end, + 0, + $lines[$i]->info_bits, + $lines[$i]->fk_remise_except, + 'HT', + 0, + $product_type, + $lines[$i]->rang, + $lines[$i]->special_code, + $object->origin, + $lines[$i]->rowid, + $fk_parent_line + ); if ($result > 0) { $lineid=$result; @@ -342,146 +343,149 @@ if (($action == 'create' || $action == 'add') && empty($mesgs)) $mesgs[]='
'.$object->error.'
'; } } +} - /* - * View - */ - $html = new Form($db); - $htmlother = new FormOther($db); - $formfile = new FormFile($db); - $now=dol_now(); - // Mode creation - if ($action == 'create') +/* + * View + */ + +$html = new Form($db); +$htmlother = new FormOther($db); +$formfile = new FormFile($db); +$companystatic = new Societe($db); + +// Mode creation +if ($action == 'create') +{ + $facturestatic=new Facture($db); + + llxHeader(); + print_fiche_titre($langs->trans('NewBill')); + + $soc = new Societe($db); + if ($socid) $res=$soc->fetch($socid); + if ($res) { - $facturestatic=new Facture($db); + $cond_reglement_id = $soc->cond_reglement_id; + $mode_reglement_id = $soc->mode_reglement_id; + $remise_percent = $soc->remise_percent; + } + $remise_absolue = 0; + $dateinvoice = empty($conf->global->MAIN_AUTOFILL_DATE)?-1:0; - llxHeader(); - print_fiche_titre($langs->trans('NewBill')); + $absolute_discount=$soc->getAvailableDiscounts(); + print ''; + print ''; + print ''; + print '' ."\n"; + print ''; + print ''; + print ''; + print ''; + print ''; + print '
'; + // Ref + print ''; + // Tiers + print ''; + print ''."\n"; + print ''; + // Payment term + print ''; + // Payment mode + print ''; + // Project + if ($conf->projet->enabled) + { + $langs->load('projects'); + print ''; + } + // Modele PDF + print ''; + print '"; - $soc = new Societe($db); - if ($socid) $res=$soc->fetch($socid); - if ($res) + // Public note + print ''; + print ''; + print ''; + // Private note + if (! $user->societe_id) + { print ''; - print ''; + print ''; print ''; - // Private note - if (! $user->societe_id) - { - print ''; - print ''; - print ''; - } - - print '
'.$langs->trans('Ref').''.$langs->trans('Draft').'
'.$langs->trans('Customer').''; + print $soc->getNomUrl(1); + print ''; + print '
'.$langs->trans('Type').''; + print ''."\n"; + // Standard invoice + print ''."\n"; + print '
'; + print ''; + print ''; + $desc=$html->textwithpicto($langs->trans("InvoiceStandardAsk"),$langs->transnoentities("InvoiceStandardDesc"),1); + print $desc; + print '
'; + // Date invoice + print '
'.$langs->trans('Date').''; + $html->select_date(0,'','','','',"add",1,1); + print '
'.$langs->trans('PaymentConditionsShort').''; + $html->select_conditions_paiements(isset($_POST['cond_reglement_id'])?$_POST['cond_reglement_id']:$cond_reglement_id,'cond_reglement_id'); + print '
'.$langs->trans('PaymentMode').''; + $html->select_types_paiements(isset($_POST['mode_reglement_id'])?$_POST['mode_reglement_id']:$mode_reglement_id,'mode_reglement_id'); + print '
'.$langs->trans('Project').''; + select_projects($soc->id, $projectid, 'projectid'); + print '
'.$langs->trans('Model').''; + include_once(DOL_DOCUMENT_ROOT.'/core/modules/facture/modules_facture.php'); + $liste=ModelePDFFactures::liste_modeles($db); + print $html->selectarray('model',$liste,$conf->global->FACTURE_ADDON_PDF); + print "
'.$langs->trans('NotePublic').''; + print '
'.$langs->trans('NotePublic').''.$langs->trans('NotePrivate').''; - print '
'.$langs->trans('NotePrivate').''; - print '
'; - print ''; - } + print ''; + print ''; + + while ($i < $n) { print ''; - + $i++; } - + print "\n"; // Button "Create Draft" print '
'; print "\n"; } + //Mode liste -else +if (($action != 'create' && $action != 'add') || ! empty($mesgs)) { llxHeader(); ?> - rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; $sql.= ' WHERE c.fk_soc = s.rowid'; - $sql.= ' AND c.fk_statut in (1, 2) AND c.facture = 0'; + // Which invoice to show + if ($viewstatut <> '') + { + if ($viewstatut < 4 && $viewstatut > -2) + { + $sql.= ' AND c.fk_statut ='.$viewstatut; // brouillon, validee, en cours, annulee + if ($viewstatut == 3) + { + $sql.= ' AND c.facture = 0'; // need to create invoice + } + } + if ($viewstatut == 4) + { + $sql.= ' AND c.facture = 1'; // invoice created + } + if ($viewstatut == -2) // To process + { + //$sql.= ' AND c.fk_statut IN (1,2,3) AND c.facture = 0'; + $sql.= " AND ((c.fk_statut IN (1,2)) OR (c.fk_statut = 3 AND c.facture = 0))"; // If status is 2 and facture=1, it must be selected + } + } $sql.= ' AND s.entity = '.$conf->entity; if ($socid) $sql.= ' AND s.rowid = '.$socid; if (!$user->rights->societe->client->voir && !$socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; @@ -511,18 +535,18 @@ else { $sql.= " AND (c.ref LIKE '%".$db->escape($sall)."%' OR c.note LIKE '%".$db->escape($sall)."%')"; } - + //Date filter if ($date_start && $date_end) $sql.= " AND c.date_commande >= '".$db->idate($date_start)."' AND c.date_commande <= '".$db->idate($date_end)."'"; if ($date_starty && $date_endy) $sql.= " AND c.date_livraison >= '".$db->idate($date_starty)."' AND c.date_livraison <= '".$db->idate($date_endy)."'"; - + if (!empty($sref_client)) { $sql.= ' AND c.ref_client LIKE \'%'.$db->escape($sref_client).'%\''; } $sql.= ' ORDER BY '.$sortfield.' '.$sortorder; $resql = $db->query($sql); - + if ($resql) { if ($socid) @@ -545,7 +569,7 @@ else print '

'; $companystatic->id=$socid; $companystatic->nom=$soc->nom; - + print $companystatic->getNomUrl(1,'customer'); print '

'; print ''; @@ -557,7 +581,7 @@ else print_liste_field_titre($langs->trans('Status'),'','','','','align="right"'); print_liste_field_titre($langs->trans('GenerateBill'),'','','','','align="center"'); print ''; - + // Lignes des champs de filtre print ''; print ''; @@ -569,52 +593,52 @@ else //print ''; - + print ''; + //DATE DELIVERY print ''; - - //SEARCH BUTTON + + //SEARCH BUTTON print ''; - + print ''; print ''; - + print ''; $var=True; $generic_commande = new Commande($db); - + while ($i < $num) { $objp = $db->fetch_object($resql); $var=!$var; print ''; print ''; - + print ''; - + // Order date print ''; - + //Delivery date print ''; - + // Statut print ''; - + // Checkbox print '' ; - + print ''; - + $total = $total + $objp->price; $subtotal = $subtotal + $objp->price; $i++; } print '
'; print ''; print ''; - + //DATE ORDER print ''; print $period; - print ''; print $periodely; print ''; print ''; - + //ALL/NONE print ''; if ($conf->use_javascript_ajax) print ''.$langs->trans("All").' / '.$langs->trans("None").''; print '
'; - + $generic_commande->id=$objp->rowid; $generic_commande->ref=$objp->ref; - + print ''; print ''; - + print ''; - + print '
'; print $generic_commande->getNomUrl(1,$objp->fk_statut); print ''; if (($objp->fk_statut > 0) && ($objp->fk_statut < 3) && $db->jdate($objp->date_valid) < ($now - $conf->commande->client->warning_delay)) print img_picto($langs->trans("Late"),"warning"); print ''; $filename=dol_sanitizeFileName($objp->ref); $filedir=$conf->commande->dir_output . '/' . dol_sanitizeFileName($objp->ref); @@ -622,37 +646,37 @@ else $formfile->show_documents('commande',$filename,$filedir,$urlsource,'','','',1,'',1); print '
'; print '
'.$objp->ref_client.''; print dol_print_date($db->jdate($objp->date_commande),'day'); print ''; print dol_print_date($db->jdate($objp->date_livraison),'day'); print ''.$generic_commande->LibStatut($objp->fk_statut,$objp->facturee,5).''; print ''; print '
'; - + /* - * Boutons actions + * Boutons actions */ print '
'; print ''; diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php index 9a51e08ea37..e24124c3239 100644 --- a/htdocs/core/menus/standard/eldy.lib.php +++ b/htdocs/core/menus/standard/eldy.lib.php @@ -858,8 +858,8 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after) $newmenu->add("/commande/liste.php?leftmenu=orders", $langs->trans("List"), 1, $user->rights->commande->lire); if ($leftmenu=="orders") $newmenu->add("/commande/liste.php?leftmenu=orders&viewstatut=0", $langs->trans("StatusOrderDraftShort"), 2, $user->rights->commande->lire); if ($leftmenu=="orders") $newmenu->add("/commande/liste.php?leftmenu=orders&viewstatut=1", $langs->trans("StatusOrderValidated"), 2, $user->rights->commande->lire); - if ($leftmenu=="orders") $newmenu->add("/commande/liste.php?leftmenu=orders&viewstatut=2", $langs->trans("StatusOrderOnProcessShort"), 2, $user->rights->commande->lire); - if ($leftmenu=="orders") $newmenu->add("/commande/liste.php?leftmenu=orders&viewstatut=3", $langs->trans("StatusOrderToBill"), 2, $user->rights->commande->lire); + if ($leftmenu=="orders" && $conf->expedition->enabled) $newmenu->add("/commande/liste.php?leftmenu=orders&viewstatut=2", $langs->trans("StatusOrderOnProcessShort"), 2, $user->rights->commande->lire); + if ($leftmenu=="orders") $newmenu->add("/commande/liste.php?leftmenu=orders&viewstatut=".($conf->expedition->enabled?"3":"-2"), $langs->trans("StatusOrderToBill"), 2, $user->rights->commande->lire); if ($leftmenu=="orders") $newmenu->add("/commande/liste.php?leftmenu=orders&viewstatut=4", $langs->trans("StatusOrderProcessed"), 2, $user->rights->commande->lire); if ($leftmenu=="orders") $newmenu->add("/commande/liste.php?leftmenu=orders&viewstatut=-1", $langs->trans("StatusOrderCanceledShort"), 2, $user->rights->commande->lire); $newmenu->add("/commande/stats/index.php?leftmenu=orders", $langs->trans("Statistics"), 1, $user->rights->commande->lire); diff --git a/htdocs/langs/en_US/orders.lang b/htdocs/langs/en_US/orders.lang index 570afcdabfb..cc63582c5ab 100644 --- a/htdocs/langs/en_US/orders.lang +++ b/htdocs/langs/en_US/orders.lang @@ -21,7 +21,7 @@ CustomersOrders=Customer's orders CustomersOrdersRunning=Current customer's orders CustomersOrdersAndOrdersLines=Customer orders and order's lines OrdersToValid=Customer's orders to validate -OrdersToBill=Customer's orders to bill +OrdersToBill=Customer's orders delivered OrdersInProcess=Customer's orders in process OrdersToProcess=Customer's orders to process SuppliersOrdersToProcess=Supplier's orders to process @@ -32,7 +32,7 @@ StatusOrderSentShort=In process StatusOrderSent=Shipment in process StatusOrderOnProcessShort=Reception StatusOrderProcessedShort=Processed -StatusOrderToBillShort=To bill +StatusOrderToBillShort=Delivered StatusOrderApprovedShort=Approved StatusOrderRefusedShort=Refused StatusOrderToProcessShort=To process @@ -43,7 +43,7 @@ StatusOrderDraft=Draft (needs to be validated) StatusOrderValidated=Validated StatusOrderOnProcess=Waiting to receive StatusOrderProcessed=Processed -StatusOrderToBill=To bill +StatusOrderToBill=Delivered StatusOrderApproved=Approved StatusOrderRefused=Refused StatusOrderReceivedPartially=Partially received @@ -51,7 +51,7 @@ StatusOrderReceivedAll=Everything received ShippingExist=A shipment exists DraftOrWaitingApproved=Draft or approved not yet ordered DraftOrWaitingShipped=Draft or validated not yet shipped -MenuOrdersToBill=Orders to bill +MenuOrdersToBill=Orders delivered SearchOrder=Search order Sending=Sending Sendings=Sendings diff --git a/htdocs/langs/fr_FR/orders.lang b/htdocs/langs/fr_FR/orders.lang index cac2bcc278c..329afb01a8d 100644 --- a/htdocs/langs/fr_FR/orders.lang +++ b/htdocs/langs/fr_FR/orders.lang @@ -21,7 +21,7 @@ CustomersOrders=Commandes clients CustomersOrdersRunning=Commandes clients en cours CustomersOrdersAndOrdersLines=Commandes clients et lignes de commandes OrdersToValid=Commandes clients à valider -OrdersToBill=Commandes clients à facturer +OrdersToBill=Commandes clients délivrées OrdersInProcess=Commandes clients en traitement OrdersToProcess=Commandes clients à traiter SuppliersOrdersToProcess=Commandes fournisseurs à traiter @@ -32,7 +32,7 @@ StatusOrderOnProcessShort=Traitement en cours StatusOrderSentShort=Envoi en cours StatusOrderSent=Envoi en cours StatusOrderProcessedShort=Traitée -StatusOrderToBillShort=À facturer +StatusOrderToBillShort=Délivrée StatusOrderApprovedShort=Approuvée StatusOrderRefusedShort=Refusée StatusOrderToProcessShort=A traiter @@ -43,7 +43,7 @@ StatusOrderDraft=Brouillon (à valider) StatusOrderValidated=Validée StatusOrderOnProcess=Attente réception StatusOrderProcessed=Traitée -StatusOrderToBill=À facturer +StatusOrderToBill=Délivrée StatusOrderApproved=Approuvée StatusOrderRefused=Refusée StatusOrderReceivedPartially=Reçu partiellement @@ -52,7 +52,7 @@ ShippingExist=Une expédition existe DraftOrWaitingApproved=Brouillon ou approuvée pas encore commandée DraftOrWaitingShipped=Brouillon ou validée pas encore expédiée SearchOrder=Rechercher une commande -MenuOrdersToBill=Commandes à facturer +MenuOrdersToBill=Commandes délivrées Sending=Expédition Sendings=Expéditions ShipProduct=Expédier produit From e47accd87bc62cbae81b01e0b7b855006f31c511 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 7 Aug 2012 14:13:59 +0200 Subject: [PATCH 09/19] Qual: Removed deprecated code --- htdocs/core/menus/standard/eldy.lib.php | 6 ------ 1 file changed, 6 deletions(-) diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php index e24124c3239..3aae851a2d6 100644 --- a/htdocs/core/menus/standard/eldy.lib.php +++ b/htdocs/core/menus/standard/eldy.lib.php @@ -744,12 +744,6 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after) $newmenu->add("/societe/soc.php?action=create", $langs->trans("MenuNewThirdParty"),1); if (! $conf->use_javascript_ajax) $newmenu->add("/societe/soc.php?action=create&private=1",$langs->trans("MenuNewPrivateIndividual"),1); } - - // TODO Avoid doing dir scan - if(is_dir("societe/groupe")) - { - $newmenu->add("/societe/groupe/index.php", $langs->trans("MenuSocGroup"),1); - } } // Prospects From 068c53674169627103c4e1dafbb348c637e8f000 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 7 Aug 2012 14:24:54 +0200 Subject: [PATCH 10/19] Fix: Delete all files (PROV* when validating. --- htdocs/commande/class/commande.class.php | 2 +- htdocs/compta/facture/class/facture.class.php | 2 +- htdocs/expedition/class/expedition.class.php | 2 +- htdocs/fourn/class/fournisseur.commande.class.php | 2 +- htdocs/livraison/class/livraison.class.php | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index 76cdd822ce5..11ce0f53b4b 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -280,7 +280,7 @@ class Commande extends CommonOrder dol_syslog("Rename ok"); // Suppression ancien fichier PDF dans nouveau rep - dol_delete_file($conf->commande->dir_output.'/'.$snum.'/'.$comref.'.*'); + dol_delete_file($conf->commande->dir_output.'/'.$snum.'/'.$comref.'*.*'); } } } diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index a8e10747977..87405b5e0be 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -1724,7 +1724,7 @@ class Facture extends CommonInvoice dol_syslog("Rename ok"); // Suppression ancien fichier PDF dans nouveau rep - dol_delete_file($conf->facture->dir_output.'/'.$snumfa.'/'.$facref.'.*'); + dol_delete_file($conf->facture->dir_output.'/'.$snumfa.'/'.$facref.'*.*'); } } } diff --git a/htdocs/expedition/class/expedition.class.php b/htdocs/expedition/class/expedition.class.php index 46f469a2d42..a69c7a04873 100644 --- a/htdocs/expedition/class/expedition.class.php +++ b/htdocs/expedition/class/expedition.class.php @@ -560,7 +560,7 @@ class Expedition extends CommonObject dol_syslog("Rename ok"); // Suppression ancien fichier PDF dans nouveau rep - dol_delete_file($dirdest.'/'.$oldref.'.*'); + dol_delete_file($dirdest.'/'.$oldref.'*.*'); } } } diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index 612bfb01ee0..af36be18a44 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -367,7 +367,7 @@ class CommandeFournisseur extends CommonOrder dol_syslog("Rename ok"); // Suppression ancien fichier PDF dans nouveau rep - dol_delete_file($dirdest.'/'.$oldref.'.*'); + dol_delete_file($dirdest.'/'.$oldref.'*.*'); } } } diff --git a/htdocs/livraison/class/livraison.class.php b/htdocs/livraison/class/livraison.class.php index 0e219d07690..9d56de64299 100644 --- a/htdocs/livraison/class/livraison.class.php +++ b/htdocs/livraison/class/livraison.class.php @@ -408,7 +408,7 @@ class Livraison extends CommonObject dol_syslog("Rename ok"); // Suppression ancien fichier PDF dans nouveau rep - dol_delete_file($dirdest.'/'.$oldref.'.*'); + dol_delete_file($dirdest.'/'.$oldref.'*.*'); } } } From 1df12a701d8e9d6dffc692c12c5036969a9d2d82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Doursenaud?= Date: Tue, 7 Aug 2012 14:10:16 +0200 Subject: [PATCH 11/19] Fix: Display correct user in project tasks' time spent list Use a local object rather than modifying the global $user object (sic!) --- htdocs/projet/tasks/time.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/htdocs/projet/tasks/time.php b/htdocs/projet/tasks/time.php index 2e0d8b66984..b3738abc8d0 100644 --- a/htdocs/projet/tasks/time.php +++ b/htdocs/projet/tasks/time.php @@ -403,17 +403,17 @@ if ($id > 0 || ! empty($ref)) print ''; // User - $user->id = $task_time->fk_user; + $userstatic = new User($task_time->fk_user); print ''; if ($_GET['action'] == 'editline' && $_GET['lineid'] == $task_time->rowid) { - print $form->select_users($user->id,'userid_line'); + print $form->select_users($userstatic->id,'userid_line'); } else { - $user->nom = $task_time->name; - $user->prenom = $task_time->firstname; - print $user->getNomUrl(1); + $userstatic->nom = $task_time->name; + $userstatic->prenom = $task_time->firstname; + print $userstatic->getNomUrl(1); } print ''; From 040c675de64a813a54bd45d2587bc8c6919d03ac Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 7 Aug 2012 14:54:56 +0200 Subject: [PATCH 12/19] Fix: Do not overwrite global $user information --- htdocs/projet/tasks/time.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/htdocs/projet/tasks/time.php b/htdocs/projet/tasks/time.php index 2e0d8b66984..68d2ced3d7e 100644 --- a/htdocs/projet/tasks/time.php +++ b/htdocs/projet/tasks/time.php @@ -170,6 +170,7 @@ if (! empty($project_ref) && ! empty($withproject)) llxHeader("",$langs->trans("Task")); $form = new Form($db); +$userstatic = new User($db); if ($id > 0 || ! empty($ref)) { @@ -403,17 +404,17 @@ if ($id > 0 || ! empty($ref)) print ''; // User - $user->id = $task_time->fk_user; print ''; if ($_GET['action'] == 'editline' && $_GET['lineid'] == $task_time->rowid) { - print $form->select_users($user->id,'userid_line'); + print $form->select_users($task_time->fk_user,'userid_line'); } else { - $user->nom = $task_time->name; - $user->prenom = $task_time->firstname; - print $user->getNomUrl(1); + $userstatic->id = $task_time->fk_user; + $userstatic->nom = $task_time->name; + $userstatic->prenom = $task_time->firstname; + print $userstatic->getNomUrl(1); } print ''; From 5ddd982f6e06dc1109f5eadf8992d8af9e3250db Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 7 Aug 2012 16:55:14 +0200 Subject: [PATCH 13/19] New: If field "signature" is filled into user table, text is added at end of predefined email texts. If option MAIL_DO_NOT_USE_SIGN is on, this feautre is disabled. --- ChangeLog | 3 +++ htdocs/core/class/html.formmail.class.php | 5 +++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 63952957652..57263615ebb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,9 @@ English Dolibarr ChangeLog ***** ChangeLog for 3.3 compared to 3.2 ***** For users: +- New: If field "signature" is filled into user table, text is added + at end of predefined email texts. If option MAIL_DO_NOT_USE_SIGN is on, this + feautre is disabled. - New: Add link "Back to list" on all cards. - New: After first install, warning are visible onto mandatory setup not configured. Show also total number of activated modules. diff --git a/htdocs/core/class/html.formmail.class.php b/htdocs/core/class/html.formmail.class.php index 8347725fd32..597d143f6ea 100644 --- a/htdocs/core/class/html.formmail.class.php +++ b/htdocs/core/class/html.formmail.class.php @@ -601,12 +601,13 @@ class FormMail { if (! isset($this->ckeditortoolbar)) $this->ckeditortoolbar = 'dolibarr_notes'; - if(! empty($conf->global->MAIL_USE_SIGN) && $this->fromid > 0) + if (empty($conf->global->MAIL_DO_NOT_USE_SIGN) && $this->fromid > 0) { $fuser=new User($this->db); $fuser->fetch($this->fromid); - if(!empty($fuser->signature)) { + if(! empty($fuser->signature)) + { $defaultmessage.=dol_htmlentitiesbr_decode($fuser->signature); } } From 30444da6b92f7d313a30806f75bf3d678d2b5b65 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 7 Aug 2012 18:55:55 +0200 Subject: [PATCH 14/19] Fix: autoselect when it should not --- htdocs/core/class/html.form.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 29433cfb63b..d990ce99586 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -1424,7 +1424,7 @@ class Form $outval=''; $opt = '