From d0f83141fbaa5bb61a43bf803fa5a432eb2e7098 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Doursenaud?= Date: Thu, 18 Sep 2014 11:38:01 +0200 Subject: [PATCH 0001/1060] FIX: Bad variable usage --- htdocs/accountancy/admin/account.php | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/htdocs/accountancy/admin/account.php b/htdocs/accountancy/admin/account.php index c42a8d7079b..340cb3e18d5 100644 --- a/htdocs/accountancy/admin/account.php +++ b/htdocs/accountancy/admin/account.php @@ -65,8 +65,7 @@ if ($action == 'delete') { $accounting = new AccountingAccount($db); if ($action == 'disable') { - $accounting = $accounting->fetch($id); - if (! empty($accounting->id)) { + if ($accounting->fetch($id)) { $result = $accounting->account_desactivate($id); } @@ -75,10 +74,7 @@ if ($action == 'disable') { setEventMessage($accounting->error, 'errors'); } } else if ($action == 'enable') { - - $accounting = $accounting->fetch($id); - - if (! empty($accounting->id)) { + if ($accounting->fetch($id)) { $result = $accounting->account_activate($id); } $action = 'update'; @@ -206,4 +202,4 @@ if ($result) { } llxFooter(); -$db->close(); \ No newline at end of file +$db->close(); From bab1dd13e248a08bd01cd9336a7291f2bcfce7c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Doursenaud?= Date: Thu, 18 Sep 2014 11:42:07 +0200 Subject: [PATCH 0002/1060] FIX: missing extends --- htdocs/accountancy/class/accountingaccount.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/accountancy/class/accountingaccount.class.php b/htdocs/accountancy/class/accountingaccount.class.php index 82c3ec3ca10..f91f21343f8 100644 --- a/htdocs/accountancy/class/accountingaccount.class.php +++ b/htdocs/accountancy/class/accountingaccount.class.php @@ -26,7 +26,7 @@ /** * Classe permettant la gestion des comptes generaux de compta */ -class AccountingAccount +class AccountingAccount extends CommonObject { var $db; var $id; @@ -426,4 +426,4 @@ class AccountingAccount return - 1; } } -} \ No newline at end of file +} From 7b300b0a9dfdc2d9c852febb6e2c0fb02bd20e72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Doursenaud?= Date: Thu, 18 Sep 2014 11:42:21 +0200 Subject: [PATCH 0003/1060] FIX: Missing variable declaration --- htdocs/accountancy/class/accountingaccount.class.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/accountancy/class/accountingaccount.class.php b/htdocs/accountancy/class/accountingaccount.class.php index f91f21343f8..4ecd0b3c8e1 100644 --- a/htdocs/accountancy/class/accountingaccount.class.php +++ b/htdocs/accountancy/class/accountingaccount.class.php @@ -107,6 +107,7 @@ class AccountingAccount extends CommonObject { global $conf, $langs; $error = 0; + $now = dol_now(); // Clean parameters if (isset($this->fk_pcg_version)) From b1ad7af527f039c0c4888408c7ae9034f4cbe26e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Doursenaud?= Date: Thu, 18 Sep 2014 11:42:33 +0200 Subject: [PATCH 0004/1060] FIX: Missing extends --- htdocs/accountancy/class/bookkeeping.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/accountancy/class/bookkeeping.class.php b/htdocs/accountancy/class/bookkeeping.class.php index 2788526de05..e9bbc7d5958 100644 --- a/htdocs/accountancy/class/bookkeeping.class.php +++ b/htdocs/accountancy/class/bookkeeping.class.php @@ -27,7 +27,7 @@ /** * Class to manage accountancy book keeping */ -class BookKeeping +class BookKeeping extends CommonObject { var $db; var $id; @@ -709,4 +709,4 @@ class BookKeepingLine var $fk_user_author; var $code_journal; var $piece_num; -} \ No newline at end of file +} From 64da1b1dc03326dfcc9785314948a36bd3bc1daf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Doursenaud?= Date: Thu, 18 Sep 2014 11:43:49 +0200 Subject: [PATCH 0005/1060] FIX: Removed HTML file preventing PHP service --- htdocs/accountancy/customer/index.html | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 htdocs/accountancy/customer/index.html diff --git a/htdocs/accountancy/customer/index.html b/htdocs/accountancy/customer/index.html deleted file mode 100644 index e69de29bb2d..00000000000 From 9a141215bb279e46b7c2fda8c30e13cd489156d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Doursenaud?= Date: Thu, 18 Sep 2014 11:46:53 +0200 Subject: [PATCH 0006/1060] FIX: Moved code to where the variable is defined --- htdocs/accountancy/journal/bankjournal.php | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/htdocs/accountancy/journal/bankjournal.php b/htdocs/accountancy/journal/bankjournal.php index 82c3a09e20a..ef39e5668a0 100644 --- a/htdocs/accountancy/journal/bankjournal.php +++ b/htdocs/accountancy/journal/bankjournal.php @@ -137,17 +137,18 @@ if ($result) { $tabpay = array (); $tabbq = array (); $tabtp = array (); - $tabcompany[$obj->rowid] = array ( - 'id' => $obj->socid, - 'name' => $obj->name, - 'code_client' => $obj->code_compta - ); $tabtype = array (); $i = 0; while ( $i < $num ) { $obj = $db->fetch_object($result); + $tabcompany[$obj->rowid] = array ( + 'id' => $obj->socid, + 'name' => $obj->name, + 'code_client' => $obj->code_compta + ); + // Controls $compta_bank = $obj->account_number; if ($obj->label == '(SupplierInvoicePayment)') @@ -580,4 +581,4 @@ if ($action == 'export_csv') { // End of page llxFooter(); } -$db->close(); \ No newline at end of file +$db->close(); From cc68966d7282f17176ce9baf52d188a2d69d72dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Doursenaud?= Date: Thu, 18 Sep 2014 11:49:07 +0200 Subject: [PATCH 0007/1060] FIX: Missing declaration --- htdocs/accountancy/journal/purchasesjournal.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/htdocs/accountancy/journal/purchasesjournal.php b/htdocs/accountancy/journal/purchasesjournal.php index e0c2ceb8e36..09d93d5cd50 100644 --- a/htdocs/accountancy/journal/purchasesjournal.php +++ b/htdocs/accountancy/journal/purchasesjournal.php @@ -246,7 +246,9 @@ if ($action == 'export_csv') { header('Content-Type: text/csv'); header('Content-Disposition: attachment;filename=journal_achats.csv'); - + + $companystatic = new Fournisseur($db); + if ($conf->global->ACCOUNTING_MODELCSV == 1) // Modèle Export Cegid Expert { foreach ( $tabfac as $key => $val ) { @@ -468,4 +470,4 @@ if ($action == 'export_csv') { // End of page llxFooter(); } -$db->close(); \ No newline at end of file +$db->close(); From 332caa2b7124ca6e314d5b119d2ee8676c903504 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Doursenaud?= Date: Thu, 18 Sep 2014 11:51:21 +0200 Subject: [PATCH 0008/1060] FIX: missing global declaration --- htdocs/core/class/commonobject.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 1059d1af07d..50b9a35f4fe 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -2768,7 +2768,7 @@ abstract class CommonObject */ function printObjectLines($action, $seller, $buyer, $selected=0, $dateSelector=0) { - global $conf,$langs,$user,$object,$hookmanager; + global $conf, $hookmanager, $inputalsopricewithtax, $langs, $user; print ''; From 852758c81c0bba13e3769804695206884e91e8da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Doursenaud?= Date: Thu, 18 Sep 2014 11:52:22 +0200 Subject: [PATCH 0009/1060] FIX: Removed concatenation on undeclared variable --- 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 5cf872eb3d8..937f904c512 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -1297,7 +1297,7 @@ class Form // Method with no ajax //$out.='
'; - $out.=$this->select_dolusers('', $htmlname, $show_empty, $exclude, $disabled, $include, $enableonly, $force_entity, $maxlength, $showstatus, $morefilter); + $out=$this->select_dolusers('', $htmlname, $show_empty, $exclude, $disabled, $include, $enableonly, $force_entity, $maxlength, $showstatus, $morefilter); $out.=''; $assignedtouser=array(); if (!empty($_SESSION['assignedtouser'])) $assignedtouser=dol_json_decode($_SESSION['assignedtouser'], true); From 4c7ae3d14b66e836b13b2fd6d11d56bb924127eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Doursenaud?= Date: Thu, 18 Sep 2014 11:54:04 +0200 Subject: [PATCH 0010/1060] FIX: Missing parameter declaration --- htdocs/core/lib/accounting.lib.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/htdocs/core/lib/accounting.lib.php b/htdocs/core/lib/accounting.lib.php index e7313c73aee..7b18de022f6 100644 --- a/htdocs/core/lib/accounting.lib.php +++ b/htdocs/core/lib/accounting.lib.php @@ -25,10 +25,11 @@ /** * Prepare array with list of admin tabs + * @param Object $object Accounting account * * @return array Array of tabs to show */ -function admin_accounting_prepare_head() +function admin_accounting_prepare_head($object) { global $langs, $conf; @@ -189,4 +190,4 @@ function length_exportsage($txt, $len, $end) } } return $res; -} \ No newline at end of file +} From 7c7276b5aaaf3c3dc515f4299e6e2e4b8ee8e892 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Doursenaud?= Date: Thu, 18 Sep 2014 11:57:15 +0200 Subject: [PATCH 0011/1060] FIX: Removed undeclared variable --- htdocs/societe/consumption.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/societe/consumption.php b/htdocs/societe/consumption.php index 0aa9f0e5979..10d0f69dd8e 100644 --- a/htdocs/societe/consumption.php +++ b/htdocs/societe/consumption.php @@ -67,7 +67,7 @@ if (GETPOST("button_removefilter")) } // Customer or supplier selected in drop box $thirdTypeSelect = GETPOST("third_select_id"); -$type_element = GETPOST('type_element')?GETPOST('type_element'):$type_element; +$type_element = GETPOST('type_element')?GETPOST('type_element'):''; $langs->load("companies"); From c7c809a6095ceae7697bfe9b24f6bb7a7fb5fd89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Doursenaud?= Date: Thu, 18 Sep 2014 12:02:17 +0200 Subject: [PATCH 0012/1060] FIX: Wrong type hinting --- .../class/fournisseur.commande.class.php | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index 4e8c3a650b0..07964e69d58 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -1062,25 +1062,25 @@ class CommandeFournisseur extends CommonOrder * Add order line * * @param string $desc Description - * @param double $pu_ht Unit price - * @param double $qty Quantity - * @param double $txtva Taux tva - * @param double $txlocaltax1 Localtax1 tax - * @param double $txlocaltax2 Localtax2 tax + * @param float $pu_ht Unit price + * @param float $qty Quantity + * @param float $txtva Taux tva + * @param float $txlocaltax1 Localtax1 tax + * @param float $txlocaltax2 Localtax2 tax * @param int $fk_product Id produit * @param int $fk_prod_fourn_price Id supplier price * @param string $fourn_ref Supplier reference - * @param double $remise_percent Remise + * @param float $remise_percent Remise * @param string $price_base_type HT or TTC - * @param double $pu_ttc Unit price TTC + * @param float $pu_ttc Unit price TTC * @param int $type Type of line (0=product, 1=service) * @param int $info_bits More information - * @param int $notrigger Disable triggers - * @param timestamp $date_start Date start of service - * @param timestamp $date_end Date end of service + * @param bool $notrigger Disable triggers + * @param int $date_start Date start of service + * @param int $date_end Date end of service * @return int <=0 if KO, >0 if OK */ - function addline($desc, $pu_ht, $qty, $txtva, $txlocaltax1=0, $txlocaltax2=0, $fk_product=0, $fk_prod_fourn_price=0, $fourn_ref='', $remise_percent=0, $price_base_type='HT', $pu_ttc=0, $type=0, $info_bits=0, $notrigger=false, $date_start='', $date_end='') + function addline($desc, $pu_ht, $qty, $txtva, $txlocaltax1=0.0, $txlocaltax2=0.0, $fk_product=0, $fk_prod_fourn_price=0, $fourn_ref='', $remise_percent=0.0, $price_base_type='HT', $pu_ttc=0.0, $type=0, $info_bits=0, $notrigger=false, $date_start=null, $date_end=null) { global $langs,$mysoc; From 3a0d4cd47f139e57d8a9c81db00d4c6ab8b27c64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Doursenaud?= Date: Thu, 18 Sep 2014 14:22:22 +0200 Subject: [PATCH 0013/1060] =?UTF-8?q?FIX:=C2=A0Missing=20visibility=20of?= =?UTF-8?q?=20static=20property?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/core/class/extrafields.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index d5d16efc2e9..c4bb2afcd44 100644 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -54,7 +54,7 @@ class ExtraFields var $error; var $errno; - static $type2label=array( + public static $type2label=array( 'varchar'=>'String', 'text'=>'TextLong', 'int'=>'Int', From 37c0b9606b7c7db25fb714b3ae3b37ae9bb8b573 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Doursenaud?= Date: Thu, 18 Sep 2014 14:32:50 +0200 Subject: [PATCH 0014/1060] FIX: Removed unused variable --- scripts/accountancy/export-thirdpartyaccount.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/accountancy/export-thirdpartyaccount.php b/scripts/accountancy/export-thirdpartyaccount.php index 2556457f38e..f1ff769059c 100644 --- a/scripts/accountancy/export-thirdpartyaccount.php +++ b/scripts/accountancy/export-thirdpartyaccount.php @@ -164,7 +164,6 @@ if ($resql) { header('Content-Disposition: attachment;filename=export_csv.csv'); $obj = $db->fetch_object($resql); - $var = ! $var; print '"' . $obj->compta . '",'; print '"' . $obj->address . '",'; @@ -237,4 +236,4 @@ if ($resql) { } llxFooter(); -$db->close(); \ No newline at end of file +$db->close(); From 131997eeb8684df3c6012a134ef6cabe064011a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Doursenaud?= Date: Thu, 18 Sep 2014 14:39:17 +0200 Subject: [PATCH 0015/1060] FIX: Removed undeclared variables --- htdocs/core/modules/action/rapport.pdf.php | 2 +- htdocs/core/modules/cheque/pdf/pdf_blochet.class.php | 2 +- htdocs/core/modules/rapport/pdf_paiement.class.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/core/modules/action/rapport.pdf.php b/htdocs/core/modules/action/rapport.pdf.php index 1f03ea19d62..3bf7eddecce 100644 --- a/htdocs/core/modules/action/rapport.pdf.php +++ b/htdocs/core/modules/action/rapport.pdf.php @@ -127,7 +127,7 @@ class CommActionRapport $hookmanager=new HookManager($this->db); } $hookmanager->initHooks(array('pdfgeneration')); - $parameters=array('file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs); + $parameters=array('file'=>$file, 'outputlangs'=>$outputlangs); global $action; $reshook=$hookmanager->executeHooks('beforePDFCreation',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks diff --git a/htdocs/core/modules/cheque/pdf/pdf_blochet.class.php b/htdocs/core/modules/cheque/pdf/pdf_blochet.class.php index 1112150a0e9..c2ac3aaa628 100644 --- a/htdocs/core/modules/cheque/pdf/pdf_blochet.class.php +++ b/htdocs/core/modules/cheque/pdf/pdf_blochet.class.php @@ -120,7 +120,7 @@ class BordereauChequeBlochet extends ModeleChequeReceipts $hookmanager=new HookManager($this->db); } $hookmanager->initHooks(array('pdfgeneration')); - $parameters=array('file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs); + $parameters=array('outputlangs'=>$outputlangs); global $action; $reshook=$hookmanager->executeHooks('beforePDFCreation',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks diff --git a/htdocs/core/modules/rapport/pdf_paiement.class.php b/htdocs/core/modules/rapport/pdf_paiement.class.php index 683034156da..a4b73f22e90 100644 --- a/htdocs/core/modules/rapport/pdf_paiement.class.php +++ b/htdocs/core/modules/rapport/pdf_paiement.class.php @@ -126,7 +126,7 @@ class pdf_paiement $hookmanager=new HookManager($this->db); } $hookmanager->initHooks(array('pdfgeneration')); - $parameters=array('file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs); + $parameters=array('file'=>$file,'outputlangs'=>$outputlangs); global $action; $reshook=$hookmanager->executeHooks('beforePDFCreation',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks From afcebea440e2752945f67b95a43fa9d6a47ec90f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Doursenaud?= Date: Thu, 18 Sep 2014 14:40:43 +0200 Subject: [PATCH 0016/1060] FIX: Missing global declaration --- htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php | 2 +- htdocs/core/modules/project/pdf/pdf_baleine.modules.php | 2 +- htdocs/core/modules/rapport/pdf_paiement.class.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php b/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php index fa2e3c85c06..80cf628838d 100644 --- a/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php +++ b/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php @@ -106,7 +106,7 @@ class pdf_soleil extends ModelePDFFicheinter */ function write_file($object,$outputlangs,$srctemplatepath='',$hidedetails=0,$hidedesc=0,$hideref=0) { - global $user,$langs,$conf,$mysoc; + global $conf, $hookmanager, $langs, $user; if (! is_object($outputlangs)) $outputlangs=$langs; // For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO diff --git a/htdocs/core/modules/project/pdf/pdf_baleine.modules.php b/htdocs/core/modules/project/pdf/pdf_baleine.modules.php index 58dd367757e..0165a01a9bc 100644 --- a/htdocs/core/modules/project/pdf/pdf_baleine.modules.php +++ b/htdocs/core/modules/project/pdf/pdf_baleine.modules.php @@ -92,7 +92,7 @@ class pdf_baleine extends ModelePDFProjects */ function write_file($object,$outputlangs) { - global $user,$langs,$conf; + global $conf, $hookmanager, $langs, $user; if (! is_object($outputlangs)) $outputlangs=$langs; // For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO diff --git a/htdocs/core/modules/rapport/pdf_paiement.class.php b/htdocs/core/modules/rapport/pdf_paiement.class.php index a4b73f22e90..6f48cc1baca 100644 --- a/htdocs/core/modules/rapport/pdf_paiement.class.php +++ b/htdocs/core/modules/rapport/pdf_paiement.class.php @@ -91,7 +91,7 @@ class pdf_paiement { include_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; - global $user,$langs,$conf; + global $conf, $hookmanager, $langs, $user; $socid=0; if ($user->societe_id) $socid=$user->societe_id; From f68cb3bfcbbf9e659066e53d532bd27ab345256b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Doursenaud?= Date: Thu, 18 Sep 2014 14:52:59 +0200 Subject: [PATCH 0017/1060] FIX: Variable declared boolean --- htdocs/core/modules/modSyslog.class.php | 2 +- htdocs/core/modules/modUser.class.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/modules/modSyslog.class.php b/htdocs/core/modules/modSyslog.class.php index 563b2e31fa0..f2b5f80ff32 100644 --- a/htdocs/core/modules/modSyslog.class.php +++ b/htdocs/core/modules/modSyslog.class.php @@ -50,7 +50,7 @@ class modSyslog extends DolibarrModules // Module description, used if translation string 'ModuleXXXDesc' not found (where XXX is value of numeric property 'numero' of module) $this->description = "Activate debug logs (syslog)"; // Can be enabled / disabled only in the main company - $this->core_enabled = 1; + $this->core_enabled = true; // Possible values for version are: 'development', 'experimental', 'dolibarr' or version $this->version = 'dolibarr'; // 'experimental' or 'dolibarr' or version // Key used in llx_const table to save module status enabled/disabled (where MYMODULE is value of property name of module in uppercase) diff --git a/htdocs/core/modules/modUser.class.php b/htdocs/core/modules/modUser.class.php index a59031b4a44..55e96f02262 100644 --- a/htdocs/core/modules/modUser.class.php +++ b/htdocs/core/modules/modUser.class.php @@ -49,7 +49,7 @@ class modUser extends DolibarrModules // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module) $this->name = preg_replace('/^mod/i','',get_class($this)); $this->description = "Gestion des utilisateurs (requis)"; - $this->always_enabled = 1; // Can't be disabled + $this->always_enabled = true; // Can't be disabled // Possible values for version are: 'development', 'experimental', 'dolibarr' or version $this->version = 'dolibarr'; From eea9a76589c6138dea1e06c8774d7c6a1522cfd2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Doursenaud?= Date: Thu, 18 Sep 2014 15:09:03 +0200 Subject: [PATCH 0018/1060] FIX: Variable might not be traversable --- htdocs/accountancy/journal/bankjournal.php | 144 +++++++++++---------- htdocs/accountancy/journal/cashjournal.php | 107 +++++++-------- htdocs/comm/action/peruser.php | 77 ++++++----- htdocs/compta/bank/class/account.class.php | 8 +- htdocs/core/class/html.form.class.php | 19 +-- htdocs/core/lib/json.lib.php | 2 +- htdocs/user/class/usergroup.class.php | 2 +- 7 files changed, 192 insertions(+), 167 deletions(-) diff --git a/htdocs/accountancy/journal/bankjournal.php b/htdocs/accountancy/journal/bankjournal.php index ef39e5668a0..ca862098bd3 100644 --- a/htdocs/accountancy/journal/bankjournal.php +++ b/htdocs/accountancy/journal/bankjournal.php @@ -170,83 +170,87 @@ if ($result) { } $links = $object->get_url($obj->rowid); - foreach ( $links as $key => $val ) { + // get_url may return -1 which is not traversable + if (is_array($links)) { - $tabtype[$obj->rowid] = $links[$key]['type']; + foreach ( $links as $key => $val ) { - if ($links[$key]['type'] == 'payment') - { - $paymentstatic->id = $links[$key]['url_id']; - $tabpay[$obj->rowid]["lib"] .= ' ' . $paymentstatic->getNomUrl(2); - } - else if ($links[$key]['type'] == 'payment_supplier') - { - $paymentsupplierstatic->id = $links[$key]['url_id']; - $paymentsupplierstatic->ref = $links[$key]['url_id']; - $tabpay[$obj->rowid]["lib"] .= ' ' . $paymentsupplierstatic->getNomUrl(2); - } - else if ($links[$key]['type'] == 'company') - { - $societestatic->id = $links[$key]['url_id']; - $societestatic->nom = $links[$key]['label']; - $tabpay[$obj->rowid]["soclib"] = $societestatic->getNomUrl(1, '', 30); - $tabtp[$obj->rowid][$compta_soc] += $obj->amount; - } - else if ($links[$key]['type'] == 'sc') - { - $chargestatic->id = $links[$key]['url_id']; - $chargestatic->ref = $links[$key]['url_id']; + $tabtype[$obj->rowid] = $links[$key]['type']; - $tabpay[$obj->rowid]["lib"] .= ' ' . $chargestatic->getNomUrl(2); - if (preg_match('/^\((.*)\)$/i', $links[$key]['label'], $reg)) { - if ($reg[1] == 'socialcontribution') - $reg[1] = 'SocialContribution'; - $chargestatic->lib = $langs->trans($reg[1]); - } - else + if ($links[$key]['type'] == 'payment') { - $chargestatic->lib = $links[$key]['label']; - } - $chargestatic->ref = $chargestatic->lib; - $tabpay[$obj->rowid]["soclib"] = $chargestatic->getNomUrl(1, 30); - - $sqlmid = 'SELECT cchgsoc.accountancy_code'; - $sqlmid .= " FROM " . MAIN_DB_PREFIX . "c_chargesociales cchgsoc "; - $sqlmid .= " INNER JOIN " . MAIN_DB_PREFIX . "chargesociales as chgsoc ON chgsoc.fk_type=cchgsoc.id"; - $sqlmid .= " INNER JOIN " . MAIN_DB_PREFIX . "paiementcharge as paycharg ON paycharg.fk_charge=chgsoc.rowid"; - $sqlmid .= " INNER JOIN " . MAIN_DB_PREFIX . "bank_url as bkurl ON bkurl.url_id=paycharg.rowid"; - $sqlmid .= " WHERE bkurl.fk_bank=" . $obj->rowid; - - dol_syslog("accountancy/journal/bankjournal.php:: sqlmid=" . $sqlmid, LOG_DEBUG); - $resultmid = $db->query($sqlmid); - if ($resultmid) + $paymentstatic->id = $links[$key]['url_id']; + $tabpay[$obj->rowid]["lib"] .= ' ' . $paymentstatic->getNomUrl(2); + } + else if ($links[$key]['type'] == 'payment_supplier') { - $objmid = $db->fetch_object($resultmid); - $tabtp[$obj->rowid][$objmid->accountancy_code] += $obj->amount; + $paymentsupplierstatic->id = $links[$key]['url_id']; + $paymentsupplierstatic->ref = $links[$key]['url_id']; + $tabpay[$obj->rowid]["lib"] .= ' ' . $paymentsupplierstatic->getNomUrl(2); } + else if ($links[$key]['type'] == 'company') + { + $societestatic->id = $links[$key]['url_id']; + $societestatic->nom = $links[$key]['label']; + $tabpay[$obj->rowid]["soclib"] = $societestatic->getNomUrl(1, '', 30); + $tabtp[$obj->rowid][$compta_soc] += $obj->amount; + } + else if ($links[$key]['type'] == 'sc') + { + $chargestatic->id = $links[$key]['url_id']; + $chargestatic->ref = $links[$key]['url_id']; + + $tabpay[$obj->rowid]["lib"] .= ' ' . $chargestatic->getNomUrl(2); + if (preg_match('/^\((.*)\)$/i', $links[$key]['label'], $reg)) { + if ($reg[1] == 'socialcontribution') + $reg[1] = 'SocialContribution'; + $chargestatic->lib = $langs->trans($reg[1]); + } + else + { + $chargestatic->lib = $links[$key]['label']; + } + $chargestatic->ref = $chargestatic->lib; + $tabpay[$obj->rowid]["soclib"] = $chargestatic->getNomUrl(1, 30); + + $sqlmid = 'SELECT cchgsoc.accountancy_code'; + $sqlmid .= " FROM " . MAIN_DB_PREFIX . "c_chargesociales cchgsoc "; + $sqlmid .= " INNER JOIN " . MAIN_DB_PREFIX . "chargesociales as chgsoc ON chgsoc.fk_type=cchgsoc.id"; + $sqlmid .= " INNER JOIN " . MAIN_DB_PREFIX . "paiementcharge as paycharg ON paycharg.fk_charge=chgsoc.rowid"; + $sqlmid .= " INNER JOIN " . MAIN_DB_PREFIX . "bank_url as bkurl ON bkurl.url_id=paycharg.rowid"; + $sqlmid .= " WHERE bkurl.fk_bank=" . $obj->rowid; + + dol_syslog("accountancy/journal/bankjournal.php:: sqlmid=" . $sqlmid, LOG_DEBUG); + $resultmid = $db->query($sqlmid); + if ($resultmid) + { + $objmid = $db->fetch_object($resultmid); + $tabtp[$obj->rowid][$objmid->accountancy_code] += $obj->amount; + } + } + else if ($links[$key]['type'] == 'payment_vat') + { + $paymentvatstatic->id = $links[$key]['url_id']; + $paymentvatstatic->ref = $links[$key]['url_id']; + $tabpay[$obj->rowid]["lib"] .= ' ' . $paymentvatstatic->getNomUrl(2); + $tabtp[$obj->rowid][$cpttva] += $obj->amount; + } + else if ($links[$key]['type'] == 'payment_salary') + { + $paymentsalstatic->id = $links[$key]['url_id']; + $paymentsalstatic->ref = $links[$key]['url_id']; + $tabpay[$obj->rowid]["lib"] .= ' ' . $paymentsalstatic->getNomUrl(2); + $tabtp[$obj->rowid][$accountancy_account_salary] += $obj->amount; + } + else if ($links[$key]['type'] == 'banktransfert') + { + $tabpay[$obj->rowid]["lib"] .= ' ' . $paymentvatstatic->getNomUrl(2); + $tabtp[$obj->rowid][$cpttva] += $obj->amount; + } + /*else { + $tabtp [$obj->rowid] [$accountancy_account_salary] += $obj->amount; + }*/ } - else if ($links[$key]['type'] == 'payment_vat') - { - $paymentvatstatic->id = $links[$key]['url_id']; - $paymentvatstatic->ref = $links[$key]['url_id']; - $tabpay[$obj->rowid]["lib"] .= ' ' . $paymentvatstatic->getNomUrl(2); - $tabtp[$obj->rowid][$cpttva] += $obj->amount; - } - else if ($links[$key]['type'] == 'payment_salary') - { - $paymentsalstatic->id = $links[$key]['url_id']; - $paymentsalstatic->ref = $links[$key]['url_id']; - $tabpay[$obj->rowid]["lib"] .= ' ' . $paymentsalstatic->getNomUrl(2); - $tabtp[$obj->rowid][$accountancy_account_salary] += $obj->amount; - } - else if ($links[$key]['type'] == 'banktransfert') - { - $tabpay[$obj->rowid]["lib"] .= ' ' . $paymentvatstatic->getNomUrl(2); - $tabtp[$obj->rowid][$cpttva] += $obj->amount; - } - /*else { - $tabtp [$obj->rowid] [$accountancy_account_salary] += $obj->amount; - }*/ } $tabbq[$obj->rowid][$compta_bank] += $obj->amount; diff --git a/htdocs/accountancy/journal/cashjournal.php b/htdocs/accountancy/journal/cashjournal.php index 33b1e4359c1..e2994ce57e6 100644 --- a/htdocs/accountancy/journal/cashjournal.php +++ b/htdocs/accountancy/journal/cashjournal.php @@ -157,64 +157,67 @@ if ($result) { } $links = $object->get_url($obj->rowid); - foreach ( $links as $key => $val ) { + // get_url may return -1 which is not traversable + if (is_array($links)) { + foreach ($links as $key => $val) { - $tabtype[$obj->rowid] = $links[$key]['type']; + $tabtype[$obj->rowid] = $links[$key]['type']; - if ($links[$key]['type'] == 'payment') { - $paymentstatic->id = $links[$key]['url_id']; - $tabpay[$obj->rowid]["lib"] .= ' ' . $paymentstatic->getNomUrl(2); - } else if ($links[$key]['type'] == 'payment_supplier') { - $paymentsupplierstatic->id = $links[$key]['url_id']; - $paymentsupplierstatic->ref = $links[$key]['url_id']; - $tabpay[$obj->rowid]["lib"] .= ' ' . $paymentsupplierstatic->getNomUrl(2); - } else if ($links[$key]['type'] == 'company') { + if ($links[$key]['type'] == 'payment') { + $paymentstatic->id = $links[$key]['url_id']; + $tabpay[$obj->rowid]["lib"] .= ' ' . $paymentstatic->getNomUrl(2); + } else if ($links[$key]['type'] == 'payment_supplier') { + $paymentsupplierstatic->id = $links[$key]['url_id']; + $paymentsupplierstatic->ref = $links[$key]['url_id']; + $tabpay[$obj->rowid]["lib"] .= ' ' . $paymentsupplierstatic->getNomUrl(2); + } else if ($links[$key]['type'] == 'company') { - $societestatic->id = $links[$key]['url_id']; - $societestatic->nom = $links[$key]['label']; - $tabpay[$obj->rowid]["soclib"] = $societestatic->getNomUrl(1, '', 30); - $tabtp[$obj->rowid][$compta_soc] += $obj->amount; - } else if ($links[$key]['type'] == 'sc') { + $societestatic->id = $links[$key]['url_id']; + $societestatic->nom = $links[$key]['label']; + $tabpay[$obj->rowid]["soclib"] = $societestatic->getNomUrl(1, '', 30); + $tabtp[$obj->rowid][$compta_soc] += $obj->amount; + } else if ($links[$key]['type'] == 'sc') { - $chargestatic->id = $links[$key]['url_id']; - $chargestatic->ref = $links[$key]['url_id']; + $chargestatic->id = $links[$key]['url_id']; + $chargestatic->ref = $links[$key]['url_id']; - $tabpay[$obj->rowid]["lib"] .= ' ' . $chargestatic->getNomUrl(2); - if (preg_match('/^\((.*)\)$/i', $links[$key]['label'], $reg)) { - if ($reg[1] == 'socialcontribution') - $reg[1] = 'SocialContribution'; - $chargestatic->lib = $langs->trans($reg[1]); - } else { - $chargestatic->lib = $links[$key]['label']; + $tabpay[$obj->rowid]["lib"] .= ' ' . $chargestatic->getNomUrl(2); + if (preg_match('/^\((.*)\)$/i', $links[$key]['label'], $reg)) { + if ($reg[1] == 'socialcontribution') + $reg[1] = 'SocialContribution'; + $chargestatic->lib = $langs->trans($reg[1]); + } else { + $chargestatic->lib = $links[$key]['label']; + } + $chargestatic->ref = $chargestatic->lib; + $tabpay[$obj->rowid]["soclib"] = $chargestatic->getNomUrl(1, 30); + + $sqlmid = 'SELECT cchgsoc.accountancy_code'; + $sqlmid .= " FROM " . MAIN_DB_PREFIX . "c_chargesociales cchgsoc "; + $sqlmid .= " INNER JOIN " . MAIN_DB_PREFIX . "chargesociales as chgsoc ON chgsoc.fk_type=cchgsoc.id"; + $sqlmid .= " INNER JOIN " . MAIN_DB_PREFIX . "paiementcharge as paycharg ON paycharg.fk_charge=chgsoc.rowid"; + $sqlmid .= " INNER JOIN " . MAIN_DB_PREFIX . "bank_url as bkurl ON bkurl.url_id=paycharg.rowid"; + $sqlmid .= " WHERE bkurl.fk_bank=" . $obj->rowid; + dol_syslog("accountancy/journal/cashjournal.php:: sqlmid=" . $sqlmid, LOG_DEBUG); + $resultmid = $db->query($sqlmid); + if ($resultmid) { + $objmid = $db->fetch_object($resultmid); + $tabtp[$obj->rowid][$objmid->accountancy_code] += $obj->amount; + } + } else if ($links[$key]['type'] == 'payment_vat') { + + $paymentvatstatic->id = $links[$key]['url_id']; + $paymentvatstatic->ref = $links[$key]['url_id']; + $tabpay[$obj->rowid]["lib"] .= ' ' . $paymentvatstatic->getNomUrl(2); + $tabtp[$obj->rowid][$cpttva] += $obj->amount; + } else if ($links[$key]['type'] == 'banktransfert') { + $tabpay[$obj->rowid]["lib"] .= ' ' . $paymentvatstatic->getNomUrl(2); + $tabtp[$obj->rowid][$cpttva] += $obj->amount; } - $chargestatic->ref = $chargestatic->lib; - $tabpay[$obj->rowid]["soclib"] = $chargestatic->getNomUrl(1, 30); - - $sqlmid = 'SELECT cchgsoc.accountancy_code'; - $sqlmid .= " FROM " . MAIN_DB_PREFIX . "c_chargesociales cchgsoc "; - $sqlmid .= " INNER JOIN " . MAIN_DB_PREFIX . "chargesociales as chgsoc ON chgsoc.fk_type=cchgsoc.id"; - $sqlmid .= " INNER JOIN " . MAIN_DB_PREFIX . "paiementcharge as paycharg ON paycharg.fk_charge=chgsoc.rowid"; - $sqlmid .= " INNER JOIN " . MAIN_DB_PREFIX . "bank_url as bkurl ON bkurl.url_id=paycharg.rowid"; - $sqlmid .= " WHERE bkurl.fk_bank=" . $obj->rowid; - dol_syslog("accountancy/journal/cashjournal.php:: sqlmid=" . $sqlmid, LOG_DEBUG); - $resultmid = $db->query($sqlmid); - if ($resultmid) { - $objmid = $db->fetch_object($resultmid); - $tabtp[$obj->rowid][$objmid->accountancy_code] += $obj->amount; - } - } else if ($links[$key]['type'] == 'payment_vat') { - - $paymentvatstatic->id = $links[$key]['url_id']; - $paymentvatstatic->ref = $links[$key]['url_id']; - $tabpay[$obj->rowid]["lib"] .= ' ' . $paymentvatstatic->getNomUrl(2); - $tabtp[$obj->rowid][$cpttva] += $obj->amount; - } else if ($links[$key]['type'] == 'banktransfert') { - $tabpay[$obj->rowid]["lib"] .= ' ' . $paymentvatstatic->getNomUrl(2); - $tabtp[$obj->rowid][$cpttva] += $obj->amount; + /*else { + $tabtp [$obj->rowid] [$cptsociale] += $obj->amount; + }*/ } - /*else { - $tabtp [$obj->rowid] [$cptsociale] += $obj->amount; - }*/ } $tabbq[$obj->rowid][$compta_bank] += $obj->amount; @@ -530,4 +533,4 @@ if ($action == 'export_csv') { // End of page llxFooter(); } -$db->close(); \ No newline at end of file +$db->close(); diff --git a/htdocs/comm/action/peruser.php b/htdocs/comm/action/peruser.php index 8bcd1c7289b..ccb544ac4bb 100644 --- a/htdocs/comm/action/peruser.php +++ b/htdocs/comm/action/peruser.php @@ -600,41 +600,56 @@ else // Loop on each user to show calendar $sav = $tmpday; $showheader = true; -foreach ($usernames as $username) -{ - echo ""; - echo '' . $username->getNomUrl(1). ''; - $tmpday = $sav; - $i = 0; - for ($iter_day = 0; $iter_day < 7; $iter_day++) - { - if (($i + 1) < $begin_d || ($i + 1) > $end_d) - { +// listUsersForGroup may return -1 which is not traversable +if (is_array($usernames)) { + foreach ($usernames as $username) { + echo ""; + echo '' . $username->getNomUrl(1) . ''; + $tmpday = $sav; + + $i = 0; + for ($iter_day = 0; $iter_day < 7; $iter_day++) { + if (($i + 1) < $begin_d || ($i + 1) > $end_d) { + $i++; + continue; + } + + // Show days of the current week + $curtime = dol_time_plus_duree($firstdaytoshow, $iter_day, 'd'); + $tmparray = dol_getdate($curtime, 'fast'); + $tmpday = $tmparray['mday']; + $tmpmonth = $tmparray['mon']; + $tmpyear = $tmparray['year']; + + $style = 'cal_current_month'; + if ($iter_day == 6) $style .= ' cal_other_month'; + $today = 0; + $todayarray = dol_getdate($now, 'fast'); + if ($todayarray['mday'] == $tmpday && $todayarray['mon'] == $month && $todayarray['year'] == $year) $today = 1; + if ($today) $style = 'cal_today_peruser'; + + show_day_events2( + $username, + $tmpday, + $month, + $year, + $monthshown, + $style, + $eventarray, + 0, + $maxnbofchar, + $newparam, + 1, + 300, + $showheader + ); + $i++; - continue; } - - // Show days of the current week - $curtime = dol_time_plus_duree($firstdaytoshow, $iter_day, 'd'); - $tmparray = dol_getdate($curtime,'fast'); - $tmpday = $tmparray['mday']; - $tmpmonth = $tmparray['mon']; - $tmpyear = $tmparray['year']; - - $style='cal_current_month'; - if ($iter_day == 6) $style.=' cal_other_month'; - $today=0; - $todayarray=dol_getdate($now,'fast'); - if ($todayarray['mday']==$tmpday && $todayarray['mon']==$month && $todayarray['year']==$year) $today=1; - if ($today) $style='cal_today_peruser'; - - show_day_events2($username, $tmpday, $month, $year, $monthshown, $style, $eventarray, 0, $maxnbofchar, $newparam, 1, 300, $showheader); - - $i++; + echo "\n"; + $showheader = false; } - echo "\n"; - $showheader = false; } echo "\n"; diff --git a/htdocs/compta/bank/class/account.class.php b/htdocs/compta/bank/class/account.class.php index 4ca6175d785..cd428f927b2 100644 --- a/htdocs/compta/bank/class/account.class.php +++ b/htdocs/compta/bank/class/account.class.php @@ -164,10 +164,10 @@ class Account extends CommonObject * TODO Move this into AccountLine * Return array with links from llx_bank_url * - * @param int $fk_bank To search using bank transaction id - * @param int $url_id To search using link to - * @param string $type To search using type - * @return array Array of links + * @param int $fk_bank To search using bank transaction id + * @param int $url_id To search using link to + * @param string $type To search using type + * @return array|-1 Array of links or -1 on error */ function get_url($fk_bank='', $url_id='', $type='') { diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 937f904c512..6b0e9b4d895 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -1302,14 +1302,17 @@ class Form $assignedtouser=array(); if (!empty($_SESSION['assignedtouser'])) $assignedtouser=dol_json_decode($_SESSION['assignedtouser'], true); if (count($assignedtouser)) $out.='
'; - foreach($assignedtouser as $key => $value) - { - $userstatic->fetch($key); - $out.=$userstatic->getNomUrl(1); - //$out.=' '.($value['mandatory']?$langs->trans("Mandatory"):$langs->trans("Optional")); - //$out.=' '.($value['transparency']?$langs->trans("Busy"):$langs->trans("NotBusy")); - $out.='
'; - } + // dol_json_decode may return false on error which is not traversable + if (is_array($assignedtouser)) { + foreach($assignedtouser as $key => $value) + { + $userstatic->fetch($key); + $out.=$userstatic->getNomUrl(1); + //$out.=' '.($value['mandatory']?$langs->trans("Mandatory"):$langs->trans("Optional")); + //$out.=' '.($value['transparency']?$langs->trans("Busy"):$langs->trans("NotBusy")); + $out.='
'; + } + } //$out.=''; return $out; diff --git a/htdocs/core/lib/json.lib.php b/htdocs/core/lib/json.lib.php index 69dbb4eba1a..00d5970d77e 100644 --- a/htdocs/core/lib/json.lib.php +++ b/htdocs/core/lib/json.lib.php @@ -218,7 +218,7 @@ if (! function_exists('json_decode')) * * @param string $json Json encoded to PHP Object or Array * @param bool $assoc False return an object, true return an array. Try to always use it with true ! - * @return mixed Object or Array + * @return mixed Object or Array or false on error */ function dol_json_decode($json, $assoc=false) { diff --git a/htdocs/user/class/usergroup.class.php b/htdocs/user/class/usergroup.class.php index b801c2660aa..9bd0d64fe4c 100644 --- a/htdocs/user/class/usergroup.class.php +++ b/htdocs/user/class/usergroup.class.php @@ -178,7 +178,7 @@ class UserGroup extends CommonObject * * @param string $excludefilter Filter to exclude * @param int $mode 0=Return array of user instance, 1=Return array of users id only - * @return array Array of users + * @return array|-1 Array of users or -1 on error */ function listUsersForGroup($excludefilter='', $mode=0) { From a7964c4a9ad4af94b6796b727b304e3ebb9f43c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Doursenaud?= Date: Thu, 18 Sep 2014 15:20:48 +0200 Subject: [PATCH 0019/1060] FIX: Replaced deprecated call --- htdocs/accountancy/customer/list.php | 4 ++-- htdocs/accountancy/supplier/list.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/accountancy/customer/list.php b/htdocs/accountancy/customer/list.php index 02602262e2c..03e31d44a96 100644 --- a/htdocs/accountancy/customer/list.php +++ b/htdocs/accountancy/customer/list.php @@ -63,7 +63,7 @@ if ($action == 'ventil') { $cpt = 0; foreach ( $mesCasesCochees as $maLigneCochee ) { // print '
id selectionnee : '.$monChoix."
"; - $maLigneCourante = split("_", $maLigneCochee); + $maLigneCourante = explode("_", $maLigneCochee); $monId = $maLigneCourante[0]; $monNumLigne = $maLigneCourante[1]; $monCompte = $mesCodesVentilChoisis[$monNumLigne]; @@ -234,4 +234,4 @@ if ($result) { } $db->close(); -llxFooter(); \ No newline at end of file +llxFooter(); diff --git a/htdocs/accountancy/supplier/list.php b/htdocs/accountancy/supplier/list.php index 84f548344b8..817b07c178e 100644 --- a/htdocs/accountancy/supplier/list.php +++ b/htdocs/accountancy/supplier/list.php @@ -65,7 +65,7 @@ if ($action == 'ventil') { foreach ( $mesCasesCochees as $maLigneCochee ) { // print '
id selectionnee : '.$monChoix."
"; - $maLigneCourante = split("_", $maLigneCochee); + $maLigneCourante = explode("_", $maLigneCochee); $monId = $maLigneCourante[0]; $monNumLigne = $maLigneCourante[1]; $monCompte = $mesCodesVentilChoisis[$monNumLigne]; From e87b1d68b6fce80fd66e255c6a654b5981232d94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Doursenaud?= Date: Thu, 18 Sep 2014 15:22:05 +0200 Subject: [PATCH 0020/1060] FIX: Replaced deprecated property --- htdocs/accountancy/journal/bankjournal.php | 2 +- htdocs/accountancy/journal/cashjournal.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/accountancy/journal/bankjournal.php b/htdocs/accountancy/journal/bankjournal.php index ca862098bd3..218c4dd46df 100644 --- a/htdocs/accountancy/journal/bankjournal.php +++ b/htdocs/accountancy/journal/bankjournal.php @@ -191,7 +191,7 @@ if ($result) { else if ($links[$key]['type'] == 'company') { $societestatic->id = $links[$key]['url_id']; - $societestatic->nom = $links[$key]['label']; + $societestatic->name = $links[$key]['label']; $tabpay[$obj->rowid]["soclib"] = $societestatic->getNomUrl(1, '', 30); $tabtp[$obj->rowid][$compta_soc] += $obj->amount; } diff --git a/htdocs/accountancy/journal/cashjournal.php b/htdocs/accountancy/journal/cashjournal.php index e2994ce57e6..ac7cbeb2f77 100644 --- a/htdocs/accountancy/journal/cashjournal.php +++ b/htdocs/accountancy/journal/cashjournal.php @@ -173,7 +173,7 @@ if ($result) { } else if ($links[$key]['type'] == 'company') { $societestatic->id = $links[$key]['url_id']; - $societestatic->nom = $links[$key]['label']; + $societestatic->name = $links[$key]['label']; $tabpay[$obj->rowid]["soclib"] = $societestatic->getNomUrl(1, '', 30); $tabtp[$obj->rowid][$compta_soc] += $obj->amount; } else if ($links[$key]['type'] == 'sc') { From c20f5b186e6e8997feb7fb0f989c69afdbec2612 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Doursenaud?= Date: Thu, 18 Sep 2014 15:25:18 +0200 Subject: [PATCH 0021/1060] Qual: Updated code documentation --- htdocs/core/modules/DolibarrModules.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/core/modules/DolibarrModules.class.php b/htdocs/core/modules/DolibarrModules.class.php index e4d1f834b4a..69dabf04219 100644 --- a/htdocs/core/modules/DolibarrModules.class.php +++ b/htdocs/core/modules/DolibarrModules.class.php @@ -192,10 +192,10 @@ abstract class DolibarrModules * Enables a module. * Inserts all informations into database * - * @param string[] $array_sql SQL requests to be executed when enabling module - * @param string $options String with options when disabling module ('newboxdefonly|noboxes') + * @param string[]|array $array_sql SQL requests to be executed when enabling module + * @param string $options String with options when disabling module ('newboxdefonly|noboxes') * - * @return int 1 if OK, 0 if KO + * @return int 1 if OK, 0 if KO */ function _init($array_sql, $options='') { From e9175d5d663430c9b4e21988e4d87b3b9cff52b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Doursenaud?= Date: Thu, 18 Sep 2014 15:26:42 +0200 Subject: [PATCH 0022/1060] Qual: date type doesn't exist --- htdocs/core/lib/report.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/lib/report.lib.php b/htdocs/core/lib/report.lib.php index 9c701441765..d41594c3193 100644 --- a/htdocs/core/lib/report.lib.php +++ b/htdocs/core/lib/report.lib.php @@ -31,7 +31,7 @@ * @param string $period Period of report * @param string $periodlink Link to switch period * @param string $description Description -* @param date $builddate Date generation +* @param int $builddate Date generation * @param string $exportlink Link for export or '' * @param array $moreparam Array with list of params to add into form * @param string $calcmode Calculation mode From b21d85a1da139aafe593ba4300b3d58d3f3b102b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Doursenaud?= Date: Thu, 18 Sep 2014 15:28:56 +0200 Subject: [PATCH 0023/1060] FIX: Function was expecting a boolean not a string --- htdocs/comm/action/index.php | 2 +- htdocs/comm/action/peruser.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/comm/action/index.php b/htdocs/comm/action/index.php index 2318c45f132..7cec34cb6db 100644 --- a/htdocs/comm/action/index.php +++ b/htdocs/comm/action/index.php @@ -986,7 +986,7 @@ elseif ($action == 'show_week') // View by week { // Show days of the current week $curtime = dol_time_plus_duree($firstdaytoshow, $iter_day, 'd'); - $tmparray = dol_getdate($curtime,'fast'); + $tmparray = dol_getdate($curtime, true); $tmpday = $tmparray['mday']; $tmpmonth = $tmparray['mon']; $tmpyear = $tmparray['year']; diff --git a/htdocs/comm/action/peruser.php b/htdocs/comm/action/peruser.php index ccb544ac4bb..ec6243c7ae7 100644 --- a/htdocs/comm/action/peruser.php +++ b/htdocs/comm/action/peruser.php @@ -617,7 +617,7 @@ if (is_array($usernames)) { // Show days of the current week $curtime = dol_time_plus_duree($firstdaytoshow, $iter_day, 'd'); - $tmparray = dol_getdate($curtime, 'fast'); + $tmparray = dol_getdate($curtime, true); $tmpday = $tmparray['mday']; $tmpmonth = $tmparray['mon']; $tmpyear = $tmparray['year']; @@ -625,7 +625,7 @@ if (is_array($usernames)) { $style = 'cal_current_month'; if ($iter_day == 6) $style .= ' cal_other_month'; $today = 0; - $todayarray = dol_getdate($now, 'fast'); + $todayarray = dol_getdate($now, true); if ($todayarray['mday'] == $tmpday && $todayarray['mon'] == $month && $todayarray['year'] == $year) $today = 1; if ($today) $style = 'cal_today_peruser'; From bd03cb439d91954e18274024a7ec29dc3fa61811 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Doursenaud?= Date: Thu, 18 Sep 2014 15:36:37 +0200 Subject: [PATCH 0024/1060] FIX: Function expects an int, not a boolean --- htdocs/comm/action/peruser.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/comm/action/peruser.php b/htdocs/comm/action/peruser.php index ec6243c7ae7..5afda948a77 100644 --- a/htdocs/comm/action/peruser.php +++ b/htdocs/comm/action/peruser.php @@ -800,9 +800,9 @@ function show_day_events2($username, $day, $month, $year, $monthshown, $style, & $color = ''; //init if (empty($event->fulldayevent)) { - $a = dol_mktime((int) $h,0,0,$month,$day,$year,false,false); - $b = dol_mktime((int) $h,30,0,$month,$day,$year,false,false); - $c = dol_mktime((int) $h+1,0,0,$month,$day,$year,false,false); + $a = dol_mktime((int) $h,0,0,$month,$day,$year,false,0); + $b = dol_mktime((int) $h,30,0,$month,$day,$year,false,0); + $c = dol_mktime((int) $h+1,0,0,$month,$day,$year,false,0); $dateendtouse=$event->date_end_in_calendar; if ($dateendtouse==$event->date_start_in_calendar) $dateendtouse++; From 0f71b7e0b0f5f5f4628355028dd33eeedee87175 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Doursenaud?= Date: Thu, 18 Sep 2014 15:38:07 +0200 Subject: [PATCH 0025/1060] FIX: Typo --- htdocs/core/lib/functions.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 20b030a9226..2acf4071052 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -822,7 +822,7 @@ function dol_strftime($fmt, $ts=false, $is_gmt=false) * @param string $tzoutput true or 'gmt' => string is for Greenwich location * false or 'tzserver' => output string is for local PHP server TZ usage * 'tzuser' => output string is for local browser TZ usage - * @param Tranlsate $outputlangs Object lang that contains language for text translation. + * @param Translate $outputlangs Object lang that contains language for text translation. * @param boolean $encodetooutput false=no convert into output pagecode * @return string Formated date or '' if time is null * From 4296766ea96dfbb13de71d282ca1bcc9bd86476b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Doursenaud?= Date: Fri, 19 Sep 2014 03:03:24 +0200 Subject: [PATCH 0026/1060] Qual: Coding style --- htdocs/core/lib/accounting.lib.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/core/lib/accounting.lib.php b/htdocs/core/lib/accounting.lib.php index 7b18de022f6..69e47569b07 100644 --- a/htdocs/core/lib/accounting.lib.php +++ b/htdocs/core/lib/accounting.lib.php @@ -25,6 +25,7 @@ /** * Prepare array with list of admin tabs + * * @param Object $object Accounting account * * @return array Array of tabs to show From 87fc27c7e649566ebb467dc32af7b65ee623f292 Mon Sep 17 00:00:00 2001 From: jfefe Date: Mon, 6 Oct 2014 13:31:01 +0200 Subject: [PATCH 0027/1060] Avoid missing class error for fetch_thirdparty method --- htdocs/core/class/commonobject.class.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 6439e3e003e..7c803a0b8a9 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -576,6 +576,9 @@ abstract class CommonObject if (empty($this->socid)) return 0; + if (!class_exists('Societe')) + require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; + $thirdparty = new Societe($this->db); $result=$thirdparty->fetch($this->socid); $this->client = $thirdparty; // deprecated From 6a4468d94ea397695033249d40e73095970fd247 Mon Sep 17 00:00:00 2001 From: jfefe Date: Mon, 6 Oct 2014 14:18:28 +0200 Subject: [PATCH 0028/1060] Not need to test if class exists with require_once --- htdocs/core/class/commonobject.class.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 7c803a0b8a9..3ef8241f83f 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -576,8 +576,7 @@ abstract class CommonObject if (empty($this->socid)) return 0; - if (!class_exists('Societe')) - require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; + require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; $thirdparty = new Societe($this->db); $result=$thirdparty->fetch($this->socid); From 619bcb44df5bd39bc0af4aeab58b7a51d9465336 Mon Sep 17 00:00:00 2001 From: jean Date: Tue, 21 Oct 2014 19:02:48 +0200 Subject: [PATCH 0029/1060] object must be reloaded before creating pdf on confirmation and ordering --- htdocs/fourn/commande/fiche.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/htdocs/fourn/commande/fiche.php b/htdocs/fourn/commande/fiche.php index 00884d368f6..3c1d15ddc47 100644 --- a/htdocs/fourn/commande/fiche.php +++ b/htdocs/fourn/commande/fiche.php @@ -523,7 +523,8 @@ else if ($action == 'confirm_approve' && $confirm == 'yes' && $user->rights->fou if ($result > 0) { if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { - supplier_order_pdf_create($db, $object, $object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); + $ret=$object->fetch($object->id); // Reload to get new records + supplier_order_pdf_create($db, $object, $object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); } header("Location: ".$_SERVER["PHP_SELF"]."?id=".$object->id); exit; @@ -555,7 +556,8 @@ else if ($action == 'confirm_commande' && $confirm == 'yes' && $user->rights->fo if ($result > 0) { if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { - supplier_order_pdf_create($db, $object, $object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); + $ret=$object->fetch($object->id); // Reload to get new records + supplier_order_pdf_create($db, $object, $object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); } header("Location: ".$_SERVER["PHP_SELF"]."?id=".$object->id); exit; From eebf107d5fb984ca92906706495771c8b5f22ead Mon Sep 17 00:00:00 2001 From: Alexis Algoud Date: Mon, 27 Oct 2014 10:54:50 +0100 Subject: [PATCH 0030/1060] includes and show_documents --- htdocs/comm/action/card.php | 50 ++++++++++++++++++----- htdocs/core/class/html.formfile.class.php | 7 ++++ 2 files changed, 47 insertions(+), 10 deletions(-) diff --git a/htdocs/comm/action/card.php b/htdocs/comm/action/card.php index 607f8e14c4e..33e470d1445 100644 --- a/htdocs/comm/action/card.php +++ b/htdocs/comm/action/card.php @@ -28,19 +28,20 @@ */ require '../../main.inc.php'; -require_once DOL_DOCUMENT_ROOT.'/core/lib/agenda.lib.php'; -require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; -require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; -require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php'; -require_once DOL_DOCUMENT_ROOT.'/comm/action/class/cactioncomm.class.php'; -require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php'; -require_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php'; +dol_include_once('/core/lib/agenda.lib.php'); +dol_include_once('/core/lib/date.lib.php'); +dol_include_once('/contact/class/contact.class.php'); +dol_include_once('/user/class/user.class.php'); +dol_include_once('/comm/action/class/cactioncomm.class.php'); +dol_include_once('/comm/action/class/actioncomm.class.php'); +dol_include_once('/core/class/html.formactions.class.php'); +dol_include_once('/core/class/html.formfile.class.php'); if (! empty($conf->projet->enabled)) { - require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; - require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php'; + dol_include_once('/projet/class/project.class.php'); + dol_include_once('/core/class/html.formprojet.class.php'); } -require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; +dol_include_once('/core/class/extrafields.class.php'); $langs->load("companies"); $langs->load("commercial"); @@ -74,6 +75,7 @@ $cactioncomm = new CActionComm($db); $object = new ActionComm($db); $contact = new Contact($db); $extrafields = new ExtraFields($db); +$formfile = new FormFile($db); // fetch optionals attributes and labels $extralabels=$extrafields->fetch_name_optionals_label($object->table_element); @@ -1243,6 +1245,34 @@ if ($id > 0) if ($action != 'edit') { + + if (empty($conf->global->SOCIETE_DISABLE_BUILDDOC)) { + print '
'; + print ''; // ancre + + /* + * Documents generes + */ + + $filedir=$conf->agenda->multidir_output[$conf->entity].'/'.$object->id; + $urlsource=$_SERVER["PHP_SELF"]."?socid=".$object->id; + + $genallowed=$user->rights->agenda->myactions->create; + $delallowed=$user->rights->agenda->myactions->delete; + + $var=true; + + $somethingshown=$formfile->show_documents('agenda',$object->id,$filedir,$urlsource,$genallowed,$delallowed,'',0,0,0,0,0,'','','',$object->default_lang); + + print '
'; + + + print '
'; + + print '
 
'; + } + + // Link to agenda views print '
'; print '
'; diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index 674be61311d..2e316841696 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -301,6 +301,12 @@ class FormFile $modellist=ModeleThirdPartyDoc::liste_modeles($this->db); } } + + else if ($modulepart == 'agenda') + { + null; + } + else if ($modulepart == 'propal') { if (is_array($genallowed)) $modellist=$genallowed; @@ -433,6 +439,7 @@ class FormFile } else { + // For normalized standard modules $file=dol_buildpath('/core/modules/'.$modulepart.'/modules_'.$modulepart.'.php',0); if (file_exists($file)) From 4e1f9babaf4e8f823824371f67f9cb6b2dab5185 Mon Sep 17 00:00:00 2001 From: aspangaro Date: Mon, 3 Nov 2014 21:58:14 +0100 Subject: [PATCH 0031/1060] Merge --- htdocs/fichinter/card.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/fichinter/card.php b/htdocs/fichinter/card.php index 77c7e17ffb5..4ffc31c9cab 100644 --- a/htdocs/fichinter/card.php +++ b/htdocs/fichinter/card.php @@ -748,10 +748,10 @@ if ($action == 'send' && ! GETPOST('cancel','alpha') && (empty($conf->global->MA $actionmsg = $langs->transnoentities('MailSentBy').' '.$from.' '.$langs->transnoentities('To').' '.$sendto; if ($message) { - if ($sendtocc) $actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('Bcc') . ": " . $sendtocc); - $actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('MailTopic') . ": " . $subject); - $actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('TextUsedInTheMessageBody') . ":"); - $actionmsg = dol_concatdesc($actionmsg, $message); + if ($sendtocc) $actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('Bcc') . ": " . $sendtocc); + $actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('MailTopic') . ": " . $subject); + $actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('TextUsedInTheMessageBody') . ":"); + $actionmsg = dol_concatdesc($actionmsg, $message); } $actionmsg2=$langs->transnoentities("InterventionSentByEMail",$object->ref); } From af7f9e17077763232e967b6fbadca7536b8e5102 Mon Sep 17 00:00:00 2001 From: Alexis Algoud Date: Tue, 4 Nov 2014 16:08:07 +0100 Subject: [PATCH 0032/1060] no dol_include --- htdocs/comm/action/card.php | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/htdocs/comm/action/card.php b/htdocs/comm/action/card.php index 33e470d1445..3d899a14cbe 100644 --- a/htdocs/comm/action/card.php +++ b/htdocs/comm/action/card.php @@ -28,20 +28,21 @@ */ require '../../main.inc.php'; -dol_include_once('/core/lib/agenda.lib.php'); -dol_include_once('/core/lib/date.lib.php'); -dol_include_once('/contact/class/contact.class.php'); -dol_include_once('/user/class/user.class.php'); -dol_include_once('/comm/action/class/cactioncomm.class.php'); -dol_include_once('/comm/action/class/actioncomm.class.php'); -dol_include_once('/core/class/html.formactions.class.php'); -dol_include_once('/core/class/html.formfile.class.php'); +require_once DOL_DOCUMENT_ROOT.'/core/lib/agenda.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; +require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php'; +require_once DOL_DOCUMENT_ROOT.'/comm/action/class/cactioncomm.class.php'; +require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; + if (! empty($conf->projet->enabled)) { - dol_include_once('/projet/class/project.class.php'); - dol_include_once('/core/class/html.formprojet.class.php'); + require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; + require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php'; } -dol_include_once('/core/class/extrafields.class.php'); +require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; $langs->load("companies"); $langs->load("commercial"); From 24439eb1a31208118f7fb6150876f8d8a6c1149f Mon Sep 17 00:00:00 2001 From: Drosis Nikos Date: Fri, 7 Nov 2014 15:31:06 +0200 Subject: [PATCH 0033/1060] Fix : tva not coming from multiprice --- htdocs/compta/facture.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index 02356e94b52..25330ba548b 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -1152,6 +1152,8 @@ else if ($action == 'addline' && $user->rights->facture->creer) $pu_ttc = $prod->multiprices_ttc[$object->client->price_level]; $price_min = $prod->multiprices_min[$object->client->price_level]; $price_base_type = $prod->multiprices_base_type[$object->client->price_level]; + if (isset($prod->multiprices_tva_tx[$object->client->price_level])) $tva_tx=$prod->multiprices_tva_tx[$object->client->price_level]; + if (isset($prod->multiprices_recuperableonly[$object->client->price_level])) $tva_npr=$prod->multiprices_recuperableonly[$object->client->price_level]; } elseif (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)) { From 92cdef71e814ef21bd1b31ed3ad06af7e6387dab Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 8 Nov 2014 14:58:43 +0100 Subject: [PATCH 0034/1060] Fix: Graph report rubbish information. Better to have them as option. --- htdocs/product/index.php | 2 +- htdocs/societe/index.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/product/index.php b/htdocs/product/index.php index 33025dd1551..a8502498e41 100644 --- a/htdocs/product/index.php +++ b/htdocs/product/index.php @@ -167,7 +167,7 @@ print $total; print ''; print ''; -if (! empty($conf->categorie->enabled)) +if (! empty($conf->categorie->enabled) && ! empty($conf->global->CATEGORY_GRAPHSTATS_ON_PRODUCTS)) { require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; print '
'; diff --git a/htdocs/societe/index.php b/htdocs/societe/index.php index 3cf38a58b90..84fc4326fe4 100644 --- a/htdocs/societe/index.php +++ b/htdocs/societe/index.php @@ -159,7 +159,7 @@ print $total; print ''; print ''; -if (! empty($conf->categorie->enabled)) +if (! empty($conf->categorie->enabled) && ! empty($conf->global->CATEGORY_GRAPHSTATS_ON_THIRDPARTIES)) { require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; $elementtype = 'societe'; From e9f754395d280e614bd8f59f9a16e9055124c137 Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Mon, 10 Nov 2014 13:09:58 +0100 Subject: [PATCH 0035/1060] Start bank extrafields --- htdocs/compta/bank/class/account.class.php | 61 ++++++++++++++++++- htdocs/core/lib/bank.lib.php | 33 ++++++++++ .../llx_bank_account_extrafields.key.sql | 20 ++++++ .../tables/llx_bank_account_extrafields.sql | 26 ++++++++ 4 files changed, 138 insertions(+), 2 deletions(-) create mode 100644 htdocs/install/mysql/tables/llx_bank_account_extrafields.key.sql create mode 100644 htdocs/install/mysql/tables/llx_bank_account_extrafields.sql diff --git a/htdocs/compta/bank/class/account.class.php b/htdocs/compta/bank/class/account.class.php index e2a039cf2d8..a50a7f448a9 100644 --- a/htdocs/compta/bank/class/account.class.php +++ b/htdocs/compta/bank/class/account.class.php @@ -343,7 +343,7 @@ class Account extends CommonObject */ function create($user='') { - global $langs,$conf; + global $langs,$conf, $hookmanager; // Clean parameters if (! $this->min_allowed) $this->min_allowed=0; @@ -441,6 +441,23 @@ class Account extends CommonObject $this->error=$this->db->lasterror(); return -3; } + + // Actions on extra fields (by external module or standard code) + $hookmanager->initHooks(array('bankdao')); + $parameters=array('id'=>$this->id); + $reshook=$hookmanager->executeHooks('insertExtraFields',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks + if (empty($reshook)) + { + if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) // For avoid conflicts if trigger used + { + $result=$this->insertExtraFields(); + if ($result < 0) + { + return -4; + } + } + } + else if ($reshook < 0) return -5; } return $this->id; } @@ -466,7 +483,7 @@ class Account extends CommonObject */ function update($user='') { - global $langs,$conf; + global $langs,$conf, $hookmanager; // Clean parameters if (! $this->min_allowed) $this->min_allowed=0; @@ -517,6 +534,25 @@ class Account extends CommonObject $result = $this->db->query($sql); if ($result) { + + // Actions on extra fields (by external module or standard code) + $hookmanager->initHooks(array('bankdao')); + $parameters=array('id'=>$this->id); + $reshook=$hookmanager->executeHooks('insertExtraFields',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks + if (empty($reshook)) + { + if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) // For avoid conflicts if trigger used + { + $result=$this->insertExtraFields(); + if ($result < 0) + { + return -1; + } + } + } + else if ($reshook < 0) return -1; + + return 1; } else @@ -663,6 +699,15 @@ class Account extends CommonObject $this->min_allowed = $obj->min_allowed; $this->min_desired = $obj->min_desired; $this->comment = $obj->comment; + + // Retreive all extrafield for thirdparty + // fetch optionals attributes and labels + require_once(DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'); + $extrafields=new ExtraFields($this->db); + $extralabels=$extrafields->fetch_name_optionals_label($this->table_element,true); + $this->fetch_optionals($this->id,$extralabels); + + return 1; } else @@ -694,6 +739,18 @@ class Account extends CommonObject dol_syslog(get_class($this)."::delete", LOG_DEBUG); $result = $this->db->query($sql); if ($result) { + + // Remove extrafields + if ((empty($conf->global->MAIN_EXTRAFIELDS_DISABLED))) // For avoid conflicts if trigger used + { + $result=$this->deleteExtraFields(); + if ($result < 0) + { + return -1; + dol_syslog(get_class($this)."::delete error -4 ".$this->error, LOG_ERR); + } + } + return 1; } else { diff --git a/htdocs/core/lib/bank.lib.php b/htdocs/core/lib/bank.lib.php index 488a4c3a530..e3fb787657b 100644 --- a/htdocs/core/lib/bank.lib.php +++ b/htdocs/core/lib/bank.lib.php @@ -89,6 +89,39 @@ function bank_prepare_head($object) return $head; } +/** + * Prepare array with list of tabs + * + * @param Object $object Object related to tabs + * @return array Array of tabs to shoc + */ +function bank_admin_prepare_head($object) +{ + global $langs, $conf, $user; + $h = 0; + $head = array(); + + $head[$h][0] = DOL_URL_ROOT . '/admin/bank.php'; + $head[$h][1] = $langs->trans("Miscellaneous"); + $head[$h][2] = 'general'; + $h++; + + + // Show more tabs from modules + // Entries must be declared in modules descriptor with line + // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab + // $this->tabs = array('entity:-tabname); to remove a tab + complete_head_from_modules($conf, $langs, $object, $head, $h, 'bank_admin'); + + $head[$h][0] = DOL_URL_ROOT.'/admin/bank_extrafields.php'; + $head[$h][1] = $langs->trans("ExtraFields"); + $head[$h][2] = 'attributes'; + $h++; + + complete_head_from_modules($conf, $langs, $object, $head, $h, 'bank_admin', 'remove'); + + return $head; + } /** * Check account number informations for a bank account diff --git a/htdocs/install/mysql/tables/llx_bank_account_extrafields.key.sql b/htdocs/install/mysql/tables/llx_bank_account_extrafields.key.sql new file mode 100644 index 00000000000..0f6e8052115 --- /dev/null +++ b/htdocs/install/mysql/tables/llx_bank_account_extrafields.key.sql @@ -0,0 +1,20 @@ +-- =================================================================== +-- Copyright (C) 2014 Florian Henry +-- +-- 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 +-- the Free Software Foundation; either version 3 of the License, or +-- (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program. If not, see . +-- +-- =================================================================== + + +ALTER TABLE llx_bank_account_extrafields ADD INDEX idx_bank_account_extrafields (fk_object); diff --git a/htdocs/install/mysql/tables/llx_bank_account_extrafields.sql b/htdocs/install/mysql/tables/llx_bank_account_extrafields.sql new file mode 100644 index 00000000000..97b1508237c --- /dev/null +++ b/htdocs/install/mysql/tables/llx_bank_account_extrafields.sql @@ -0,0 +1,26 @@ +-- ======================================================================== +-- Copyright (C) 2014 Florian Henry +-- +-- 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 +-- the Free Software Foundation; either version 3 of the License, or +-- (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program. If not, see . +-- +-- ======================================================================== + +create table llx_bank_account_extrafields +( + rowid integer AUTO_INCREMENT PRIMARY KEY, + tms timestamp, + fk_object integer NOT NULL, + import_key varchar(14) -- import key +) ENGINE=innodb; + From 9c795d2c4b5f95bdd8f647e8ba7aa9b30fd106e3 Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Mon, 10 Nov 2014 13:18:27 +0100 Subject: [PATCH 0036/1060] Finnish bank extrafeilds --- htdocs/admin/bank.php | 4 + htdocs/admin/bank_extrafields.php | 154 ++++++++++++++++++++++++++++++ htdocs/compta/bank/card.php | 37 +++++++ 3 files changed, 195 insertions(+) create mode 100644 htdocs/admin/bank_extrafields.php diff --git a/htdocs/admin/bank.php b/htdocs/admin/bank.php index de1f7662373..9b5cb77e072 100644 --- a/htdocs/admin/bank.php +++ b/htdocs/admin/bank.php @@ -26,6 +26,7 @@ require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/bank.lib.php'; require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; $langs->load("admin"); @@ -89,6 +90,9 @@ print_fiche_titre($langs->trans("BankSetupModule"),$linkback,'setup'); print '
'; +$head = bank_admin_prepare_head(null); +dol_fiche_head($head, 'general', $langs->trans("BankSetupModule"), 0, 'account'); + print ''; print ''; print ''; diff --git a/htdocs/admin/bank_extrafields.php b/htdocs/admin/bank_extrafields.php new file mode 100644 index 00000000000..b28c8b417c3 --- /dev/null +++ b/htdocs/admin/bank_extrafields.php @@ -0,0 +1,154 @@ + + * Copyright (C) 2003 Jean-Louis Bergamo + * Copyright (C) 2004-2011 Laurent Destailleur + * Copyright (C) 2012 Regis Houssin + * Copyright (C) 2014 Florian Henry + * + * 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 + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/** + * \file htdocs/admin/bank_extrafields.php + * \ingroup bank + * \brief Page to setup extra fields of bank + */ + +require '../main.inc.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/bank.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; + +$langs->load("banks"); +$langs->load("admin"); + +$extrafields = new ExtraFields($db); +$form = new Form($db); + +// List of supported format +$tmptype2label=ExtraFields::$type2label; +$type2label=array(''); +foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->trans($val); + +$action=GETPOST('action', 'alpha'); +$attrname=GETPOST('attrname', 'alpha'); +$elementtype='bank_account'; //Must be the $element of the class that manage extrafield + +if (!$user->admin) accessforbidden(); + + +/* + * Actions + */ + +require DOL_DOCUMENT_ROOT.'/core/actions_extrafields.inc.php'; + + + +/* + * View + */ + +llxHeader('',$langs->trans("BankSetupModule"),$help_url); + + +$linkback=''.$langs->trans("BackToModuleList").''; +print_fiche_titre($langs->trans("BankSetupModule"),$linkback,'setup'); + + +$head = bank_admin_prepare_head(null); + +dol_fiche_head($head, 'attributes', $langs->trans("Bank"), 0, 'account'); + + +print $langs->trans("DefineHereComplementaryAttributes",$textobject).'
'."\n"; +print '
'; + +// Load attribute_label +$extrafields->fetch_name_optionals_label($elementtype); + +print "
'.$langs->trans("Parameters").'
"; + +print ''; +print ''; +print ''; +print ''; +print ''; +print ''; +print ''; +print ''; +print ''; +print "\n"; + +$var=True; +foreach($extrafields->attribute_type as $key => $value) +{ + $var=!$var; + print ""; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print '\n"; + print '\n"; + print '\n"; + print '\n"; + print ""; + // $i++; +} + +print "
'.$langs->trans("Position").''.$langs->trans("Label").''.$langs->trans("AttributeCode").''.$langs->trans("Type").''.$langs->trans("Size").''.$langs->trans("Unique").''.$langs->trans("Required").' 
".$extrafields->attribute_pos[$key]."".$extrafields->attribute_label[$key]."".$key."".$type2label[$extrafields->attribute_type[$key]]."'.$extrafields->attribute_size[$key]."'.yn($extrafields->attribute_unique[$key])."'.yn($extrafields->attribute_required[$key])."'.img_edit().''; + print "  ".img_delete()."
"; + +dol_fiche_end(); + + +// Buttons +if ($action != 'create' && $action != 'edit') +{ + print '
'; + print "".$langs->trans("NewAttribute").""; + print "
"; +} + + +/* ************************************************************************** */ +/* */ +/* Creation d'un champ optionnel + /* */ +/* ************************************************************************** */ + +if ($action == 'create') +{ + print "
"; + print_titre($langs->trans('NewAttribute')); + + require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php'; +} + +/* ************************************************************************** */ +/* */ +/* Edition d'un champ optionnel */ +/* */ +/* ************************************************************************** */ +if ($action == 'edit' && ! empty($attrname)) +{ + print "
"; + print_titre($langs->trans("FieldEdition", $attrname)); + + require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_edit.tpl.php'; +} + +llxFooter(); + +$db->close(); diff --git a/htdocs/compta/bank/card.php b/htdocs/compta/bank/card.php index 81596540489..9b4efe79eb1 100644 --- a/htdocs/compta/bank/card.php +++ b/htdocs/compta/bank/card.php @@ -31,6 +31,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formbank.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; +require_once DOL_DOCUMENT_ROOT . '/core/class/extrafields.class.php'; $langs->load("banks"); $langs->load("categories"); @@ -48,6 +49,10 @@ $fieldid = isset($_GET["ref"])?'ref':'rowid'; if ($user->societe_id) $socid=$user->societe_id; $result=restrictedArea($user,'banque',$id,'bank_account&bank_account','','',$fieldid); +$account = new Account($db); +$extrafields = new ExtraFields($db); +// fetch optionals attributes and labels +$extralabels=$extrafields->fetch_name_optionals_label($account->table_element); /* * Actions @@ -100,6 +105,9 @@ if ($_POST["action"] == 'add') $error++; } + // Fill array 'array_options' with data from add form + $ret = $extrafields->setOptionalsFromPost($extralabels,$account); + if (! $error) { $id = $account->create($user); @@ -172,6 +180,9 @@ if ($_POST["action"] == 'update' && ! $_POST["cancel"]) $error++; } + // Fill array 'array_options' with data from add form + $ret = $extrafields->setOptionalsFromPost($extralabels,$account); + if (! $error) { $result = $account->update($user); @@ -306,6 +317,15 @@ if ($action == 'create') $doleditor=new DolEditor('account_comment',$account->comment,'',200,'dolibarr_notes','',false,true,$conf->global->FCKEDITOR_ENABLE_SOCIETE,10,70); $doleditor->Create(); print ''; + + // Other attributes + $parameters=array('colspan' => 3); + $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$account,$action); // Note that $action and $object may have been modified by hook + if (empty($reshook) && ! empty($extrafields->attribute_label)) + { + print $account->showOptionals($extrafields,'edit',$parameters); + } + print ''; @@ -461,6 +481,14 @@ else print ''.$langs->trans("Comment").''; print ''.$account->comment.''; + // Other attributes + $parameters=array('colspan' => 3); + $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$account,$action); // Note that $action and $object may have been modified by hook + if (empty($reshook) && ! empty($extrafields->attribute_label)) + { + print $account->showOptionals($extrafields); + } + print ''; print '
'; @@ -615,6 +643,15 @@ else $doleditor->Create(); print ''; + // Other attributes + $parameters=array('colspan' => 3); + $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$account,$action); // Note that $action and $object may have been modified by hook + if (empty($reshook) && ! empty($extrafields->attribute_label)) + { + print $account->showOptionals($extrafields,'edit'); + } + + print ''; print '
'; From 7c617b3515261a95c80f43855de2e8a91abaa561 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Tue, 11 Nov 2014 11:21:31 +0100 Subject: [PATCH 0037/1060] Update card.php --- htdocs/expedition/card.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/expedition/card.php b/htdocs/expedition/card.php index 8984e4c5424..1b1dbedfe59 100644 --- a/htdocs/expedition/card.php +++ b/htdocs/expedition/card.php @@ -664,7 +664,8 @@ if ($action == 'create') print ''.$langs->trans("DateDeliveryPlanned").''; print ''; //print dol_print_date($object->date_livraison,"day"); // date_livraison come from order and will be stored into date_delivery planed. - print $form->select_date($object->date_livraison?$object->date_livraison:-1,'date_delivery',1,1); + $date_delivery = ($date_delivery?$date_delivery:$object->date_livraison); // $date_delivery comes from GETPOST + print $form->select_date($date_delivery?$date_delivery:-1,'date_delivery',1,1); print "\n"; print ''; From 7ed496d7d9e64664fa502dfa8bd6072599665702 Mon Sep 17 00:00:00 2001 From: Christophe Battarel Date: Wed, 12 Nov 2014 17:51:26 +0100 Subject: [PATCH 0038/1060] FIX: copy extrafields when creating order from propale and creating invoice from order --- htdocs/commande/class/commande.class.php | 12 +++++++++++- htdocs/compta/facture/class/facture.class.php | 10 ++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index 7a8fd63c8f1..d1a776d3d24 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -972,7 +972,12 @@ class Commande extends CommonOrder $line->marge_tx = $marginInfos[1]; $line->marque_tx = $marginInfos[2]; - $this->lines[$i] = $line; + // get extrafields from original line + $object->lines[$i]->fetch_optionals($object->lines[$i]->rowid); + foreach($object->lines[$i]->array_options as $options_key => $value) + $line->array_options[$options_key] = $value; + + $this->lines[$i] = $line; } $this->socid = $object->socid; @@ -991,6 +996,11 @@ class Commande extends CommonOrder $this->origin = $object->element; $this->origin_id = $object->id; + // get extrafields from original line + $object->fetch_optionals($object->id); + foreach($object->array_options as $options_key => $value) + $this->array_options[$options_key] = $value; + // Possibility to add external linked objects with hooks $this->linked_objects[$this->origin] = $this->origin_id; if (is_array($object->other_linked_objects) && ! empty($object->other_linked_objects)) diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index 93e245746a0..0d91d7944b8 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -701,6 +701,11 @@ class Facture extends CommonInvoice $marginInfos = getMarginInfos($object->lines[$i]->subprice, $object->lines[$i]->remise_percent, $object->lines[$i]->tva_tx, $object->lines[$i]->localtax1_tx, $object->lines[$i]->localtax2_tx, $object->lines[$i]->fk_fournprice, $object->lines[$i]->pa_ht); $line->pa_ht = $marginInfos[0]; + // get extrafields from original line + $object->lines[$i]->fetch_optionals($object->lines[$i]->rowid); + foreach($object->lines[$i]->array_options as $options_key => $value) + $line->array_options[$options_key] = $value; + $this->lines[$i] = $line; } @@ -720,6 +725,11 @@ class Facture extends CommonInvoice $this->origin = $object->element; $this->origin_id = $object->id; + // get extrafields from original line + $object->fetch_optionals($object->id); + foreach($object->array_options as $options_key => $value) + $this->array_options[$options_key] = $value; + // Possibility to add external linked objects with hooks $this->linked_objects[$this->origin] = $this->origin_id; if (! empty($object->other_linked_objects) && is_array($object->other_linked_objects)) From c0a3606a595fa21a015ef262ce98fd0e32453412 Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Wed, 12 Nov 2014 22:53:23 +0100 Subject: [PATCH 0039/1060] Fix problem on task creation with chrome for french browser. --- htdocs/core/lib/functions.lib.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index e238b1e5834..d679882161f 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -1053,7 +1053,11 @@ function dol_mktime($hour,$minute,$second,$month,$day,$year,$gm=false,$check=1) $default_timezone=@date_default_timezone_get(); } } - else $localtz = new DateTimeZone('UTC'); + + if (empty($localtz)) { + $localtz = new DateTimeZone('UTC'); + } + $dt = new DateTime(null,$localtz); $dt->setDate($year,$month,$day); $dt->setTime((int) $hour, (int) $minute, (int) $second); From 00c6033e11b35d5f004fddacd82f3f3464d1ea9e Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Fri, 14 Nov 2014 13:28:49 +0100 Subject: [PATCH 0040/1060] Fix display user signature when WYSIWYG is enabled --- htdocs/user/fiche.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/htdocs/user/fiche.php b/htdocs/user/fiche.php index a0523bcbc28..9b1845d6bff 100644 --- a/htdocs/user/fiche.php +++ b/htdocs/user/fiche.php @@ -1208,7 +1208,11 @@ else // Signature print ''.$langs->trans('Signature').''; - print dol_htmlentitiesbr($object->signature); + if (empty($conf->global->FCKEDITOR_ENABLE_USERSIGN)) { + print dol_htmlentitiesbr($object->signature); + } else { + print $object->signature; + } print "\n"; // Hierarchy From 10117d045f9fdf73e7cdd6347d388783a24b6cc5 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 16 Nov 2014 16:15:31 +0100 Subject: [PATCH 0041/1060] Fixed #1637 --- htdocs/install/mysql/migration/3.6.0-3.7.0.sql | 5 +++++ htdocs/install/mysql/tables/llx_contrat.sql | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/htdocs/install/mysql/migration/3.6.0-3.7.0.sql b/htdocs/install/mysql/migration/3.6.0-3.7.0.sql index e4fbcfbec9a..de02887abf8 100755 --- a/htdocs/install/mysql/migration/3.6.0-3.7.0.sql +++ b/htdocs/install/mysql/migration/3.6.0-3.7.0.sql @@ -27,6 +27,11 @@ insert into llx_c_action_trigger (code,label,description,elementtype,rang) value insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('FICHINTER_REOPEN','Intervention opened','Executed when a intervention is re-opened','ficheinter',19); insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('PROPAL_CLASSIFY_BILLED','Customer proposal set billed','Executed when a customer proposal is set to billed','propal',2); +-- VPGSQL8.2 ALTER TABLE llx_contrat ALTER COLUMN fk_commercial_signature DROP NOT NULL; +-- VPGSQL8.2 ALTER TABLE llx_contrat ALTER COLUMN fk_commercial_suivi DROP NOT NULL; +ALTER TABLE llx_contrat MODIFY fk_commercial_signature integer NULL; +ALTER TABLE llx_contrat MODIFY fk_commercial_suivi integer NULL; + ALTER TABLE llx_notify ADD COLUMN fk_soc integer NULL after fk_action; ALTER TABLE llx_notify ADD COLUMN type varchar(16) DEFAULT 'email' after fk_soc; diff --git a/htdocs/install/mysql/tables/llx_contrat.sql b/htdocs/install/mysql/tables/llx_contrat.sql index 4631b660d46..5efbcdfe1fa 100644 --- a/htdocs/install/mysql/tables/llx_contrat.sql +++ b/htdocs/install/mysql/tables/llx_contrat.sql @@ -33,8 +33,8 @@ create table llx_contrat date_cloture datetime, fk_soc integer NOT NULL, fk_projet integer, - fk_commercial_signature integer NOT NULL, -- obsolete - fk_commercial_suivi integer NOT NULL, -- obsolete + fk_commercial_signature integer, -- obsolete + fk_commercial_suivi integer, -- obsolete fk_user_author integer NOT NULL default 0, fk_user_mise_en_service integer, fk_user_cloture integer, From 01279edfc82213a4b875d709c5e452a44bfc791f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 16 Nov 2014 16:36:32 +0100 Subject: [PATCH 0042/1060] Fixed: [ bug #1570 ] Negative supplier invoices do not appear in bank planned transactions. --- htdocs/compta/bank/treso.php | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/htdocs/compta/bank/treso.php b/htdocs/compta/bank/treso.php index f6c59530605..b9274c34eb5 100644 --- a/htdocs/compta/bank/treso.php +++ b/htdocs/compta/bank/treso.php @@ -164,7 +164,7 @@ if ($_REQUEST["account"] || $_REQUEST["ref"]) $sql.= " ORDER BY dlr ASC"; // Supplier invoices - $sql2= " SELECT 'invoice_supplier' as family, ff.rowid as objid, ff.ref_supplier as ref, (-1*ff.total_ttc) as total_ttc, ff.type, ff.date_lim_reglement as dlr,"; + $sql2= " SELECT 'invoice_supplier' as family, ff.rowid as objid, ff.ref as ref, ff.ref_supplier as ref_supplier, (-1*ff.total_ttc) as total_ttc, ff.type, ff.date_lim_reglement as dlr,"; $sql2.= " s.rowid as socid, s.nom, s.fournisseur"; $sql2.= " FROM ".MAIN_DB_PREFIX."facture_fourn as ff"; $sql2.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON ff.fk_soc = s.rowid"; @@ -260,12 +260,13 @@ if ($_REQUEST["account"] || $_REQUEST["ref"]) if ($obj->family == 'invoice_supplier') { - // TODO This code is to avoid to count suppliers credit note (ff.type = 2) - // Ajouter gestion des avoirs fournisseurs, champ - if (($obj->total_ttc < 0 && $obj->type != 2) - || ($obj->total_ttc > 0 && $obj->type == 2)) + $showline=1; + // Uncomment this line to avoid to count suppliers credit note (ff.type = 2) + //$showline=(($obj->total_ttc < 0 && $obj->type != 2) || ($obj->total_ttc > 0 && $obj->type == 2)) + if ($showline) { - $facturefournstatic->ref=$obj->ref; + $ref=$obj->ref; + $facturefournstatic->ref=$ref; $facturefournstatic->id=$obj->objid; $facturefournstatic->type=$obj->type; $ref = $facturefournstatic->getNomUrl(1,''); @@ -304,7 +305,7 @@ if ($_REQUEST["account"] || $_REQUEST["ref"]) if ($paiement) $total_ttc = $obj->total_ttc - $paiement; $solde += $total_ttc; - // We discard with a remain to pay to 0 + // We discard lines with a remainder to pay to 0 if (price2num($total_ttc) != 0) { $var=!$var; From 8d4fc263c5f2bccc833127e194999ce6c57bc12d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 16 Nov 2014 18:37:09 +0100 Subject: [PATCH 0043/1060] Fix: Var not defined --- htdocs/accountancy/class/bookkeeping.class.php | 2 ++ .../accountancy/journal/purchasesjournal.php | 18 ++++++++++++------ 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/htdocs/accountancy/class/bookkeeping.class.php b/htdocs/accountancy/class/bookkeeping.class.php index 2788526de05..861de271dab 100644 --- a/htdocs/accountancy/class/bookkeeping.class.php +++ b/htdocs/accountancy/class/bookkeeping.class.php @@ -30,6 +30,8 @@ class BookKeeping { var $db; + var $error; + var $id; var $doc_date; var $doc_type; diff --git a/htdocs/accountancy/journal/purchasesjournal.php b/htdocs/accountancy/journal/purchasesjournal.php index 97d52124c01..d2f204c6b8c 100644 --- a/htdocs/accountancy/journal/purchasesjournal.php +++ b/htdocs/accountancy/journal/purchasesjournal.php @@ -58,8 +58,10 @@ if ($user->societe_id > 0) $action = GETPOST('action'); + + /* - * View + * Actions */ $year_current = strftime("%Y", dol_now()); @@ -152,9 +154,6 @@ if ($result) { dol_print_error($db); } -/* - * Actions -*/ // Bookkeeping Write if ($action == 'writebookkeeping') { $now = dol_now(); @@ -237,9 +236,16 @@ if ($action == 'writebookkeeping') { } } -// export csv -if ($action == 'export_csv') { +/* + * View + */ + +$companystatic = new Societe($db); + +// export csv +if ($action == 'export_csv') +{ $sep = $conf->global->ACCOUNTING_SEPARATORCSV; header('Content-Type: text/csv'); From 737dfab5b24e0b8c91b82a69f915bd26c76f0b18 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 16 Nov 2014 19:12:05 +0100 Subject: [PATCH 0044/1060] Fix: If error on add line of type "product" when creating proposal/order/invoice, do not show date of services. --- htdocs/comm/propal.php | 2 +- htdocs/core/tpl/objectline_create.tpl.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php index 3eeef6916eb..6d23d3a982d 100644 --- a/htdocs/comm/propal.php +++ b/htdocs/comm/propal.php @@ -2000,7 +2000,7 @@ if ($action == 'create') { $var = true; - // Add free products/services + // Add products/services form $object->formAddObjectLine(1, $mysoc, $soc); $parameters = array(); diff --git a/htdocs/core/tpl/objectline_create.tpl.php b/htdocs/core/tpl/objectline_create.tpl.php index 86ef648bf94..a69ab60c254 100644 --- a/htdocs/core/tpl/objectline_create.tpl.php +++ b/htdocs/core/tpl/objectline_create.tpl.php @@ -271,7 +271,7 @@ else { service->enabled) && $dateSelector) +if (! empty($conf->service->enabled) && $dateSelector && GETPOST('type') != '0') { if(! empty($conf->global->MAIN_VIEW_LINE_NUMBER)) $colspan = 10; else $colspan = 9; From ec20b38adc40a317d6cd9773dd75c20644caa1bc Mon Sep 17 00:00:00 2001 From: Antoine Sirinelli Date: Sun, 16 Nov 2014 23:56:10 +0100 Subject: [PATCH 0045/1060] Add EIRL in llx_c_forme_juridique MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This a not so new French type of company: Entreprise Individuelle à Responsabilité Limitée (EIRL). Migration script also added. --- htdocs/install/mysql/data/llx_c_forme_juridique.sql | 2 +- htdocs/install/mysql/migration/3.6.0-3.7.0.sql | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/install/mysql/data/llx_c_forme_juridique.sql b/htdocs/install/mysql/data/llx_c_forme_juridique.sql index 513c8b527d2..a0e1e058860 100644 --- a/htdocs/install/mysql/data/llx_c_forme_juridique.sql +++ b/htdocs/install/mysql/data/llx_c_forme_juridique.sql @@ -84,7 +84,7 @@ insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'56','Soci insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'57','Société par actions simplifiée (SAS)'); insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'58','Entreprise Unipersonnelle à Responsabilité Limitée (EURL)'); insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'59','Société par actions simplifiée unipersonnelle (SASU)'); - +insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'60', 'Entreprise Individuelle à Responsabilité Limitée (EIRL)'); insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'61','Caisse d''épargne et de prévoyance'); insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'62','Groupement d''intérêt économique (GIE)'); insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'63','Société coopérative agricole'); diff --git a/htdocs/install/mysql/migration/3.6.0-3.7.0.sql b/htdocs/install/mysql/migration/3.6.0-3.7.0.sql index de02887abf8..2986e73cc81 100755 --- a/htdocs/install/mysql/migration/3.6.0-3.7.0.sql +++ b/htdocs/install/mysql/migration/3.6.0-3.7.0.sql @@ -18,6 +18,7 @@ -- -- VPGSQL8.2 DELETE FROM llx_usergroup_user WHERE fk_user NOT IN (SELECT rowid from llx_user); -- -- VMYSQL4.1 DELETE FROM llx_usergroup_user WHERE fk_usergroup NOT IN (SELECT rowid from llx_usergroup); +INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle, active) VALUES (1, '60', 'Entreprise Individuelle à Responsabilité Limitée (EIRL)', 1); --insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('FICHINTER_MODIFY','Intervention modified','Executed when a intervention is modified','ficheinter',19); --insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('FICHINTER_DELETE','Intervention delete','Executed when a intervention is delete','ficheinter',19); From dfc5a98dc134ef76284d62044bdfa1306f78a919 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 17 Nov 2014 01:05:30 +0100 Subject: [PATCH 0046/1060] =?UTF-8?q?Fix:=20[=20bug=20#1631=20]=20technica?= =?UTF-8?q?l=20error=20in=20the=20display=20of=20associated=20objects=20/?= =?UTF-8?q?=20erreur=20technique=20=C3=A0=20l'affichage=20des=20objets=20a?= =?UTF-8?q?ssoci=C3=A9s=20=C3=A0=20un=20projet?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/projet/class/project.class.php | 4 ++-- htdocs/projet/element.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/projet/class/project.class.php b/htdocs/projet/class/project.class.php index f294fa560ac..738eec46ec0 100644 --- a/htdocs/projet/class/project.class.php +++ b/htdocs/projet/class/project.class.php @@ -411,13 +411,13 @@ class Project extends CommonObject { if (empty($datefieldname) && ! empty($this->table_element_date)) $datefieldname=$this->table_element_date; if (empty($datefieldname)) return 'Error this object has no date field defined'; - $sql.=" AND ".$datefieldname." >= '".$this->db->jdate($dates)."'"; + $sql.=" AND ".$datefieldname." >= '".$this->db->idate($dates)."'"; } if ($datee > 0) { if (empty($datefieldname) && ! empty($this->table_element_date)) $datefieldname=$this->table_element_date; if (empty($datefieldname)) return 'Error this object has no date field defined'; - $sql.=" AND ".$datefieldname." <= '".$this->db->jdate($datee)."'"; + $sql.=" AND ".$datefieldname." <= '".$this->db->idate($datee)."'"; } if (! $sql) return -1; diff --git a/htdocs/projet/element.php b/htdocs/projet/element.php index c7f772ef93d..1d4218d1cb9 100644 --- a/htdocs/projet/element.php +++ b/htdocs/projet/element.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2010 Laurent Destailleur + * Copyright (C) 2004-2014 Laurent Destailleur * Copyright (C) 2005-2010 Regis Houssin * Copyright (C) 2012 Juanjo Menent * @@ -155,7 +155,7 @@ print ''; print ''; -print '
'; +dol_fiche_end(); /* From 05059da9e8880d0e66a9b2dc22ca357f64dfc32d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 17 Nov 2014 01:05:30 +0100 Subject: [PATCH 0047/1060] =?UTF-8?q?Fix:=20[=20bug=20#1631=20]=20technica?= =?UTF-8?q?l=20error=20in=20the=20display=20of=20associated=20objects=20/?= =?UTF-8?q?=20erreur=20technique=20=C3=A0=20l'affichage=20des=20objets=20a?= =?UTF-8?q?ssoci=C3=A9s=20=C3=A0=20un=20projet?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/projet/class/project.class.php | 4 ++-- htdocs/projet/element.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/projet/class/project.class.php b/htdocs/projet/class/project.class.php index f294fa560ac..738eec46ec0 100644 --- a/htdocs/projet/class/project.class.php +++ b/htdocs/projet/class/project.class.php @@ -411,13 +411,13 @@ class Project extends CommonObject { if (empty($datefieldname) && ! empty($this->table_element_date)) $datefieldname=$this->table_element_date; if (empty($datefieldname)) return 'Error this object has no date field defined'; - $sql.=" AND ".$datefieldname." >= '".$this->db->jdate($dates)."'"; + $sql.=" AND ".$datefieldname." >= '".$this->db->idate($dates)."'"; } if ($datee > 0) { if (empty($datefieldname) && ! empty($this->table_element_date)) $datefieldname=$this->table_element_date; if (empty($datefieldname)) return 'Error this object has no date field defined'; - $sql.=" AND ".$datefieldname." <= '".$this->db->jdate($datee)."'"; + $sql.=" AND ".$datefieldname." <= '".$this->db->idate($datee)."'"; } if (! $sql) return -1; diff --git a/htdocs/projet/element.php b/htdocs/projet/element.php index c7f772ef93d..1d4218d1cb9 100644 --- a/htdocs/projet/element.php +++ b/htdocs/projet/element.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2010 Laurent Destailleur + * Copyright (C) 2004-2014 Laurent Destailleur * Copyright (C) 2005-2010 Regis Houssin * Copyright (C) 2012 Juanjo Menent * @@ -155,7 +155,7 @@ print ''; print ''; -print ''; +dol_fiche_end(); /* From d0dc792b3cd829c6ef86fa555f880ed8400d3deb Mon Sep 17 00:00:00 2001 From: Christophe Battarel Date: Mon, 17 Nov 2014 11:17:45 +0100 Subject: [PATCH 0048/1060] check extrafields before inserting in DB --- htdocs/core/class/commonobject.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index e363eda6e4a..5af3f5a93c3 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -2195,7 +2195,7 @@ abstract class CommonObject { $attributeKey = substr($key,8); // Remove 'options_' prefix // Add field of attribut - if ($extrafields->attribute_type[$attributeKey] != 'separate') // Only for other type of separate + if (isset($extrafields->attribute_type[$attributeKey]) && $extrafields->attribute_type[$attributeKey] != 'separate') // Only for other type of separate $sql.=",".$attributeKey; } $sql .= ") VALUES (".$this->id; @@ -2203,7 +2203,7 @@ abstract class CommonObject { $attributeKey = substr($key,8); // Remove 'options_' prefix // Add field o fattribut - if($extrafields->attribute_type[$attributeKey] != 'separate') // Only for other type of separate) + if(isset($extrafields->attribute_type[$attributeKey]) && $extrafields->attribute_type[$attributeKey] != 'separate') // Only for other type of separate) { if ($this->array_options[$key] != '') { From a9a8e9a73ce981e44aeac7b75ad834256e7f3265 Mon Sep 17 00:00:00 2001 From: Andrelec1 Date: Mon, 17 Nov 2014 14:55:22 +0100 Subject: [PATCH 0049/1060] Fix : more than 1000 holidays MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Si il y a plus de 1000 jours de congés, le délimiteur des millier fais bugger les calcule ... --- htdocs/fichinter/card.php | 8 ++++---- htdocs/holiday/card.php | 1 - htdocs/holiday/class/holiday.class.php | 3 ++- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/htdocs/fichinter/card.php b/htdocs/fichinter/card.php index 77c7e17ffb5..4ffc31c9cab 100644 --- a/htdocs/fichinter/card.php +++ b/htdocs/fichinter/card.php @@ -748,10 +748,10 @@ if ($action == 'send' && ! GETPOST('cancel','alpha') && (empty($conf->global->MA $actionmsg = $langs->transnoentities('MailSentBy').' '.$from.' '.$langs->transnoentities('To').' '.$sendto; if ($message) { - if ($sendtocc) $actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('Bcc') . ": " . $sendtocc); - $actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('MailTopic') . ": " . $subject); - $actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('TextUsedInTheMessageBody') . ":"); - $actionmsg = dol_concatdesc($actionmsg, $message); + if ($sendtocc) $actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('Bcc') . ": " . $sendtocc); + $actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('MailTopic') . ": " . $subject); + $actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('TextUsedInTheMessageBody') . ":"); + $actionmsg = dol_concatdesc($actionmsg, $message); } $actionmsg2=$langs->transnoentities("InterventionSentByEMail",$object->ref); } diff --git a/htdocs/holiday/card.php b/htdocs/holiday/card.php index 31a4e40599f..bbffe26cf9c 100644 --- a/htdocs/holiday/card.php +++ b/htdocs/holiday/card.php @@ -761,7 +761,6 @@ if (empty($id) || $action == 'add' || $action == 'request' || $action == 'create print ''; } else print $form->select_users(GETPOST('userid')?GETPOST('userid'):$user->id,'userid',0,'',0); - //var_dump($cp->getConfCP('nbHolidayDeducted')); $nb_holiday = $cp->getCPforUser($user->id) / $cp->getConfCP('nbHolidayDeducted'); print '   '.$langs->trans('SoldeCPUser', round($nb_holiday,2)).''; print ''; diff --git a/htdocs/holiday/class/holiday.class.php b/htdocs/holiday/class/holiday.class.php index 5381c99df07..2ecf8edfce3 100644 --- a/htdocs/holiday/class/holiday.class.php +++ b/htdocs/holiday/class/holiday.class.php @@ -1045,7 +1045,8 @@ class Holiday extends CommonObject $result = $this->db->query($sql); if($result) { $obj = $this->db->fetch_object($result); - return number_format($obj->nb_holiday,2); + //return number_format($obj->nb_holiday,2); + return $obj->nb_holiday; } else { return '0'; } From 7a7097a1065e8f78d56ed92f09ac04898fcc6536 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Doursenaud?= Date: Mon, 17 Nov 2014 14:58:48 +0100 Subject: [PATCH 0050/1060] Work around bug #1643 --- dev/initdata/mysqldump_dolibarr_3.6.0.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev/initdata/mysqldump_dolibarr_3.6.0.sql b/dev/initdata/mysqldump_dolibarr_3.6.0.sql index 77cbbcc511f..b1b8d77aa3c 100644 --- a/dev/initdata/mysqldump_dolibarr_3.6.0.sql +++ b/dev/initdata/mysqldump_dolibarr_3.6.0.sql @@ -4867,7 +4867,7 @@ CREATE TABLE `llx_opensurvey_sondage` ( `mailsonde` tinyint(4) NOT NULL DEFAULT '0', `survey_link_visible` int(11) DEFAULT '1', `origin` varchar(64) DEFAULT NULL, - `tms` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id_sondage`), KEY `idx_id_sondage_admin` (`id_sondage_admin`), KEY `idx_date_fin` (`date_fin`) From 079dbf9fbdc800520cb9876ee15daf1ca6f0867c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Doursenaud?= Date: Mon, 17 Nov 2014 14:59:14 +0100 Subject: [PATCH 0051/1060] Work around bug #1644 --- htdocs/install/mysql/migration/3.6.0-3.7.0.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/install/mysql/migration/3.6.0-3.7.0.sql b/htdocs/install/mysql/migration/3.6.0-3.7.0.sql index de02887abf8..08b78572c14 100755 --- a/htdocs/install/mysql/migration/3.6.0-3.7.0.sql +++ b/htdocs/install/mysql/migration/3.6.0-3.7.0.sql @@ -90,7 +90,6 @@ ALTER TABLE llx_bank_account ADD COLUMN accountancy_journal varchar(3) DEFAULT N ALTER TABLE llx_accountingaccount add column entity integer DEFAULT 1 NOT NULL AFTER rowid; ALTER TABLE llx_accountingaccount add column datec datetime AFTER entity; -ALTER TABLE llx_accountingaccount add column tms timestamp AFTER datec; ALTER TABLE llx_accountingaccount add column fk_user_author integer DEFAULT NULL AFTER label; ALTER TABLE llx_accountingaccount add column fk_user_modif integer DEFAULT NULL AFTER fk_user_author; @@ -127,6 +126,7 @@ DROP TABLE llx_compta_compte_generaux; -- Align size for accounting account ALTER TABLE llx_accountingaccount MODIFY COLUMN account_number varchar(32); ALTER TABLE llx_accountingaccount MODIFY COLUMN account_parent varchar(32); +ALTER TABLE llx_accountingaccount add column tms timestamp AFTER datec; ALTER TABLE llx_accountingdebcred MODIFY COLUMN account_number varchar(32); ALTER TABLE llx_bank_account MODIFY COLUMN account_number varchar(32); ALTER TABLE llx_c_chargesociales MODIFY COLUMN accountancy_code varchar(32); From f4a63b498bb76edda10634b62306408d30743f10 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 17 Nov 2014 15:09:52 +0100 Subject: [PATCH 0052/1060] Fix: bugs reported by scrutinizer --- htdocs/accountancy/class/bookkeeping.class.php | 1 + htdocs/core/class/extrafields.class.php | 7 +++---- htdocs/install/mysql/migration/repair.sql | 10 ++++++++++ 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/htdocs/accountancy/class/bookkeeping.class.php b/htdocs/accountancy/class/bookkeeping.class.php index 861de271dab..6291790d008 100644 --- a/htdocs/accountancy/class/bookkeeping.class.php +++ b/htdocs/accountancy/class/bookkeeping.class.php @@ -31,6 +31,7 @@ class BookKeeping { var $db; var $error; + var $errors; var $id; var $doc_date; diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index 5448df14010..a4396624f86 100644 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -535,8 +535,7 @@ class ExtraFields $array_name_label=array(); // For avoid conflicts with external modules - if (!$forceload && !empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) - return $array_name_label; + if (!$forceload && !empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) return $array_name_label; $sql = "SELECT rowid,name,label,type,size,elementtype,fieldunique,fieldrequired,param,pos,alwayseditable"; $sql.= " FROM ".MAIN_DB_PREFIX."extrafields"; @@ -569,13 +568,13 @@ class ExtraFields $this->attribute_alwayseditable[$tab->name]=$tab->alwayseditable; } } - - return $array_name_label; } else { print dol_print_error($this->db); } + + return $array_name_label; } diff --git a/htdocs/install/mysql/migration/repair.sql b/htdocs/install/mysql/migration/repair.sql index 4083ba2f7b9..9b81f0ca78d 100755 --- a/htdocs/install/mysql/migration/repair.sql +++ b/htdocs/install/mysql/migration/repair.sql @@ -204,3 +204,13 @@ UPDATE llx_projet_task_time set task_datehour = task_date where task_datehour IS -- GRANT ALL ON *.* TO 'myuser'@'%'; -- flush privileges; +-- Fix type of product 2 does not exists +update llx_propaldet set product_type = 1 where product_type = 2; +update llx_commandedet set product_type = 1 where product_type = 2; +update llx_facturedet set product_type = 1 where product_type = 2; +--update llx_propaldet as d set d.product_type = 1 where d.fk_product = 22 and d.product_type = 0; +--update llx_commandedet as d set d.product_type = 1 where d.fk_product = 22 and d.product_type = 0; +--update llx_facturedet as d set d.product_type = 1 where d.fk_product = 22 and d.product_type = 0; + + + From 31f987706ca4abe415b856daca088be85627f2a1 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 17 Nov 2014 15:09:52 +0100 Subject: [PATCH 0053/1060] Fix: bugs reported by scrutinizer --- htdocs/accountancy/class/bookkeeping.class.php | 1 + htdocs/core/class/extrafields.class.php | 7 +++---- htdocs/install/mysql/migration/repair.sql | 10 ++++++++++ 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/htdocs/accountancy/class/bookkeeping.class.php b/htdocs/accountancy/class/bookkeeping.class.php index 861de271dab..6291790d008 100644 --- a/htdocs/accountancy/class/bookkeeping.class.php +++ b/htdocs/accountancy/class/bookkeeping.class.php @@ -31,6 +31,7 @@ class BookKeeping { var $db; var $error; + var $errors; var $id; var $doc_date; diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index 5448df14010..a4396624f86 100644 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -535,8 +535,7 @@ class ExtraFields $array_name_label=array(); // For avoid conflicts with external modules - if (!$forceload && !empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) - return $array_name_label; + if (!$forceload && !empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) return $array_name_label; $sql = "SELECT rowid,name,label,type,size,elementtype,fieldunique,fieldrequired,param,pos,alwayseditable"; $sql.= " FROM ".MAIN_DB_PREFIX."extrafields"; @@ -569,13 +568,13 @@ class ExtraFields $this->attribute_alwayseditable[$tab->name]=$tab->alwayseditable; } } - - return $array_name_label; } else { print dol_print_error($this->db); } + + return $array_name_label; } diff --git a/htdocs/install/mysql/migration/repair.sql b/htdocs/install/mysql/migration/repair.sql index 4083ba2f7b9..9b81f0ca78d 100755 --- a/htdocs/install/mysql/migration/repair.sql +++ b/htdocs/install/mysql/migration/repair.sql @@ -204,3 +204,13 @@ UPDATE llx_projet_task_time set task_datehour = task_date where task_datehour IS -- GRANT ALL ON *.* TO 'myuser'@'%'; -- flush privileges; +-- Fix type of product 2 does not exists +update llx_propaldet set product_type = 1 where product_type = 2; +update llx_commandedet set product_type = 1 where product_type = 2; +update llx_facturedet set product_type = 1 where product_type = 2; +--update llx_propaldet as d set d.product_type = 1 where d.fk_product = 22 and d.product_type = 0; +--update llx_commandedet as d set d.product_type = 1 where d.fk_product = 22 and d.product_type = 0; +--update llx_facturedet as d set d.product_type = 1 where d.fk_product = 22 and d.product_type = 0; + + + From a82953ef70c2848bcc64daad519062ed81d1fe00 Mon Sep 17 00:00:00 2001 From: aspangaro Date: Mon, 17 Nov 2014 21:18:26 +0100 Subject: [PATCH 0054/1060] #1681 Clear sort filter works partially in customers list --- htdocs/comm/list.php | 31 +++++++++++++------------------ 1 file changed, 13 insertions(+), 18 deletions(-) diff --git a/htdocs/comm/list.php b/htdocs/comm/list.php index ac354d4d08d..ce7eb82f9a1 100644 --- a/htdocs/comm/list.php +++ b/htdocs/comm/list.php @@ -48,13 +48,12 @@ $pagenext = $page + 1; if (! $sortorder) $sortorder="ASC"; if (! $sortfield) $sortfield="s.nom"; -$search_nom=GETPOST("search_nom"); +$search_company=GETPOST("search_company"); $search_zipcode=GETPOST("search_zipcode"); $search_town=GETPOST("search_town"); $search_code=GETPOST("search_code"); $search_compta=GETPOST("search_compta"); $search_status = GETPOST("search_status",'int'); -if ($search_status=='') $search_status=1; // always display activ customer first // Load sale and categ filters $search_sale = GETPOST("search_sale"); @@ -78,21 +77,18 @@ if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'e // Do we click on purge search criteria ? if (GETPOST("button_removefilter_x")) { - $search_categ=''; - $catid=''; - $search_sale=''; - $socname=""; - $search_nom=""; + $search_sale=""; + $search_categ=""; + $catid=""; + $search_company=""; $search_zipcode=""; $search_town=""; - $search_idprof1=''; - $search_idprof2=''; - $search_idprof3=''; - $search_idprof4=''; - $seach_status=1; + $search_code=''; + $search_compta=''; + $search_status=''; } - +if ($search_status=='') $search_status=1; // always display activ customer first /* * view @@ -122,8 +118,8 @@ if ($catid > 0) $sql.= " AND cs.fk_categorie = ".$catid; if ($catid == -2) $sql.= " AND cs.fk_categorie IS NULL"; if ($search_categ > 0) $sql.= " AND cs.fk_categorie = ".$search_categ; if ($search_categ == -2) $sql.= " AND cs.fk_categorie IS NULL"; -if ($search_nom) { - $sql .= natural_search('s.nom', $search_nom); +if ($search_company) { + $sql .= natural_search('s.nom', $search_company); } if ($search_zipcode) $sql.= " AND s.zip LIKE '".$db->escape($search_zipcode)."%'"; if ($search_town) { @@ -156,7 +152,7 @@ if ($result) { $num = $db->num_rows($result); - $param = "&search_nom=".$search_nom."&search_code=".$search_code."&search_zipcode=".$search_zipcode."&search_town=".$search_town; + $param = "&search_company=".$search_company."&search_code=".$search_code."&search_zipcode=".$search_zipcode."&search_town=".$search_town; if ($search_categ != '') $param.='&search_categ='.$search_categ; if ($search_sale != '') $param.='&search_sale='.$search_sale; if ($search_status != '') $param.='&search_status='.$search_status; @@ -207,7 +203,7 @@ if ($result) print ''; print ''; - print ''; + print ''; print ''; print ''; @@ -235,7 +231,6 @@ if ($result) print ''; print ''; - print '  '; print ''; print ''; From 86e624c3bc1af453e038b98aca0ab15e8cf26392 Mon Sep 17 00:00:00 2001 From: aspangaro Date: Mon, 17 Nov 2014 21:31:18 +0100 Subject: [PATCH 0055/1060] #1684 Clear sort filter works partially in interventions list --- htdocs/fichinter/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/fichinter/list.php b/htdocs/fichinter/list.php index 524feec13df..a6d3f9720ec 100644 --- a/htdocs/fichinter/list.php +++ b/htdocs/fichinter/list.php @@ -158,7 +158,7 @@ if ($result) } print ''; $liststatus=$interventionstatic->statuts_short; - print $form->selectarray('search_status', $liststatus, GETPOST('search_status'), 1, 0, 0, '', 1); + print $form->selectarray('search_status', $liststatus, $search_status, 1, 0, 0, '', 1); print ''; print ''; print ''; From de7a38417f422c7ac01544f54fb1dfa419ea3f6c Mon Sep 17 00:00:00 2001 From: aspangaro Date: Mon, 17 Nov 2014 21:45:29 +0100 Subject: [PATCH 0056/1060] #1680 Clear sort filter works partially in prospects list --- htdocs/comm/propal/list.php | 50 ++++++++++++++++++------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/htdocs/comm/propal/list.php b/htdocs/comm/propal/list.php index 96d633bd834..876fa30b080 100644 --- a/htdocs/comm/propal/list.php +++ b/htdocs/comm/propal/list.php @@ -56,6 +56,8 @@ $search_societe=GETPOST('search_societe','alpha'); $search_montant_ht=GETPOST('search_montant_ht','alpha'); $search_author=GETPOST('search_author','alpha'); $search_town=GETPOST('search_town','alpha'); +$viewstatut=$db->escape(GETPOST('viewstatut')); +$object_statut=$db->escape(GETPOST('propal_statut')); $sall=GETPOST("sall"); $mesg=(GETPOST("msg") ? GETPOST("msg") : GETPOST("mesg")); @@ -78,6 +80,26 @@ if (! empty($socid)) } $result = restrictedArea($user, $module, $objectid, $dbtable); +if (GETPOST("button_removefilter")) +{ + $search_categ=''; + $search_user=''; + $search_sale=''; + $search_ref=''; + $search_refcustomer=''; + $search_societe=''; + $search_montant_ht=''; + $search_author=''; + $search_town=''; + $year=''; + $month=''; + $viewstatut=''; + $object_statut=''; +} + +if($object_statut != '') +$viewstatut=$object_statut; + // Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array $hookmanager->initHooks(array('propallist')); @@ -93,21 +115,6 @@ $parameters=array('socid'=>$socid); $reshook=$hookmanager->executeHooks('doActions',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); -// Do we click on purge search criteria ? -if (GETPOST("button_removefilter_x")) -{ - $search_categ=''; - $search_user=''; - $search_sale=''; - $search_ref=''; - $search_refcustomer=''; - $search_societe=''; - $search_montant_ht=''; - $search_author=''; - $search_town=''; - $year=''; - $month=''; -} /* @@ -132,11 +139,6 @@ $offset = $conf->liste_limit * $page; $pageprev = $page - 1; $pagenext = $page + 1; -$viewstatut=$db->escape(GETPOST('viewstatut')); -$object_statut = $db->escape(GETPOST('propal_statut')); -if($object_statut != '') -$viewstatut=$object_statut; - if (! $sortfield) $sortfield='p.datep'; if (! $sortorder) $sortorder='DESC'; $limit = $conf->liste_limit; @@ -322,11 +324,9 @@ if ($result) print ''; $formpropal->selectProposalStatus($viewstatut,1); print ''; - print ''; - print ''; - print ''; - print ''; - print "\n"; + print ''; + print ''; + print "\n"; $var=true; $total=0; From 264794ec8ce0c0fc6c18e6dcc15a902b6b11c096 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Mon, 17 Nov 2014 23:46:30 +0100 Subject: [PATCH 0057/1060] #1664 Can't sort by mobile phones in contact list --- htdocs/contact/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/contact/list.php b/htdocs/contact/list.php index 2e28328085a..704971acddd 100644 --- a/htdocs/contact/list.php +++ b/htdocs/contact/list.php @@ -302,7 +302,7 @@ if ($result) print_liste_field_titre($langs->trans("PostOrFunction"),$_SERVER["PHP_SELF"],"p.poste", $begin, $param, '', $sortfield,$sortorder); if (empty($conf->global->SOCIETE_DISABLE_CONTACTS)) print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"s.nom", $begin, $param, '', $sortfield,$sortorder); print_liste_field_titre($langs->trans("Phone"),$_SERVER["PHP_SELF"],"p.phone", $begin, $param, '', $sortfield,$sortorder); - print_liste_field_titre($langs->trans("PhoneMobile"),$_SERVER["PHP_SELF"],"p.phone_mob", $begin, $param, '', $sortfield,$sortorder); + print_liste_field_titre($langs->trans("PhoneMobile"),$_SERVER["PHP_SELF"],"p.phone_mobile", $begin, $param, '', $sortfield,$sortorder); print_liste_field_titre($langs->trans("Fax"),$_SERVER["PHP_SELF"],"p.fax", $begin, $param, '', $sortfield,$sortorder); print_liste_field_titre($langs->trans("EMail"),$_SERVER["PHP_SELF"],"p.email", $begin, $param, '', $sortfield,$sortorder); if (! empty($conf->skype->enabled)) { print_liste_field_titre($langs->trans("Skype"),$_SERVER["PHP_SELF"],"p.skype", $begin, $param, '', $sortfield,$sortorder); } From db99b7f09af323836d1cb08afa36c91b88ba5e0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Mon, 17 Nov 2014 23:49:39 +0100 Subject: [PATCH 0058/1060] #1665 Can't clear sort filter on contacts list --- htdocs/contact/list.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/htdocs/contact/list.php b/htdocs/contact/list.php index 2e28328085a..6c436272504 100644 --- a/htdocs/contact/list.php +++ b/htdocs/contact/list.php @@ -53,7 +53,7 @@ $search_email=GETPOST("search_email"); $search_skype=GETPOST("search_skype"); $search_priv=GETPOST("search_priv"); $search_categ=GETPOST("search_categ",'int'); -$search_statu=GETPOST("search_status",'int'); +$search_status=GETPOST("search_status",'int'); if ($search_status=='') $search_status=1; // always display activ customer first @@ -96,9 +96,9 @@ else if ($type == "o") $urlfiche=""; } -if (GETPOST('button_removefilter')) +if (GETPOST('button_removefilter_x')) { - $search_firstlast_only=""; + $search_firstlast_only=""; $search_lastname=""; $search_firstname=""; $search_societe=""; @@ -356,8 +356,8 @@ if ($result) print $form->selectarray('search_status', array('0'=>$langs->trans('ActivityCeased'),'1'=>$langs->trans('InActivity')),$search_status); print ''; print ''; - print ''; - print ''; + print ''; + print ''; print ''; print ''; From 167cf258e7460a47650f578ffc2f3db865cc7eee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Mon, 17 Nov 2014 23:53:01 +0100 Subject: [PATCH 0059/1060] #1666 Clear sort filter works partially in product/services --- htdocs/product/list.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/htdocs/product/list.php b/htdocs/product/list.php index a6b09cea8a6..4555b2fd455 100644 --- a/htdocs/product/list.php +++ b/htdocs/product/list.php @@ -87,12 +87,14 @@ else $result=restrictedArea($user,'produit|service','','','','','',$objcanvas); * Actions */ -if (isset($_POST["button_removefilter_x"])) +if (GETPOST([)"button_removefilter_x")) { $sref=""; $sbarcode=""; $snom=""; $search_categ=0; + $tosell=""; + $tobuy=""; } @@ -379,7 +381,7 @@ else print ''; print ''; - print ''; + print ''; print ''; print ''; From f2eda0629b5815a249a97f9045ac5269fcac8a9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Mon, 17 Nov 2014 23:54:39 +0100 Subject: [PATCH 0060/1060] #1682 Date is missing in proposals list --- htdocs/comm/propal/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/comm/propal/list.php b/htdocs/comm/propal/list.php index 96d633bd834..e4cdde4e713 100644 --- a/htdocs/comm/propal/list.php +++ b/htdocs/comm/propal/list.php @@ -391,7 +391,7 @@ if ($result) // Date proposal print ''; - print dol_print_date($db->jdate($obj->dp), 'day'); + print dol_print_date($db->jdate($objp->dp), 'day'); print "\n"; // Date end validity From 5536abecf795d6b7c8da62ca82194a11ed2a07fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Mon, 17 Nov 2014 23:57:01 +0100 Subject: [PATCH 0061/1060] #1683 Can't clear sort filter on proposals list --- htdocs/comm/propal/list.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/comm/propal/list.php b/htdocs/comm/propal/list.php index 96d633bd834..b2e4555b896 100644 --- a/htdocs/comm/propal/list.php +++ b/htdocs/comm/propal/list.php @@ -323,8 +323,8 @@ if ($result) $formpropal->selectProposalStatus($viewstatut,1); print ''; print ''; - print ''; - print ''; + print ''; + print ''; print ''; print "\n"; From d8192d8223808252d8b0789a145eedaf30f674a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Tue, 18 Nov 2014 00:02:53 +0100 Subject: [PATCH 0062/1060] #1685-1686 Clear sort filter works partially in supplier invoices --- htdocs/fourn/facture/list.php | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/htdocs/fourn/facture/list.php b/htdocs/fourn/facture/list.php index 616e9690e8a..dabf7d28cd4 100644 --- a/htdocs/fourn/facture/list.php +++ b/htdocs/fourn/facture/list.php @@ -72,8 +72,9 @@ $search_amount_no_tax = GETPOST("search_amount_no_tax","alpha"); $search_amount_all_tax = GETPOST("search_amount_all_tax","alpha"); $month = GETPOST("month","int"); $year = GETPOST("year","int"); +$filter = GETPOST("filtre"); -if (GETPOST("button_removefilter")) +if (GETPOST("button_removefilter_x")) { $search_ref=""; $search_ref_supplier=""; @@ -83,6 +84,7 @@ if (GETPOST("button_removefilter")) $search_amount_all_tax=""; $year=""; $month=""; + $filter=""; } /* @@ -136,9 +138,9 @@ if ($socid) { $sql .= " AND s.rowid = ".$socid; } -if (GETPOST('filtre') && GETPOST('filtre') != -1) // GETPOST('filtre') may be a string +if ($filter) && $filter != -1) // GETPOST('filtre') may be a string { - $filtrearr = explode(",", GETPOST('filtre')); + $filtrearr = explode(",", $filter); foreach ($filtrearr as $fil) { $filt = explode(":", $fil); @@ -217,7 +219,7 @@ if ($resql) if ($search_company) $param.='&search_company='.urlencode($search_company); if ($search_amount_no_tax) $param.='&search_amount_no_tax='.urlencode($search_amount_no_tax); if ($search_amount_all_tax) $param.='&search_amount_all_tax='.urlencode($search_amount_all_tax); - if (GETPOST("filtre") && GETPOST('filtre') != -1) $param.='&filtre='.urlencode(GETPOST("filtre")); + if ($filter) && $filter != -1) $param.='&filtre='.urlencode($filter); print_barre_liste($langs->trans("BillsSuppliers").($socid?" $soc->name.":""),$page,$_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,'',$num,$nbtotalofrecords); print ''; @@ -269,8 +271,8 @@ if ($resql) print ''; print ''; print ''; - $liststatus=array('paye:0'=>$langs->trans("Unpayed"), 'paye:1'=>$langs->trans("Payed")); - print $form->selectarray('filtre', $liststatus, GETPOST('filtre'), 1); + $liststatus=array('paye:0'=>$langs->trans("Unpaid"), 'paye:1'=>$langs->trans("Paid")); + print $form->selectarray('filtre', $liststatus, $filter), 1); print ''; print ''; print ''; From e9966c50da70fcdfaf78f64f8e3ef7db95eb7f35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Tue, 18 Nov 2014 00:04:45 +0100 Subject: [PATCH 0063/1060] #1689 Can't sort supplier invoice payments on amounts --- htdocs/fourn/facture/paiement.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/fourn/facture/paiement.php b/htdocs/fourn/facture/paiement.php index f467e9235ef..57100bd98f0 100644 --- a/htdocs/fourn/facture/paiement.php +++ b/htdocs/fourn/facture/paiement.php @@ -536,7 +536,7 @@ if (empty($action)) print_liste_field_titre($langs->trans('ThirdParty'),$_SERVER["PHP_SELF"],'s.nom','',$paramlist,'',$sortfield,$sortorder); print_liste_field_titre($langs->trans('Type'),$_SERVER["PHP_SELF"],'c.libelle','',$paramlist,'',$sortfield,$sortorder); print_liste_field_titre($langs->trans('Account'),$_SERVER["PHP_SELF"],'ba.label','',$paramlist,'',$sortfield,$sortorder); - print_liste_field_titre($langs->trans('Amount'),$_SERVER["PHP_SELF"],'f.amount','',$paramlist,'align="right"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans('Amount'),$_SERVER["PHP_SELF"],'p.amount','',$paramlist,'align="right"',$sortfield,$sortorder); //print_liste_field_titre($langs->trans('Invoice'),$_SERVER["PHP_SELF"],'ref_supplier','',$paramlist,'',$sortfield,$sortorder); print ' '; print "\n"; From cd3bafbef7b0661795e2371746577d64c4a8bd99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Tue, 18 Nov 2014 00:27:53 +0100 Subject: [PATCH 0064/1060] Update list.php --- htdocs/product/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/product/list.php b/htdocs/product/list.php index 4555b2fd455..67cb7fd5f11 100644 --- a/htdocs/product/list.php +++ b/htdocs/product/list.php @@ -87,7 +87,7 @@ else $result=restrictedArea($user,'produit|service','','','','','',$objcanvas); * Actions */ -if (GETPOST([)"button_removefilter_x")) +if (GETPOST("button_removefilter_x")) { $sref=""; $sbarcode=""; From da08e05e11af20d36f17fbee3e06fccc29d6170c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 18 Nov 2014 14:26:06 +0100 Subject: [PATCH 0065/1060] Fix: Line not visible when there is a lot of lines. --- htdocs/comm/action/peruser.php | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/htdocs/comm/action/peruser.php b/htdocs/comm/action/peruser.php index b6c3054f3a8..ddda7333947 100644 --- a/htdocs/comm/action/peruser.php +++ b/htdocs/comm/action/peruser.php @@ -659,10 +659,12 @@ while ($obj = $db->fetch_object($resql)) $todayarray=dol_getdate($now,'fast'); $sav = $tmpday; $showheader = true; +$var = false; foreach ($usernames as $username) { + $var = ! $var; echo ""; - echo '' . $username->getNomUrl(1). ''; + echo '' . $username->getNomUrl(1). ''; $tmpday = $sav; // Lopp on each day of week @@ -688,7 +690,7 @@ foreach ($usernames as $username) if ($todayarray['mday']==$tmpday && $todayarray['mon']==$tmpmonth && $todayarray['year']==$tmpyear) $today=1; if ($today) $style='cal_today_peruser'; - show_day_events2($username, $tmpday, $tmpmonth, $tmpyear, $monthshown, $style, $eventarray, 0, $maxnbofchar, $newparam, 1, 300, $showheader, $colorsbytype); + show_day_events2($username, $tmpday, $tmpmonth, $tmpyear, $monthshown, $style, $eventarray, 0, $maxnbofchar, $newparam, 1, 300, $showheader, $colorsbytype, $var); $i++; } @@ -785,9 +787,10 @@ $db->close(); * @param int $minheight Minimum height for each event. 60px by default. * @param boolean $showheader Show header * @param array $colorsbytype Array with colors by type + * @param string $var true or false for alternat style on tr/td * @return void */ -function show_day_events2($username, $day, $month, $year, $monthshown, $style, &$eventarray, $maxprint=0, $maxnbofchar=16, $newparam='', $showinfo=0, $minheight=60, $showheader=false, $colorsbytype=array()) +function show_day_events2($username, $day, $month, $year, $monthshown, $style, &$eventarray, $maxprint=0, $maxnbofchar=16, $newparam='', $showinfo=0, $minheight=60, $showheader=false, $colorsbytype=array(), $var=false) { global $db; global $user, $conf, $langs, $hookmanager, $action; @@ -989,8 +992,8 @@ function show_day_events2($username, $day, $month, $year, $monthshown, $style, & } - if ($h == $begin_h) echo ''; - else echo ''; + if ($h == $begin_h) echo ''; + else echo ''; if (count($cases1[$h]) == 1) // 1 seul evenement { $ids=array_keys($cases1[$h]); From 8b21cd402c4bed5a8996f3ef1f41554db75d471b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 18 Nov 2014 14:36:16 +0100 Subject: [PATCH 0066/1060] Fix: Filter were lost --- htdocs/comm/action/peruser.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/htdocs/comm/action/peruser.php b/htdocs/comm/action/peruser.php index ddda7333947..dcebefbcbb7 100644 --- a/htdocs/comm/action/peruser.php +++ b/htdocs/comm/action/peruser.php @@ -201,6 +201,7 @@ if ($filter) $param.="&filter=".$filter; if ($filtera) $param.="&filtera=".$filtera; if ($filtert) $param.="&filtert=".$filtert; if ($filterd) $param.="&filterd=".$filterd; +if ($usergroup) $param.="&usergroup=".$usergroup; if ($socid) $param.="&socid=".$socid; if ($showbirthday) $param.="&showbirthday=1"; if ($pid) $param.="&projectid=".$pid; @@ -242,6 +243,20 @@ $nav.="   ('; +$nav.=''; +$nav.=''; +$nav.=''; +$nav.=''; +$nav.=''; +$nav.=''; +$nav.=''; +$nav.=''; +$nav.=''; +$nav.=''; +$nav.=''; +$nav.=''; +$nav.=''; + $nav.=$form->select_date($dateselect, 'dateselect', 0, 0, 1, '', 1, 0, 1); $nav.=' '; $nav.=''; From c077998ff8decdf4fbfdc79f136495045a7060fa Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 18 Nov 2014 14:26:06 +0100 Subject: [PATCH 0067/1060] Fix: Line not visible when there is a lot of lines. --- htdocs/comm/action/peruser.php | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/htdocs/comm/action/peruser.php b/htdocs/comm/action/peruser.php index b6c3054f3a8..ddda7333947 100644 --- a/htdocs/comm/action/peruser.php +++ b/htdocs/comm/action/peruser.php @@ -659,10 +659,12 @@ while ($obj = $db->fetch_object($resql)) $todayarray=dol_getdate($now,'fast'); $sav = $tmpday; $showheader = true; +$var = false; foreach ($usernames as $username) { + $var = ! $var; echo ""; - echo '' . $username->getNomUrl(1). ''; + echo '' . $username->getNomUrl(1). ''; $tmpday = $sav; // Lopp on each day of week @@ -688,7 +690,7 @@ foreach ($usernames as $username) if ($todayarray['mday']==$tmpday && $todayarray['mon']==$tmpmonth && $todayarray['year']==$tmpyear) $today=1; if ($today) $style='cal_today_peruser'; - show_day_events2($username, $tmpday, $tmpmonth, $tmpyear, $monthshown, $style, $eventarray, 0, $maxnbofchar, $newparam, 1, 300, $showheader, $colorsbytype); + show_day_events2($username, $tmpday, $tmpmonth, $tmpyear, $monthshown, $style, $eventarray, 0, $maxnbofchar, $newparam, 1, 300, $showheader, $colorsbytype, $var); $i++; } @@ -785,9 +787,10 @@ $db->close(); * @param int $minheight Minimum height for each event. 60px by default. * @param boolean $showheader Show header * @param array $colorsbytype Array with colors by type + * @param string $var true or false for alternat style on tr/td * @return void */ -function show_day_events2($username, $day, $month, $year, $monthshown, $style, &$eventarray, $maxprint=0, $maxnbofchar=16, $newparam='', $showinfo=0, $minheight=60, $showheader=false, $colorsbytype=array()) +function show_day_events2($username, $day, $month, $year, $monthshown, $style, &$eventarray, $maxprint=0, $maxnbofchar=16, $newparam='', $showinfo=0, $minheight=60, $showheader=false, $colorsbytype=array(), $var=false) { global $db; global $user, $conf, $langs, $hookmanager, $action; @@ -989,8 +992,8 @@ function show_day_events2($username, $day, $month, $year, $monthshown, $style, & } - if ($h == $begin_h) echo ''; - else echo ''; + if ($h == $begin_h) echo ''; + else echo ''; if (count($cases1[$h]) == 1) // 1 seul evenement { $ids=array_keys($cases1[$h]); From c8fe538de202bf53552d335cde51fc8964ab5da3 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 18 Nov 2014 14:36:16 +0100 Subject: [PATCH 0068/1060] Fix: Filter were lost --- htdocs/comm/action/peruser.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/htdocs/comm/action/peruser.php b/htdocs/comm/action/peruser.php index ddda7333947..dcebefbcbb7 100644 --- a/htdocs/comm/action/peruser.php +++ b/htdocs/comm/action/peruser.php @@ -201,6 +201,7 @@ if ($filter) $param.="&filter=".$filter; if ($filtera) $param.="&filtera=".$filtera; if ($filtert) $param.="&filtert=".$filtert; if ($filterd) $param.="&filterd=".$filterd; +if ($usergroup) $param.="&usergroup=".$usergroup; if ($socid) $param.="&socid=".$socid; if ($showbirthday) $param.="&showbirthday=1"; if ($pid) $param.="&projectid=".$pid; @@ -242,6 +243,20 @@ $nav.="   ('; +$nav.=''; +$nav.=''; +$nav.=''; +$nav.=''; +$nav.=''; +$nav.=''; +$nav.=''; +$nav.=''; +$nav.=''; +$nav.=''; +$nav.=''; +$nav.=''; +$nav.=''; + $nav.=$form->select_date($dateselect, 'dateselect', 0, 0, 1, '', 1, 0, 1); $nav.=' '; $nav.=''; From 1b24356e0f9b7b4cfd8a19464096c788d2cc2560 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 18 Nov 2014 17:13:08 +0100 Subject: [PATCH 0069/1060] ssl option is set to CURL_SSLVERSION_TLSv1. Some site disabled ssl v1 to 3 (ex: paypal). --- htdocs/paypal/lib/paypal.lib.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/paypal/lib/paypal.lib.php b/htdocs/paypal/lib/paypal.lib.php index 02a16c68b1f..7b161ac30be 100644 --- a/htdocs/paypal/lib/paypal.lib.php +++ b/htdocs/paypal/lib/paypal.lib.php @@ -683,7 +683,8 @@ function hash_call($methodName,$nvpStr) exit;*/ curl_setopt($ch, CURLOPT_URL, $API_Endpoint); curl_setopt($ch, CURLOPT_VERBOSE, 1); - curl_setopt($ch, CURLOPT_SSLVERSION, 3); // Force SSLv3 + //curl_setopt($ch, CURLOPT_SSLVERSION, 3); // Force SSLv3 + curl_setopt($ch, CURLOPT_SSLVERSION, 1); // Force TLSv1 //turning off the server and peer verification(TrustManager Concept). curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); From 8b0a9d78bb946a7373d3d27b76f8cef79e0abec5 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 18 Nov 2014 19:03:02 +0100 Subject: [PATCH 0070/1060] Fix: CRLF --- htdocs/core/actions_sendmails.inc.php | 8 ++++---- htdocs/fichinter/card.php | 8 ++++---- htdocs/install/upgrade.php | 14 +++++++------- htdocs/install/upgrade2.php | 28 +++++++++++++-------------- 4 files changed, 29 insertions(+), 29 deletions(-) diff --git a/htdocs/core/actions_sendmails.inc.php b/htdocs/core/actions_sendmails.inc.php index 51744775d9f..40e177404f9 100644 --- a/htdocs/core/actions_sendmails.inc.php +++ b/htdocs/core/actions_sendmails.inc.php @@ -146,10 +146,10 @@ if (($action == 'send' || $action == 'relance') && ! $_POST['addfile'] && ! $_PO if ($message) { $actionmsg=$langs->transnoentities('MailSentBy').' '.$from.' '.$langs->transnoentities('To').' '.$sendto; - if ($sendtocc) $actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('Bcc') . ": " . $sendtocc); - $actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('MailTopic') . ": " . $subject); - $actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('TextUsedInTheMessageBody') . ":"); - $actionmsg = dol_concatdesc($actionmsg, $message); + if ($sendtocc) $actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('Bcc') . ": " . $sendtocc); + $actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('MailTopic') . ": " . $subject); + $actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('TextUsedInTheMessageBody') . ":"); + $actionmsg = dol_concatdesc($actionmsg, $message); } } diff --git a/htdocs/fichinter/card.php b/htdocs/fichinter/card.php index 77c7e17ffb5..4ffc31c9cab 100644 --- a/htdocs/fichinter/card.php +++ b/htdocs/fichinter/card.php @@ -748,10 +748,10 @@ if ($action == 'send' && ! GETPOST('cancel','alpha') && (empty($conf->global->MA $actionmsg = $langs->transnoentities('MailSentBy').' '.$from.' '.$langs->transnoentities('To').' '.$sendto; if ($message) { - if ($sendtocc) $actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('Bcc') . ": " . $sendtocc); - $actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('MailTopic') . ": " . $subject); - $actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('TextUsedInTheMessageBody') . ":"); - $actionmsg = dol_concatdesc($actionmsg, $message); + if ($sendtocc) $actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('Bcc') . ": " . $sendtocc); + $actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('MailTopic') . ": " . $subject); + $actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('TextUsedInTheMessageBody') . ":"); + $actionmsg = dol_concatdesc($actionmsg, $message); } $actionmsg2=$langs->transnoentities("InterventionSentByEMail",$object->ref); } diff --git a/htdocs/install/upgrade.php b/htdocs/install/upgrade.php index 396c9f96b01..e93b27ab6e9 100755 --- a/htdocs/install/upgrade.php +++ b/htdocs/install/upgrade.php @@ -75,21 +75,21 @@ if (! is_object($conf)) dolibarr_install_syslog("upgrade2: conf file not initial * View */ -if (! $versionfrom && ! $versionto) -{ +if (! $versionfrom && ! $versionto) +{ print 'Error: Parameter versionfrom or versionto missing.'."\n"; print 'Upgrade must be ran from cmmand line with parameters or called from page install/index.php (like a first install) instead of page install/upgrade.php'."\n"; // Test if batch mode $sapi_type = php_sapi_name(); - $script_file = basename(__FILE__); + $script_file = basename(__FILE__); $path=dirname(__FILE__).'/'; if (substr($sapi_type, 0, 3) == 'cli') { print 'Syntax from command line: '.$script_file." x.y.z a.b.c\n"; - } - exit; -} - + } + exit; +} + pHeader('',"upgrade2",GETPOST('action'),'versionfrom='.$versionfrom.'&versionto='.$versionto); diff --git a/htdocs/install/upgrade2.php b/htdocs/install/upgrade2.php index 3a02a78f9e8..09f0d507a39 100755 --- a/htdocs/install/upgrade2.php +++ b/htdocs/install/upgrade2.php @@ -83,20 +83,20 @@ if (! is_object($conf)) dolibarr_install_syslog("upgrade2: conf file not initial * View */ -if (! $versionfrom && ! $versionto) -{ - print 'Error: Parameter versionfrom or versionto missing.'."\n"; - print 'Upgrade must be ran from cmmand line with parameters or called from page install/index.php (like a first install) instead of page install/upgrade.php'."\n"; - // Test if batch mode - $sapi_type = php_sapi_name(); - $script_file = basename(__FILE__); - $path=dirname(__FILE__).'/'; - if (substr($sapi_type, 0, 3) == 'cli') - { - print 'Syntax from command line: '.$script_file." x.y.z a.b.c\n"; - } - exit; -} +if (! $versionfrom && ! $versionto) +{ + print 'Error: Parameter versionfrom or versionto missing.'."\n"; + print 'Upgrade must be ran from cmmand line with parameters or called from page install/index.php (like a first install) instead of page install/upgrade.php'."\n"; + // Test if batch mode + $sapi_type = php_sapi_name(); + $script_file = basename(__FILE__); + $path=dirname(__FILE__).'/'; + if (substr($sapi_type, 0, 3) == 'cli') + { + print 'Syntax from command line: '.$script_file." x.y.z a.b.c\n"; + } + exit; +} pHeader('','etape5',GETPOST("action")?GETPOST("action"):'upgrade','versionfrom='.$versionfrom.'&versionto='.$versionto); From 1b077950cd2ffd628be69ed26425800db1ff9f48 Mon Sep 17 00:00:00 2001 From: aspangaro Date: Tue, 18 Nov 2014 19:54:48 +0100 Subject: [PATCH 0071/1060] #1698 Untranslatable strings in donation module admin --- htdocs/langs/en_US/donations.lang | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/htdocs/langs/en_US/donations.lang b/htdocs/langs/en_US/donations.lang index 85dfdd8ff4d..06c29872b17 100644 --- a/htdocs/langs/en_US/donations.lang +++ b/htdocs/langs/en_US/donations.lang @@ -31,3 +31,9 @@ DonationRecipient=Donation recipient ThankYou=Thank You IConfirmDonationReception=The recipient declare reception, as a donation, of the following amount MinimumAmount=Minimum amount is %s +FreeTextOnDonations=Free text on donations +#### French options ##### +FrenchOptions=French options +DONATION_ART200=Activate article 200 from CGI if you are concerned +DONATION_ART238=Activate article 238 from CGI if you are concerned +DONATION_ART885=Activate article 885 from CGI if you are concerned From 621f2b5c77ba00e52658d27cf4de43f4b3806527 Mon Sep 17 00:00:00 2001 From: aspangaro Date: Tue, 18 Nov 2014 21:28:12 +0100 Subject: [PATCH 0072/1060] #1672 VAT accounts by default are lost in migration --- htdocs/install/mysql/migration/3.6.0-3.7.0.sql | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htdocs/install/mysql/migration/3.6.0-3.7.0.sql b/htdocs/install/mysql/migration/3.6.0-3.7.0.sql index de02887abf8..60013492187 100755 --- a/htdocs/install/mysql/migration/3.6.0-3.7.0.sql +++ b/htdocs/install/mysql/migration/3.6.0-3.7.0.sql @@ -102,6 +102,8 @@ UPDATE llx_const SET name = 'ACCOUNTING_PRODUCT_BUY_ACCOUNT' WHERE name = 'COMPT UPDATE llx_const SET name = 'ACCOUNTING_PRODUCT_SOLD_ACCOUNT' WHERE name = 'COMPTA_PRODUCT_SOLD_ACCOUNT'; UPDATE llx_const SET name = 'ACCOUNTING_SERVICE_BUY_ACCOUNT' WHERE name = 'COMPTA_SERVICE_BUY_ACCOUNT'; UPDATE llx_const SET name = 'ACCOUNTING_SERVICE_SOLD_ACCOUNT' WHERE name = 'COMPTA_SERVICE_SOLD_ACCOUNT'; +UPDATE llx_const SET name = 'ACCOUNTING_VAT_ACCOUNT' WHERE name = 'COMPTA_VAT_ACCOUNT'; +UPDATE llx_const SET name = 'ACCOUNTING_VAT_BUY_ACCOUNT' WHERE name = 'COMPTA_VAT_BUY_ACCOUNT'; -- Compatibility with module Accounting Expert UPDATE llx_const SET name = 'ACCOUNTING_SEPARATORCSV' WHERE name = 'ACCOUNTINGEX_SEPARATORCSV'; From e3edc3f690e8489f3b511f20930f95793400fbbd Mon Sep 17 00:00:00 2001 From: aspangaro Date: Tue, 18 Nov 2014 21:55:41 +0100 Subject: [PATCH 0073/1060] #1688 The ref filter searches on rowid not on ref in unpaid supplier invoices list --- htdocs/fourn/facture/impayees.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/fourn/facture/impayees.php b/htdocs/fourn/facture/impayees.php index 3253a79fcd8..2767c792f9e 100644 --- a/htdocs/fourn/facture/impayees.php +++ b/htdocs/fourn/facture/impayees.php @@ -117,7 +117,7 @@ if ($user->rights->fournisseur->facture->lire) if ($search_ref) { - $sql .= " AND f.rowid LIKE '%".$search_ref."%'"; + $sql .= " AND f.ref LIKE '%".$search_ref."%'"; } if ($search_ref_supplier) { @@ -241,7 +241,7 @@ if ($user->rights->fournisseur->facture->lire) print $facturestatic->getNomUrl(1); print "\n"; - print ''.dol_trunc($objp->ref_supplier,12)."\n"; + print ''.dol_trunc($objp->ref_supplier,12).''; print ''.dol_print_date($db->jdate($objp->df),'day')."\n"; print ''.dol_print_date($db->jdate($objp->datelimite),'day'); @@ -258,7 +258,7 @@ if ($user->rights->fournisseur->facture->lire) print "".price($objp->total_ttc).""; print "".price($objp->am).""; - // Affiche statut de la facture + // Show invoice status print ''; print $facturestatic->LibStatut($objp->paye,$objp->fk_statut,5,$objp->am); print ''; From 3dea1fd68f1d09990c635bce5c67e5618c32a011 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Tue, 18 Nov 2014 22:53:39 +0100 Subject: [PATCH 0074/1060] #1695 SQL error on task creation --- htdocs/projet/tasks.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/projet/tasks.php b/htdocs/projet/tasks.php index eaec5ae0816..f89a7e3398f 100644 --- a/htdocs/projet/tasks.php +++ b/htdocs/projet/tasks.php @@ -300,7 +300,7 @@ if ($action == 'create' && $user->rights->projet->creer && (empty($object->third print ''; print ''.$langs->trans("AffectedTo").''; - $contactsofproject=$object->getListContactId('internal'); + $contactsofproject=(! empty($object->id)?$object->getListContactId('internal'):''); $form->select_users($user->id,'userid',0,'',0,'',$contactsofproject); print ''; From 1d21141de212777bf900c4cca1ec145600c9f13a Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 18 Nov 2014 22:59:48 +0100 Subject: [PATCH 0075/1060] Fix: Bad vars --- htdocs/admin/security_other.php | 7 +++---- htdocs/langs/en_US/admin.lang | 1 + 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/admin/security_other.php b/htdocs/admin/security_other.php index 8c65d1f3359..6cbbe9185a0 100644 --- a/htdocs/admin/security_other.php +++ b/htdocs/admin/security_other.php @@ -107,7 +107,7 @@ else if ($action == 'MAIN_ANTIVIRUS_PARAM') } else if ($action == 'MAIN_APPLICATION_TITLE') { - if (! dolibarr_set_const($db, "MAIN_APPLICATION_TITLE", $_POST["MAIN_SESSION_TIMEOUT"],'chaine',0,'',$conf->entity)) dol_print_error($db); + if (! dolibarr_set_const($db, "MAIN_APPLICATION_TITLE", $_POST["MAIN_APPLICATION_TITLE"],'chaine',0,'',$conf->entity)) dol_print_error($db); else setEventMessage($langs->trans("RecordModifiedSuccessfully")); } @@ -176,11 +176,10 @@ if (empty($conf->global->MAIN_APPLICATION_TITLE)) $conf->global->MAIN_APPLICATIO print '
'; print ''; print ''; -print ''.$langs->trans("HiddeNumVersion").''; -print $form->textwithpicto('',$langs->trans("HiddeNumVersionExample",ini_get("session.gc_probability"),ini_get("session.gc_divisor"))); +print ''.$langs->trans("MAIN_APPLICATION_TITLE").''; print ''; print ''; -print ' '; +print ' '; print ''; print ''; print ''; diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 00f7ae43737..a075f99cd06 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -1539,6 +1539,7 @@ ConfirmDeleteFiscalYear=Are you sure to delete this fiscal year ? Opened=Opened Closed=Closed AlwaysEditable=Can always be edited +MAIN_APPLICATION_TITLE=Force visible name of application Format=Format TypePaymentDesc=0:Customer payment type, 1:Supplier payment type, 2:Both customers and suppliers payment type From 84729a6aa3837bad0794ddbe91be8ef14862495a Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 18 Nov 2014 22:59:48 +0100 Subject: [PATCH 0076/1060] Fix: Bad vars --- htdocs/admin/security_other.php | 7 +++---- htdocs/langs/en_US/admin.lang | 1 + 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/admin/security_other.php b/htdocs/admin/security_other.php index 8c65d1f3359..6cbbe9185a0 100644 --- a/htdocs/admin/security_other.php +++ b/htdocs/admin/security_other.php @@ -107,7 +107,7 @@ else if ($action == 'MAIN_ANTIVIRUS_PARAM') } else if ($action == 'MAIN_APPLICATION_TITLE') { - if (! dolibarr_set_const($db, "MAIN_APPLICATION_TITLE", $_POST["MAIN_SESSION_TIMEOUT"],'chaine',0,'',$conf->entity)) dol_print_error($db); + if (! dolibarr_set_const($db, "MAIN_APPLICATION_TITLE", $_POST["MAIN_APPLICATION_TITLE"],'chaine',0,'',$conf->entity)) dol_print_error($db); else setEventMessage($langs->trans("RecordModifiedSuccessfully")); } @@ -176,11 +176,10 @@ if (empty($conf->global->MAIN_APPLICATION_TITLE)) $conf->global->MAIN_APPLICATIO print ''; print ''; print ''; -print ''.$langs->trans("HiddeNumVersion").''; -print $form->textwithpicto('',$langs->trans("HiddeNumVersionExample",ini_get("session.gc_probability"),ini_get("session.gc_divisor"))); +print ''.$langs->trans("MAIN_APPLICATION_TITLE").''; print ''; print ''; -print ' '; +print ' '; print ''; print ''; print ''; diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 00f7ae43737..a075f99cd06 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -1539,6 +1539,7 @@ ConfirmDeleteFiscalYear=Are you sure to delete this fiscal year ? Opened=Opened Closed=Closed AlwaysEditable=Can always be edited +MAIN_APPLICATION_TITLE=Force visible name of application Format=Format TypePaymentDesc=0:Customer payment type, 1:Supplier payment type, 2:Both customers and suppliers payment type From 44f3e64df207f87edc704b9aae267ea31b141ca6 Mon Sep 17 00:00:00 2001 From: BENKE Charles Date: Wed, 19 Nov 2014 09:28:11 +0100 Subject: [PATCH 0077/1060] Update html.formcontract.class.php bad filtering on contract list (same sql rule as project) --- htdocs/core/class/html.formcontract.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/class/html.formcontract.class.php b/htdocs/core/class/html.formcontract.class.php index e0d550b4205..0eb2d4d4b26 100644 --- a/htdocs/core/class/html.formcontract.class.php +++ b/htdocs/core/class/html.formcontract.class.php @@ -65,7 +65,7 @@ class FormContract $sql.= " WHERE c.entity = ".$conf->entity; //if ($contratListId) $sql.= " AND c.rowid IN (".$contratListId.")"; if ($socid == 0) $sql.= " AND (c.fk_soc = 0 OR c.fk_soc IS NULL)"; - else $sql.= " AND c.fk_soc = ".$socid; + if ($socid > 0) $sql.= " AND (c.fk_soc=".$socid." OR c.fk_soc IS NULL)"; dol_syslog(get_class($this)."::select_contract", LOG_DEBUG); $resql=$db->query($sql); From 3dacdf4e4a5ff54dc7a57a262d95465fc4580569 Mon Sep 17 00:00:00 2001 From: Juanjo Menent Date: Wed, 19 Nov 2014 09:41:21 +0100 Subject: [PATCH 0078/1060] Fix: Conflicts and remove duplicate code --- htdocs/core/class/commonobject.class.php | 4 +--- htdocs/product/class/product.class.php | 8 +------- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index b5aac7adc74..72eeba4d59f 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -3,7 +3,7 @@ * Copyright (C) 2005-2013 Regis Houssin * Copyright (C) 2010-2013 Juanjo Menent * Copyright (C) 2012 Christophe Battarel - * Copyright (C) 2010-2011 Juanjo Menent + * Copyright (C) 2010-2014 Juanjo Menent * Copyright (C) 2012-2013 Christophe Battarel * Copyright (C) 2011-2014 Philippe Grand * Copyright (C) 2012 Marcos García @@ -611,8 +611,6 @@ abstract class CommonObject require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; - require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; - $thirdparty = new Societe($this->db); $result=$thirdparty->fetch(isset($this->socid)?$this->socid:$this->fk_soc); $this->client = $thirdparty; // deprecated diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index 1faa192bd0d..2987d0de8fd 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -4,16 +4,10 @@ * Copyright (C) 2005-2013 Regis Houssin * Copyright (C) 2006 Andre Cianfarani * Copyright (C) 2007-2011 Jean Heimburger -<<<<<<< HEAD * Copyright (C) 2010-2013 Juanjo Menent * Copyright (C) 2013-2014 Cedric GROSS - * Copyright (C) 2013 Marcos García - * Copyright (C) 2011-2014 Alexandre Spangaro -======= - * Copyright (C) 2010-2011 Juanjo Menent - * Copyright (C) 2013 Cedric GROSS * Copyright (C) 2013-2014 Marcos García ->>>>>>> refs/remotes/origin/3.5 + * Copyright (C) 2011-2014 Alexandre Spangaro * * 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 From 9e28452379b09a8ce26b2344180b053b2ce0ddbe Mon Sep 17 00:00:00 2001 From: Juanjo Menent Date: Wed, 19 Nov 2014 10:02:01 +0100 Subject: [PATCH 0079/1060] Fix: remove duplicate code --- htdocs/core/class/commonobject.class.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 12fee9deb8b..98bee3e052c 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -3,7 +3,7 @@ * Copyright (C) 2005-2013 Regis Houssin * Copyright (C) 2010-2013 Juanjo Menent * Copyright (C) 2012 Christophe Battarel - * Copyright (C) 2010-2011 Juanjo Menent + * Copyright (C) 2010-2014 Juanjo Menent * Copyright (C) 2012-2013 Christophe Battarel * Copyright (C) 2011-2014 Philippe Grand * Copyright (C) 2012 Marcos García @@ -611,8 +611,6 @@ abstract class CommonObject require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; - require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; - $thirdparty = new Societe($this->db); $result=$thirdparty->fetch(isset($this->socid)?$this->socid:(isset($this->fk_soc)?$this->fk_soc:$this->fk_thirdparty)); $this->client = $thirdparty; // deprecated From 247da992c1e5526afbfdbfca06a4183f801520a8 Mon Sep 17 00:00:00 2001 From: Juanjo Menent Date: Wed, 19 Nov 2014 10:02:01 +0100 Subject: [PATCH 0080/1060] Fix: remove duplicate code --- htdocs/core/class/commonobject.class.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 12fee9deb8b..98bee3e052c 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -3,7 +3,7 @@ * Copyright (C) 2005-2013 Regis Houssin * Copyright (C) 2010-2013 Juanjo Menent * Copyright (C) 2012 Christophe Battarel - * Copyright (C) 2010-2011 Juanjo Menent + * Copyright (C) 2010-2014 Juanjo Menent * Copyright (C) 2012-2013 Christophe Battarel * Copyright (C) 2011-2014 Philippe Grand * Copyright (C) 2012 Marcos García @@ -611,8 +611,6 @@ abstract class CommonObject require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; - require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; - $thirdparty = new Societe($this->db); $result=$thirdparty->fetch(isset($this->socid)?$this->socid:(isset($this->fk_soc)?$this->fk_soc:$this->fk_thirdparty)); $this->client = $thirdparty; // deprecated From 93ed5875d3e8060dbac84936632894d3184a6d1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Wed, 19 Nov 2014 15:50:18 +0100 Subject: [PATCH 0081/1060] #1650 Can't display supplier products in it's card I think error is in sql request for last supplier invoice list because there is no sql request in supplier products To avoid error in mysql strict mode sql-mode="STRICT_ALL_TABLES,ONLY_FULL_GROUP_BY,NO_ZERO_DATE" --- htdocs/fourn/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/fourn/card.php b/htdocs/fourn/card.php index 1f7f7fc079d..3e234af68cd 100644 --- a/htdocs/fourn/card.php +++ b/htdocs/fourn/card.php @@ -400,7 +400,7 @@ if ($object->fetch($id)) $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'paiementfourn_facturefourn as pf ON f.rowid=pf.fk_facturefourn'; $sql.= ' WHERE f.fk_soc = '.$object->id; $sql.= " AND f.entity =".$conf->entity; - $sql.= ' GROUP BY f.rowid,f.libelle,f.ref_supplier,f.fk_statut,f.datef,f.total_ttc,f.paye'; + $sql.= ' GROUP BY f.rowid,f.libelle,f.ref,f.ref_supplier,f.fk_statut,f.datef,f.total_ttc,f.paye'; $sql.= ' ORDER BY f.datef DESC'; $resql=$db->query($sql); if ($resql) From 7d8cf99d58a61603ae52cc4cf429b505ba9e79d8 Mon Sep 17 00:00:00 2001 From: Christophe Battarel Date: Wed, 19 Nov 2014 18:19:27 +0100 Subject: [PATCH 0082/1060] FIX: bad margin and buy_price calculation when total_ht = 0 (discount 100%) on a line --- htdocs/margin/agentMargins.php | 4 ++-- htdocs/margin/customerMargins.php | 4 ++-- htdocs/margin/productMargins.php | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/htdocs/margin/agentMargins.php b/htdocs/margin/agentMargins.php index 51166bc472b..40a617daecd 100644 --- a/htdocs/margin/agentMargins.php +++ b/htdocs/margin/agentMargins.php @@ -109,8 +109,8 @@ $sql = "SELECT"; if ($agentid > 0) $sql.= " s.rowid as socid, s.nom, s.code_client, s.client,"; $sql.= " u.rowid as agent, u.login, u.lastname, u.firstname,"; $sql.= " sum(d.total_ht) as selling_price,"; -$sql.= " sum(".$db->ifsql('d.total_ht <=0','d.qty * d.buy_price_ht * -1','d.qty * d.buy_price_ht').") as buying_price,"; -$sql.= " sum(".$db->ifsql('d.total_ht <=0','-1 * (abs(d.total_ht) - (d.buy_price_ht * d.qty))','d.total_ht - (d.buy_price_ht * d.qty)').") as marge" ; +$sql.= " sum(".$db->ifsql('d.total_ht < 0','d.qty * d.buy_price_ht * -1','d.qty * d.buy_price_ht').") as buying_price,"; +$sql.= " sum(".$db->ifsql('d.total_ht < 0','-1 * (abs(d.total_ht) - (d.buy_price_ht * d.qty))','d.total_ht - (d.buy_price_ht * d.qty)').") as marge" ; $sql.= " FROM ".MAIN_DB_PREFIX."societe as s"; $sql.= ", ".MAIN_DB_PREFIX."facture as f"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."element_contact e ON e.element_id = f.rowid and e.statut = 4 and e.fk_c_type_contact = ".(empty($conf->global->AGENT_CONTACT_TYPE)?-1:$conf->global->AGENT_CONTACT_TYPE); diff --git a/htdocs/margin/customerMargins.php b/htdocs/margin/customerMargins.php index 6675753d4d6..77a50189b1b 100644 --- a/htdocs/margin/customerMargins.php +++ b/htdocs/margin/customerMargins.php @@ -164,8 +164,8 @@ $sql = "SELECT"; $sql.= " s.rowid as socid, s.nom, s.code_client, s.client,"; if ($client) $sql.= " f.rowid as facid, f.facnumber, f.total as total_ht, f.datef, f.paye, f.fk_statut as statut,"; $sql.= " sum(d.total_ht) as selling_price,"; -$sql.= " sum(".$db->ifsql('d.total_ht <=0','d.qty * d.buy_price_ht * -1','d.qty * d.buy_price_ht').") as buying_price,"; -$sql.= " sum(".$db->ifsql('d.total_ht <=0','-1 * (abs(d.total_ht) - (d.buy_price_ht * d.qty))','d.total_ht - (d.buy_price_ht * d.qty)').") as marge"; +$sql.= " sum(".$db->ifsql('d.total_ht < 0','d.qty * d.buy_price_ht * -1','d.qty * d.buy_price_ht').") as buying_price,"; +$sql.= " sum(".$db->ifsql('d.total_ht < 0','-1 * (abs(d.total_ht) - (d.buy_price_ht * d.qty))','d.total_ht - (d.buy_price_ht * d.qty)').") as marge"; $sql.= " FROM ".MAIN_DB_PREFIX."societe as s"; $sql.= ", ".MAIN_DB_PREFIX."facture as f"; $sql.= ", ".MAIN_DB_PREFIX."facturedet as d"; diff --git a/htdocs/margin/productMargins.php b/htdocs/margin/productMargins.php index a394b42686e..b8d5f7f66ba 100644 --- a/htdocs/margin/productMargins.php +++ b/htdocs/margin/productMargins.php @@ -167,8 +167,8 @@ $sql = "SELECT p.label, p.rowid, p.fk_product_type, p.ref,"; if ($id > 0) $sql.= " d.fk_product,"; if ($id > 0) $sql.= " f.rowid as facid, f.facnumber, f.total as total_ht, f.datef, f.paye, f.fk_statut as statut,"; $sql.= " sum(d.total_ht) as selling_price,"; -$sql.= " sum(".$db->ifsql('d.total_ht <=0','d.qty * d.buy_price_ht * -1','d.qty * d.buy_price_ht').") as buying_price,"; -$sql.= " sum(".$db->ifsql('d.total_ht <=0','-1 * (abs(d.total_ht) - (d.buy_price_ht * d.qty))','d.total_ht - (d.buy_price_ht * d.qty)').") as marge"; +$sql.= " sum(".$db->ifsql('d.total_ht < 0','d.qty * d.buy_price_ht * -1','d.qty * d.buy_price_ht').") as buying_price,"; +$sql.= " sum(".$db->ifsql('d.total_ht < 0','-1 * (abs(d.total_ht) - (d.buy_price_ht * d.qty))','d.total_ht - (d.buy_price_ht * d.qty)').") as marge"; $sql.= " FROM ".MAIN_DB_PREFIX."societe as s"; $sql.= ", ".MAIN_DB_PREFIX."product as p"; $sql.= ", ".MAIN_DB_PREFIX."facture as f"; From fdac53bfca37b034a8decfb4f0e568cbc93a5b27 Mon Sep 17 00:00:00 2001 From: BENKE Charles Date: Wed, 19 Nov 2014 18:53:33 +0100 Subject: [PATCH 0083/1060] Update objectline_create.tpl.php add label tags for product mode type --- htdocs/core/tpl/objectline_create.tpl.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/htdocs/core/tpl/objectline_create.tpl.php b/htdocs/core/tpl/objectline_create.tpl.php index a51a6505416..6e9b3251fbd 100644 --- a/htdocs/core/tpl/objectline_create.tpl.php +++ b/htdocs/core/tpl/objectline_create.tpl.php @@ -107,7 +107,9 @@ else { print ''; } else {*/ + echo ''; /* if (empty($conf->product->enabled) && empty($conf->service->enabled)) echo $langs->trans("Type"); else if (! empty($forceall) || (! empty($conf->product->enabled) && ! empty($conf->service->enabled))) echo $langs->trans("FreeLineOfType"); @@ -123,7 +125,7 @@ else { { echo '
'; echo ' '; - + echo ''; echo ' '; $filtertype=''; From f7206c2a52509115cce007befc9bd85603439b72 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 19 Nov 2014 23:10:30 +0100 Subject: [PATCH 0084/1060] Fixed: [ bug #1578 ] Cannot create proposal by copy of another one --- htdocs/comm/propal/class/propal.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index 16d2edd0e96..12dbbe7d1c1 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -651,7 +651,7 @@ class Propal extends CommonObject * @param int $notrigger 1=Does not execute triggers, 0= execuete triggers * @return int <0 if KO, >=0 if OK */ - function create($user='', $notrigger=0) + function create($user, $notrigger=0) { global $langs,$conf,$mysoc,$hookmanager; $error=0; @@ -919,7 +919,7 @@ class Propal extends CommonObject { $this->products=$this->lines; - return $this->create(); + return $this->create($user); } /** From 4d48205e45fa2c01cc334f6aa2ccc61f0dadb88d Mon Sep 17 00:00:00 2001 From: aspangaro Date: Thu, 20 Nov 2014 06:01:08 +0100 Subject: [PATCH 0085/1060] #1657 Intervention preview date is not displayed --- htdocs/fichinter/apercu.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/fichinter/apercu.php b/htdocs/fichinter/apercu.php index 65721bdcce1..0d4d3421538 100644 --- a/htdocs/fichinter/apercu.php +++ b/htdocs/fichinter/apercu.php @@ -155,7 +155,7 @@ if ($id > 0 || ! empty($ref)) // Date print ''.$langs->trans("Date").''; - print "".dol_print_date($object->date,"daytext")."\n"; + print "".dol_print_date($object->datec,"daytext")."\n"; print ''; print ''; From 01a5f22f4a42009c053614af438dc51447726d2a Mon Sep 17 00:00:00 2001 From: aspangaro Date: Thu, 20 Nov 2014 06:34:50 +0100 Subject: [PATCH 0086/1060] #1704 Untranslatable token in externalsite module admin --- htdocs/externalsite/admin/externalsite.php | 2 +- htdocs/langs/en_US/externalsite.lang | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/externalsite/admin/externalsite.php b/htdocs/externalsite/admin/externalsite.php index 95d0a4397de..93595b2cb9f 100644 --- a/htdocs/externalsite/admin/externalsite.php +++ b/htdocs/externalsite/admin/externalsite.php @@ -99,7 +99,7 @@ $var=!$var; print ""; print ''.$langs->trans("Label").""; print "global->EXTERNALSITE_LABEL) || $conf->global->EXTERNALSITE_LABEL=='ExternalSite')?'':$conf->global->EXTERNALSITE_LABEL)) . "\" size=\"12\">"; -print "My menu entry"; +print "".$langs->trans("ExampleMyMenuEntry").""; print ""; $var=!$var; diff --git a/htdocs/langs/en_US/externalsite.lang b/htdocs/langs/en_US/externalsite.lang index 62da68c045d..afec761f5fe 100644 --- a/htdocs/langs/en_US/externalsite.lang +++ b/htdocs/langs/en_US/externalsite.lang @@ -2,3 +2,4 @@ ExternalSiteSetup=Setup link to external website ExternalSiteURL=External Site URL ExternalSiteModuleNotComplete=Module ExternalSite was not configured properly. +ExampleMyMenuEntry=My menu entry \ No newline at end of file From 4b229dabfd9e84ed0d64aad6931a54b124a606aa Mon Sep 17 00:00:00 2001 From: aspangaro Date: Thu, 20 Nov 2014 06:55:38 +0100 Subject: [PATCH 0087/1060] #1706 Missing table cell in shipment list header + Search fields doesn't work --- htdocs/expedition/list.php | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/htdocs/expedition/list.php b/htdocs/expedition/list.php index 4cd62249545..af1d244e0d0 100644 --- a/htdocs/expedition/list.php +++ b/htdocs/expedition/list.php @@ -36,7 +36,7 @@ $result = restrictedArea($user, 'expedition',$expeditionid,''); $search_ref_exp = GETPOST("search_ref_exp"); $search_ref_liv = GETPOST('search_ref_liv'); -$search_societe = GETPOST("search_societe"); +$search_company = GETPOST("search_company"); $sortfield = GETPOST('sortfield','alpha'); $sortorder = GETPOST('sortorder','alpha'); @@ -51,12 +51,12 @@ if (! $sortfield) $sortfield="e.ref"; if (! $sortorder) $sortorder="DESC"; $limit = $conf->liste_limit; -// Do we click on purge search criteria ? +// Purge search criteria if (GETPOST("button_removefilter_x")) { $search_ref_exp=''; $search_ref_liv=''; - $search_societe=''; + $search_company=''; } /* @@ -92,7 +92,7 @@ if ($socid) } if ($search_ref_exp) $sql .= natural_search('e.ref', $search_ref_exp); if ($search_ref_liv) $sql .= natural_search('l.ref', $search_ref_liv); -if ($search_societe) $sql .= natural_search('s.nom', $search_societe); +if ($search_company) $sql .= natural_search('s.nom', $search_company); $sql.= $db->order($sortfield,$sortorder); $sql.= $db->plimit($limit + 1,$offset); @@ -107,12 +107,13 @@ if ($resql) $param=""; if ($search_ref_exp) $param.= "&search_ref_exp=".$search_ref_exp; if ($search_ref_liv) $param.= "&search_ref_liv=".$search_ref_liv; - if ($search_societe) $param.= "&search_societe=".$search_societe; + if ($search_company) $param.= "&search_company=".$search_company; print_barre_liste($langs->trans('ListOfSendings'), $page, $_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,'',$num); $i = 0; + print ''."\n"; print ''; print ''; @@ -124,6 +125,7 @@ if ($resql) print_liste_field_titre($langs->trans("DateReceived"),"ship2bill.php","e.date_expedition","",$param, 'align="center"',$sortfield,$sortorder); } print_liste_field_titre($langs->trans("Status"),"ship2bill.php","e.fk_statut","",$param,'align="right"',$sortfield,$sortorder); + print ''; print "\n"; // Lignes des champs de filtre @@ -132,7 +134,7 @@ if ($resql) print ''; print ''; print ''; print ''; if($conf->livraison_bon->enabled) { @@ -141,13 +143,9 @@ if ($resql) print ''; print ''; } - print ''; + print ''; print ''; @@ -161,12 +159,15 @@ if ($resql) $objp = $db->fetch_object($resql); $var=!$var; + + // Ref print ""; print "\n"; + // Third party print ''; - // Date delivery planed + + // Date delivery planed print ""; print '
 
'; - print ''; + print ''; print '  '; - // Développé dans la 3.7 - //print img_search(); - //print img_searchclear(); - print ''; + print ''; print ''; - print ''; print ''.$langs->trans("All").' / '.$langs->trans("None").''; print '
"; $shipment->id=$objp->rowid; $shipment->ref=$objp->ref; print $shipment->getNomUrl(1); print "'; $companystatic->id=$objp->socid; @@ -174,7 +175,8 @@ if ($resql) $companystatic->name=$objp->socname; print $companystatic->getNomUrl(1); print '"; print dol_print_date($db->jdate($objp->date_expedition),"day"); /*$now = time(); From 358ddb0abc1f9f55a4a751775ad8d8d4683e1757 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 20 Nov 2014 10:15:24 +0100 Subject: [PATCH 0088/1060] Fix: W3C. form into table is forbidden. This makes some browsers crazy. --- htdocs/admin/events.php | 19 ++-- htdocs/admin/proxy.php | 22 +++-- htdocs/admin/security_other.php | 159 ++++++++++++-------------------- 3 files changed, 82 insertions(+), 118 deletions(-) diff --git a/htdocs/admin/events.php b/htdocs/admin/events.php index 59205dcdbab..d5562248c55 100644 --- a/htdocs/admin/events.php +++ b/htdocs/admin/events.php @@ -78,15 +78,16 @@ print_fiche_titre($langs->trans("SecuritySetup"),'','setup'); print $langs->trans("LogEventDesc")."
\n"; print "
\n"; -$head=security_prepare_head(); - -dol_fiche_head($head, 'audit', $langs->trans("Security")); - print ''; print ''; print ''; +$head=security_prepare_head(); + +dol_fiche_head($head, 'audit', $langs->trans("Security")); + + $var=true; print ""; print ""; @@ -109,14 +110,14 @@ foreach ($eventstolog as $key => $arr) } print '
'; -print '
'; +dol_fiche_end(); + +print '
'; print "trans("Save")."\">"; -print "
"; +print ""; print "\n"; -print ''; - -$db->close(); llxFooter(); +$db->close(); diff --git a/htdocs/admin/proxy.php b/htdocs/admin/proxy.php index 050c92fd188..2e9d1f49169 100644 --- a/htdocs/admin/proxy.php +++ b/htdocs/admin/proxy.php @@ -86,6 +86,13 @@ print_fiche_titre($langs->trans("SecuritySetup"),'','setup'); print $langs->trans("ProxyDesc")."
\n"; print "
\n"; + + +print '
'; +print ''; +print ''; + + $head=security_prepare_head(); dol_fiche_head($head, 'proxy', $langs->trans("Security")); @@ -118,10 +125,6 @@ if ($conf->use_javascript_ajax) // Timeout $var=true; -print ''; -print ''; -print ''; - print ''; print ''; @@ -196,14 +199,13 @@ print ''; print '
'; -print '
'; -print ''; -print '
'; - -print '
'; - dol_fiche_end(); +print '
'; +print ''; +print '
'; + +print ''; $db->close(); diff --git a/htdocs/admin/security_other.php b/htdocs/admin/security_other.php index 6cbbe9185a0..c7ad04c322c 100644 --- a/htdocs/admin/security_other.php +++ b/htdocs/admin/security_other.php @@ -80,35 +80,15 @@ else if (preg_match('/del_(.*)/',$action,$reg)) } } -else if ($action == 'MAIN_SESSION_TIMEOUT') +else if ($action == 'updateform') { - if (! dolibarr_set_const($db, "MAIN_SESSION_TIMEOUT", $_POST["MAIN_SESSION_TIMEOUT"],'chaine',0,'',$conf->entity)) dol_print_error($db); - else setEventMessage($langs->trans("RecordModifiedSuccessfully")); -} -else if ($action == 'MAIN_UPLOAD_DOC') -{ - if (! dolibarr_set_const($db, 'MAIN_UPLOAD_DOC',$_POST["MAIN_UPLOAD_DOC"],'chaine',0,'',$conf->entity)) dol_print_error($db); - else setEventMessage($langs->trans("RecordModifiedSuccessfully")); -} -else if ($action == 'MAIN_UMASK') -{ - if (! dolibarr_set_const($db, "MAIN_UMASK", $_POST["MAIN_UMASK"],'chaine',0,'',$conf->entity)) dol_print_error($db); - else setEventMessage($langs->trans("RecordModifiedSuccessfully")); -} -else if ($action == 'MAIN_ANTIVIRUS_COMMAND') -{ - if (! dolibarr_set_const($db, "MAIN_ANTIVIRUS_COMMAND", $_POST["MAIN_ANTIVIRUS_COMMAND"],'chaine',0,'',$conf->entity)) dol_print_error($db); - else setEventMessage($langs->trans("RecordModifiedSuccessfully")); -} -else if ($action == 'MAIN_ANTIVIRUS_PARAM') -{ - if (! dolibarr_set_const($db, "MAIN_ANTIVIRUS_PARAM", $_POST["MAIN_ANTIVIRUS_PARAM"],'chaine',0,'',$conf->entity)) dol_print_error($db); - else setEventMessage($langs->trans("RecordModifiedSuccessfully")); -} -else if ($action == 'MAIN_APPLICATION_TITLE') -{ - if (! dolibarr_set_const($db, "MAIN_APPLICATION_TITLE", $_POST["MAIN_APPLICATION_TITLE"],'chaine',0,'',$conf->entity)) dol_print_error($db); - else setEventMessage($langs->trans("RecordModifiedSuccessfully")); + $res1=dolibarr_set_const($db, "MAIN_APPLICATION_TITLE", $_POST["MAIN_APPLICATION_TITLE"],'chaine',0,'',$conf->entity); + $res2=dolibarr_set_const($db, "MAIN_SESSION_TIMEOUT", $_POST["MAIN_SESSION_TIMEOUT"],'chaine',0,'',$conf->entity); + $res3=dolibarr_set_const($db, 'MAIN_UPLOAD_DOC',$_POST["MAIN_UPLOAD_DOC"],'chaine',0,'',$conf->entity); + $res4=dolibarr_set_const($db, "MAIN_UMASK", $_POST["MAIN_UMASK"],'chaine',0,'',$conf->entity); + $res5=dolibarr_set_const($db, "MAIN_ANTIVIRUS_COMMAND", $_POST["MAIN_ANTIVIRUS_COMMAND"],'chaine',0,'',$conf->entity); + $res6=dolibarr_set_const($db, "MAIN_ANTIVIRUS_PARAM", $_POST["MAIN_ANTIVIRUS_PARAM"],'chaine',0,'',$conf->entity); + if ($res1 && $res2 && $res3 && $res4 && $res5 && $res6) setEventMessage($langs->trans("RecordModifiedSuccessfully")); } @@ -138,57 +118,17 @@ print_fiche_titre($langs->trans("SecuritySetup"),'','setup'); print $langs->trans("MiscellaneousDesc")."
\n"; print "
\n"; + + +print '
'; +print ''; +print ''; + $head=security_prepare_head(); dol_fiche_head($head, 'misc', $langs->trans("Security")); -// Timeout -$var=true; - -print ''; -print ''; -print ''; -print ''; -print ''; -print "\n"; - -$var=!$var; -$sessiontimeout=ini_get("session.gc_maxlifetime"); -if (empty($conf->global->MAIN_SESSION_TIMEOUT)) $conf->global->MAIN_SESSION_TIMEOUT=$sessiontimeout; -print ''; -print ''; -print ''; -print ''; -print ''; -print ''; -print ''; - -$var=!$var; -$sessiontimeout=ini_get("session.gc_maxlifetime"); -if (empty($conf->global->MAIN_APPLICATION_TITLE)) $conf->global->MAIN_APPLICATION_TITLE=""; -print ''; -print ''; -print ''; -print ''; -print ''; -print ''; -print ''; - -print '
'.$langs->trans("Parameters").''.$langs->trans("Value").' 
'.$langs->trans("SessionTimeOut").''; -print $form->textwithpicto('',$langs->trans("SessionExplanation",ini_get("session.gc_probability"),ini_get("session.gc_divisor"))); -print ''; -print ' '.strtolower($langs->trans("Seconds")); -print ''; -print ''; -print '
'.$langs->trans("MAIN_APPLICATION_TITLE").''; -print ''; -print ' '; -print ''; -print ''; -print '
'; -print '
'; - // Other Options $var=true; @@ -253,6 +193,44 @@ print "
'; + +print '
'; + + +// Timeout +$var=true; + +print ''; +print ''; +print ''; +print ''; +print "\n"; + +$var=!$var; +$sessiontimeout=ini_get("session.gc_maxlifetime"); +if (empty($conf->global->MAIN_SESSION_TIMEOUT)) $conf->global->MAIN_SESSION_TIMEOUT=$sessiontimeout; +print ''; +print ''; +print ''; +print ''; + +$var=!$var; +$sessiontimeout=ini_get("session.gc_maxlifetime"); +if (empty($conf->global->MAIN_APPLICATION_TITLE)) $conf->global->MAIN_APPLICATION_TITLE=""; +print ''; +print ''; +print ''; +print ''; + +print '
'.$langs->trans("Parameters").''.$langs->trans("Value").'
'.$langs->trans("SessionTimeOut").''; +print $form->textwithpicto('',$langs->trans("SessionExplanation",ini_get("session.gc_probability"),ini_get("session.gc_divisor"))); +print ''; +print ' '.strtolower($langs->trans("Seconds")); +print '
'.$langs->trans("MAIN_APPLICATION_TITLE").''; +print ''; +print ' '; +print '
'; + print '
'; // Upload options @@ -262,11 +240,8 @@ print ''; print ''; print ''; print ''; -print ''; print ''; -print ''; -print ''; print ''; print ''; print ''; -print ''; -print ''; +print ''; $var=!$var; -print ''; -print ''; print ''; print ''; print ''; -print ''; -print ''; +print ''; // Use anti virus $var=!$var; -print ''; -print ''; print ""; print '"; -print ''; print ''; -print ''; // Use anti virus $var=!$var; -print ''; -print ''; print ""; print ''; print '"; -print ''; print ''; -print ''; print '
'.$langs->trans("Parameters").''.$langs->trans("Value").' 
'.$langs->trans("MaxSizeForUploadedFiles").'.'; $max=@ini_get('upload_max_filesize'); @@ -276,14 +251,9 @@ print ''; print ' '.$langs->trans("Kb"); print ''; -print ''; -print '
'.$langs->trans("UMask").''; print $form->textwithpicto('',$langs->trans("UMaskExplanation")); @@ -291,15 +261,10 @@ print ''; print ''; print ''; -print ''; -print '
'.$langs->trans("AntiVirusCommand").'
'; print $langs->trans("AntiVirusCommandExample"); @@ -319,16 +284,10 @@ if (ini_get('safe_mode') && ! empty($conf->global->MAIN_ANTIVIRUS_COMMAND)) } print ''; print "
'; -print ''; -print '
'.$langs->trans("AntiVirusParam").'
'; print $langs->trans("AntiVirusParamExample"); @@ -336,16 +295,18 @@ print '
'; print ''; print "'; -print ''; -print '
'; dol_fiche_end(); +print '
'; + +print ''; + + + // Form to test upload print '
'; $formfile=new FormFile($db); From d94d7f683b4f1a354ec4a65434cd714d1d92ef8b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 20 Nov 2014 10:31:59 +0100 Subject: [PATCH 0089/1060] Try to solve warning. --- .../class/opensurveysondage.class.php | 31 ++++++++++++------- 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/htdocs/opensurvey/class/opensurveysondage.class.php b/htdocs/opensurvey/class/opensurveysondage.class.php index 48119a7f16f..fa506285cc8 100644 --- a/htdocs/opensurvey/class/opensurveysondage.class.php +++ b/htdocs/opensurvey/class/opensurveysondage.class.php @@ -392,6 +392,7 @@ class Opensurveysondage extends CommonObject function fetch_lines() { $ret=array(); + $sql = "SELECT id_users, nom as name, reponses FROM ".MAIN_DB_PREFIX."opensurvey_user_studs"; $sql.= " WHERE id_sondage = '".$this->db->escape($this->id_sondage)."'"; $resql=$this->db->query($sql); @@ -441,7 +442,9 @@ class Opensurveysondage extends CommonObject * * @return Object[] */ - public function getComments() { + public function getComments() + { + $comments = array(); $sql = 'SELECT id_comment, usercomment, comment'; $sql.= ' FROM '.MAIN_DB_PREFIX.'opensurvey_comments'; @@ -449,13 +452,16 @@ class Opensurveysondage extends CommonObject $sql.= " ORDER BY id_comment"; $resql = $this->db->query($sql); - $num_rows=$this->db->num_rows($resql); + if ($resql) + { + $num_rows=$this->db->num_rows($resql); - $comments = array(); - - if ($num_rows > 0) { - while ($obj = $this->db->fetch_object($resql)) { - $comments[] = $obj; + if ($num_rows > 0) + { + while ($obj = $this->db->fetch_object($resql)) + { + $comments[] = $obj; + } } } @@ -469,8 +475,8 @@ class Opensurveysondage extends CommonObject * @param string $comment_user Comment author * @return boolean False in case of the query fails, true if it was successful */ - public function addComment($comment, $comment_user) { - + public function addComment($comment, $comment_user) + { $sql = "INSERT INTO ".MAIN_DB_PREFIX."opensurvey_comments (id_sondage, comment, usercomment)"; $sql.= " VALUES ('".$this->db->escape($this->id_sondage)."','".$this->db->escape($comment)."','".$this->db->escape($comment_user)."')"; $resql = $this->db->query($sql); @@ -488,7 +494,8 @@ class Opensurveysondage extends CommonObject * @param int $id_comment Id of the comment * @return boolean False in case of the query fails, true if it was successful */ - public function deleteComment($id_comment) { + public function deleteComment($id_comment) + { $sql = 'DELETE FROM '.MAIN_DB_PREFIX.'opensurvey_comments WHERE id_comment = '.$id_comment.' AND id_sondage = '.$this->id_sondage; $resql = $this->db->query($sql); @@ -504,8 +511,8 @@ class Opensurveysondage extends CommonObject * * @return void */ - private function cleanParameters() { - + private function cleanParameters() + { $this->id_sondage = trim($this->id_sondage); $this->commentaires = trim($this->commentaires); $this->mail_admin = trim($this->mail_admin); From c8cd36f3e66c446cc905ac0edf1bcc91663f13f0 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 20 Nov 2014 10:48:55 +0100 Subject: [PATCH 0090/1060] Fixed: ref supplier was visible with label Ref customer. --- htdocs/contrat/card.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/htdocs/contrat/card.php b/htdocs/contrat/card.php index 3502736fca6..20fd6939f5d 100644 --- a/htdocs/contrat/card.php +++ b/htdocs/contrat/card.php @@ -935,8 +935,8 @@ if ($action == 'create') } print ''.$langs->trans('Ref').''.$tmpcode.''; - // Ref Int - print ''.$langs->trans('RefCustomer').''; + // Ref supplier + print ''.$langs->trans('RefSupplier').''; print ''; // Customer @@ -1134,9 +1134,9 @@ else print ''; print ''; - print $form->editfieldkey("RefCustomer",'ref_supplier',$object->ref_supplier,$object,$user->rights->contrat->creer); + print $form->editfieldkey("RefSupplier",'ref_supplier',$object->ref_supplier,$object,$user->rights->contrat->creer); print ''; - print $form->editfieldval("RefCustomer",'ref_supplier',$object->ref_supplier,$object,$user->rights->contrat->creer); + print $form->editfieldval("RefSupplier",'ref_supplier',$object->ref_supplier,$object,$user->rights->contrat->creer); print ''; print ''; @@ -1290,7 +1290,7 @@ else $productstatic->ref=$objp->label; print $productstatic->getNomUrl(0,'',16); } - if (! empty($conf->global->PRODUIT_DESC_IN_FORM) and $objp->description) + if (! empty($conf->global->PRODUIT_DESC_IN_FORM) and $objp->description) print '
'.dol_nl2br($objp->description); print ''; } From 9f6a6d1300c4aa1e1087127029ca5d687ab3b9c3 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 20 Nov 2014 10:55:38 +0100 Subject: [PATCH 0091/1060] Fix: Missing translation --- htdocs/langs/en_US/admin.lang | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index a075f99cd06..720da83ccfd 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -1540,6 +1540,12 @@ Opened=Opened Closed=Closed AlwaysEditable=Can always be edited MAIN_APPLICATION_TITLE=Force visible name of application +NbMajMin=Minimum number of uppercase characters +NbNumMin=Minimum number of numeric characters +NbSpeMin=Minimum number of special characters +NbSpeMin=Minimum number of special characters +NbIteConsecutive=Maximum number of repeating same characters +NoAmbiCaracAutoGeneration=Do not use ambiguous characters ("1","l","i","|","0","O") for automatic generation Format=Format TypePaymentDesc=0:Customer payment type, 1:Supplier payment type, 2:Both customers and suppliers payment type From dae9315374b084419b8897f9c0f208f0a34ff464 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 20 Nov 2014 11:06:46 +0100 Subject: [PATCH 0092/1060] Fix: duplicate line --- htdocs/admin/security_other.php | 46 --------------------------------- 1 file changed, 46 deletions(-) diff --git a/htdocs/admin/security_other.php b/htdocs/admin/security_other.php index c72ff392b28..064f7ad0cd9 100644 --- a/htdocs/admin/security_other.php +++ b/htdocs/admin/security_other.php @@ -128,52 +128,6 @@ $head=security_prepare_head(); dol_fiche_head($head, 'misc', $langs->trans("Security")); -// Timeout -$var=true; - -print ''; -print ''; -print ''; -print ''; -print ''; -print "\n"; - -$var=!$var; -$sessiontimeout=ini_get("session.gc_maxlifetime"); -if (empty($conf->global->MAIN_SESSION_TIMEOUT)) $conf->global->MAIN_SESSION_TIMEOUT=$sessiontimeout; -print ''; -print ''; -print ''; -print ''; -print ''; -print ''; -print ''; - -$var=!$var; -$sessiontimeout=ini_get("session.gc_maxlifetime"); -if (empty($conf->global->MAIN_APPLICATION_TITLE)) $conf->global->MAIN_APPLICATION_TITLE=""; -print ''; -print ''; -print ''; -print ''; -print ''; -print ''; -print ''; - -print '
'.$langs->trans("Parameters").''.$langs->trans("Value").' 
'.$langs->trans("SessionTimeOut").''; -print $form->textwithpicto('',$langs->trans("SessionExplanation",ini_get("session.gc_probability"),ini_get("session.gc_divisor"))); -print ''; -print ' '.strtolower($langs->trans("Seconds")); -print ''; -print ''; -print '
'.$langs->trans("MAIN_APPLICATION_TITLE").''; -print ''; -print ' '; -print ''; -print ''; -print '
'; -print '
'; - // Other Options $var=true; From 22640092479ef86029a93324df3dc68a05792cd9 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 20 Nov 2014 11:24:06 +0100 Subject: [PATCH 0093/1060] Fix: css --- htdocs/theme/eldy/style.css.php | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index 9f4e6abe24c..5ac8a76fb53 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -1976,18 +1976,6 @@ div.tabBar .noborder { * Boxes */ -.tdboxstats { - - background: -o-linear-gradient(bottom, rgb() 85%, rgb() 120%) !important; - background: -moz-linear-gradient(bottom, rgb() 85%, rgb() 120%) !important; - background: -webkit-linear-gradient(bottom, rgb() 85%, rgb() 120%) !important; - background: -ms-linear-gradient(bottom, rgb() 85%, rgb() 120%) !important; - background: linear-gradient(bottom, rgb() 85%, rgb() 120%) !important; - - background: #ffffff !important; - -} - .boxstats { margin: 3px; From 76b8ff9416cee8034f275d37943b05765edf4118 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 20 Nov 2014 11:34:43 +0100 Subject: [PATCH 0094/1060] Fix: css --- htdocs/public/demo/index.php | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/htdocs/public/demo/index.php b/htdocs/public/demo/index.php index 5c2efc4a0ac..8ee00d83515 100644 --- a/htdocs/public/demo/index.php +++ b/htdocs/public/demo/index.php @@ -259,9 +259,7 @@ color: #444444 !important; margin: 8px 0px 8px 2px; -border-left: 1px solid #DDD; -border-right: 1px solid #DDD; -border-bottom: 1px solid #EEE; +border: 1px solid #bbb; border-radius: 8px; -moz-border-radius: 8px; @@ -269,11 +267,7 @@ border-radius: 8px; -webkit-box-shadow: 4px 4px 4px #EEE; box-shadow: 4px 4px 4px #EEE; -background-image: linear-gradient(bottom, rgb(246,248,250) 15%, rgb(235,235,238) 100%); -background-image: -o-linear-gradient(bottom, rgb(246,248,250) 15%, rgb(235,235,238) 100%); -background-image: -moz-linear-gradient(bottom, rgb(246,248,250) 15%, rgb(235,235,238) 100%); -background-image: -webkit-linear-gradient(bottom, rgb(246,248,250) 15%, rgb(235,235,238) 100%); -background-image: -ms-linear-gradient(bottom, rgb(246,248,250) 15%, rgb(235,235,238) 100%); +background: -webkit-linear-gradient(bottom, rgb(255,255,255) 85%, rgb(255,255,255) 100%); } From ea02bdf85e902ec097f4e94cabbebe69200fd1b7 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 20 Nov 2014 13:06:05 +0100 Subject: [PATCH 0095/1060] Fix: duplicate function --- htdocs/core/class/extrafields.class.php | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index a4396624f86..30c97e9f1ef 100644 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -510,17 +510,6 @@ class ExtraFields } - /** - * Load array of labels - * - * @return void - */ - function fetch_optionals() - { - $this->fetch_name_optionals_label(); - } - - /** * Load array this->attribute_xxx like attribute_label, attribute_type, ... * @@ -528,7 +517,7 @@ class ExtraFields * @param boolean $forceload Force load of extra fields whatever is option MAIN_EXTRAFIELDS_DISABLED * @return array Array of attributes for all extra fields */ - function fetch_name_optionals_label($elementtype='adherent',$forceload=false) + function fetch_name_optionals_label($elementtype,$forceload=false) { global $conf; From d462facf6d8a71d541a6d5826543ff30ffc6fae5 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 20 Nov 2014 14:44:49 +0100 Subject: [PATCH 0096/1060] Fixed: [ bug #1653 ] Can't access task notes --- htdocs/core/class/commonobject.class.php | 12 ++++++++---- htdocs/projet/card.php | 2 +- htdocs/projet/tasks/note.php | 6 +++--- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 98bee3e052c..87ee2f1a1d2 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -601,18 +601,22 @@ abstract class CommonObject /** * Load the third party of object, from id $this->socid or $this->fk_soc, into this->thirdparty * - * @return int <0 if KO, >0 if OK + * @param int $force_thirdparty_id Force thirdparty id + * @return int <0 if KO, >0 if OK */ - function fetch_thirdparty() + function fetch_thirdparty($force_thirdparty_id=0) { global $conf; - if (empty($this->socid) && empty($this->fk_soc) && empty($this->fk_thirdparty)) return 0; + if (empty($this->socid) && empty($this->fk_soc) && empty($this->fk_thirdparty) && empty($force_thirdparty_id)) return 0; require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; + $idtofetch=isset($this->socid)?$this->socid:(isset($this->fk_soc)?$this->fk_soc:$this->fk_thirdparty); + if ($force_thirdparty_id) $idtofetch=$force_thirdparty_id; + $thirdparty = new Societe($this->db); - $result=$thirdparty->fetch(isset($this->socid)?$this->socid:(isset($this->fk_soc)?$this->fk_soc:$this->fk_thirdparty)); + $result=$thirdparty->fetch($idtofetch); $this->client = $thirdparty; // deprecated $this->thirdparty = $thirdparty; diff --git a/htdocs/projet/card.php b/htdocs/projet/card.php index df67d9d8fa1..f60d56cb633 100644 --- a/htdocs/projet/card.php +++ b/htdocs/projet/card.php @@ -260,7 +260,7 @@ if (empty($reshook)) { $db->commit(); - if (GETPOST('socid','int') > 0) $object->thirdparty->fetch(GETPOST('socid','int')); + if (GETPOST('socid','int') > 0) $object->fetch_thirdparty(GETPOST('socid','int')); else unset($object->thirdparty); } } diff --git a/htdocs/projet/tasks/note.php b/htdocs/projet/tasks/note.php index 04e92c7c7f2..30e6c3fe291 100644 --- a/htdocs/projet/tasks/note.php +++ b/htdocs/projet/tasks/note.php @@ -51,7 +51,7 @@ if ($id > 0 || ! empty($ref)) if ($object->fetch($id,$ref) > 0) { $projectstatic->fetch($object->fk_project); - if (! empty($projectstatic->socid)) $projectstatic->societe->fetch($projectstatic->socid); + if (! empty($projectstatic->socid)) $projectstatic->fetch_thirdparty(); $object->project = dol_clone($projectstatic); } @@ -134,7 +134,7 @@ if ($object->id > 0) // Company print ''.$langs->trans("ThirdParty").''; - if (! empty($projectstatic->societe->id)) print $projectstatic->societe->getNomUrl(1); + if (! empty($projectstatic->thirdparty->id)) print $projectstatic->thirdparty->getNomUrl(1); else print ' '; print ''; print ''; @@ -196,7 +196,7 @@ if ($object->id > 0) // Third party print ''.$langs->trans("ThirdParty").''; - if ($projectstatic->societe->id > 0) print $projectstatic->societe->getNomUrl(1); + if ($projectstatic->thirdparty->id > 0) print $projectstatic->thirdparty->getNomUrl(1); else print' '; print ''; } From 0f5203b384ef0639ca68dbafed805481c318331f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 20 Nov 2014 15:08:13 +0100 Subject: [PATCH 0097/1060] Edit vat --- htdocs/admin/dict.php | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php index 4d33723a947..72b7c8fe549 100644 --- a/htdocs/admin/dict.php +++ b/htdocs/admin/dict.php @@ -453,8 +453,8 @@ if (GETPOST('actionadd') || GETPOST('actionmodify')) $ok=1; foreach ($listfield as $f => $value) { + if ($value == 'country_id' && in_array($tablib[$id],array('DictionaryVAT','DictionaryRegion','DictionaryCompanyType'))) continue; // For some pages, country is not mandatory if ($value == 'country' && in_array($tablib[$id],array('DictionaryCanton','DictionaryCompanyType'))) continue; // For some pages, country is not mandatory - if ($value == 'country_id' && in_array($tablib[$id],array('DictionaryRegion','DictionaryCompanyType'))) continue; // For some pages, country is not mandatory if ($value == 'localtax1' && empty($_POST['localtax1_type'])) continue; if ($value == 'localtax2' && empty($_POST['localtax2_type'])) continue; if ($value == 'color' && empty($_POST['color'])) continue; @@ -1361,14 +1361,18 @@ function fieldList($fieldlist,$obj='',$tabname='') continue; } // For state page, we do not show the country input (we link to region, not country) print ''; - print $form->select_country((! empty($obj->country_code)?$obj->country_code:(! empty($obj->country)?$obj->country:'')), 'country', '', 28); + $fieldname='country'; + print $form->select_country((! empty($obj->country_code)?$obj->country_code:(! empty($obj->country)?$obj->country:'')), $fieldname, '', 28); print ''; } elseif ($fieldlist[$field] == 'country_id') { - $country_id = (! empty($obj->$fieldlist[$field]) ? $obj->$fieldlist[$field] : 0); - print ''; - print ''; - print ''; + if (! in_array('country',$fieldlist)) // If there is already a field country, we don't show country_id (avoid duplicate) + { + $country_id = (! empty($obj->$fieldlist[$field]) ? $obj->$fieldlist[$field] : 0); + print ''; + print ''; + print ''; + } } elseif ($fieldlist[$field] == 'region') { print ''; From 95de38e102aef3f21bb060ba9d54c0411247f43c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 20 Nov 2014 15:32:10 +0100 Subject: [PATCH 0098/1060] =?UTF-8?q?Start=20to=20fix=20[=20bug=20#1711=20?= =?UTF-8?q?]=20Projet=20clotur=C3=A9=20toujours=20visible=20dans=20les=20a?= =?UTF-8?q?utres=20module=20pour=20affectation=20but=20it=20is=20a=20too?= =?UTF-8?q?=20important=20change.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/core/class/html.form.class.php | 9 ++++----- htdocs/core/class/html.formprojet.class.php | 11 +++++++++-- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index ba597dd4d57..99529fec524 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -3102,7 +3102,7 @@ class Form * @param string $htmlname Name of select field * @return void */ - function form_project($page, $socid, $selected='', $htmlname='projectid') + function form_project($page, $socid, $selected='', $htmlname='projectid', $discard_closed=0) { global $langs; @@ -3119,8 +3119,7 @@ class Form print ''; print ''; print ''; print ''; print '
'; - //print "$socid,$selected,$htmlname"; - $formproject->select_projects($socid,$selected,$htmlname); + $formproject->select_projects($socid,$selected,$htmlname,20,0,1,$discard_closed); print '
'; @@ -4103,7 +4102,7 @@ class Form if ($value_as_key) $array=array_combine($array, $array); $out=''; - + // Add code for jquery to use multiselect if (empty($conf->dol_use_jmobile) && (! empty($conf->global->MAIN_USE_JQUERY_MULTISELECT) || defined('REQUIRE_JQUERY_MULTISELECT'))) { @@ -4116,7 +4115,7 @@ class Form }); '; } - + $out.=''; @@ -4182,13 +4182,13 @@ class Form // Add code for jquery to use multiselect if (! empty($conf->global->MAIN_USE_JQUERY_MULTISELECT) || defined('REQUIRE_JQUERY_MULTISELECT')) { - $tmpplugin=empty($conf->global->MAIN_USE_JQUERY_MULTISELECT)?constant('REQUIRE_JQUERY_MULTISELECT'):$conf->global->MAIN_USE_JQUERY_MULTISELECT; - print ' - '; } From b644075faae980139baa46d2b3f73d8c42f4cc98 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 20 Nov 2014 23:41:58 +0100 Subject: [PATCH 0100/1060] Fix: doxygen --- htdocs/core/class/html.form.class.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index ae46a33d31c..a4d491683b5 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -3096,10 +3096,11 @@ class Form /** * Show a form to select a project * - * @param int $page Page - * @param int $socid Id third party (-1=all, 0=only projects not linked to a third party, id=projects not linked or linked to third party id) - * @param int $selected Id pre-selected project - * @param string $htmlname Name of select field + * @param int $page Page + * @param int $socid Id third party (-1=all, 0=only projects not linked to a third party, id=projects not linked or linked to third party id) + * @param int $selected Id pre-selected project + * @param string $htmlname Name of select field + * @param int $discard_closed Hide all closed projects * @return void */ function form_project($page, $socid, $selected='', $htmlname='projectid', $discard_closed=0) From 32f4db259cdbcd3cc41e07cfbbb43b3537728652 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 21 Nov 2014 23:39:02 +0100 Subject: [PATCH 0101/1060] Fix: [ bug #1651 ] Can't display margins in thirdparty card --- htdocs/margin/tabs/thirdpartyMargins.php | 30 +++++++++--------------- 1 file changed, 11 insertions(+), 19 deletions(-) diff --git a/htdocs/margin/tabs/thirdpartyMargins.php b/htdocs/margin/tabs/thirdpartyMargins.php index cc7a5fb1c75..144246f154a 100644 --- a/htdocs/margin/tabs/thirdpartyMargins.php +++ b/htdocs/margin/tabs/thirdpartyMargins.php @@ -128,10 +128,10 @@ if ($socid > 0) $sql = "SELECT distinct s.nom, s.rowid as socid, s.code_client,"; $sql.= " f.rowid as facid, f.facnumber, f.total as total_ht,"; - $sql.= " f.datef, f.paye, f.fk_statut as statut,"; - $sql.= " sum(d.total_ht) as selling_price,"; - $sql.= " ".$db->ifsql('f.type =2','sum(d.qty * d.buy_price_ht *-1)','sum(d.qty * d.buy_price_ht)')." as buying_price,"; - $sql.= " ".$db->ifsql('f.type =2','sum(-1 * (abs(d.total_ht) - (d.buy_price_ht * d.qty)))','sum(d.total_ht - (d.buy_price_ht * d.qty))')." as marge"; + $sql.= " f.datef, f.paye, f.fk_statut as statut, f.type,"; + $sql.= " sum(d.total_ht) as selling_price,"; // may be negative or positive + $sql.= " sum(d.qty * d.buy_price_ht) as buying_price,"; // always positive + $sql.= " sum(abs(d.total_ht) - (d.buy_price_ht * d.qty)) as marge"; // always positive $sql.= " FROM ".MAIN_DB_PREFIX."societe as s"; $sql.= ", ".MAIN_DB_PREFIX."facture as f"; $sql.= ", ".MAIN_DB_PREFIX."facturedet as d"; @@ -140,9 +140,9 @@ if ($socid > 0) $sql.= " AND s.entity = ".$conf->entity; $sql.= " AND d.fk_facture = f.rowid"; $sql.= " AND f.fk_soc = $socid"; - $sql .= " AND d.buy_price_ht IS NOT NULL"; + $sql.= " AND d.buy_price_ht IS NOT NULL"; if (isset($conf->global->ForceBuyingPriceIfNull) && $conf->global->ForceBuyingPriceIfNull == 1) $sql .= " AND d.buy_price_ht <> 0"; - $sql.= " GROUP BY s.nom, s.rowid, s.code_client, f.rowid, f.facnumber, f.total, f.datef, f.paye, f.fk_statut"; + $sql.= " GROUP BY s.nom, s.rowid, s.code_client, f.rowid, f.facnumber, f.total, f.datef, f.paye, f.fk_statut, f.type"; $sql.= " ORDER BY ".$sortfield." ".$sortorder; // TODO: calculate total to display then restore pagination //$sql.= $db->plimit($conf->liste_limit +1, $offset); @@ -153,7 +153,7 @@ if ($socid > 0) { $num = $db->num_rows($result); - print_barre_liste($langs->trans("MarginDetails"),$page,$_SERVER["PHP_SELF"],"&socid=$societe->id",$sortfield,$sortorder,'',0,0,''); + print_barre_liste($langs->trans("MarginDetails"),$page,$_SERVER["PHP_SELF"],"&socid=".$societe->id,$sortfield,$sortorder,'',0,0,''); $i = 0; print ""; @@ -183,16 +183,8 @@ if ($socid > 0) { $objp = $db->fetch_object($result); - if ($objp->marge < 0) - { - $marginRate = ($objp->buying_price != 0)?-1*(100 * $objp->marge / $objp->buying_price):'' ; - $markRate = ($objp->selling_price != 0)?-1*(100 * $objp->marge / $objp->selling_price):'' ; - } - else - { - $marginRate = ($objp->buying_price != 0)?(100 * $objp->marge / $objp->buying_price):'' ; - $markRate = ($objp->selling_price != 0)?(100 * $objp->marge / $objp->selling_price):'' ; - } + $marginRate = ($objp->buying_price != 0)?(100 * $objp->marge / $objp->buying_price):'' ; + $markRate = ($objp->selling_price != 0)?(100 * $objp->marge / $objp->selling_price):'' ; $var=!$var; @@ -205,7 +197,7 @@ if ($socid > 0) print ""; print "\n"; - print "\n"; + print "\n"; print "\n"; if (! empty($conf->global->DISPLAY_MARGIN_RATES)) print "\n"; @@ -214,7 +206,7 @@ if ($socid > 0) print ''; print "\n"; $i++; - $cumul_achat += $objp->buying_price; + $cumul_achat += (($objp->type == 2 ? -1 : 1) * $objp->buying_price); $cumul_vente += $objp->selling_price; } } From ce98036725d920b79f1e9ac01f9bf884135c7ddf Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 21 Nov 2014 23:45:56 +0100 Subject: [PATCH 0102/1060] Fixed: [ bug #1648 ] Can't see turnover report by product/services --- htdocs/compta/stats/cabyprodserv.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/htdocs/compta/stats/cabyprodserv.php b/htdocs/compta/stats/cabyprodserv.php index e995ee45d54..8263dc76cb8 100644 --- a/htdocs/compta/stats/cabyprodserv.php +++ b/htdocs/compta/stats/cabyprodserv.php @@ -132,6 +132,8 @@ $tableparams = array_merge($commonparams, $tableparams); foreach($allparams as $key => $value) { $paramslink .= '&' . $key . '=' . $value; } + + /* * View */ @@ -174,12 +176,12 @@ report_header($nom,$nomlink,$period,$periodlink,$description,$builddate,$exportl // SQL request $catotal=0; -if ($modecompta == 'CREANCES-DETTES') +if ($modecompta == 'CREANCES-DETTES') { $sql = "SELECT DISTINCT p.rowid as rowid, p.ref as ref, p.label as label,"; $sql.= " sum(l.total_ht) as amount, sum(l.total_ttc) as amount_ttc"; $sql.= " FROM ".MAIN_DB_PREFIX."facture as f, ".MAIN_DB_PREFIX."facturedet as l, ".MAIN_DB_PREFIX."product as p"; - if ($selected_cat === -2) // Without any category + if ($selected_cat === -2) // Without any category { $sql.= " LEFT OUTER JOIN ".MAIN_DB_PREFIX."categorie_product as cp ON p.rowid = cp.fk_product"; } @@ -198,7 +200,7 @@ if ($modecompta == 'CREANCES-DETTES') if ($date_start && $date_end) { $sql.= " AND f.datef >= '".$db->idate($date_start)."' AND f.datef <= '".$db->idate($date_end)."'"; } - if ($selected_cat === -2) // Without any category + if ($selected_cat === -2) // Without any category { $sql.=" AND cp.fk_product is null"; } @@ -209,7 +211,7 @@ if ($modecompta == 'CREANCES-DETTES') $sql.= " AND cp.fk_categorie = c.rowid AND cp.fk_product = p.rowid"; } $sql.= " AND f.entity = ".$conf->entity; - $sql.= " GROUP BY p.rowid"; + $sql.= " GROUP BY p.rowid, p.ref, p.label"; $sql.= " ORDER BY p.ref"; dol_syslog("cabyprodserv", LOG_DEBUG); @@ -390,7 +392,7 @@ if ($modecompta == 'CREANCES-DETTES') // $modecompta != 'CREANCES-DETTES' // "Calculation of part of each product for accountancy in this mode is not possible. When a partial payment (for example 5 euros) is done on an // invoice with 2 product (product A for 10 euros and product B for 20 euros), what is part of paiment for product A and part of paiment for product B ? - // Because there is no way to know this, this report is not relevant. + // Because there is no way to know this, this report is not relevant. print '
'.$langs->trans("TurnoverPerProductInCommitmentAccountingNotRelevant") . '
'; } From 5acdce0b9f45700dc3a0b267203af08d2c19261d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 21 Nov 2014 23:52:12 +0100 Subject: [PATCH 0103/1060] Fixed: [ bug #1647 ] Can't list tax payments --- htdocs/compta/tva/reglement.php | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/htdocs/compta/tva/reglement.php b/htdocs/compta/tva/reglement.php index 8babbd58f7d..ebba3888004 100644 --- a/htdocs/compta/tva/reglement.php +++ b/htdocs/compta/tva/reglement.php @@ -97,7 +97,6 @@ if ($filtre) { if ($typeid) { $sql .= " AND t.fk_typepayment=".$typeid; } -$sql.= " GROUP BY t.rowid, t.fk_typepayment, t.amount, t.datev, t.label"; $sql.= $db->order($sortfield,$sortorder); $sql.= $db->plimit($limit+1,$offset); @@ -111,7 +110,7 @@ if ($result) $param=''; if ($typeid) $param.='&typeid='.$typeid; - + print_barre_liste($langs->trans("VATPayments"),$page,$_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,'',$num,$totalnboflines); print '
'; @@ -125,7 +124,7 @@ if ($result) print_liste_field_titre($langs->trans("PayedByThisPayment"),$_SERVER["PHP_SELF"],"t.amount","",$param,'align="right"',$sortfield,$sortorder); print_liste_field_titre(""); print "\n"; - + print '
'; print ''; print ''; @@ -138,21 +137,21 @@ if ($result) print '\n"; - + while ($i < min($num,$limit)) { $obj = $db->fetch_object($result); $var=!$var; - + if ($obj->payment_code <> '') { - $type = ''; + $type = ''; } else { $type = ''; } - + print ""; $tva_static->id=$obj->rowid; @@ -172,12 +171,12 @@ if ($result) } print ''; print ""; - print ""; + print ""; print "
"; print dol_print_date($db->jdate($objp->datef),'day')."".price($objp->selling_price, null, null, null, null, $rounding)."".price($objp->buying_price, null, null, null, null, $rounding)."".price(($objp->type == 2 ? -1 : 1) * $objp->buying_price, null, null, null, null, $rounding)."".price($objp->marge, null, null, null, null, $rounding)."".(($marginRate === '')?'n/a':price($marginRate, null, null, null, null, $rounding)."%")."'.$invoicestatic->LibStatut($objp->paye,$objp->statut,5).'
'; print ''; print "
'.$langs->trans("PaymentTypeShort".$obj->payment_code).' '.$obj->num_payment.''.$langs->trans("PaymentTypeShort".$obj->payment_code).' '.$obj->num_payment.' 
'.$langs->trans("Total").'".price($total)." 
 
"; - + print ''; - + $db->free($result); } else @@ -186,6 +185,6 @@ else } -$db->close(); - llxFooter(); + +$db->close(); From 95d7dc484104f57a189ce667df3904bfb7f9c407 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 22 Nov 2014 00:08:06 +0100 Subject: [PATCH 0104/1060] Fixed: [ bug #1565 ] Customer order label for status 2 is not coherent in french --- htdocs/commande/list.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php index ea17d895b95..b152a38db02 100644 --- a/htdocs/commande/list.php +++ b/htdocs/commande/list.php @@ -229,7 +229,7 @@ if ($resql) if ($viewstatut == 1) $title.=' - '.$langs->trans('StatusOrderValidatedShort'); if ($viewstatut == 2) - $title.=' - '.$langs->trans('StatusOrderOnProcessShort'); + $title.=' - '.$langs->trans('StatusOrderSentShort'); if ($viewstatut == 3) $title.=' - '.$langs->trans('StatusOrderToBillShort'); if ($viewstatut == 4) @@ -295,7 +295,7 @@ if ($resql) print_liste_field_titre($langs->trans('AmountHT'),$_SERVER["PHP_SELF"],'c.total_ht','',$param, 'align="right"',$sortfield,$sortorder); print_liste_field_titre($langs->trans('Status'),$_SERVER["PHP_SELF"],'c.fk_statut','',$param,'align="right"',$sortfield,$sortorder); print ''; - + print ''; print ''; print ''; From 1246c20355e9e3471e0a90290dfb32b7442edb94 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 22 Nov 2014 00:12:09 +0100 Subject: [PATCH 0105/1060] More complete translation --- htdocs/langs/en_US/admin.lang | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 720da83ccfd..1834843c7be 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -1539,7 +1539,7 @@ ConfirmDeleteFiscalYear=Are you sure to delete this fiscal year ? Opened=Opened Closed=Closed AlwaysEditable=Can always be edited -MAIN_APPLICATION_TITLE=Force visible name of application +MAIN_APPLICATION_TITLE=Force visible name of application (warning: setting your own name here may break autofill login feature when using DoliDroid mobile application) NbMajMin=Minimum number of uppercase characters NbNumMin=Minimum number of numeric characters NbSpeMin=Minimum number of special characters From 068c7fdb2d7e4bb788d15cc89d5afce5d5c6267b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 22 Nov 2014 00:31:19 +0100 Subject: [PATCH 0106/1060] Fixed: [ bug #1635 ] le tiers n'apparait plus sur la fiche tache --- htdocs/projet/tasks/contact.php | 4 ++-- htdocs/projet/tasks/document.php | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/htdocs/projet/tasks/contact.php b/htdocs/projet/tasks/contact.php index da002ef72d2..efec0f68223 100644 --- a/htdocs/projet/tasks/contact.php +++ b/htdocs/projet/tasks/contact.php @@ -188,7 +188,7 @@ if ($id > 0 || ! empty($ref)) print ''.$langs->trans("Label").''.$projectstatic->title.''; print ''.$langs->trans("ThirdParty").''; - if (! empty($projectstatic->thridparty->id)) print $projectstatic->thridparty->getNomUrl(1); + if (! empty($projectstatic->thirdparty->id)) print $projectstatic->thirdparty->getNomUrl(1); else print ' '; print ''; print ''; @@ -259,7 +259,7 @@ if ($id > 0 || ! empty($ref)) // Customer print "".$langs->trans("ThirdParty").""; print ''; - if ($projectstatic->thridparty->id > 0) print $projectstatic->thridparty->getNomUrl(1); + if ($projectstatic->thirdparty->id > 0) print $projectstatic->thirdparty->getNomUrl(1); else print ' '; print ''; } diff --git a/htdocs/projet/tasks/document.php b/htdocs/projet/tasks/document.php index 03ca7bae452..e75278e9631 100644 --- a/htdocs/projet/tasks/document.php +++ b/htdocs/projet/tasks/document.php @@ -121,7 +121,7 @@ llxHeader('',$langs->trans('Task')); if ($object->id > 0) { - if (! empty($projectstatic->socid)) $projectstatic->societe->fetch($projectstatic->socid); + $projectstatic->fetch_thirdparty(); $userWrite = $projectstatic->restrictedProjectArea($user,'write'); @@ -152,7 +152,7 @@ if ($object->id > 0) print ''.$langs->trans("Label").''.$projectstatic->title.''; print ''.$langs->trans("ThirdParty").''; - if (! empty($projectstatic->societe->id)) print $projectstatic->societe->getNomUrl(1); + if (! empty($projectstatic->thirdparty->id)) print $projectstatic->thirdparty->getNomUrl(1); else print ' '; print ''; print ''; @@ -225,7 +225,7 @@ if ($object->id > 0) // Third party print ''.$langs->trans("ThirdParty").''; - if ($projectstatic->societe->id) print $projectstatic->societe->getNomUrl(1); + if ($projectstatic->thirdparty->id) print $projectstatic->thirdparty->getNomUrl(1); else print ' '; print ''; } From a2d4046f50b0d0f9f26becffa8eeb336c5288673 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 22 Nov 2014 00:45:04 +0100 Subject: [PATCH 0107/1060] Fixed: Untranslatable tokens --- htdocs/admin/salaries.php | 10 +++++----- htdocs/langs/en_US/admin.lang | 3 ++- htdocs/langs/en_US/donations.lang | 5 +++++ htdocs/langs/en_US/paybox.lang | 3 +++ htdocs/langs/en_US/resource.lang | 2 ++ 5 files changed, 17 insertions(+), 6 deletions(-) diff --git a/htdocs/admin/salaries.php b/htdocs/admin/salaries.php index d7027d8a1dd..99651a4f4f3 100644 --- a/htdocs/admin/salaries.php +++ b/htdocs/admin/salaries.php @@ -23,7 +23,7 @@ */ require '../main.inc.php'; - + // Class require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; @@ -45,7 +45,7 @@ $list = array ( /* * Actions */ - + if ($action == 'update') { $error = 0; @@ -72,12 +72,12 @@ if ($action == 'update') * View */ -llxHeader(); +llxHeader('',$langs->trans('SalariesSetup')); $form = new Form($db); $linkback='
'.$langs->trans("BackToModuleList").''; -print_fiche_titre($langs->trans('ConfigSalaries'),$linkback,'setup'); +print_fiche_titre($langs->trans('SalariesSetup'),$linkback,'setup'); print '
'; print ''; @@ -98,7 +98,7 @@ foreach ($list as $key) print ''; // Param - $label = $langs->trans($key); + $label = $langs->trans($key); print ''; // Value diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 720da83ccfd..1eeb5a7f443 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -1546,6 +1546,7 @@ NbSpeMin=Minimum number of special characters NbSpeMin=Minimum number of special characters NbIteConsecutive=Maximum number of repeating same characters NoAmbiCaracAutoGeneration=Do not use ambiguous characters ("1","l","i","|","0","O") for automatic generation - +SalariesSetup=Setup of module salaries +SortOrder=Sort order Format=Format TypePaymentDesc=0:Customer payment type, 1:Supplier payment type, 2:Both customers and suppliers payment type diff --git a/htdocs/langs/en_US/donations.lang b/htdocs/langs/en_US/donations.lang index 85dfdd8ff4d..02795052fe5 100644 --- a/htdocs/langs/en_US/donations.lang +++ b/htdocs/langs/en_US/donations.lang @@ -31,3 +31,8 @@ DonationRecipient=Donation recipient ThankYou=Thank You IConfirmDonationReception=The recipient declare reception, as a donation, of the following amount MinimumAmount=Minimum amount is %s +FreeTextOnDonations=Free text to show in footer +FrenchOptions=Options for France +DONATION_ART200=Show legacy article 200 +DONATION_ART238=Show legacy article 238 +DONATION_ART885=Show legacy article 885 \ No newline at end of file diff --git a/htdocs/langs/en_US/paybox.lang b/htdocs/langs/en_US/paybox.lang index aa0040afdc8..4e6798a21b6 100644 --- a/htdocs/langs/en_US/paybox.lang +++ b/htdocs/langs/en_US/paybox.lang @@ -35,3 +35,6 @@ MessageKO=Message on canceled payment return page NewPayboxPaymentReceived=New Paybox payment received NewPayboxPaymentFailed=New Paybox payment tried but failed PAYBOX_PAYONLINE_SENDEMAIL=EMail to warn after a payment (success or failed) +PAYBOX_PBX_SITE=Value for PBX SITE +PAYBOX_PBX_RANG=Value for PBX Rang +PAYBOX_PBX_IDENTIFIANT=Value for PBX ID \ No newline at end of file diff --git a/htdocs/langs/en_US/resource.lang b/htdocs/langs/en_US/resource.lang index e0a767cc58a..3fbe6e4fb23 100755 --- a/htdocs/langs/en_US/resource.lang +++ b/htdocs/langs/en_US/resource.lang @@ -34,4 +34,6 @@ ConfirmDeleteResource=Confirm to delete this resource RessourceSuccessfullyDeleted=Resource successfully deleted DictionaryResourceType=Type of resources +DictionaryEMailTemplates=Modèles d'Emails + SelectResource=Select resource From d6f47227fe3b01bf4b00bf981dd8cd091bfe669b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 22 Nov 2014 15:09:54 +0100 Subject: [PATCH 0108/1060] Fixed: [ bug #1646 ] Can't list unpaid invoices --- htdocs/compta/facture/impayees.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/compta/facture/impayees.php b/htdocs/compta/facture/impayees.php index 320d86f3377..c762aac5702 100644 --- a/htdocs/compta/facture/impayees.php +++ b/htdocs/compta/facture/impayees.php @@ -429,7 +429,8 @@ if ($search_paymentmode) $sql .= " AND f.fk_mode_reglement = ".$search_payme if ($search_montant_ht) $sql .= " AND f.total = '".$db->escape($search_montant_ht)."'"; if ($search_montant_ttc) $sql .= " AND f.total_ttc = '".$db->escape($search_montant_ttc)."'"; if (GETPOST('sf_ref')) $sql .= " AND f.facnumber LIKE '%".$db->escape(GETPOST('sf_ref'))."%'"; -$sql.= " GROUP BY s.nom, s.rowid, s.email, f.rowid, f.facnumber, f.increment, f.total, f.tva, f.total_ttc, f.localtax1, f.localtax2, f.revenuestamp, f.datef, f.date_lim_reglement, f.paye, f.fk_statut, f.type "; +$sql.= " GROUP BY s.nom, s.rowid, s.email, f.rowid, f.facnumber, f.ref_client, f.increment, f.total, f.tva, f.total_ttc, f.localtax1, f.localtax2, f.revenuestamp,"; +$sql.= " f.datef, f.date_lim_reglement, f.paye, f.fk_statut, f.type, fk_mode_reglement"; if (! $user->rights->societe->client->voir && ! $socid) $sql .= ", sc.fk_soc, sc.fk_user "; $sql.= " ORDER BY "; $listfield=explode(',',$sortfield); From 43f3e28fd630a1b95a7ca8a78b7497e8cccf5446 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 22 Nov 2014 15:12:36 +0100 Subject: [PATCH 0109/1060] Fixed: [ bug #1645 ] Can't list contracts --- htdocs/contrat/list.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/htdocs/contrat/list.php b/htdocs/contrat/list.php index cf57e97933b..b1b28192395 100644 --- a/htdocs/contrat/list.php +++ b/htdocs/contrat/list.php @@ -79,14 +79,13 @@ $now=dol_now(); llxHeader(); $sql = 'SELECT'; +$sql.= " c.rowid as cid, c.ref, c.datec, c.date_contrat, c.statut, c.ref_supplier,"; +$sql.= " s.nom as name, s.rowid as socid,"; $sql.= ' SUM('.$db->ifsql("cd.statut=0",1,0).') as nb_initial,'; $sql.= ' SUM('.$db->ifsql("cd.statut=4 AND (cd.date_fin_validite IS NULL OR cd.date_fin_validite >= '".$db->idate($now)."')",1,0).') as nb_running,'; $sql.= ' SUM('.$db->ifsql("cd.statut=4 AND (cd.date_fin_validite IS NOT NULL AND cd.date_fin_validite < '".$db->idate($now)."')",1,0).') as nb_expired,'; $sql.= ' SUM('.$db->ifsql("cd.statut=4 AND (cd.date_fin_validite IS NOT NULL AND cd.date_fin_validite < '".$db->idate($now - $conf->contrat->services->expires->warning_delay)."')",1,0).') as nb_late,'; -$sql.= ' SUM('.$db->ifsql("cd.statut=5",1,0).') as nb_closed,'; -$sql.= " c.rowid as cid, c.ref, c.datec, c.date_contrat, c.statut,"; -$sql.= " s.nom as name, s.rowid as socid"; -$sql.= " ,c.ref_supplier"; +$sql.= ' SUM('.$db->ifsql("cd.statut=5",1,0).') as nb_closed'; $sql.= " FROM ".MAIN_DB_PREFIX."societe as s"; if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; $sql.= ", ".MAIN_DB_PREFIX."contrat as c"; @@ -107,7 +106,7 @@ if (!empty($search_ref_supplier)) { if ($sall) { $sql .= natural_search(array('s.nom', 'cd.label', 'cd.description'), $sall); } -$sql.= " GROUP BY c.rowid, c.ref, c.datec, c.date_contrat, c.statut, s.nom, s.rowid"; +$sql.= " GROUP BY c.rowid, c.ref, c.datec, c.date_contrat, c.statut, c.ref_supplier, s.nom, s.rowid"; $sql.= $db->order($sortfield,$sortorder); $sql.= $db->plimit($conf->liste_limit + 1, $offset); From eaa4b6cb56a9de31d37352e6540adb698b0e9e58 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 22 Nov 2014 15:37:18 +0100 Subject: [PATCH 0110/1060] Add PR manually because of conflict "#1678 & #1677 Untranslatable token" --- htdocs/compta/paiement/cheque/index.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htdocs/compta/paiement/cheque/index.php b/htdocs/compta/paiement/cheque/index.php index 27782259333..362493b7f19 100644 --- a/htdocs/compta/paiement/cheque/index.php +++ b/htdocs/compta/paiement/cheque/index.php @@ -29,6 +29,8 @@ require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; $langs->load("banks"); $langs->load("categories"); +$langs->load("compta"); +$langs->load("bills"); // Security check if ($user->societe_id) $socid=$user->societe_id; From 730bf1c25cf77b48f60b3b18114e83f8a78561d9 Mon Sep 17 00:00:00 2001 From: BENKE Charles Date: Wed, 19 Nov 2014 09:28:11 +0100 Subject: [PATCH 0111/1060] Update html.formcontract.class.php bad filtering on contract list (same sql rule as project) --- htdocs/core/class/html.formcontract.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/class/html.formcontract.class.php b/htdocs/core/class/html.formcontract.class.php index e0d550b4205..0eb2d4d4b26 100644 --- a/htdocs/core/class/html.formcontract.class.php +++ b/htdocs/core/class/html.formcontract.class.php @@ -65,7 +65,7 @@ class FormContract $sql.= " WHERE c.entity = ".$conf->entity; //if ($contratListId) $sql.= " AND c.rowid IN (".$contratListId.")"; if ($socid == 0) $sql.= " AND (c.fk_soc = 0 OR c.fk_soc IS NULL)"; - else $sql.= " AND c.fk_soc = ".$socid; + if ($socid > 0) $sql.= " AND (c.fk_soc=".$socid." OR c.fk_soc IS NULL)"; dol_syslog(get_class($this)."::select_contract", LOG_DEBUG); $resql=$db->query($sql); From 8c440dea4aeabdc38d8463f8f1571f76da1a1538 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 22 Nov 2014 15:47:14 +0100 Subject: [PATCH 0112/1060] Fxied: Syntax error --- htdocs/product/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/product/card.php b/htdocs/product/card.php index 5f9d42cdd44..92d588d19fe 100644 --- a/htdocs/product/card.php +++ b/htdocs/product/card.php @@ -124,7 +124,7 @@ if (empty($reshook)) // Barcode value if ($action == 'setbarcode' && $createbarcode) { - $result=$object->check_barcode(GETPOST('barcode'),GETPOT('barcode_type_code')); + $result=$object->check_barcode(GETPOST('barcode'),GETPOST('barcode_type_code')); if ($result >= 0) { From e4804f99ff62d5a385450444359fdec31653b9fc Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 22 Nov 2014 15:50:16 +0100 Subject: [PATCH 0113/1060] Merge pull request #2047 from frederic34/patch-6 #1685-1686 Clear sort filter works partially in supplier invoices --- htdocs/fourn/facture/list.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/htdocs/fourn/facture/list.php b/htdocs/fourn/facture/list.php index dabf7d28cd4..357df92a4eb 100644 --- a/htdocs/fourn/facture/list.php +++ b/htdocs/fourn/facture/list.php @@ -74,7 +74,7 @@ $month = GETPOST("month","int"); $year = GETPOST("year","int"); $filter = GETPOST("filtre"); -if (GETPOST("button_removefilter_x")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test must be present to be compatible with all browsers { $search_ref=""; $search_ref_supplier=""; @@ -138,7 +138,7 @@ if ($socid) { $sql .= " AND s.rowid = ".$socid; } -if ($filter) && $filter != -1) // GETPOST('filtre') may be a string +if ($filter && $filter != -1) // GETPOST('filtre') may be a string { $filtrearr = explode(",", $filter); foreach ($filtrearr as $fil) @@ -219,7 +219,7 @@ if ($resql) if ($search_company) $param.='&search_company='.urlencode($search_company); if ($search_amount_no_tax) $param.='&search_amount_no_tax='.urlencode($search_amount_no_tax); if ($search_amount_all_tax) $param.='&search_amount_all_tax='.urlencode($search_amount_all_tax); - if ($filter) && $filter != -1) $param.='&filtre='.urlencode($filter); + if ($filter && $filter != -1) $param.='&filtre='.urlencode($filter); print_barre_liste($langs->trans("BillsSuppliers").($socid?" $soc->name.":""),$page,$_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,'',$num,$nbtotalofrecords); print ''; @@ -272,7 +272,7 @@ if ($resql) print ''; print ''; $liststatus=array('paye:0'=>$langs->trans("Unpaid"), 'paye:1'=>$langs->trans("Paid")); - print $form->selectarray('filtre', $liststatus, $filter), 1); + print $form->selectarray('filtre', $liststatus, $filter, 1); print ''; print ''; print ''; @@ -331,7 +331,7 @@ if ($resql) //print $facturestatic->LibStatut($obj->paye,$obj->fk_statut,5,$objp->am); print $facturestatic->LibStatut($obj->paye,$obj->fk_statut,5); print ''; - + print ' '; print "\n"; From d7b0aab71ae8c4624f9e249bf422aa04fa6974e3 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 22 Nov 2014 15:52:08 +0100 Subject: [PATCH 0114/1060] Clear works with all browsers --- htdocs/product/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/product/list.php b/htdocs/product/list.php index 67cb7fd5f11..f242121625f 100644 --- a/htdocs/product/list.php +++ b/htdocs/product/list.php @@ -87,7 +87,7 @@ else $result=restrictedArea($user,'produit|service','','','','','',$objcanvas); * Actions */ -if (GETPOST("button_removefilter_x")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $sref=""; $sbarcode=""; From d3e216c19a3386e686bffe1f7dacad1c802034a6 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 22 Nov 2014 15:53:37 +0100 Subject: [PATCH 0115/1060] Clear compatible with all browsers --- htdocs/contact/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/contact/list.php b/htdocs/contact/list.php index 6c436272504..e18fc0a0a97 100644 --- a/htdocs/contact/list.php +++ b/htdocs/contact/list.php @@ -96,7 +96,7 @@ else if ($type == "o") $urlfiche=""; } -if (GETPOST('button_removefilter_x')) +if (GETPOST('button_removefilter_x') || GETPOST('button_removefilter')) // Both tests are required to be compatible with all browsers { $search_firstlast_only=""; $search_lastname=""; From 667f1bf49794e7ebae7dfd50020d5cd3d2b8df0d Mon Sep 17 00:00:00 2001 From: Andrelec1 Date: Mon, 17 Nov 2014 14:55:22 +0100 Subject: [PATCH 0116/1060] Fix : more than 1000 holidays MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Si il y a plus de 1000 jours de congés, le délimiteur des millier fais bugger les calcule ... --- htdocs/holiday/card.php | 1 - htdocs/holiday/class/holiday.class.php | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/holiday/card.php b/htdocs/holiday/card.php index 31a4e40599f..bbffe26cf9c 100644 --- a/htdocs/holiday/card.php +++ b/htdocs/holiday/card.php @@ -761,7 +761,6 @@ if (empty($id) || $action == 'add' || $action == 'request' || $action == 'create print ''; } else print $form->select_users(GETPOST('userid')?GETPOST('userid'):$user->id,'userid',0,'',0); - //var_dump($cp->getConfCP('nbHolidayDeducted')); $nb_holiday = $cp->getCPforUser($user->id) / $cp->getConfCP('nbHolidayDeducted'); print '   '.$langs->trans('SoldeCPUser', round($nb_holiday,2)).''; print ''; diff --git a/htdocs/holiday/class/holiday.class.php b/htdocs/holiday/class/holiday.class.php index 5381c99df07..2ecf8edfce3 100644 --- a/htdocs/holiday/class/holiday.class.php +++ b/htdocs/holiday/class/holiday.class.php @@ -1045,7 +1045,8 @@ class Holiday extends CommonObject $result = $this->db->query($sql); if($result) { $obj = $this->db->fetch_object($result); - return number_format($obj->nb_holiday,2); + //return number_format($obj->nb_holiday,2); + return $obj->nb_holiday; } else { return '0'; } From 671243e8f6dc2575a480df56ee4fa2e752cda453 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 22 Nov 2014 16:57:08 +0100 Subject: [PATCH 0117/1060] Fixed: Bugs reported by scrutinizer Fixed: Solve conflict between ->iban and ->iban_prefix. --- .../class/accountingaccount.class.php | 5 +- htdocs/adherents/card.php | 2 - htdocs/admin/ihm.php | 4 +- htdocs/compta/bank/bankid_fr.php | 7 +- htdocs/compta/bank/card.php | 2 +- htdocs/compta/bank/class/account.class.php | 4 +- htdocs/core/boxes/box_comptes.php | 2 +- htdocs/core/class/commonobject.class.php | 325 ------------------ htdocs/core/lib/usergroups.lib.php | 4 +- .../install/mysql/tables/llx_bank_account.sql | 2 +- .../install/mysql/tables/llx_societe_rib.sql | 2 +- .../class/companybankaccount.class.php | 4 +- htdocs/societe/rib.php | 12 +- 13 files changed, 23 insertions(+), 352 deletions(-) diff --git a/htdocs/accountancy/class/accountingaccount.class.php b/htdocs/accountancy/class/accountingaccount.class.php index c442eacc23c..46a34698785 100644 --- a/htdocs/accountancy/class/accountingaccount.class.php +++ b/htdocs/accountancy/class/accountingaccount.class.php @@ -25,12 +25,13 @@ */ /** - * Classe permettant la gestion des comptes generaux de compta + * Class to manage accounting accounts */ class AccountingAccount { var $db; var $error; + var $errors; var $id; var $rowid; @@ -126,6 +127,8 @@ class AccountingAccount global $conf, $langs; $error = 0; + $now=dol_now(); + // Clean parameters if (isset($this->fk_pcg_version)) $this->fk_pcg_version = trim($this->fk_pcg_version); diff --git a/htdocs/adherents/card.php b/htdocs/adherents/card.php index f8a36c4f71a..d6295981586 100644 --- a/htdocs/adherents/card.php +++ b/htdocs/adherents/card.php @@ -291,8 +291,6 @@ if ($action == 'update' && ! $_POST["cancel"] && $user->rights->adherent->creer) //$object->note = trim($_POST["comment"]); $object->morphy = $_POST["morphy"]; - $object->amount = $_POST["amount"]; - if (GETPOST('deletephoto')) $object->photo=''; elseif (! empty($_FILES['photo']['name'])) $object->photo = dol_sanitizeFileName($_FILES['photo']['name']); diff --git a/htdocs/admin/ihm.php b/htdocs/admin/ihm.php index 5cdb41cbe23..bd2ffa66342 100644 --- a/htdocs/admin/ihm.php +++ b/htdocs/admin/ihm.php @@ -142,7 +142,7 @@ if ($action == 'edit') // Edit print '
'."\n"; // Themes - show_theme('',1); + show_theme(null,1); print '
'; // Liste des zone de recherche permanantes supportees @@ -323,7 +323,7 @@ else // Show // Themes - show_theme('',0); + show_theme(null,0); print '
'; diff --git a/htdocs/compta/bank/bankid_fr.php b/htdocs/compta/bank/bankid_fr.php index b92aa1eb34a..03f0babe75d 100644 --- a/htdocs/compta/bank/bankid_fr.php +++ b/htdocs/compta/bank/bankid_fr.php @@ -63,8 +63,7 @@ if ($action == 'update' && ! $_POST["cancel"]) $account->number = trim($_POST["number"]); $account->cle_rib = trim($_POST["cle_rib"]); $account->bic = trim($_POST["bic"]); - $account->iban = trim($_POST["iban_prefix"]); - $account->iban_prefix = trim($_POST["iban_prefix"]); // deprecated + $account->iban = trim($_POST["iban"]); $account->domiciliation = trim($_POST["domiciliation"]); $account->proprio = trim($_POST["proprio"]); $account->owner_address = trim($_POST["owner_address"]); @@ -246,7 +245,7 @@ if (($_GET["id"] || $_GET["ref"]) && $action != 'edit') if ($account->getCountryCode() == 'IN') $bickey="SWIFT"; print ''.$langs->trans($ibankey).''; - print ''.$account->iban_prefix.''; + print ''.$account->iban.''; print ''.$langs->trans($bickey).''; print ''.$account->bic.''; @@ -423,7 +422,7 @@ if ($_GET["id"] && $action == 'edit' && $user->rights->banque->configurer) // IBAN print ''.$langs->trans($ibankey).''; - print ''; + print ''; print ''.$langs->trans($bickey).''; print ''; diff --git a/htdocs/compta/bank/card.php b/htdocs/compta/bank/card.php index 81596540489..5d3d2a051d6 100644 --- a/htdocs/compta/bank/card.php +++ b/htdocs/compta/bank/card.php @@ -135,7 +135,7 @@ if ($_POST["action"] == 'update' && ! $_POST["cancel"]) $account->number = trim($_POST["number"]); $account->cle_rib = trim($_POST["cle_rib"]); $account->bic = trim($_POST["bic"]); - $account->iban_prefix = trim($_POST["iban_prefix"]); + $account->iban = trim($_POST["iban"]); $account->domiciliation = trim($_POST["domiciliation"]); $account->proprio = trim($_POST["proprio"]); diff --git a/htdocs/compta/bank/class/account.class.php b/htdocs/compta/bank/class/account.class.php index 26f9415e8a5..978fc2b3838 100644 --- a/htdocs/compta/bank/class/account.class.php +++ b/htdocs/compta/bank/class/account.class.php @@ -59,7 +59,7 @@ class Account extends CommonObject //! BIC/SWIFT number var $bic; //! IBAN number (International Bank Account Number) - var $iban_prefix; + var $iban; // stored into iban_prefix field into database var $proprio; var $owner_address; @@ -642,7 +642,6 @@ class Account extends CommonObject $this->cle_rib = $obj->cle_rib; $this->bic = $obj->bic; $this->iban = $obj->iban; - $this->iban_prefix = $obj->iban; // deprecated $this->domiciliation = $obj->domiciliation; $this->proprio = $obj->proprio; $this->owner_address = $obj->owner_address; @@ -1011,7 +1010,6 @@ class Account extends CommonObject $this->cle_rib = 50; $this->bic = 'AA12'; $this->iban = 'FR999999999'; - $this->iban_prefix = 'FR'; // deprecated $this->domiciliation = 'The bank addresse'; $this->proprio = 'Owner'; $this->owner_address = 'Owner address'; diff --git a/htdocs/core/boxes/box_comptes.php b/htdocs/core/boxes/box_comptes.php index c66326b27fb..45c8f1a4819 100644 --- a/htdocs/core/boxes/box_comptes.php +++ b/htdocs/core/boxes/box_comptes.php @@ -79,7 +79,7 @@ class box_comptes extends ModeleBoxes if ($user->rights->banque->lire) { $sql = "SELECT rowid, ref, label, bank, number, courant, clos, rappro, url,"; - $sql.= " code_banque, code_guichet, cle_rib, bic, iban_prefix,"; + $sql.= " code_banque, code_guichet, cle_rib, bic, iban_prefix as iban,"; $sql.= " domiciliation, proprio, owner_address,"; $sql.= " account_number, currency_code,"; $sql.= " min_allowed, min_desired, comment"; diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 8f5dcd93b70..87ee2f1a1d2 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -2179,331 +2179,6 @@ abstract class CommonObject } } -<<<<<<< HEAD -======= - - /** - * Function to get extra fields of a member into $this->array_options - * This method is in most cases called by method fetch of objects but you can call it separately. - * - * @param int $rowid Id of line - * @param array $optionsArray Array resulting of call of extrafields->fetch_name_optionals_label() - * @return int <0 if error, 0 if no optionals to find nor found, 1 if a line is found and optional loaded - */ - function fetch_optionals($rowid,$optionsArray='') - { - if (! is_array($optionsArray)) - { - // optionsArray not already loaded, so we load it - require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; - $extrafields = new ExtraFields($this->db); - $optionsArray = $extrafields->fetch_name_optionals_label($this->table_element); - } - - - // Request to get complementary values - if (count($optionsArray) > 0) - { - $sql = "SELECT rowid"; - foreach ($optionsArray as $name => $label) - { - $sql.= ", ".$name; - } - $sql.= " FROM ".MAIN_DB_PREFIX.$this->table_element."_extrafields"; - $sql.= " WHERE fk_object = ".$rowid; - - dol_syslog(get_class($this)."::fetch_optionals sql=".$sql, LOG_DEBUG); - $resql=$this->db->query($sql); - if ($resql) - { - $numrows=$this->db->num_rows($resql); - if ($numrows) - { - $tab = $this->db->fetch_array($resql); - - foreach ($tab as $key => $value) - { - // Test fetch_array ! is_int($key) because fetch_array result is a mix table with some key as alpha and some key as int (depend db engine) - if ($key != 'rowid' && $key != 'tms' && ! is_int($key)) - { - // we can add this attribute to object properties - $this->array_options["options_".$key]=$value; - } - } - } - - $this->db->free($resql); - - if ($numrows) return $numrows; - else return 0; - } - else - { - dol_print_error($this->db); - return -1; - } - } - return 0; - } - - /** - * Delete all extra fields values for the current object. - * - * @return int <0 if KO, >0 if OK - */ - function deleteExtraFields() - { - global $langs; - - $error=0; - - $this->db->begin(); - - $sql_del = "DELETE FROM ".MAIN_DB_PREFIX.$this->table_element."_extrafields WHERE fk_object = ".$this->id; - dol_syslog(get_class($this)."::deleteExtraFields delete sql=".$sql_del); - $resql=$this->db->query($sql_del); - if (! $resql) - { - $this->error=$this->db->lasterror(); - dol_syslog(get_class($this)."::deleteExtraFields ".$this->error,LOG_ERR); - $this->db->rollback(); - return -1; - } - else - { - $this->db->commit(); - return 1; - } - } - - /** - * Add/Update all extra fields values for the current object. - * All data to describe values to insert are stored into $this->array_options=array('keyextrafield'=>'valueextrafieldtoadd') - * - * @return int -1=error, O=did nothing, 1=OK - */ - function insertExtraFields() - { - global $conf,$langs; - - $error=0; - - if (! empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) return 0; // For avoid conflicts if trigger used - - if (! empty($this->array_options)) - { - // Check parameters - $langs->load('admin'); - require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; - $extrafields = new ExtraFields($this->db); - $optionsArray = $extrafields->fetch_name_optionals_label($this->table_element); - - foreach($this->array_options as $key => $value) - { - $attributeKey = substr($key,8); // Remove 'options_' prefix - $attributeType = $extrafields->attribute_type[$attributeKey]; - $attributeSize = $extrafields->attribute_size[$attributeKey]; - $attributeLabel = $extrafields->attribute_label[$attributeKey]; - switch ($attributeType) - { - case 'int': - if (!is_numeric($value) && $value!='') - { - $error++; $this->errors[]=$langs->trans("ExtraFieldHasWrongValue",$attributeLabel); - return -1; - } - elseif ($value=='') - { - $this->array_options[$key] = null; - } - break; - case 'price': - $this->array_options[$key] = price2num($this->array_options[$key]); - break; - case 'date': - $this->array_options[$key]=$this->db->idate($this->array_options[$key]); - break; - case 'datetime': - $this->array_options[$key]=$this->db->idate($this->array_options[$key]); - break; - } - } - $this->db->begin(); - - $sql_del = "DELETE FROM ".MAIN_DB_PREFIX.$this->table_element."_extrafields WHERE fk_object = ".$this->id; - dol_syslog(get_class($this)."::insertExtraFields delete sql=".$sql_del); - $this->db->query($sql_del); - $sql = "INSERT INTO ".MAIN_DB_PREFIX.$this->table_element."_extrafields (fk_object"; - foreach($this->array_options as $key => $value) - { - $attributeKey = substr($key,8); // Remove 'options_' prefix - // Add field of attribut - if (isset($extrafields->attribute_type[$attributeKey]) && $extrafields->attribute_type[$attributeKey] != 'separate') // Only for other type of separate - $sql.=",".$attributeKey; - } - $sql .= ") VALUES (".$this->id; - foreach($this->array_options as $key => $value) - { - $attributeKey = substr($key,8); // Remove 'options_' prefix - // Add field o fattribut - if(isset($extrafields->attribute_type[$attributeKey]) && $extrafields->attribute_type[$attributeKey] != 'separate') // Only for other type of separate) - { - if ($this->array_options[$key] != '') - { - $sql.=",'".$this->db->escape($this->array_options[$key])."'"; - } - else - { - $sql.=",null"; - } - } - } - $sql.=")"; - - dol_syslog(get_class($this)."::insertExtraFields insert sql=".$sql); - $resql = $this->db->query($sql); - if (! $resql) - { - $this->error=$this->db->lasterror(); - dol_syslog(get_class($this)."::update ".$this->error,LOG_ERR); - $this->db->rollback(); - return -1; - } - else - { - $this->db->commit(); - return 1; - } - } - else return 0; - } - - /** - * Function to show lines of extrafields with output datas - * - * @param object $extrafields Extrafield Object - * @param string $mode Show output (view) or input (edit) for extrafield - * @param array $params Optionnal parameters - * @param string $keyprefix Prefix string to add into name and id of field (can be used to avoid duplicate names) - * - * @return string - */ - function showOptionals($extrafields, $mode='view', $params=0, $keyprefix='') - { - global $_POST, $conf; - - $out = ''; - - if (count($extrafields->attribute_label) > 0) - { - $out .= "\n"; - $out .= ' '; - $out .= "\n"; - - $e = 0; - foreach($extrafields->attribute_label as $key=>$label) - { - if (is_array($params) && count($params)>0) { - if (array_key_exists('colspan',$params)) { - $colspan=$params['colspan']; - } - }else { - $colspan='3'; - } - switch($mode) { - case "view": - $value=$this->array_options["options_".$key]; - break; - case "edit": - $value=(isset($_POST["options_".$key])?$_POST["options_".$key]:$this->array_options["options_".$key]); - break; - } - if ($extrafields->attribute_type[$key] == 'separate') - { - $out .= $extrafields->showSeparator($key); - } - else - { - $csstyle=''; - if (is_array($params) && count($params)>0) { - if (array_key_exists('style',$params)) { - $csstyle=$params['style']; - } - } - if ( !empty($conf->global->MAIN_EXTRAFIELDS_USE_TWO_COLUMS) && ($e % 2) == 0) - { - $out .= ''; - $colspan='0'; - } - else - { - $out .= ''; - } - // Convert date into timestamp format - if (in_array($extrafields->attribute_type[$key],array('date','datetime'))) - { - $value = isset($_POST["options_".$key])?dol_mktime($_POST["options_".$key."hour"], $_POST["options_".$key."min"], 0, $_POST["options_".$key."month"], $_POST["options_".$key."day"], $_POST["options_".$key."year"]):$this->db->jdate($this->array_options['options_'.$key]); - } - - if($extrafields->attribute_required[$key]) - $label = ''.$label.''; - - $out .= ''.$label.''; - $out .=''; - - switch($mode) { - case "view": - $out .= $extrafields->showOutputField($key,$value); - break; - case "edit": - $out .= $extrafields->showInputField($key,$value,'',$keyprefix); - break; - } - - $out .= ''."\n"; - - if (! empty($conf->global->MAIN_EXTRAFIELDS_USE_TWO_COLUMS) && (($e % 2) == 1)) $out .= ''; - else $out .= ''; - $e++; - } - } - $out .= "\n"; - $out .= ' '; - $out .= ' - '; - } - return $out; - } - - ->>>>>>> refs/remotes/origin/3.6 /** * Function to check if an object is used by others. * Check is done into this->childtables. There is no check into llx_element_element. diff --git a/htdocs/core/lib/usergroups.lib.php b/htdocs/core/lib/usergroups.lib.php index 630d2ae5b13..5ae50b7629a 100644 --- a/htdocs/core/lib/usergroups.lib.php +++ b/htdocs/core/lib/usergroups.lib.php @@ -242,7 +242,7 @@ function entity_prepare_head($object, $aEntities) /** * Show list of themes. Show all thumbs of themes * - * @param User $fuser User concerned or '' for global theme + * @param User $fuser User concerned or null for global theme * @param int $edit 1 to add edit form * @param boolean $foruserprofile Show for user profile view * @return void @@ -265,7 +265,7 @@ function show_theme($fuser,$edit=0,$foruserprofile=false) $selected_theme=''; if (empty($foruserprofile)) $selected_theme=$conf->global->MAIN_THEME; - else $selected_theme=empty($fuser->conf->MAIN_THEME)?'':$fuser->conf->MAIN_THEME; + else $selected_theme=((is_object($fuser) && ! empty($fuser->conf->MAIN_THEME))?$fuser->conf->MAIN_THEME:''); $colspan=2; if ($foruserprofile) $colspan=4; diff --git a/htdocs/install/mysql/tables/llx_bank_account.sql b/htdocs/install/mysql/tables/llx_bank_account.sql index bb2da7841b8..ac060bc0df3 100644 --- a/htdocs/install/mysql/tables/llx_bank_account.sql +++ b/htdocs/install/mysql/tables/llx_bank_account.sql @@ -38,7 +38,7 @@ create table llx_bank_account number varchar(255), cle_rib varchar(5), bic varchar(11), - iban_prefix varchar(34), -- 34 according to ISO 13616 + iban_prefix varchar(34), -- full iban. 34 according to ISO 13616 country_iban varchar(2), -- deprecated cle_iban varchar(2), domiciliation varchar(255), diff --git a/htdocs/install/mysql/tables/llx_societe_rib.sql b/htdocs/install/mysql/tables/llx_societe_rib.sql index cc5a5985eeb..0500c32c744 100644 --- a/htdocs/install/mysql/tables/llx_societe_rib.sql +++ b/htdocs/install/mysql/tables/llx_societe_rib.sql @@ -32,7 +32,7 @@ create table llx_societe_rib number varchar(255), -- account number cle_rib varchar(5), -- key of bank account bic varchar(20), -- 11 according to ISO 9362 (we keep 20 for backward compatibility) - iban_prefix varchar(34), -- 34 according to ISO 13616 + iban_prefix varchar(34), -- full iban. 34 according to ISO 13616 domiciliation varchar(255), proprio varchar(60), owner_address varchar(255), diff --git a/htdocs/societe/class/companybankaccount.class.php b/htdocs/societe/class/companybankaccount.class.php index 79b59211b51..37e646d6b88 100644 --- a/htdocs/societe/class/companybankaccount.class.php +++ b/htdocs/societe/class/companybankaccount.class.php @@ -45,7 +45,6 @@ class CompanyBankAccount extends Account var $cle_rib; var $bic; var $iban; - var $iban_prefix; // deprecated var $proprio; var $owner_address; var $default_rib; @@ -141,7 +140,7 @@ class CompanyBankAccount extends Account $sql .= ",number='".$this->number."'"; $sql .= ",cle_rib='".$this->cle_rib."'"; $sql .= ",bic='".$this->bic."'"; - $sql .= ",iban_prefix = '".$this->iban_prefix."'"; + $sql .= ",iban_prefix = '".$this->iban."'"; $sql .= ",domiciliation='".$this->db->escape($this->domiciliation)."'"; $sql .= ",proprio = '".$this->db->escape($this->proprio)."'"; $sql .= ",owner_address = '".$this->db->escape($this->owner_address)."'"; @@ -196,7 +195,6 @@ class CompanyBankAccount extends Account $this->cle_rib = $obj->cle_rib; $this->bic = $obj->bic; $this->iban = $obj->iban; - $this->iban_prefix = $obj->iban; // deprecated $this->domiciliation = $obj->domiciliation; $this->proprio = $obj->proprio; $this->owner_address = $obj->owner_address; diff --git a/htdocs/societe/rib.php b/htdocs/societe/rib.php index b95839d67b9..01d82ac0867 100644 --- a/htdocs/societe/rib.php +++ b/htdocs/societe/rib.php @@ -71,7 +71,7 @@ if ($action == 'update' && ! $_POST["cancel"]) $account->number = $_POST["number"]; $account->cle_rib = $_POST["cle_rib"]; $account->bic = $_POST["bic"]; - $account->iban_prefix = $_POST["iban_prefix"]; + $account->iban = $_POST["iban"]; $account->domiciliation = $_POST["domiciliation"]; $account->proprio = $_POST["proprio"]; $account->owner_address = $_POST["owner_address"]; @@ -129,7 +129,7 @@ if ($action == 'add' && ! $_POST["cancel"]) $account->number = $_POST["number"]; $account->cle_rib = $_POST["cle_rib"]; $account->bic = $_POST["bic"]; - $account->iban_prefix = $_POST["iban_prefix"]; + $account->iban = $_POST["iban"]; $account->domiciliation = $_POST["domiciliation"]; $account->proprio = $_POST["proprio"]; $account->owner_address = $_POST["owner_address"]; @@ -292,7 +292,7 @@ if ($socid && $action != 'edit' && $action != "create") } print ''.$langs->trans("IBAN").''; - print ''.$account->iban_prefix.''; + print ''.$account->iban.''; print ''.$langs->trans("BIC").''; print ''.$account->bic.''; @@ -476,13 +476,13 @@ if ($socid && $action == 'edit' && $user->rights->societe->creer) // IBAN print ''.$langs->trans("IBAN").''; - print ''; + print ''; print ''.$langs->trans("BIC").''; print ''; print ''.$langs->trans("BankAccountDomiciliation").''; - print ""; @@ -556,7 +556,7 @@ if ($socid && $action == 'create' && $user->rights->societe->creer) // IBAN print ''.$langs->trans("IBAN").''; - print ''; + print ''; print ''.$langs->trans("BIC").''; print ''; From 891f8d9442d5532dba9a3440c8028caf31ff02c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sat, 22 Nov 2014 19:02:15 +0100 Subject: [PATCH 0118/1060] Fix bug 1692 Can't update phone_pro with the contact webservice --- htdocs/webservices/server_contact.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/webservices/server_contact.php b/htdocs/webservices/server_contact.php index 126e4202018..1d7336e1482 100644 --- a/htdocs/webservices/server_contact.php +++ b/htdocs/webservices/server_contact.php @@ -655,6 +655,7 @@ function updateContact($authentication,$contact) $object->province_id=$contact['province_id']; + $object->phone_pro=$contact['phone_pro']; $object->phone_perso=$contact['phone_perso']; $object->phone_mobile=$contact['phone_mobile']; $object->fax=$contact['fax']; From b2a1408d8eb4d1c50f984b6e2cd816fabecae5aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 00:51:13 +0100 Subject: [PATCH 0119/1060] Fix 1667 Pagination is only partially shown in supplier references list --- htdocs/fourn/product/list.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/htdocs/fourn/product/list.php b/htdocs/fourn/product/list.php index a7ab0d0576f..afaf4c8e796 100644 --- a/htdocs/fourn/product/list.php +++ b/htdocs/fourn/product/list.php @@ -118,6 +118,13 @@ if ($fourn_id > 0) { $sql .= " AND ppf.fk_soc = ".$fourn_id; } +// Count total nb of records without orderby and limit +$nbtotalofrecords = 0; +if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) +{ + $result = $db->query($sql); + $nbtotalofrecords = $db->num_rows($result); +} $sql .= " ORDER BY ".$sortfield." ".$sortorder; $sql .= $db->plimit($limit + 1, $offset); @@ -143,7 +150,7 @@ if ($resql) $param="&tobuy=".$tobuy."&sref=".$sref."&snom=".$snom."&fourn_id=".$fourn_id.(isset($type)?"&type=".$type:"").(empty($sRefSupplier)?"":"&srefsupplier=".$sRefSupplier); - print_barre_liste($texte, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder,'',$num); + print_barre_liste($texte, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords); if (isset($catid)) From ffd435d9fff997dbc1f2959c16dc0597809f0300 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 01:20:02 +0100 Subject: [PATCH 0120/1060] Fix 1662 Search filter display discrepancy --- htdocs/product/list.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htdocs/product/list.php b/htdocs/product/list.php index f242121625f..907181634ee 100644 --- a/htdocs/product/list.php +++ b/htdocs/product/list.php @@ -129,6 +129,8 @@ else { $texte = $langs->trans("ProductsAndServices"); } + // Add what we are searching for + if (! empty($sall)) $texte.= " - ".$sall; $sql = 'SELECT DISTINCT p.rowid, p.ref, p.label, p.barcode, p.price, p.price_ttc, p.price_base_type,'; $sql.= ' p.fk_product_type, p.tms as datem,'; From d9fdf8239112891666f65b59e94959c44d1ce502 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 01:21:51 +0100 Subject: [PATCH 0121/1060] (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers --- htdocs/commande/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php index b152a38db02..2c30f4128c6 100644 --- a/htdocs/commande/list.php +++ b/htdocs/commande/list.php @@ -70,7 +70,7 @@ $limit = $conf->liste_limit; $viewstatut=GETPOST('viewstatut'); // Purge search criteria -if (GETPOST("button_removefilter")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search_categ=''; $search_user=''; From 54541f9f14cb27e7e06333bb4c9dbf45013104c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 09:29:04 +0100 Subject: [PATCH 0122/1060] Update /cron/list.php --- htdocs/cron/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/cron/list.php b/htdocs/cron/list.php index 79e5ae5b1a4..3c2844f3fe4 100644 --- a/htdocs/cron/list.php +++ b/htdocs/cron/list.php @@ -64,7 +64,7 @@ $pageprev = $page - 1; $pagenext = $page + 1; // Do we click on purge search criteria ? -if (GETPOST("button_removefilter")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search_label=''; $status=-1; From a10209ae9ffa7c1ba51888c967c019558bc0a1c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 09:30:32 +0100 Subject: [PATCH 0123/1060] Update /holiday/index.php --- htdocs/holiday/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/holiday/index.php b/htdocs/holiday/index.php index e988e640711..86c4eca49eb 100644 --- a/htdocs/holiday/index.php +++ b/htdocs/holiday/index.php @@ -64,7 +64,7 @@ $search_employe = GETPOST('search_employe'); $search_valideur = GETPOST('search_valideur'); $search_statut = GETPOST('select_statut'); -if (GETPOST("button_removefilter")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search_ref=""; $month_create=""; From 46aea31e6c3401c4c90c26cacc6836f5bd547e64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 09:31:20 +0100 Subject: [PATCH 0124/1060] Update /comm/list.php --- htdocs/comm/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/comm/list.php b/htdocs/comm/list.php index ce7eb82f9a1..b35e4fab7cc 100644 --- a/htdocs/comm/list.php +++ b/htdocs/comm/list.php @@ -75,7 +75,7 @@ $reshook=$hookmanager->executeHooks('doActions',$parameters); // Note that $a if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); // Do we click on purge search criteria ? -if (GETPOST("button_removefilter_x")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search_sale=""; $search_categ=""; From b43f8eede36fcdc4eb7c422970b3634b2c423d3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 09:32:46 +0100 Subject: [PATCH 0125/1060] Update /fichinter/list.php --- htdocs/fichinter/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/fichinter/list.php b/htdocs/fichinter/list.php index a6d3f9720ec..9030cd9c4ac 100644 --- a/htdocs/fichinter/list.php +++ b/htdocs/fichinter/list.php @@ -62,7 +62,7 @@ $search_desc=GETPOST('search_desc','alpha'); $search_status=GETPOST('search_status'); $sall=GETPOST('sall'); -if (GETPOST("button_removefilter")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search_ref=""; $search_company=""; From 91aca474ddd4d536f11ee31fe4080cfe9c1abcf0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 09:33:32 +0100 Subject: [PATCH 0126/1060] Update /expedition/list.php --- htdocs/expedition/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/expedition/list.php b/htdocs/expedition/list.php index af1d244e0d0..0722dedddf4 100644 --- a/htdocs/expedition/list.php +++ b/htdocs/expedition/list.php @@ -52,7 +52,7 @@ if (! $sortorder) $sortorder="DESC"; $limit = $conf->liste_limit; // Purge search criteria -if (GETPOST("button_removefilter_x")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search_ref_exp=''; $search_ref_liv=''; From 6f3ce0a63b3ae6ce115d1e61a8d3b8d82eb2a387 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 09:34:20 +0100 Subject: [PATCH 0127/1060] Update /contrat/services.php --- htdocs/contrat/services.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/contrat/services.php b/htdocs/contrat/services.php index b0fb4ed5edb..22ae64ef9cd 100644 --- a/htdocs/contrat/services.php +++ b/htdocs/contrat/services.php @@ -69,7 +69,7 @@ $staticcontrat=new Contrat($db); $staticcontratligne=new ContratLigne($db); $companystatic=new Societe($db); -if (GETPOST("button_removefilter")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search_name=""; $search_contract=""; From 7442b1a6b123190555cd75a3713e328247018d5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 09:34:56 +0100 Subject: [PATCH 0128/1060] Update /contrat/list.php --- htdocs/contrat/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/contrat/list.php b/htdocs/contrat/list.php index b1b28192395..debe18e995e 100644 --- a/htdocs/contrat/list.php +++ b/htdocs/contrat/list.php @@ -58,7 +58,7 @@ $result = restrictedArea($user, 'contrat', $id); $staticcontrat=new Contrat($db); $staticcontratligne=new ContratLigne($db); -if (GETPOST("button_removefilter")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search_name=""; $search_contract=""; From 89deffa3a7e2856369a980767f40de0443935f25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 09:36:07 +0100 Subject: [PATCH 0129/1060] Update /fourn/list.php --- htdocs/fourn/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/fourn/list.php b/htdocs/fourn/list.php index 296415c1aee..b0d7caf8695 100644 --- a/htdocs/fourn/list.php +++ b/htdocs/fourn/list.php @@ -60,7 +60,7 @@ if (! $sortfield) $sortfield="nom"; // Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array $hookmanager->initHooks(array('supplierlist')); -if (GETPOST("button_removefilter_x")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $socname=""; $search_name=""; From 09f1f79f4eaca8423dc1c2cd49a7202f9ee10bbb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 09:46:24 +0100 Subject: [PATCH 0130/1060] Update /adherents/list.php --- htdocs/adherents/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/adherents/list.php b/htdocs/adherents/list.php index 887bac4e1e7..b70e212d2d2 100644 --- a/htdocs/adherents/list.php +++ b/htdocs/adherents/list.php @@ -59,7 +59,7 @@ $pagenext = $page + 1; if (! $sortorder) { $sortorder=($filter=='outofdate'?"ASC":"DESC"); } if (! $sortfield) { $sortfield=($filter=='outofdate'?"d.datefin":"d.lastname"); } -if (GETPOST("button_removefilter")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search=""; $search_ref=""; From fbee671db1d3dcbea2681e73995eb3934d812de9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 09:47:19 +0100 Subject: [PATCH 0131/1060] Update /societe/consumption.php --- htdocs/societe/consumption.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/societe/consumption.php b/htdocs/societe/consumption.php index f89212e5fbc..d5ef1af6dbb 100644 --- a/htdocs/societe/consumption.php +++ b/htdocs/societe/consumption.php @@ -58,7 +58,7 @@ $month = GETPOST('month','int'); $year = GETPOST('year','int'); // Clean up on purge search criteria ? -if (GETPOST("button_removefilter")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $sref=''; $sprod_fulldescr=''; From 5b0b222772bfdf038a1669363983133e3493a72e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 09:48:13 +0100 Subject: [PATCH 0132/1060] Update /societe/societe.php --- htdocs/societe/societe.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/societe/societe.php b/htdocs/societe/societe.php index f0b3532018b..2d046a3ec16 100644 --- a/htdocs/societe/societe.php +++ b/htdocs/societe/societe.php @@ -153,7 +153,7 @@ llxHeader('',$langs->trans("ThirdParty"),$help_url); // Do we click on purge search criteria ? -if (GETPOST("button_removefilter_x")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search_categ=''; $search_sale=''; From 979eadf42e6d287cb3757369a5357371b4a3e4b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 09:48:54 +0100 Subject: [PATCH 0133/1060] Update /compta/dons/list.php --- htdocs/compta/dons/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/dons/list.php b/htdocs/compta/dons/list.php index 174b5357bb2..95011ca0b74 100644 --- a/htdocs/compta/dons/list.php +++ b/htdocs/compta/dons/list.php @@ -50,7 +50,7 @@ $search_amount = GETPOST('search_amount','alpha'); if (!$user->rights->don->lire) accessforbidden(); -if (GETPOST("button_removefilter")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search_ref=""; $search_company=""; From d6e8211018e6b5f5516c3258a270e4c3ba029ccb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 09:49:30 +0100 Subject: [PATCH 0134/1060] Update /compta/deplacement/list.php --- htdocs/compta/deplacement/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/deplacement/list.php b/htdocs/compta/deplacement/list.php index 42a6713c1ce..e34e7c2b3a6 100644 --- a/htdocs/compta/deplacement/list.php +++ b/htdocs/compta/deplacement/list.php @@ -57,7 +57,7 @@ $limit = $conf->liste_limit; $year=GETPOST("year"); $month=GETPOST("month"); -if (GETPOST("button_removefilter")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search_ref=""; $search_name=""; From 37eef59b5083016af34a708052b55aa302d7663d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 09:50:19 +0100 Subject: [PATCH 0135/1060] Update /compta/prelevement/list.php --- htdocs/compta/prelevement/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/prelevement/list.php b/htdocs/compta/prelevement/list.php index 0a68aa686ae..921736faedf 100644 --- a/htdocs/compta/prelevement/list.php +++ b/htdocs/compta/prelevement/list.php @@ -53,7 +53,7 @@ $ligne=new LignePrelevement($db,$user); $offset = $conf->liste_limit * $page ; -if (GETPOST("button_removefilter")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search_line=""; $search_bon=""; From adf0e8bb54f01fe60af1e457f4bcda5155c3cb0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 09:51:03 +0100 Subject: [PATCH 0136/1060] Update /compta/tva/reglement.php --- htdocs/compta/tva/reglement.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/tva/reglement.php b/htdocs/compta/tva/reglement.php index ebba3888004..45a69076492 100644 --- a/htdocs/compta/tva/reglement.php +++ b/htdocs/compta/tva/reglement.php @@ -66,7 +66,7 @@ else $typeid=$_REQUEST['typeid']; } -if (GETPOST("button_removefilter")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search_ref=""; $search_label=""; From fe725f1d8ad3804434f4477e12ba562757229715 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 09:51:49 +0100 Subject: [PATCH 0137/1060] Update /compta/sociales/index.php --- htdocs/compta/sociales/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/sociales/index.php b/htdocs/compta/sociales/index.php index db4bef2abe6..31e98370003 100644 --- a/htdocs/compta/sociales/index.php +++ b/htdocs/compta/sociales/index.php @@ -68,7 +68,7 @@ else $typeid=$_REQUEST['typeid']; } -if (GETPOST("button_removefilter")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search_ref=""; $search_label=""; From cfe5784d494289b67425f3689067fcb6176b7db0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 09:52:35 +0100 Subject: [PATCH 0138/1060] Update /compta/bank/search.php --- htdocs/compta/bank/search.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/bank/search.php b/htdocs/compta/bank/search.php index 1e8196481e6..127e428162c 100644 --- a/htdocs/compta/bank/search.php +++ b/htdocs/compta/bank/search.php @@ -73,7 +73,7 @@ $limit = $conf->liste_limit; if (! $sortorder) $sortorder='DESC'; if (! $sortfield) $sortfield='b.dateo'; -if (GETPOST("button_removefilter")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $description=""; $type=""; From c9a0208328ff029d8def311815ce99d4fdcc9f84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 09:53:19 +0100 Subject: [PATCH 0139/1060] Update /compta/paiement/list.php --- htdocs/compta/paiement/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/paiement/list.php b/htdocs/compta/paiement/list.php index 65615b9bbf3..c7fd426babf 100644 --- a/htdocs/compta/paiement/list.php +++ b/htdocs/compta/paiement/list.php @@ -58,7 +58,7 @@ $limit = $conf->liste_limit; if (! $sortorder) $sortorder="DESC"; if (! $sortfield) $sortfield="p.rowid"; -if (GETPOST("button_removefilter")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search_ref=""; $search_account=""; From 865ec76a51c5068313c21f5a10b98db3c31c2e32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 09:54:17 +0100 Subject: [PATCH 0140/1060] Update /compta/salaries/index.php --- htdocs/compta/salaries/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/salaries/index.php b/htdocs/compta/salaries/index.php index 17c3efdbfaa..678b3bfaa2e 100644 --- a/htdocs/compta/salaries/index.php +++ b/htdocs/compta/salaries/index.php @@ -64,7 +64,7 @@ else $typeid=$_REQUEST['typeid']; } -if (GETPOST("button_removefilter")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search_ref=""; $search_label=""; From fef3cfbe811b692da10082b2eb501e10c0dfafd9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 09:55:13 +0100 Subject: [PATCH 0141/1060] Update /compta/facture/list.php --- htdocs/compta/facture/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php index ba27f5659a9..56bd57c725a 100644 --- a/htdocs/compta/facture/list.php +++ b/htdocs/compta/facture/list.php @@ -111,7 +111,7 @@ $reshook=$hookmanager->executeHooks('doActions',$parameters,$object,$action); if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); // Do we click on purge search criteria ? -if (GETPOST("button_removefilter_x")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search_categ=''; $search_user=''; From 0ea40c155ebebbeb3460481295a9602a5da1fc34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 09:57:21 +0100 Subject: [PATCH 0142/1060] Update /compta/facture/impayees.php --- htdocs/compta/facture/impayees.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/facture/impayees.php b/htdocs/compta/facture/impayees.php index c762aac5702..a010e7d7401 100644 --- a/htdocs/compta/facture/impayees.php +++ b/htdocs/compta/facture/impayees.php @@ -374,7 +374,7 @@ $search_montant_ttc = GETPOST("search_montant_ttc"); $late = GETPOST("late"); // Do we click on purge search criteria ? -if (GETPOST("button_removefilter_x")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search_ref=''; $search_refcustomer=''; From 5f1135454754c06278b724ee24359094a5b5bb88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 09:58:19 +0100 Subject: [PATCH 0143/1060] Update /accountancy/admin/account.php --- htdocs/accountancy/admin/account.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/accountancy/admin/account.php b/htdocs/accountancy/admin/account.php index 36739254d06..0c2a825604b 100644 --- a/htdocs/accountancy/admin/account.php +++ b/htdocs/accountancy/admin/account.php @@ -88,7 +88,7 @@ if ($action == 'disable') { } } -if (GETPOST("button_removefilter")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search_account=""; $search_label=""; @@ -220,4 +220,4 @@ if ($result) { } llxFooter(); -$db->close(); \ No newline at end of file +$db->close(); From e1addea6dbcdb3fe68d8cc39ee4012cdd76710e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 09:59:05 +0100 Subject: [PATCH 0144/1060] Update /accountancy/bookeeping/list.php --- htdocs/accountancy/bookkeeping/list.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/accountancy/bookkeeping/list.php b/htdocs/accountancy/bookkeeping/list.php index 21da5bacbb9..b2acc60fb6a 100644 --- a/htdocs/accountancy/bookkeeping/list.php +++ b/htdocs/accountancy/bookkeeping/list.php @@ -51,7 +51,7 @@ $offset = $conf->liste_limit * $page; $formventilation = new FormVentilation($db); -if (GETPOST("button_removefilter")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search_doc_type=""; $search_doc_ref=""; @@ -231,4 +231,4 @@ else { } llxFooter(); -$db->close(); \ No newline at end of file +$db->close(); From 8356c1b5602f05f7d81ab7b84290e84e87e62dc2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 10:00:09 +0100 Subject: [PATCH 0145/1060] Update /comm/actions/listactions.php --- htdocs/comm/action/listactions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/comm/action/listactions.php b/htdocs/comm/action/listactions.php index 53243d0c165..245902013a1 100644 --- a/htdocs/comm/action/listactions.php +++ b/htdocs/comm/action/listactions.php @@ -100,7 +100,7 @@ if (! $user->rights->agenda->allactions->read || $filter=='mine') // If no permi } // Purge search criteria -if (GETPOST("button_removefilter")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $datestart=''; $dateend=''; From c6f71344145e0abebc5c7a9b9edf2d56defb05d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 10:01:07 +0100 Subject: [PATCH 0146/1060] Update /comm/prospect/list.php --- htdocs/comm/prospect/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/comm/prospect/list.php b/htdocs/comm/prospect/list.php index 113618ffae8..3501d94aafd 100644 --- a/htdocs/comm/prospect/list.php +++ b/htdocs/comm/prospect/list.php @@ -154,7 +154,7 @@ $sts = array(-1,0,1,2,3); $hookmanager->initHooks(array('prospectlist')); // Do we click on purge search criteria ? -if (GETPOST("button_removefilter_x")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $socname=""; $stcomm=""; From 8bbc2d8db4998a0e9c9df1fd42ea1737daabaf0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 10:02:16 +0100 Subject: [PATCH 0147/1060] Update /product/stock/mouvement.php --- htdocs/product/stock/mouvement.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/product/stock/mouvement.php b/htdocs/product/stock/mouvement.php index 06e089c5209..83d856ed0cc 100644 --- a/htdocs/product/stock/mouvement.php +++ b/htdocs/product/stock/mouvement.php @@ -60,7 +60,7 @@ $offset = $conf->liste_limit * $page; if (! $sortfield) $sortfield="m.datem"; if (! $sortorder) $sortorder="DESC"; -if (GETPOST("button_removefilter")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $year=''; $month=''; From 018d1488fc353ed253173cd0839eb2c35ba7afb8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 10:03:03 +0100 Subject: [PATCH 0148/1060] Update /fourn/commande/list.php --- htdocs/fourn/commande/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/fourn/commande/list.php b/htdocs/fourn/commande/list.php index ab0fd08d3f0..6affbae3045 100644 --- a/htdocs/fourn/commande/list.php +++ b/htdocs/fourn/commande/list.php @@ -58,7 +58,7 @@ if ($user->societe_id) $socid=$user->societe_id; $result = restrictedArea($user, 'fournisseur', $orderid, '', 'commande'); // Purge search criteria -if (GETPOST("button_removefilter")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search_ref=''; $search_refsupp=''; From edaf6aec100c72911900d09842aa7a4f02c1f37c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 10:04:43 +0100 Subject: [PATCH 0149/1060] Update /fourn/facture/paiement.php --- htdocs/fourn/facture/paiement.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/fourn/facture/paiement.php b/htdocs/fourn/facture/paiement.php index 57100bd98f0..65428cd138e 100644 --- a/htdocs/fourn/facture/paiement.php +++ b/htdocs/fourn/facture/paiement.php @@ -459,7 +459,7 @@ if (empty($action)) $search_amount=GETPOST('search_amount'); $search_company=GETPOST('search_company'); - if (GETPOST("button_removefilter")) + if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search_ref=""; $search_account=""; From 38febad979a1e0cbc6250583b502152249db034d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 10:05:40 +0100 Subject: [PATCH 0150/1060] Update /fourn/facture/impayees.php --- htdocs/fourn/facture/impayees.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/fourn/facture/impayees.php b/htdocs/fourn/facture/impayees.php index 2767c792f9e..83d4b830c5f 100644 --- a/htdocs/fourn/facture/impayees.php +++ b/htdocs/fourn/facture/impayees.php @@ -64,7 +64,7 @@ $pagenext = $page + 1; if (! $sortfield) $sortfield="f.date_lim_reglement"; if (! $sortorder) $sortorder="ASC"; -if (GETPOST("button_removefilter")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search_ref=""; $search_ref_supplier=""; From ffb4dd9e3de6abea3892ea95c2c70a4409026a01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 10:06:40 +0100 Subject: [PATCH 0151/1060] Update /compta/paiement/cheque/list.php --- htdocs/compta/paiement/cheque/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/paiement/cheque/list.php b/htdocs/compta/paiement/cheque/list.php index 47a6ee8ba74..fdfe86ec178 100644 --- a/htdocs/compta/paiement/cheque/list.php +++ b/htdocs/compta/paiement/cheque/list.php @@ -61,7 +61,7 @@ $checkdepositstatic=new RemiseCheque($db); $accountstatic=new Account($db); // If click on purge search criteria ? -if (GETPOST("button_removefilter_x")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search_ref=''; $search_amount=''; From 97a6bd842d567039f7cfed5af4782b7bcbcae581 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 23 Nov 2014 12:39:53 +0100 Subject: [PATCH 0152/1060] Minor fixes. --- htdocs/core/menus/standard/eldy.lib.php | 14 +++++++------- htdocs/langs/en_US/stocks.lang | 2 +- htdocs/product/class/product.class.php | 4 ++-- htdocs/product/stock/index.php | 1 - htdocs/product/stock/product.php | 8 ++++---- 5 files changed, 14 insertions(+), 15 deletions(-) diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php index db8f216fd60..60f26ded345 100644 --- a/htdocs/core/menus/standard/eldy.lib.php +++ b/htdocs/core/menus/standard/eldy.lib.php @@ -1053,16 +1053,16 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu //if (empty($leftmenu) || $leftmenu=="cat") $newmenu->add("/categories/list.php", $langs->trans("List"), 1, $user->rights->categorie->lire); } - // Stocks + // Warehouse if (! empty($conf->stock->enabled)) { $langs->load("stocks"); - $newmenu->add("/product/stock/index.php?leftmenu=stock", $langs->trans("Stocks"), 0, $user->rights->stock->lire, '', $mainmenu, 'stock'); - if (empty($leftmenu) || $leftmenu=="stock") $newmenu->add("/product/stock/card.php?action=create", $langs->trans("MenuNewWarehouse"), 1, $user->rights->stock->creer); - if (empty($leftmenu) || $leftmenu=="stock") $newmenu->add("/product/stock/list.php", $langs->trans("List"), 1, $user->rights->stock->lire); - if (empty($leftmenu) || $leftmenu=="stock") $newmenu->add("/product/stock/mouvement.php", $langs->trans("Movements"), 1, $user->rights->stock->mouvement->lire); - if ($conf->fournisseur->enabled) if (empty($leftmenu) || $leftmenu=="stock") $newmenu->add("/product/stock/replenish.php", $langs->trans("Replenishment"), 1, $user->rights->stock->mouvement->lire && $user->rights->fournisseur->lire); - if ($conf->fournisseur->enabled) if (empty($leftmenu) || $leftmenu=="stock") $newmenu->add("/product/stock/massstockmove.php", $langs->trans("StockTransfer"), 1, $user->rights->stock->mouvement->lire && $user->rights->fournisseur->lire); + $newmenu->add("/product/stock/index.php?leftmenu=stock", $langs->trans("Warehouses"), 0, $user->rights->stock->lire, '', $mainmenu, 'stock'); + $newmenu->add("/product/stock/card.php?action=create", $langs->trans("MenuNewWarehouse"), 1, $user->rights->stock->creer); + $newmenu->add("/product/stock/list.php", $langs->trans("List"), 1, $user->rights->stock->lire); + $newmenu->add("/product/stock/mouvement.php", $langs->trans("Movements"), 1, $user->rights->stock->mouvement->lire); + if ($conf->fournisseur->enabled) $newmenu->add("/product/stock/replenish.php", $langs->trans("Replenishment"), 1, $user->rights->stock->mouvement->lire && $user->rights->fournisseur->lire); + if ($conf->fournisseur->enabled) $newmenu->add("/product/stock/massstockmove.php", $langs->trans("StockTransfer"), 1, $user->rights->stock->mouvement->lire && $user->rights->fournisseur->lire); } // Expeditions diff --git a/htdocs/langs/en_US/stocks.lang b/htdocs/langs/en_US/stocks.lang index 7a08148c9ce..b03d26dbe1d 100644 --- a/htdocs/langs/en_US/stocks.lang +++ b/htdocs/langs/en_US/stocks.lang @@ -23,7 +23,7 @@ ErrorWarehouseLabelRequired=Warehouse label is required CorrectStock=Correct stock ListOfWarehouses=List of warehouses ListOfStockMovements=List of stock movements -StocksArea=Stocks area +StocksArea=Warehouses area Location=Location LocationSummary=Short name location NumberOfDifferentProducts=Number of different products diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index 1bc30b2df5f..e2898943509 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -3249,11 +3249,11 @@ class Product extends CommonObject $alt.=' - '.$langs->transnoentitiesnoconv('Size').': '.$imgarray['width'].'x'.$imgarray['height']; if ($photo_vignette && $imgarray['height'] > $maxHeight) { $return.= ''; - $return.= ''; + $return.= 'dol_use_jmobile?'max-height':'height').'="'.$maxHeight.'" src="'.DOL_URL_ROOT.'/viewimage.php?modulepart=product&entity='.$this->entity.'&file='.urlencode($pdirthumb.$photo_vignette).'" title="'.dol_escape_htmltag($alt).'">'; } else { $return.= ''; - $return.= ''; + $return.= 'dol_use_jmobile?'max-height':'height').'="'.$maxHeight.'" src="'.DOL_URL_ROOT.'/viewimage.php?modulepart=product&entity='.$this->entity.'&file='.urlencode($pdir.$photo).'" title="'.dol_escape_htmltag($alt).'">'; } $return.= ''."\n"; diff --git a/htdocs/product/stock/index.php b/htdocs/product/stock/index.php index d2078d473e7..dc394f898dc 100644 --- a/htdocs/product/stock/index.php +++ b/htdocs/product/stock/index.php @@ -15,7 +15,6 @@ * * You should have received a copy of the GNU General Public License * along with this program. If not, see . - * */ /** diff --git a/htdocs/product/stock/product.php b/htdocs/product/stock/product.php index 22dc080d6e2..96ecdb1d95d 100644 --- a/htdocs/product/stock/product.php +++ b/htdocs/product/stock/product.php @@ -334,15 +334,16 @@ if ($id > 0 || $ref) // Calculating a theorical value print ''.$langs->trans("VirtualStock").''; - print "".$product->stock_theorique; + print "".(empty($product->stock_theorique)?0:$product->stock_theorique); if ($product->stock_theorique < $product->seuil_stock_alerte) { print ' '.img_warning($langs->trans("StockLowerThanLimit")); } print ''; print ''; - + print ''; - $text_stock_options = (! empty($conf->global->STOCK_CALCULATE_ON_SHIPMENT)?$langs->trans("DeStockOnShipment").'
':''); + $text_stock_options = ''; + $text_stock_options.= (! empty($conf->global->STOCK_CALCULATE_ON_SHIPMENT)?$langs->trans("DeStockOnShipment").'
':''); $text_stock_options.= (! empty($conf->global->STOCK_CALCULATE_ON_VALIDATE_ORDER)?$langs->trans("DeStockOnValidateOrder").'
':''); $text_stock_options.= (! empty($conf->global->STOCK_CALCULATE_ON_BILL)?$langs->trans("DeStockOnBill").'
':''); $text_stock_options.= (! empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_BILL)?$langs->trans("ReStockOnBill").'
':''); @@ -353,7 +354,6 @@ if ($id > 0 || $ref) print ''; $found=0; - // Number of customer orders running if (! empty($conf->commande->enabled)) { From de48a048446f6e9dc0c7ce6e4a3b7e13c139a4fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 12:53:00 +0100 Subject: [PATCH 0153/1060] Fix: W3C. form into table is forbidden. --- htdocs/comm/index.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/comm/index.php b/htdocs/comm/index.php index 4129b561ed1..fd25287c029 100644 --- a/htdocs/comm/index.php +++ b/htdocs/comm/index.php @@ -90,15 +90,15 @@ if (! empty($conf->propal->enabled) && $user->rights->propal->lire) if (! empty($conf->commande->enabled) && $user->rights->commande->lire) { $var=false; - print ''; print ''; print ''; + print '
'; print ''; print ''; print ''; print ''; - print "
'.$langs->trans("SearchACustomerOrder").'
'; print ':
:

\n"; + print "
\n"; } // Search contract From 3aef9d928b7213d68c1947caee1c936d5121412e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 23 Nov 2014 13:14:03 +0100 Subject: [PATCH 0154/1060] Fix: W3C --- htdocs/product/admin/product_tools.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/htdocs/product/admin/product_tools.php b/htdocs/product/admin/product_tools.php index a4aae519b98..84dacf8db43 100644 --- a/htdocs/product/admin/product_tools.php +++ b/htdocs/product/admin/product_tools.php @@ -298,10 +298,9 @@ else */ print ''; - print ''; // Boutons actions - print '
'; + print '
'; print ''; print '
'; From 9f73277ef2793842f1110375c6d4e10b51c82b75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 23 Nov 2014 13:14:54 +0100 Subject: [PATCH 0155/1060] Fixed [ bug #1642 ]: add a free line in contract --- htdocs/contrat/card.php | 6 ++--- .../contract/doc/pdf_strato.modules.php | 24 ++++++++++++++----- 2 files changed, 21 insertions(+), 9 deletions(-) diff --git a/htdocs/contrat/card.php b/htdocs/contrat/card.php index 20fd6939f5d..dfdf0e95a87 100644 --- a/htdocs/contrat/card.php +++ b/htdocs/contrat/card.php @@ -536,10 +536,10 @@ else if ($action == 'addline' && $user->rights->contrat->creer) $outputlangs = new Translate("", $conf); $outputlangs->setDefaultLang($newlang); } - $model=$object->modelpdf; - if (empty($model)) { $tmp=getListOfModels($db, 'contract'); $keys=array_keys($tmp); $model=$keys[0]; } + $ret = $object->fetch($id); // Reload to get new records - $object->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref); + + $object->generateDocument($object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); } unset($_POST ['prod_entry_mode']); diff --git a/htdocs/core/modules/contract/doc/pdf_strato.modules.php b/htdocs/core/modules/contract/doc/pdf_strato.modules.php index bd4cc333743..4c609bc100c 100644 --- a/htdocs/core/modules/contract/doc/pdf_strato.modules.php +++ b/htdocs/core/modules/contract/doc/pdf_strato.modules.php @@ -53,6 +53,18 @@ class pdf_strato extends ModelePDFContract var $marge_haute; var $marge_basse; + /** + * Issuer + * @var Societe + */ + public $emetteur; + + /** + * Recipient + * @var Societe + */ + public $recipient; + /** * Constructor * @@ -581,17 +593,17 @@ class pdf_strato extends ModelePDFContract $result=$object->fetch_contact($arrayidcontact[0]); } + $this->recipient = $object->client; + // Recipient name - if (! empty($usecontact)) - { + if (! empty($usecontact)) { // On peut utiliser le nom de la societe du contact if (! empty($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT)) $socname = $object->contact->socname; else $socname = $object->client->name; - $this->recipient->name=$outputlangs->convToOutputCharset($socname); + $this->recipient->name = $outputlangs->convToOutputCharset($socname); } - else - { - $this->recipient->name=$outputlangs->convToOutputCharset($object->client->name); + else { + $this->recipient->name = $outputlangs->convToOutputCharset($object->client->name); } $carac_client=pdf_build_address($outputlangs, $this->emetteur, $object->client, (isset($object->contact)?$object->contact:''), $usecontact, 'target'); From 1c1e2ed246370df5db6d1e6609e55300b229dfaf Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 23 Nov 2014 13:19:28 +0100 Subject: [PATCH 0156/1060] Better comment --- htdocs/public/test/test_forms.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/public/test/test_forms.php b/htdocs/public/test/test_forms.php index cb551e60761..c600e9b0acd 100644 --- a/htdocs/public/test/test_forms.php +++ b/htdocs/public/test/test_forms.php @@ -18,7 +18,7 @@ llxHeader(); ?>

-This page is a sample of page using html methods. It is designed to make test with
+This page is a sample of page using Dolibarr HTML widget methods. It is designed to make test with
- css (edit page to change to test another css)
- jmobile (add parameter dol_use_jmobile=1 to enable view with jmobile)

From 6cb3bafd9381966b4b45b3147f11d07044fe1bd6 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 23 Nov 2014 15:41:13 +0100 Subject: [PATCH 0157/1060] Debug travis pb --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 57781d47e44..830923fa8f1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -83,6 +83,7 @@ before_script: - sudo cat /etc/apache2/sites-available/default - sudo /etc/init.d/apache2 restart - wget http://localhost/ + - ls /var/log/apache2/* - cat index.html From 835b359179b0119fefde05ffe781547002c2ff0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 23 Nov 2014 15:42:29 +0100 Subject: [PATCH 0158/1060] Fixed [ bug #1658 ] Linked files in supplier invoices wrongly shows amounts --- htdocs/fourn/facture/document.php | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/htdocs/fourn/facture/document.php b/htdocs/fourn/facture/document.php index d47433af4f5..c7219c6e415 100644 --- a/htdocs/fourn/facture/document.php +++ b/htdocs/fourn/facture/document.php @@ -168,30 +168,6 @@ if ($object->id > 0) print $form->editfieldval("Label",'label',$object->label,$object,0); print ''; - // Status - $alreadypaid=$object->getSommePaiement(); - print ''.$langs->trans('Status').''.$object->getLibStatut(4,$alreadypaid).''; - - // Amount - print ''.$langs->trans('AmountHT').''.price($object->total_ht,1,$langs,0,-1,-1,$conf->currency).''; - print ''.$langs->trans('AmountVAT').''.price($object->total_tva,1,$langs,0,-1,-1,$conf->currency).''; - - // Amount Local Taxes - //TODO: Place into a function to control showing by country or study better option - if ($societe->localtax1_assuj=="1") //Localtax1 - { - print ''.$langs->transcountry("AmountLT1",$societe->country_code).''; - print ''.price($object->total_localtax1,1,$langs,0,-1,-1,$conf->currency).''; - print ' '; - } - if ($societe->localtax2_assuj=="1") //Localtax2 - { - print ''.$langs->transcountry("AmountLT2",$societe->country_code).''; - print ''.price($object->total_localtax2,1,$langs,0,-1,-1,$conf->currency).''; - print ''; - } - print ''.$langs->trans('AmountTTC').''.price($object->total_ttc,1,$langs,0,-1,-1,$conf->currency).''; - print '
'; print ''; From 3f06274d5e09570f9699831be5376edeb3b68907 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 23 Nov 2014 15:54:59 +0100 Subject: [PATCH 0159/1060] Debug travis pb --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 830923fa8f1..393db48438b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -83,7 +83,7 @@ before_script: - sudo cat /etc/apache2/sites-available/default - sudo /etc/init.d/apache2 restart - wget http://localhost/ - - ls /var/log/apache2/* + - cat /var/log/apache2/error.log - cat index.html From 7a272afd120029ba06d00ff6d56d7a8e129cbb8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 23 Nov 2014 16:03:49 +0100 Subject: [PATCH 0160/1060] Fixed [ bug #1595 ] Selected boolean extrafield in intervention creation page, does not save state --- ChangeLog | 3 ++- htdocs/fichinter/fiche.php | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 99b29a81f56..34dd86aa02e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -12,7 +12,8 @@ English Dolibarr ChangeLog - Fix: Civility & birthdate wasn't save into adherent module. - Fix: webservice Thirdparty parameter lastname for invidual creation is now lastname and not ref - Fix: Chars - is no more allowed into value for code for extra fields. -( Fix: [ bug #1622 ] Requesting holiday than spans across two years cause high CPU usage by Apache +- Fix: [ bug #1622 ] Requesting holiday than spans across two years cause high CPU usage by Apache +- Fix: [ bug #1595 ] Selected boolean extrafield in intervention creation page, does not save state ***** ChangeLog for 3.6.1 compared to 3.6.* ***** For users: diff --git a/htdocs/fichinter/fiche.php b/htdocs/fichinter/fiche.php index 944dbae6b45..9be7d67115e 100644 --- a/htdocs/fichinter/fiche.php +++ b/htdocs/fichinter/fiche.php @@ -152,6 +152,11 @@ else if ($action == 'confirm_modify' && $confirm == 'yes' && $user->rights->fich else if ($action == 'add' && $user->rights->ficheinter->creer) { + // Fill array 'array_options' with data from add form + $extralabels = $extrafields->fetch_name_optionals_label($object->table_element); + $ret = $extrafields->setOptionalsFromPost($extralabels, $object); + if ($ret < 0) $error ++; + $object->socid = $socid; $object->duree = GETPOST('duree','int'); $object->fk_project = GETPOST('projectid','int'); From 7d719743621a3e25acc5c5894591b35f03180c47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 23 Nov 2014 16:14:12 +0100 Subject: [PATCH 0161/1060] Fixed [ bug #1712 ] Unable to add a social charge --- htdocs/admin/dict.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php index 72b7c8fe549..05402898ee6 100644 --- a/htdocs/admin/dict.php +++ b/htdocs/admin/dict.php @@ -192,7 +192,7 @@ $tabfield[3] = "code,libelle,country_id,country"; $tabfield[4] = "code,label"; $tabfield[5] = "code,label"; $tabfield[6] = "code,libelle,type,color,position"; -$tabfield[7] = "code,libelle,country_id,country,accountancy_code,deductible"; +$tabfield[7] = "code,libelle,country,accountancy_code,deductible"; $tabfield[8] = "code,libelle,country_id,country"; $tabfield[9] = "code,label,unicode"; $tabfield[10]= "country_id,country,taux,recuperableonly,localtax1_type,localtax1,localtax2_type,localtax2,accountancy_code_sell,accountancy_code_buy,note"; From bd765ef3ae5922e35deb0a6b28d0f966de99e391 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 23 Nov 2014 16:17:09 +0100 Subject: [PATCH 0162/1060] Fixed [ bug #1705 ] Members statistics menu entry strange target --- htdocs/core/menus/standard/eldy.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php index db8f216fd60..e637455152e 100644 --- a/htdocs/core/menus/standard/eldy.lib.php +++ b/htdocs/core/menus/standard/eldy.lib.php @@ -1233,7 +1233,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu $newmenu->add("/adherents/list.php?leftmenu=members&statut=1&filter=uptodate",$langs->trans("MenuMembersUpToDate"),2,$user->rights->adherent->lire); $newmenu->add("/adherents/list.php?leftmenu=members&statut=1&filter=outofdate",$langs->trans("MenuMembersNotUpToDate"),2,$user->rights->adherent->lire); $newmenu->add("/adherents/list.php?leftmenu=members&statut=0",$langs->trans("MenuMembersResiliated"),2,$user->rights->adherent->lire); - $newmenu->add("/adherents/stats/geo.php?leftmenu=members&mode=memberbycountry",$langs->trans("MenuMembersStats"),1,$user->rights->adherent->lire); + $newmenu->add("/adherents/stats/index.php?leftmenu=members",$langs->trans("MenuMembersStats"),1,$user->rights->adherent->lire); $newmenu->add("/adherents/index.php?leftmenu=members&mainmenu=members",$langs->trans("Subscriptions"),0,$user->rights->adherent->cotisation->lire); $newmenu->add("/adherents/list.php?leftmenu=members&statut=-1,1&mainmenu=members",$langs->trans("NewSubscription"),1,$user->rights->adherent->cotisation->creer); From 4f83eea3cf9add94885b0ea1069631b8e7da930f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 23 Nov 2014 16:22:38 +0100 Subject: [PATCH 0163/1060] Fixed[ bug #1661 ] Bookmarks list "Target" translation missing --- htdocs/bookmarks/list.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/bookmarks/list.php b/htdocs/bookmarks/list.php index 61dc0a91d7e..a22b24388b1 100644 --- a/htdocs/bookmarks/list.php +++ b/htdocs/bookmarks/list.php @@ -25,6 +25,7 @@ require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/bookmarks/class/bookmark.class.php'; $langs->load("bookmarks"); +$langs->load("admin"); // Security check if (! $user->rights->bookmark->lire) { From a1cc95d35271e8b4040ae5b1f3198ed7048a89a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 23 Nov 2014 16:26:55 +0100 Subject: [PATCH 0164/1060] Fixed design of edit page of a bookmark --- htdocs/bookmarks/card.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/htdocs/bookmarks/card.php b/htdocs/bookmarks/card.php index 640e7e72c57..1d217b64154 100644 --- a/htdocs/bookmarks/card.php +++ b/htdocs/bookmarks/card.php @@ -153,7 +153,7 @@ if ($action == 'create') print_fiche_titre($langs->trans("NewBookmark")); - dol_fiche_head($head, $hselected, $langs->trans("Bookmark"),0,'bookmark'); + dol_fiche_head($head, 'card', $langs->trans("Bookmark"),0,'bookmark'); print '
'; @@ -196,8 +196,15 @@ if ($id > 0 && ! preg_match('/^add/i',$action)) $bookmark=new Bookmark($db); $bookmark->fetch($id); + $head = array( + array( + '', + $langs->trans('Card'), + 'card' + ) + ); - dol_fiche_head($head, $hselected, $langs->trans("Bookmark"),0,'bookmark'); + dol_fiche_head($head, 'card', $langs->trans("Bookmark"),0,'bookmark'); if ($action == 'edit') { From d2762f50779c4c9efcedf6687d9580ee107e4709 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 23 Nov 2014 16:28:25 +0100 Subject: [PATCH 0165/1060] Debug travis pb --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 393db48438b..26111b8ae48 100644 --- a/.travis.yml +++ b/.travis.yml @@ -83,7 +83,7 @@ before_script: - sudo cat /etc/apache2/sites-available/default - sudo /etc/init.d/apache2 restart - wget http://localhost/ - - cat /var/log/apache2/error.log + - sudo ls /var/log/apache2/* - cat index.html From be2fe19e03d1309c33cdb590696d0e18ab913dca Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 23 Nov 2014 16:31:37 +0100 Subject: [PATCH 0166/1060] Debug travis pb --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 26111b8ae48..94452733a5a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -83,7 +83,7 @@ before_script: - sudo cat /etc/apache2/sites-available/default - sudo /etc/init.d/apache2 restart - wget http://localhost/ - - sudo ls /var/log/apache2/* + - sudo ls /var/log/apache/* - cat index.html From 26a652814f6ccdda527bf810dd47dcf7da4910a2 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 23 Nov 2014 16:34:56 +0100 Subject: [PATCH 0167/1060] Debug travis pb --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 26111b8ae48..f9c1e097af0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -83,7 +83,7 @@ before_script: - sudo cat /etc/apache2/sites-available/default - sudo /etc/init.d/apache2 restart - wget http://localhost/ - - sudo ls /var/log/apache2/* + - sudo cat /etc/apache2/envvars - cat index.html From 89e3e3bee3192425ff218c19230f25b357582903 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 23 Nov 2014 16:38:59 +0100 Subject: [PATCH 0168/1060] Debug travis --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index feb9f034f6e..8140caba269 100644 --- a/.travis.yml +++ b/.travis.yml @@ -83,8 +83,8 @@ before_script: - sudo cat /etc/apache2/sites-available/default - sudo /etc/init.d/apache2 restart - wget http://localhost/ - - echo ${APACHE_LOG_DIR} - sudo cat /etc/apache2/envvars + - sudo ls /var/log/apache2* - cat index.html From eb569fe23526f7b1e553a136518928c6bd69b0aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 23 Nov 2014 16:14:12 +0100 Subject: [PATCH 0169/1060] Fixed [ bug #1712 ] Unable to add a social charge --- htdocs/admin/dict.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php index 72b7c8fe549..05402898ee6 100644 --- a/htdocs/admin/dict.php +++ b/htdocs/admin/dict.php @@ -192,7 +192,7 @@ $tabfield[3] = "code,libelle,country_id,country"; $tabfield[4] = "code,label"; $tabfield[5] = "code,label"; $tabfield[6] = "code,libelle,type,color,position"; -$tabfield[7] = "code,libelle,country_id,country,accountancy_code,deductible"; +$tabfield[7] = "code,libelle,country,accountancy_code,deductible"; $tabfield[8] = "code,libelle,country_id,country"; $tabfield[9] = "code,label,unicode"; $tabfield[10]= "country_id,country,taux,recuperableonly,localtax1_type,localtax1,localtax2_type,localtax2,accountancy_code_sell,accountancy_code_buy,note"; From c40be71dcdd817e19619983acf92d6754578bfca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 23 Nov 2014 16:44:49 +0100 Subject: [PATCH 0170/1060] Fixed design of new bookmark page --- htdocs/bookmarks/card.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/htdocs/bookmarks/card.php b/htdocs/bookmarks/card.php index 1d217b64154..2c1c61c5981 100644 --- a/htdocs/bookmarks/card.php +++ b/htdocs/bookmarks/card.php @@ -153,8 +153,6 @@ if ($action == 'create') print_fiche_titre($langs->trans("NewBookmark")); - dol_fiche_head($head, 'card', $langs->trans("Bookmark"),0,'bookmark'); - print '
'; print ''; @@ -183,8 +181,6 @@ if ($action == 'create') print ''; print ''; - - dol_fiche_end(); } @@ -220,12 +216,12 @@ if ($id > 0 && ! preg_match('/^add/i',$action)) print ''; - print ''; - print ''; From b83e4cffb08e68e9365189bbe376728e553ded3e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 23 Nov 2014 16:45:33 +0100 Subject: [PATCH 0171/1060] Debug travis --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 8140caba269..dc2c543b07e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -84,7 +84,7 @@ before_script: - sudo /etc/init.d/apache2 restart - wget http://localhost/ - sudo cat /etc/apache2/envvars - - sudo ls /var/log/apache2* + - sudo cat /var/log/apache2/error.log - cat index.html From 52eb4943e2492a0a733800e1c557f96b3bf35e90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 23 Nov 2014 16:46:48 +0100 Subject: [PATCH 0172/1060] Fixed entities problems in error messages when creating a bookmark --- htdocs/bookmarks/card.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/bookmarks/card.php b/htdocs/bookmarks/card.php index 2c1c61c5981..5e8f770c91c 100644 --- a/htdocs/bookmarks/card.php +++ b/htdocs/bookmarks/card.php @@ -69,12 +69,12 @@ if ($action == 'add' || $action == 'addproduct' || $action == 'update') if (! $title) { $error++; - setEventMessage($langs->trans("ErrorFieldRequired",$langs->trans("BookmarkTitle")), 'errors'); + setEventMessage($langs->transnoentities("ErrorFieldRequired",$langs->trans("BookmarkTitle")), 'errors'); } if (! $url) { $error++; - setEventMessage($langs->trans("ErrorFieldRequired",$langs->trans("UrlOrLink")), 'errors'); + setEventMessage($langs->transnoentities("ErrorFieldRequired",$langs->trans("UrlOrLink")), 'errors'); } if (! $error) @@ -95,7 +95,7 @@ if ($action == 'add' || $action == 'addproduct' || $action == 'update') if ($bookmark->errno == 'DB_ERROR_RECORD_ALREADY_EXISTS') { $langs->load("errors"); - setEventMessage($langs->trans("WarningBookmarkAlreadyExists"), 'warnings'); + setEventMessage($langs->transnoentities("WarningBookmarkAlreadyExists"), 'warnings'); } else { From 373bdcf5d7cc1169c1c3039626aa749534c2fa4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 23 Nov 2014 16:54:09 +0100 Subject: [PATCH 0173/1060] Fixed problem when editing a bookmark and failing --- htdocs/bookmarks/card.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/htdocs/bookmarks/card.php b/htdocs/bookmarks/card.php index 5e8f770c91c..9e115a611e6 100644 --- a/htdocs/bookmarks/card.php +++ b/htdocs/bookmarks/card.php @@ -50,6 +50,13 @@ $backtopage=GETPOST('backtopage','alpha'); if ($action == 'add' || $action == 'addproduct' || $action == 'update') { + + if ($action == 'update') { + $invertedaction = 'edit'; + } else { + $invertedaction = 'create'; + } + $error = 0; if (GETPOST("cancel")) @@ -101,12 +108,12 @@ if ($action == 'add' || $action == 'addproduct' || $action == 'update') { setEventMessage($bookmark->error, 'errors'); } - $action='create'; + $action = $invertedaction; } } else { - $action='create'; + $action = $invertedaction; } } From 5578bc6f5d1a8c90d2541d5269b6b6555e443f24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 23 Nov 2014 15:42:29 +0100 Subject: [PATCH 0174/1060] Fixed [ bug #1658 ] Linked files in supplier invoices wrongly shows amounts --- htdocs/fourn/facture/document.php | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/htdocs/fourn/facture/document.php b/htdocs/fourn/facture/document.php index d47433af4f5..c7219c6e415 100644 --- a/htdocs/fourn/facture/document.php +++ b/htdocs/fourn/facture/document.php @@ -168,30 +168,6 @@ if ($object->id > 0) print $form->editfieldval("Label",'label',$object->label,$object,0); print ''; - // Status - $alreadypaid=$object->getSommePaiement(); - print ''; - - // Amount - print ''; - print ''; - - // Amount Local Taxes - //TODO: Place into a function to control showing by country or study better option - if ($societe->localtax1_assuj=="1") //Localtax1 - { - print ''; - print ''; - print ''; - } - if ($societe->localtax2_assuj=="1") //Localtax2 - { - print ''; - print ''; - print ''; - } - print ''; - print '
'.$langs->trans("BookmarkTitle").''.$langs->trans("SetHereATitleForLink").'
'.$langs->trans("Ref").''.$bookmark->ref.'
'.$langs->trans("BookmarkTitle").''; + print '
'.$langs->trans("BookmarkTitle").''; if ($action == 'edit') print 'title).'">'; else print $bookmark->title; print '
'.$langs->trans("UrlOrLink").''; + print '
'.$langs->trans("UrlOrLink").''; if ($action == 'edit') print 'url).'">'; else print 'target?' target="_blank"':'').'>'.$bookmark->url.''; print '
'.$langs->trans('Status').''.$object->getLibStatut(4,$alreadypaid).'
'.$langs->trans('AmountHT').''.price($object->total_ht,1,$langs,0,-1,-1,$conf->currency).'
'.$langs->trans('AmountVAT').''.price($object->total_tva,1,$langs,0,-1,-1,$conf->currency).'
'.$langs->transcountry("AmountLT1",$societe->country_code).''.price($object->total_localtax1,1,$langs,0,-1,-1,$conf->currency).' 
'.$langs->transcountry("AmountLT2",$societe->country_code).''.price($object->total_localtax2,1,$langs,0,-1,-1,$conf->currency).'
'.$langs->trans('AmountTTC').''.price($object->total_ttc,1,$langs,0,-1,-1,$conf->currency).'

'; print ''; From a927a04421a68f9e2b31b87a680c6c6ff33a3477 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 23 Nov 2014 16:17:09 +0100 Subject: [PATCH 0175/1060] Fixed [ bug #1705 ] Members statistics menu entry strange target --- htdocs/core/menus/standard/eldy.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php index 60f26ded345..781de5f2913 100644 --- a/htdocs/core/menus/standard/eldy.lib.php +++ b/htdocs/core/menus/standard/eldy.lib.php @@ -1233,7 +1233,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu $newmenu->add("/adherents/list.php?leftmenu=members&statut=1&filter=uptodate",$langs->trans("MenuMembersUpToDate"),2,$user->rights->adherent->lire); $newmenu->add("/adherents/list.php?leftmenu=members&statut=1&filter=outofdate",$langs->trans("MenuMembersNotUpToDate"),2,$user->rights->adherent->lire); $newmenu->add("/adherents/list.php?leftmenu=members&statut=0",$langs->trans("MenuMembersResiliated"),2,$user->rights->adherent->lire); - $newmenu->add("/adherents/stats/geo.php?leftmenu=members&mode=memberbycountry",$langs->trans("MenuMembersStats"),1,$user->rights->adherent->lire); + $newmenu->add("/adherents/stats/index.php?leftmenu=members",$langs->trans("MenuMembersStats"),1,$user->rights->adherent->lire); $newmenu->add("/adherents/index.php?leftmenu=members&mainmenu=members",$langs->trans("Subscriptions"),0,$user->rights->adherent->cotisation->lire); $newmenu->add("/adherents/list.php?leftmenu=members&statut=-1,1&mainmenu=members",$langs->trans("NewSubscription"),1,$user->rights->adherent->cotisation->creer); From 1347a16fd346d1c94a2c44916f35781c074e107b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 23 Nov 2014 16:22:38 +0100 Subject: [PATCH 0176/1060] Fixed[ bug #1661 ] Bookmarks list "Target" translation missing --- htdocs/bookmarks/list.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/bookmarks/list.php b/htdocs/bookmarks/list.php index 61dc0a91d7e..a22b24388b1 100644 --- a/htdocs/bookmarks/list.php +++ b/htdocs/bookmarks/list.php @@ -25,6 +25,7 @@ require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/bookmarks/class/bookmark.class.php'; $langs->load("bookmarks"); +$langs->load("admin"); // Security check if (! $user->rights->bookmark->lire) { From 231ad04fbd5555b42a535934226141e1830359d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 23 Nov 2014 16:58:46 +0100 Subject: [PATCH 0177/1060] Highlight of required fields should be only in edit mode --- htdocs/bookmarks/card.php | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/htdocs/bookmarks/card.php b/htdocs/bookmarks/card.php index 9e115a611e6..5896f63106a 100644 --- a/htdocs/bookmarks/card.php +++ b/htdocs/bookmarks/card.php @@ -1,6 +1,7 @@ * Copyright (C) 2005-2013 Laurent Destailleur + * Copyright (C) 2014 Marcos García * * 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 @@ -223,12 +224,31 @@ if ($id > 0 && ! preg_match('/^add/i',$action)) print ''; - print ''; - print ''; From 652b0f84a7fc74beb7a7efeac55a8b8b8e9db7ae Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 23 Nov 2014 17:03:22 +0100 Subject: [PATCH 0178/1060] Fixed: Field is used only by module accounting so must have a condition on it. --- htdocs/compta/bank/card.php | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/htdocs/compta/bank/card.php b/htdocs/compta/bank/card.php index 5d3d2a051d6..b1852785466 100644 --- a/htdocs/compta/bank/card.php +++ b/htdocs/compta/bank/card.php @@ -346,8 +346,11 @@ if ($action == 'create') } // Accountancy journal - print ''; - print ''; + if (! empty($conf->accounting->enabled)) + { + print ''; + print ''; + } print '
'.$langs->trans("Ref").''.$bookmark->ref.'
'.$langs->trans("BookmarkTitle").''; + print '
'; + if ($action == 'edit') { + print ''; + } + + print $langs->trans("BookmarkTitle"); + + if ($action == 'edit') { + print ''; + } + + print ''; if ($action == 'edit') print 'title).'">'; else print $bookmark->title; print '
'.$langs->trans("UrlOrLink").''; + print '
'; + if ($action == 'edit') { + print ''; + } + print $langs->trans("UrlOrLink"); + if ($action == 'edit') { + print ''; + } + print ''; if ($action == 'edit') print 'url).'">'; else print 'target?' target="_blank"':'').'>'.$bookmark->url.''; print '
'.$langs->trans("AccountancyJournal").'
'.$langs->trans("AccountancyJournal").'
'; @@ -470,8 +473,11 @@ else print ''.$account->account_number.''; // Accountancy journal - print ''.$langs->trans("AccountancyJournal").''; - print ''.$account->accountancy_journal.''; + if (! empty($conf->accounting->enabled)) + { + print ''.$langs->trans("AccountancyJournal").''; + print ''.$account->accountancy_journal.''; + } print ''; @@ -633,8 +639,11 @@ else } // Accountancy journal - print ''.$langs->trans("AccountancyJournal").''; - print 'accountancy_journal).'">'; + if (! empty($conf->accounting->enabled)) + { + print ''.$langs->trans("AccountancyJournal").''; + print 'accountancy_journal).'">'; + } print ''; From b76a58b898d64f7548de2d8d813298641786112a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 23 Nov 2014 17:03:25 +0100 Subject: [PATCH 0179/1060] Fixed typo --- htdocs/bookmarks/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/bookmarks/list.php b/htdocs/bookmarks/list.php index a22b24388b1..748a4d9b7fa 100644 --- a/htdocs/bookmarks/list.php +++ b/htdocs/bookmarks/list.php @@ -59,7 +59,7 @@ if ($_GET["action"] == 'delete') } else { - $setEventMessage($bookmark->error, 'errors'); + setEventMessage($bookmark->error, 'errors'); } } From 496a3fcaaef0f6e4a36bfe8d9aff9fad8b23d24f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 23 Nov 2014 17:06:51 +0100 Subject: [PATCH 0180/1060] Removed unused action of card.php --- htdocs/bookmarks/card.php | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/htdocs/bookmarks/card.php b/htdocs/bookmarks/card.php index 5896f63106a..05d6a0b4843 100644 --- a/htdocs/bookmarks/card.php +++ b/htdocs/bookmarks/card.php @@ -118,28 +118,6 @@ if ($action == 'add' || $action == 'addproduct' || $action == 'update') } } -if ($action == 'delete') -{ - $bookmark=new Bookmark($db); - $bookmark->id=$_GET["bid"]; - $bookmark->url=$user->id; - $bookmark->target=$user->id; - $bookmark->title='xxx'; - $bookmark->favicon='xxx'; - - $res=$bookmark->remove(); - if ($res > 0) - { - header("Location: ".$_SERVER["PHP_SELF"]); - exit; - } - else - { - setEventMessage($bookmark->error, 'errors'); - } -} - - /* * View */ From 912384a9fad737c007dbe449cec47bd85cd64884 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 23 Nov 2014 17:24:37 +0100 Subject: [PATCH 0181/1060] Fixed [ bug #1679 ] Can't sort groups by user count in user groups list --- htdocs/user/group/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/user/group/index.php b/htdocs/user/group/index.php index 00af5b0e6d2..1f06fa3a3c2 100644 --- a/htdocs/user/group/index.php +++ b/htdocs/user/group/index.php @@ -91,7 +91,7 @@ if ($resql) { print_liste_field_titre($langs->trans("Entity"),$_SERVER["PHP_SELF"],"g.entity",$param,"",'align="center"',$sortfield,$sortorder); } - print_liste_field_titre($langs->trans("NbOfUsers"),$_SERVER["PHP_SELF"],"g.nb",$param,"",'align="center"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("NbOfUsers"),$_SERVER["PHP_SELF"],"nb",$param,"",'align="center"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("DateCreation"),$_SERVER["PHP_SELF"],"g.datec",$param,"",'align="right"',$sortfield,$sortorder); print "\n"; $var=True; From 326e009cadca00c59e1c44f4cc1a816f4104e432 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 17:42:06 +0100 Subject: [PATCH 0182/1060] Fix Typo --- htdocs/compta/dons/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/dons/card.php b/htdocs/compta/dons/card.php index e453ef623c3..5a4170e74fe 100644 --- a/htdocs/compta/dons/card.php +++ b/htdocs/compta/dons/card.php @@ -76,7 +76,7 @@ if ($action == 'update') if (empty($amount)) { - $setEventMessage($langs->trans("ErrorFieldRequired",$langs->trans("Amount")), 'errors'); + setEventMessage($langs->trans("ErrorFieldRequired",$langs->trans("Amount")), 'errors'); $action = "create"; $error++; } From 486d24b8db251da9fcc4bc79d3b99bb480cc806c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 17:43:06 +0100 Subject: [PATCH 0183/1060] Fix Typo --- htdocs/fourn/paiement/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/fourn/paiement/card.php b/htdocs/fourn/paiement/card.php index 824919400a2..179e810d182 100644 --- a/htdocs/fourn/paiement/card.php +++ b/htdocs/fourn/paiement/card.php @@ -107,7 +107,7 @@ if ($action == 'setnum_paiement' && ! empty($_POST['num_paiement'])) $res = $object->update_num($_POST['num_paiement']); if ($res === 0) { - $setEventMessage($langs->trans('PaymentNumberUpdateSucceeded')); + setEventMessage($langs->trans('PaymentNumberUpdateSucceeded')); } else { From d17b5268fa50a874cf3ebf7f463bae2882404fb7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 01:21:51 +0100 Subject: [PATCH 0184/1060] (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers --- htdocs/commande/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php index b152a38db02..2c30f4128c6 100644 --- a/htdocs/commande/list.php +++ b/htdocs/commande/list.php @@ -70,7 +70,7 @@ $limit = $conf->liste_limit; $viewstatut=GETPOST('viewstatut'); // Purge search criteria -if (GETPOST("button_removefilter")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search_categ=''; $search_user=''; From 28e620a7bf2f8fd1078368d79b5ec523192c1b4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 09:29:04 +0100 Subject: [PATCH 0185/1060] Update /cron/list.php --- htdocs/cron/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/cron/list.php b/htdocs/cron/list.php index 79e5ae5b1a4..3c2844f3fe4 100644 --- a/htdocs/cron/list.php +++ b/htdocs/cron/list.php @@ -64,7 +64,7 @@ $pageprev = $page - 1; $pagenext = $page + 1; // Do we click on purge search criteria ? -if (GETPOST("button_removefilter")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search_label=''; $status=-1; From baaadd772e668aaae72b0a16753f4d2d183c869b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 09:30:32 +0100 Subject: [PATCH 0186/1060] Update /holiday/index.php --- htdocs/holiday/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/holiday/index.php b/htdocs/holiday/index.php index e988e640711..86c4eca49eb 100644 --- a/htdocs/holiday/index.php +++ b/htdocs/holiday/index.php @@ -64,7 +64,7 @@ $search_employe = GETPOST('search_employe'); $search_valideur = GETPOST('search_valideur'); $search_statut = GETPOST('select_statut'); -if (GETPOST("button_removefilter")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search_ref=""; $month_create=""; From e6da4a251871801dabc36cb803f441f33e55545c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 09:31:20 +0100 Subject: [PATCH 0187/1060] Update /comm/list.php --- htdocs/comm/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/comm/list.php b/htdocs/comm/list.php index ce7eb82f9a1..b35e4fab7cc 100644 --- a/htdocs/comm/list.php +++ b/htdocs/comm/list.php @@ -75,7 +75,7 @@ $reshook=$hookmanager->executeHooks('doActions',$parameters); // Note that $a if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); // Do we click on purge search criteria ? -if (GETPOST("button_removefilter_x")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search_sale=""; $search_categ=""; From b396ccaf738dd919ab01a16cf9cf84975091d475 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 09:32:46 +0100 Subject: [PATCH 0188/1060] Update /fichinter/list.php --- htdocs/fichinter/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/fichinter/list.php b/htdocs/fichinter/list.php index a6d3f9720ec..9030cd9c4ac 100644 --- a/htdocs/fichinter/list.php +++ b/htdocs/fichinter/list.php @@ -62,7 +62,7 @@ $search_desc=GETPOST('search_desc','alpha'); $search_status=GETPOST('search_status'); $sall=GETPOST('sall'); -if (GETPOST("button_removefilter")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search_ref=""; $search_company=""; From 84d3bd2b4357a8e98af54577b61170a145158af2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 09:33:32 +0100 Subject: [PATCH 0189/1060] Update /expedition/list.php --- htdocs/expedition/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/expedition/list.php b/htdocs/expedition/list.php index af1d244e0d0..0722dedddf4 100644 --- a/htdocs/expedition/list.php +++ b/htdocs/expedition/list.php @@ -52,7 +52,7 @@ if (! $sortorder) $sortorder="DESC"; $limit = $conf->liste_limit; // Purge search criteria -if (GETPOST("button_removefilter_x")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search_ref_exp=''; $search_ref_liv=''; From c97e95f6abe3d2afcc0c2f7b314a2414d6497f8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 09:34:20 +0100 Subject: [PATCH 0190/1060] Update /contrat/services.php --- htdocs/contrat/services.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/contrat/services.php b/htdocs/contrat/services.php index b0fb4ed5edb..22ae64ef9cd 100644 --- a/htdocs/contrat/services.php +++ b/htdocs/contrat/services.php @@ -69,7 +69,7 @@ $staticcontrat=new Contrat($db); $staticcontratligne=new ContratLigne($db); $companystatic=new Societe($db); -if (GETPOST("button_removefilter")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search_name=""; $search_contract=""; From d57344a2e725264a8078dc5d6c1dc237479a616d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 09:34:56 +0100 Subject: [PATCH 0191/1060] Update /contrat/list.php --- htdocs/contrat/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/contrat/list.php b/htdocs/contrat/list.php index b1b28192395..debe18e995e 100644 --- a/htdocs/contrat/list.php +++ b/htdocs/contrat/list.php @@ -58,7 +58,7 @@ $result = restrictedArea($user, 'contrat', $id); $staticcontrat=new Contrat($db); $staticcontratligne=new ContratLigne($db); -if (GETPOST("button_removefilter")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search_name=""; $search_contract=""; From f6db1d5da2be8cec0ba48800fbf94d68b5ea72af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 09:36:07 +0100 Subject: [PATCH 0192/1060] Update /fourn/list.php --- htdocs/fourn/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/fourn/list.php b/htdocs/fourn/list.php index 296415c1aee..b0d7caf8695 100644 --- a/htdocs/fourn/list.php +++ b/htdocs/fourn/list.php @@ -60,7 +60,7 @@ if (! $sortfield) $sortfield="nom"; // Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array $hookmanager->initHooks(array('supplierlist')); -if (GETPOST("button_removefilter_x")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $socname=""; $search_name=""; From e7f9b9bf1b4bd887035a407c0f6bc5e022088da6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 09:46:24 +0100 Subject: [PATCH 0193/1060] Update /adherents/list.php --- htdocs/adherents/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/adherents/list.php b/htdocs/adherents/list.php index 887bac4e1e7..b70e212d2d2 100644 --- a/htdocs/adherents/list.php +++ b/htdocs/adherents/list.php @@ -59,7 +59,7 @@ $pagenext = $page + 1; if (! $sortorder) { $sortorder=($filter=='outofdate'?"ASC":"DESC"); } if (! $sortfield) { $sortfield=($filter=='outofdate'?"d.datefin":"d.lastname"); } -if (GETPOST("button_removefilter")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search=""; $search_ref=""; From 62876cc0227157e32b29a613f5a937bc460814c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 09:47:19 +0100 Subject: [PATCH 0194/1060] Update /societe/consumption.php --- htdocs/societe/consumption.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/societe/consumption.php b/htdocs/societe/consumption.php index f89212e5fbc..d5ef1af6dbb 100644 --- a/htdocs/societe/consumption.php +++ b/htdocs/societe/consumption.php @@ -58,7 +58,7 @@ $month = GETPOST('month','int'); $year = GETPOST('year','int'); // Clean up on purge search criteria ? -if (GETPOST("button_removefilter")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $sref=''; $sprod_fulldescr=''; From 64497de4d8aecc7a8464f2433efe1cc7baf01471 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 09:48:13 +0100 Subject: [PATCH 0195/1060] Update /societe/societe.php --- htdocs/societe/societe.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/societe/societe.php b/htdocs/societe/societe.php index f0b3532018b..2d046a3ec16 100644 --- a/htdocs/societe/societe.php +++ b/htdocs/societe/societe.php @@ -153,7 +153,7 @@ llxHeader('',$langs->trans("ThirdParty"),$help_url); // Do we click on purge search criteria ? -if (GETPOST("button_removefilter_x")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search_categ=''; $search_sale=''; From 045c2f9568d3f4d5606204163c14c140eb0c9294 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 09:48:54 +0100 Subject: [PATCH 0196/1060] Update /compta/dons/list.php --- htdocs/compta/dons/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/dons/list.php b/htdocs/compta/dons/list.php index 174b5357bb2..95011ca0b74 100644 --- a/htdocs/compta/dons/list.php +++ b/htdocs/compta/dons/list.php @@ -50,7 +50,7 @@ $search_amount = GETPOST('search_amount','alpha'); if (!$user->rights->don->lire) accessforbidden(); -if (GETPOST("button_removefilter")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search_ref=""; $search_company=""; From 68ccb33def0b854bfea8e151466bb030b5ed86bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 09:49:30 +0100 Subject: [PATCH 0197/1060] Update /compta/deplacement/list.php --- htdocs/compta/deplacement/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/deplacement/list.php b/htdocs/compta/deplacement/list.php index 42a6713c1ce..e34e7c2b3a6 100644 --- a/htdocs/compta/deplacement/list.php +++ b/htdocs/compta/deplacement/list.php @@ -57,7 +57,7 @@ $limit = $conf->liste_limit; $year=GETPOST("year"); $month=GETPOST("month"); -if (GETPOST("button_removefilter")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search_ref=""; $search_name=""; From 8c839cc2a1390a444fe10cef842d4828b879221b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 09:50:19 +0100 Subject: [PATCH 0198/1060] Update /compta/prelevement/list.php --- htdocs/compta/prelevement/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/prelevement/list.php b/htdocs/compta/prelevement/list.php index 0a68aa686ae..921736faedf 100644 --- a/htdocs/compta/prelevement/list.php +++ b/htdocs/compta/prelevement/list.php @@ -53,7 +53,7 @@ $ligne=new LignePrelevement($db,$user); $offset = $conf->liste_limit * $page ; -if (GETPOST("button_removefilter")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search_line=""; $search_bon=""; From 59494db8c16b9f49d2a384d6ba17f0443ec47593 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 09:51:03 +0100 Subject: [PATCH 0199/1060] Update /compta/tva/reglement.php --- htdocs/compta/tva/reglement.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/tva/reglement.php b/htdocs/compta/tva/reglement.php index ebba3888004..45a69076492 100644 --- a/htdocs/compta/tva/reglement.php +++ b/htdocs/compta/tva/reglement.php @@ -66,7 +66,7 @@ else $typeid=$_REQUEST['typeid']; } -if (GETPOST("button_removefilter")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search_ref=""; $search_label=""; From 2a79c2c82604b58d71e88eae0d401457b4c51287 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 09:51:49 +0100 Subject: [PATCH 0200/1060] Update /compta/sociales/index.php --- htdocs/compta/sociales/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/sociales/index.php b/htdocs/compta/sociales/index.php index db4bef2abe6..31e98370003 100644 --- a/htdocs/compta/sociales/index.php +++ b/htdocs/compta/sociales/index.php @@ -68,7 +68,7 @@ else $typeid=$_REQUEST['typeid']; } -if (GETPOST("button_removefilter")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search_ref=""; $search_label=""; From dd1c39b44e6d46b13b6439b974a76a5f1a75b780 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 09:52:35 +0100 Subject: [PATCH 0201/1060] Update /compta/bank/search.php --- htdocs/compta/bank/search.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/bank/search.php b/htdocs/compta/bank/search.php index 1e8196481e6..127e428162c 100644 --- a/htdocs/compta/bank/search.php +++ b/htdocs/compta/bank/search.php @@ -73,7 +73,7 @@ $limit = $conf->liste_limit; if (! $sortorder) $sortorder='DESC'; if (! $sortfield) $sortfield='b.dateo'; -if (GETPOST("button_removefilter")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $description=""; $type=""; From fa89e310aeca7d0ffe303d470ba0cebe2f3f34df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 09:53:19 +0100 Subject: [PATCH 0202/1060] Update /compta/paiement/list.php --- htdocs/compta/paiement/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/paiement/list.php b/htdocs/compta/paiement/list.php index 65615b9bbf3..c7fd426babf 100644 --- a/htdocs/compta/paiement/list.php +++ b/htdocs/compta/paiement/list.php @@ -58,7 +58,7 @@ $limit = $conf->liste_limit; if (! $sortorder) $sortorder="DESC"; if (! $sortfield) $sortfield="p.rowid"; -if (GETPOST("button_removefilter")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search_ref=""; $search_account=""; From 9b731753e75da978a10c6fcbb3669ec02df1e244 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 09:54:17 +0100 Subject: [PATCH 0203/1060] Update /compta/salaries/index.php --- htdocs/compta/salaries/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/salaries/index.php b/htdocs/compta/salaries/index.php index 17c3efdbfaa..678b3bfaa2e 100644 --- a/htdocs/compta/salaries/index.php +++ b/htdocs/compta/salaries/index.php @@ -64,7 +64,7 @@ else $typeid=$_REQUEST['typeid']; } -if (GETPOST("button_removefilter")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search_ref=""; $search_label=""; From ccff0f09528dc8c79b6f75372a0ca9d212942737 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 09:55:13 +0100 Subject: [PATCH 0204/1060] Update /compta/facture/list.php --- htdocs/compta/facture/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php index ba27f5659a9..56bd57c725a 100644 --- a/htdocs/compta/facture/list.php +++ b/htdocs/compta/facture/list.php @@ -111,7 +111,7 @@ $reshook=$hookmanager->executeHooks('doActions',$parameters,$object,$action); if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); // Do we click on purge search criteria ? -if (GETPOST("button_removefilter_x")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search_categ=''; $search_user=''; From 339415034e1f84222ca5936a85fa68a3bfd43a48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 09:57:21 +0100 Subject: [PATCH 0205/1060] Update /compta/facture/impayees.php --- htdocs/compta/facture/impayees.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/facture/impayees.php b/htdocs/compta/facture/impayees.php index c762aac5702..a010e7d7401 100644 --- a/htdocs/compta/facture/impayees.php +++ b/htdocs/compta/facture/impayees.php @@ -374,7 +374,7 @@ $search_montant_ttc = GETPOST("search_montant_ttc"); $late = GETPOST("late"); // Do we click on purge search criteria ? -if (GETPOST("button_removefilter_x")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search_ref=''; $search_refcustomer=''; From b6824877e5ee295285cae8acd027ae6476f95b73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 09:58:19 +0100 Subject: [PATCH 0206/1060] Update /accountancy/admin/account.php --- htdocs/accountancy/admin/account.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/accountancy/admin/account.php b/htdocs/accountancy/admin/account.php index 36739254d06..0c2a825604b 100644 --- a/htdocs/accountancy/admin/account.php +++ b/htdocs/accountancy/admin/account.php @@ -88,7 +88,7 @@ if ($action == 'disable') { } } -if (GETPOST("button_removefilter")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search_account=""; $search_label=""; @@ -220,4 +220,4 @@ if ($result) { } llxFooter(); -$db->close(); \ No newline at end of file +$db->close(); From 199239ac8b8f0f2f7f90e9997aeccb47cea000b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 09:59:05 +0100 Subject: [PATCH 0207/1060] Update /accountancy/bookeeping/list.php --- htdocs/accountancy/bookkeeping/list.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/accountancy/bookkeeping/list.php b/htdocs/accountancy/bookkeeping/list.php index 21da5bacbb9..b2acc60fb6a 100644 --- a/htdocs/accountancy/bookkeeping/list.php +++ b/htdocs/accountancy/bookkeeping/list.php @@ -51,7 +51,7 @@ $offset = $conf->liste_limit * $page; $formventilation = new FormVentilation($db); -if (GETPOST("button_removefilter")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search_doc_type=""; $search_doc_ref=""; @@ -231,4 +231,4 @@ else { } llxFooter(); -$db->close(); \ No newline at end of file +$db->close(); From 627e3e0a2b7489fb0b01af6e5fedc383d4664b94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 10:00:09 +0100 Subject: [PATCH 0208/1060] Update /comm/actions/listactions.php --- htdocs/comm/action/listactions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/comm/action/listactions.php b/htdocs/comm/action/listactions.php index 53243d0c165..245902013a1 100644 --- a/htdocs/comm/action/listactions.php +++ b/htdocs/comm/action/listactions.php @@ -100,7 +100,7 @@ if (! $user->rights->agenda->allactions->read || $filter=='mine') // If no permi } // Purge search criteria -if (GETPOST("button_removefilter")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $datestart=''; $dateend=''; From 01e6d9fc1253416fe281a2a38b069a7dfe3c5184 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 10:01:07 +0100 Subject: [PATCH 0209/1060] Update /comm/prospect/list.php --- htdocs/comm/prospect/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/comm/prospect/list.php b/htdocs/comm/prospect/list.php index 113618ffae8..3501d94aafd 100644 --- a/htdocs/comm/prospect/list.php +++ b/htdocs/comm/prospect/list.php @@ -154,7 +154,7 @@ $sts = array(-1,0,1,2,3); $hookmanager->initHooks(array('prospectlist')); // Do we click on purge search criteria ? -if (GETPOST("button_removefilter_x")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $socname=""; $stcomm=""; From 99e88c16c4c9d207bd11143a67f36aaec15dffcf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 10:02:16 +0100 Subject: [PATCH 0210/1060] Update /product/stock/mouvement.php --- htdocs/product/stock/mouvement.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/product/stock/mouvement.php b/htdocs/product/stock/mouvement.php index 06e089c5209..83d856ed0cc 100644 --- a/htdocs/product/stock/mouvement.php +++ b/htdocs/product/stock/mouvement.php @@ -60,7 +60,7 @@ $offset = $conf->liste_limit * $page; if (! $sortfield) $sortfield="m.datem"; if (! $sortorder) $sortorder="DESC"; -if (GETPOST("button_removefilter")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $year=''; $month=''; From afc87f54458bb248f50d1ae67a434ce72099b319 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 10:03:03 +0100 Subject: [PATCH 0211/1060] Update /fourn/commande/list.php --- htdocs/fourn/commande/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/fourn/commande/list.php b/htdocs/fourn/commande/list.php index ab0fd08d3f0..6affbae3045 100644 --- a/htdocs/fourn/commande/list.php +++ b/htdocs/fourn/commande/list.php @@ -58,7 +58,7 @@ if ($user->societe_id) $socid=$user->societe_id; $result = restrictedArea($user, 'fournisseur', $orderid, '', 'commande'); // Purge search criteria -if (GETPOST("button_removefilter")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search_ref=''; $search_refsupp=''; From 0384f90607cfe746bc4a0b2f41e534c7401c58d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 10:04:43 +0100 Subject: [PATCH 0212/1060] Update /fourn/facture/paiement.php --- htdocs/fourn/facture/paiement.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/fourn/facture/paiement.php b/htdocs/fourn/facture/paiement.php index 57100bd98f0..65428cd138e 100644 --- a/htdocs/fourn/facture/paiement.php +++ b/htdocs/fourn/facture/paiement.php @@ -459,7 +459,7 @@ if (empty($action)) $search_amount=GETPOST('search_amount'); $search_company=GETPOST('search_company'); - if (GETPOST("button_removefilter")) + if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search_ref=""; $search_account=""; From ba7500a5045d759ec7db1f3bbb05a5466a30b99f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 10:05:40 +0100 Subject: [PATCH 0213/1060] Update /fourn/facture/impayees.php --- htdocs/fourn/facture/impayees.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/fourn/facture/impayees.php b/htdocs/fourn/facture/impayees.php index 2767c792f9e..83d4b830c5f 100644 --- a/htdocs/fourn/facture/impayees.php +++ b/htdocs/fourn/facture/impayees.php @@ -64,7 +64,7 @@ $pagenext = $page + 1; if (! $sortfield) $sortfield="f.date_lim_reglement"; if (! $sortorder) $sortorder="ASC"; -if (GETPOST("button_removefilter")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search_ref=""; $search_ref_supplier=""; From 979d6dffa2b8c008556f1e85ce7fc762be615de9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 10:06:40 +0100 Subject: [PATCH 0214/1060] Update /compta/paiement/cheque/list.php --- htdocs/compta/paiement/cheque/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/paiement/cheque/list.php b/htdocs/compta/paiement/cheque/list.php index 47a6ee8ba74..fdfe86ec178 100644 --- a/htdocs/compta/paiement/cheque/list.php +++ b/htdocs/compta/paiement/cheque/list.php @@ -61,7 +61,7 @@ $checkdepositstatic=new RemiseCheque($db); $accountstatic=new Account($db); // If click on purge search criteria ? -if (GETPOST("button_removefilter_x")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search_ref=''; $search_amount=''; From 6d2e024d527210cdaab9e9db0a72bd37f92c2810 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 23 Nov 2014 17:53:44 +0100 Subject: [PATCH 0215/1060] Doxygen --- htdocs/compta/bank/class/account.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/bank/class/account.class.php b/htdocs/compta/bank/class/account.class.php index 978fc2b3838..4343e2cb921 100644 --- a/htdocs/compta/bank/class/account.class.php +++ b/htdocs/compta/bank/class/account.class.php @@ -220,7 +220,7 @@ class Account extends CommonObject /** * Add an entry into table ".MAIN_DB_PREFIX."bank * - * @param timsestmap $date Date operation + * @param timestamp $date Date operation * @param string $oper 1,2,3,4... (deprecated) or TYP,VIR,PRE,LIQ,VAD,CB,CHQ... * @param string $label Descripton * @param float $amount Amount From 6cc79c2dd7d6012dde8b488cf1c32ecc6c65f5a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 18:42:48 +0100 Subject: [PATCH 0216/1060] Put label into div --- htdocs/main.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index c8553f29291..cf01d5d0364 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -1810,13 +1810,13 @@ function printSearchForm($urlaction,$urlobject,$title,$htmlmodesearch,$htmlinput $ret=''; $ret.='
'; - $ret.=''; + $ret.='

'; $ret.=''; $ret.=''; $ret.=''; From aa4f16ce9931dfcd09b0383a475c602208264783 Mon Sep 17 00:00:00 2001 From: aspangaro Date: Sun, 23 Nov 2014 21:02:49 +0100 Subject: [PATCH 0217/1060] Add resource language file in transifex --- .tx/config | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.tx/config b/.tx/config index c20f75769ae..d6e339462e3 100644 --- a/.tx/config +++ b/.tx/config @@ -260,6 +260,12 @@ source_file = htdocs/langs/en_US/propal.lang source_lang = en_US type = MOZILLAPROPERTIES +[dolibarr.resource] +file_filter = htdocs/langs//resource.lang +source_file = htdocs/langs/en_US/resource.lang +source_lang = en_US +type = MOZILLAPROPERTIES + [dolibarr.salaries] file_filter = htdocs/langs//salaries.lang source_file = htdocs/langs/en_US/salaries.lang From aa8c165f065d1ed5cc801db6c796c41ddb7b1541 Mon Sep 17 00:00:00 2001 From: aspangaro Date: Sun, 23 Nov 2014 21:03:34 +0100 Subject: [PATCH 0218/1060] Presentation --- htdocs/core/tpl/resource_view.tpl.php | 13 +++-- htdocs/resource/add.php | 82 +++++++++++++++------------ htdocs/resource/card.php | 8 +-- htdocs/resource/element_resource.php | 13 ++--- htdocs/resource/list.php | 18 +++--- 5 files changed, 75 insertions(+), 59 deletions(-) diff --git a/htdocs/core/tpl/resource_view.tpl.php b/htdocs/core/tpl/resource_view.tpl.php index ef2963b28c1..d57b66cc331 100644 --- a/htdocs/core/tpl/resource_view.tpl.php +++ b/htdocs/core/tpl/resource_view.tpl.php @@ -32,7 +32,7 @@ if( (array) $linked_resources && count($linked_resources) > 0) print '
'.$langs->trans('Resource').'
'; print '
'.$langs->trans('Busy').'
'; print '
'.$langs->trans('Mandatory').'
'; - print '
'.$langs->trans('Edit').'
'; + print '
'.$langs->trans('Action').'
'; print ''; //print ''; @@ -86,8 +86,13 @@ if( (array) $linked_resources && count($linked_resources) > 0) print ''; print ''; print ''; @@ -105,4 +110,4 @@ else { print '
'.$langs->trans('NoResourceLinked').'
'; } -// FIN DU TPL +// FIN DU TPL \ No newline at end of file diff --git a/htdocs/resource/add.php b/htdocs/resource/add.php index fde152b6185..679644ac9e0 100644 --- a/htdocs/resource/add.php +++ b/htdocs/resource/add.php @@ -32,7 +32,7 @@ if (! $res) die("Include of main fails"); require_once 'class/resource.class.php'; require_once 'class/html.formresource.class.php'; -// Load traductions files requiredby by page +// Load traductions files required by page $langs->load("resource"); $langs->load("companies"); $langs->load("other"); @@ -41,6 +41,7 @@ $langs->load("resource@resource"); // Get parameters $id = GETPOST('id','int'); $action = GETPOST('action','alpha'); +$cancel = GETPOST('cancel','alpha'); if (empty($sortorder)) $sortorder="DESC"; if (empty($sortfield)) $sortfield="t.rowid"; if (empty($arch)) $arch = 0; @@ -65,57 +66,64 @@ $object = new Resource($db); if ($action == 'confirm_add_resource') { - $error=''; - - $ref=GETPOST('ref','alpha'); - $description=GETPOST('description','alpha'); - $fk_code_type_resource=GETPOST('fk_code_type_resource','alpha'); - - if (empty($ref)) + if (! $cancel) { - $mesg=$langs->trans("ErrorFieldRequired",$langs->transnoentities("Ref")); - setEventMessage($mesg, 'errors'); - $error++; - } - - if (! $error) - { - $object=new Resource($db); - $object->ref=$ref; - $object->description=$description; - $object->fk_code_type_resource=$fk_code_type_resource; + $error=''; - $result=$object->create($user); - if ($result > 0) + $ref=GETPOST('ref','alpha'); + $description=GETPOST('description','alpha'); + $fk_code_type_resource=GETPOST('fk_code_type_resource','alpha'); + + if (empty($ref)) { - // Creation OK - $db->commit(); - setEventMessage($langs->trans('ResourceCreatedWithSuccess')); - Header("Location: card.php?id=" . $object->id); - return; + $mesg=$langs->trans("ErrorFieldRequired",$langs->transnoentities("Ref")); + setEventMessage($mesg, 'errors'); + $error++; + } + + if (! $error) + { + $object=new Resource($db); + $object->ref=$ref; + $object->description=$description; + $object->fk_code_type_resource=$fk_code_type_resource; + + $result=$object->create($user); + if ($result > 0) + { + // Creation OK + $db->commit(); + setEventMessage($langs->trans('ResourceCreatedWithSuccess')); + Header("Location: card.php?id=" . $object->id); + return; + } + else + { + // Creation KO + setEventMessage($object->error, 'errors'); + $action = ''; + } } else { - // Creation KO - setEventMessage($object->error, 'errors'); $action = ''; } } else { - $action = ''; + Header("Location: list.php"); } } -/*************************************************** -* VIEW -* -****************************************************/ +/* + * View + * + */ $form=new Form($db); $formresource = new FormResource($db); -if ( !$action ) +if (! $action) { $pagetitle=$langs->trans('AddResource'); llxHeader('',$pagetitle,''); @@ -161,8 +169,10 @@ if ( !$action ) print ''; - echo '
', - ' ', + echo '
', + '', + ' ', + '', '
'; print ''; diff --git a/htdocs/resource/card.php b/htdocs/resource/card.php index b2ee3ae1814..33a27796aaf 100644 --- a/htdocs/resource/card.php +++ b/htdocs/resource/card.php @@ -139,7 +139,7 @@ if ( $object->fetch($id) > 0 ) /*--------------------------------------- * Edit object - */ + */ print '
'; print ''; print ''; @@ -171,7 +171,7 @@ if ( $object->fetch($id) > 0 ) } else { - // Confirmation suppression resource line + // Confirm deleting resource line if ($action == 'delete') { print $form->formconfirm("card.php?&id=".$id,$langs->trans("DeleteResource"),$langs->trans("ConfirmDeleteResource"),"confirm_delete_resource",'','',1); @@ -228,9 +228,9 @@ if ( $object->fetch($id) > 0 ) print '
'; } } - if ($action != "delete" ) + if ($action != "delete" && $action != "edit") { - // Edit resource + // Delete resource if($user->rights->resource->delete) { print '
'; diff --git a/htdocs/resource/element_resource.php b/htdocs/resource/element_resource.php index 02a24735454..d50c9a4ec6f 100644 --- a/htdocs/resource/element_resource.php +++ b/htdocs/resource/element_resource.php @@ -1,6 +1,5 @@ +/* Copyright (C) 2013 Jean-François Ferry * * 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 @@ -32,7 +31,7 @@ require 'class/resource.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; // Load traductions files requiredby by page -$langs->load("resource@resource"); +$langs->load("resource"); $langs->load("other"); // Get parameters @@ -70,8 +69,9 @@ $resource_id = GETPOST('fk_resource','int'); $resource_type = GETPOST('resource_type','alpha'); $busy = GETPOST('busy','int'); $mandatory = GETPOST('mandatory','int'); +$cancel = GETPOST('cancel','alpha'); -if($action == 'add_element_resource' && !GETPOST('cancel')) +if($action == 'add_element_resource' && ! $cancel) { $objstat = fetchObjectByElement($element_id,$element); $res = $objstat->add_element_resource($resource_id,$resource_type,$busy,$mandatory); @@ -251,9 +251,6 @@ else foreach ($object->available_resources as $modresources => $resources) { - $langs->load($resources); - //print '

'.$modresources.'

'; - $resources=(array) $resources; // To be sure $resources is an array foreach($resources as $resource_obj) { @@ -301,7 +298,7 @@ else { print '
'; print '
'; - print 'Add resource'; + print ''.$langs->trans('AddResource').''; print '
'; print '
'; } diff --git a/htdocs/resource/list.php b/htdocs/resource/list.php index 9a0fca19781..ab70bc9a338 100644 --- a/htdocs/resource/list.php +++ b/htdocs/resource/list.php @@ -1,6 +1,5 @@ +/* Copyright (C) 2013-2014 Jean-François Ferry * * 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 @@ -116,7 +115,7 @@ else print_liste_field_titre($langs->trans('Id'),$_SERVER['PHP_SELF'],'t.rowid','',$param,'',$sortfield,$sortorder); print_liste_field_titre($langs->trans('Ref'),$_SERVER['PHP_SELF'],'t.ref','',$param,'',$sortfield,$sortorder); print_liste_field_titre($langs->trans('ResourceType'),$_SERVER['PHP_SELF'],'ty.code','',$param,'',$sortfield,$sortorder); - print_liste_field_titre($langs->trans('Edit')); + print_liste_field_titre($langs->trans('Action'),"","","","",'width="60" align="center"',"",""); print ''; foreach ($object->lines as $resource) @@ -128,7 +127,7 @@ else $style='style="background: orange;"'; print ''; - print $resource->id; + print ''.$resource->id.''; print ''; print ''; @@ -139,9 +138,14 @@ else print $resource->type_label; print ''; - print ''; - print ''.$langs->trans('View').' '; - print ''.$langs->trans('Edit').''; + print ''; + print ''; + print img_edit(); + print ''; + print ' '; + print ''; + print img_delete(); + print ''; print ''; print ''; From bbdd25f97cde68b4ad46a2f2f268ddd3eee08f6c Mon Sep 17 00:00:00 2001 From: aspangaro Date: Sun, 23 Nov 2014 21:37:45 +0100 Subject: [PATCH 0219/1060] Add function purge criteria in project module --- htdocs/projet/list.php | 14 ++++++++++++-- htdocs/projet/tasks/index.php | 13 ++++++++++--- 2 files changed, 22 insertions(+), 5 deletions(-) diff --git a/htdocs/projet/list.php b/htdocs/projet/list.php index b4260e8ea91..614f91468cc 100644 --- a/htdocs/projet/list.php +++ b/htdocs/projet/list.php @@ -63,6 +63,14 @@ $search_label=GETPOST("search_label"); $search_societe=GETPOST("search_societe"); $search_all=GETPOST("search_all"); +// Purge criteria +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers +{ + $search_ref=""; + $search_label=""; + $search_societe=""; + $search_all=0; +} /* * View @@ -147,8 +155,10 @@ if ($resql) print ''; print ''; print ' '; - print ''; - print "\n"; + print ''; + print ''; + print ''; + print ''; while ($i < $num) { diff --git a/htdocs/projet/tasks/index.php b/htdocs/projet/tasks/index.php index cdf90a918a3..4354fc23b2c 100644 --- a/htdocs/projet/tasks/index.php +++ b/htdocs/projet/tasks/index.php @@ -51,7 +51,13 @@ $page = $page == -1 ? 0 : $page; $mine = $_REQUEST['mode']=='mine' ? 1 : 0; - +// Purge criteria +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers +{ + $search_project=""; + $search_status=""; +} +if (empty($search_status)) $search_status=1; /* * View @@ -122,9 +128,10 @@ print $form->selectarray('search_status', $listofstatus, $search_status); print ''; print ''; print ' '; +print ''; +print ''; +print ''; print ''; -print ''; -print "\n"; if (count($tasksarray) > (empty($conf->global->PROJECT_LIMIT_TASK_PROJECT_AREA)?1000:$conf->global->PROJECT_LIMIT_TASK_PROJECT_AREA)) { From 7a18240d2f8f97eae9ac0d6c0c5a777171185b57 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 23 Nov 2014 23:22:49 +0100 Subject: [PATCH 0220/1060] Doxygen --- htdocs/core/class/infobox.class.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/htdocs/core/class/infobox.class.php b/htdocs/core/class/infobox.class.php index ab26ee68317..14d1bec0841 100644 --- a/htdocs/core/class/infobox.class.php +++ b/htdocs/core/class/infobox.class.php @@ -40,14 +40,14 @@ class InfoBox /** * Return array of boxes qualified for area and user * - * @param DoliDB $db Database handler - * @param string $mode 'available' or 'activated' - * @param string $zone Name or area (-1 for all, 0 for Homepage, 1 for xxx, ...) - * @param User $user Object user to filter - * @param array $excludelist Array of box id (box.box_id = boxes_def.rowid) to exclude - * @return array Array of boxes + * @param DoliDB $db Database handler + * @param string $mode 'available' or 'activated' + * @param string $zone Name or area (-1 for all, 0 for Homepage, 1 for xxx, ...) + * @param User|null $user Object user to filter + * @param array $excludelist Array of box id (box.box_id = boxes_def.rowid) to exclude + * @return array Array of boxes */ - static function listBoxes($db, $mode, $zone, $user, $excludelist=array()) + static function listBoxes($db, $mode, $zone, $user=null, $excludelist=array()) { global $conf; From 891e39189ab5df849d9626f5d369e51ccae09b91 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 23 Nov 2014 23:31:35 +0100 Subject: [PATCH 0221/1060] Fixed: missing css class --- htdocs/projet/tasks/time.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/htdocs/projet/tasks/time.php b/htdocs/projet/tasks/time.php index 676b17a5951..6e7ab74b941 100644 --- a/htdocs/projet/tasks/time.php +++ b/htdocs/projet/tasks/time.php @@ -296,22 +296,22 @@ if ($id > 0 || ! empty($ref)) print ''.$langs->trans("DateStart").''; print dol_print_date($object->date_start,'dayhour'); print ''; - + // Date end print ''.$langs->trans("DateEnd").''; print dol_print_date($object->date_end,'dayhour'); print ''; - + // Planned workload print ''.$langs->trans("PlannedWorkload").''; print convertSecondToTime($object->planned_workload,'allhourmin'); print ''; - + // Progress declared print ''.$langs->trans("ProgressDeclared").''; print $object->progress.' %'; print ''; - + // Progress calculated print ''.$langs->trans("ProgressCalculated").''; if ($object->planned_workload) @@ -322,7 +322,7 @@ if ($id > 0 || ! empty($ref)) } else print ''; print ''; - + // Project if (empty($withproject)) { @@ -400,11 +400,11 @@ if ($id > 0 || ! empty($ref)) // Contributor print ''; - print img_object('','user'); + print img_object('','user','class="hideonsmartphone"'); $contactsoftask=$object->getListContactId('internal'); if (count($contactsoftask)>0) { $userid=$contactsoftask[0]; - $form->select_users($userid,'userid',0,'',0,'',$contactsoftask); + print $form->select_dolusers($userid,'userid',0,'',0,'',$contactsoftask); }else { print img_error($langs->trans('FirstAddRessourceToAllocateTime')).$langs->trans('FirstAddRessourceToAllocateTime'); } @@ -506,7 +506,7 @@ if ($id > 0 || ! empty($ref)) $contactsoftask[]=$task_time->fk_user; } if (count($contactsoftask)>0) { - $form->select_users($task_time->fk_user,'userid_line',0,'',0,'',$contactsoftask); + print $form->select_dolusers($task_time->fk_user,'userid_line',0,'',0,'',$contactsoftask); }else { print img_error($langs->trans('FirstAddRessourceToAllocateTime')).$langs->trans('FirstAddRessourceToAllocateTime'); } From 6159591a02bfa0f27b6721c8e4a12a1a4fcdec52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 23 Nov 2014 17:24:37 +0100 Subject: [PATCH 0222/1060] Fixed [ bug #1679 ] Can't sort groups by user count in user groups list --- htdocs/user/group/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/user/group/index.php b/htdocs/user/group/index.php index 00af5b0e6d2..1f06fa3a3c2 100644 --- a/htdocs/user/group/index.php +++ b/htdocs/user/group/index.php @@ -91,7 +91,7 @@ if ($resql) { print_liste_field_titre($langs->trans("Entity"),$_SERVER["PHP_SELF"],"g.entity",$param,"",'align="center"',$sortfield,$sortorder); } - print_liste_field_titre($langs->trans("NbOfUsers"),$_SERVER["PHP_SELF"],"g.nb",$param,"",'align="center"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("NbOfUsers"),$_SERVER["PHP_SELF"],"nb",$param,"",'align="center"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("DateCreation"),$_SERVER["PHP_SELF"],"g.datec",$param,"",'align="right"',$sortfield,$sortorder); print "\n"; $var=True; From 601710a4dcc9751ff6ed79e53beec0296bcbefa7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Mon, 24 Nov 2014 01:05:01 +0100 Subject: [PATCH 0223/1060] Highlight of required fields should be only in edit mode Conflicts: htdocs/bookmarks/card.php --- htdocs/bookmarks/card.php | 34 +++++++++++++++++++++++++++------- 1 file changed, 27 insertions(+), 7 deletions(-) diff --git a/htdocs/bookmarks/card.php b/htdocs/bookmarks/card.php index 640e7e72c57..d31a507ad6f 100644 --- a/htdocs/bookmarks/card.php +++ b/htdocs/bookmarks/card.php @@ -1,6 +1,7 @@ * Copyright (C) 2005-2013 Laurent Destailleur + * Copyright (C) 2014 Marcos García * * 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 @@ -150,11 +151,11 @@ if ($action == 'create') print ''."\n"; print ''; print ''; - + print_fiche_titre($langs->trans("NewBookmark")); dol_fiche_head($head, $hselected, $langs->trans("Bookmark"),0,'bookmark'); - + print ''; print ''; @@ -176,14 +177,14 @@ if ($action == 'create') print ''; print '
'.$langs->trans("BookmarkTitle").''.$langs->trans("SetHereATitleForLink").'
 

'; - + print '
'; print '   '; print ''; print '
'; print ''; - + dol_fiche_end(); } @@ -213,12 +214,31 @@ if ($id > 0 && ! preg_match('/^add/i',$action)) print ''.$langs->trans("Ref").''.$bookmark->ref.''; - print ''.$langs->trans("BookmarkTitle").''; + print ''; + if ($action == 'edit') { + print ''; + } + + print $langs->trans("BookmarkTitle"); + + if ($action == 'edit') { + print ''; + } + + print ''; if ($action == 'edit') print 'title).'">'; else print $bookmark->title; print ''; - print ''.$langs->trans("UrlOrLink").''; + print ''; + if ($action == 'edit') { + print ''; + } + print $langs->trans("UrlOrLink"); + if ($action == 'edit') { + print ''; + } + print ''; if ($action == 'edit') print 'url).'">'; else print 'target?' target="_blank"':'').'>'.$bookmark->url.''; print ''; @@ -268,7 +288,7 @@ if ($id > 0 && ! preg_match('/^add/i',$action)) print ''; if ($action == 'edit') print '
   
'; - + if ($action == 'edit') print ''; dol_fiche_end(); From 6304895d75afcfb6069f3c3232e60ed77398daf0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 23 Nov 2014 17:03:25 +0100 Subject: [PATCH 0224/1060] Fixed typo --- htdocs/bookmarks/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/bookmarks/list.php b/htdocs/bookmarks/list.php index a22b24388b1..748a4d9b7fa 100644 --- a/htdocs/bookmarks/list.php +++ b/htdocs/bookmarks/list.php @@ -59,7 +59,7 @@ if ($_GET["action"] == 'delete') } else { - $setEventMessage($bookmark->error, 'errors'); + setEventMessage($bookmark->error, 'errors'); } } From 3ab8cff641394f8dcfd710e47fb78d5e2ec2b4b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 23 Nov 2014 17:06:51 +0100 Subject: [PATCH 0225/1060] Removed unused action of card.php --- htdocs/bookmarks/card.php | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/htdocs/bookmarks/card.php b/htdocs/bookmarks/card.php index d31a507ad6f..6da8eba7557 100644 --- a/htdocs/bookmarks/card.php +++ b/htdocs/bookmarks/card.php @@ -111,28 +111,6 @@ if ($action == 'add' || $action == 'addproduct' || $action == 'update') } } -if ($action == 'delete') -{ - $bookmark=new Bookmark($db); - $bookmark->id=$_GET["bid"]; - $bookmark->url=$user->id; - $bookmark->target=$user->id; - $bookmark->title='xxx'; - $bookmark->favicon='xxx'; - - $res=$bookmark->remove(); - if ($res > 0) - { - header("Location: ".$_SERVER["PHP_SELF"]); - exit; - } - else - { - setEventMessage($bookmark->error, 'errors'); - } -} - - /* * View */ From 29bfe7050d83dbf3988caf1e91b9ac10e217d3db Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 24 Nov 2014 01:11:30 +0100 Subject: [PATCH 0226/1060] Fix: W3C. --- htdocs/bookmarks/card.php | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/htdocs/bookmarks/card.php b/htdocs/bookmarks/card.php index 6da8eba7557..5e47dfceae4 100644 --- a/htdocs/bookmarks/card.php +++ b/htdocs/bookmarks/card.php @@ -154,7 +154,9 @@ if ($action == 'create') print 'position).'">'; print ' '; - print '
'; + print ''; + + dol_fiche_end(); print '
'; print '   '; @@ -162,8 +164,6 @@ if ($action == 'create') print '
'; print ''; - - dol_fiche_end(); } @@ -176,8 +176,6 @@ if ($id > 0 && ! preg_match('/^add/i',$action)) $bookmark->fetch($id); - dol_fiche_head($head, $hselected, $langs->trans("Bookmark"),0,'bookmark'); - if ($action == 'edit') { print '
'; @@ -188,6 +186,8 @@ if ($id > 0 && ! preg_match('/^add/i',$action)) print ''; } + dol_fiche_head($head, $hselected, $langs->trans("Bookmark"),0,'bookmark'); + print ''; print ''; @@ -265,12 +265,14 @@ if ($id > 0 && ! preg_match('/^add/i',$action)) print '
'.$langs->trans("Ref").''.$bookmark->ref.'
'; - if ($action == 'edit') print '
   
'; - - if ($action == 'edit') print '
'; - dol_fiche_end(); + if ($action == 'edit') + { + print '
   
'; + print ''; + } + print "
\n"; From bc1d88d324fe41b0abf449ff73ca3691cc12c14a Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 24 Nov 2014 01:16:26 +0100 Subject: [PATCH 0227/1060] Fixed: The visualization of status with mutualized picto was lost, so i restore old feature to keep same visual for all status and add hidden option to switch to new. --- htdocs/product/card.php | 6 +++--- htdocs/product/list.php | 4 ++-- htdocs/product/stock/product.php | 6 +++--- htdocs/societe/soc.php | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/htdocs/product/card.php b/htdocs/product/card.php index 92d588d19fe..529f812d8c4 100644 --- a/htdocs/product/card.php +++ b/htdocs/product/card.php @@ -1419,7 +1419,7 @@ else // Status (to sell) print ''.$langs->trans("Status").' ('.$langs->trans("Sell").')'; - if (! empty($conf->use_javascript_ajax) && $user->rights->produit->creer) { + if (! empty($conf->use_javascript_ajax) && $user->rights->produit->creer && ! empty($conf->global->MAIN_DIRECT_STATUS_UPDATE)) { print ajax_object_onoff($object, 'status', 'tosell', 'ProductStatusOnSell', 'ProductStatusNotOnSell'); } else { print $object->getLibStatut(2,0); @@ -1428,7 +1428,7 @@ else // Status (to buy) print ''.$langs->trans("Status").' ('.$langs->trans("Buy").')'; - if (! empty($conf->use_javascript_ajax) && $user->rights->produit->creer) { + if (! empty($conf->use_javascript_ajax) && $user->rights->produit->creer && ! empty($conf->global->MAIN_DIRECT_STATUS_UPDATE)) { print ajax_object_onoff($object, 'status_buy', 'tobuy', 'ProductStatusOnBuy', 'ProductStatusNotOnBuy'); } else { print $object->getLibStatut(2,1); @@ -1438,7 +1438,7 @@ else // Batch number management (to batch) if ($conf->productbatch->enabled) { print ''.$langs->trans("Status").' ('.$langs->trans("Lot").')'; - if (! empty($conf->use_javascript_ajax) && $user->rights->produit->creer) { + if (! empty($conf->use_javascript_ajax) && $user->rights->produit->creer && ! empty($conf->global->MAIN_DIRECT_STATUS_UPDATE)) { print ajax_object_onoff($object, 'status_batch', 'tobatch', 'ProductStatusOnBatch', 'ProductStatusNotOnBatch'); } else { print $object->getLibStatut(2,2); diff --git a/htdocs/product/list.php b/htdocs/product/list.php index 907181634ee..a5cc97defa7 100644 --- a/htdocs/product/list.php +++ b/htdocs/product/list.php @@ -511,7 +511,7 @@ else $product_static->status = $objp->tosell; // Status (to sell) print ''; - if (! empty($conf->use_javascript_ajax) && $user->rights->produit->creer) { + if (! empty($conf->use_javascript_ajax) && $user->rights->produit->creer && ! empty($conf->global->MAIN_DIRECT_STATUS_UPDATE)) { print ajax_object_onoff($product_static, 'status', 'tosell', 'ProductStatusOnSell', 'ProductStatusNotOnSell'); } else { print $product_static->LibStatut($objp->tosell,5,0); @@ -520,7 +520,7 @@ else // Status (to buy) print ''; - if (! empty($conf->use_javascript_ajax) && $user->rights->produit->creer) { + if (! empty($conf->use_javascript_ajax) && $user->rights->produit->creer && ! empty($conf->global->MAIN_DIRECT_STATUS_UPDATE)) { print ajax_object_onoff($product_static, 'status_buy', 'tobuy', 'ProductStatusOnBuy', 'ProductStatusNotOnBuy'); } else { print $product_static->LibStatut($objp->tobuy,5,1); diff --git a/htdocs/product/stock/product.php b/htdocs/product/stock/product.php index 96ecdb1d95d..5bd7999e2e3 100644 --- a/htdocs/product/stock/product.php +++ b/htdocs/product/stock/product.php @@ -279,7 +279,7 @@ if ($id > 0 || $ref) // Status (to sell) print ''.$langs->trans("Status").' ('.$langs->trans("Sell").')'; - if (! empty($conf->use_javascript_ajax) && $user->rights->produit->creer) { + if (! empty($conf->use_javascript_ajax) && $user->rights->produit->creer && ! empty($conf->global->MAIN_DIRECT_STATUS_UPDATE)) { print ajax_object_onoff($product, 'status', 'tosell', 'ProductStatusOnSell', 'ProductStatusNotOnSell'); } else { print $product->getLibStatut(2,0); @@ -288,7 +288,7 @@ if ($id > 0 || $ref) // Status (to buy) print ''.$langs->trans("Status").' ('.$langs->trans("Buy").')'; - if (! empty($conf->use_javascript_ajax) && $user->rights->produit->creer) { + if (! empty($conf->use_javascript_ajax) && $user->rights->produit->creer && ! empty($conf->global->MAIN_DIRECT_STATUS_UPDATE)) { print ajax_object_onoff($product, 'status_buy', 'tobuy', 'ProductStatusOnBuy', 'ProductStatusNotOnBuy'); } else { print $product->getLibStatut(2,1); @@ -340,7 +340,7 @@ if ($id > 0 || $ref) } print ''; print ''; - + print ''; $text_stock_options = ''; $text_stock_options.= (! empty($conf->global->STOCK_CALCULATE_ON_SHIPMENT)?$langs->trans("DeStockOnShipment").'
':''); diff --git a/htdocs/societe/soc.php b/htdocs/societe/soc.php index 62869daf366..701efe742eb 100644 --- a/htdocs/societe/soc.php +++ b/htdocs/societe/soc.php @@ -1727,7 +1727,7 @@ else // Status print ''.$langs->trans("Status").''; print ''; - if (! empty($conf->use_javascript_ajax) && $user->rights->societe->creer) { + if (! empty($conf->use_javascript_ajax) && $user->rights->societe->creer && ! empty($conf->global->MAIN_DIRECT_STATUS_UPDATE)) { print ajax_object_onoff($object, 'status', 'status', 'InActivity', 'ActivityCeased'); } else { print $object->getLibStatut(2); From ef991e6c5dff769ca1eb5e776df956971d2ea1b7 Mon Sep 17 00:00:00 2001 From: aspangaro Date: Mon, 24 Nov 2014 06:43:15 +0100 Subject: [PATCH 0228/1060] HTML5 -
is deprecated - Need CSS - continue working --- htdocs/product/price.php | 21 +++++++++++++++------ htdocs/product/stock/card.php | 11 ++++++++--- htdocs/product/stock/mouvement.php | 17 ++++++++++++----- htdocs/product/stock/product.php | 14 ++++++++++---- htdocs/product/traduction.php | 16 ++++++++++------ htdocs/projet/card.php | 4 ++-- htdocs/projet/tasks/task.php | 7 ++++--- htdocs/public/demo/index.php | 2 +- htdocs/public/members/new.php | 12 ++++++------ htdocs/public/paybox/newpayment.php | 4 ++-- htdocs/public/paypal/newpayment.php | 4 ++-- htdocs/societe/checkvat/checkVatPopup.php | 2 +- htdocs/societe/price.php | 14 ++++++++++---- htdocs/societe/rib.php | 16 ++++++++++------ htdocs/societe/soc.php | 10 +++++----- htdocs/user/agenda_extsites.php | 4 ++-- htdocs/user/card.php | 8 ++++---- htdocs/user/clicktodial.php | 6 +++--- htdocs/user/group/card.php | 4 ++-- htdocs/user/note.php | 6 +++--- htdocs/user/param_ihm.php | 6 +++--- htdocs/webservices/admin/webservices.php | 4 ++-- 22 files changed, 117 insertions(+), 75 deletions(-) diff --git a/htdocs/product/price.php b/htdocs/product/price.php index 3ff496356a8..bfd0b91fc5f 100644 --- a/htdocs/product/price.php +++ b/htdocs/product/price.php @@ -669,8 +669,11 @@ if ($action == 'edit_price' && ($user->rights->produit->creer || $user->rights-> print ''; - print '

 '; - print '
'; + print '
'; + print ''; + print '     '; + print ''; + print '
'; print '
'; } else { @@ -930,8 +933,11 @@ if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)) { print ''; - print '

 '; - print '
'; + print '
'; + print ''; + print '     '; + print ''; + print '
'; print '
'; } elseif ($action == 'edit_customer_price') { @@ -1012,8 +1018,11 @@ if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)) { print ''; - print '

 '; - print '
'; + print '
'; + print ''; + print '     '; + print ''; + print '
'; print '
'; } elseif ($action == 'showlog_customer_price') { diff --git a/htdocs/product/stock/card.php b/htdocs/product/stock/card.php index 051a0575aaa..74cb33e02e7 100644 --- a/htdocs/product/stock/card.php +++ b/htdocs/product/stock/card.php @@ -206,7 +206,9 @@ if ($action == 'create') print ''; - print '

'; + print '
'; + print ''; + print '
'; print ''; } @@ -538,8 +540,11 @@ else print ''; - print '

 '; - print '
'; + print '
'; + print ''; + print '     '; + print ''; + print '
'; print ''; diff --git a/htdocs/product/stock/mouvement.php b/htdocs/product/stock/mouvement.php index 83d856ed0cc..1bac6b9fef5 100644 --- a/htdocs/product/stock/mouvement.php +++ b/htdocs/product/stock/mouvement.php @@ -332,9 +332,13 @@ if ($resql) print ''; - print '
 '; - print '
'; - print ''; + print '
'; + print ''; + print '     '; + print ''; + print '
'; + + print ''; } /* @@ -370,8 +374,11 @@ if ($resql) print ''; - print '
 '; - print '
'; + print '
'; + print ''; + print '     '; + print ''; + print '
'; print ''; } diff --git a/htdocs/product/stock/product.php b/htdocs/product/stock/product.php index 96ecdb1d95d..a1a2b2be669 100644 --- a/htdocs/product/stock/product.php +++ b/htdocs/product/stock/product.php @@ -483,8 +483,11 @@ if ($id > 0 || $ref) } print ''; - print '
 '; - print '
'; + print '
'; + print ''; + print '     '; + print ''; + print '
'; print ''; } @@ -519,8 +522,11 @@ if ($id > 0 || $ref) print ''; - print '
 '; - print '
'; + print '
'; + print ''; + print '     '; + print ''; + print '
'; print ''; } diff --git a/htdocs/product/traduction.php b/htdocs/product/traduction.php index cd7e4cdcb3c..34b38fe8919 100644 --- a/htdocs/product/traduction.php +++ b/htdocs/product/traduction.php @@ -217,9 +217,11 @@ if ($action == 'edit') } } - print '
'; - print '     '; - print '
'; + print '
'; + print ''; + print '     '; + print ''; + print '
'; print ''; @@ -300,9 +302,11 @@ if ($action == 'add' && ($user->rights->produit->creer || $user->rights->service print ''; print ''; - print '
'; - print '     '; - print '
'; + print '
'; + print ''; + print '     '; + print ''; + print '
'; print ''; diff --git a/htdocs/projet/card.php b/htdocs/projet/card.php index f60d56cb633..e4e85345ec8 100644 --- a/htdocs/projet/card.php +++ b/htdocs/projet/card.php @@ -471,14 +471,14 @@ if ($action == 'create' && $user->rights->projet->creer) print ''; - print '
'; + print '
'; print ''; if (! empty($backtopage)) { print '     '; print ''; } - print '
'; + print '
'; print ''; diff --git a/htdocs/projet/tasks/task.php b/htdocs/projet/tasks/task.php index 73400bbcc6e..5d5c4f08e40 100644 --- a/htdocs/projet/tasks/task.php +++ b/htdocs/projet/tasks/task.php @@ -372,10 +372,11 @@ if ($id > 0 || ! empty($ref)) print ''; - print '

'; - print '   '; + print '
'; + print ''; + print '     '; print ''; - print '
'; + print '
'; print ''; } diff --git a/htdocs/public/demo/index.php b/htdocs/public/demo/index.php index 8ee00d83515..dba28538780 100644 --- a/htdocs/public/demo/index.php +++ b/htdocs/public/demo/index.php @@ -305,7 +305,7 @@ print "\n"; print ''; print '
'; -print '
Dolibarr logo

'; +print '
Dolibarr logo

'; print '
'; print $langs->trans("DemoDesc").'
'; diff --git a/htdocs/public/members/new.php b/htdocs/public/members/new.php index c8628bd26a0..bb218e4c0cf 100644 --- a/htdocs/public/members/new.php +++ b/htdocs/public/members/new.php @@ -110,9 +110,9 @@ function llxHeaderVierge($title, $head="", $disablejs=0, $disablehead=0, $arrayo { $urllogo=DOL_URL_ROOT.'/theme/dolibarr_logo.png'; } - print '
'; + print '
'; print 'Logo'; - print '

'; + print '
'; print '
'; } @@ -343,9 +343,9 @@ if ($action == 'added') // Si on a pas ete redirige print '
'; - print '
'; + print '
'; print $langs->trans("NewMemberbyWeb"); - print '
'; + print '
'; llxFooterVierge(); exit; @@ -591,13 +591,13 @@ if (! empty($conf->global->MEMBER_NEWFORM_AMOUNT) print "
\n"; // Save -print '
'; +print '
'; print ''; if (! empty($backtopage)) { print '     '; } -print '
'; +print '
'; print "
\n"; print ''; diff --git a/htdocs/public/paybox/newpayment.php b/htdocs/public/paybox/newpayment.php index 47a93e39c32..0213ee7f6fa 100644 --- a/htdocs/public/paybox/newpayment.php +++ b/htdocs/public/paybox/newpayment.php @@ -166,7 +166,7 @@ if (! empty($conf->global->$paramcreditor)) $creditor=$conf->global->$paramcredi else if (! empty($conf->global->PAYBOX_CREDITOR)) $creditor=$conf->global->PAYBOX_CREDITOR; print ''."\n"; -print '
'; +print '
'; print '
'; print ''; print ''; @@ -778,7 +778,7 @@ print ''."\n"; print ''."\n"; print '
'."\n"; -print '
'."\n"; +print ''."\n"; print '
'; diff --git a/htdocs/public/paypal/newpayment.php b/htdocs/public/paypal/newpayment.php index afe685fb6ac..2cd56778f83 100644 --- a/htdocs/public/paypal/newpayment.php +++ b/htdocs/public/paypal/newpayment.php @@ -268,7 +268,7 @@ if (! empty($conf->global->$paramcreditor)) $creditor=$conf->global->$paramcredi else if (! empty($conf->global->PAYPAL_CREDITOR)) $creditor=$conf->global->PAYPAL_CREDITOR; print ''."\n"; -print '
'."\n"; +print '
'."\n"; print '
'."\n"; print ''."\n"; print ''."\n"; @@ -959,7 +959,7 @@ print ''."\n"; print ''."\n"; print '
'."\n"; -print '
'."\n"; +print ''."\n"; print '
'; diff --git a/htdocs/societe/checkvat/checkVatPopup.php b/htdocs/societe/checkvat/checkVatPopup.php index 20c9068d4f6..748ba690ea0 100644 --- a/htdocs/societe/checkvat/checkVatPopup.php +++ b/htdocs/societe/checkvat/checkVatPopup.php @@ -158,7 +158,7 @@ else print '
'; print $langs->trans("VATIntraManualCheck",$langs->trans("VATIntraCheckURL"),$langs->trans("VATIntraCheckURL")).'
'; print '
'; -print '
'; +print '
'; if ($messagetoshow) { diff --git a/htdocs/societe/price.php b/htdocs/societe/price.php index 7ab39a10ddc..0932144a860 100644 --- a/htdocs/societe/price.php +++ b/htdocs/societe/price.php @@ -292,8 +292,11 @@ if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)) { print ''; - print '

 '; - print '
'; + print '
'; + print ''; + print '     '; + print ''; + print '
'; print '
'; } elseif ($action == 'edit_customer_price') { @@ -368,8 +371,11 @@ if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)) { print ''; - print '

 '; - print '
'; + print '
'; + print ''; + print '     '; + print ''; + print '
'; print '
'; } elseif ($action == 'showlog_customer_price') { diff --git a/htdocs/societe/rib.php b/htdocs/societe/rib.php index 01d82ac0867..68ade0431aa 100644 --- a/htdocs/societe/rib.php +++ b/htdocs/societe/rib.php @@ -497,9 +497,11 @@ if ($socid && $action == 'edit' && $user->rights->societe->creer) print '
'; - print '
'; - print '   '; - print '
'; + print '
'; + print ''; + print '     '; + print ''; + print '
'; print ''; } @@ -577,9 +579,11 @@ if ($socid && $action == 'create' && $user->rights->societe->creer) print '
'; - print '
'; - print '   '; - print '
'; + print '
'; + print ''; + print '     '; + print ''; + print '
'; print ''; } diff --git a/htdocs/societe/soc.php b/htdocs/societe/soc.php index 62869daf366..d9fb4c0159f 100644 --- a/htdocs/societe/soc.php +++ b/htdocs/societe/soc.php @@ -1095,9 +1095,9 @@ else print ''."\n"; - print '
'; + print '
'; print ''; - print '
'."\n"; + print ''."\n"; print ''."\n"; } @@ -1608,11 +1608,11 @@ else print ''; print '
'; - print '
'; + print '
'; print ''; - print '     '; + print '     '; print ''; - print '
'; + print ''; print ''; diff --git a/htdocs/user/agenda_extsites.php b/htdocs/user/agenda_extsites.php index 1993f12bd5c..2077c7e73e1 100644 --- a/htdocs/user/agenda_extsites.php +++ b/htdocs/user/agenda_extsites.php @@ -174,9 +174,9 @@ while ($i <= $MAXAGENDA) print ''; print '
'; -print '
'; +print '
'; print "trans("Save")."\">"; -print "
"; +print ""; print "\n"; diff --git a/htdocs/user/card.php b/htdocs/user/card.php index 429bcc91130..fe86717a4c9 100644 --- a/htdocs/user/card.php +++ b/htdocs/user/card.php @@ -1009,7 +1009,7 @@ if (($action == 'create') || ($action == 'adduserldap')) print "\n"; - print '

'; + print '
'; print ""; } @@ -2126,11 +2126,11 @@ else print ''; - print '
'; + print '
'; print ''; - print '   '; + print '     '; print ''; - print '
'; + print ''; print ''; diff --git a/htdocs/user/clicktodial.php b/htdocs/user/clicktodial.php index 3dc3c14cc12..f72a8eb0f15 100644 --- a/htdocs/user/clicktodial.php +++ b/htdocs/user/clicktodial.php @@ -155,10 +155,10 @@ if ($id > 0) print ''; - print '
'; - print '     '; + print '
'; + print '     '; print ''; - print '
'; + print ''; print ''; } diff --git a/htdocs/user/group/card.php b/htdocs/user/group/card.php index a1930f7c027..5f79c939432 100644 --- a/htdocs/user/group/card.php +++ b/htdocs/user/group/card.php @@ -264,7 +264,7 @@ if ($action == 'create') print "\n"; - print '

'; + print '
'; print ""; } @@ -536,7 +536,7 @@ else print "\n"; - print '

'; + print '
'; print ''; diff --git a/htdocs/user/note.php b/htdocs/user/note.php index 448dd76d147..2a992aa3212 100644 --- a/htdocs/user/note.php +++ b/htdocs/user/note.php @@ -133,11 +133,11 @@ if ($id) if ($action == 'edit') { - print '

'; + print '
'; print ''; - print '   '; + print '     '; print ''; - print '
'; + print ''; } print "\n"; diff --git a/htdocs/user/param_ihm.php b/htdocs/user/param_ihm.php index 65e9e4ca7a6..3bca4cbee47 100644 --- a/htdocs/user/param_ihm.php +++ b/htdocs/user/param_ihm.php @@ -202,11 +202,11 @@ if ($action == 'edit') dol_fiche_end(); - print '
'; + print '
'; print ''; - print '     '; + print '     '; print ''; - print '
'; + print ''; print ''; diff --git a/htdocs/webservices/admin/webservices.php b/htdocs/webservices/admin/webservices.php index a12f638a174..431150bd9e9 100644 --- a/htdocs/webservices/admin/webservices.php +++ b/htdocs/webservices/admin/webservices.php @@ -90,9 +90,9 @@ print ''; print ''; -print '
'; +print '
'; print ''; -print '
'; +print ''; print ''; From d9958efcd77ee55ea991d73d1fe7ae6974278a34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Mon, 24 Nov 2014 12:45:46 +0100 Subject: [PATCH 0229/1060] Fixed [ bug #1691 ] Don't think the ID should be displayed in holiday module --- htdocs/holiday/define_holiday.php | 11 ++--------- htdocs/langs/en_US/holiday.lang | 1 - 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/htdocs/holiday/define_holiday.php b/htdocs/holiday/define_holiday.php index 217cb16bad1..fa3f745de81 100644 --- a/htdocs/holiday/define_holiday.php +++ b/htdocs/holiday/define_holiday.php @@ -144,17 +144,14 @@ if($cp_events == 1) print '
'; } -dol_fiche_head(); - print '
'."\n"; print ''; print ''; print ""; -print ''; -print ''; +print ''; print ''; print ''; -print ''; +print ''; print ''; foreach($listUsers as $users) @@ -163,7 +160,6 @@ foreach($listUsers as $users) $var=!$var; print ''; - print ''; print '
'.$langs->trans('ID').''.$langs->trans('Employee').''.$langs->trans('Employee').''.$langs->trans('Available').''.$langs->trans('Note').''.$langs->trans('UpdateButtonCP').'
'.$users['rowid'].''; $userstatic->id=$users['rowid']; $userstatic->lastname=$users['name']; @@ -183,9 +179,6 @@ foreach($listUsers as $users) print '
'; print '
'; -dol_fiche_end(); - - llxFooter(); $db->close(); diff --git a/htdocs/langs/en_US/holiday.lang b/htdocs/langs/en_US/holiday.lang index 698d34eb539..f5b87fefb08 100644 --- a/htdocs/langs/en_US/holiday.lang +++ b/htdocs/langs/en_US/holiday.lang @@ -48,7 +48,6 @@ ConfirmDeleteCP=Confirm the deletion of this leave request? ErrorCantDeleteCP=Error you don't have the right to delete this leave request. CantCreateCP=You don't have the right to make leave requests. InvalidValidatorCP=You must choose an approbator to your leave request. -UpdateButtonCP=Update CantUpdate=You cannot update this leave request. NoDateDebut=You must select a start date. NoDateFin=You must select an end date. From 082f67a6e4edd761f7db07c2dded7de24355f307 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Mon, 24 Nov 2014 12:49:33 +0100 Subject: [PATCH 0230/1060] Fixed [ bug #1718 ] Mistakenly searching for text in amount field breaks --- htdocs/fourn/commande/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/fourn/commande/list.php b/htdocs/fourn/commande/list.php index 6affbae3045..4f0974abd10 100644 --- a/htdocs/fourn/commande/list.php +++ b/htdocs/fourn/commande/list.php @@ -123,7 +123,7 @@ if ($search_user) } if ($search_ttc) { - $sql .= " AND total_ttc = ".price2num($search_ttc); + $sql .= " AND total_ttc = '".$db->escape(price2num($search_ttc))."'"; } if ($sall) { From ab25b149c59268c9e042117aebcfae7f437de1b4 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 24 Nov 2014 15:40:40 +0100 Subject: [PATCH 0231/1060] Fix: Download of user files --- htdocs/user/document.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/htdocs/user/document.php b/htdocs/user/document.php index b18424625ce..2659b9427c8 100644 --- a/htdocs/user/document.php +++ b/htdocs/user/document.php @@ -88,10 +88,11 @@ if ($id > 0 || ! empty($ref)) { $result = $object->fetch($id, $ref); - $upload_dir = $conf->user->multidir_output[$object->entity] . "/" . $object->id ; + $entitytouseforuserdir = $object->entity; + if (empty($entitytouseforuserdir)) $entitytouseforuserdir=1; + $upload_dir = $conf->user->multidir_output[$entitytouseforuserdir] . "/" . $object->id ; } - /* * Actions */ @@ -159,8 +160,8 @@ if ($object->id) print ''; - $modulepart = 'societe'; - $permission = $user->rights->societe->creer; + $modulepart = 'user'; + $permission = $user->rights->user->user->creer; $param = '&id=' . $object->id; include_once DOL_DOCUMENT_ROOT . '/core/tpl/document_actions_post_headers.tpl.php'; } From 5dbba380d230e23adda0e6e074cf8e811dff5224 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Mon, 24 Nov 2014 20:54:38 +0100 Subject: [PATCH 0232/1060] Fix 1721 Missing translation on proposal creation --- htdocs/langs/en_US/admin.lang | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 1eeb5a7f443..13e9580e2b8 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -1139,6 +1139,7 @@ AddDeliveryAddressAbility=Add delivery date ability UseOptionLineIfNoQuantity=A line of product/service with a zero amount is considered as an option FreeLegalTextOnProposal=Free text on commercial proposals WatermarkOnDraftProposal=Watermark on draft commercial proposals (none if empty) +ASK_PAYMENT_BANK_DURING_PROPOSAL=Ask for bank account destination of proposal ##### Orders ##### OrdersSetup=Order management setup OrdersNumberingModules=Orders numbering models From 655dc35628e7da518eac53f3c92344f1311550cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Mon, 24 Nov 2014 20:57:26 +0100 Subject: [PATCH 0233/1060] Update propal.php --- htdocs/admin/propal.php | 46 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 45 insertions(+), 1 deletion(-) diff --git a/htdocs/admin/propal.php b/htdocs/admin/propal.php index 328866eb964..c92f2bac5ab 100644 --- a/htdocs/admin/propal.php +++ b/htdocs/admin/propal.php @@ -163,7 +163,22 @@ if ($action == 'setdefaultduration') } } -// Define constants for submodules that contains parameters (forms with param1, param2, ... and value1, value2, ...) +if ($action == 'set_ASK_PAYMENT_BANK_DURING_PROPOSAL') +{ + $res = dolibarr_set_const($db, "ASK_PAYMENT_BANK_DURING_PROPOSAL",$value,'chaine',0,'',$conf->entity); + + if (! $res > 0) $error++; + + if (! $error) + { + setEventMessage($langs->trans("SetupSaved")); + } + else + { + setEventMessage($langs->trans("Error"),'errors'); + } +} ++// Define constants for submodules that contains parameters (forms with param1, param2, ... and value1, value2, ...) if ($action == 'setModuleOptions') { $post_size=count($_POST); @@ -582,6 +597,35 @@ print '' print "\n"; print ''; +if ($conf->banque->enabled) +{ + $var=!$var; + print ''; + print $langs->trans("ASK_PAYMENT_BANK_DURING_PROPOSAL").' '; + if (! empty($conf->use_javascript_ajax)) + { + print ajax_constantonoff('ASK_PAYMENT_BANK_DURING_PROPOSAL'); + } + else + { + if (empty($conf->global->ASK_PAYMENT_BANK_DURING_PROPOSAL)) + { + print ''.img_picto($langs->trans("Disabled"),'switch_off').''; + } + else + { + print ''.img_picto($langs->trans("Enabled"),'switch_on').''; + } + } + print ''; +} +else +{ + $var=!$var; + print ''; + print $langs->trans("ASK_PAYMENT_BANK_DURING_PROPOSAL").' '.$langs->trans('NotAvailable').''; +} + print ''; From 81f467661e9f941aa3ad8074df1ca8aff2c8b566 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Mon, 24 Nov 2014 20:58:46 +0100 Subject: [PATCH 0234/1060] Update propal.php --- htdocs/comm/propal.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php index 6d23d3a982d..b14c9516465 100644 --- a/htdocs/comm/propal.php +++ b/htdocs/comm/propal.php @@ -1310,9 +1310,11 @@ if ($action == 'create') print ''; // Bank Account - print '' . $langs->trans('BankAccount') . ''; - $form->select_comptes($fk_account, 'fk_account', 0, '', 1); - print ''; + if (! empty($conf->global->ASK_PAYMENT_BANK_DURING_PROPOSAL) && $conf->module->banque->enabled) { + print '' . $langs->trans('BankAccount') . ''; + $form->select_comptes($fk_account, 'fk_account', 0, '', 1); + print ''; + } // What trigger creation print '' . $langs->trans('Source') . ''; @@ -1892,7 +1894,7 @@ if ($action == 'create') print ''; } - if (! empty($conf->global->BANK_ASK_PAYMENT_BANK_DURING_PROPOSAL)) + if (! empty($conf->global->ASK_PAYMENT_BANK_DURING_PROPOSAL) && $conf->banque->enabled) { // Bank Account print ''; From f5bc6dc6343f503019eb2a59ebba6343c3dee6f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Mon, 24 Nov 2014 21:01:55 +0100 Subject: [PATCH 0235/1060] Update propal.php --- htdocs/admin/propal.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/admin/propal.php b/htdocs/admin/propal.php index c92f2bac5ab..de935b3d0f0 100644 --- a/htdocs/admin/propal.php +++ b/htdocs/admin/propal.php @@ -178,7 +178,8 @@ if ($action == 'set_ASK_PAYMENT_BANK_DURING_PROPOSAL') setEventMessage($langs->trans("Error"),'errors'); } } -+// Define constants for submodules that contains parameters (forms with param1, param2, ... and value1, value2, ...) + +// Define constants for submodules that contains parameters (forms with param1, param2, ... and value1, value2, ...) if ($action == 'setModuleOptions') { $post_size=count($_POST); From 9d813b25d96254c5b90e472790639ca15abd87a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Tue, 25 Nov 2014 01:05:01 +0100 Subject: [PATCH 0236/1060] Fix Typo --- htdocs/core/boxes/box_graph_invoices_permonth.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/boxes/box_graph_invoices_permonth.php b/htdocs/core/boxes/box_graph_invoices_permonth.php index b272f350717..9b2a5437b8a 100644 --- a/htdocs/core/boxes/box_graph_invoices_permonth.php +++ b/htdocs/core/boxes/box_graph_invoices_permonth.php @@ -215,9 +215,9 @@ class box_graph_invoices_permonth extends ModeleBoxes $stringtoshow.='
'; $stringtoshow.=''; $stringtoshow.=''; - $stringtoshow.=' '.$langs->trans("NumberOfBillsByMonth"); + $stringtoshow.=' '.$langs->trans("NumberOfBillsByMonth"); $stringtoshow.='   '; - $stringtoshow.=' '.$langs->trans("AmountOfBillsByMonthHT"); + $stringtoshow.=' '.$langs->trans("AmountOfBillsByMonthHT"); $stringtoshow.='
'; $stringtoshow.=$langs->trans("Year").' '; $stringtoshow.=''; From 6163635d7cb77d781da8bacd61fae363c9849c50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Tue, 25 Nov 2014 01:06:04 +0100 Subject: [PATCH 0237/1060] Fix Typo --- htdocs/core/boxes/box_graph_invoices_supplier_permonth.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/boxes/box_graph_invoices_supplier_permonth.php b/htdocs/core/boxes/box_graph_invoices_supplier_permonth.php index c882acd40c1..7c2aa53da97 100644 --- a/htdocs/core/boxes/box_graph_invoices_supplier_permonth.php +++ b/htdocs/core/boxes/box_graph_invoices_supplier_permonth.php @@ -214,9 +214,9 @@ class box_graph_invoices_supplier_permonth extends ModeleBoxes $stringtoshow.=''; $stringtoshow.=''; $stringtoshow.=''; - $stringtoshow.=' '.$langs->trans("NumberOfBillsByMonth"); + $stringtoshow.=' '.$langs->trans("NumberOfBillsByMonth"); $stringtoshow.='   '; - $stringtoshow.=' '.$langs->trans("AmountOfBillsByMonthHT"); + $stringtoshow.=' '.$langs->trans("AmountOfBillsByMonthHT"); $stringtoshow.='
'; $stringtoshow.=$langs->trans("Year").' '; $stringtoshow.=''; From 9fb58e06f6585a008a675d033bff74aabbcf265f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Tue, 25 Nov 2014 01:06:55 +0100 Subject: [PATCH 0238/1060] Fix Typo --- htdocs/core/boxes/box_graph_orders_permonth.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/boxes/box_graph_orders_permonth.php b/htdocs/core/boxes/box_graph_orders_permonth.php index 5084691d321..75f0f60660f 100644 --- a/htdocs/core/boxes/box_graph_orders_permonth.php +++ b/htdocs/core/boxes/box_graph_orders_permonth.php @@ -215,9 +215,9 @@ class box_graph_orders_permonth extends ModeleBoxes $stringtoshow.=''; $stringtoshow.=''; $stringtoshow.=''; - $stringtoshow.=' '.$langs->trans("NumberOfOrdersByMonth"); + $stringtoshow.=' '.$langs->trans("NumberOfOrdersByMonth"); $stringtoshow.='   '; - $stringtoshow.=' '.$langs->trans("AmountOfOrdersByMonthHT"); + $stringtoshow.=' '.$langs->trans("AmountOfOrdersByMonthHT"); $stringtoshow.='
'; $stringtoshow.=$langs->trans("Year").' '; $stringtoshow.=''; From e4517ee0f4d96cc382bad3990ce2ed46eacb146d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Tue, 25 Nov 2014 01:07:45 +0100 Subject: [PATCH 0239/1060] Fix Typo --- htdocs/core/boxes/box_graph_orders_supplier_permonth.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/boxes/box_graph_orders_supplier_permonth.php b/htdocs/core/boxes/box_graph_orders_supplier_permonth.php index f398ae9dcb1..70d62cac348 100644 --- a/htdocs/core/boxes/box_graph_orders_supplier_permonth.php +++ b/htdocs/core/boxes/box_graph_orders_supplier_permonth.php @@ -214,9 +214,9 @@ class box_graph_orders_supplier_permonth extends ModeleBoxes $stringtoshow.=''; $stringtoshow.=''; $stringtoshow.=''; - $stringtoshow.=' '.$langs->trans("NumberOfOrdersByMonth"); + $stringtoshow.=' '.$langs->trans("NumberOfOrdersByMonth"); $stringtoshow.='   '; - $stringtoshow.=' '.$langs->trans("AmountOfOrdersByMonthHT"); + $stringtoshow.=' '.$langs->trans("AmountOfOrdersByMonthHT"); $stringtoshow.='
'; $stringtoshow.=$langs->trans("Year").' '; $stringtoshow.=''; From 911f9c0913ec614e257c209a47a5fb80caa68d73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Tue, 25 Nov 2014 01:13:52 +0100 Subject: [PATCH 0240/1060] Fix Typo --- htdocs/core/boxes/box_graph_propales_permonth.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/boxes/box_graph_propales_permonth.php b/htdocs/core/boxes/box_graph_propales_permonth.php index 974ccaed446..fd866f5df89 100644 --- a/htdocs/core/boxes/box_graph_propales_permonth.php +++ b/htdocs/core/boxes/box_graph_propales_permonth.php @@ -218,9 +218,9 @@ class box_graph_propales_permonth extends ModeleBoxes $stringtoshow.=''; $stringtoshow.=''; $stringtoshow.=''; - $stringtoshow.=' '.$langs->trans("NumberOfProposalsByMonth"); + $stringtoshow.=' '.$langs->trans("NumberOfProposalsByMonth"); $stringtoshow.='   '; - $stringtoshow.=' '.$langs->trans("AmountOfProposalsByMonthHT"); + $stringtoshow.=' '.$langs->trans("AmountOfProposalsByMonthHT"); $stringtoshow.='
'; $stringtoshow.=$langs->trans("Year").' '; $stringtoshow.=''; From 18406fc550d68bb5e851e242b6f928327bbe1a20 Mon Sep 17 00:00:00 2001 From: Francis Appels Date: Tue, 25 Nov 2014 14:26:45 +0100 Subject: [PATCH 0241/1060] Fix: Show sender Country on PDF docs Show sender Country on PDF docs when sender Country != receiver Country --- ChangeLog | 1 + htdocs/core/lib/functions.lib.php | 9 +++++---- htdocs/core/lib/pdf.lib.php | 5 ++++- .../core/modules/commande/doc/pdf_einstein.modules.php | 2 +- .../core/modules/commande/doc/pdf_proforma.modules.php | 2 +- htdocs/core/modules/contract/doc/pdf_strato.modules.php | 2 +- htdocs/core/modules/expedition/doc/pdf_merou.modules.php | 2 +- .../core/modules/expedition/doc/pdf_rouget.modules.php | 2 +- htdocs/core/modules/facture/doc/pdf_crabe.modules.php | 2 +- htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php | 2 +- htdocs/core/modules/livraison/pdf/pdf_typhon.modules.php | 2 +- htdocs/core/modules/propale/doc/pdf_azur.modules.php | 2 +- .../modules/supplier_invoice/pdf/pdf_canelle.modules.php | 2 +- .../modules/supplier_order/pdf/pdf_muscadet.modules.php | 2 +- 14 files changed, 21 insertions(+), 16 deletions(-) diff --git a/ChangeLog b/ChangeLog index 34dd86aa02e..05f46019350 100644 --- a/ChangeLog +++ b/ChangeLog @@ -14,6 +14,7 @@ English Dolibarr ChangeLog - Fix: Chars - is no more allowed into value for code for extra fields. - Fix: [ bug #1622 ] Requesting holiday than spans across two years cause high CPU usage by Apache - Fix: [ bug #1595 ] Selected boolean extrafield in intervention creation page, does not save state +- Fix: Show sender Country on PDF docs when sender Country <> receiver Country ***** ChangeLog for 3.6.1 compared to 3.6.* ***** For users: diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index d679882161f..f6f09dd1567 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -719,11 +719,12 @@ function dol_bc($var,$moreclass='') * @param Object $object A company or contact object * @param int $withcountry 1=Add country into address string * @param string $sep Separator to use to build string + * @param Tranlsate $outputlangs Object lang that contains language for text translation. * @return string Formated string */ -function dol_format_address($object,$withcountry=0,$sep="\n") +function dol_format_address($object,$withcountry=0,$sep="\n",$outputlangs='') { - global $conf; + global $conf,$langs; $ret=''; $countriesusingstate=array('AU','US','IN','GB','ES','UK','TR'); @@ -768,8 +769,8 @@ function dol_format_address($object,$withcountry=0,$sep="\n") $ret.=", ".$object->state; } } - - if ($withcountry) $ret.=($object->country?$sep.$object->country:''); + if (! is_object($outputlangs)) $outputlangs=$langs; + if ($withcountry) $ret.=($object->country_code?$sep.$outputlangs->convToOutputCharset($outputlangs->transnoentitiesnoconv("Country".$object->country_code)):''); return $ret; } diff --git a/htdocs/core/lib/pdf.lib.php b/htdocs/core/lib/pdf.lib.php index 17c1185e2e0..8b0091a6f6d 100644 --- a/htdocs/core/lib/pdf.lib.php +++ b/htdocs/core/lib/pdf.lib.php @@ -309,7 +309,10 @@ function pdf_build_address($outputlangs,$sourcecompany,$targetcompany='',$target if ($mode == 'source') { - $stringaddress .= ($stringaddress ? "\n" : '' ).$outputlangs->convToOutputCharset(dol_format_address($sourcecompany))."\n"; + $withCountry = 0; + if (!empty($sourcecompany->country_code) && ($targetcompany->country_code != $sourcecompany->country_code)) $withCountry = 1; + + $stringaddress .= ($stringaddress ? "\n" : '' ).$outputlangs->convToOutputCharset(dol_format_address($sourcecompany, $withCountry, "\n", $outputlangs))."\n"; if (empty($conf->global->MAIN_PDF_DISABLESOURCEDETAILS)) { diff --git a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php index b3dd27a8a7a..2f569f1e47f 100644 --- a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php +++ b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php @@ -1177,7 +1177,7 @@ class pdf_einstein extends ModelePDFCommandes if ($showaddress) { // Sender properties - $carac_emetteur = pdf_build_address($outputlangs,$this->emetteur); + $carac_emetteur = pdf_build_address($outputlangs, $this->emetteur, $object->client); // Show sender $posy=42; diff --git a/htdocs/core/modules/commande/doc/pdf_proforma.modules.php b/htdocs/core/modules/commande/doc/pdf_proforma.modules.php index 49e3c374752..cf5a562e2ef 100644 --- a/htdocs/core/modules/commande/doc/pdf_proforma.modules.php +++ b/htdocs/core/modules/commande/doc/pdf_proforma.modules.php @@ -1134,7 +1134,7 @@ class pdf_proforma extends ModelePDFCommandes if ($showaddress) { // Sender properties - $carac_emetteur = pdf_build_address($outputlangs,$this->emetteur); + $carac_emetteur = pdf_build_address($outputlangs, $this->emetteur, $object->client); // Show sender $posy=42; diff --git a/htdocs/core/modules/contract/doc/pdf_strato.modules.php b/htdocs/core/modules/contract/doc/pdf_strato.modules.php index 238f51e78cd..88645973f6c 100644 --- a/htdocs/core/modules/contract/doc/pdf_strato.modules.php +++ b/htdocs/core/modules/contract/doc/pdf_strato.modules.php @@ -520,7 +520,7 @@ class pdf_strato extends ModelePDFContract $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->transnoentities("Name").": ".$outputlangs->convToOutputCharset($object->user->getFullName($outputlangs))."\n"; } - $carac_emetteur .= pdf_build_address($outputlangs,$this->emetteur); + $carac_emetteur .= pdf_build_address($outputlangs, $this->emetteur, $object->client); // Show sender $posy=42; diff --git a/htdocs/core/modules/expedition/doc/pdf_merou.modules.php b/htdocs/core/modules/expedition/doc/pdf_merou.modules.php index 14bc79bf935..cc9d884a831 100644 --- a/htdocs/core/modules/expedition/doc/pdf_merou.modules.php +++ b/htdocs/core/modules/expedition/doc/pdf_merou.modules.php @@ -516,7 +516,7 @@ class pdf_merou extends ModelePdfExpedition $pdf->SetTextColor(0,0,0); // Sender properties - $carac_emetteur = pdf_build_address($outputlangs,$this->emetteur); + $carac_emetteur = pdf_build_address($outputlangs, $this->emetteur, $object->client); $pdf->SetFont('','', $default_font_size - 3); $pdf->SetXY($blSocX,$blSocY+4); diff --git a/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php b/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php index 37e3f8b911f..eedc4b91827 100644 --- a/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php +++ b/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php @@ -564,7 +564,7 @@ class pdf_rouget extends ModelePdfExpedition $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->transnoentities("Name").": ".$outputlangs->convToOutputCharset($object->user->getFullName($outputlangs))."\n"; } - $carac_emetteur .= pdf_build_address($outputlangs,$this->emetteur); + $carac_emetteur .= pdf_build_address($outputlangs, $this->emetteur, $object->client); // Show sender $posx=$this->marge_gauche; diff --git a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php index 6b66d9d2df3..e8ea460fb9b 100644 --- a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php @@ -1363,7 +1363,7 @@ class pdf_crabe extends ModelePDFFactures if ($showaddress) { // Sender properties - $carac_emetteur = pdf_build_address($outputlangs,$this->emetteur); + $carac_emetteur = pdf_build_address($outputlangs, $this->emetteur, $object->client); // Show sender $posy=42; diff --git a/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php b/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php index c94cd154251..2c8214457e2 100644 --- a/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php +++ b/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php @@ -505,7 +505,7 @@ class pdf_soleil extends ModelePDFFicheinter $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->transnoentities("Name").": ".$outputlangs->convToOutputCharset($object->user->getFullName($outputlangs))."\n"; } - $carac_emetteur .= pdf_build_address($outputlangs,$this->emetteur); + $carac_emetteur .= pdf_build_address($outputlangs, $this->emetteur, $object->client); // Show sender $posy=42; diff --git a/htdocs/core/modules/livraison/pdf/pdf_typhon.modules.php b/htdocs/core/modules/livraison/pdf/pdf_typhon.modules.php index 3aae0e5a18e..ba58279c8ec 100644 --- a/htdocs/core/modules/livraison/pdf/pdf_typhon.modules.php +++ b/htdocs/core/modules/livraison/pdf/pdf_typhon.modules.php @@ -749,7 +749,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder if ($showaddress) { // Sender properties - $carac_emetteur = pdf_build_address($outputlangs,$this->emetteur); + $carac_emetteur = pdf_build_address($outputlangs, $this->emetteur, $object->client); // Show sender $posy=42; diff --git a/htdocs/core/modules/propale/doc/pdf_azur.modules.php b/htdocs/core/modules/propale/doc/pdf_azur.modules.php index 29fea0d9c1a..d7d4b3150cf 100644 --- a/htdocs/core/modules/propale/doc/pdf_azur.modules.php +++ b/htdocs/core/modules/propale/doc/pdf_azur.modules.php @@ -1269,7 +1269,7 @@ class pdf_azur extends ModelePDFPropales $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->transnoentities("Name").": ".$outputlangs->convToOutputCharset($object->user->getFullName($outputlangs))."\n"; } - $carac_emetteur .= pdf_build_address($outputlangs,$this->emetteur); + $carac_emetteur .= pdf_build_address($outputlangs, $this->emetteur, $object->client); // Show sender $posy=42; 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 d3cf60295f6..4124d4745f6 100644 --- a/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php +++ b/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php @@ -961,7 +961,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices if ($showaddress) { // Sender properties - $carac_emetteur = pdf_build_address($outputlangs,$this->emetteur); + $carac_emetteur = pdf_build_address($outputlangs, $this->emetteur, $object->client); // Show sender $posy=42; diff --git a/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php b/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php index 78a33f76a29..83d1aac952b 100644 --- a/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php +++ b/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php @@ -1005,7 +1005,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders if ($showaddress) { // Sender properties - $carac_emetteur = pdf_build_address($outputlangs,$this->emetteur); + $carac_emetteur = pdf_build_address($outputlangs, $this->emetteur, $object->client); // Show sender $posy=42; From fbdd8518751c34564ef4e6a389e16920e4377bda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Tue, 25 Nov 2014 18:54:56 +0100 Subject: [PATCH 0242/1060] Fix remove not needed --- htdocs/compta/index.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/compta/index.php b/htdocs/compta/index.php index fc2943f05e0..2359d70d07b 100644 --- a/htdocs/compta/index.php +++ b/htdocs/compta/index.php @@ -678,7 +678,7 @@ if (! empty($conf->facture->enabled) && ! empty($conf->commande->enabled) && $us $societestatic->name=$obj->name; $societestatic->client=1; print $societestatic->getNomUrl(1,'customer',44); - print ''; + print ''; if (! empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) print ''.price($obj->total_ht).''; print ''.price($obj->total_ttc).''; print ''.price($obj->total_ttc-$obj->tot_fttc).''; @@ -777,7 +777,7 @@ if (! empty($conf->facture->enabled) && $user->rights->facture->lire) $societestatic->name=$obj->name; $societestatic->client=1; print $societestatic->getNomUrl(1,'customer',44); - print ''; + print ''; if (! empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) print ''.price($obj->total).''; print ''.price($obj->total_ttc).''; print ''.price($obj->am).''; From c4c69e191bdc616e25fd7f04448ba5189594a130 Mon Sep 17 00:00:00 2001 From: aspangaro Date: Tue, 25 Nov 2014 20:13:43 +0100 Subject: [PATCH 0243/1060] Replace
tags --- build/doxygen/doxygen_footer.html | 4 ++-- build/doxygen/doxygen_header.html | 4 ++-- dev/skeletons/skeleton_page.php | 4 ++-- dev/test/testdiv.php | 8 ++++---- htdocs/accountancy/admin/card.php | 13 +++++++++---- htdocs/accountancy/admin/fiscalyear_card.php | 13 +++++++++---- htdocs/accountancy/customer/card.php | 7 +++++-- htdocs/adherents/admin/public.php | 6 +++--- htdocs/adherents/card.php | 8 ++++---- htdocs/adherents/card_subscriptions.php | 6 +++--- htdocs/adherents/type.php | 15 ++++++++++----- htdocs/admin/agenda.php | 4 ++-- htdocs/admin/agenda_extsites.php | 6 +++--- htdocs/admin/agenda_other.php | 2 +- htdocs/admin/agenda_xcal.php | 4 ++-- htdocs/admin/clicktodial.php | 2 +- htdocs/admin/company.php | 6 +++--- htdocs/admin/delais.php | 2 +- htdocs/admin/external_rss.php | 4 ++-- htdocs/admin/fckeditor.php | 2 +- htdocs/admin/ihm.php | 4 ++-- htdocs/admin/index.php | 2 +- htdocs/admin/ldap.php | 2 +- htdocs/admin/limits.php | 4 ++-- htdocs/admin/mails.php | 6 +++--- htdocs/admin/menus.php | 6 +++--- htdocs/admin/menus/edit.php | 16 ++++++++++------ htdocs/admin/notification.php | 2 +- htdocs/admin/pdf.php | 4 ++-- htdocs/admin/prelevement.php | 2 +- htdocs/admin/sms.php | 6 +++--- htdocs/admin/tools/index.php | 2 +- htdocs/admin/tools/purge.php | 2 +- htdocs/bookmarks/admin/bookmark.php | 2 +- htdocs/cashdesk/admin/cashdesk.php | 2 +- htdocs/cashdesk/tpl/liste_articles.tpl.php | 2 +- htdocs/categories/card.php | 6 +++--- htdocs/categories/edit.php | 3 +-- htdocs/categories/traduction.php | 16 ++++++++++------ htdocs/comm/action/card.php | 14 ++++++++------ htdocs/comm/address.php | 12 ++++++------ htdocs/comm/mailing/card.php | 8 ++++---- htdocs/comm/propal.php | 7 ++++--- htdocs/comm/remise.php | 6 +++--- htdocs/comm/remx.php | 6 +++--- htdocs/commande/card.php | 2 +- htdocs/commande/orderstoinvoice.php | 5 +++-- htdocs/compta/bank/annuel.php | 6 +++--- htdocs/compta/bank/card.php | 9 ++++++--- htdocs/compta/bank/virement.php | 2 +- htdocs/compta/deplacement/card.php | 13 +++++++++---- htdocs/compta/dons/card.php | 4 ++-- htdocs/compta/facture.php | 9 +++++---- htdocs/compta/localtax/card.php | 7 +++++-- htdocs/compta/paiement.php | 4 ++-- htdocs/compta/paiement/cheque/card.php | 4 ++-- htdocs/compta/paiement_charge.php | 8 +++----- htdocs/compta/prelevement/card.php | 4 ++-- htdocs/compta/prelevement/ligne.php | 2 +- htdocs/compta/salaries/card.php | 7 +++++-- htdocs/compta/tva/card.php | 7 +++++-- htdocs/contact/card.php | 10 +++++----- htdocs/contact/perso.php | 6 +++--- htdocs/contrat/card.php | 2 +- htdocs/core/class/html.formmail.class.php | 4 ++-- htdocs/core/class/html.formsms.class.php | 11 +++++------ htdocs/core/menus/standard/auguria.lib.php | 2 +- htdocs/core/menus/standard/eldy.lib.php | 2 +- htdocs/core/modules/dons/html_cerfafr.html | 4 ++-- htdocs/core/photos_resize.php | 4 ++-- htdocs/core/tpl/login.tpl.php | 10 +++++----- htdocs/core/tpl/passwordforgotten.tpl.php | 12 +++++------- htdocs/cron/admin/cron.php | 4 ++-- htdocs/ecm/docdir.php | 6 +++--- htdocs/expedition/card.php | 2 +- htdocs/exports/index.php | 4 ++-- htdocs/externalsite/admin/externalsite.php | 6 +++--- htdocs/externalsite/frames.php | 4 ++-- htdocs/fichinter/card.php | 8 ++++---- htdocs/fourn/commande/card.php | 2 +- htdocs/fourn/commande/dispatch.php | 4 ++-- htdocs/fourn/commande/orderstoinvoice.php | 9 +++++---- htdocs/fourn/facture/card.php | 4 ++-- htdocs/fourn/facture/paiement.php | 4 ++-- htdocs/ftp/admin/ftpclient.php | 2 +- htdocs/holiday/card.php | 4 ++-- htdocs/imports/import.php | 16 ++++++++-------- htdocs/imports/index.php | 4 ++-- htdocs/install/check.php | 6 +++--- htdocs/install/etape5.php | 16 ++++++++-------- htdocs/install/index.php | 4 ++-- htdocs/install/repair.php | 4 ++-- htdocs/opensurvey/card.php | 2 +- htdocs/opensurvey/wizard/choix_date.php | 8 ++++---- htdocs/opensurvey/wizard/index.php | 18 +++++++++--------- htdocs/paybox/admin/paybox.php | 2 +- htdocs/paybox/lib/paybox.lib.php | 6 +++--- htdocs/paypal/admin/paypal.php | 2 +- htdocs/paypal/lib/paypal.lib.php | 4 ++-- htdocs/product/card.php | 9 ++++++--- htdocs/product/composition/card.php | 8 +++++--- htdocs/product/fournisseurs.php | 8 +++++--- 102 files changed, 326 insertions(+), 276 deletions(-) diff --git a/build/doxygen/doxygen_footer.html b/build/doxygen/doxygen_footer.html index 1f4cbd00215..e11df270ddc 100755 --- a/build/doxygen/doxygen_footer.html +++ b/build/doxygen/doxygen_footer.html @@ -26,7 +26,7 @@ for $projectname by Doxygen $doxygenversio -
+
-
+
diff --git a/build/doxygen/doxygen_header.html b/build/doxygen/doxygen_header.html index 363d408d43c..0c2e189136b 100755 --- a/build/doxygen/doxygen_header.html +++ b/build/doxygen/doxygen_header.html @@ -24,7 +24,7 @@ File added into doxygen generated documentation
-
+
@@ -54,7 +54,7 @@ File added into doxygen generated documentation
$projectname
- $projectnumber
-
+
diff --git a/dev/skeletons/skeleton_page.php b/dev/skeletons/skeleton_page.php index deaecd95526..ac329318ae5 100644 --- a/dev/skeletons/skeleton_page.php +++ b/dev/skeletons/skeleton_page.php @@ -282,7 +282,7 @@ if ($action == 'create') print '
'; - print '
 
'; + print '
 
'; print ''; @@ -304,7 +304,7 @@ if (($id || $ref) && $action == 'edit') print '
'; - print '
'; + print '
'; print ''; diff --git a/dev/test/testdiv.php b/dev/test/testdiv.php index 8700be5b2ab..2f1bd9182ae 100644 --- a/dev/test/testdiv.php +++ b/dev/test/testdiv.php @@ -19,14 +19,14 @@ -
+
'."\n"; diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php index 781de5f2913..aaf24d5b07e 100644 --- a/htdocs/core/menus/standard/eldy.lib.php +++ b/htdocs/core/menus/standard/eldy.lib.php @@ -436,7 +436,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu print ''; print ''; print ''; print ''; print '
'."\n"; diff --git a/htdocs/core/modules/dons/html_cerfafr.html b/htdocs/core/modules/dons/html_cerfafr.html index 2dc9c72968c..ca3f3510eee 100644 --- a/htdocs/core/modules/dons/html_cerfafr.html +++ b/htdocs/core/modules/dons/html_cerfafr.html @@ -157,8 +157,8 @@
-
__Date__ & __Signature__
-
__NOW__
+
__Date__ & __Signature__
+
__NOW__
diff --git a/htdocs/core/photos_resize.php b/htdocs/core/photos_resize.php index 2d18c6154f8..3a51a5f7567 100644 --- a/htdocs/core/photos_resize.php +++ b/htdocs/core/photos_resize.php @@ -173,11 +173,11 @@ if (! empty($conf->use_javascript_ajax)) print '
'; print ''.$langs->trans("Recenter").''; print $langs->trans("DefineNewAreaToPick").'...
'; - print '
'; + print '
'; print '
'; print ''; print '
'; - print '

'; + print '
'; print '
'.$langs->trans("NewSizeAfterCropping").': diff --git a/htdocs/core/tpl/login.tpl.php b/htdocs/core/tpl/login.tpl.php index 23d8dd4f326..b314104f734 100644 --- a/htdocs/core/tpl/login.tpl.php +++ b/htdocs/core/tpl/login.tpl.php @@ -46,7 +46,7 @@ $(document).ready(function () { -
+