From 88ff0e4795ae88e2c4b7e09636cab38f2dc7bb4a Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 18 Jun 2021 00:59:18 +0200 Subject: [PATCH 1/5] Fix PHPCS --- htdocs/comm/mailing/class/mailing.class.php | 4 +--- htdocs/compta/facture/class/facture-rec.class.php | 7 ++++--- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/htdocs/comm/mailing/class/mailing.class.php b/htdocs/comm/mailing/class/mailing.class.php index e780dc3bdec..7c020729df9 100644 --- a/htdocs/comm/mailing/class/mailing.class.php +++ b/htdocs/comm/mailing/class/mailing.class.php @@ -500,9 +500,7 @@ class Mailing extends CommonObject $this->error = $this->db->lasterror(); return -1; } - } - else - { + } else { $this->db->rollback(); $this->error = $this->db->lasterror(); return -1; diff --git a/htdocs/compta/facture/class/facture-rec.class.php b/htdocs/compta/facture/class/facture-rec.class.php index 70fc1ae82d1..c4f898aec56 100644 --- a/htdocs/compta/facture/class/facture-rec.class.php +++ b/htdocs/compta/facture/class/facture-rec.class.php @@ -542,7 +542,6 @@ class FactureRec extends CommonInvoice $this->titre = $obj->title; // deprecated $this->title = $obj->title; $this->ref = $obj->title; - $this->ref_client = $obj->ref_client; $this->suspended = $obj->suspended; $this->type = $obj->type; $this->datep = $obj->dp; @@ -595,7 +594,9 @@ class FactureRec extends CommonInvoice $this->multicurrency_total_tva = $obj->multicurrency_total_tva; $this->multicurrency_total_ttc = $obj->multicurrency_total_ttc; - if ($this->statut == self::STATUS_DRAFT) $this->brouillon = 1; + if ($this->statut == self::STATUS_DRAFT) { + $this->brouillon = 1; + } // Retrieve all extrafield // fetch optionals attributes and labels @@ -612,7 +613,7 @@ class FactureRec extends CommonInvoice } return 1; } else { - $this->error = 'Bill with id '.$rowid.' or ref '.$ref.' not found sql='.$sql; + $this->error = 'Bill with id '.$rowid.' or ref '.$ref.' not found'; dol_syslog('Facture::Fetch Error '.$this->error, LOG_ERR); return -2; } From 53295a0cb15f8a11f7ca367de76ec59afde58348 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 18 Jun 2021 01:06:28 +0200 Subject: [PATCH 2/5] Fix phpcs --- htdocs/compta/facture/class/facture-rec.class.php | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/htdocs/compta/facture/class/facture-rec.class.php b/htdocs/compta/facture/class/facture-rec.class.php index c4f898aec56..1876e278922 100644 --- a/htdocs/compta/facture/class/facture-rec.class.php +++ b/htdocs/compta/facture/class/facture-rec.class.php @@ -543,9 +543,6 @@ class FactureRec extends CommonInvoice $this->title = $obj->title; $this->ref = $obj->title; $this->suspended = $obj->suspended; - $this->type = $obj->type; - $this->datep = $obj->dp; - $this->date = $obj->df; $this->remise_percent = $obj->remise_percent; $this->remise_absolue = $obj->remise_absolue; $this->remise = $obj->remise; @@ -554,9 +551,6 @@ class FactureRec extends CommonInvoice $this->total_localtax1 = $obj->localtax1; $this->total_localtax2 = $obj->localtax2; $this->total_ttc = $obj->total_ttc; - $this->paye = $obj->paye; - $this->close_code = $obj->close_code; - $this->close_note = $obj->close_note; $this->socid = $obj->fk_soc; $this->date_lim_reglement = $this->db->jdate($obj->dlr); $this->mode_reglement_id = $obj->fk_mode_reglement; @@ -568,14 +562,12 @@ class FactureRec extends CommonInvoice $this->cond_reglement_doc = $obj->cond_reglement_libelle_doc; $this->fk_project = $obj->fk_project; $this->fk_account = $obj->fk_account; - $this->fk_facture_source = $obj->fk_facture_source; $this->note_private = $obj->note_private; $this->note_public = $obj->note_public; $this->user_author = $obj->fk_user_author; $this->modelpdf = $obj->model_pdf; // deprecatd $this->model_pdf = $obj->model_pdf; - $this->rang = $obj->rang; - $this->special_code = $obj->special_code; + //$this->special_code = $obj->special_code; $this->frequency = $obj->frequency; $this->unit_frequency = $obj->unit_frequency; $this->date_when = $this->db->jdate($obj->date_when); @@ -606,8 +598,7 @@ class FactureRec extends CommonInvoice * Lines */ $result = $this->fetch_lines(); - if ($result < 0) - { + if ($result < 0) { $this->error = $this->db->lasterror(); return -3; } From 2dba09356beab371f3039b861d7d90c8208ae813 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 18 Jun 2021 10:45:53 +0200 Subject: [PATCH 3/5] Disable nightly for v13 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 9403188d709..08fa830a6fe 100644 --- a/.travis.yml +++ b/.travis.yml @@ -53,7 +53,7 @@ jobs: - if: type = push AND branch = develop php: nightly env: DB=mysql - - if: type = push AND branch = 13.0 + - if: type = push AND branch = 14.0 php: nightly env: DB=mysql From 9b4a8aca1b256506b636c213e18ebeea0578aeec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Fri, 18 Jun 2021 11:00:00 +0200 Subject: [PATCH 4/5] fix typo can't set mandatory --- htdocs/societe/admin/societe.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/societe/admin/societe.php b/htdocs/societe/admin/societe.php index aa738f0845b..ac11206b79e 100644 --- a/htdocs/societe/admin/societe.php +++ b/htdocs/societe/admin/societe.php @@ -693,7 +693,7 @@ foreach ($profid as $key => $val) print img_picto($langs->trans("Activated"), 'switch_on'); print ''; } else { - print ''; + print ''; print img_picto($langs->trans("Disabled"), 'switch_off'); print ''; } From ad30e8efc05ceda23946be9ea20775b3eced8392 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 19 Jun 2021 00:47:57 +0200 Subject: [PATCH 5/5] Fix phpcs --- ChangeLog | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ChangeLog b/ChangeLog index 972a27bc896..d3cc6da9b9c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -12,6 +12,8 @@ FIX: #17060 FIX: #17192 - With tz < 0, event is show in bad day on calendar views FIX: #17363 FIX: #17476 releve.php: Fix SQL statement +FIX: #17967 +Fix: #17906 : fix access denied FIX: Accountancy - Import in general ledger FIX: Accountancy - Quadra export - wrong data on credit FIX: Accountancy - Warning on the pages of the preparatory statements of accounting entries