From 87fc27c7e649566ebb467dc32af7b65ee623f292 Mon Sep 17 00:00:00 2001 From: jfefe Date: Mon, 6 Oct 2014 13:31:01 +0200 Subject: [PATCH 01/10] 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 6439e3e003eb0..7c803a0b8a932 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -576,6 +576,9 @@ function fetch_thirdparty() 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 02/10] 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 7c803a0b8a932..3ef8241f83f61 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -576,8 +576,7 @@ function fetch_thirdparty() 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 24439eb1a31208118f7fb6150876f8d8a6c1149f Mon Sep 17 00:00:00 2001 From: Drosis Nikos Date: Fri, 7 Nov 2014 15:31:06 +0200 Subject: [PATCH 03/10] 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 02356e94b5256..25330ba548bf7 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -1152,6 +1152,8 @@ $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 04/10] 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 33025dd1551c5..a8502498e4111 100644 --- a/htdocs/product/index.php +++ b/htdocs/product/index.php @@ -167,7 +167,7 @@ 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 3cf38a58b90a6..84fc4326fe465 100644 --- a/htdocs/societe/index.php +++ b/htdocs/societe/index.php @@ -159,7 +159,7 @@ 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 c0a3606a595fa21a015ef262ce98fd0e32453412 Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Wed, 12 Nov 2014 22:53:23 +0100 Subject: [PATCH 05/10] 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 e238b1e5834f3..d679882161fdd 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 06/10] 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 a0523bcbc28e8..9b1845d6bff88 100644 --- a/htdocs/user/fiche.php +++ b/htdocs/user/fiche.php @@ -1208,7 +1208,11 @@ // 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 07/10] 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 e4fbcfbec9a07..de02887abf833 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 4631b660d46d1..5efbcdfe1fa9a 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 8d4fc263c5f2bccc833127e194999ce6c57bc12d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 16 Nov 2014 18:37:09 +0100 Subject: [PATCH 08/10] 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 2788526de0512..861de271dabac 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 97d52124c0175..d2f204c6b8cee 100644 --- a/htdocs/accountancy/journal/purchasesjournal.php +++ b/htdocs/accountancy/journal/purchasesjournal.php @@ -58,8 +58,10 @@ $action = GETPOST('action'); + + /* - * View + * Actions */ $year_current = strftime("%Y", dol_now()); @@ -152,9 +154,6 @@ dol_print_error($db); } -/* - * Actions -*/ // Bookkeeping Write if ($action == 'writebookkeeping') { $now = dol_now(); @@ -237,9 +236,16 @@ } } -// 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 09/10] 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 3eeef6916eb21..6d23d3a982d1f 100644 --- a/htdocs/comm/propal.php +++ b/htdocs/comm/propal.php @@ -2000,7 +2000,7 @@ { $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 86ef648bf9479..a69ab60c2547e 100644 --- a/htdocs/core/tpl/objectline_create.tpl.php +++ b/htdocs/core/tpl/objectline_create.tpl.php @@ -271,7 +271,7 @@ 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 05059da9e8880d0e66a9b2dc22ca357f64dfc32d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 17 Nov 2014 01:05:30 +0100 Subject: [PATCH 10/10] =?UTF-8?q?Fix:=20[=20bug=20#1631=20]=20technical=20?= =?UTF-8?q?error=20in=20the=20display=20of=20associated=20objects=20/=20er?= =?UTF-8?q?reur=20technique=20=C3=A0=20l'affichage=20des=20objets=20associ?= =?UTF-8?q?=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 f294fa560acce..738eec46ec097 100644 --- a/htdocs/projet/class/project.class.php +++ b/htdocs/projet/class/project.class.php @@ -411,13 +411,13 @@ function get_element_list($type, $tablename, $datefieldname='', $dates='', $date { 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 c7f772ef93da9..1d4218d1cb918 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 ''; +dol_fiche_end(); /*