diff --git a/ChangeLog b/ChangeLog index 3d54d0197c7..8601ff5c2bc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -9,6 +9,7 @@ to make a backup of your database before making upgrade. For users: - New: Each user can remove/add its own boxes. +- New: Add signature at end of predefined email text. - New: Can use personalized fields of products/services. - New: Can attach files on social contributions. - New: Show payments terms and conditions onto muscadet template. diff --git a/build/debian/dolibarr.postinst b/build/debian/dolibarr.postinst index 2276c287c51..436dbe46b70 100644 --- a/build/debian/dolibarr.postinst +++ b/build/debian/dolibarr.postinst @@ -83,7 +83,7 @@ case "$1" in chown -R root:www-data $installconfig chmod -R 660 $installconfig - if [ ! -f $config ] + if [ ! -s $config ] then # Create an empty conf.php with permission to web server echo Create empty file $config diff --git a/build/launchpad/README b/build/launchpad/README index c27f3403a5f..cac4aa625b3 100644 --- a/build/launchpad/README +++ b/build/launchpad/README @@ -61,5 +61,25 @@ DEBEMAIL="" sudo pbuilder build /_.dsc +# To get/download package: +Add signing key of the Launchpad repository: +> gpg --keyserver keyserver.ubuntu.com --recv-key A38BF8FD +> sudo apt-key add ~/.gnupg/pubring.gpg + +Add Dolibarr Launchpad repository to your system setup by adding the two lines to /etc/apt/sources.list +For the development snapshot version: +deb http://ppa.launchpad.net/eldy/dolibarr-dev/ubuntu precise main +deb-src http://ppa.launchpad.net/eldy/dolibarr-dev/ubuntu precise main +For the stable version: +deb http://ppa.launchpad.net/eldy/dolibarr-stable/ubuntu precise main +deb-src http://ppa.launchpad.net/eldy/dolibarr-stable/ubuntu precise main + +Update your package cache: +> apt-get update + +Install Dolibarr: +> apt-get install dolibarr + + diff --git a/doc/images/dolibarr_120x90.png b/doc/images/dolibarr_120x90.png index c0aa357f41b..070bb00ddf6 100644 Binary files a/doc/images/dolibarr_120x90.png and b/doc/images/dolibarr_120x90.png differ diff --git a/doc/images/dolibarr_124x124.png b/doc/images/dolibarr_124x124.png new file mode 100644 index 00000000000..be80eac84b9 Binary files /dev/null and b/doc/images/dolibarr_124x124.png differ diff --git a/doc/images/dolibarr_125x125.png b/doc/images/dolibarr_125x125.png deleted file mode 100644 index 74588c18a5a..00000000000 Binary files a/doc/images/dolibarr_125x125.png and /dev/null differ diff --git a/doc/images/dolibarr_192x192.png b/doc/images/dolibarr_192x192.png deleted file mode 100644 index c151d46fbcd..00000000000 Binary files a/doc/images/dolibarr_192x192.png and /dev/null differ diff --git a/doc/images/dolibarr_256x256.png b/doc/images/dolibarr_256x256.png new file mode 100644 index 00000000000..c408baab9db Binary files /dev/null and b/doc/images/dolibarr_256x256.png differ diff --git a/doc/images/dolibarr_48x48.png b/doc/images/dolibarr_48x48.png index a3aa237d1cb..070f749fa88 100644 Binary files a/doc/images/dolibarr_48x48.png and b/doc/images/dolibarr_48x48.png differ diff --git a/doc/images/dolibarr_73x73.png b/doc/images/dolibarr_73x73.png index 607def2ec1b..13d63555ca5 100755 Binary files a/doc/images/dolibarr_73x73.png and b/doc/images/dolibarr_73x73.png differ diff --git a/doc/images/dolibarr_logo.jpg b/doc/images/dolibarr_logo.jpg new file mode 100644 index 00000000000..6025ca9d201 Binary files /dev/null and b/doc/images/dolibarr_logo.jpg differ diff --git a/doc/images/dolibarr_logo.png b/doc/images/dolibarr_logo.png index 0bca8326b5c..5e4d2f69b4e 100755 Binary files a/doc/images/dolibarr_logo.png and b/doc/images/dolibarr_logo.png differ diff --git a/doc/images/dolibarr_logo1.jpg b/doc/images/dolibarr_logo1.jpg deleted file mode 100644 index 357b2d570f7..00000000000 Binary files a/doc/images/dolibarr_logo1.jpg and /dev/null differ diff --git a/doc/images/dolibarr_logo1.png b/doc/images/dolibarr_logo1.png deleted file mode 100644 index af9c89885b7..00000000000 Binary files a/doc/images/dolibarr_logo1.png and /dev/null differ diff --git a/doc/images/dolibarr_logo2.png b/doc/images/dolibarr_logo2.png deleted file mode 100644 index 8cb195b93db..00000000000 Binary files a/doc/images/dolibarr_logo2.png and /dev/null differ diff --git a/htdocs/admin/boxes.php b/htdocs/admin/boxes.php index 8b2a12a7217..5e0a8b1ffc4 100644 --- a/htdocs/admin/boxes.php +++ b/htdocs/admin/boxes.php @@ -169,14 +169,25 @@ if ($action == 'switch') $objto=new ModeleBoxes($db); $objto->fetch($_GET["switchto"]); + $resultupdatefrom=0; + $resultupdateto=0; if (is_object($objfrom) && is_object($objto)) { - $sql="UPDATE ".MAIN_DB_PREFIX."boxes set box_order='".$objto->box_order."' WHERE rowid=".$objfrom->rowid; - //print "xx".$sql; + $newfirst=$objto->box_order; + $newsecond=$objfrom->box_order; + if ($newfirst == $newsecond) + { + $newsecondchar=preg_replace('/[0-9]+/','',$newsecond); + $newsecondnum=preg_replace('/[a-zA-Z]+/','',$newsecond); + $newsecond=sprintf("%s%02d",$newsecondchar?$newsecondchar:'A',$newsecondnum+1); + } + $sql="UPDATE ".MAIN_DB_PREFIX."boxes set box_order='".$newfirst."' WHERE rowid=".$objfrom->rowid; + dol_syslog($sql); $resultupdatefrom = $db->query($sql); if (! $resultupdatefrom) { dol_print_error($db); } - $sql="UPDATE ".MAIN_DB_PREFIX."boxes set box_order='".$objfrom->box_order."' WHERE rowid=".$objto->rowid; - //print "xx".$sql; + + $sql="UPDATE ".MAIN_DB_PREFIX."boxes set box_order='".$newsecond."' WHERE rowid=".$objto->rowid; + dol_syslog($sql); $resultupdateto = $db->query($sql); if (! $resultupdateto) { dol_print_error($db); } } diff --git a/htdocs/admin/mails.php b/htdocs/admin/mails.php index 8e5a7b1afc2..0d0f373ab7f 100644 --- a/htdocs/admin/mails.php +++ b/htdocs/admin/mails.php @@ -162,8 +162,7 @@ if (! empty($_POST['removedfile']) || ! empty($_POST['removedfilehtml'])) /* * Send mail */ -if (($action == 'send' || $action == 'sendhtml') -&& ! $_POST['addfile'] && ! $_POST['addfilehtml'] && ! $_POST["removedfile"] && ! $_POST['cancel']) +if (($action == 'send' || $action == 'sendhtml') && ! $_POST['addfile'] && ! $_POST['addfilehtml'] && ! $_POST["removedfile"] && ! $_POST['cancel']) { $error=0; @@ -212,9 +211,18 @@ if (($action == 'send' || $action == 'sendhtml') require_once(DOL_DOCUMENT_ROOT."/core/class/CMailFile.class.php"); $mailfile = new CMailFile( - $subject, $sendto, $email_from, $body, - $filepath, $mimetype, $filename, - $sendtocc, $sendtoccc, $deliveryreceipt, $msgishtml, $errors_to + $subject, + $sendto, + $email_from, + $body, + $filepath, + $mimetype, + $filename, + $sendtocc, + $sendtoccc, + $deliveryreceipt, + $msgishtml, + $errors_to ); $result=$mailfile->sendfile(); diff --git a/htdocs/admin/propal.php b/htdocs/admin/propal.php index 4e186d24db9..e5f97fe51a9 100644 --- a/htdocs/admin/propal.php +++ b/htdocs/admin/propal.php @@ -46,8 +46,8 @@ $value = GETPOST('value','alpha'); if ($action == 'updateMask') { - $maskconstpropal=GETPOST("maskconstpropal"); - $maskpropal=GETPOST("maskpropal"); + $maskconstpropal=GETPOST('maskconstpropal','alpha'); + $maskpropal=GETPOST('maskpropal','alpha'); if ($maskconstpropal) $res = dolibarr_set_const($db,$maskconstpropal,$maskpropal,'chaine',0,'',$conf->entity); if (! $res > 0) $error++; @@ -64,7 +64,7 @@ if ($action == 'updateMask') if ($action == 'specimen') { - $modele=GETPOST("module"); + $modele=GETPOST('module','alpha'); $propal = new Propal($db); $propal->initAsSpecimen(); @@ -109,7 +109,7 @@ if ($action == 'specimen') if ($action == 'set_PROPALE_DRAFT_WATERMARK') { - $draft = GETPOST("PROPALE_DRAFT_WATERMARK"); + $draft = GETPOST('PROPALE_DRAFT_WATERMARK','alpha'); $res = dolibarr_set_const($db, "PROPALE_DRAFT_WATERMARK",trim($draft),'chaine',0,'',$conf->entity); if (! $res > 0) $error++; @@ -126,7 +126,7 @@ if ($action == 'set_PROPALE_DRAFT_WATERMARK') if ($action == 'set_PROPALE_FREE_TEXT') { - $freetext = GETPOST("PROPALE_FREE_TEXT"); + $freetext = GETPOST('PROPALE_FREE_TEXT','alpha'); $res = dolibarr_set_const($db, "PROPALE_FREE_TEXT",$freetext,'chaine',0,'',$conf->entity); @@ -183,8 +183,8 @@ if ($action == 'setclassifiedinvoiced') if ($action == 'set') { - $label = GETPOST("label"); - $scandir = GETPOST("scandir"); + $label = GETPOST('label','alpha'); + $scandir = GETPOST('scandir','alpha'); $type='propal'; $sql = "INSERT INTO ".MAIN_DB_PREFIX."document_model (nom, type, entity, libelle, description)"; @@ -210,8 +210,8 @@ else if ($action == 'del') else if ($action == 'setdoc') { - $label = GETPOST("label"); - $scandir = GETPOST("scandir"); + $label = GETPOST('label','alpha'); + $scandir = GETPOST('scandir','alpha'); $db->begin(); diff --git a/htdocs/admin/tools/export.php b/htdocs/admin/tools/export.php index 54a2a19410b..644af28bbf6 100644 --- a/htdocs/admin/tools/export.php +++ b/htdocs/admin/tools/export.php @@ -102,7 +102,7 @@ $time_start = time(); // MYSQL if ($what == 'mysql') { - $cmddump=$_POST["mysqldump"]; + $cmddump=GETPOST("mysqldump"); // Do not sanitize here with 'alpha', will be sanitize later by escapeshellarg if ($cmddump) { dolibarr_set_const($db, 'SYSTEMTOOLS_MYSQLDUMP', $cmddump,'chaine',0,'',$conf->entity); @@ -111,7 +111,7 @@ if ($what == 'mysql') $outputdir = $conf->admin->dir_output.'/backup'; $outputfile = $outputdir.'/'.$file; // for compression format, we add extension - $compression=isset($_POST['compression']) ? $_POST['compression'] : 'none'; + $compression=GETPOST('compression') ? GETPOST('compression','alpha') : 'none'; if ($compression == 'gz') $outputfile.='.gz'; if ($compression == 'bz') $outputfile.='.bz2'; $outputerror = $outputfile.'.err'; @@ -125,28 +125,28 @@ if ($what == 'mysql') $param=$dolibarr_main_db_name." -h ".$dolibarr_main_db_host; $param.=" -u ".$dolibarr_main_db_user; if (! empty($dolibarr_main_db_port)) $param.=" -P ".$dolibarr_main_db_port; - if (! $_POST["use_transaction"]) $param.=" -l --single-transaction"; - if ($_POST["disable_fk"]) $param.=" -K"; - if ($_POST["sql_compat"] && $_POST["sql_compat"] != 'NONE') $param.=" --compatible=".$_POST["sql_compat"]; - if ($_POST["drop_database"]) $param.=" --add-drop-database"; - if ($_POST["sql_structure"]) + if (! GETPOST("use_transaction")) $param.=" -l --single-transaction"; + if (GETPOST("disable_fk")) $param.=" -K"; + if (GETPOST("sql_compat") && GETPOST("sql_compat") != 'NONE') $param.=" --compatible=".GETPOST("sql_compat","alpha"); + if (GETPOST("drop_database")) $param.=" --add-drop-database"; + if (GETPOST("sql_structure")) { - if ($_POST["drop"]) $param.=" --add-drop-table"; + if (GETPOST("drop")) $param.=" --add-drop-table"; } else { $param.=" -t"; } - if ($_POST["disable-add-locks"]) $param.=" --add-locks=FALSE"; - if ($_POST["sql_data"]) + if (GETPOST("disable-add-locks")) $param.=" --add-locks=FALSE"; + if (GETPOST("sql_data")) { $param.=" --tables"; - if ($_POST["showcolumns"]) $param.=" -c"; - if ($_POST["extended_ins"]) $param.=" -e"; + if (GETPOST("showcolumns")) $param.=" -c"; + if (GETPOST("extended_ins")) $param.=" -e"; else $param.=" --skip-extended-insert"; - if ($_POST["delayed"]) $param.=" --delayed-insert"; - if ($_POST["sql_ignore"]) $param.=" --insert-ignore"; - if ($_POST["hexforbinary"]) $param.=" --hex-blob"; + if (GETPOST("delayed")) $param.=" --delayed-insert"; + if (GETPOST("sql_ignore")) $param.=" --insert-ignore"; + if (GETPOST("hexforbinary")) $param.=" --hex-blob"; } else { @@ -244,7 +244,7 @@ if ($what == 'mysqlnobin') $outputfile = $outputdir.'/'.$file; $outputfiletemp = $outputfile.'-TMP.sql'; // for compression format, we add extension - $compression=isset($_POST['compression']) ? $_POST['compression'] : 'none'; + $compression=GETPOST('compression') ? GETPOST('compression','alpha') : 'none'; if ($compression == 'gz') $outputfile.='.gz'; if ($compression == 'bz') $outputfile.='.bz2'; $outputerror = $outputfile.'.err'; @@ -265,7 +265,7 @@ if ($what == 'mysqlnobin') // POSTGRESQL if ($what == 'postgresql') { - $cmddump=$_POST["postgresqldump"]; + $cmddump=GETPOST("postgresqldump"); // Do not sanitize here with 'alpha', will be sanitize later by escapeshellarg if ($cmddump) { dolibarr_set_const($db, 'SYSTEMTOOLS_POSTGRESQLDUMP', $cmddump,'chaine',0,'',$conf->entity); @@ -274,7 +274,7 @@ if ($what == 'postgresql') $outputdir = $conf->admin->dir_output.'/backup'; $outputfile = $outputdir.'/'.$file; // for compression format, we add extension - $compression=isset($_POST['compression']) ? $_POST['compression'] : 'none'; + $compression=GETPOST('compression') ? GETPOST('compression','alpha') : 'none'; if ($compression == 'gz') $outputfile.='.gz'; if ($compression == 'bz') $outputfile.='.bz2'; $outputerror = $outputfile.'.err'; @@ -288,17 +288,17 @@ if ($what == 'postgresql') $param=" --no-tablespaces --inserts -h ".$dolibarr_main_db_host; $param.=" -U ".$dolibarr_main_db_user; if (! empty($dolibarr_main_db_port)) $param.=" -p ".$dolibarr_main_db_port; - if ($_POST["sql_compat"] && $_POST["sql_compat"] == 'ANSI') $param.=" --disable-dollar-quoting"; - if ($_POST["drop_database"]) $param.=" -c -C"; - if ($_POST["sql_structure"]) + if (GETPOST("sql_compat") && GETPOST("sql_compat") == 'ANSI') $param.=" --disable-dollar-quoting"; + if (GETPOST("drop_database")) $param.=" -c -C"; + if (GETPOST("sql_structure")) { - if ($_POST["drop"]) $param.=" --add-drop-table"; - if (empty($_POST["sql_data"])) $param.=" -s"; + if (GETPOST("drop")) $param.=" --add-drop-table"; + if (! GETPOST("sql_data")) $param.=" -s"; } - if ($_POST["sql_data"]) + if (GETPOST("sql_data")) { - if (empty($_POST["sql_structure"])) $param.=" -a"; - if ($_POST["showcolumns"]) $param.=" -c"; + if (! GETPOST("sql_structure")) $param.=" -a"; + if (GETPOST("showcolumns")) $param.=" -c"; } $param.=' -f "'.$outputfile.'"'; //if ($compression == 'none') diff --git a/htdocs/cashdesk/affContenu.php b/htdocs/cashdesk/affContenu.php index dc5c99daa22..a4e3db7863b 100644 --- a/htdocs/cashdesk/affContenu.php +++ b/htdocs/cashdesk/affContenu.php @@ -47,8 +47,8 @@ print '
'; require ('tpl/liste_articles.tpl.php'); -$obj_facturation->prix_total_ht($lst_total_ht); -$obj_facturation->prix_total_ttc($lst_total_ttc); +$obj_facturation->prixTotalHt($lst_total_ht); +$obj_facturation->prixTotalTtc($lst_total_ttc); print '
'; diff --git a/htdocs/cashdesk/class/Facturation.class.php b/htdocs/cashdesk/class/Facturation.class.php index fcad5848c17..eff1cfbf590 100644 --- a/htdocs/cashdesk/class/Facturation.class.php +++ b/htdocs/cashdesk/class/Facturation.class.php @@ -253,9 +253,9 @@ class Facturation $this->montantRendu('RESET'); $this->paiementLe('RESET'); - $this->prix_total_ht('RESET'); - $this->montant_tva('RESET'); - $this->prix_total_ttc('RESET'); + $this->prixTotalHt('RESET'); + $this->montantTva('RESET'); + $this->prixTotalTtc('RESET'); } @@ -588,7 +588,7 @@ class Facturation * @param int $aTotalHt Total amount * @return int Total amount */ - public function prix_total_ht( $aTotalHt=null ) + public function prixTotalHt( $aTotalHt=null ) { if ( !$aTotalHt ) { @@ -611,7 +611,7 @@ class Facturation * @param int $aMontantTva Amount vat * @return int Amount vat */ - public function montant_tva( $aMontantTva=null ) + public function montantTva( $aMontantTva=null ) { if ( !$aMontantTva ) { @@ -635,7 +635,7 @@ class Facturation * @param int $aTotalTtc Amount ttc * @return int Amount ttc */ - public function prix_total_ttc( $aTotalTtc=null ) + public function prixTotalTtc( $aTotalTtc=null ) { if ( !$aTotalTtc ) { diff --git a/htdocs/cashdesk/tpl/facturation1.tpl.php b/htdocs/cashdesk/tpl/facturation1.tpl.php index 6963695c78e..59c3a6fb65d 100644 --- a/htdocs/cashdesk/tpl/facturation1.tpl.php +++ b/htdocs/cashdesk/tpl/facturation1.tpl.php @@ -169,7 +169,7 @@ $langs->load("cashdesk"); trans("TotalTicket"); ?>trans("Received"); ?>trans("Change"); ?> - + diff --git a/htdocs/cashdesk/tpl/liste_articles.tpl.php b/htdocs/cashdesk/tpl/liste_articles.tpl.php index 79e7359cc10..cf9fd00cbe6 100644 --- a/htdocs/cashdesk/tpl/liste_articles.tpl.php +++ b/htdocs/cashdesk/tpl/liste_articles.tpl.php @@ -68,7 +68,7 @@ else } $obj_facturation->calculTotaux(); -$total_ttc = $obj_facturation->prix_total_ttc(); +$total_ttc = $obj_facturation->prixTotalTtc(); echo ('

