Merge pull request #5177 from simnandez/develop

Fix: Remove unused variables
This commit is contained in:
Laurent Destailleur 2016-05-07 20:16:01 +02:00
commit 0a5863d879
4 changed files with 46 additions and 65 deletions

View File

@ -780,7 +780,7 @@ class Propal extends CommonObject
*/ */
function create($user, $notrigger=0) function create($user, $notrigger=0)
{ {
global $langs,$conf,$mysoc,$hookmanager; global $conf,$hookmanager;
$error=0; $error=0;
$now=dol_now(); $now=dol_now();
@ -1080,7 +1080,7 @@ class Propal extends CommonObject
*/ */
function createFromClone($socid=0) function createFromClone($socid=0)
{ {
global $db, $user,$langs,$conf,$hookmanager; global $user,$conf,$hookmanager;
dol_include_once('/projet/class/project.class.php'); dol_include_once('/projet/class/project.class.php');
@ -1214,7 +1214,6 @@ class Propal extends CommonObject
*/ */
function fetch($rowid,$ref='') function fetch($rowid,$ref='')
{ {
global $conf;
$sql = "SELECT p.rowid, p.ref, p.remise, p.remise_percent, p.remise_absolue, p.fk_soc"; $sql = "SELECT p.rowid, p.ref, p.remise, p.remise_percent, p.remise_absolue, p.fk_soc";
$sql.= ", p.total, p.tva, p.localtax1, p.localtax2, p.total_ht"; $sql.= ", p.total, p.tva, p.localtax1, p.localtax2, p.total_ht";
@ -1508,7 +1507,7 @@ class Propal extends CommonObject
{ {
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
global $conf,$langs; global $conf;
$error=0; $error=0;
$now=dol_now(); $now=dol_now();
@ -1868,7 +1867,6 @@ class Propal extends CommonObject
*/ */
function reopen($user, $statut, $note='', $notrigger=0) function reopen($user, $statut, $note='', $notrigger=0)
{ {
global $langs,$conf;
$this->statut = $statut; $this->statut = $statut;
$error=0; $error=0;
@ -1979,7 +1977,7 @@ class Propal extends CommonObject
$outputlangs->setDefaultLang($newlang); $outputlangs->setDefaultLang($newlang);
} }
//$ret=$object->fetch($id); // Reload to get new records //$ret=$object->fetch($id); // Reload to get new records
$this->generateDocument($modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); $this->generateDocument($modelpdf, $outputlangs);
} }
// Call trigger // Call trigger
@ -2082,7 +2080,7 @@ class Propal extends CommonObject
*/ */
function liste_array($shortlist=0, $draft=0, $notcurrentuser=0, $socid=0, $limit=0, $offset=0, $sortfield='p.datep', $sortorder='DESC') function liste_array($shortlist=0, $draft=0, $notcurrentuser=0, $socid=0, $limit=0, $offset=0, $sortfield='p.datep', $sortorder='DESC')
{ {
global $conf,$user; global $user;
$ga = array(); $ga = array();
@ -2247,7 +2245,7 @@ class Propal extends CommonObject
*/ */
function delete($user, $notrigger=0) function delete($user, $notrigger=0)
{ {
global $conf,$langs; global $conf;
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
$error=0; $error=0;
@ -2610,7 +2608,7 @@ class Propal extends CommonObject
*/ */
function initAsSpecimen() function initAsSpecimen()
{ {
global $user,$langs,$conf; global $langs;
// Charge tableau des produits prodids // Charge tableau des produits prodids
$prodids = array(); $prodids = array();
@ -2696,7 +2694,7 @@ class Propal extends CommonObject
*/ */
function load_state_board() function load_state_board()
{ {
global $conf, $user; global $user;
$this->nb=array(); $this->nb=array();
$clause = "WHERE"; $clause = "WHERE";
@ -2741,7 +2739,7 @@ class Propal extends CommonObject
*/ */
function getNextNumRef($soc) function getNextNumRef($soc)
{ {
global $conf, $db, $langs; global $conf,$langs;
$langs->load("propal"); $langs->load("propal");
if (! empty($conf->global->PROPALE_ADDON)) if (! empty($conf->global->PROPALE_ADDON))
@ -2942,7 +2940,7 @@ class Propal extends CommonObject
*/ */
public function generateDocument($modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0) public function generateDocument($modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0)
{ {
global $conf,$user,$langs; global $conf,$langs;
$langs->load("propale"); $langs->load("propale");
@ -3196,7 +3194,7 @@ class PropaleLigne extends CommonObjectLine
*/ */
function insert($notrigger=0) function insert($notrigger=0)
{ {
global $conf,$langs,$user; global $conf,$user;
$error=0; $error=0;
@ -3332,7 +3330,7 @@ class PropaleLigne extends CommonObjectLine
*/ */
function delete() function delete()
{ {
global $conf,$langs,$user; global $conf,$user;
$error=0; $error=0;
$this->db->begin(); $this->db->begin();
@ -3383,7 +3381,7 @@ class PropaleLigne extends CommonObjectLine
*/ */
function update($notrigger=0) function update($notrigger=0)
{ {
global $conf,$langs,$user; global $conf,$user;
$error=0; $error=0;

View File

@ -3,7 +3,7 @@
* Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2014 Regis Houssin <regis.houssin@capnetworks.com> * Copyright (C) 2005-2014 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr> * Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
* Copyright (C) 2010-2015 Juanjo Menent <jmenent@2byte.es> * Copyright (C) 2010-2016 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2011 Jean Heimburger <jean@tiaris.info> * Copyright (C) 2011 Jean Heimburger <jean@tiaris.info>
* Copyright (C) 2012-2014 Christophe Battarel <christophe.battarel@altairis.fr> * Copyright (C) 2012-2014 Christophe Battarel <christophe.battarel@altairis.fr>
* Copyright (C) 2012 Cedric Salvador <csalvador@gpcsolutions.fr> * Copyright (C) 2012 Cedric Salvador <csalvador@gpcsolutions.fr>
@ -204,7 +204,7 @@ class Commande extends CommonOrder
*/ */
function getNextNumRef($soc) function getNextNumRef($soc)
{ {
global $db, $langs, $conf; global $langs, $conf;
$langs->load("order"); $langs->load("order");
if (! empty($conf->global->COMMANDE_ADDON)) if (! empty($conf->global->COMMANDE_ADDON))
@ -239,7 +239,7 @@ class Commande extends CommonOrder
} }
else else
{ {
dol_print_error($db,get_class($this)."::getNextNumRef ".$obj->error); dol_print_error($this->db,get_class($this)."::getNextNumRef ".$obj->error);
return ""; return "";
} }
} }
@ -500,7 +500,6 @@ class Commande extends CommonOrder
*/ */
function set_reopen($user) function set_reopen($user)
{ {
global $conf,$langs;
$error=0; $error=0;
if ($this->statut != self::STATUS_CANCELED && $this->statut != self::STATUS_CLOSED) if ($this->statut != self::STATUS_CANCELED && $this->statut != self::STATUS_CLOSED)
@ -560,7 +559,7 @@ class Commande extends CommonOrder
*/ */
function cloture($user) function cloture($user)
{ {
global $conf, $langs; global $conf;
$error=0; $error=0;
@ -697,7 +696,7 @@ class Commande extends CommonOrder
*/ */
function create($user, $notrigger=0) function create($user, $notrigger=0)
{ {
global $conf,$langs,$mysoc,$hookmanager; global $conf,$langs;
$error=0; $error=0;
// Clean parameters // Clean parameters
@ -971,7 +970,7 @@ class Commande extends CommonOrder
*/ */
function createFromClone($socid=0) function createFromClone($socid=0)
{ {
global $conf,$user,$langs,$hookmanager; global $user,$hookmanager;
$error=0; $error=0;
@ -1061,7 +1060,7 @@ class Commande extends CommonOrder
*/ */
function createFromProposal($object) function createFromProposal($object)
{ {
global $db, $conf,$user,$langs,$hookmanager; global $conf,$user,$hookmanager;
dol_include_once('/core/class/extrafields.class.php'); dol_include_once('/core/class/extrafields.class.php');
@ -1134,7 +1133,7 @@ class Commande extends CommonOrder
// get extrafields from original line // get extrafields from original line
$object->fetch_optionals($object->id); $object->fetch_optionals($object->id);
$e = new ExtraFields($db); $e = new ExtraFields($this->db);
$element_extrafields = $e->fetch_name_optionals_label($this->element); $element_extrafields = $e->fetch_name_optionals_label($this->element);
foreach($object->array_options as $options_key => $value) { foreach($object->array_options as $options_key => $value) {
@ -1495,7 +1494,6 @@ class Commande extends CommonOrder
*/ */
function fetch($id, $ref='', $ref_ext='', $ref_int='') function fetch($id, $ref='', $ref_ext='', $ref_int='')
{ {
global $conf;
// Check parameters // Check parameters
if (empty($id) && empty($ref) && empty($ref_ext) && empty($ref_int)) return -1; if (empty($id) && empty($ref) && empty($ref_ext) && empty($ref_int)) return -1;
@ -1851,10 +1849,9 @@ class Commande extends CommonOrder
* Note: For a dedicated shipment, the fetch_lines load the qty_asked and qty_shipped. This function return qty_shipped cuulated for order * Note: For a dedicated shipment, the fetch_lines load the qty_asked and qty_shipped. This function return qty_shipped cuulated for order
* *
* @param int $filtre_statut Filter on status * @param int $filtre_statut Filter on status
* @param int $fk_product Filter on a product
* @return int <0 if KO, Nb of lines found if OK * @return int <0 if KO, Nb of lines found if OK
*/ */
function loadExpeditions($filtre_statut=-1, $fk_product=0) function loadExpeditions($filtre_statut=-1)
{ {
$this->expeditions = array(); $this->expeditions = array();
@ -1983,7 +1980,6 @@ class Commande extends CommonOrder
*/ */
function deleteline($lineid) function deleteline($lineid)
{ {
global $user;
if ($this->statut == self::STATUS_DRAFT) if ($this->statut == self::STATUS_DRAFT)
{ {
@ -2262,7 +2258,7 @@ class Commande extends CommonOrder
*/ */
function liste_array($shortlist=0, $draft=0, $excluser='', $socid=0, $limit=0, $offset=0, $sortfield='c.date_commande', $sortorder='DESC') function liste_array($shortlist=0, $draft=0, $excluser='', $socid=0, $limit=0, $offset=0, $sortfield='c.date_commande', $sortorder='DESC')
{ {
global $conf,$user; global $user;
$ga = array(); $ga = array();
@ -2430,7 +2426,7 @@ class Commande extends CommonOrder
*/ */
function classifyBilled(User $user) function classifyBilled(User $user)
{ {
global $conf, $user, $langs; global $user;
$error = 0; $error = 0;
$this->db->begin(); $this->db->begin();
@ -2698,7 +2694,6 @@ class Commande extends CommonOrder
*/ */
function update($user=null, $notrigger=0) function update($user=null, $notrigger=0)
{ {
global $conf, $langs;
$error=0; $error=0;
// Clean parameters // Clean parameters
@ -3205,7 +3200,7 @@ class Commande extends CommonOrder
*/ */
function initAsSpecimen() function initAsSpecimen()
{ {
global $user,$langs,$conf; global $langs;
dol_syslog(get_class($this)."::initAsSpecimen"); dol_syslog(get_class($this)."::initAsSpecimen");
@ -3287,7 +3282,7 @@ class Commande extends CommonOrder
*/ */
function load_state_board() function load_state_board()
{ {
global $conf, $user; global $user;
$this->nb=array(); $this->nb=array();
$clause = "WHERE"; $clause = "WHERE";

View File

@ -7,7 +7,7 @@
* Copyright (C) 2005-2014 Regis Houssin <regis.houssin@capnetworks.com> * Copyright (C) 2005-2014 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr> * Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
* Copyright (C) 2007 Franky Van Liedekerke <franky.van.liedekerke@telenet.be> * Copyright (C) 2007 Franky Van Liedekerke <franky.van.liedekerke@telenet.be>
* Copyright (C) 2010-2014 Juanjo Menent <jmenent@2byte.es> * Copyright (C) 2010-2016 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2012-2014 Christophe Battarel <christophe.battarel@altairis.fr> * Copyright (C) 2012-2014 Christophe Battarel <christophe.battarel@altairis.fr>
* Copyright (C) 2012-2015 Marcos García <marcosgdf@gmail.com> * Copyright (C) 2012-2015 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2012 Cédric Salvador <csalvador@gpcsolutions.fr> * Copyright (C) 2012 Cédric Salvador <csalvador@gpcsolutions.fr>
@ -734,7 +734,7 @@ class Facture extends CommonInvoice
*/ */
function createFromClone($socid=0) function createFromClone($socid=0)
{ {
global $conf,$user,$langs,$hookmanager; global $user,$hookmanager;
$error=0; $error=0;
@ -849,7 +849,7 @@ class Facture extends CommonInvoice
*/ */
function createFromOrder($object) function createFromOrder($object)
{ {
global $conf,$user,$langs,$hookmanager; global $user,$hookmanager;
$error=0; $error=0;
@ -1289,7 +1289,6 @@ class Facture extends CommonInvoice
*/ */
function update($user=null, $notrigger=0) function update($user=null, $notrigger=0)
{ {
global $conf, $langs;
$error=0; $error=0;
// Clean parameters // Clean parameters
@ -1682,7 +1681,6 @@ class Facture extends CommonInvoice
*/ */
function set_paid($user,$close_code='',$close_note='') function set_paid($user,$close_code='',$close_note='')
{ {
global $conf,$langs;
$error=0; $error=0;
if ($this->paye != 1) if ($this->paye != 1)
@ -1740,7 +1738,6 @@ class Facture extends CommonInvoice
*/ */
function set_unpaid($user) function set_unpaid($user)
{ {
global $conf,$langs;
$error=0; $error=0;
$this->db->begin(); $this->db->begin();
@ -1790,9 +1787,6 @@ class Facture extends CommonInvoice
*/ */
function set_canceled($user,$close_code='',$close_note='') function set_canceled($user,$close_code='',$close_note='')
{ {
global $conf,$langs;
$error=0;
dol_syslog(get_class($this)."::set_canceled rowid=".$this->id, LOG_DEBUG); dol_syslog(get_class($this)."::set_canceled rowid=".$this->id, LOG_DEBUG);
@ -2463,6 +2457,7 @@ class Facture extends CommonInvoice
*/ */
function updateline($rowid, $desc, $pu, $qty, $remise_percent, $date_start, $date_end, $txtva, $txlocaltax1=0, $txlocaltax2=0, $price_base_type='HT', $info_bits=0, $type= self::TYPE_STANDARD, $fk_parent_line=0, $skip_update_total=0, $fk_fournprice=null, $pa_ht=0, $label='', $special_code=0, $array_options=0, $situation_percent=0, $fk_unit = null) function updateline($rowid, $desc, $pu, $qty, $remise_percent, $date_start, $date_end, $txtva, $txlocaltax1=0, $txlocaltax2=0, $price_base_type='HT', $info_bits=0, $type= self::TYPE_STANDARD, $fk_parent_line=0, $skip_update_total=0, $fk_fournprice=null, $pa_ht=0, $label='', $special_code=0, $array_options=0, $situation_percent=0, $fk_unit = null)
{ {
global $conf,$user;
// Deprecation warning // Deprecation warning
if ($label) { if ($label) {
dol_syslog(__METHOD__ . ": using line label is deprecated", LOG_WARNING); dol_syslog(__METHOD__ . ": using line label is deprecated", LOG_WARNING);
@ -2667,7 +2662,7 @@ class Facture extends CommonInvoice
*/ */
function update_percent($line, $percent) function update_percent($line, $percent)
{ {
global $mysoc; global $mysoc,$user;
include_once(DOL_DOCUMENT_ROOT . '/core/lib/price.lib.php'); include_once(DOL_DOCUMENT_ROOT . '/core/lib/price.lib.php');
@ -2693,7 +2688,6 @@ class Facture extends CommonInvoice
*/ */
function deleteline($rowid) function deleteline($rowid)
{ {
global $langs, $conf;
dol_syslog(get_class($this)."::deleteline rowid=".$rowid, LOG_DEBUG); dol_syslog(get_class($this)."::deleteline rowid=".$rowid, LOG_DEBUG);
@ -2931,7 +2925,7 @@ class Facture extends CommonInvoice
*/ */
function getNextNumRef($soc,$mode='next') function getNextNumRef($soc,$mode='next')
{ {
global $conf, $db, $langs; global $conf, $langs;
$langs->load("bills"); $langs->load("bills");
// Clean parameters (if not defined or using deprecated value) // Clean parameters (if not defined or using deprecated value)
@ -2993,7 +2987,7 @@ class Facture extends CommonInvoice
* set up mask. * set up mask.
*/ */
if ($mode != 'last' && !$numref) { if ($mode != 'last' && !$numref) {
dol_print_error($db,"Facture::getNextNumRef ".$obj->error); dol_print_error($this->db,"Facture::getNextNumRef ".$obj->error);
return ""; return "";
} }
@ -3307,7 +3301,6 @@ class Facture extends CommonInvoice
*/ */
function demande_prelevement($fuser, $amount=0) function demande_prelevement($fuser, $amount=0)
{ {
global $langs;
$error=0; $error=0;
@ -3527,7 +3520,7 @@ class Facture extends CommonInvoice
*/ */
function initAsSpecimen($option='') function initAsSpecimen($option='')
{ {
global $user,$langs,$conf; global $langs;
$now=dol_now(); $now=dol_now();
$arraynow=dol_getdate($now); $arraynow=dol_getdate($now);
@ -3712,7 +3705,7 @@ class Facture extends CommonInvoice
*/ */
public function generateDocument($modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0) public function generateDocument($modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0)
{ {
global $conf,$user,$langs; global $conf,$langs;
$langs->load("bills"); $langs->load("bills");
@ -3812,7 +3805,6 @@ class Facture extends CommonInvoice
*/ */
function setFinal() function setFinal()
{ {
global $conf, $langs, $user;
$this->db->begin(); $this->db->begin();
@ -4276,7 +4268,7 @@ class FactureLigne extends CommonInvoiceLine
*/ */
function update($user='',$notrigger=0) function update($user='',$notrigger=0)
{ {
global $user,$langs,$conf; global $user,$conf;
$error=0; $error=0;
@ -4402,9 +4394,7 @@ class FactureLigne extends CommonInvoiceLine
*/ */
function delete() function delete()
{ {
global $conf,$langs,$user; global $user;
$error=0;
$this->db->begin(); $this->db->begin();

View File

@ -3,7 +3,7 @@
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com> * Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2007 Franky Van Liedekerke <franky.van.liedekerke@telenet.be> * Copyright (C) 2007 Franky Van Liedekerke <franky.van.liedekerke@telenet.be>
* Copyright (C) 2006-2012 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2006-2012 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2011-2015 Juanjo Menent <jmenent@2byte.es> * Copyright (C) 2011-2016 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro> * Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2014 Cedric GROSS <c.gross@kreiz-it.fr> * Copyright (C) 2014 Cedric GROSS <c.gross@kreiz-it.fr>
* Copyright (C) 2014-2015 Marcos García <marcosgdf@gmail.com> * Copyright (C) 2014-2015 Marcos García <marcosgdf@gmail.com>
@ -90,6 +90,7 @@ class Expedition extends CommonObject
var $date_creation; var $date_creation;
var $date_valid; var $date_valid;
var $meths;
var $listmeths; // List of carriers var $listmeths; // List of carriers
/** /**
@ -119,7 +120,7 @@ class Expedition extends CommonObject
*/ */
function getNextNumRef($soc) function getNextNumRef($soc)
{ {
global $db, $langs, $conf; global $langs, $conf;
$langs->load("sendings"); $langs->load("sendings");
if (!empty($conf->global->EXPEDITION_ADDON_NUMBER)) if (!empty($conf->global->EXPEDITION_ADDON_NUMBER))
@ -156,7 +157,7 @@ class Expedition extends CommonObject
} }
else else
{ {
dol_print_error($db,get_class($this)."::getNextNumRef ".$obj->error); dol_print_error($this->db,get_class($this)."::getNextNumRef ".$obj->error);
return ""; return "";
} }
} }
@ -176,7 +177,7 @@ class Expedition extends CommonObject
*/ */
function create($user, $notrigger=0) function create($user, $notrigger=0)
{ {
global $conf, $langs, $hookmanager; global $conf, $hookmanager;
$now=dol_now(); $now=dol_now();
@ -978,7 +979,7 @@ class Expedition extends CommonObject
*/ */
function update($user=null, $notrigger=0) function update($user=null, $notrigger=0)
{ {
global $conf, $langs; global $conf;
$error=0; $error=0;
// Clean parameters // Clean parameters
@ -1532,7 +1533,7 @@ class Expedition extends CommonObject
*/ */
function initAsSpecimen() function initAsSpecimen()
{ {
global $user,$langs,$conf; global $langs;
$now=dol_now(); $now=dol_now();
@ -1644,7 +1645,7 @@ class Expedition extends CommonObject
function fetch_delivery_methods() function fetch_delivery_methods()
{ {
global $langs; global $langs;
$meths = array(); $this->meths = array();
$sql = "SELECT em.rowid, em.code, em.libelle"; $sql = "SELECT em.rowid, em.code, em.libelle";
$sql.= " FROM ".MAIN_DB_PREFIX."c_shipment_mode as em"; $sql.= " FROM ".MAIN_DB_PREFIX."c_shipment_mode as em";
@ -1799,7 +1800,6 @@ class Expedition extends CommonObject
*/ */
function setClosed() function setClosed()
{ {
global $conf;
$sql = 'UPDATE '.MAIN_DB_PREFIX.'expedition SET fk_statut=2'; $sql = 'UPDATE '.MAIN_DB_PREFIX.'expedition SET fk_statut=2';
$sql .= ' WHERE rowid = '.$this->id.' AND fk_statut > 0'; $sql .= ' WHERE rowid = '.$this->id.' AND fk_statut > 0';
@ -1825,7 +1825,6 @@ class Expedition extends CommonObject
*/ */
function set_billed() function set_billed()
{ {
global $conf;
$sql = 'UPDATE '.MAIN_DB_PREFIX.'expedition SET fk_statut=2, billed=1'; // TODO Update only billed $sql = 'UPDATE '.MAIN_DB_PREFIX.'expedition SET fk_statut=2, billed=1'; // TODO Update only billed
$sql .= ' WHERE rowid = '.$this->id.' AND fk_statut > 0'; $sql .= ' WHERE rowid = '.$this->id.' AND fk_statut > 0';
@ -1851,7 +1850,6 @@ class Expedition extends CommonObject
*/ */
function reOpen() function reOpen()
{ {
global $conf;
$sql = 'UPDATE '.MAIN_DB_PREFIX.'expedition SET fk_statut=1'; $sql = 'UPDATE '.MAIN_DB_PREFIX.'expedition SET fk_statut=1';
$sql .= ' WHERE rowid = '.$this->id.' AND fk_statut > 0'; $sql .= ' WHERE rowid = '.$this->id.' AND fk_statut > 0';
@ -1882,7 +1880,7 @@ class Expedition extends CommonObject
*/ */
public function generateDocument($modele, $outputlangs,$hidedetails=0, $hidedesc=0, $hideref=0) public function generateDocument($modele, $outputlangs,$hidedetails=0, $hidedesc=0, $hideref=0)
{ {
global $conf,$user,$langs; global $conf,$langs;
$langs->load("sendings"); $langs->load("sendings");