From d55d8df6adba3f99e8fa6d4a010bdf138753f747 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Thu, 16 Jun 2011 08:02:35 +0000 Subject: [PATCH] Fix: regression --- htdocs/install/mysql/migration/3.0.0-3.1.0.sql | 1 - htdocs/lib/pdf.lib.php | 5 ----- htdocs/societe/class/societe.class.php | 11 ++--------- 3 files changed, 2 insertions(+), 15 deletions(-) diff --git a/htdocs/install/mysql/migration/3.0.0-3.1.0.sql b/htdocs/install/mysql/migration/3.0.0-3.1.0.sql index 3ac9aedf5c6..88704e228d1 100755 --- a/htdocs/install/mysql/migration/3.0.0-3.1.0.sql +++ b/htdocs/install/mysql/migration/3.0.0-3.1.0.sql @@ -27,7 +27,6 @@ ALTER TABLE llx_c_actioncomm ADD COLUMN position integer NOT NULL DEFAULT 0; ALTER TABLE llx_propal ADD COLUMN fk_demand_reason integer NULL DEFAULT 0; ALTER TABLE llx_commande_fournisseur ADD COLUMN fk_cond_reglement integer NULL DEFAULT 0; ALTER TABLE llx_commande_fournisseur ADD COLUMN fk_mode_reglement integer NULL DEFAULT 0; -ALTER TABLE llx_societe ADD COLUMN idtrainer varchar(32) NULL DEFAULT '0' AFTER idprof4; ALTER TABLE llx_commande_fournisseur MODIFY model_pdf varchar(255); ALTER TABLE llx_commande MODIFY model_pdf varchar(255); diff --git a/htdocs/lib/pdf.lib.php b/htdocs/lib/pdf.lib.php index 1bbd578557c..4e4ea3471ee 100644 --- a/htdocs/lib/pdf.lib.php +++ b/htdocs/lib/pdf.lib.php @@ -4,7 +4,6 @@ * Copyright (C) 2007 Patrick Raguin * Copyright (C) 2010-2011 Regis Houssin * Copyright (C) 2010 Juanjo Menent - * Copyright (C) 2011 Philippe Grand * * 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 @@ -567,10 +566,6 @@ function pdf_pagefoot(&$pdf,$outputlangs,$paramfreetext,$fromcompany,$marge_bass $field=$outputlangs->transcountrynoentities("ProfId4",$fromcompany->pays_code); if (preg_match('/\((.*)\)/i',$field,$reg)) $field=$reg[1]; $line4.=($line4?" - ":"").$field.": ".$outputlangs->convToOutputCharset($fromcompany->idprof4); - } - // Trainer accreditation - { - $line4.=($line4?" - ":"").$outputlangs->transnoentities("TrainerId").": ".$outputlangs->convToOutputCharset($fromcompany->idtrainer); } // IntraCommunautary VAT if ($fromcompany->tva_intra != '') diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index 5939ae818fc..f8946035f5b 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -7,7 +7,6 @@ * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2008 Patrick Raguin * Copyright (C) 2010 Juanjo Menent - * Copyright (C) 2011 Philippe Grand * * 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 @@ -80,7 +79,6 @@ class Societe extends CommonObject var $idprof2; // IdProf2 var $idprof3; // IdProf3 var $idprof4; // IdProf4 - var $idtrainer; // Trainer accreditation var $prefix_comm; @@ -403,7 +401,6 @@ class Societe extends CommonObject $this->siret=trim($this->siret); $this->ape=trim($this->ape); $this->idprof4=trim($this->idprof4); - $this->idtrainer=trim($this->idtrainer); $this->prefix_comm=trim($this->prefix_comm); $this->tva_assuj=trim($this->tva_assuj); @@ -468,7 +465,6 @@ class Societe extends CommonObject $sql .= ",siret = '". $this->db->escape($this->siret) ."'"; $sql .= ",ape = '". $this->db->escape($this->ape) ."'"; $sql .= ",idprof4 = '". $this->db->escape($this->idprof4) ."'"; - $sql .= ",idtrainer = '". $this->db->escape($this->idtrainer) ."'"; $sql .= ",tva_assuj = ".($this->tva_assuj!=''?"'".$this->tva_assuj."'":"null"); $sql .= ",tva_intra = '" . $this->db->escape($this->tva_intra) ."'"; @@ -579,10 +575,9 @@ class Societe extends CommonObject * @param idprof2 Prof id 2 of third party (Warning, this can return several records) * @param idprof3 Prof id 3 of third party (Warning, this can return several records) * @param idprof4 Prof id 4 of third party (Warning, this can return several records) - * @param idtrainer Prof idtrainer of third party (Warning, this can return several records) * @return int >0 if OK, <0 if KO or if two records found for same ref or idprof. */ - function fetch($rowid, $ref='', $ref_ext='', $ref_int='', $idprof1='',$idprof2='',$idprof3='',$idprof4='',$idtrainer='') + function fetch($rowid, $ref='', $ref_ext='', $ref_int='', $idprof1='',$idprof2='',$idprof3='',$idprof4='') { global $langs; global $conf; @@ -594,7 +589,7 @@ class Societe extends CommonObject $sql .= ', s.price_level'; $sql .= ', s.tms as date_update'; $sql .= ', s.tel, s.fax, s.email, s.url, s.cp as zip, s.ville as town, s.note, s.client, s.fournisseur'; - $sql .= ', s.siren, s.siret, s.ape, s.idprof4, s.idtrainer'; + $sql .= ', s.siren, s.siret, s.ape, s.idprof4'; $sql .= ', s.capital, s.tva_intra'; $sql .= ', s.fk_typent as typent_id'; $sql .= ', s.fk_effectif as effectif_id'; @@ -624,7 +619,6 @@ class Societe extends CommonObject if ($idprof2) $sql .= " WHERE s.siret = '".$this->db->escape($siret)."' AND s.entity = ".$conf->entity; if ($idprof3) $sql .= " WHERE s.ape = '".$this->db->escape($ape)."' AND s.entity = ".$conf->entity; if ($idprof4) $sql .= " WHERE s.idprof4 = '".$this->db->escape($idprof4)."' AND s.entity = ".$conf->entity; - if ($idtrainer) $sql .= " WHERE s.idtrainer = '".$this->db->escape($idtrainer)."' AND s.entity = ".$conf->entity; $resql=$this->db->query($sql); dol_syslog("Societe::fetch ".$sql); @@ -691,7 +685,6 @@ class Societe extends CommonObject $this->ape = $obj->ape; // TODO obsolete $this->idprof3 = $obj->ape; $this->idprof4 = $obj->idprof4; - $this->idtrainer = $obj->idtrainer; $this->capital = $obj->capital;