'.$langs->trans("Total").' : '.price2num($total_ttc, 'MT').' '.$conf->currency.'

'."\n"); ?> diff --git a/htdocs/cashdesk/tpl/ticket.tpl.php b/htdocs/cashdesk/tpl/ticket.tpl.php index a3a055ac082..52a58a2bad8 100644 --- a/htdocs/cashdesk/tpl/ticket.tpl.php +++ b/htdocs/cashdesk/tpl/ticket.tpl.php @@ -138,9 +138,9 @@ print $object->ref; \n"; -echo '\n"; -echo '\n"; +echo '\n"; +echo '\n"; +echo '\n"; ?>
'.$langs->trans("TotalHT").''.price2num($obj_facturation->prix_total_ht(),'MT')." ".$conf->currency."
'.$langs->trans("TotalVAT").''.price2num($obj_facturation->montant_tva(),'MT')." ".$conf->currency."
'.$langs->trans("TotalTTC").''.price2num($obj_facturation->prix_total_ttc(),'MT')." ".$conf->currency."
'.$langs->trans("TotalHT").''.price2num($obj_facturation->prixTotalHt(),'MT')." ".$conf->currency."
'.$langs->trans("TotalVAT").''.price2num($obj_facturation->montantTva(),'MT')." ".$conf->currency."
'.$langs->trans("TotalTTC").''.price2num($obj_facturation->prixTotalTtc(),'MT')." ".$conf->currency."
diff --git a/htdocs/cashdesk/tpl/validation1.tpl.php b/htdocs/cashdesk/tpl/validation1.tpl.php index fdcda6e3e7c..5cca10af8eb 100644 --- a/htdocs/cashdesk/tpl/validation1.tpl.php +++ b/htdocs/cashdesk/tpl/validation1.tpl.php @@ -26,12 +26,12 @@ $langs->load("main"); - + montant_tva() ) { + if ( $obj_facturation->montantTva() ) { - echo (''); + echo (''); } else @@ -41,7 +41,7 @@ $langs->load("main"); } ?> - + "; print ''; print ""; print ''; print ""; @@ -295,7 +296,7 @@ if ($action == 'create') print ''; print ''; @@ -306,7 +307,7 @@ if ($action == 'create') print ''; print ''; } @@ -353,13 +354,13 @@ else if ($id) // Type print ""; print ''; // Who print ""; print ''; // Date diff --git a/htdocs/compta/deplacement/list.php b/htdocs/compta/deplacement/list.php index 881fb54cbc0..ae672f499c3 100755 --- a/htdocs/compta/deplacement/list.php +++ b/htdocs/compta/deplacement/list.php @@ -3,6 +3,7 @@ * Copyright (C) 2004-2012 Laurent Destailleur * Copyright (C) 2004 Eric Seigne * Copyright (C) 2005-2011 Regis Houssin + * Copyright (C) 2012 Juanjo Menent * * 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 @@ -47,7 +48,7 @@ if (! $sortorder) $sortorder="DESC"; if (! $sortfield) $sortfield="d.dated"; $limit = $conf->liste_limit; -$search_ref=GETPOST('search_ref'); +$search_ref=GETPOST('search_ref','alpha'); /* diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index 8d9e9305d16..00af32220d7 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -3182,7 +3182,7 @@ else $formmail->withcancel=1; // Tableau des substitutions $formmail->substit['__FACREF__']=$object->ref; - $formmail->substit['__SIGNATURE__']=''; + $formmail->substit['__SIGNATURE__']=$user->signature; $formmail->substit['__PERSONALIZED__']=''; // Tableau des parametres complementaires du post $formmail->param['action']=$action; diff --git a/htdocs/core/ajax/ajaxdirpreview.php b/htdocs/core/ajax/ajaxdirpreview.php index d2130845bf7..6b6277bb3fa 100644 --- a/htdocs/core/ajax/ajaxdirpreview.php +++ b/htdocs/core/ajax/ajaxdirpreview.php @@ -141,9 +141,10 @@ $type='directory'; // This test if file exists should be useless. We keep it to find bug more easily if (! dol_is_dir($upload_dir)) { - $langs->load("install"); +// dol_mkdir($upload_dir); +/* $langs->load("install"); dol_print_error(0,$langs->trans("ErrorDirDoesNotExists",$upload_dir)); - exit; + exit;*/ } print ''."\n"; diff --git a/htdocs/core/ajax/ajaxdirtree.php b/htdocs/core/ajax/ajaxdirtree.php index e3f0f17850c..2896d5543c0 100644 --- a/htdocs/core/ajax/ajaxdirtree.php +++ b/htdocs/core/ajax/ajaxdirtree.php @@ -152,7 +152,7 @@ if( file_exists($fullpathselecteddir) ) print ''; // Edit link - print ''; + print ''; // Add link //print ''; diff --git a/htdocs/core/menus/smartphone/smartphone_frontoffice.php b/htdocs/core/menus/smartphone/smartphone_frontoffice.php index 0739e894db3..521b7467d07 100755 --- a/htdocs/core/menus/smartphone/smartphone_frontoffice.php +++ b/htdocs/core/menus/smartphone/smartphone_frontoffice.php @@ -48,6 +48,7 @@ class MenuSmart * Show menu * * @param string $limitmenuto To limit menu to a top or left menu value + * @return void */ function showmenu($limitmenuto) { diff --git a/htdocs/core/modules/facture/modules_facture.php b/htdocs/core/modules/facture/modules_facture.php index 43b0dae3c33..973a8461799 100644 --- a/htdocs/core/modules/facture/modules_facture.php +++ b/htdocs/core/modules/facture/modules_facture.php @@ -147,15 +147,15 @@ abstract class ModeleNumRefFactures /** * Create a document onto disk according to template module. * - * @param DoliDB $db Database handler - * @param Object $object Object invoice - * @param string $modele Force template to use ('' to not force) - * @param Translate $outputlangs objet lang a utiliser pour traduction - * @param int $hidedetails Hide details of lines - * @param int $hidedesc Hide description - * @param int $hideref Hide ref - * @param HookManager $hookmanager Hook manager instance - * @return int <0 if KO, >0 if OK + * @param DoliDB $db Database handler + * @param Object $object Object invoice + * @param string $modele Force template to use ('' to not force) + * @param Translate $outputlangs objet lang a utiliser pour traduction + * @param int $hidedetails Hide details of lines + * @param int $hidedesc Hide description + * @param int $hideref Hide ref + * @param HookManager $hookmanager Hook manager instance + * @return int <0 if KO, >0 if OK */ function facture_pdf_create($db, $object, $modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0, $hookmanager=false) { diff --git a/htdocs/core/modules/fichinter/modules_fichinter.php b/htdocs/core/modules/fichinter/modules_fichinter.php index c14c4878821..de1a1c79ee2 100644 --- a/htdocs/core/modules/fichinter/modules_fichinter.php +++ b/htdocs/core/modules/fichinter/modules_fichinter.php @@ -30,8 +30,7 @@ require_once(DOL_DOCUMENT_ROOT."/core/class/commondocgenerator.class.php"); /** - * \class ModelePDFFicheinter - * \brief Classe mere des modeles de fiche intervention + * Parent class to manage intervention document templates */ abstract class ModelePDFFicheinter extends CommonDocGenerator { @@ -149,6 +148,10 @@ abstract class ModeleNumRefFicheinter * @param Object $object Object fichinter * @param string $modele force le modele a utiliser ('' par defaut) * @param Translate $outputlangs objet lang a utiliser pour traduction + * @param int $hidedetails Hide details of lines + * @param int $hidedesc Hide description + * @param int $hideref Hide ref + * @param HookManager $hookmanager Hook manager instance * @return int 0 if KO, 1 if OK */ function fichinter_create($db, $object, $modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0, $hookmanager=false) diff --git a/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php b/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php index 8d32bc126f0..0fdf0884ea0 100755 --- a/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php +++ b/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php @@ -741,7 +741,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices $y+=3; $row = $this->db->fetch_object($resql); - $pdf->SetXY($tab3_posx, $tab3_top+$y ); + $pdf->SetXY($tab3_posx, $tab3_top+$y); $pdf->MultiCell(20, 3, dol_print_date($this->db->jdate($row->date),'day',false,$outputlangs,true), 0, 'L', 0); $pdf->SetXY($tab3_posx+21, $tab3_top+$y); $pdf->MultiCell(20, 3, price($row->amount), 0, 'L', 0); diff --git a/htdocs/core/triggers/interface_20_all_Logevents.class.php b/htdocs/core/triggers/interface_20_all_Logevents.class.php index 425b1d2983c..6e757345df6 100755 --- a/htdocs/core/triggers/interface_20_all_Logevents.class.php +++ b/htdocs/core/triggers/interface_20_all_Logevents.class.php @@ -17,15 +17,14 @@ */ /** - * \file htdocs/core/triggers/interface_20_all_Logevents.class.php - * \ingroup core - * \brief Trigger file for + * \file htdocs/core/triggers/interface_20_all_Logevents.class.php + * \ingroup core + * \brief Trigger file for */ /** - * \class InterfaceLogevents - * \brief Class of triggers for security events + * Class of triggers for security events */ class InterfaceLogevents { diff --git a/htdocs/core/triggers/interface_20_modPaypal_PaypalWorkflow.class.php b/htdocs/core/triggers/interface_20_modPaypal_PaypalWorkflow.class.php index 2d7b9ef6ee0..aacd600f478 100755 --- a/htdocs/core/triggers/interface_20_modPaypal_PaypalWorkflow.class.php +++ b/htdocs/core/triggers/interface_20_modPaypal_PaypalWorkflow.class.php @@ -23,8 +23,7 @@ /** - * \class InterfacePaypalWorkflow - * \brief Class of triggers for paypal module + * Class of triggers for paypal module */ class InterfacePaypalWorkflow { diff --git a/htdocs/core/triggers/interface_20_modWorkflow_WorkflowManager.class.php b/htdocs/core/triggers/interface_20_modWorkflow_WorkflowManager.class.php index cac90487179..3c914faf0e1 100755 --- a/htdocs/core/triggers/interface_20_modWorkflow_WorkflowManager.class.php +++ b/htdocs/core/triggers/interface_20_modWorkflow_WorkflowManager.class.php @@ -17,15 +17,14 @@ */ /** - * \file htdocs/core/triggers/interface_20_modWorkflow_WorkflowManager.class.php - * \ingroup core - * \brief Trigger file for workflows + * \file htdocs/core/triggers/interface_20_modWorkflow_WorkflowManager.class.php + * \ingroup core + * \brief Trigger file for workflows */ /** - * \class InterfaceWorkflowManager - * \brief Class of triggers for workflow module + * Class of triggers for workflow module */ class InterfaceWorkflowManager @@ -95,7 +94,6 @@ class InterfaceWorkflowManager * @param User $user Object user * @param Translate $langs Object langs * @param conf $conf Object conf - * @param string $entity Value for instance of data (Always 1 except if module MultiCompany is installed) * @return int <0 if KO, 0 if no triggered ran, >0 if OK */ function run_trigger($action,$object,$user,$langs,$conf) diff --git a/htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php b/htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php index 435b8afa554..8e0641e594f 100755 --- a/htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php +++ b/htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php @@ -25,8 +25,7 @@ /** - * \class InterfaceActionsAuto - * \brief Class of triggered functions for agenda module + * Class of triggered functions for agenda module */ class InterfaceActionsAuto { diff --git a/htdocs/core/triggers/interface_50_modLdap_Ldapsynchro.class.php b/htdocs/core/triggers/interface_50_modLdap_Ldapsynchro.class.php index 346ade67d03..2e2bc3642ab 100755 --- a/htdocs/core/triggers/interface_50_modLdap_Ldapsynchro.class.php +++ b/htdocs/core/triggers/interface_50_modLdap_Ldapsynchro.class.php @@ -16,16 +16,15 @@ */ /** - * \file htdocs/core/triggers/interface_50_modLdap_Ldapsynchro.class.php - * \ingroup core - * \brief Fichier de gestion des triggers LDAP + * \file htdocs/core/triggers/interface_50_modLdap_Ldapsynchro.class.php + * \ingroup core + * \brief Fichier de gestion des triggers LDAP */ require_once (DOL_DOCUMENT_ROOT."/core/class/ldap.class.php"); /** - * \class InterfaceLdapsynchro - * \brief Class of triggers for ldap module + * Class of triggers for ldap module */ class InterfaceLdapsynchro { diff --git a/htdocs/core/triggers/interface_50_modNotification_Notification.class.php b/htdocs/core/triggers/interface_50_modNotification_Notification.class.php index 4ea8db0e2ce..cf47057966d 100755 --- a/htdocs/core/triggers/interface_50_modNotification_Notification.class.php +++ b/htdocs/core/triggers/interface_50_modNotification_Notification.class.php @@ -17,15 +17,14 @@ */ /** - * \file htdocs/core/triggers/interface_50_modNotification_Notification.class.php - * \ingroup notification - * \brief File of class of triggers for notification module + * \file htdocs/core/triggers/interface_50_modNotification_Notification.class.php + * \ingroup notification + * \brief File of class of triggers for notification module */ /** - * \class InterfaceNotification - * \brief Class of triggers for notification module + * Class of triggers for notification module */ class InterfaceNotification { diff --git a/htdocs/core/triggers/interface_90_all_Demo.class.php-NORUN b/htdocs/core/triggers/interface_90_all_Demo.class.php-NORUN index 15ee6544a94..68789b03878 100755 --- a/htdocs/core/triggers/interface_90_all_Demo.class.php-NORUN +++ b/htdocs/core/triggers/interface_90_all_Demo.class.php-NORUN @@ -17,22 +17,21 @@ */ /** - * \file htdocs/core/triggers/interface_90_all_Demo.class.php - * \ingroup core - * \brief Fichier de demo de personalisation des actions du workflow - * \remarks Son propre fichier d'actions peut etre cree par recopie de celui-ci: - * - Le nom du fichier doit etre: interface_99_modMymodule_Mytrigger.class.php - * ou: interface_99_all_Mytrigger.class.php - * - Le fichier doit rester stocke dans core/triggers - * - Le nom de la classe doit etre InterfaceMytrigger - * - Le nom de la methode constructeur doit etre InterfaceMytrigger - * - Le nom de la propriete name doit etre Mytrigger + * \file htdocs/core/triggers/interface_90_all_Demo.class.php + * \ingroup core + * \brief Fichier de demo de personalisation des actions du workflow + * \remarks Son propre fichier d'actions peut etre cree par recopie de celui-ci: + * - Le nom du fichier doit etre: interface_99_modMymodule_Mytrigger.class.php + * ou: interface_99_all_Mytrigger.class.php + * - Le fichier doit rester stocke dans core/triggers + * - Le nom de la classe doit etre InterfaceMytrigger + * - Le nom de la methode constructeur doit etre InterfaceMytrigger + * - Le nom de la propriete name doit etre Mytrigger */ /** - * \class InterfaceDemo - * \brief Class of triggers for demo module + * Class of triggers for demo module */ class InterfaceDemo { @@ -57,6 +56,7 @@ class InterfaceDemo /** * Return name of trigger file + * * @return string Name of trigger file */ function getName() @@ -66,6 +66,7 @@ class InterfaceDemo /** * Return description of trigger file + * * @return string Description of trigger file */ function getDesc() @@ -75,6 +76,7 @@ class InterfaceDemo /** * Return version of trigger file + * * @return string Version of trigger file */ function getVersion() diff --git a/htdocs/ecm/index.php b/htdocs/ecm/index.php index 54092313f36..84553edcc38 100644 --- a/htdocs/ecm/index.php +++ b/htdocs/ecm/index.php @@ -327,7 +327,7 @@ $moreheadjs=" , north__paneSelector: \"#ecm-layout-north\" , west__paneSelector: \"#ecm-layout-west\" , resizable: true - , north__size: 34 + , north__size: 32 , north__resizable: false , north__closable: false , west__size: 340 @@ -395,7 +395,7 @@ else print ''; // Edit link - print ''; + print ''; // Add link //print ''; diff --git a/htdocs/expedition/fiche.php b/htdocs/expedition/fiche.php index 23f29474cf5..5d3903e5471 100644 --- a/htdocs/expedition/fiche.php +++ b/htdocs/expedition/fiche.php @@ -1413,7 +1413,7 @@ else $formmail->withcancel=1; // Tableau des substitutions $formmail->substit['__SHIPPINGREF__']=$object->ref; - $formmail->substit['__SIGNATURE__']=''; + $formmail->substit['__SIGNATURE__']=$user->signature; $formmail->substit['__PERSONALIZED__']=''; // Tableau des parametres complementaires $formmail->param['action']='send'; diff --git a/htdocs/fichinter/fiche.php b/htdocs/fichinter/fiche.php index f4e5bba9f7f..7350e9df28a 100644 --- a/htdocs/fichinter/fiche.php +++ b/htdocs/fichinter/fiche.php @@ -1286,7 +1286,7 @@ else if ($id > 0 || ! empty($ref)) // Tableau des substitutions $formmail->substit['__FICHINTERREF__']=$object->ref; - $formmail->substit['__SIGNATURE__']=''; + $formmail->substit['__SIGNATURE__']=$user->signature; $formmail->substit['__PERSONALIZED__']=''; // Tableau des parametres complementaires $formmail->param['action']='send'; diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php index 23b3b703d0a..6cdaa631da9 100644 --- a/htdocs/fourn/class/fournisseur.facture.class.php +++ b/htdocs/fourn/class/fournisseur.facture.class.php @@ -78,7 +78,7 @@ class FactureFournisseur extends Facture var $lines; var $fournisseur; - + var $extraparams=array(); @@ -194,7 +194,7 @@ class FactureFournisseur extends Facture $this->lines[$i]->localtax2_tx, $this->lines[$i]->qty, $this->lines[$i]->fk_product, - 'HT', + 'HT', $this->lines[$i]->info_bits, $this->lines[$i]->product_type ); @@ -345,7 +345,7 @@ class FactureFournisseur extends Facture $this->note_public = $obj->note_public; $this->model_pdf = $obj->model_pdf; $this->import_key = $obj->import_key; - + $this->extraparams = (array) json_decode($obj->extraparams, true); $this->socid = $obj->socid; diff --git a/htdocs/fourn/commande/fiche.php b/htdocs/fourn/commande/fiche.php index ae043472587..21f93a08fcc 100644 --- a/htdocs/fourn/commande/fiche.php +++ b/htdocs/fourn/commande/fiche.php @@ -190,7 +190,7 @@ else if ($action == 'addline' && $user->rights->fournisseur->commande->creer) $_POST['idprodfournprice'], $productsupplier->fourn_ref, $remise_percent, - 'HT', + 'HT', $type ); } @@ -1687,7 +1687,7 @@ if ($id > 0 || ! empty($ref)) $formmail->withcancel=1; // Tableau des substitutions $formmail->substit['__ORDERREF__']=$object->ref; - $formmail->substit['__SIGNATURE__']=''; + $formmail->substit['__SIGNATURE__']=$user->signature; $formmail->substit['__PERSONALIZED__']=''; // Tableau des parametres complementaires $formmail->param['action']='send'; diff --git a/htdocs/fourn/facture/fiche.php b/htdocs/fourn/facture/fiche.php index 20614672f50..5ca4757a8a8 100644 --- a/htdocs/fourn/facture/fiche.php +++ b/htdocs/fourn/facture/fiche.php @@ -168,7 +168,7 @@ elseif ($action == 'setlabel' && $user->rights->fournisseur->facture->creer) if ($result < 0) dol_print_error($db); } -elseif ($action == 'setdate' && $user->rights->fournisseur->facture->creer) +elseif ($action == 'setdatef' && $user->rights->fournisseur->facture->creer) { $object->fetch($id); $object->date=dol_mktime(12,0,0,$_POST['datefmonth'],$_POST['datefday'],$_POST['datefyear']); @@ -316,7 +316,7 @@ elseif ($action == 'add' && $user->rights->fournisseur->facture->creer) $date_end, 0, $lines[$i]->info_bits, - 'HT', + 'HT', $product_type ); @@ -1936,7 +1936,7 @@ else $formmail->withcancel=1; // Tableau des substitutions $formmail->substit['__FACREF__']=$object->ref; - $formmail->substit['__SIGNATURE__']=''; + $formmail->substit['__SIGNATURE__']=$user->signature; $formmail->substit['__PERSONALIZED__']=''; // Tableau des parametres complementaires $formmail->param['action']='send'; diff --git a/htdocs/projet/fiche.php b/htdocs/projet/fiche.php index d93a6462db6..edc44e5e7fd 100644 --- a/htdocs/projet/fiche.php +++ b/htdocs/projet/fiche.php @@ -339,6 +339,7 @@ if ($action == 'create' && $user->rights->projet->creer) print ''; } print ''; + print ''; } @@ -443,10 +444,12 @@ else print ''; print ''; - print ''; print '
trans("Invoice"); ?>numInvoice(); ?>
trans("TotalHT"); ?>prix_total_ht(),'MT').' '.$conf->currency; ?>
trans("TotalHT"); ?>prixTotalHt(),'MT').' '.$conf->currency; ?>
'.$langs->trans("VAT").''.price2num($obj_facturation->montant_tva(),'MT').' '.$conf->currency.'
'.$langs->trans("VAT").''.price2num($obj_facturation->montantTva(),'MT').' '.$conf->currency.'
trans("TotalTTC"); ?> prix_total_ttc(),'MT').' '.$conf->currency; ?>
trans("TotalTTC"); ?> prixTotalTtc(),'MT').' '.$conf->currency; ?>
trans("PaymentMode"); ?> getSetPaymentMode()) diff --git a/htdocs/cashdesk/validation_verif.php b/htdocs/cashdesk/validation_verif.php index 5bf7bdab68b..f3772d617fa 100644 --- a/htdocs/cashdesk/validation_verif.php +++ b/htdocs/cashdesk/validation_verif.php @@ -57,7 +57,7 @@ switch ($action) // Si paiement autre qu'en especes, montant encaisse = prix total $mode_reglement = $obj_facturation->getSetPaymentMode(); if ( $mode_reglement != 'ESP' ) { - $montant = $obj_facturation->prix_total_ttc(); + $montant = $obj_facturation->prixTotalTtc(); } else { $montant = $_POST['txtEncaisse']; } @@ -66,7 +66,7 @@ switch ($action) $obj_facturation->montantEncaisse($montant); //Determination de la somme rendue - $total = $obj_facturation->prix_total_ttc(); + $total = $obj_facturation->prixTotalTtc(); $encaisse = $obj_facturation->montantEncaisse(); $obj_facturation->montantRendu($encaisse - $total); @@ -198,9 +198,9 @@ switch ($action) $invoice->date_creation=$now; $invoice->date=$now; $invoice->date_lim_reglement=0; - $invoice->total_ht=$obj_facturation->prix_total_ht(); - $invoice->total_tva=$obj_facturation->montant_tva(); - $invoice->total_ttc=$obj_facturation->prix_total_ttc(); + $invoice->total_ht=$obj_facturation->prixTotalHt(); + $invoice->total_tva=$obj_facturation->montantTva(); + $invoice->total_ttc=$obj_facturation->prixTotalTtc(); $invoice->note=$note; $invoice->cond_reglement_id=$cond_reglement_id; $invoice->mode_reglement_id=$mode_reglement_id; @@ -234,7 +234,7 @@ switch ($action) $payment=new Paiement($db); $payment->datepaye=$now; $payment->bank_account=$conf_fkaccount; - $payment->amounts[$invoice->id]=$obj_facturation->prix_total_ttc(); + $payment->amounts[$invoice->id]=$obj_facturation->prixTotalTtc(); $payment->note=$langs->trans("Payment").' '.$langs->trans("Invoice").' '.$obj_facturation->numInvoice(); $payment->paiementid=$invoice->mode_reglement_id; $payment->num_paiement=''; @@ -254,7 +254,7 @@ switch ($action) if (! $error) { - if ($invoice->total_ttc == $obj_facturation->prix_total_ttc() + if ($invoice->total_ttc == $obj_facturation->prixTotalTtc() && $obj_facturation->getSetPaymentMode() != 'DIFF') { // We set status to payed diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php index 57dd86b63ac..4922fcc7225 100644 --- a/htdocs/comm/propal.php +++ b/htdocs/comm/propal.php @@ -1823,7 +1823,7 @@ if ($id > 0 || ! empty($ref)) // Tableau des substitutions $formmail->substit['__PROPREF__']=$object->ref; - $formmail->substit['__SIGNATURE__']=''; + $formmail->substit['__SIGNATURE__']=$user->signature; $formmail->substit['__PERSONALIZED__']=''; // Tableau des parametres complementaires $formmail->param['action']='send'; diff --git a/htdocs/commande/fiche.php b/htdocs/commande/fiche.php index e3096ffdac9..600f3056218 100644 --- a/htdocs/commande/fiche.php +++ b/htdocs/commande/fiche.php @@ -2282,7 +2282,7 @@ else $formmail->withcancel=1; // Tableau des substitutions $formmail->substit['__ORDERREF__']=$object->ref; - $formmail->substit['__SIGNATURE__']=''; + $formmail->substit['__SIGNATURE__']=$user->signature; $formmail->substit['__PERSONALIZED__']=''; // Tableau des parametres complementaires $formmail->param['action']='send'; diff --git a/htdocs/compta/deplacement/fiche.php b/htdocs/compta/deplacement/fiche.php index 95ed1c35a4e..cf97fd8ee83 100644 --- a/htdocs/compta/deplacement/fiche.php +++ b/htdocs/compta/deplacement/fiche.php @@ -2,6 +2,7 @@ /* Copyright (C) 2003 Rodolphe Quiedeville * Copyright (C) 2004-2012 Laurent Destailleur * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2012 Juanjo Menent * * 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,8 +41,8 @@ $id = GETPOST('id','int'); if ($user->societe_id) $socid=$user->societe_id; $result = restrictedArea($user, 'deplacement', $id,''); -$action = GETPOST('action'); -$confirm = GETPOST('confirm'); +$action = GETPOST('action','alpha'); +$confirm = GETPOST('confirm','alpha'); $mesg = ''; @@ -115,17 +116,17 @@ else if ($action == 'confirm_delete' && $confirm == "yes" && $user->rights->depl else if ($action == 'add' && $user->rights->deplacement->creer) { - if (! $_POST["cancel"]) + if (! GETPOST('cancel','alpha')) { $error=0; - $object->date = dol_mktime(12, 0, 0, $_POST["remonth"], $_POST["reday"], $_POST["reyear"]); - $object->km = $_POST["km"]; - $object->type = $_POST["type"]; - $object->socid = $_POST["socid"]; - $object->fk_user = $_POST["fk_user"]; - $object->note_private = $_POST["note_private"]; - $object->note_public = $_POST["note_public"]; + $object->date = dol_mktime(12, 0, 0, GETPOST('remonth','int'), GETPOST('reday','int'), GETPOST('reyear','int')); + $object->km = GETPOST('km','int'); + $object->type = GETPOST('type','alpha'); + $object->socid = GETPOST('socid','int'); + $object->fk_user = GETPOST('fk_user','int'); + $object->note_private = GETPOST('note_private','alpha'); + $object->note_public = GETPOST('note_public','alpha'); $object->statut = 0; if (! $object->date) @@ -174,17 +175,17 @@ else if ($action == 'add' && $user->rights->deplacement->creer) // Update record else if ($action == 'update' && $user->rights->deplacement->creer) { - if (empty($_POST["cancel"])) + if (! GETPOST('cancel','alpha')) { $result = $object->fetch($id); - $object->date = dol_mktime(12, 0, 0, $_POST["remonth"], $_POST["reday"], $_POST["reyear"]); - $object->km = $_POST["km"]; - $object->type = $_POST["type"]; - $object->fk_user = $_POST["fk_user"]; - $object->socid = $_POST["socid"]; - $object->note_private = $_POST["note_private"]; - $object->note_public = $_POST["note_public"]; + $object->date = dol_mktime(12, 0, 0, GETPOST('remonth','int'), GETPOST('reday','int'), GETPOST('reyear','int')); + $object->km = GETPOST('km','int'); + $object->type = GETPOST('type','alpha'); + $object->socid = GETPOST('socid','int'); + $object->fk_user = GETPOST('fk_user','int'); + $object->note_private = GETPOST('note_private','alpha'); + $object->note_public = GETPOST('note_public','alpha'); $result = $object->update($user); @@ -209,14 +210,14 @@ else if ($action == 'update' && $user->rights->deplacement->creer) else if ($action == 'classin' && $user->rights->deplacement->creer) { $object->fetch($id); - $result=$object->setProject($_POST['projectid']); + $result=$object->setProject(GETPOST('projectid','int')); if ($result < 0) dol_print_error($db, $object->error); } // Set fields else if ($action == 'setdated' && $user->rights->deplacement->creer) { - $dated=dol_mktime($_POST['datedhour'], $_POST['datedmin'], $_POST['datedsec'], $_POST['datedmonth'], $_POST['datedday'], $_POST['datedyear']); + $dated=dol_mktime(GETPOST('datedhour','int'), GETPOST('datedmin','int'), GETPOST('datedsec','int'), GETPOST('datedmonth','int'), GETPOST('datedday','int'), GETPOST('datedyear','int')); $object->fetch($id); $result=$object->setValueFrom('dated',$dated,'','','date'); if ($result < 0) dol_print_error($db, $object->error); @@ -224,19 +225,19 @@ else if ($action == 'setdated' && $user->rights->deplacement->creer) else if ($action == 'setkm' && $user->rights->deplacement->creer) { $object->fetch($id); - $result=$object->setValueFrom('km',GETPOST('km')); + $result=$object->setValueFrom('km',GETPOST('km','int')); if ($result < 0) dol_print_error($db, $object->error); } else if ($action == 'setnote_public' && $user->rights->deplacement->creer) { $object->fetch($id); - $result=$object->setValueFrom('note_public',GETPOST('note_public')); + $result=$object->setValueFrom('note_public',GETPOST('note_public','alpha')); if ($result < 0) dol_print_error($db, $object->error); } else if ($action == 'setnote' && $user->rights->deplacement->creer) { $object->fetch($id); - $result=$object->setValueFrom('note',GETPOST('note')); + $result=$object->setValueFrom('note',GETPOST('note','alpha')); if ($result < 0) dol_print_error($db, $object->error); } @@ -258,7 +259,7 @@ if ($action == 'create') dol_htmloutput_errors($mesg); - $datec = dol_mktime(12, 0, 0, $_POST["remonth"], $_POST["reday"], $_POST["reyear"]); + $datec = dol_mktime(12, 0, 0, GETPOST('remonth','int'), GETPOST('reday','int'), GETPOST('reyear','int')); print '
' . "\n"; print ''; @@ -268,12 +269,12 @@ if ($action == 'create') print "
'.$langs->trans("Type").''; - print $form->select_type_fees(GETPOST("type"),'type',1); + print $form->select_type_fees(GETPOST('type','int'),'type',1); print '
'.$langs->trans("Person").''; - print $form->select_users(GETPOST("fk_user"),'fk_user',1); + print $form->select_users(GETPOST('fk_user','int'),'fk_user',1); print '
'.$langs->trans('NotePublic').''; require_once(DOL_DOCUMENT_ROOT."/core/class/doleditor.class.php"); - $doleditor=new DolEditor('note_public',GETPOST('note_public'),600,200,'dolibarr_notes','In',false,true,true,ROWS_8,100); + $doleditor=new DolEditor('note_public',GETPOST('note_public','alpha'),600,200,'dolibarr_notes','In',false,true,true,ROWS_8,100); print $doleditor->Create(1); print '
'.$langs->trans('NotePrivate').''; require_once(DOL_DOCUMENT_ROOT."/core/class/doleditor.class.php"); - $doleditor=new DolEditor('note_private',GETPOST('note_private'),600,200,'dolibarr_notes','In',false,true,true,ROWS_8,100); + $doleditor=new DolEditor('note_private',GETPOST('note_private','alpha'),600,200,'dolibarr_notes','In',false,true,true,ROWS_8,100); print $doleditor->Create(1); print '
'.$langs->trans("Type").''; - print $form->select_type_fees($_POST["type"]?$_POST["type"]:$object->type,'type',0); + print $form->select_type_fees(GETPOST('type','int')?GETPOST('type','int'):$object->type,'type',0); print '
'.$langs->trans("Person").''; - print $form->select_users($_POST["fk_user"]?$_POST["fk_user"]:$object->fk_user,'fk_user',0); + print $form->select_users(GETPOST('fk_user','int')?GETPOST('fk_user','int'):$object->fk_user,'fk_user',0); print '
'.img_view().''.img_view('',$langs->trans("Edit").' - '.$langs->trans("View")).''.img_edit_add().'
'; } // Start top panel, toolbar - +print '
'; // Toolbar if ($user->rights->ecm->setup) @@ -414,7 +414,7 @@ print ''; print ''; - +print '
'; // End top panel, toolbar if ($conf->use_javascript_ajax) { @@ -784,7 +784,7 @@ if (empty($action) || $action == 'file_manager' || preg_match('/refresh/i',$acti print '
'.img_view().''.img_view($langs->trans("Edit").' - '.$langs->trans("Show")).''.img_edit_add().'
'; - print '   '; - print '
'; + + print '

