diff --git a/htdocs/actioncomm.class.php b/htdocs/actioncomm.class.php index ca018ef249f94028260f334347b152fe800cdc71..ca0bad58257c7d03e5a734f0486b481ac0ae45ea 100644 --- a/htdocs/actioncomm.class.php +++ b/htdocs/actioncomm.class.php @@ -56,7 +56,7 @@ class ActionComm var $societe; var $contact; var $note; - var $percent; + var $percentage; /** * \brief Constructeur @@ -83,7 +83,7 @@ class ActionComm { global $langs,$conf; - if (! $this->percent) $this->percent = 0; + if (! $this->percentage) $this->percentage = 0; if (! $this->priority) $this->priority = 0; $this->db->begin(); @@ -122,7 +122,7 @@ class ActionComm if ($this->date) $sql.= "'".$this->db->idate($this->date)."',"; $sql.= "'".$this->type_id."', '".$this->societe->id."' ,'".addslashes($this->note)."',"; $sql.= ($this->contact->id?$this->contact->id:"null").","; - $sql.= "'$author->id', '".$this->user->id ."', '".addslashes($this->label)."','".$this->percent."','".$this->priority."',"; + $sql.= "'$author->id', '".$this->user->id ."', '".addslashes($this->label)."','".$this->percentage."','".$this->priority."',"; $sql.= ($this->facid?$this->facid:"null").","; $sql.= ($this->propalrowid?$this->propalrowid:"null").","; $sql.= ($this->orderrowid?$this->orderrowid:"null"); @@ -167,7 +167,7 @@ class ActionComm $sql.= " ".$this->db->pdate("a.datep")." as datep,"; $sql.= " ".$this->db->pdate("a.datec")." as datec, tms as datem,"; $sql.= " a.note, a.label, a.fk_action as type_id,"; - $sql.= " fk_soc, fk_user_author, fk_contact, fk_facture, a.percent, a.fk_commande,"; + $sql.= " fk_soc, fk_user_author, fk_contact, fk_facture, a.percent as percentage, a.fk_commande,"; $sql.= " c.id as type_id, c.code as type_code, c.libelle"; $sql.= " FROM ".MAIN_DB_PREFIX."actioncomm as a, ".MAIN_DB_PREFIX."c_actioncomm as c"; $sql.= " WHERE a.id=".$id." AND a.fk_action=c.id"; @@ -193,7 +193,7 @@ class ActionComm $this->datec = $obj->datec; $this->datem = $obj->datem; $this->note =$obj->note; - $this->percent =$obj->percent; + $this->percentage =$obj->percentage; $this->societe->id = $obj->fk_soc; $this->author->id = $obj->fk_user_author; $this->contact->id = $obj->fk_contact; @@ -249,17 +249,17 @@ class ActionComm /** * \brief Met a jour l'action en base. - * Si percent = 100, on met a jour date 100% + * Si percentage = 100, on met a jour date 100% * \return int <0 si ko, >0 si ok */ function update() { $this->label=trim($this->label); $this->note=trim($this->note); - if ($this->percent > 100) $this->percent = 100; + if ($this->percentage > 100) $this->percentage = 100; $sql = "UPDATE ".MAIN_DB_PREFIX."actioncomm "; - $sql.= " SET percent='".$this->percent."'"; + $sql.= " SET percent='".$this->percentage."'"; if ($this->label) $sql.= ", label = '".addslashes($this->label)."'"; $sql.= ", datep = ".($this->datep ? "'".$this->db->idate($this->datep)."'" : 'null'); $sql.= ", datea = ".($this->date ? "'".$this->db->idate($this->date)."'" : 'null'); @@ -359,7 +359,7 @@ class ActionComm */ function getLibStatut($mode) { - return $this->LibStatut($this->percent,$mode); + return $this->LibStatut($this->percentage,$mode); } /** diff --git a/htdocs/comm/action/fiche.php b/htdocs/comm/action/fiche.php index c5fac1e44976c8ec8ecc5e184e2dfb783843133f..6c07456b0509acf165f035fa3a6f88d682aaab57 100644 --- a/htdocs/comm/action/fiche.php +++ b/htdocs/comm/action/fiche.php @@ -139,16 +139,16 @@ if ($_POST["action"] == 'add_action') // RDV if ($actioncomm->date) { - $actioncomm->percent = 100; + $actioncomm->percentage = 100; } else { - $actioncomm->percent = 0; + $actioncomm->percentage = 0; } } else { - $actioncomm->percent = isset($_POST["percentage"])?$_POST["percentage"]:0; + $actioncomm->percentage = isset($_POST["percentage"])?$_POST["percentage"]:0; } $actioncomm->duree=(($_POST["dureehour"] * 60) + $_POST["dureemin"]) * 60; $actioncomm->user = $user; @@ -255,10 +255,10 @@ if ($_POST["action"] == 'update') //print $_POST["apmonth"].",".$_POST["apday"].",".$_POST["apyear"].",".$_POST["aphour"].",".$_POST["apmin"]."<br>\n"; //print $action->datep; $action->label = $_POST["label"]; - $action->percent = $_POST["percent"]; + $action->percentage = $_POST["percentage"]; $action->contact->id = $_POST["contactid"]; $action->note = $_POST["note"]; - if ($action->type_code == 'AC_RDV' && $action->percent == 100 && ! $action->date) + if ($action->type_code == 'AC_RDV' && $action->percentage == 100 && ! $action->date) { $action->date = $action->datep; } @@ -642,7 +642,7 @@ if ($_GET["id"]) // Date planification print '<tr><td>'.$langs->trans("DateActionPlanned").'</td><td colspan="3">'; $html->select_date(($act->datep?$act->datep:-1),'ap',1,1,1,"action"); - if ($act->percent < 100 && $act->datep < (time() - $conf->global->MAIN_DELAY_ACTIONS_TODO)) print img_warning($langs->trans("Late")); + if ($act->percentage < 100 && $act->datep < (time() - $conf->global->MAIN_DELAY_ACTIONS_TODO)) print img_warning($langs->trans("Late")); print '</td></tr>'; // Date done @@ -652,7 +652,7 @@ if ($_GET["id"]) // Etat - print '<tr><td nowrap>'.$langs->trans("Status").' / '.$langs->trans("Percentage").'</td><td colspan="3"><input name="percent" value="'.$act->percent.'" size="4">%</td></tr>'; + print '<tr><td nowrap>'.$langs->trans("Status").' / '.$langs->trans("Percentage").'</td><td colspan="3"><input name="percentage" value="'.$act->percentage.'" size="4">%</td></tr>'; // Objet li� if ($act->objet_url) @@ -730,7 +730,7 @@ if ($_GET["id"]) // Date planification print '<tr><td>'.$langs->trans("DateActionPlanned").'</td><td colspan="3">'; print dolibarr_print_date($act->datep,'dayhour'); - if ($act->percent < 100 && $act->datep < (time() - $conf->global->MAIN_DELAY_ACTIONS_TODO)) print img_warning($langs->trans("Late")); + if ($act->percentage < 100 && $act->datep < (time() - $conf->global->MAIN_DELAY_ACTIONS_TODO)) print img_warning($langs->trans("Late")); print '</td></tr>'; // Date fin real diff --git a/htdocs/comm/action/rapport/rapport.pdf.php b/htdocs/comm/action/rapport/rapport.pdf.php index 4c8f6a31c4f58c604193e8e3401441683f291c7c..0f9b3ebb8c53eb33425371f78445f0ce4d676666 100644 --- a/htdocs/comm/action/rapport/rapport.pdf.php +++ b/htdocs/comm/action/rapport/rapport.pdf.php @@ -28,7 +28,7 @@ \version $Revision$ */ -require_once(FPDF_PATH.'fpdi_protection.php'); +require_once(FPDFI_PATH.'fpdi_protection.php'); require_once(DOL_DOCUMENT_ROOT ."/includes/fpdf/fpdf_indexes.php"); require_once(DOL_DOCUMENT_ROOT ."/includes/fpdf/fpdf_html.php"); diff --git a/htdocs/contact/fiche.php b/htdocs/contact/fiche.php index 63d7abe775f5a81a2107635c7d108e97fdb37d55..6e1a4558e6a28afc783bc7dc308a18bccecda784 100644 --- a/htdocs/contact/fiche.php +++ b/htdocs/contact/fiche.php @@ -630,7 +630,7 @@ if ($_GET["id"] && $_GET["action"] != 'edit') $numaction = 0 ; // Recherche histo sur actioncomm - $sql = "SELECT a.id, ".$db->pdate("a.datea")." as da, a.note, a.percent as percent,"; + $sql = "SELECT a.id, ".$db->pdate("a.datea")." as da, a.note, a.percent as percentage,"; $sql.= " c.code as acode, c.libelle,"; $sql.= " u.rowid as user_id, u.login"; $sql.= " FROM ".MAIN_DB_PREFIX."actioncomm as a, ".MAIN_DB_PREFIX."c_actioncomm as c, ".MAIN_DB_PREFIX."user as u "; @@ -648,7 +648,7 @@ if ($_GET["id"] && $_GET["action"] != 'edit') while ($i < $num) { $obj = $db->fetch_object($resql); - $histo[$numaction]=array('type'=>'action','id'=>$obj->id,'date'=>$obj->da,'note'=>$obj->note,'percent'=>$obj->percent, + $histo[$numaction]=array('type'=>'action','id'=>$obj->id,'date'=>$obj->da,'note'=>$obj->note,'percent'=>$obj->percentage, 'acode'=>$obj->acode,'libelle'=>$obj->libelle, 'userid'=>$obj->user_id,'login'=>$obj->login); $numaction++; @@ -661,7 +661,7 @@ if ($_GET["id"] && $_GET["action"] != 'edit') } // Recherche histo sur mailing - $sql = "SELECT m.rowid as id, ".$db->pdate("mc.date_envoi")." as da, m.titre as note, '100' as percent,"; + $sql = "SELECT m.rowid as id, ".$db->pdate("mc.date_envoi")." as da, m.titre as note, '100' as percentage,"; $sql.= " 'AC_EMAILING' as acode,"; $sql.= " u.rowid as user_id, u.login"; $sql.= " FROM ".MAIN_DB_PREFIX."mailing as m, ".MAIN_DB_PREFIX."mailing_cibles as mc, ".MAIN_DB_PREFIX."user as u "; @@ -680,7 +680,7 @@ if ($_GET["id"] && $_GET["action"] != 'edit') while ($i < $num) { $obj = $db->fetch_object($resql); - $histo[$numaction]=array('type'=>'mailing','id'=>$obj->id,'date'=>$obj->da,'note'=>$obj->note,'percent'=>$obj->percent, + $histo[$numaction]=array('type'=>'mailing','id'=>$obj->id,'date'=>$obj->da,'note'=>$obj->note,'percent'=>$obj->percentage, 'acode'=>$obj->acode,'libelle'=>$obj->libelle, 'userid'=>$obj->user_id,'login'=>$obj->login); $numaction++; diff --git a/htdocs/includes/boxes/box_actions.php b/htdocs/includes/boxes/box_actions.php index 3ea4c4d89473cb1f5230593b4998cf3df6211163..6d948206abc4406f1ca6b767be7ef1febe9e01e4 100644 --- a/htdocs/includes/boxes/box_actions.php +++ b/htdocs/includes/boxes/box_actions.php @@ -71,7 +71,7 @@ class box_actions extends ModeleBoxes { if ($user->rights->commercial->main->lire) { - $sql = "SELECT a.id, a.label, ".$db->pdate("a.datep")." as dp , a.percent,"; + $sql = "SELECT a.id, a.label, ".$db->pdate("a.datep")." as dp , a.percent as percentage,"; $sql.= " ta.code,"; $sql.= " s.nom, s.rowid as socid"; if (!$user->rights->commercial->client->voir && !$user->societe_id) $sql .= ", sc.fk_soc, sc.fk_user"; @@ -119,11 +119,11 @@ class box_actions extends ModeleBoxes { 'text' => dolibarr_print_date($objp->dp, "dayhour")); $this->info_box_contents[$i][3] = array('align' => 'right', - 'text' => $objp->percent. "%"); + 'text' => $objp->percentage. "%"); $this->info_box_contents[$i][4] = array( 'align' => 'right', - 'text' => $actionstatic->LibStatut($objp->percent,3)); + 'text' => $actionstatic->LibStatut($objp->percentage,3)); $i++; } diff --git a/htdocs/lib/databases/mssql.lib.php b/htdocs/lib/databases/mssql.lib.php index f97ca4d8314ac2ac3bed2fb98631c2166537c068..5f383d01ea910be97be77bc346b096896f7c083f 100644 --- a/htdocs/lib/databases/mssql.lib.php +++ b/htdocs/lib/databases/mssql.lib.php @@ -321,7 +321,7 @@ class DoliDb $query = str_ireplace(" file ", " [file] ", $query); $query = str_ireplace(" file,", " [file],", $query); // Idem file - $query = str_ireplace(".percent", ".[percent]", $query); + $query = str_ireplace("percent", "[percent]", $query); $query = str_ireplace("\'", "''", $query);