'; + print '   '; + print '
'; + print ''; } else diff --git a/htdocs/societe/admin/societe.php b/htdocs/societe/admin/societe.php index 67e2782e144..0944f14e9fe 100644 --- a/htdocs/societe/admin/societe.php +++ b/htdocs/societe/admin/societe.php @@ -3,7 +3,7 @@ * Copyright (C) 2004 Eric Seigne * Copyright (C) 2005-2011 Laurent Destailleur * Copyright (C) 2005-2012 Regis Houssin - * Copyright (C) 2011 Juanjo Menent + * Copyright (C) 2011-2012 Juanjo Menent * * 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 @@ -31,8 +31,8 @@ require_once(DOL_DOCUMENT_ROOT."/core/lib/company.lib.php"); $langs->load("admin"); -$action=GETPOST("action"); -$value=GETPOST("value"); +$action=GETPOST('action','alpha'); +$value=GETPOST('value','alpha'); if (!$user->admin) accessforbidden(); @@ -69,7 +69,7 @@ if ($action == 'setcodecompta') if ($action == 'COMPANY_USE_SEARCH_TO_SELECT') { - $companysearch = GETPOST("activate_COMPANY_USE_SEARCH_TO_SELECT"); + $companysearch = GETPOST('activate_COMPANY_USE_SEARCH_TO_SELECT','alpha'); $res = dolibarr_set_const($db, "COMPANY_USE_SEARCH_TO_SELECT", $companysearch,'chaine',0,'',$conf->entity); if (! $res > 0) $error++; if (! $error) @@ -93,8 +93,8 @@ if ($action == 'setModuleOptions') { if (array_key_exists('param'.$i,$_POST)) { - $param=$_POST["param".$i]; - $value=$_POST["value".$i]; + $param=GETPOST("param".$i,'alpha'); + $value=GETPOST("value".$i,'alpha'); if ($param) $res = dolibarr_set_const($db,$param,$value,'chaine',0,'',$conf->entity); if (! $res > 0) $error++; } @@ -114,8 +114,8 @@ if ($action == 'setModuleOptions') // Activate a document generator module if ($action == 'set') { - $label = GETPOST("label"); - $scandir = GETPOST("scandir"); + $label = GETPOST('label','alpha'); + $scandir = GETPOST('scandir','alpha'); $type='company'; $sql = "INSERT INTO ".MAIN_DB_PREFIX."document_model (nom, type, entity, libelle, description)"; @@ -141,8 +141,8 @@ if ($action== 'del') // Define default generator if ($action == 'setdoc') { - $label = GETPOST("label"); - $scandir = GETPOST("scandir"); + $label = GETPOST('label','alpha'); + $scandir = GETPOST('scandir','alpha'); $db->begin(); @@ -154,7 +154,7 @@ if ($action == 'setdoc') // On active le modele $type='company'; $sql_del = "DELETE FROM ".MAIN_DB_PREFIX."document_model"; - $sql_del.= " WHERE nom = '".$db->escape($_GET["value"])."'"; + $sql_del.= " WHERE nom = '".$db->escape(GETPOST('value','alpha'))."'"; $sql_del.= " AND type = '".$type."'"; $sql_del.= " AND entity = ".$conf->entity; dol_syslog("societe.php ".$sql); @@ -181,7 +181,7 @@ if ($action == 'setdoc') //Activate ProfId if ($action == 'setprofid') { - $status = GETPOST("status"); + $status = GETPOST('status','alpha'); $idprof="SOCIETE_IDPROF".$value."_UNIQUE"; if (dolibarr_set_const($db, $idprof,$status,'chaine',0,'',$conf->entity) > 0) diff --git a/htdocs/societe/soc.php b/htdocs/societe/soc.php index 1ec26a874d7..2a9e3a3efdf 100644 --- a/htdocs/societe/soc.php +++ b/htdocs/societe/soc.php @@ -985,7 +985,8 @@ else /* * Edition */ - print_fiche_titre($langs->trans("EditCompany")); + + //print_fiche_titre($langs->trans("EditCompany")); if ($socid) { @@ -995,6 +996,12 @@ else $res=$object->fetch_optionals($object->id,$extralabels); //if ($res < 0) { dol_print_error($db); exit; } + + $head = societe_prepare_head($object); + + dol_fiche_head($head, 'card', $langs->trans("ThirdParty"),0,'company'); + + // Load object modCodeTiers $module=$conf->global->SOCIETE_CODECLIENT_ADDON; if (! $module) dolibarr_error('',$langs->trans("ErrorModuleThirdPartyCodeInCompanyModuleNotDefined")); @@ -1430,6 +1437,8 @@ else print ''; print ''; + + dol_fiche_end(); } } else @@ -1448,9 +1457,6 @@ else dol_fiche_head($head, 'card', $langs->trans("ThirdParty"),0,'company'); - $form = new Form($db); - - // Confirm delete third party if ($action == 'delete' || $conf->use_javascript_ajax) { diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index a35c02228d4..0820e358fd0 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -185,7 +185,7 @@ input, input.flat, textarea, textarea.flat, form.flat select, select.flat { font-size: px; font-family: ; background: #FDFDFD; - border: 1px solid #ACBCBB; + border: 1px solid #C0C0C0; padding: 1px 1px 1px 1px; margin: 0px 0px 0px 0px; } @@ -196,6 +196,7 @@ input:disabled { background:#ddd; } input:-webkit-autofill { background-color: #FCFEFA !important; background-image:none !important; } + textarea:disabled { background:#ddd; } @@ -203,7 +204,7 @@ textarea:disabled { font-family: ; background-image: url(); background-position: bottom; - border: 1px solid #ACBCBB; + border: 1px solid #C0C0C0; padding: 0.1em 0.7em; margin: 0em 0.5em; -moz-border-radius:0px 5px 0px 5px; @@ -218,7 +219,7 @@ textarea:disabled { color: #222244; background-image: url(); background-position: bottom; - border: 1px solid #ACBCBB; + border: 1px solid #C0C0C0; } .button:hover { background: #dee7ec; @@ -869,7 +870,7 @@ td.photo { } a.toolbarbutton { - margin-top: 1px; + margin-top: 0px; margin-left: 4px; margin-right: 4px; height: 30px; @@ -878,7 +879,8 @@ a.toolbarbutton { background: #FFFFFF;*/ } img.toolbarbutton { - height: 28px; + margin-top: 1px; + height: 30px; } /* ============================================================================== */ @@ -1302,7 +1304,7 @@ table.border { } table.border td { - padding: 1px 2px 1px 1px; + padding: 1px 2px 1px 2px; border: 1px solid #9CACBB; border-collapse: collapse; } @@ -1866,9 +1868,9 @@ td.hidden { /* Module agenda */ /* ============================================================================== */ -.cal_other_month { opacity: 0.6; background: #DDDDDD; border: solid 1px #ACBCBB; padding-: 2px; padding-: 1px; padding-top: 0px; padding-bottom: 0px; } -.cal_past_month { opacity: 0.6; background: #EEEEEE; border: solid 1px #ACBCBB; padding-: 2px; padding-: 1px; padding-top: 0px; padding-bottom: 0px; } -.cal_current_month { background: #FFFFFF; border: solid 1px #ACBCBB; padding-: 2px; padding-: 1px; padding-top: 0px; padding-bottom: 0px; } +.cal_other_month { opacity: 0.6; background: #DDDDDD; border: solid 1px #C0C0C0; padding-: 2px; padding-: 1px; padding-top: 0px; padding-bottom: 0px; } +.cal_past_month { opacity: 0.6; background: #EEEEEE; border: solid 1px #C0C0C0; padding-: 2px; padding-: 1px; padding-top: 0px; padding-bottom: 0px; } +.cal_current_month { background: #FFFFFF; border: solid 1px #C0C0C0; padding-: 2px; padding-: 1px; padding-top: 0px; padding-bottom: 0px; } .cal_today { background: #FFFFFF; border: solid 2px #6C7C7B; padding-: 2px; padding-: 1px; padding-top: 0px; padding-bottom: 0px; } .cal_past { } table.cal_event { border-collapse: collapse; margin-bottom: 1px; -webkit-border-radius: 6px; border-radius: 6px; } @@ -2217,7 +2219,7 @@ a.cke_dialog_ui_button font-family: !important; background-image: url() !important; background-position: bottom !important; - border: 1px solid #ACBCBB !important; + border: 1px solid #C0C0C0 !important; padding: 0.1em 0.7em !important; margin: 0em 0.5em !important; -moz-border-radius:0px 5px 0px 5px !important; diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index be0b676e12e..95b97be7a80 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -25,14 +25,14 @@ /** * \file htdocs/user/class/user.class.php * \brief File of class to manage users + * \ingroup core */ require_once(DOL_DOCUMENT_ROOT ."/core/class/commonobject.class.php"); /** - * \class User - * \brief Class to manage users + * Class to manage users */ class User extends CommonObject { @@ -108,7 +108,7 @@ class User extends CommonObject $this->all_permissions_are_loaded = 0; $this->admin=0; - + $this->rights = (object) array(); $this->rights->user = (object) array(); $this->rights->user->user = (object) array(); @@ -1433,17 +1433,17 @@ class User extends CommonObject dol_syslog("User::send_password url=".$url); } $mailfile = new CMailFile( - $subject, - $this->email, - $conf->notification->email_from, - $mesg, - array(), - array(), - array(), - '', - '', - 0, - $msgishtml + $subject, + $this->email, + $conf->notification->email_from, + $mesg, + array(), + array(), + array(), + '', + '', + 0, + $msgishtml ); if ($mailfile->sendfile()) diff --git a/htdocs/webservices/server_productorservice.php b/htdocs/webservices/server_productorservice.php index e17d4102a3d..6b5c6dee643 100755 --- a/htdocs/webservices/server_productorservice.php +++ b/htdocs/webservices/server_productorservice.php @@ -83,10 +83,10 @@ $server->wsdl->addComplexType( // Define other specific objects $server->wsdl->addComplexType( 'product', - 'complexType', - 'struct', - 'all', - '', + 'complexType', + 'struct', + 'all', + '', array( 'id' => array('name'=>'id','type'=>'xsd:string'), 'ref' => array('name'=>'ref','type'=>'xsd:string'), @@ -120,10 +120,10 @@ $server->wsdl->addComplexType( // Define other specific objects $server->wsdl->addComplexType( 'filterproduct', - 'complexType', - 'struct', - 'all', - '', + 'complexType', + 'struct', + 'all', + '', array( // 'limit' => array('name'=>'limit','type'=>'xsd:string'), 'type' => array('name'=>'type','type'=>'xsd:string'),