From dce9c2bc76820a1bdd2d934dc4e487dd027a5c91 Mon Sep 17 00:00:00 2001 From: aspangaro Date: Wed, 28 May 2014 05:34:10 +0200 Subject: [PATCH 001/258] Fiscal year - 1st step --- htdocs/admin/fiscalyear.php | 315 +++++++++++++++++ htdocs/admin/fiscalyear_card.php | 325 ++++++++++++++++++ htdocs/core/class/fiscalyear.class.php | 272 +++++++++++++++ htdocs/core/menus/init_menu_auguria.sql | 19 +- htdocs/core/menus/standard/eldy.lib.php | 1 + htdocs/core/menus/standard/empty.php | 1 + .../tables/llx_accounting_fiscalyear.sql | 27 ++ htdocs/langs/en_US/admin.lang | 9 +- htdocs/langs/fr_FR/admin.lang | 7 +- 9 files changed, 964 insertions(+), 12 deletions(-) create mode 100644 htdocs/admin/fiscalyear.php create mode 100644 htdocs/admin/fiscalyear_card.php create mode 100644 htdocs/core/class/fiscalyear.class.php create mode 100644 htdocs/install/mysql/tables/llx_accounting_fiscalyear.sql diff --git a/htdocs/admin/fiscalyear.php b/htdocs/admin/fiscalyear.php new file mode 100644 index 00000000000..7929fd5046f --- /dev/null +++ b/htdocs/admin/fiscalyear.php @@ -0,0 +1,315 @@ + + * + * 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 + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/** + * \file htdocs/admin/fiscalyear.php + * \ingroup fiscal year + * \brief Setup page to configure fiscal year + */ + +require '../main.inc.php'; + +require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/fiscalyear.class.php'; + +$action=GETPOST('action'); + +$langs->load("admin"); +$langs->load("compta"); + +if (! $user->admin) accessforbidden(); + +$error=0; + +// List of statut +static $tmpstatut2label=array( + '0'=>'OpenFiscalYear', + '1'=>'CloseFiscalYear' +); +$statut2label=array(''); +foreach ($tmpstatut2label as $key => $val) $statut2label[$key]=$langs->trans($val); + +$mesg=''; +$errors=array(); + +$object = new Fiscalyear($db); + +/* + * Actions + */ + +// Add +if ($action == 'add') +{ + if (! GETPOST('cancel','alpha')) + { + $error=0; + + $object->label = GETPOST('label','alpha'); + $object->datestart = dol_mktime(12, 0, 0, GETPOST('startmonth','int'), GETPOST('startday','int'), GETPOST('startyear','int')); + $object->dateend = dol_mktime(12, 0, 0, GETPOST('endmonth','int'), GETPOST('endday','int'), GETPOST('endyear','int')); + $object->statut = 0; + + if (! $object->label) + { + $mesg='
'.$langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Label")).'
'; + $error++; + } + if (! $object->datestart) + { + $mesg='
'.$langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("DateStart")).'
'; + $error++; + } + if (! $object->dateend) + { + $mesg='
'.$langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("DateEnd")).'
'; + $error++; + } + + if (! $error) + { + $id = $object->create(); + + if ($id > 0) + { + header("Location: " . $_SERVER["PHP_SELF"] . "?id=" . $id); + exit; + } + else + { + $mesg=$object->error; + $action='create'; + } + } + else + { + $action='create'; + } + } + else + { + header("Location: index.php"); + exit; + } + + if (! GETPOST('cancel','alpha')) + { + $error=0; + + // Check values + $datestart = dol_mktime(12, 0, 0, $_POST['startmonth'], $_POST['startday'], $_POST['startyear']); + $dateend = dol_mktime(12, 0, 0, $_POST['endmonth'], $_POST['endday'], $_POST['endyear']); + $label = $_POST['label']; + + if (empty($label)) + { + $mesgs[]='
'.$langs->trans("ErrorFieldRequired",$langs->trans("Label")).'
'; + $error++; + //$action='create'; + } + if (empty($datestart) || empty($dateend)) + { + $mesgs[]='
'.$langs->trans("ErrorFieldRequired",$langs->trans("Date")).'
'; + $error++; + //$action='create'; + } + + if (! $error) + { + $this->db->begin(); + + $sql = "INSERT INTO ".MAIN_DB_PREFIX."accounting_fiscalyear"; + $sql.= " (label, datestart, dateend, statut, entity)"; + $sql.= " VALUES('".$label."',"; + $sql.= " '".$datestart."',"; + $sql.= " '".$dateend."',"; + $sql.= " ' 0,"; + $sql.= " ".$conf->entity."'"; + $sql.=')'; + + dol_syslog(get_class($this)."::create_label sql=".$sql); + if ($this->db->query($sql)) + { + return 1; + } + else + { + $this->error=$this->db->lasterror(); + $this->errno=$this->db->lasterrno(); + return -1; + } + } + } +} + +// Rename field +if ($action == 'update') +{ + if ($_POST["button"] != $langs->trans("Cancel")) + { + // Check values + if (! GETPOST('type')) + { + $error++; + $langs->load("errors"); + $mesg=$langs->trans("ErrorFieldRequired",$langs->trans("Type")); + $action = 'create'; + } + if (GETPOST('type')=='varchar' && $extrasize > $maxsizestring) + { + $error++; + $langs->load("errors"); + $mesg=$langs->trans("ErrorSizeTooLongForVarcharType",$maxsizestring); + $action = 'edit'; + } + if (GETPOST('type')=='int' && $extrasize > $maxsizeint) + { + $error++; + $langs->load("errors"); + $mesg=$langs->trans("ErrorSizeTooLongForIntType",$maxsizeint); + $action = 'edit'; + } + + if (! $error) + { + if (isset($_POST["attrname"]) && preg_match("/^\w[a-zA-Z0-9-_]*$/",$_POST['attrname'])) + { + $result=$extrafields->update($_POST['attrname'],$_POST['label'],$_POST['type'],$extrasize,$elementtype,(GETPOST('unique')?1:0)); + if ($result > 0) + { + header("Location: ".$_SERVER["PHP_SELF"]); + exit; + } + else + { + $error++; + $mesg=$extrafields->error; + } + } + else + { + $error++; + $langs->load("errors"); + $mesg=$langs->trans("ErrorFieldCanNotContainSpecialCharacters",$langs->transnoentities("AttributeCode")); + } + } + } +} + +// Delete attribute +if ($action == 'delete') +{ + if(isset($_GET["attrname"]) && preg_match("/^\w[a-zA-Z0-9-_]*$/",$_GET["attrname"])) + { + $result=$extrafields->delete($_GET["attrname"],$elementtype); + if ($result >= 0) + { + header("Location: ".$_SERVER["PHP_SELF"]); + exit; + } + else $mesg=$extrafields->error; + } + else + { + $error++; + $langs->load("errors"); + $mesg=$langs->trans("ErrorFieldCanNotContainSpecialCharacters",$langs->transnoentities("AttributeCode")); + } +} + +/* + * View + */ + +$form = new Form($db); + +llxHeader('',$title); + +$title = $langs->trans('Accountancysetup'); + +print_fiche_titre($langs->trans('Fiscalyear')); + +dol_htmloutput_errors($mesg); + +$sql = "SELECT f.rowid, f.label, f.datestart, f.dateend, f.statut, f.entity"; +$sql.= " FROM ".MAIN_DB_PREFIX."accounting_fiscalyear as f"; +$sql.= " WHERE f.entity = ".$conf->entity; + +$result = $db->query($sql); + +$max=10; + +if ($result) +{ + $var=false; + $num = $db->num_rows($result); + + $i = 0; + + // Load attribute_label + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + + if ($num) + { + $fiscalyearstatic=new Fiscalyear($db); + + while ($i < $num && $i < $max) + { + $obj = $db->fetch_object($result); + $fiscalyearstatic->ref=$obj->rowid; + $fiscalyearstatic->id=$obj->rowid; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + $var=!$var; + $i++; + } + + } + else + { + print ''; + } + + print '
'.$langs->trans("Ref").''.$langs->trans("Label").''.$langs->trans("DateStart").''.$langs->trans("DateEnd").''.$langs->trans("Statut").'
'.img_object($langs->trans("ShowFiscalYear"),"technic").' '.$obj->rowid.''.$obj->label.''.dol_print_date($db->jdate($obj->datestart),'day').''.dol_print_date($db->jdate($obj->dateend),'day').''.$fiscalyearstatic->LibStatut($obj->statut,5).'
'.$langs->trans("None").'
'; + print ''; +} +else +{ + dol_print_error($db); +} + +dol_fiche_end(); + +// Buttons +print ''; + +llxFooter(); +$db->close(); \ No newline at end of file diff --git a/htdocs/admin/fiscalyear_card.php b/htdocs/admin/fiscalyear_card.php new file mode 100644 index 00000000000..d18fdbc3ec4 --- /dev/null +++ b/htdocs/admin/fiscalyear_card.php @@ -0,0 +1,325 @@ + + * + * 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 + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/** + * \file htdocs/admin/fiscalyear_card.php + * \brief Page to show a fiscal yeartrip + */ + +require '../main.inc.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/fiscalyear.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; + + +$langs->load("admin"); +$langs->load("compta"); + +// Security check +if (! $user->admin) accessforbidden(); + +$error=0; + +$action = GETPOST('action','alpha'); +$confirm = GETPOST('confirm','alpha'); +$id = GETPOST('id','int'); + +// List of statut +static $tmpstatut2label=array( + '0'=>'OpenFiscalYear', + '1'=>'CloseFiscalYear' +); +$statut2label=array(''); +foreach ($tmpstatut2label as $key => $val) $statut2label[$key]=$langs->trans($val); + +$mesg = ''; + +$object = new Fiscalyear($db); + +/* + * Actions + */ + +include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not includ_once + +if ($action == 'confirm_delete' && $confirm == "yes") +{ + $result=$object->delete($id); + if ($result >= 0) + { + header("Location: fiscalyear.php"); + exit; + } + else + { + $mesg=$object->error; + } +} + +else if ($action == 'add') +{ + if (! GETPOST('cancel','alpha')) + { + $error=0; + + $object->datestart = dol_mktime(12, 0, 0, GETPOST('startmonth','int'), GETPOST('startday','int'), GETPOST('startyear','int')); + $object->dateend = dol_mktime(12, 0, 0, GETPOST('endmonth','int'), GETPOST('endday','int'), GETPOST('endyear','int')); + $object->label = GETPOST('label','alpha'); + $object->statut = GETPOST('statut','int');; + + /* + if (empty($object->datestart) && empty($object->dateend)) + { + $mesg=$langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Date")); + $error++; + } + */ + if (empty($object->label)) + { + $mesg='
'.$langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Label")).'
'; + $error++; + } + + if (! $error) + { + $id = $object->create($user); + + if ($id > 0) + { + header("Location: " . $_SERVER["PHP_SELF"] . "?id=" . $id); + exit; + } + else + { + $mesg=$object->error; + $action='create'; + } + } + else + { + $action='create'; + } + } + else + { + header("Location: fiscalyear.php"); + exit; + } +} + +// Update record +else if ($action == 'update') +{ + if (! GETPOST('cancel','alpha')) + { + $result = $object->fetch($id); + + $object->datestart = dol_mktime(12, 0, 0, GETPOST('startmonth','int'), GETPOST('startday','int'), GETPOST('startyear','int')); + $object->dateend = dol_mktime(12, 0, 0, GETPOST('endmonth','int'), GETPOST('endday','int'), GETPOST('endyear','int')); + $object->label = GETPOST('label','alpha'); + $object->statut = GETPOST('statut','int'); + + $result = $object->update($user); + + if ($result > 0) + { + header("Location: " . $_SERVER["PHP_SELF"] . "?id=" . $id); + exit; + } + else + { + $mesg=$object->error; + } + } + else + { + header("Location: " . $_SERVER["PHP_SELF"] . "?id=" . $id); + exit; + } +} + +/* + * View + */ + +llxHeader(); + +$form = new Form($db); + +/* + * Action create +*/ +if ($action == 'create') +{ + print_fiche_titre($langs->trans("NewFiscalYear")); + + dol_htmloutput_errors($mesg); + + $datestart = dol_mktime(12, 0, 0, GETPOST('startmonth','int'), GETPOST('startday','int'), GETPOST('startyear','int')); + $dateend = dol_mktime(12, 0, 0, GETPOST('endmonth','int'), GETPOST('endday','int'), GETPOST('endyear','int')); + + print '
' . "\n"; + print ''; + print ''; + + print ''; + + // Label + print ''; + + // Date start + print ""; + print ''; + + // Date end + print ""; + print ''; + + // Statut + print ''; + print ''; + print ''; + + print '
'.$langs->trans("Label").'
'.$langs->trans("DateStart").''; + print $form->select_date($datestart?$datestart:-1,'','','','','add',1,1); + print '
'.$langs->trans("DateEnd").''; + print $form->select_date($dateend?$dateend:-1,'','','','','add',1,1); + print '
'.$langs->trans("Statut").''.$form->selectarray('statut',$statut2label,GETPOST('statut')).'
'; + + print '
    '; + print ''; +} +else if ($id) +{ + $result = $object->fetch($id); + if ($result > 0) + { + dol_htmloutput_mesg($mesg); + + if ($action == 'edit') + { + print '' . "\n"; + print ''; + print ''; + print ''; + + print ''; + + // Ref + print ""; + print ''; + + // Label + print ''; + + // Date start + print ''; + + // Date end + print ''; + + print '
'.$langs->trans("Ref").''; + print $object->rowid; + print '
'.$langs->trans("Label").''; + print ''; + print '
'.$langs->trans("DateStart").''; + print $form->select_date($object->datestart,'','','','','update'); + print '
'.$langs->trans("DateEnd").''; + print $form->select_date($object->dateend,'','','','','update'); + print '
'; + + print '
  '; + print ''; + print '
'; + + print ''; + + print ''; + } + else + { + /* + * Confirm delete + */ + if ($action == 'delete') + { + print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$id,$langs->trans("DeleteFiscalYear"),$langs->trans("ConfirmDeleteFiscalYear"),"confirm_delete"); + + } + + print ''; + + $linkback = ''.$langs->trans("BackToList").''; + + // Ref + print ''; + + // Label + print '"; + + // Date start + print ''; + + // Date end + print ''; + + // Statut + print ''; + + print "
'.$langs->trans("Ref").''; + print $object->rowid; + print ''; + print $linkback; + print '
'; + print $form->editfieldkey("Label",'label',$object->label,$object,$conf->global->MAIN_EDIT_ALSO_INLINE,'alpha:32'); + print ''; + print $form->editfieldval("Label",'label',$object->label,$object,$conf->global->MAIN_EDIT_ALSO_INLINE,'alpha:32'); + print "
'; + print $form->editfieldkey("Date",'datestart',$object->datestart,$object,$conf->global->MAIN_EDIT_ALSO_INLINE,'datepicker'); + print ''; + print $form->editfieldval("Date",'datestart',$object->datestart,$object,$conf->global->MAIN_EDIT_ALSO_INLINE,'datepicker'); + print '
'; + print $form->editfieldkey("Date",'dateend',$object->dateend,$object,$conf->global->MAIN_EDIT_ALSO_INLINE,'datepicker'); + print ''; + print $form->editfieldval("Date",'dateend',$object->dateend,$object,$conf->global->MAIN_EDIT_ALSO_INLINE,'datepicker'); + print '
'.$langs->trans("Status").''.$object->getLibStatut(4).'

"; + + print ''; + + /* + * Barre d'actions + */ + + print '
'; + + print ''.$langs->trans('Modify').''; + + print ''.$langs->trans('Delete').''; + + print '
'; + } + } + else + { + dol_print_error($db); + } +} + +llxFooter(); +$db->close(); diff --git a/htdocs/core/class/fiscalyear.class.php b/htdocs/core/class/fiscalyear.class.php new file mode 100644 index 00000000000..3d48d47a082 --- /dev/null +++ b/htdocs/core/class/fiscalyear.class.php @@ -0,0 +1,272 @@ + + * + * 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 + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/** + * \file htdocs/core/class/fiscalyear.php + * \ingroup fiscal year + * \brief Page d'administration/configuration + */ + +require_once DOL_DOCUMENT_ROOT .'/core/class/commonobject.class.php'; + +/** + * Class to manage fiscal year + */ +class Fiscalyear +{ + public $element='Fiscalyear'; + public $table_element='accounting_fiscalyear'; + public $table_element_line = ''; + public $fk_element = ''; + protected $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe + + var $id; + var $rowid; + + var $label; + var $datestart; + var $dateend; + var $statut; // 0=open, 1=closed + var $entity; + + var $statuts=array(); + var $statuts_short=array(); + + /** + * Constructor + * + * @param DoliDB $db Database handler + */ + function __construct($db) + { + $this->db = $db; + + $this->statuts_short = array(0 => 'Opened', 1 => 'Closed'); + $this->statuts = array(0 => 'Opened', 1 => 'Closed'); + + return 1; + } + + /** + * Create object in database + * + * @return int <0 if KO, >0 if OK + */ + function create() + { + global $conf; + + $this->db->begin(); + + $sql = "INSERT INTO ".MAIN_DB_PREFIX."accounting_fiscalyear ("; + $sql.= " label"; + $sql.= ", datestart"; + $sql.= ", dateend"; + $sql.= ", statut"; + $sql.= ", entity"; + $sql.= ") VALUES ("; + $sql.= " '".$this->label; + $sql.= "', ".$this->db->idate($this->datestart); + $sql.= ", ".$this->db->idate($this->dateend); + $sql.= ", ".$this->statut; + $sql.= ", ".$conf->entity; + $sql.= ")"; + + dol_syslog(get_class($this)."::create sql=".$sql, LOG_DEBUG); + $result = $this->db->query($sql); + if ($result) + { + $error++; $this->errors[]="Error ".$this->db->lasterror(); + } + + if (! $error) + { + $this->rowid = $this->db->last_insert_id(MAIN_DB_PREFIX."accounting_fiscalyear"); + } + + // Commit or rollback + if ($error) + { + foreach($this->errors as $errmsg) + { + dol_syslog(get_class($this)."::create ".$errmsg, LOG_ERR); + $this->error.=($this->error?', '.$errmsg:$errmsg); + } + $this->db->rollback(); + return -1*$error; + } + else + { + $this->db->commit(); + return $this->rowid; + } + + dol_syslog(get_class($this)."::create sql=".$sql, LOG_DEBUG); + $result = $this->db->query($sql); + if ($result) + { + $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."accounting_fiscalyear"); + + $result=$this->update($user); + if ($result > 0) + { + $this->db->commit(); + return $this->rowid; + } + else + { + $this->error=$this->db->error(); + $this->db->rollback(); + return $result; + } + } + else + { + $this->error=$this->db->error()." sql=".$sql; + $this->db->rollback(); + return -1; + } + } + + /** + * Update record + * + * @param User $user User making update + * @return int <0 if KO, >0 if OK + */ + function update($user) + { + global $langs; + + // Check parameters + if (empty($this->datestart) && empty($this->dateend)) + { + $this->error='ErrorBadParameter'; + return -1; + } + + $this->db->begin(); + + $sql = "UPDATE ".MAIN_DB_PREFIX."accounting_fiscalyear "; + $sql .= " SET label = ".$this->label; + $sql .= " , datestart = '".$this->db->idate($this->datestart)."'"; + $sql .= " , dateend = '".$this->db->idate($this->dateend)."'"; + $sql .= " , statut = '".$this->statut."'"; + $sql .= " WHERE rowid = ".$this->id; + + dol_syslog(get_class($this)."::update sql=".$sql, LOG_DEBUG); + $result = $this->db->query($sql); + if ($result) + { + $this->db->commit(); + return 1; + } + else + { + $this->error=$this->db->lasterror(); + $this->db->rollback(); + return -1; + } + } + + /** + * Load an object from database + * + * @param int $id Id of record to load + * @return int <0 if KO, >0 if OK + */ + function fetch($id) + { + $sql = "SELECT rowid, label, datestart, dateend, statut"; + $sql.= " FROM ".MAIN_DB_PREFIX."accounting_fiscalyear"; + $sql.= " WHERE rowid = ".$id; + + dol_syslog(get_class($this)."::fetch sql=".$sql, LOG_DEBUG); + $result = $this->db->query($sql); + if ( $result ) + { + $obj = $this->db->fetch_object($result); + + $this->id = $obj->rowid; + $this->ref = $obj->rowid; + $this->datestart = $this->db->jdate($obj->datestart); + $this->dateend = $this->db->jdate($obj->dateend); + $this->label = $obj->label; + $this->statut = $obj->statut; + + return 1; + } + else + { + $this->error=$this->db->error(); + return -1; + } + } + + /** + * Give a label from a status + * + * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto + * @return string Label + */ + function getLibStatut($mode=0) + { + return $this->LibStatut($this->statut,$mode); + } + + /** + * Give a label from a status + * + * @param int $statut Id status + * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto + * @return string Label + */ + function LibStatut($statut,$mode=0) + { + global $langs; + + if ($mode == 0) + { + return $langs->trans($this->statuts[$statut]); + } + if ($mode == 1) + { + return $langs->trans($this->statuts_short[$statut]); + } + if ($mode == 2) + { + if ($statut==0) return img_picto($langs->trans($this->statuts_short[$statut]),'statut0').' '.$langs->trans($this->statuts_short[$statut]); + if ($statut==1) return img_picto($langs->trans($this->statuts_short[$statut]),'statut4').' '.$langs->trans($this->statuts_short[$statut]); + } + if ($mode == 3) + { + if ($statut==0 && ! empty($this->statuts_short[$statut])) return img_picto($langs->trans($this->statuts_short[$statut]),'statut0'); + if ($statut==1 && ! empty($this->statuts_short[$statut])) return img_picto($langs->trans($this->statuts_short[$statut]),'statut4'); + } + if ($mode == 4) + { + if ($statut==0 && ! empty($this->statuts_short[$statut])) return img_picto($langs->trans($this->statuts_short[$statut]),'statut0').' '.$langs->trans($this->statuts[$statut]); + if ($statut==1 && ! empty($this->statuts_short[$statut])) return img_picto($langs->trans($this->statuts_short[$statut]),'statut4').' '.$langs->trans($this->statuts[$statut]); + } + if ($mode == 5) + { + if ($statut==0 && ! empty($this->statuts_short[$statut])) return $langs->trans($this->statuts_short[$statut]).' '.img_picto($langs->trans($this->statuts_short[$statut]),'statut0'); + if ($statut==1 && ! empty($this->statuts_short[$statut])) return $langs->trans($this->statuts_short[$statut]).' '.img_picto($langs->trans($this->statuts_short[$statut]),'statut4'); + } + } + +} \ No newline at end of file diff --git a/htdocs/core/menus/init_menu_auguria.sql b/htdocs/core/menus/init_menu_auguria.sql index f8e5828bbd1..b5e85d7830d 100644 --- a/htdocs/core/menus/init_menu_auguria.sql +++ b/htdocs/core/menus/init_menu_auguria.sql @@ -25,16 +25,17 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="setup"', __HANDLER__, 'left', 101__+MAX_llx_menu__, 'home', '', 100__+MAX_llx_menu__, '/admin/company.php?leftmenu=setup', 'MenuCompanySetup', 1, 'admin', '', '', 2, 1, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="setup"', __HANDLER__, 'left', 102__+MAX_llx_menu__, 'home', '', 100__+MAX_llx_menu__, '/admin/ihm.php?leftmenu=setup', 'GUISetup', 1, 'admin', '', '', 2, 4, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="setup"', __HANDLER__, 'left', 103__+MAX_llx_menu__, 'home', '', 100__+MAX_llx_menu__, '/admin/modules.php?leftmenu=setup', 'Modules', 1, 'admin', '', '', 2, 2, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="setup"', __HANDLER__, 'left', 104__+MAX_llx_menu__, 'home', '', 100__+MAX_llx_menu__, '/admin/boxes.php?leftmenu=setup', 'Boxes', 1, 'admin', '', '', 2, 5, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="setup"', __HANDLER__, 'left', 104__+MAX_llx_menu__, 'home', '', 100__+MAX_llx_menu__, '/admin/boxes.php?leftmenu=setup', 'Boxes', 1, 'admin', '', '', 2, 6, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="setup"', __HANDLER__, 'left', 105__+MAX_llx_menu__, 'home', '', 100__+MAX_llx_menu__, '/admin/menus.php?leftmenu=setup', 'Menus', 1, 'admin', '', '', 2, 3, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="setup"', __HANDLER__, 'left', 106__+MAX_llx_menu__, 'home', '', 100__+MAX_llx_menu__, '/admin/delais.php?leftmenu=setup', 'Alerts', 1, 'admin', '', '', 2, 6, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="setup"', __HANDLER__, 'left', 108__+MAX_llx_menu__, 'home', '', 100__+MAX_llx_menu__, '/admin/proxy.php?leftmenu=setup', 'Security', 1, 'admin', '', '', 2, 7, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="setup"', __HANDLER__, 'left', 110__+MAX_llx_menu__, 'home', '', 100__+MAX_llx_menu__, '/admin/limits.php?leftmenu=setup', 'MenuLimits', 1, 'admin', '', '', 2, 8, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="setup"', __HANDLER__, 'left', 107__+MAX_llx_menu__, 'home', '', 100__+MAX_llx_menu__, '/admin/pdf.php?leftmenu=setup', 'PDF', 1, 'admin', '', '', 2, 9, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="setup"', __HANDLER__, 'left', 109__+MAX_llx_menu__, 'home', '', 100__+MAX_llx_menu__, '/admin/mails.php?leftmenu=setup', 'Emails', 1, 'admin', '', '', 2, 10, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="setup"', __HANDLER__, 'left', 113__+MAX_llx_menu__, 'home', '', 100__+MAX_llx_menu__, '/admin/sms.php?leftmenu=setup', 'SMS', 1, 'admin', '', '', 2, 11, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="setup"', __HANDLER__, 'left', 111__+MAX_llx_menu__, 'home', '', 100__+MAX_llx_menu__, '/admin/dict.php?leftmenu=setup', 'Dictionary', 1, 'admin', '', '', 2, 12, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="setup"', __HANDLER__, 'left', 112__+MAX_llx_menu__, 'home', '', 100__+MAX_llx_menu__, '/admin/const.php?leftmenu=setup', 'OtherSetup', 1, 'admin', '', '', 2, 13, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="setup"', __HANDLER__, 'left', 114__+MAX_llx_menu__, 'home', '', 100__+MAX_llx_menu__, '/admin/fiscalyear.php?leftmenu=setup', 'Fiscalyear', 1, 'admin', '', '', 2, 5, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="setup"', __HANDLER__, 'left', 106__+MAX_llx_menu__, 'home', '', 100__+MAX_llx_menu__, '/admin/delais.php?leftmenu=setup', 'Alerts', 1, 'admin', '', '', 2, 7, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="setup"', __HANDLER__, 'left', 108__+MAX_llx_menu__, 'home', '', 100__+MAX_llx_menu__, '/admin/proxy.php?leftmenu=setup', 'Security', 1, 'admin', '', '', 2, 8, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="setup"', __HANDLER__, 'left', 110__+MAX_llx_menu__, 'home', '', 100__+MAX_llx_menu__, '/admin/limits.php?leftmenu=setup', 'MenuLimits', 1, 'admin', '', '', 2, 9, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="setup"', __HANDLER__, 'left', 107__+MAX_llx_menu__, 'home', '', 100__+MAX_llx_menu__, '/admin/pdf.php?leftmenu=setup', 'PDF', 1, 'admin', '', '', 2, 10, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="setup"', __HANDLER__, 'left', 109__+MAX_llx_menu__, 'home', '', 100__+MAX_llx_menu__, '/admin/mails.php?leftmenu=setup', 'Emails', 1, 'admin', '', '', 2, 11, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="setup"', __HANDLER__, 'left', 113__+MAX_llx_menu__, 'home', '', 100__+MAX_llx_menu__, '/admin/sms.php?leftmenu=setup', 'SMS', 1, 'admin', '', '', 2, 12, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="setup"', __HANDLER__, 'left', 111__+MAX_llx_menu__, 'home', '', 100__+MAX_llx_menu__, '/admin/dict.php?leftmenu=setup', 'Dictionary', 1, 'admin', '', '', 2, 13, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="setup"', __HANDLER__, 'left', 112__+MAX_llx_menu__, 'home', '', 100__+MAX_llx_menu__, '/admin/const.php?leftmenu=setup', 'OtherSetup', 1, 'admin', '', '', 2, 14, __ENTITY__); -- Home - Sytem info insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$user->admin', __HANDLER__, 'left', 300__+MAX_llx_menu__, 'home', 'admintools', 1__+MAX_llx_menu__, '/admin/tools/index.php?leftmenu=admintools', 'SystemTools', 0, 'admin', '', '', 2, 2, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="admintools"', __HANDLER__, 'left', 201__+MAX_llx_menu__, 'home', '', 300__+MAX_llx_menu__, '/admin/system/dolibarr.php?leftmenu=admintools', 'InfoDolibarr', 1, 'admin', '', '', 2, 0, __ENTITY__); diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php index 35b3f78c5e7..29ad35214cd 100644 --- a/htdocs/core/menus/standard/eldy.lib.php +++ b/htdocs/core/menus/standard/eldy.lib.php @@ -501,6 +501,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu $newmenu->add("/admin/modules.php?mainmenu=home", $langs->trans("Modules").$warnpicto,1); $newmenu->add("/admin/menus.php?mainmenu=home", $langs->trans("Menus"),1); $newmenu->add("/admin/ihm.php?mainmenu=home", $langs->trans("GUISetup"),1); + $newmenu->add("/admin/fiscalyear.php?mainmenu=home", $langs->trans("Fiscalyear"),1); if (! in_array($langs->defaultlang,array('en_US','en_GB','en_NZ','en_AU','fr_FR','fr_BE','es_ES','ca_ES'))) { if (empty($leftmenu) || $leftmenu=="setup") $newmenu->add("/admin/translation.php", $langs->trans("Translation"),1); diff --git a/htdocs/core/menus/standard/empty.php b/htdocs/core/menus/standard/empty.php index f316d334928..a6063c84d18 100644 --- a/htdocs/core/menus/standard/empty.php +++ b/htdocs/core/menus/standard/empty.php @@ -115,6 +115,7 @@ class MenuManager $this->menu->add("/admin/modules.php", $langs->trans("Modules"),1); $this->menu->add("/admin/menus.php", $langs->trans("Menus"),1); $this->menu->add("/admin/ihm.php", $langs->trans("GUISetup"),1); + $this->menu->add("/admin/fiscalyear.php", $langs->trans("Fiscalyear"),1); $this->menu->add("/admin/boxes.php", $langs->trans("Boxes"),1); $this->menu->add("/admin/delais.php",$langs->trans("Alerts"),1); $this->menu->add("/admin/proxy.php?mainmenu=home", $langs->trans("Security"),1); diff --git a/htdocs/install/mysql/tables/llx_accounting_fiscalyear.sql b/htdocs/install/mysql/tables/llx_accounting_fiscalyear.sql new file mode 100644 index 00000000000..fe8563d7250 --- /dev/null +++ b/htdocs/install/mysql/tables/llx_accounting_fiscalyear.sql @@ -0,0 +1,27 @@ +-- ============================================================================ +-- Copyright (C) 2014 Alexandre Spangaro +-- +-- 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 +-- the Free Software Foundation; either version 3 of the License, or +-- (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program. If not, see . +-- +-- ============================================================================ + +create table llx_accounting_fiscalyear +( + rowid integer AUTO_INCREMENT PRIMARY KEY, + label varchar(128) NOT NULL, + datestart date, + dateend date, + statut tinyint DEFAULT 0 NOT NULL, + entity integer DEFAULT 1 NOT NULL -- multi company id +)ENGINE=innodb; diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index d22e27c1cbf..1f3cb7ed0c1 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -1496,7 +1496,12 @@ TasksNumberingModules=Tasks numbering module TaskModelModule=Tasks reports document model ##### ECM (GED) ##### ECMSetup = GED Setup -ECMAutoTree = Automatic tree folder and document - +ECMAutoTree = Automatic tree folder and document +##### Fiscal Year ##### +Fiscalyear=Fiscal years +OpenFiscalYear=Open fiscal year +CloseFiscalYear=Close fiscal year +Opened=Opened +Closed=Closed Format=Format \ No newline at end of file diff --git a/htdocs/langs/fr_FR/admin.lang b/htdocs/langs/fr_FR/admin.lang index 059e3e4bac2..bc29d977ed2 100644 --- a/htdocs/langs/fr_FR/admin.lang +++ b/htdocs/langs/fr_FR/admin.lang @@ -1497,6 +1497,11 @@ TaskModelModule=Modèles de document de rapport tâches ##### ECM (GED) ##### ECMSetup = Configuration du module GED ECMAutoTree = L'arborescence automatique est disponible - +##### Fiscal Year ##### +Fiscalyear=Exercices fiscaux +OpenFiscalYear=Exercice fiscal ouvert +CloseFiscalYear=Exercice fiscal fermé +Opened=Ouvert +Closed=Fermé Format=Format From ae4bd4445e8142331bdc4ae9da63a97e89e7dd2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Mon, 9 Jun 2014 15:38:43 +0200 Subject: [PATCH 002/258] Moved dol_syslog query log to the database handler and decreased report level to DEBUG --- htdocs/admin/menus/index.php | 1 - htdocs/comm/mailing/liste.php | 1 - htdocs/compta/bank/categ.php | 3 --- htdocs/compta/bank/releve.php | 1 - htdocs/compta/dons/class/don.class.php | 4 ---- htdocs/compta/journal/purchasesjournal.php | 1 - htdocs/compta/journal/sellsjournal.php | 1 - htdocs/compta/paiement/cheque/fiche.php | 1 - htdocs/core/db/mssql.class.php | 2 ++ htdocs/core/db/mysql.class.php | 2 ++ htdocs/core/db/mysqli.class.php | 2 ++ htdocs/core/db/pgsql.class.php | 3 +++ htdocs/core/db/sqlite.class.php | 2 ++ htdocs/core/lib/functions2.lib.php | 3 --- htdocs/core/modules/mailings/contacts3.modules.php | 1 - htdocs/fichinter/class/fichinter.class.php | 1 - htdocs/fourn/class/paiementfourn.class.php | 2 -- htdocs/opensurvey/class/opensurveysondage.class.php | 1 - htdocs/opensurvey/exportcsv.php | 1 - htdocs/opensurvey/public/studs.php | 1 - htdocs/opensurvey/results.php | 4 ---- htdocs/societe/consumption.php | 1 - htdocs/user/perms.php | 1 - scripts/emailings/mailing-send.php | 1 - 24 files changed, 11 insertions(+), 30 deletions(-) diff --git a/htdocs/admin/menus/index.php b/htdocs/admin/menus/index.php index e598afe07a3..bade95cdcce 100644 --- a/htdocs/admin/menus/index.php +++ b/htdocs/admin/menus/index.php @@ -304,7 +304,6 @@ if ($conf->use_javascript_ajax) $sql.= " AND fk_menu >= 0"; $sql.= " ORDER BY m.position, m.rowid"; // Order is position then rowid (because we need a sort criteria when position is same) - dol_syslog("sql=".$sql); $res = $db->query($sql); if ($res) { diff --git a/htdocs/comm/mailing/liste.php b/htdocs/comm/mailing/liste.php index 617096561a3..3e06e5af005 100644 --- a/htdocs/comm/mailing/liste.php +++ b/htdocs/comm/mailing/liste.php @@ -82,7 +82,6 @@ else $sql.= $db->plimit($conf->liste_limit +1, $offset); } -dol_syslog("sql=".$sql); //print $sql; $result = $db->query($sql); if ($result) diff --git a/htdocs/compta/bank/categ.php b/htdocs/compta/bank/categ.php index 41abab1ace0..5aa72d4c049 100644 --- a/htdocs/compta/bank/categ.php +++ b/htdocs/compta/bank/categ.php @@ -52,7 +52,6 @@ if (GETPOST('add')) $sql.= ", ".$conf->entity; $sql.= ")"; - dol_syslog("sql=".$sql); $result = $db->query($sql); if (!$result) { @@ -73,7 +72,6 @@ if (GETPOST('update')) $sql.= " WHERE rowid = '".GETPOST('categid')."'"; $sql.= " AND entity = ".$conf->entity; - dol_syslog("sql=".$sql); $result = $db->query($sql); if (!$result) { @@ -92,7 +90,6 @@ if ($action == 'delete') $sql.= " WHERE rowid = '".GETPOST('categid')."'"; $sql.= " AND entity = ".$conf->entity; - dol_syslog("sql=".$sql); $result = $db->query($sql); if (!$result) { diff --git a/htdocs/compta/bank/releve.php b/htdocs/compta/bank/releve.php index 0d0246f28e6..dba271e672b 100644 --- a/htdocs/compta/bank/releve.php +++ b/htdocs/compta/bank/releve.php @@ -277,7 +277,6 @@ else $sql.= " AND b.fk_account = ba.rowid"; $sql.= $db->order("b.datev, b.datec", "ASC"); // We add date of creation to have correct order when everything is done the same day - dol_syslog("sql=".$sql); $result = $db->query($sql); if ($result) { diff --git a/htdocs/compta/dons/class/don.class.php b/htdocs/compta/dons/class/don.class.php index f7bd819d969..a37b0433c80 100644 --- a/htdocs/compta/dons/class/don.class.php +++ b/htdocs/compta/dons/class/don.class.php @@ -535,7 +535,6 @@ class Don extends CommonObject $sql = "UPDATE ".MAIN_DB_PREFIX."don SET fk_statut = 1, fk_user_valid = $userid WHERE rowid = $rowid AND fk_statut = 0"; - dol_syslog("sql=".$sql); $resql=$this->db->query($sql); if ($resql) { @@ -571,7 +570,6 @@ class Don extends CommonObject } $sql .= " WHERE rowid = $rowid AND fk_statut = 1"; - dol_syslog("sql=".$sql); $resql=$this->db->query($sql); if ($resql) { @@ -603,7 +601,6 @@ class Don extends CommonObject $sql = "UPDATE ".MAIN_DB_PREFIX."don SET fk_statut = 3 WHERE rowid = $rowid AND fk_statut = 2"; - dol_syslog("sql=".$sql); $resql=$this->db->query($sql); if ($resql) { @@ -633,7 +630,6 @@ class Don extends CommonObject { $sql = "UPDATE ".MAIN_DB_PREFIX."don SET fk_statut = -1 WHERE rowid = ".$rowid; - dol_syslog("sql=".$sql); $resql=$this->db->query($sql); if ($resql) { diff --git a/htdocs/compta/journal/purchasesjournal.php b/htdocs/compta/journal/purchasesjournal.php index 52562ed0244..5e481b49dcc 100644 --- a/htdocs/compta/journal/purchasesjournal.php +++ b/htdocs/compta/journal/purchasesjournal.php @@ -117,7 +117,6 @@ if ($date_start && $date_end) $sql .= " AND f.datef >= '".$db->idate($date_start // TODO Find a better trick to avoid problem with some mysql installations if (in_array($db->type, array('mysql', 'mysqli'))) $db->query('SET SQL_BIG_SELECTS=1'); -dol_syslog("sql=".$sql); $result = $db->query($sql); if ($result) { diff --git a/htdocs/compta/journal/sellsjournal.php b/htdocs/compta/journal/sellsjournal.php index 931b8757470..ce8bd9c7944 100644 --- a/htdocs/compta/journal/sellsjournal.php +++ b/htdocs/compta/journal/sellsjournal.php @@ -121,7 +121,6 @@ $sql.= " ORDER BY f.rowid"; // TODO Find a better trick to avoid problem with some mysql installations if (in_array($db->type, array('mysql', 'mysqli'))) $db->query('SET SQL_BIG_SELECTS=1'); -dol_syslog("sql=".$sql); $result = $db->query($sql); if ($result) { diff --git a/htdocs/compta/paiement/cheque/fiche.php b/htdocs/compta/paiement/cheque/fiche.php index fe396976f10..a2bf8a7bede 100644 --- a/htdocs/compta/paiement/cheque/fiche.php +++ b/htdocs/compta/paiement/cheque/fiche.php @@ -609,7 +609,6 @@ else $sql.= " AND b.fk_bordereau = ".$object->id; $sql.= " ORDER BY $sortfield $sortorder"; - dol_syslog("sql=".$sql); $resql = $db->query($sql); if ($resql) { diff --git a/htdocs/core/db/mssql.class.php b/htdocs/core/db/mssql.class.php index bf67bd7d8b3..52c4fc85de1 100644 --- a/htdocs/core/db/mssql.class.php +++ b/htdocs/core/db/mssql.class.php @@ -359,6 +359,8 @@ class DoliDBMssql extends DoliDB $ret = mssql_query($query, $this->db); } + dol_syslog('sql='.$query, LOG_DEBUG); + if (! preg_match("/^COMMIT/i",$query) && ! preg_match("/^ROLLBACK/i",$query)) { // Si requete utilisateur, on la sauvegarde ainsi que son resultset diff --git a/htdocs/core/db/mysql.class.php b/htdocs/core/db/mysql.class.php index ab9d6e5850e..00cc3868cd6 100644 --- a/htdocs/core/db/mysql.class.php +++ b/htdocs/core/db/mysql.class.php @@ -263,6 +263,8 @@ class DoliDBMysql extends DoliDB $ret = mysql_query($query, $this->db); } + dol_syslog('sql='.$query, LOG_DEBUG); + if (! preg_match("/^COMMIT/i",$query) && ! preg_match("/^ROLLBACK/i",$query)) { // Si requete utilisateur, on la sauvegarde ainsi que son resultset diff --git a/htdocs/core/db/mysqli.class.php b/htdocs/core/db/mysqli.class.php index 40061a4fa1a..336780a1a09 100644 --- a/htdocs/core/db/mysqli.class.php +++ b/htdocs/core/db/mysqli.class.php @@ -265,6 +265,8 @@ class DoliDBMysqli extends DoliDB $ret = mysqli_query($this->db,$query); } + dol_syslog('sql='.$query, LOG_DEBUG); + if (! preg_match("/^COMMIT/i",$query) && ! preg_match("/^ROLLBACK/i",$query)) { // Si requete utilisateur, on la sauvegarde ainsi que son resultset diff --git a/htdocs/core/db/pgsql.class.php b/htdocs/core/db/pgsql.class.php index 155977cc8d1..b5959df1f63 100644 --- a/htdocs/core/db/pgsql.class.php +++ b/htdocs/core/db/pgsql.class.php @@ -492,6 +492,9 @@ class DoliDBPgsql extends DoliDB } $ret = @pg_query($this->db, $query); + + dol_syslog('sql='.$query, LOG_DEBUG); + //print $query; if (! preg_match("/^COMMIT/i",$query) && ! preg_match("/^ROLLBACK/i",$query)) // Si requete utilisateur, on la sauvegarde ainsi que son resultset { diff --git a/htdocs/core/db/sqlite.class.php b/htdocs/core/db/sqlite.class.php index ad5c6532c9e..f06a92c401f 100644 --- a/htdocs/core/db/sqlite.class.php +++ b/htdocs/core/db/sqlite.class.php @@ -399,6 +399,8 @@ class DoliDBSqlite extends DoliDB $this->error=$e->getMessage(); } + dol_syslog('sql='.$query, LOG_DEBUG); + if (! preg_match("/^COMMIT/i",$query) && ! preg_match("/^ROLLBACK/i",$query)) { // Si requete utilisateur, on la sauvegarde ainsi que son resultset diff --git a/htdocs/core/lib/functions2.lib.php b/htdocs/core/lib/functions2.lib.php index 917ceaf0e65..2f2a313699a 100644 --- a/htdocs/core/lib/functions2.lib.php +++ b/htdocs/core/lib/functions2.lib.php @@ -1582,7 +1582,6 @@ function cleanCorruptedTree($db, $tabletocleantree, $fieldfkparent) // Check loops on each other $sql = "UPDATE ".MAIN_DB_PREFIX.$tabletocleantree." SET ".$fieldfkparent." = 0 WHERE ".$fieldfkparent." = rowid"; // So we update only records linked to themself - dol_syslog("sql=".$sql); $resql = $db->query($sql); if ($resql) { @@ -1623,7 +1622,6 @@ function cleanCorruptedTree($db, $tabletocleantree, $fieldfkparent) $sql = "UPDATE ".MAIN_DB_PREFIX.$tabletocleantree; $sql.= " SET ".$fieldfkparent." = 0"; $sql.= " WHERE rowid IN (".join(',',$listofidtoclean).")"; // So we update only records detected wrong - dol_syslog("sql=".$sql); $resql = $db->query($sql); if ($resql) { @@ -1643,7 +1641,6 @@ function cleanCorruptedTree($db, $tabletocleantree, $fieldfkparent) $sql = "UPDATE ".MAIN_DB_PREFIX.$tabletocleantree; $sql.= " SET ".$fieldfkparent." = 0"; $sql.= " WHERE ".$fieldfkparent." NOT IN (".join(',',$listofid).")"; // So we update only records linked to a non existing parent - dol_syslog("sql=".$sql); $resql = $db->query($sql); if ($resql) { diff --git a/htdocs/core/modules/mailings/contacts3.modules.php b/htdocs/core/modules/mailings/contacts3.modules.php index 4c6480b8812..2cf5a708056 100644 --- a/htdocs/core/modules/mailings/contacts3.modules.php +++ b/htdocs/core/modules/mailings/contacts3.modules.php @@ -92,7 +92,6 @@ class mailing_contacts3 extends MailingTargets if ($filtersarray[0] <> 'all') $sql.= " AND c.label = '".$this->db->escape($filtersarray[0])."'"; $sql.= " ORDER BY sp.lastname, sp.firstname"; - dol_syslog("sql=".$sql); $resql = $this->db->query($sql); if ($resql) { diff --git a/htdocs/fichinter/class/fichinter.class.php b/htdocs/fichinter/class/fichinter.class.php index d7bb50682fe..52585d29122 100644 --- a/htdocs/fichinter/class/fichinter.class.php +++ b/htdocs/fichinter/class/fichinter.class.php @@ -875,7 +875,6 @@ class Fichinter extends CommonObject $sql.= " WHERE rowid = ".$this->id; $sql.= " AND entity = ".$conf->entity; - dol_syslog("sql=".$sql); if ($this->db->query($sql)) { $this->fk_contrat = $contractid; diff --git a/htdocs/fourn/class/paiementfourn.class.php b/htdocs/fourn/class/paiementfourn.class.php index 627b2de0d84..69912e77cb0 100644 --- a/htdocs/fourn/class/paiementfourn.class.php +++ b/htdocs/fourn/class/paiementfourn.class.php @@ -286,13 +286,11 @@ class PaiementFourn extends Paiement // Efface la ligne de paiement (dans paiement_facture et paiement) $sql = 'DELETE FROM '.MAIN_DB_PREFIX.'paiementfourn_facturefourn'; $sql.= ' WHERE fk_paiementfourn = '.$this->id; - dol_syslog("sql=".$sql); $resql = $this->db->query($sql); if ($resql) { $sql = 'DELETE FROM '.MAIN_DB_PREFIX.'paiementfourn'; $sql.= ' WHERE rowid = '.$this->id; - dol_syslog("sql=".$sql); $result = $this->db->query($sql); if (! $result) { diff --git a/htdocs/opensurvey/class/opensurveysondage.class.php b/htdocs/opensurvey/class/opensurveysondage.class.php index 37c04e50a29..602f5405ca2 100644 --- a/htdocs/opensurvey/class/opensurveysondage.class.php +++ b/htdocs/opensurvey/class/opensurveysondage.class.php @@ -474,7 +474,6 @@ class Opensurveysondage extends CommonObject $sql = "INSERT INTO ".MAIN_DB_PREFIX."opensurvey_comments (id_sondage, comment, usercomment)"; $sql.= " VALUES ('".$this->db->escape($this->id_sondage)."','".$this->db->escape($comment)."','".$this->db->escape($comment_user)."')"; $resql = $this->db->query($sql); - dol_syslog("sql=".$sql); if (!$resql) { return false; diff --git a/htdocs/opensurvey/exportcsv.php b/htdocs/opensurvey/exportcsv.php index 2c31b67f574..fec8174a7ef 100644 --- a/htdocs/opensurvey/exportcsv.php +++ b/htdocs/opensurvey/exportcsv.php @@ -86,7 +86,6 @@ $sql ='SELECT nom, reponses'; $sql.=' FROM '.MAIN_DB_PREFIX."opensurvey_user_studs"; $sql.=" WHERE id_sondage='" . $db->escape($numsondage) . "'"; $sql.=" ORDER BY id_users"; -dol_syslog("sql=".$sql); $resql=$db->query($sql); if ($resql) { diff --git a/htdocs/opensurvey/public/studs.php b/htdocs/opensurvey/public/studs.php index 01bb969df20..f970df5bc4d 100644 --- a/htdocs/opensurvey/public/studs.php +++ b/htdocs/opensurvey/public/studs.php @@ -212,7 +212,6 @@ if ($testmodifier) $sql.= " SET reponses = '".$db->escape($nouveauchoix)."'"; $sql.= " WHERE id_users = '".$db->escape($idtomodify)."'"; - dol_syslog("sql=".$sql); $resql = $db->query($sql); if (! $resql) dol_print_error($db); } diff --git a/htdocs/opensurvey/results.php b/htdocs/opensurvey/results.php index 48c585c0f2e..2d93dfd5de4 100644 --- a/htdocs/opensurvey/results.php +++ b/htdocs/opensurvey/results.php @@ -151,7 +151,6 @@ if ($testmodifier) $sql.= " SET reponses = '".$db->escape($nouveauchoix)."'"; $sql.= " WHERE id_users = '".$db->escape($idtomodify)."'"; - dol_syslog("sql=".$sql); $resql = $db->query($sql); if (! $resql) dol_print_error($db); } @@ -172,7 +171,6 @@ if (GETPOST("ajoutercolonne") && GETPOST('nouvellecolonne') && $object->format = $sql = 'UPDATE '.MAIN_DB_PREFIX."opensurvey_sondage"; $sql.= " SET sujet = '".$db->escape($nouveauxsujets)."'"; $sql.= " WHERE id_sondage = '".$db->escape($numsondage)."'"; - dol_syslog("sql=".$sql); $resql = $db->query($sql); if (! $resql) dol_print_error($db); else { @@ -258,7 +256,6 @@ if (isset($_POST["ajoutercolonne"]) && $object->format == "D") $sql = 'UPDATE '.MAIN_DB_PREFIX."opensurvey_sondage"; $sql.= " SET sujet = '".$db->escape($dateinsertion)."'"; $sql.= " WHERE id_sondage = '".$db->escape($numsondage)."'"; - dol_syslog("sql=".$sql); $resql = $db->query($sql); if (! $resql) dol_print_error($db); else { @@ -340,7 +337,6 @@ for ($i = 0; $i < $nbcolonnes; $i++) // Mise a jour des sujets dans la base $sql = 'UPDATE '.MAIN_DB_PREFIX."opensurvey_sondage"; $sql.= " SET sujet = '".$db->escape($nouveauxsujets)."' WHERE id_sondage = '".$db->escape($numsondage)."'"; - dol_syslog("sql=".$sql); $resql = $db->query($sql); if (! $resql) dol_print_error($db); diff --git a/htdocs/societe/consumption.php b/htdocs/societe/consumption.php index 520d003305d..f166369631a 100644 --- a/htdocs/societe/consumption.php +++ b/htdocs/societe/consumption.php @@ -245,7 +245,6 @@ print_barre_liste($langs->trans('ProductsIntoElements', $typeElementString.' '.$ if ($sql_select) { - dol_syslog("sql=".$sql); $resql=$db->query($sql); if (!$resql) dol_print_error($db); } diff --git a/htdocs/user/perms.php b/htdocs/user/perms.php index 49bd0877e6e..af7a95af74d 100644 --- a/htdocs/user/perms.php +++ b/htdocs/user/perms.php @@ -306,7 +306,6 @@ $sql.= " AND r.entity = ".((! empty($conf->multicompany->enabled) && ! empty($fu if (empty($conf->global->MAIN_USE_ADVANCED_PERMS)) $sql.= " AND r.perms NOT LIKE '%_advance'"; // Hide advanced perms if option is disable $sql.= " ORDER BY r.module, r.id"; -dol_syslog("sql=".$sql); $result=$db->query($sql); if ($result) { diff --git a/scripts/emailings/mailing-send.php b/scripts/emailings/mailing-send.php index 4f341b7a39b..c271b6dd7a2 100755 --- a/scripts/emailings/mailing-send.php +++ b/scripts/emailings/mailing-send.php @@ -71,7 +71,6 @@ if ($id != 'all') $sql.= " LIMIT 1"; } -dol_syslog("sql=".$sql); $resql=$db->query($sql); if ($resql) { From 9fbd7806f0621d4606b6b2e7ab74ae4da2d35319 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Thu, 12 Jun 2014 11:31:53 +0200 Subject: [PATCH 003/258] More substitutions --- dev/skeletons/skeleton_class.class.php | 8 +-- dev/skeletons/skeleton_page.php | 2 +- dev/skeletons/skeleton_script.php | 2 +- htdocs/adherents/card_subscriptions.php | 2 +- htdocs/adherents/cartes/carte.php | 2 +- htdocs/adherents/class/adherent.class.php | 38 +++++------ .../adherents/class/adherent_type.class.php | 4 +- htdocs/adherents/class/cotisation.class.php | 8 +-- htdocs/adherents/index.php | 4 +- htdocs/adherents/liste.php | 2 +- htdocs/adherents/stats/byproperties.php | 2 +- htdocs/adherents/stats/geo.php | 2 +- htdocs/admin/barcode.php | 2 +- htdocs/admin/boxes.php | 10 +-- htdocs/admin/const.php | 2 +- htdocs/admin/dict.php | 8 +-- htdocs/admin/external_rss.php | 2 +- htdocs/admin/tools/listevents.php | 2 +- htdocs/barcode/codeinit.php | 2 +- htdocs/bookmarks/class/bookmark.class.php | 8 +-- htdocs/cashdesk/class/Facturation.class.php | 2 +- htdocs/cashdesk/facturation.php | 2 +- htdocs/cashdesk/facturation_dhtml.php | 2 +- htdocs/categories/class/categorie.class.php | 16 ++--- htdocs/comm/action/class/actioncomm.class.php | 14 ++-- .../comm/action/class/cactioncomm.class.php | 4 +- htdocs/comm/action/index.php | 4 +- htdocs/comm/action/listactions.php | 2 +- htdocs/comm/action/rapport/index.php | 2 +- htdocs/comm/mailing/class/mailing.class.php | 14 ++-- htdocs/comm/mailing/fiche.php | 8 +-- htdocs/comm/propal/class/propal.class.php | 16 ++--- htdocs/commande/class/commande.class.php | 30 ++++----- htdocs/compta/bank/account.php | 4 +- htdocs/compta/bank/class/account.class.php | 28 ++++---- htdocs/compta/bank/class/bankcateg.class.php | 8 +-- htdocs/compta/bank/ligne.php | 2 +- htdocs/compta/bank/releve.php | 4 +- htdocs/compta/charges/index.php | 2 +- .../deplacement/class/deplacement.class.php | 10 +-- htdocs/compta/dons/class/don.class.php | 6 +- .../facture/class/facture-rec.class.php | 4 +- htdocs/compta/facture/class/facture.class.php | 36 +++++------ .../facture/class/paymentterm.class.php | 10 +-- .../compta/localtax/class/localtax.class.php | 10 +-- .../cheque/class/remisecheque.class.php | 16 ++--- .../compta/paiement/class/paiement.class.php | 8 +-- htdocs/compta/payment_sc/fiche.php | 2 +- .../class/bonprelevement.class.php | 64 +++++++++---------- htdocs/compta/resultat/clientfourn.php | 18 +++--- htdocs/compta/resultat/index.php | 18 +++--- .../salaries/class/paymentsalary.class.php | 8 +-- .../sociales/class/chargesociales.class.php | 14 ++-- .../class/paymentsocialcontribution.class.php | 12 ++-- htdocs/compta/stats/cabyprodserv.php | 2 +- htdocs/compta/stats/casoc.php | 2 +- htdocs/compta/tva/class/tva.class.php | 10 +-- htdocs/contact/class/contact.class.php | 20 +++--- htdocs/contact/list.php | 2 +- htdocs/contrat/class/contrat.class.php | 34 +++++----- htdocs/contrat/index.php | 2 +- htdocs/contrat/services.php | 2 +- htdocs/core/boxes/box_actions.php | 2 +- htdocs/core/boxes/box_clients.php | 2 +- htdocs/core/boxes/box_comptes.php | 2 +- htdocs/core/boxes/box_prospect.php | 2 +- htdocs/core/class/commoninvoice.class.php | 2 +- htdocs/core/class/commonobject.class.php | 62 +++++++++--------- htdocs/core/class/cpays.class.php | 8 +-- htdocs/core/class/ctypent.class.php | 8 +-- htdocs/core/class/discount.class.php | 20 +++--- htdocs/core/class/events.class.php | 8 +-- htdocs/core/class/extrafields.class.php | 8 +-- htdocs/core/class/html.form.class.php | 28 ++++---- htdocs/core/class/html.formcompany.class.php | 8 +-- htdocs/core/class/html.formcontract.class.php | 2 +- htdocs/core/class/html.formorder.class.php | 2 +- htdocs/core/class/html.formother.class.php | 2 +- htdocs/core/class/html.formprojet.class.php | 2 +- htdocs/core/class/html.formpropal.class.php | 2 +- .../class/html.formsocialcontrib.class.php | 2 +- htdocs/core/class/infobox.class.php | 6 +- htdocs/core/class/link.class.php | 6 +- htdocs/core/class/menubase.class.php | 10 +-- htdocs/core/class/notify.class.php | 6 +- htdocs/core/class/stats.class.php | 12 ++-- htdocs/core/db/mysql.class.php | 2 +- htdocs/core/db/mysqli.class.php | 2 +- htdocs/core/db/sqlite.class.php | 4 +- htdocs/core/lib/admin.lib.php | 14 ++-- htdocs/core/lib/company.lib.php | 12 ++-- htdocs/core/lib/functions.lib.php | 2 +- htdocs/core/lib/functions2.lib.php | 8 +-- htdocs/core/lib/invoice2.lib.php | 4 +- htdocs/core/lib/price.lib.php | 2 +- htdocs/core/lib/sendings.lib.php | 2 +- htdocs/core/lib/tax.lib.php | 6 +- htdocs/core/login/functions_dolibarr.php | 2 +- htdocs/core/login/functions_openid.php | 2 +- htdocs/core/modules/DolibarrModules.class.php | 44 ++++++------- htdocs/core/modules/action/rapport.pdf.php | 2 +- .../modules/commande/mod_commande_marbre.php | 2 +- .../modules/contract/mod_contract_serpis.php | 2 +- .../expedition/mod_expedition_safor.php | 2 +- .../core/modules/facture/mod_facture_mars.php | 4 +- .../modules/facture/mod_facture_terre.php | 4 +- .../modules/import/import_csv.modules.php | 2 +- .../modules/livraison/mod_livraison_jade.php | 2 +- .../core/modules/mailings/fraise.modules.php | 2 +- .../modules/project/mod_project_simple.php | 2 +- .../modules/project/task/mod_task_simple.php | 2 +- .../modules/propale/mod_propale_marbre.php | 2 +- .../modules/rapport/pdf_paiement.class.php | 2 +- .../modules/societe/mod_codeclient_monkey.php | 2 +- .../mod_facture_fournisseur_cactus.php | 4 +- ..._50_modNotification_Notification.class.php | 2 +- htdocs/cron/class/cronjob.class.php | 12 ++-- htdocs/ecm/class/ecmdirectory.class.php | 16 ++--- htdocs/expedition/class/expedition.class.php | 20 +++--- .../class/expeditionbatch.class.php | 8 +-- htdocs/expedition/shipment.php | 2 +- htdocs/exports/class/export.class.php | 8 +-- htdocs/fichinter/class/fichinter.class.php | 30 ++++----- htdocs/fourn/ajax/getSupplierPrices.php | 2 +- htdocs/fourn/class/fournisseur.class.php | 2 +- .../class/fournisseur.commande.class.php | 32 +++++----- .../fourn/class/fournisseur.facture.class.php | 30 ++++----- .../fourn/class/fournisseur.product.class.php | 12 ++-- htdocs/fourn/class/paiementfourn.class.php | 2 +- htdocs/fourn/product/liste.php | 2 +- htdocs/ftp/admin/ftpclient.php | 2 +- htdocs/holiday/class/holiday.class.php | 30 ++++----- htdocs/imports/class/import.class.php | 6 +- htdocs/install/upgrade.php | 6 +- htdocs/install/upgrade2.php | 36 +++++------ htdocs/livraison/class/livraison.class.php | 12 ++-- .../class/opensurveysondage.class.php | 12 ++-- htdocs/product/class/product.class.php | 24 +++---- htdocs/product/class/productbatch.class.php | 12 ++-- htdocs/product/liste.php | 2 +- htdocs/product/stock/class/entrepot.class.php | 16 ++--- .../stock/class/mouvementstock.class.php | 10 +-- htdocs/product/stock/index.php | 2 +- htdocs/projet/class/task.class.php | 30 ++++----- htdocs/projet/liste.php | 2 +- htdocs/resource/class/resource.class.php | 24 +++---- htdocs/societe/ajaxcompanies.php | 2 +- htdocs/societe/class/address.class.php | 2 +- .../class/companybankaccount.class.php | 2 +- htdocs/societe/class/societe.class.php | 28 ++++---- htdocs/societe/soc.php | 2 +- htdocs/user/class/user.class.php | 24 +++---- htdocs/user/class/usergroup.class.php | 10 +-- htdocs/user/fiche.php | 2 +- htdocs/user/perms.php | 4 +- .../webservices/server_productorservice.php | 2 +- htdocs/webservices/server_thirdparty.php | 2 +- scripts/emailings/mailing-send.php | 4 +- 158 files changed, 715 insertions(+), 715 deletions(-) diff --git a/dev/skeletons/skeleton_class.class.php b/dev/skeletons/skeleton_class.class.php index c36dad4b4b5..53f6d0a66f3 100644 --- a/dev/skeletons/skeleton_class.class.php +++ b/dev/skeletons/skeleton_class.class.php @@ -91,7 +91,7 @@ class Skeleton_Class extends CommonObject $this->db->begin(); - dol_syslog(get_class($this)."::create sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::create", LOG_DEBUG); $resql=$this->db->query($sql); if (! $resql) { $error++; $this->errors[]="Error ".$this->db->lasterror(); } @@ -149,7 +149,7 @@ class Skeleton_Class extends CommonObject $sql.= " FROM ".MAIN_DB_PREFIX."mytable as t"; $sql.= " WHERE t.rowid = ".$id; - dol_syslog(get_class($this)."::fetch sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::fetch"); $resql=$this->db->query($sql); if ($resql) { @@ -204,7 +204,7 @@ class Skeleton_Class extends CommonObject $this->db->begin(); - dol_syslog(get_class($this)."::update sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::update"); $resql = $this->db->query($sql); if (! $resql) { $error++; $this->errors[]="Error ".$this->db->lasterror(); } @@ -278,7 +278,7 @@ class Skeleton_Class extends CommonObject $sql = "DELETE FROM ".MAIN_DB_PREFIX."mytable"; $sql.= " WHERE rowid=".$this->id; - dol_syslog(get_class($this)."::delete sql=".$sql); + dol_syslog(get_class($this)."::delete"); $resql = $this->db->query($sql); if (! $resql) { $error++; $this->errors[]="Error ".$this->db->lasterror(); } } diff --git a/dev/skeletons/skeleton_page.php b/dev/skeletons/skeleton_page.php index bf63a769af7..00222bcce61 100644 --- a/dev/skeletons/skeleton_page.php +++ b/dev/skeletons/skeleton_page.php @@ -139,7 +139,7 @@ if ($action == 'list') print_liste_field_titre($langs->trans('field2'),$_SERVER['PHP_SELF'],'t.field2','',$param,'',$sortfield,$sortorder); print ''; - dol_syslog($script_file." sql=".$sql, LOG_DEBUG); + dol_syslog($script_file, LOG_DEBUG); $resql=$db->query($sql); if ($resql) { diff --git a/dev/skeletons/skeleton_script.php b/dev/skeletons/skeleton_script.php index b10b57a730a..877a420d6af 100644 --- a/dev/skeletons/skeleton_script.php +++ b/dev/skeletons/skeleton_script.php @@ -119,7 +119,7 @@ $sql.= " FROM ".MAIN_DB_PREFIX."skeleton"; $sql.= " WHERE field3 = 'xxx'"; $sql.= " ORDER BY field1 ASC"; -dol_syslog($script_file." sql=".$sql, LOG_DEBUG); +dol_syslog($script_file, LOG_DEBUG); $resql=$db->query($sql); if ($resql) { diff --git a/htdocs/adherents/card_subscriptions.php b/htdocs/adherents/card_subscriptions.php index 0fcedb8e96d..e120ea96360 100644 --- a/htdocs/adherents/card_subscriptions.php +++ b/htdocs/adherents/card_subscriptions.php @@ -307,7 +307,7 @@ if ($user->rights->adherent->cotisation->creer && $action == 'cotisation' && ! $ $sql ="UPDATE ".MAIN_DB_PREFIX."cotisation SET fk_bank=".$insertid; $sql.=" WHERE rowid=".$crowid; - dol_syslog("card_subscriptions::cotisation sql=".$sql); + dol_syslog("card_subscriptions::cotisation", LOG_DEBUG); $resql = $db->query($sql); if (! $resql) { diff --git a/htdocs/adherents/cartes/carte.php b/htdocs/adherents/cartes/carte.php index dbccbdb4f01..ade8f059810 100644 --- a/htdocs/adherents/cartes/carte.php +++ b/htdocs/adherents/cartes/carte.php @@ -72,7 +72,7 @@ if ((! empty($foruserid) || ! empty($foruserlogin) || ! empty($mode)) && ! $mesg if ($foruserlogin) $sql.=" AND d.login='".$db->escape($foruserlogin)."'"; $sql.= " ORDER BY d.rowid ASC"; - dol_syslog("Search members sql=".$sql); + dol_syslog("Search members", LOG_DEBUG); $result = $db->query($sql); if ($result) { diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php index 77cbff2918a..7dcb131b7df 100644 --- a/htdocs/adherents/class/adherent.class.php +++ b/htdocs/adherents/class/adherent.class.php @@ -310,7 +310,7 @@ class Adherent extends CommonObject $sql.= ", ".(! empty($this->import_key) ? "'".$this->import_key."'":"null"); $sql.= ")"; - dol_syslog(get_class($this)."::create sql=".$sql); + dol_syslog(get_class($this)."::create", LOG_DEBUG); $result = $this->db->query($sql); if ($result) { @@ -335,7 +335,7 @@ class Adherent extends CommonObject $sql = "UPDATE ".MAIN_DB_PREFIX."user SET"; $sql.= " fk_member = '".$this->id."'"; $sql.= " WHERE rowid = ".$this->user_id; - dol_syslog(get_class($this)."::create sql=".$sql); + dol_syslog(get_class($this)."::create", LOG_DEBUG); $resql = $this->db->query($sql); if (! $resql) { @@ -455,7 +455,7 @@ class Adherent extends CommonObject $sql.= ", fk_user_mod=".($user->id>0?$user->id:'null'); // Can be null because member can be create by a guest $sql.= " WHERE rowid = ".$this->id; - dol_syslog(get_class($this)."::update update member sql=".$sql); + dol_syslog(get_class($this)."::update update member", LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { @@ -501,14 +501,14 @@ class Adherent extends CommonObject { dol_syslog(get_class($this)."::update update link to user"); $sql = "UPDATE ".MAIN_DB_PREFIX."user SET fk_member = NULL WHERE fk_member = ".$this->id; - dol_syslog(get_class($this)."::update sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::update", LOG_DEBUG); $resql = $this->db->query($sql); if (! $resql) { $this->error=$this->db->error(); $this->db->rollback(); return -5; } // If there is a user linked to this member if ($this->user_id > 0) { $sql = "UPDATE ".MAIN_DB_PREFIX."user SET fk_member = ".$this->id." WHERE rowid = ".$this->user_id; - dol_syslog(get_class($this)."::update sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::update", LOG_DEBUG); $resql = $this->db->query($sql); if (! $resql) { $this->error=$this->db->error(); $this->db->rollback(); return -5; } } @@ -650,7 +650,7 @@ class Adherent extends CommonObject $sql.= " WHERE fk_adherent='".$this->id."'"; $sql.= " ORDER by dateadh DESC"; // Sort by start subscription date - dol_syslog(get_class($this)."::update_end_date sql=".$sql); + dol_syslog(get_class($this)."::update_end_date", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -663,7 +663,7 @@ class Adherent extends CommonObject $sql.= " datefin=".($datefin != '' ? "'".$this->db->idate($datefin)."'" : "null"); $sql.= " WHERE rowid = ".$this->id; - dol_syslog(get_class($this)."::update_end_date sql=".$sql); + dol_syslog(get_class($this)."::update_end_date", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -711,7 +711,7 @@ class Adherent extends CommonObject // Remove category $sql = "DELETE FROM ".MAIN_DB_PREFIX."categorie_member WHERE fk_member = ".$rowid; - dol_syslog(get_class($this)."::delete sql=".$sql); + dol_syslog(get_class($this)."::delete", LOG_DEBUG); $resql=$this->db->query($sql); if (! $resql) { @@ -726,7 +726,7 @@ class Adherent extends CommonObject if (! $error) { $sql = "DELETE FROM ".MAIN_DB_PREFIX."cotisation WHERE fk_adherent = ".$rowid; - dol_syslog(get_class($this)."::delete sql=".$sql); + dol_syslog(get_class($this)."::delete", LOG_DEBUG); $resql=$this->db->query($sql); if (! $resql) { @@ -769,7 +769,7 @@ class Adherent extends CommonObject if (! $error) { $sql = "DELETE FROM ".MAIN_DB_PREFIX."adherent WHERE rowid = ".$rowid; - dol_syslog(get_class($this)."::delete sql=".$sql); + dol_syslog(get_class($this)."::delete", LOG_DEBUG); $resql=$this->db->query($sql); if (! $resql) { @@ -846,7 +846,7 @@ class Adherent extends CommonObject $sql.= " WHERE rowid = ".$this->id; //dol_syslog("Adherent::Password sql=hidden"); - dol_syslog(get_class($this)."::setPassword sql=".$sql); + dol_syslog(get_class($this)."::setPassword", LOG_DEBUG); $result = $this->db->query($sql); if ($result) { @@ -922,7 +922,7 @@ class Adherent extends CommonObject // If user is linked to this member, remove old link to this member $sql = "UPDATE ".MAIN_DB_PREFIX."user SET fk_member = NULL WHERE fk_member = ".$this->id; - dol_syslog(get_class($this)."::setUserId sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::setUserId", LOG_DEBUG); $resql = $this->db->query($sql); if (! $resql) { $this->error=$this->db->error(); $this->db->rollback(); return -1; } @@ -931,7 +931,7 @@ class Adherent extends CommonObject { $sql = "UPDATE ".MAIN_DB_PREFIX."user SET fk_member = ".$this->id; $sql.= " WHERE rowid = ".$userid; - dol_syslog(get_class($this)."::setUserId sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::setUserId", LOG_DEBUG); $resql = $this->db->query($sql); if (! $resql) { $this->error=$this->db->error(); $this->db->rollback(); return -2; } } @@ -960,7 +960,7 @@ class Adherent extends CommonObject $sql = "UPDATE ".MAIN_DB_PREFIX."adherent SET fk_soc = null"; $sql.= " WHERE fk_soc = '".$thirdpartyid."'"; $sql.= " AND entity = ".$conf->entity; - dol_syslog(get_class($this)."::setThirdPartyId sql=".$sql); + dol_syslog(get_class($this)."::setThirdPartyId", LOG_DEBUG); $resql = $this->db->query($sql); } @@ -968,7 +968,7 @@ class Adherent extends CommonObject $sql = "UPDATE ".MAIN_DB_PREFIX."adherent SET fk_soc = ".($thirdpartyid>0 ? $thirdpartyid : 'null'); $sql.= " WHERE rowid = ".$this->id; - dol_syslog(get_class($this)."::setThirdPartyId sql=".$sql); + dol_syslog(get_class($this)."::setThirdPartyId", LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { @@ -1088,7 +1088,7 @@ class Adherent extends CommonObject $sql.= " AND d.ref_ext='".$this->db->escape($ref_ext)."'"; } - dol_syslog(get_class($this)."::fetch sql=".$sql); + dol_syslog(get_class($this)."::fetch", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -1198,7 +1198,7 @@ class Adherent extends CommonObject $sql.= " FROM ".MAIN_DB_PREFIX."cotisation as c"; $sql.= " WHERE c.fk_adherent = ".$this->id; $sql.= " ORDER BY c.dateadh"; - dol_syslog(get_class($this)."::fetch_subscriptions sql=".$sql); + dol_syslog(get_class($this)."::fetch_subscriptions", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) @@ -1356,7 +1356,7 @@ class Adherent extends CommonObject $sql.= ", fk_user_valid=".$user->id; $sql.= " WHERE rowid = ".$this->id; - dol_syslog(get_class($this)."::validate sql=".$sql); + dol_syslog(get_class($this)."::validate", LOG_DEBUG); $result = $this->db->query($sql); if ($result) { @@ -1902,7 +1902,7 @@ class Adherent extends CommonObject $sql.= ' FROM '.MAIN_DB_PREFIX.'adherent as a'; $sql.= ' WHERE a.rowid = '.$id; - dol_syslog(get_class($this)."::info sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::info", LOG_DEBUG); $result=$this->db->query($sql); if ($result) { diff --git a/htdocs/adherents/class/adherent_type.class.php b/htdocs/adherents/class/adherent_type.class.php index e861af709b8..78e046978e9 100644 --- a/htdocs/adherents/class/adherent_type.class.php +++ b/htdocs/adherents/class/adherent_type.class.php @@ -76,7 +76,7 @@ class AdherentType extends CommonObject $sql.= ", ".$conf->entity; $sql.= ")"; - dol_syslog("Adherent_type::create sql=".$sql); + dol_syslog("Adherent_type::create", LOG_DEBUG); $result = $this->db->query($sql); if ($result) { @@ -188,7 +188,7 @@ class AdherentType extends CommonObject $sql .= " FROM ".MAIN_DB_PREFIX."adherent_type as d"; $sql .= " WHERE d.rowid = ".$rowid; - dol_syslog("Adherent_type::fetch sql=".$sql); + dol_syslog("Adherent_type::fetch", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) diff --git a/htdocs/adherents/class/cotisation.class.php b/htdocs/adherents/class/cotisation.class.php index 1fc0994b54a..712205c3a0d 100644 --- a/htdocs/adherents/class/cotisation.class.php +++ b/htdocs/adherents/class/cotisation.class.php @@ -82,7 +82,7 @@ class Cotisation extends CommonObject $sql.= " '".$this->db->idate($this->datef)."',"; $sql.= " ".$this->amount.",'".$this->db->escape($this->note)."')"; - dol_syslog(get_class($this)."::create sql=".$sql); + dol_syslog(get_class($this)."::create", LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { @@ -113,7 +113,7 @@ class Cotisation extends CommonObject $sql.=" FROM ".MAIN_DB_PREFIX."cotisation"; $sql.=" WHERE rowid=".$rowid; - dol_syslog(get_class($this)."::fetch sql=".$sql); + dol_syslog(get_class($this)."::fetch", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -168,7 +168,7 @@ class Cotisation extends CommonObject $sql .= " fk_bank = ".($this->fk_bank ? $this->fk_bank : 'null'); $sql .= " WHERE rowid = ".$this->id; - dol_syslog(get_class($this)."::update sql=".$sql); + dol_syslog(get_class($this)."::update", LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { @@ -207,7 +207,7 @@ class Cotisation extends CommonObject $this->db->begin(); $sql = "DELETE FROM ".MAIN_DB_PREFIX."cotisation WHERE rowid = ".$this->id; - dol_syslog(get_class($this)."::delete sql=".$sql); + dol_syslog(get_class($this)."::delete", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { diff --git a/htdocs/adherents/index.php b/htdocs/adherents/index.php index e64466ce9a6..0aaafa461fb 100644 --- a/htdocs/adherents/index.php +++ b/htdocs/adherents/index.php @@ -68,7 +68,7 @@ $sql.= " AND d.entity IN (".getEntity().")"; $sql.= " WHERE t.entity IN (".getEntity().")"; $sql.= " GROUP BY t.rowid, t.libelle, t.cotisation, d.statut"; -dol_syslog("index.php::select nb of members by type sql=".$sql, LOG_DEBUG); +dol_syslog("index.php::select nb of members by type", LOG_DEBUG); $result = $db->query($sql); if ($result) { @@ -106,7 +106,7 @@ $sql.= " AND d.statut = 1 AND d.datefin >= '".$db->idate($now)."'"; $sql.= " AND t.rowid = d.fk_adherent_type"; $sql.= " GROUP BY d.fk_adherent_type"; -dol_syslog("index.php::select nb of uptodate members by type sql=".$sql, LOG_DEBUG); +dol_syslog("index.php::select nb of uptodate members by type", LOG_DEBUG); $result = $db->query($sql); if ($result) { diff --git a/htdocs/adherents/liste.php b/htdocs/adherents/liste.php index a5fbe1dc5c9..c1dfb9d2302 100644 --- a/htdocs/adherents/liste.php +++ b/htdocs/adherents/liste.php @@ -158,7 +158,7 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) $sql.= $db->order($sortfield,$sortorder); $sql.= $db->plimit($conf->liste_limit+1, $offset); -dol_syslog("get list sql=".$sql); +dol_syslog("get list", LOG_DEBUG); $resql = $db->query($sql); if ($resql) { diff --git a/htdocs/adherents/stats/byproperties.php b/htdocs/adherents/stats/byproperties.php index e8355cbb941..fdb9153ba88 100644 --- a/htdocs/adherents/stats/byproperties.php +++ b/htdocs/adherents/stats/byproperties.php @@ -74,7 +74,7 @@ $sql.=" GROUP BY d.morphy"; $foundphy=$foundmor=0; // Define $data array -dol_syslog("Count member sql=".$sql); +dol_syslog("Count member", LOG_DEBUG); $resql=$db->query($sql); if ($resql) { diff --git a/htdocs/adherents/stats/geo.php b/htdocs/adherents/stats/geo.php index 1cb98f353b6..ecf27f78465 100644 --- a/htdocs/adherents/stats/geo.php +++ b/htdocs/adherents/stats/geo.php @@ -138,7 +138,7 @@ if ($mode) //print $langsen->trans("Country"."FI");exit; // Define $data array - dol_syslog("Count member sql=".$sql); + dol_syslog("Count member", LOG_DEBUG); $resql=$db->query($sql); if ($resql) { diff --git a/htdocs/admin/barcode.php b/htdocs/admin/barcode.php index 988b49efd07..78c99916910 100644 --- a/htdocs/admin/barcode.php +++ b/htdocs/admin/barcode.php @@ -203,7 +203,7 @@ $sql.= " FROM ".MAIN_DB_PREFIX."c_barcode_type"; $sql.= " WHERE entity = ".$conf->entity; $sql.= " ORDER BY code"; -dol_syslog("admin/barcode.php sql=".$sql); +dol_syslog("admin/barcode.php", LOG_DEBUG); $resql=$db->query($sql); if ($resql) { diff --git a/htdocs/admin/boxes.php b/htdocs/admin/boxes.php index d58a1576a31..bc140735c61 100644 --- a/htdocs/admin/boxes.php +++ b/htdocs/admin/boxes.php @@ -66,7 +66,7 @@ if ($action == 'add') $sql.= " WHERE param = 'MAIN_BOXES_".$db->escape(GETPOST("pos","alpha"))."' AND value = '1'"; $sql.= " AND entity = ".$conf->entity; $resql = $db->query($sql); - dol_syslog("boxes.php search fk_user to activate box for sql=".$sql); + dol_syslog("boxes.php search fk_user to activate box for", LOG_DEBUG); if ($resql) { $num = $db->num_rows($resql); @@ -93,7 +93,7 @@ if ($action == 'add') { $nbboxonleft=$nbboxonright=0; $sql = "SELECT box_order FROM ".MAIN_DB_PREFIX."boxes WHERE position = ".GETPOST("pos","alpha")." AND fk_user = ".$fk_user." AND entity = ".$conf->entity; - dol_syslog("boxes.php activate box sql=".$sql); + dol_syslog("boxes.php activate box", LOG_DEBUG); $resql = $db->query($sql); if ($resql) { @@ -112,7 +112,7 @@ if ($action == 'add') $sql.= GETPOST("boxid","int").", ".GETPOST("pos","alpha").", '".(($nbboxonleft > $nbboxonright) ? 'B01' : 'A01')."', ".$fk_user.", ".$conf->entity; $sql.= ")"; - dol_syslog("boxes.php activate box sql=".$sql); + dol_syslog("boxes.php activate box", LOG_DEBUG); $resql = $db->query($sql); if (! $resql) { @@ -235,7 +235,7 @@ $sql.= " AND b.box_id = bd.rowid"; $sql.= " AND b.fk_user=0"; $sql.= " ORDER by b.position, b.box_order"; -dol_syslog("Search available boxes sql=".$sql, LOG_DEBUG); +dol_syslog("Search available boxes", LOG_DEBUG); $resql = $db->query($sql); if ($resql) { @@ -271,7 +271,7 @@ if ($resql) $sql.= " WHERE entity = ".$conf->entity; $sql.= " AND LENGTH(box_order) <= 2"; - dol_syslog("Execute requests to renumber box order sql=".$sql); + dol_syslog("Execute requests to renumber box order", LOG_DEBUG); $result = $db->query($sql); if ($result) { diff --git a/htdocs/admin/const.php b/htdocs/admin/const.php index eb9cae41917..48e637fb8a3 100644 --- a/htdocs/admin/const.php +++ b/htdocs/admin/const.php @@ -233,7 +233,7 @@ if (empty($user->entity) && $debug) {} // to force for superadmin elseif ($user->entity || empty($conf->multicompany->enabled)) $sql.= " AND visible = 1"; $sql.= " ORDER BY entity, name ASC"; -dol_syslog("Const::listConstant sql=".$sql); +dol_syslog("Const::listConstant", LOG_DEBUG); $result = $db->query($sql); if ($result) { diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php index d834929d00f..6120e94f4ac 100644 --- a/htdocs/admin/dict.php +++ b/htdocs/admin/dict.php @@ -528,7 +528,7 @@ if (GETPOST('actionadd') || GETPOST('actionmodify')) } $sql.=",1)"; - dol_syslog("actionadd sql=".$sql); + dol_syslog("actionadd", LOG_DEBUG); $result = $db->query($sql); if ($result) // Add is ok { @@ -576,7 +576,7 @@ if (GETPOST('actionadd') || GETPOST('actionmodify')) } $sql.= " WHERE ".$rowidcol." = '".$rowid."'"; - dol_syslog("actionmodify sql=".$sql); + dol_syslog("actionmodify", LOG_DEBUG); //print $sql; $resql = $db->query($sql); if (! $resql) @@ -599,7 +599,7 @@ if ($action == 'confirm_delete' && $confirm == 'yes') // delete $sql = "DELETE from ".$tabname[$id]." WHERE ".$rowidcol."='".$rowid."'"; - dol_syslog("delete sql=".$sql); + dol_syslog("delete", LOG_DEBUG); $result = $db->query($sql); if (! $result) { @@ -826,7 +826,7 @@ if ($id) print ''; // List of available values in database - dol_syslog("htdocs/admin/dict sql=".$sql, LOG_DEBUG); + dol_syslog("htdocs/admin/dict", LOG_DEBUG); $resql=$db->query($sql); if ($resql) { diff --git a/htdocs/admin/external_rss.php b/htdocs/admin/external_rss.php index 0b9534689d0..1944521a581 100644 --- a/htdocs/admin/external_rss.php +++ b/htdocs/admin/external_rss.php @@ -229,7 +229,7 @@ $sql ="SELECT rowid, file, note FROM ".MAIN_DB_PREFIX."boxes_def"; $sql.=" WHERE file = 'box_external_rss.php'"; $sql.=" ORDER BY note"; -dol_syslog("select rss boxes sql=".$sql,LOG_DEBUG); +dol_syslog("select rss boxes", LOG_DEBUG); $resql=$db->query($sql); if ($resql) { diff --git a/htdocs/admin/tools/listevents.php b/htdocs/admin/tools/listevents.php index 10bd42d9590..c2671f698a4 100644 --- a/htdocs/admin/tools/listevents.php +++ b/htdocs/admin/tools/listevents.php @@ -78,7 +78,7 @@ if ($action == 'confirm_purge' && $confirm == 'yes' && $user->admin) $sql = "DELETE FROM ".MAIN_DB_PREFIX."events"; $sql.= " WHERE entity = ".$conf->entity; - dol_syslog("listevents purge sql=".$sql); + dol_syslog("listevents purge", LOG_DEBUG); $resql = $db->query($sql); if (! $resql) { diff --git a/htdocs/barcode/codeinit.php b/htdocs/barcode/codeinit.php index d6ca6a7d66f..a5d207b5339 100644 --- a/htdocs/barcode/codeinit.php +++ b/htdocs/barcode/codeinit.php @@ -126,7 +126,7 @@ if ($action == 'initbarcodeproducts') $sql.=$db->order("datec","ASC"); $sql.=$db->plimit($maxperinit); - dol_syslog("codeinit sql=".$sql, LOG_DEBUG); + dol_syslog("codeinit", LOG_DEBUG); $resql=$db->query($sql); if ($resql) { diff --git a/htdocs/bookmarks/class/bookmark.class.php b/htdocs/bookmarks/class/bookmark.class.php index 2aa86c5db20..aa92d2bedb9 100644 --- a/htdocs/bookmarks/class/bookmark.class.php +++ b/htdocs/bookmarks/class/bookmark.class.php @@ -65,7 +65,7 @@ class Bookmark $sql.= " WHERE rowid = ".$id; $sql.= " AND entity = ".$conf->entity; - dol_syslog("Bookmark::fetch sql=".$sql, LOG_DEBUG); + dol_syslog("Bookmark::fetch", LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { @@ -123,7 +123,7 @@ class Bookmark if ($this->fk_soc) $sql.=",".$this->fk_soc; $sql.= ")"; - dol_syslog("Bookmark::update sql=".$sql, LOG_DEBUG); + dol_syslog("Bookmark::update", LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { @@ -173,7 +173,7 @@ class Bookmark $sql.= " ,position = '".$this->position."'"; $sql.= " WHERE rowid = ".$this->id; - dol_syslog("Bookmark::update sql=".$sql, LOG_DEBUG); + dol_syslog("Bookmark::update", LOG_DEBUG); if ($this->db->query($sql)) { return 1; @@ -196,7 +196,7 @@ class Bookmark $sql = "DELETE FROM ".MAIN_DB_PREFIX."bookmark"; $sql .= " WHERE rowid = ".$id; - dol_syslog("Bookmark::remove sql=".$sql, LOG_DEBUG); + dol_syslog("Bookmark::remove", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { diff --git a/htdocs/cashdesk/class/Facturation.class.php b/htdocs/cashdesk/class/Facturation.class.php index b2bb87a0bb2..296ced0f172 100644 --- a/htdocs/cashdesk/class/Facturation.class.php +++ b/htdocs/cashdesk/class/Facturation.class.php @@ -103,7 +103,7 @@ class Facturation $sql.= " FROM ".MAIN_DB_PREFIX."c_tva"; $sql.= " WHERE rowid = ".$this->tva(); - dol_syslog("ajoutArticle sql=".$sql); + dol_syslog("ajoutArticle", LOG_DEBUG); $resql = $db->query($sql); if ($resql) diff --git a/htdocs/cashdesk/facturation.php b/htdocs/cashdesk/facturation.php index 4d442c0dbd3..2f3da75d977 100644 --- a/htdocs/cashdesk/facturation.php +++ b/htdocs/cashdesk/facturation.php @@ -65,7 +65,7 @@ if ( GETPOST('filtre') ) { else $sql.= ")"; $sql.= " ORDER BY label"; - dol_syslog("facturation.php sql=".$sql); + dol_syslog("facturation.php", LOG_DEBUG); $resql=$db->query($sql); if ($resql) { diff --git a/htdocs/cashdesk/facturation_dhtml.php b/htdocs/cashdesk/facturation_dhtml.php index 88a22f7865a..e481fcbecf6 100644 --- a/htdocs/cashdesk/facturation_dhtml.php +++ b/htdocs/cashdesk/facturation_dhtml.php @@ -62,7 +62,7 @@ if (dol_strlen($_GET["code"]) >= 0) // If search criteria is on char length at l } $sql.= " ORDER BY label"; - dol_syslog("facturation_dhtml.php sql=".$sql); + dol_syslog("facturation_dhtml.php", LOG_DEBUG); $result = $db->query($sql); if ($result) diff --git a/htdocs/categories/class/categorie.class.php b/htdocs/categories/class/categorie.class.php index 8d2c4ceed46..2d657dc6e1c 100644 --- a/htdocs/categories/class/categorie.class.php +++ b/htdocs/categories/class/categorie.class.php @@ -87,7 +87,7 @@ class Categorie extends CommonObject if ($label) $sql.= " WHERE label = '".$this->db->escape($label)."' AND entity=".$conf->entity;; } - dol_syslog(get_class($this)."::fetch sql=".$sql); + dol_syslog(get_class($this)."::fetch", LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { @@ -278,7 +278,7 @@ class Categorie extends CommonObject $sql .= ", fk_parent = ".$this->fk_parent; $sql .= " WHERE rowid = ".$this->id; - dol_syslog(get_class($this)."::update sql=".$sql); + dol_syslog(get_class($this)."::update", LOG_DEBUG); if ($this->db->query($sql)) { @@ -488,7 +488,7 @@ class Categorie extends CommonObject $sql = 'SELECT fk_parent FROM '.MAIN_DB_PREFIX.'categorie'; $sql.= " WHERE rowid = ".$this->id; - dol_syslog(get_class($this)."::add_type sql=".$sql); + dol_syslog(get_class($this)."::add_type", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -626,7 +626,7 @@ class Categorie extends CommonObject $sql.= " AND c.fk_categorie = ".$this->id; $sql.= " AND c.fk_".$field." = o.rowid"; - dol_syslog(get_class($this)."::getObjectsInCateg sql=".$sql); + dol_syslog(get_class($this)."::getObjectsInCateg", LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { @@ -679,7 +679,7 @@ class Categorie extends CommonObject } $sql = "SELECT COUNT(*) as nb FROM " . MAIN_DB_PREFIX . "categorie_" . $category_table; $sql .= " WHERE fk_categorie = " . $this->id . " AND fk_" . $field . " = " . $object_id; - dol_syslog(get_class($this)."::containsObject sql=".$sql); + dol_syslog(get_class($this)."::containsObject", LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { return $this->db->fetch_object($resql)->nb; @@ -737,7 +737,7 @@ class Categorie extends CommonObject $sql.= " WHERE fk_parent != 0"; $sql.= " AND entity IN (".getEntity('category',1).")"; - dol_syslog(get_class($this)."::load_motherof sql=".$sql); + dol_syslog(get_class($this)."::load_motherof", LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { @@ -788,7 +788,7 @@ class Categorie extends CommonObject $sql.= " WHERE c.entity IN (".getEntity('category',1).")"; $sql.= " AND c.type = ".$type; - dol_syslog(get_class($this)."::get_full_arbo get category list sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::get_full_arbo get category list", LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { @@ -982,7 +982,7 @@ class Categorie extends CommonObject $sql.= " AND c.fk_parent = ".$this->fk_parent; $sql.= " AND c.label = '".$this->db->escape($this->label)."'"; - dol_syslog(get_class($this)."::already_exists sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::already_exists", LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { diff --git a/htdocs/comm/action/class/actioncomm.class.php b/htdocs/comm/action/class/actioncomm.class.php index ee9e4c032ee..03d3f7b8025 100644 --- a/htdocs/comm/action/class/actioncomm.class.php +++ b/htdocs/comm/action/class/actioncomm.class.php @@ -202,7 +202,7 @@ class ActionComm extends CommonObject $sql.= $conf->entity; $sql.= ")"; - dol_syslog(get_class($this)."::add sql=".$sql); + dol_syslog(get_class($this)."::add", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -292,7 +292,7 @@ class ActionComm extends CommonObject $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s on s.rowid = a.fk_soc"; $sql.= " WHERE a.id=".$id." AND a.fk_action=c.id"; - dol_syslog(get_class($this)."::fetch sql=".$sql); + dol_syslog(get_class($this)."::fetch", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -369,7 +369,7 @@ class ActionComm extends CommonObject $sql = "DELETE FROM ".MAIN_DB_PREFIX."actioncomm"; $sql.= " WHERE id=".$this->id; - dol_syslog(get_class($this)."::delete sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::delete", LOG_DEBUG); $res=$this->db->query($sql); if ($res < 0) { $this->error=$this->db->lasterror(); @@ -477,7 +477,7 @@ class ActionComm extends CommonObject $sql.= ", fk_user_done=".($this->userdone->id > 0 ? "'".$this->userdone->id."'":"null"); $sql.= " WHERE id=".$this->id; - dol_syslog(get_class($this)."::update sql=".$sql); + dol_syslog(get_class($this)."::update", LOG_DEBUG); if ($this->db->query($sql)) { @@ -558,7 +558,7 @@ class ActionComm extends CommonObject } if (! empty($filter)) $sql.= $filter; - dol_syslog(get_class()."::getActions sql=".$sql); + dol_syslog(get_class()."::getActions", LOG_DEBUG); $resql=$db->query($sql); if ($resql) { @@ -644,7 +644,7 @@ class ActionComm extends CommonObject $sql.= ' FROM '.MAIN_DB_PREFIX.'actioncomm as a'; $sql.= ' WHERE a.id = '.$id; - dol_syslog(get_class($this)."::info sql=".$sql); + dol_syslog(get_class($this)."::info", LOG_DEBUG); $result=$this->db->query($sql); if ($result) { @@ -930,7 +930,7 @@ class ActionComm extends CommonObject $sql.= " ORDER by datep"; //print $sql;exit; - dol_syslog(get_class($this)."::build_exportfile select events sql=".$sql); + dol_syslog(get_class($this)."::build_exportfile select events", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { diff --git a/htdocs/comm/action/class/cactioncomm.class.php b/htdocs/comm/action/class/cactioncomm.class.php index 68960c5a6c0..8908b4e2a46 100644 --- a/htdocs/comm/action/class/cactioncomm.class.php +++ b/htdocs/comm/action/class/cactioncomm.class.php @@ -64,7 +64,7 @@ class CActionComm if (is_numeric($id)) $sql.= " WHERE id=".$id; else $sql.= " WHERE code='".$id."'"; - dol_syslog(get_class($this)."::fetch sql=".$sql); + dol_syslog(get_class($this)."::fetch", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -117,7 +117,7 @@ class CActionComm if (! empty($excludetype)) $sql.=($active != ''?" AND":" WHERE")." type <> '".$excludetype."'"; $sql.= " ORDER BY module, position"; - dol_syslog(get_class($this)."::liste_array sql=".$sql); + dol_syslog(get_class($this)."::liste_array", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { diff --git a/htdocs/comm/action/index.php b/htdocs/comm/action/index.php index 92b87d94ad1..2c3791c4c1b 100644 --- a/htdocs/comm/action/index.php +++ b/htdocs/comm/action/index.php @@ -361,7 +361,7 @@ if ($filtera > 0 || $filtert > 0 || $filterd > 0) $sql.= ' ORDER BY datep'; //print $sql; -dol_syslog("comm/action/index.php sql=".$sql, LOG_DEBUG); +dol_syslog("comm/action/index.php", LOG_DEBUG); $resql=$db->query($sql); if ($resql) { @@ -472,7 +472,7 @@ if ($showbirthday) } $sql.= ' ORDER BY birthday'; - dol_syslog("comm/action/index.php sql=".$sql, LOG_DEBUG); + dol_syslog("comm/action/index.php", LOG_DEBUG); $resql=$db->query($sql); if ($resql) { diff --git a/htdocs/comm/action/listactions.php b/htdocs/comm/action/listactions.php index e6944f4c829..56a9efa5589 100644 --- a/htdocs/comm/action/listactions.php +++ b/htdocs/comm/action/listactions.php @@ -183,7 +183,7 @@ $sql.= $db->order($sortfield,$sortorder); $sql.= $db->plimit($limit + 1, $offset); //print $sql; -dol_syslog("comm/action/listactions.php sql=".$sql); +dol_syslog("comm/action/listactions.php", LOG_DEBUG); $resql=$db->query($sql); if ($resql) { diff --git a/htdocs/comm/action/rapport/index.php b/htdocs/comm/action/rapport/index.php index 78f1ca24827..f34678787fa 100644 --- a/htdocs/comm/action/rapport/index.php +++ b/htdocs/comm/action/rapport/index.php @@ -89,7 +89,7 @@ $sql.= " ORDER BY year DESC, month DESC, df DESC"; $sql.= $db->plimit($limit+1,$offset); //print $sql; -dol_syslog("select sql=".$sql); +dol_syslog("select", LOG_DEBUG); $resql=$db->query($sql); if ($resql) { diff --git a/htdocs/comm/mailing/class/mailing.class.php b/htdocs/comm/mailing/class/mailing.class.php index 99b1a2f4419..2cb298bff3f 100644 --- a/htdocs/comm/mailing/class/mailing.class.php +++ b/htdocs/comm/mailing/class/mailing.class.php @@ -109,7 +109,7 @@ class Mailing extends CommonObject $this->titre = $langs->trans("NoTitle"); } - dol_syslog("Mailing::Create sql=".$sql); + dol_syslog("Mailing::Create", LOG_DEBUG); $result=$this->db->query($sql); if ($result) { @@ -157,7 +157,7 @@ class Mailing extends CommonObject $sql .= ", bgimage = '".($this->bgimage?$this->bgimage:null)."'"; $sql .= " WHERE rowid = ".$this->id; - dol_syslog("Mailing::Update sql=".$sql); + dol_syslog("Mailing::Update", LOG_DEBUG); $result=$this->db->query($sql); if ($result) { @@ -192,7 +192,7 @@ class Mailing extends CommonObject $sql.= " FROM ".MAIN_DB_PREFIX."mailing as m"; $sql.= " WHERE m.rowid = ".$rowid; - dol_syslog(get_class($this)."::fetch sql=".$sql); + dol_syslog(get_class($this)."::fetch", LOG_DEBUG); $result=$this->db->query($sql); if ($result) { @@ -325,7 +325,7 @@ class Mailing extends CommonObject $sql.= " FROM ".MAIN_DB_PREFIX."mailing_cibles "; $sql.= " WHERE fk_mailing = ".$fromid; - dol_syslog(get_class($this)."::createFromClone sql=".$sql); + dol_syslog(get_class($this)."::createFromClone", LOG_DEBUG); $result=$this->db->query($sql); if ($result) { @@ -384,7 +384,7 @@ class Mailing extends CommonObject $sql .= " SET statut = 1, date_valid = '".$this->db->idate($now)."', fk_user_valid=".$user->id; $sql .= " WHERE rowid = ".$this->id; - dol_syslog("Mailing::valid sql=".$sql, LOG_DEBUG); + dol_syslog("Mailing::valid", LOG_DEBUG); if ($this->db->query($sql)) { return 1; @@ -409,7 +409,7 @@ class Mailing extends CommonObject $sql = "DELETE FROM ".MAIN_DB_PREFIX."mailing"; $sql.= " WHERE rowid = ".$rowid; - dol_syslog("Mailing::delete sql=".$sql, LOG_DEBUG); + dol_syslog("Mailing::delete", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -436,7 +436,7 @@ class Mailing extends CommonObject $sql.= " SET statut = 0"; $sql.= " WHERE fk_mailing = ".$this->id; - dol_syslog("Mailing::reset_targets_status sql=".$sql, LOG_DEBUG); + dol_syslog("Mailing::reset_targets_status", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { diff --git a/htdocs/comm/mailing/fiche.php b/htdocs/comm/mailing/fiche.php index d803de28357..b08eb746a09 100644 --- a/htdocs/comm/mailing/fiche.php +++ b/htdocs/comm/mailing/fiche.php @@ -173,7 +173,7 @@ if ($action == 'sendallconfirmed' && $confirm == 'yes') $sql .= " FROM ".MAIN_DB_PREFIX."mailing_cibles as mc"; $sql .= " WHERE mc.statut < 1 AND mc.fk_mailing = ".$object->id; - dol_syslog("fiche.php: select targets sql=".$sql, LOG_DEBUG); + dol_syslog("fiche.php: select targets", LOG_DEBUG); $resql=$db->query($sql); if ($resql) { @@ -295,7 +295,7 @@ if ($action == 'sendallconfirmed' && $confirm == 'yes') { //Update status communication of thirdparty prospect $sql = "UPDATE ".MAIN_DB_PREFIX."societe SET fk_stcomm=2 WHERE rowid IN (SELECT source_id FROM ".MAIN_DB_PREFIX."mailing_cibles WHERE rowid=".$obj->rowid.")"; - dol_syslog("fiche.php: set prospect thirdparty status sql=".$sql, LOG_DEBUG); + dol_syslog("fiche.php: set prospect thirdparty status", LOG_DEBUG); $resql2=$db->query($sql); if (! $resql2) { @@ -304,7 +304,7 @@ if ($action == 'sendallconfirmed' && $confirm == 'yes') //Update status communication of contact prospect $sql = "UPDATE ".MAIN_DB_PREFIX."societe SET fk_stcomm=2 WHERE rowid IN (SELECT sc.fk_soc FROM ".MAIN_DB_PREFIX."socpeople AS sc INNER JOIN ".MAIN_DB_PREFIX."mailing_cibles AS mc ON mc.rowid=".$obj->rowid." AND mc.source_type = 'contact' AND mc.source_id = sc.rowid)"; - dol_syslog("fiche.php: set prospect contact status sql=".$sql, LOG_DEBUG); + dol_syslog("fiche.php: set prospect contact status", LOG_DEBUG); $resql2=$db->query($sql); if (! $resql2) @@ -363,7 +363,7 @@ if ($action == 'sendallconfirmed' && $confirm == 'yes') } $sql="UPDATE ".MAIN_DB_PREFIX."mailing SET statut=".$statut." WHERE rowid=".$object->id; - dol_syslog("comm/mailing/fiche.php: update global status sql=".$sql, LOG_DEBUG); + dol_syslog("comm/mailing/fiche.php: update global status", LOG_DEBUG); $resql2=$db->query($sql); if (! $resql2) { diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index 070f0232215..5122bd15f51 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -749,7 +749,7 @@ class Propal extends CommonObject $sql.= ", ".$conf->entity; $sql.= ")"; - dol_syslog(get_class($this)."::create sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::create", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -760,7 +760,7 @@ class Propal extends CommonObject $this->ref='(PROV'.$this->id.')'; $sql = 'UPDATE '.MAIN_DB_PREFIX."propal SET ref='".$this->ref."' WHERE rowid=".$this->id; - dol_syslog(get_class($this)."::create sql=".$sql); + dol_syslog(get_class($this)."::create", LOG_DEBUG); $resql=$this->db->query($sql); if (! $resql) $error++; @@ -1075,7 +1075,7 @@ class Propal extends CommonObject if ($ref) $sql.= " AND p.ref='".$ref."'"; else $sql.= " AND p.rowid=".$rowid; - dol_syslog(get_class($this)."::fetch sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::fetch", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -1410,7 +1410,7 @@ class Propal extends CommonObject $sql = "UPDATE ".MAIN_DB_PREFIX."propal SET datep = '".$this->db->idate($date)."'"; $sql.= " WHERE rowid = ".$this->id." AND fk_statut = 0"; - dol_syslog(get_class($this)."::set_date sql=".$sql); + dol_syslog(get_class($this)."::set_date", LOG_DEBUG); if ($this->db->query($sql) ) { $this->date = $date; @@ -1667,7 +1667,7 @@ class Propal extends CommonObject $this->db->begin(); - dol_syslog(get_class($this)."::reopen sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::reopen", LOG_DEBUG); $resql = $this->db->query($sql); if (! $resql) { $error++; $this->errors[]="Error ".$this->db->lasterror(); @@ -1993,7 +1993,7 @@ class Propal extends CommonObject $sql.= " FROM ".MAIN_DB_PREFIX."facture"; $sql.= " WHERE rowid IN (".implode(',',$linkedInvoices).")"; - dol_syslog(get_class($this)."::InvoiceArrayList sql=".$sql); + dol_syslog(get_class($this)."::InvoiceArrayList", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) @@ -2974,7 +2974,7 @@ class PropaleLigne extends CommonObject $this->db->begin(); $sql = "DELETE FROM ".MAIN_DB_PREFIX."propaldet WHERE rowid = ".$this->rowid; - dol_syslog("PropaleLigne::delete sql=".$sql, LOG_DEBUG); + dol_syslog("PropaleLigne::delete", LOG_DEBUG); if ($this->db->query($sql) ) { @@ -3085,7 +3085,7 @@ class PropaleLigne extends CommonObject $sql.= " , date_end=".(! empty($this->date_end)?"'".$this->db->idate($this->date_end)."'":"null"); $sql.= " WHERE rowid = ".$this->rowid; - dol_syslog(get_class($this)."::update sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::update", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index e2b0f5506fb..5af12ef11bb 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -229,7 +229,7 @@ class Commande extends CommonOrder $sql.= " fk_user_valid = ".$user->id; $sql.= " WHERE rowid = ".$this->id; - dol_syslog(get_class($this)."::valid() sql=".$sql); + dol_syslog(get_class($this)."::valid()", LOG_DEBUG); $resql=$this->db->query($sql); if (! $resql) { @@ -352,7 +352,7 @@ class Commande extends CommonOrder $sql.= " SET fk_statut = 0"; $sql.= " WHERE rowid = ".$this->id; - dol_syslog(get_class($this)."::set_draft sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::set_draft", LOG_DEBUG); if ($this->db->query($sql)) { // If stock is decremented on validate order, we must reincrement it @@ -424,7 +424,7 @@ class Commande extends CommonOrder $sql.= ' SET fk_statut=1, facture=0'; $sql.= ' WHERE rowid = '.$this->id; - dol_syslog(get_class($this)."::set_reopen sql=".$sql); + dol_syslog(get_class($this)."::set_reopen", LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { @@ -535,7 +535,7 @@ class Commande extends CommonOrder $sql.= " WHERE rowid = ".$this->id; $sql.= " AND fk_statut = 1"; - dol_syslog(get_class($this)."::cancel sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::cancel", LOG_DEBUG); if ($this->db->query($sql)) { // If stock is decremented on validate order, we must reincrement it @@ -672,7 +672,7 @@ class Commande extends CommonOrder $sql.= ", ".$conf->entity; $sql.= ")"; - dol_syslog(get_class($this)."::create sql=".$sql); + dol_syslog(get_class($this)."::create", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -1327,7 +1327,7 @@ class Commande extends CommonOrder if ($ref_ext) $sql.= " AND c.ref_ext='".$this->db->escape($ref_ext)."'"; if ($ref_int) $sql.= " AND c.ref_int='".$this->db->escape($ref_int)."'"; - dol_syslog(get_class($this)."::fetch sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::fetch", LOG_DEBUG); $result = $this->db->query($sql); if ($result) { @@ -1511,7 +1511,7 @@ class Commande extends CommonOrder if ($only_product) $sql .= ' AND p.fk_product_type = 0'; $sql .= ' ORDER BY l.rang'; - dol_syslog(get_class($this)."::fetch_lines sql=".$sql,LOG_DEBUG); + dol_syslog(get_class($this)."::fetch_lines", LOG_DEBUG); $result = $this->db->query($sql); if ($result) { @@ -1638,7 +1638,7 @@ class Commande extends CommonOrder $sql.= ' GROUP BY cd.rowid, cd.fk_product'; //print $sql; - dol_syslog(get_class($this)."::loadExpeditions sql=".$sql,LOG_DEBUG); + dol_syslog(get_class($this)."::loadExpeditions", LOG_DEBUG); $result = $this->db->query($sql); if ($result) { @@ -1938,7 +1938,7 @@ class Commande extends CommonOrder $sql.= " SET date_livraison = ".($date_livraison ? "'".$this->db->idate($date_livraison)."'" : 'null'); $sql.= " WHERE rowid = ".$this->id; - dol_syslog(get_class($this)."::set_date_livraison sql=".$sql,LOG_DEBUG); + dol_syslog(get_class($this)."::set_date_livraison", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -2206,7 +2206,7 @@ class Commande extends CommonOrder $sql = 'UPDATE '.MAIN_DB_PREFIX.'commande SET facture = 1'; $sql.= ' WHERE rowid = '.$this->id.' AND fk_statut > 0'; - dol_syslog(get_class($this)."::classifyBilled sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::classifyBilled", LOG_DEBUG); if ($this->db->query($sql)) { // Appel des triggers @@ -2445,7 +2445,7 @@ class Commande extends CommonOrder { // Delete order details $sql = 'DELETE FROM '.MAIN_DB_PREFIX."commandedet WHERE fk_commande = ".$this->id; - dol_syslog(get_class($this)."::delete sql=".$sql); + dol_syslog(get_class($this)."::delete", LOG_DEBUG); if (! $this->db->query($sql) ) { dol_syslog(get_class($this)."::delete error", LOG_ERR); @@ -2454,7 +2454,7 @@ class Commande extends CommonOrder // Delete order $sql = 'DELETE FROM '.MAIN_DB_PREFIX."commande WHERE rowid = ".$this->id; - dol_syslog(get_class($this)."::delete sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::delete", LOG_DEBUG); if (! $this->db->query($sql) ) { dol_syslog(get_class($this)."::delete error", LOG_ERR); @@ -3156,7 +3156,7 @@ class OrderLine extends CommonOrderLine $sql = 'DELETE FROM '.MAIN_DB_PREFIX."commandedet WHERE rowid='".$this->rowid."';"; - dol_syslog("OrderLine::delete sql=".$sql); + dol_syslog("OrderLine::delete", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -3269,7 +3269,7 @@ class OrderLine extends CommonOrderLine $sql.= " ".(! empty($this->date_end)?"'".$this->db->idate($this->date_end)."'":"null"); $sql.= ')'; - dol_syslog(get_class($this)."::insert sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::insert", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -3379,7 +3379,7 @@ class OrderLine extends CommonOrderLine if (! empty($this->rang)) $sql.= ", rang=".$this->rang; $sql.= " WHERE rowid = ".$this->rowid; - dol_syslog(get_class($this)."::update sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::update", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { diff --git a/htdocs/compta/bank/account.php b/htdocs/compta/bank/account.php index 27690ae7093..ecc1443d838 100644 --- a/htdocs/compta/bank/account.php +++ b/htdocs/compta/bank/account.php @@ -241,7 +241,7 @@ if ($id > 0 || ! empty($ref)) $sql.= " AND ba.entity = ".$conf->entity; $sql.= $sql_rech; - dol_syslog("account.php count transactions - sql=".$sql, LOG_DEBUG); + dol_syslog("account.php count transactions -", LOG_DEBUG); $result=$db->query($sql); if ($result) { @@ -485,7 +485,7 @@ if ($id > 0 || ! empty($ref)) $sql.= $db->order("b.datev, b.datec", "ASC"); // We add date of creation to have correct order when everything is done the same day $sql.= $db->plimit($limitsql, 0); - dol_syslog("account.php get transactions - sql=".$sql, LOG_DEBUG); + dol_syslog("account.php get transactions -", LOG_DEBUG); $result = $db->query($sql); if ($result) { diff --git a/htdocs/compta/bank/class/account.class.php b/htdocs/compta/bank/class/account.class.php index 8bcabf7f17b..0179149e69f 100644 --- a/htdocs/compta/bank/class/account.class.php +++ b/htdocs/compta/bank/class/account.class.php @@ -146,7 +146,7 @@ class Account extends CommonObject $sql.= ", '".$type."'"; $sql.= ")"; - dol_syslog(get_class($this)."::add_url_line sql=".$sql); + dol_syslog(get_class($this)."::add_url_line", LOG_DEBUG); if ($this->db->query($sql)) { $rowid = $this->db->last_insert_id(MAIN_DB_PREFIX."bank_url"); @@ -189,7 +189,7 @@ class Account extends CommonObject } $sql.= " ORDER BY type, label"; - dol_syslog(get_class($this)."::get_url sql=".$sql); + dol_syslog(get_class($this)."::get_url", LOG_DEBUG); $result = $this->db->query($sql); if ($result) { @@ -302,7 +302,7 @@ class Account extends CommonObject $sql.= ", ".($banque?"'".$this->db->escape($banque)."'":"null"); $sql.= ")"; - dol_syslog(get_class($this)."::addline sql=".$sql); + dol_syslog(get_class($this)."::addline", LOG_DEBUG); if ($this->db->query($sql)) { $rowid = $this->db->last_insert_id(MAIN_DB_PREFIX."bank"); @@ -404,7 +404,7 @@ class Account extends CommonObject $sql.= ", ".$this->country_id; $sql.= ")"; - dol_syslog(get_class($this)."::create sql=".$sql); + dol_syslog(get_class($this)."::create", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -513,7 +513,7 @@ class Account extends CommonObject $sql.= " WHERE rowid = ".$this->id; $sql.= " AND entity = ".$conf->entity; - dol_syslog(get_class($this)."::update sql=".$sql); + dol_syslog(get_class($this)."::update", LOG_DEBUG); $result = $this->db->query($sql); if ($result) { @@ -617,7 +617,7 @@ class Account extends CommonObject if ($id) $sql.= " AND ba.rowid = ".$id; if ($ref) $sql.= " AND ba.ref = '".$this->db->escape($ref)."'"; - dol_syslog(get_class($this)."::fetch sql=".$sql); + dol_syslog(get_class($this)."::fetch", LOG_DEBUG); $result = $this->db->query($sql); if ($result) { @@ -691,7 +691,7 @@ class Account extends CommonObject $sql.= " WHERE rowid = ".$this->rowid; $sql.= " AND entity = ".$conf->entity; - dol_syslog(get_class($this)."::delete sql=".$sql); + dol_syslog(get_class($this)."::delete", LOG_DEBUG); $result = $this->db->query($sql); if ($result) { return 1; @@ -1091,7 +1091,7 @@ class AccountLine extends CommonObject else if ($ref) $sql.= " AND b.rowid='".$this->db->escape($ref)."'"; else $sql.= " AND b.rowid=".$rowid; - dol_syslog(get_class($this)."::fetch sql=".$sql); + dol_syslog(get_class($this)."::fetch", LOG_DEBUG); $result = $this->db->query($sql); if ($result) { @@ -1166,12 +1166,12 @@ class AccountLine extends CommonObject } $sql = "DELETE FROM ".MAIN_DB_PREFIX."bank_class WHERE lineid=".$this->rowid; - dol_syslog(get_class($this)."::delete sql=".$sql); + dol_syslog(get_class($this)."::delete", LOG_DEBUG); $result = $this->db->query($sql); if (! $result) $nbko++; $sql = "DELETE FROM ".MAIN_DB_PREFIX."bank WHERE rowid=".$this->rowid; - dol_syslog(get_class($this)."::delete sql=".$sql); + dol_syslog(get_class($this)."::delete", LOG_DEBUG); $result = $this->db->query($sql); if (! $result) $nbko++; @@ -1208,7 +1208,7 @@ class AccountLine extends CommonObject $this->db->begin(); $sql = "DELETE FROM ".MAIN_DB_PREFIX."bank_url WHERE fk_bank=".$this->rowid; - dol_syslog(get_class($this)."::delete_urls sql=".$sql); + dol_syslog(get_class($this)."::delete_urls", LOG_DEBUG); $result = $this->db->query($sql); if (! $result) $nbko++; @@ -1242,7 +1242,7 @@ class AccountLine extends CommonObject $sql.= " dateo='".$this->db->idate($this->dateo)."'"; $sql.= " WHERE rowid = ".$this->rowid; - dol_syslog(get_class($this)."::update sql=".$sql); + dol_syslog(get_class($this)."::update", LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { @@ -1276,7 +1276,7 @@ class AccountLine extends CommonObject $sql.= ", fk_user_rappro = ".$user->id; $sql.= " WHERE rowid = ".$this->id; - dol_syslog(get_class($this)."::update_conciliation sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::update_conciliation", LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { @@ -1290,7 +1290,7 @@ class AccountLine extends CommonObject $sql.= ", ".$cat; $sql.= ")"; - dol_syslog(get_class($this)."::update_conciliation sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::update_conciliation", LOG_DEBUG); $resql = $this->db->query($sql); // No error check. Can fail if category already affected diff --git a/htdocs/compta/bank/class/bankcateg.class.php b/htdocs/compta/bank/class/bankcateg.class.php index c4066bae655..1bcadc4eb1a 100644 --- a/htdocs/compta/bank/class/bankcateg.class.php +++ b/htdocs/compta/bank/class/bankcateg.class.php @@ -84,7 +84,7 @@ class BankCateg // extends CommonObject $this->db->begin(); - dol_syslog(get_class($this)."::create sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::create", LOG_DEBUG); $resql=$this->db->query($sql); if (! $resql) { $error++; $this->errors[]="Error ".$this->db->lasterror(); } @@ -142,7 +142,7 @@ class BankCateg // extends CommonObject $sql.= " WHERE t.rowid = ".$id; $sql.= " AND t.entity = ".$conf->entity; - dol_syslog(get_class($this)."::fetch sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::fetch", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -192,7 +192,7 @@ class BankCateg // extends CommonObject $this->db->begin(); - dol_syslog(get_class($this)."::update sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::update", LOG_DEBUG); $resql = $this->db->query($sql); if (! $resql) { $error++; $this->errors[]="Error ".$this->db->lasterror(); } @@ -249,7 +249,7 @@ class BankCateg // extends CommonObject $this->db->begin(); - dol_syslog(get_class($this)."::delete sql=".$sql); + dol_syslog(get_class($this)."::delete", LOG_DEBUG); $resql = $this->db->query($sql); if (! $resql) { $error++; $this->errors[]="Error ".$this->db->lasterror(); } diff --git a/htdocs/compta/bank/ligne.php b/htdocs/compta/bank/ligne.php index fee53c412b8..1ebc99a344d 100644 --- a/htdocs/compta/bank/ligne.php +++ b/htdocs/compta/bank/ligne.php @@ -175,7 +175,7 @@ if ($user->rights->banque->consolidate && ($action == 'num_releve' || $action == else $sql.=", rappro = ".$rappro; $sql.= " WHERE rowid = ".$rowid; - dol_syslog("ligne.php sql=".$sql, LOG_DEBUG); + dol_syslog("ligne.php", LOG_DEBUG); $result = $db->query($sql); if ($result) { diff --git a/htdocs/compta/bank/releve.php b/htdocs/compta/bank/releve.php index dba271e672b..172140c2c64 100644 --- a/htdocs/compta/bank/releve.php +++ b/htdocs/compta/bank/releve.php @@ -189,7 +189,7 @@ else $sql.= " AND b.fk_account = ".$acct->id; $sql.= " ORDER BY b.num_releve DESC"; - dol_syslog("htdocs/compta/bank/releve.php sql=".$sql); + dol_syslog("htdocs/compta/bank/releve.php", LOG_DEBUG); $resql = $db->query($sql); if ($resql) { @@ -211,7 +211,7 @@ else $sql.= " AND b.fk_account = ".$acct->id; $sql.= " ORDER BY b.num_releve ASC"; - dol_syslog("htdocs/compta/bank/releve.php sql=".$sql); + dol_syslog("htdocs/compta/bank/releve.php", LOG_DEBUG); $resql = $db->query($sql); if ($resql) { diff --git a/htdocs/compta/charges/index.php b/htdocs/compta/charges/index.php index f38f7e72aa2..e4286157617 100644 --- a/htdocs/compta/charges/index.php +++ b/htdocs/compta/charges/index.php @@ -207,7 +207,7 @@ if ($conf->tax->enabled) //$sql.= $db->plimit($limit+1,$offset); //print $sql; - dol_syslog("compta/charges/index.php: select payment sql=".$sql); + dol_syslog("compta/charges/index.php: select payment", LOG_DEBUG); $resql=$db->query($sql); if ($resql) { diff --git a/htdocs/compta/deplacement/class/deplacement.class.php b/htdocs/compta/deplacement/class/deplacement.class.php index f47046e2bdd..d46585c300d 100644 --- a/htdocs/compta/deplacement/class/deplacement.class.php +++ b/htdocs/compta/deplacement/class/deplacement.class.php @@ -120,7 +120,7 @@ class Deplacement extends CommonObject $sql.= ", ".($this->fk_soc > 0? $this->fk_soc : "null"); $sql.= ")"; - dol_syslog(get_class($this)."::create sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::create", LOG_DEBUG); $result = $this->db->query($sql); if ($result) { @@ -203,7 +203,7 @@ class Deplacement extends CommonObject $sql .= " , fk_projet = ".($this->fk_project>0?$this->fk_project:0); $sql .= " WHERE rowid = ".$this->id; - dol_syslog(get_class($this)."::update sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::update", LOG_DEBUG); $result = $this->db->query($sql); if ($result) { @@ -230,7 +230,7 @@ class Deplacement extends CommonObject $sql.= " FROM ".MAIN_DB_PREFIX."deplacement"; $sql.= " WHERE rowid = ".$id; - dol_syslog(get_class($this)."::fetch sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::fetch", LOG_DEBUG); $result = $this->db->query($sql); if ( $result ) { @@ -271,7 +271,7 @@ class Deplacement extends CommonObject $sql = "DELETE FROM ".MAIN_DB_PREFIX."deplacement WHERE rowid = ".$id; - dol_syslog(get_class($this)."::delete sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::delete", LOG_DEBUG); $result = $this->db->query($sql); if ($result) { @@ -381,7 +381,7 @@ class Deplacement extends CommonObject $sql.= " FROM ".MAIN_DB_PREFIX."c_type_fees"; $sql.= " WHERE active = ".$active; - dol_syslog(get_class($this)."::listOfTypes sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::listOfTypes", LOG_DEBUG); $result = $this->db->query($sql); if ( $result ) { diff --git a/htdocs/compta/dons/class/don.class.php b/htdocs/compta/dons/class/don.class.php index a37b0433c80..df99859e663 100644 --- a/htdocs/compta/dons/class/don.class.php +++ b/htdocs/compta/dons/class/don.class.php @@ -354,7 +354,7 @@ class Don extends CommonObject $sql.= ", '".$this->db->escape($this->phone_mobile)."'"; $sql.= ")"; - dol_syslog("Don::create sql=".$sql, LOG_DEBUG); + dol_syslog("Don::create", LOG_DEBUG); $result = $this->db->query($sql); if ($result) { @@ -414,7 +414,7 @@ class Don extends CommonObject $sql .= ",fk_statut=".$this->statut; $sql .= " WHERE rowid = $this->id"; - dol_syslog("Don::update sql=".$sql); + dol_syslog("Don::update", LOG_DEBUG); $result = $this->db->query($sql); if ($result) { @@ -478,7 +478,7 @@ class Don extends CommonObject $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_paiement as cp ON cp.id = d.fk_paiement"; $sql.= " WHERE d.rowid = ".$rowid." AND d.entity = ".$conf->entity; - dol_syslog(get_class($this)."::fetch sql=".$sql); + dol_syslog(get_class($this)."::fetch", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { diff --git a/htdocs/compta/facture/class/facture-rec.class.php b/htdocs/compta/facture/class/facture-rec.class.php index 7147f51c613..f87e640d78e 100644 --- a/htdocs/compta/facture/class/facture-rec.class.php +++ b/htdocs/compta/facture/class/facture-rec.class.php @@ -216,7 +216,7 @@ class FactureRec extends Facture $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."element_element as el ON el.fk_target = f.rowid AND el.targettype = 'facture'"; $sql.= ' WHERE f.rowid='.$rowid; - dol_syslog("FactureRec::Fetch rowid=".$rowid." sql=".$sql, LOG_DEBUG); + dol_syslog("FactureRec::Fetch rowid=".$rowid."", LOG_DEBUG); $result = $this->db->query($sql); if ($result) { @@ -497,7 +497,7 @@ class FactureRec extends Facture $sql.= ", ".$rang; $sql.= ", ".$special_code.")"; - dol_syslog(get_class($this)."::addline sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::addline", LOG_DEBUG); if ($this->db->query($sql)) { $this->id=$facid; diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index 81bf47715e6..48d6e4d34e8 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -263,7 +263,7 @@ class Facture extends CommonInvoice $sql.= ",".$this->mode_reglement_id; $sql.= ", '".$this->db->idate($datelim)."', '".$this->modelpdf."')"; - dol_syslog(get_class($this)."::create sql=".$sql); + dol_syslog(get_class($this)."::create", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -273,7 +273,7 @@ class Facture extends CommonInvoice $this->ref='(PROV'.$this->id.')'; $sql = 'UPDATE '.MAIN_DB_PREFIX."facture SET facnumber='".$this->ref."' WHERE rowid=".$this->id; - dol_syslog(get_class($this)."::create sql=".$sql); + dol_syslog(get_class($this)."::create", LOG_DEBUG); $resql=$this->db->query($sql); if (! $resql) $error++; @@ -846,7 +846,7 @@ class Facture extends CommonInvoice if ($ref_ext) $sql.= " AND f.ref_ext='".$this->db->escape($ref_ext)."'"; if ($ref_int) $sql.= " AND f.ref_int='".$this->db->escape($ref_int)."'"; - dol_syslog(get_class($this)."::fetch sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::fetch", LOG_DEBUG); $result = $this->db->query($sql); if ($result) { @@ -1089,7 +1089,7 @@ class Facture extends CommonInvoice $this->db->begin(); - dol_syslog(get_class($this)."::update sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::update", LOG_DEBUG); $resql = $this->db->query($sql); if (! $resql) { $error++; $this->errors[]="Error ".$this->db->lasterror(); @@ -1311,7 +1311,7 @@ class Facture extends CommonInvoice $sql.= ' SET fk_facture = NULL, fk_facture_line = NULL'; $sql.= ' WHERE fk_facture_line IN ('.join(',',$list_rowid_det).')'; - dol_syslog(get_class($this)."::delete sql=".$sql); + dol_syslog(get_class($this)."::delete", LOG_DEBUG); if (! $this->db->query($sql)) { $this->error=$this->db->error()." sql=".$sql; @@ -1501,7 +1501,7 @@ class Facture extends CommonInvoice if ($close_note) $sql.= ", close_note='".$this->db->escape($close_note)."'"; $sql.= ' WHERE rowid = '.$this->id; - dol_syslog(get_class($this)."::set_paid sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::set_paid", LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { @@ -1557,7 +1557,7 @@ class Facture extends CommonInvoice $sql.= ' SET paye=0, fk_statut=1, close_code=null, close_note=null'; $sql.= ' WHERE rowid = '.$this->id; - dol_syslog(get_class($this)."::set_unpaid sql=".$sql); + dol_syslog(get_class($this)."::set_unpaid", LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { @@ -1767,7 +1767,7 @@ class Facture extends CommonInvoice } $sql.= ' WHERE rowid = '.$this->id; - dol_syslog(get_class($this)."::validate sql=".$sql); + dol_syslog(get_class($this)."::validate", LOG_DEBUG); $resql=$this->db->query($sql); if (! $resql) { @@ -1907,7 +1907,7 @@ class Facture extends CommonInvoice $sql.= " SET fk_statut = 0"; $sql.= " WHERE rowid = ".$this->id; - dol_syslog(get_class($this)."::set_draft sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::set_draft", LOG_DEBUG); $result=$this->db->query($sql); if ($result) { @@ -2321,7 +2321,7 @@ class Facture extends CommonInvoice $sql.= ' SET fk_facture_line = NULL'; $sql.= ' WHERE fk_facture_line = '.$rowid; - dol_syslog(get_class($this)."::deleteline sql=".$sql); + dol_syslog(get_class($this)."::deleteline", LOG_DEBUG); $result = $this->db->query($sql); if (! $result) { @@ -2461,7 +2461,7 @@ class Facture extends CommonInvoice $sql.= ' AND p.fk_paiement = t.id'; if ($filtertype) $sql.=" AND t.code='PRE'"; - dol_syslog(get_class($this)."::getListOfPayments sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::getListOfPayments", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -2857,7 +2857,7 @@ class Facture extends CommonInvoice if ($socid > 0) $sql.=" AND f.fk_soc = ".$socid; $sql.= " ORDER BY f.facnumber"; - dol_syslog(get_class($this)."::list_qualified_avoir_invoices sql=".$sql); + dol_syslog(get_class($this)."::list_qualified_avoir_invoices", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -2906,7 +2906,7 @@ class Facture extends CommonInvoice $sql.= ' WHERE fk_facture = '.$this->id; $sql.= ' AND traite = 0'; - dol_syslog(get_class($this)."::demande_prelevement sql=".$sql); + dol_syslog(get_class($this)."::demande_prelevement", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -2937,7 +2937,7 @@ class Facture extends CommonInvoice $sql .= ",'".$bac->number."'"; $sql .= ",'".$bac->cle_rib."')"; - dol_syslog(get_class($this)."::demande_prelevement sql=".$sql); + dol_syslog(get_class($this)."::demande_prelevement", LOG_DEBUG); if ($this->db->query($sql)) { return 1; @@ -3569,7 +3569,7 @@ class FactureLigne extends CommonInvoiceLine $sql.= " ".price2num($this->total_localtax2); $sql.= ')'; - dol_syslog(get_class($this)."::insert sql=".$sql); + dol_syslog(get_class($this)."::insert", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -3732,7 +3732,7 @@ class FactureLigne extends CommonInvoiceLine if (! empty($this->rang)) $sql.= ", rang=".$this->rang; $sql.= " WHERE rowid = ".$this->rowid; - dol_syslog(get_class($this)."::update sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::update", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -3783,7 +3783,7 @@ class FactureLigne extends CommonInvoiceLine $this->db->begin(); $sql = "DELETE FROM ".MAIN_DB_PREFIX."facturedet WHERE rowid = ".$this->rowid; - dol_syslog(get_class($this)."::delete sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::delete", LOG_DEBUG); if ($this->db->query($sql) ) { // Appel des triggers @@ -3831,7 +3831,7 @@ class FactureLigne extends CommonInvoiceLine $sql.= ",total_ttc=".price2num($this->total_ttc).""; $sql.= " WHERE rowid = ".$this->rowid; - dol_syslog(get_class($this)."::update_total sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::update_total", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) diff --git a/htdocs/compta/facture/class/paymentterm.class.php b/htdocs/compta/facture/class/paymentterm.class.php index 62ebcbacdbd..b137c0da85c 100644 --- a/htdocs/compta/facture/class/paymentterm.class.php +++ b/htdocs/compta/facture/class/paymentterm.class.php @@ -119,7 +119,7 @@ class PaymentTerm // extends CommonObject $this->db->begin(); - dol_syslog(get_class($this)."::create sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::create", LOG_DEBUG); $resql=$this->db->query($sql); if (! $resql) { $error++; $this->errors[]="Error ".$this->db->lasterror(); } @@ -185,7 +185,7 @@ class PaymentTerm // extends CommonObject $sql.= " FROM ".MAIN_DB_PREFIX."c_payment_term as t"; $sql.= " WHERE t.rowid = ".$id; - dol_syslog(get_class($this)."::fetch sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::fetch", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -235,7 +235,7 @@ class PaymentTerm // extends CommonObject $sql.= " FROM ".MAIN_DB_PREFIX."c_payment_term as t"; $sql.= " WHERE t.code = 'RECEP'"; - dol_syslog(get_class($this)."::getDefaultId sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::getDefaultId", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -301,7 +301,7 @@ class PaymentTerm // extends CommonObject $this->db->begin(); - dol_syslog(get_class($this)."::update sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::update", LOG_DEBUG); $resql = $this->db->query($sql); if (! $resql) { $error++; $this->errors[]="Error ".$this->db->lasterror(); } @@ -357,7 +357,7 @@ class PaymentTerm // extends CommonObject $this->db->begin(); - dol_syslog(get_class($this)."::delete sql=".$sql); + dol_syslog(get_class($this)."::delete", LOG_DEBUG); $resql = $this->db->query($sql); if (! $resql) { $error++; $this->errors[]="Error ".$this->db->lasterror(); } diff --git a/htdocs/compta/localtax/class/localtax.class.php b/htdocs/compta/localtax/class/localtax.class.php index b500a701254..5580cbe70a3 100644 --- a/htdocs/compta/localtax/class/localtax.class.php +++ b/htdocs/compta/localtax/class/localtax.class.php @@ -95,7 +95,7 @@ class Localtax extends CommonObject $sql.= " '".$this->fk_user_modif."'"; $sql.= ")"; - dol_syslog(get_class($this)."::create sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::create", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -152,7 +152,7 @@ class Localtax extends CommonObject $sql.= " fk_user_modif='".$this->fk_user_modif."'"; $sql.= " WHERE rowid=".$this->id; - dol_syslog(get_class($this)."::update sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::update", LOG_DEBUG); $resql = $this->db->query($sql); if (! $resql) { @@ -202,7 +202,7 @@ class Localtax extends CommonObject $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."bank as b ON t.fk_bank = b.rowid"; $sql.= " WHERE t.rowid = ".$id; - dol_syslog(get_class($this)."::fetch sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::fetch", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -253,7 +253,7 @@ class Localtax extends CommonObject $sql = "DELETE FROM ".MAIN_DB_PREFIX."localtax"; $sql.= " WHERE rowid=".$this->id; - dol_syslog(get_class($this)."::delete sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::delete", LOG_DEBUG); $resql = $this->db->query($sql); if (! $resql) { @@ -488,7 +488,7 @@ class Localtax extends CommonObject $sql.=", '".$user->id."', NULL"; $sql.= ")"; - dol_syslog(get_class($this)."::addPayment sql=".$sql); + dol_syslog(get_class($this)."::addPayment", LOG_DEBUG); $result = $this->db->query($sql); if ($result) { diff --git a/htdocs/compta/paiement/cheque/class/remisecheque.class.php b/htdocs/compta/paiement/cheque/class/remisecheque.class.php index 917c88e0743..e6f8963b3e9 100644 --- a/htdocs/compta/paiement/cheque/class/remisecheque.class.php +++ b/htdocs/compta/paiement/cheque/class/remisecheque.class.php @@ -73,7 +73,7 @@ class RemiseCheque extends CommonObject if ($id) $sql.= " AND bc.rowid = ".$id; if ($ref) $sql.= " AND bc.number = '".$this->db->escape($ref)."'"; - dol_syslog("RemiseCheque::fetch sql=".$sql, LOG_DEBUG); + dol_syslog("RemiseCheque::fetch", LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { @@ -155,7 +155,7 @@ class RemiseCheque extends CommonObject $sql.= ", ''"; $sql.= ")"; - dol_syslog("RemiseCheque::Create sql=".$sql, LOG_DEBUG); + dol_syslog("RemiseCheque::Create", LOG_DEBUG); $resql = $this->db->query($sql); if ( $resql ) { @@ -172,7 +172,7 @@ class RemiseCheque extends CommonObject $sql.= " SET number='(PROV".$this->id.")'"; $sql.= " WHERE rowid='".$this->id."';"; - dol_syslog("RemiseCheque::Create sql=".$sql, LOG_DEBUG); + dol_syslog("RemiseCheque::Create", LOG_DEBUG); $resql = $this->db->query($sql); if (! $resql) { @@ -192,7 +192,7 @@ class RemiseCheque extends CommonObject $sql.= " AND b.fk_account='".$account_id."'"; if ($limit) $sql.= $this->db->plimit($limit); - dol_syslog("RemiseCheque::Create sql=".$sql, LOG_DEBUG); + dol_syslog("RemiseCheque::Create", LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { @@ -225,7 +225,7 @@ class RemiseCheque extends CommonObject $sql.= " SET fk_bordereau = ".$this->id; $sql.= " WHERE rowid = ".$lineid; - dol_syslog("RemiseCheque::Create sql=".$sql, LOG_DEBUG); + dol_syslog("RemiseCheque::Create", LOG_DEBUG); $resql = $this->db->query($sql); if (!$resql) { @@ -351,7 +351,7 @@ class RemiseCheque extends CommonObject $sql.= " AND entity = ".$conf->entity; $sql.= " AND statut = 0"; - dol_syslog("RemiseCheque::Validate sql=".$sql, LOG_DEBUG); + dol_syslog("RemiseCheque::Validate", LOG_DEBUG); $resql = $this->db->query($sql); if ( $resql ) { @@ -410,7 +410,7 @@ class RemiseCheque extends CommonObject $sql.= " WHERE entity = ".$conf->entity; $sql.= " AND number not like '(%'"; - dol_syslog("Remisecheque::getNextNumber sql=".$sql); + dol_syslog("Remisecheque::getNextNumber", LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { @@ -510,7 +510,7 @@ class RemiseCheque extends CommonObject $sql.= " AND bc.entity = ".$conf->entity; $sql.= " ORDER BY b.dateo ASC, b.rowid ASC"; - dol_syslog("RemiseCheque::generatePdf sql=".$sql, LOG_DEBUG); + dol_syslog("RemiseCheque::generatePdf", LOG_DEBUG); $result = $this->db->query($sql); if ($result) { diff --git a/htdocs/compta/paiement/class/paiement.class.php b/htdocs/compta/paiement/class/paiement.class.php index 93f5f017c44..71c9dc44d81 100644 --- a/htdocs/compta/paiement/class/paiement.class.php +++ b/htdocs/compta/paiement/class/paiement.class.php @@ -81,7 +81,7 @@ class Paiement extends CommonObject $sql.= ' WHERE p.fk_paiement = c.id'; $sql.= ' AND p.rowid = '.$id; - dol_syslog(get_class($this)."::fetch sql=".$sql); + dol_syslog(get_class($this)."::fetch", LOG_DEBUG); $result = $this->db->query($sql); if ($result) @@ -161,7 +161,7 @@ class Paiement extends CommonObject $sql = "INSERT INTO ".MAIN_DB_PREFIX."paiement (entity, datec, datep, amount, fk_paiement, num_paiement, note, fk_user_creat)"; $sql.= " VALUES (".$conf->entity.", '".$this->db->idate($now)."', '".$this->db->idate($this->datepaye)."', '".$totalamount."', ".$this->paiementid.", '".$this->num_paiement."', '".$this->db->escape($this->note)."', ".$user->id.")"; - dol_syslog(get_class($this)."::Create insert paiement sql=".$sql); + dol_syslog(get_class($this)."::Create insert paiement", LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { @@ -581,7 +581,7 @@ class Paiement extends CommonObject $sql.= " SET datep = '".$this->db->idate($date)."'"; $sql.= " WHERE rowid = ".$this->id; - dol_syslog(get_class($this)."::update_date sql=".$sql); + dol_syslog(get_class($this)."::update_date", LOG_DEBUG); $result = $this->db->query($sql); if ($result) { @@ -613,7 +613,7 @@ class Paiement extends CommonObject $sql.= " SET num_paiement = '".$this->db->escape($num)."'"; $sql.= " WHERE rowid = ".$this->id; - dol_syslog(get_class($this)."::update_num sql=".$sql); + dol_syslog(get_class($this)."::update_num", LOG_DEBUG); $result = $this->db->query($sql); if ($result) { diff --git a/htdocs/compta/payment_sc/fiche.php b/htdocs/compta/payment_sc/fiche.php index 3a010bcae37..5c6562b6fc0 100644 --- a/htdocs/compta/payment_sc/fiche.php +++ b/htdocs/compta/payment_sc/fiche.php @@ -211,7 +211,7 @@ $sql.= ' WHERE pf.fk_charge = f.rowid AND f.fk_type = pc.id'; $sql.= ' AND f.entity = '.$conf->entity; $sql.= ' AND pf.rowid = '.$paiement->id; -dol_syslog("compta/payment_sc/fiche.php sql=".$sql); +dol_syslog("compta/payment_sc/fiche.php", LOG_DEBUG); $resql=$db->query($sql); if ($resql) { diff --git a/htdocs/compta/prelevement/class/bonprelevement.class.php b/htdocs/compta/prelevement/class/bonprelevement.class.php index 6840fcf139d..3d224bbe274 100644 --- a/htdocs/compta/prelevement/class/bonprelevement.class.php +++ b/htdocs/compta/prelevement/class/bonprelevement.class.php @@ -279,7 +279,7 @@ class BonPrelevement extends CommonObject $sql.= " WHERE p.rowid = ".$rowid; $sql.= " AND p.entity = ".$conf->entity; - dol_syslog(get_class($this)."::fetch sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::fetch", LOG_DEBUG); $result=$this->db->query($sql); if ($result) { @@ -779,7 +779,7 @@ class BonPrelevement extends CommonObject //if ($banque) $sql.= " AND sr.code_banque = '".$conf->global->PRELEVEMENT_CODE_BANQUE."'"; //if ($agence) $sql.= " AND sr.code_guichet = '".$conf->global->PRELEVEMENT_CODE_GUICHET."'"; - dol_syslog(get_class($this)."::Create sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::Create", LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { @@ -896,7 +896,7 @@ class BonPrelevement extends CommonObject $sql.= " WHERE ref LIKE '".$ref."%'"; $sql.= " AND entity = ".$conf->entity; - dol_syslog(get_class($this)."::Create sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::Create", LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) @@ -922,7 +922,7 @@ class BonPrelevement extends CommonObject $sql.= ", '".$this->db->idate($now)."'"; $sql.= ")"; - dol_syslog(get_class($this)."::Create sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::Create", LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) @@ -983,7 +983,7 @@ class BonPrelevement extends CommonObject $sql.= ", fk_prelevement_bons = ".$prev_id; $sql.= " WHERE rowid = ".$fac[1]; - dol_syslog(get_class($this)."::Create sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::Create", LOG_DEBUG); $resql=$this->db->query($sql); if (! $resql) { @@ -1040,7 +1040,7 @@ class BonPrelevement extends CommonObject $sql.= " WHERE rowid = ".$prev_id; $sql.= " AND entity = ".$conf->entity; - dol_syslog(get_class($this)."::Create sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::Create", LOG_DEBUG); $resql=$this->db->query($sql); if (! $resql) { @@ -1411,32 +1411,32 @@ class BonPrelevement extends CommonObject fputs($this->file, ' '.$CrLf); fputs($this->file, ''.$CrLf); - $sql = "SELECT pl.amount"; - $sql.= " FROM"; - $sql.= " ".MAIN_DB_PREFIX."prelevement_lignes as pl,"; - $sql.= " ".MAIN_DB_PREFIX."facture as f,"; - $sql.= " ".MAIN_DB_PREFIX."prelevement_facture as pf"; - $sql.= " WHERE pl.fk_prelevement_bons = ".$this->id; - $sql.= " AND pl.rowid = pf.fk_prelevement_lignes"; - $sql.= " AND pf.fk_facture = f.rowid"; - - //Lines - $i = 0; - $resql=$this->db->query($sql); - if ($resql) - { - $num = $this->db->num_rows($resql); - - while ($i < $num) - { - $obj = $this->db->fetch_object($resql); - $this->total = $this->total + $obj->amount; - $i++; - } - } - else - { - $result = -2; + $sql = "SELECT pl.amount"; + $sql.= " FROM"; + $sql.= " ".MAIN_DB_PREFIX."prelevement_lignes as pl,"; + $sql.= " ".MAIN_DB_PREFIX."facture as f,"; + $sql.= " ".MAIN_DB_PREFIX."prelevement_facture as pf"; + $sql.= " WHERE pl.fk_prelevement_bons = ".$this->id; + $sql.= " AND pl.rowid = pf.fk_prelevement_lignes"; + $sql.= " AND pf.fk_facture = f.rowid"; + + //Lines + $i = 0; + $resql=$this->db->query($sql); + if ($resql) + { + $num = $this->db->num_rows($resql); + + while ($i < $num) + { + $obj = $this->db->fetch_object($resql); + $this->total = $this->total + $obj->amount; + $i++; + } + } + else + { + $result = -2; } } diff --git a/htdocs/compta/resultat/clientfourn.php b/htdocs/compta/resultat/clientfourn.php index d68aa528122..5dcd09814ad 100644 --- a/htdocs/compta/resultat/clientfourn.php +++ b/htdocs/compta/resultat/clientfourn.php @@ -190,7 +190,7 @@ if ($socid) $sql.= " AND f.fk_soc = ".$socid; $sql.= " GROUP BY s.nom, s.rowid"; $sql.= " ORDER BY s.nom, s.rowid"; -dol_syslog("get customer invoices sql=".$sql); +dol_syslog("get customer invoices", LOG_DEBUG); $result = $db->query($sql); if ($result) { $num = $db->num_rows($result); @@ -235,7 +235,7 @@ if ($modecompta != 'CREANCES-DETTES') $sql.= " GROUP BY nom, idp"; $sql.= " ORDER BY nom"; - dol_syslog("get old customer payments not linked to invoices sql=".$sql); + dol_syslog("get old customer payments not linked to invoices", LOG_DEBUG); $result = $db->query($sql); if ($result) { $num = $db->num_rows($result); @@ -320,7 +320,7 @@ print ''.$langs->trans("SuppliersInvoices").''; $subtotal_ht = 0; $subtotal_ttc = 0; -dol_syslog("get suppliers invoices sql=".$sql); +dol_syslog("get suppliers invoices", LOG_DEBUG); $result = $db->query($sql); if ($result) { $num = $db->num_rows($result); @@ -401,7 +401,7 @@ $sql.= " AND cs.entity = ".$conf->entity; $sql.= " GROUP BY c.libelle, c.id"; $sql.= " ORDER BY c.libelle, c.id"; -dol_syslog("get social contributions deductible=0 sql=".$sql); +dol_syslog("get social contributions deductible=0", LOG_DEBUG); $result=$db->query($sql); $subtotal_ht = 0; $subtotal_ttc = 0; @@ -478,7 +478,7 @@ else $sql.= " ORDER BY c.libelle, c.id"; } -dol_syslog("get social contributions deductible=1 sql=".$sql); +dol_syslog("get social contributions deductible=1", LOG_DEBUG); $result=$db->query($sql); $subtotal_ht = 0; $subtotal_ttc = 0; @@ -564,7 +564,7 @@ if ($modecompta == 'CREANCES-DETTES') $sql.= " GROUP BY dm"; $sql.= " ORDER BY dm"; - dol_syslog("get vat to pay sql=".$sql); + dol_syslog("get vat to pay", LOG_DEBUG); $result=$db->query($sql); if ($result) { @@ -609,7 +609,7 @@ if ($modecompta == 'CREANCES-DETTES') $sql.= " GROUP BY dm"; $sql.= " ORDER BY dm"; - dol_syslog("get vat received back sql=".$sql); + dol_syslog("get vat received back", LOG_DEBUG); $result=$db->query($sql); if ($result) { @@ -653,7 +653,7 @@ else $sql.= " GROUP BY dm"; $sql.= " ORDER BY dm"; - dol_syslog("get vat really paid sql=".$sql); + dol_syslog("get vat really paid", LOG_DEBUG); $result=$db->query($sql); if ($result) { $num = $db->num_rows($result); @@ -694,7 +694,7 @@ else $sql.= " GROUP BY dm"; $sql.= " ORDER BY dm"; - dol_syslog("get vat really received back sql=".$sql); + dol_syslog("get vat really received back", LOG_DEBUG); $result=$db->query($sql); if ($result) { $num = $db->num_rows($result); diff --git a/htdocs/compta/resultat/index.php b/htdocs/compta/resultat/index.php index b3a42d85a6b..c61c8b76e08 100644 --- a/htdocs/compta/resultat/index.php +++ b/htdocs/compta/resultat/index.php @@ -123,7 +123,7 @@ $sql.= " GROUP BY dm"; $sql.= " ORDER BY dm"; //print $sql; -dol_syslog("get customers invoices sql=".$sql); +dol_syslog("get customers invoices", LOG_DEBUG); $result=$db->query($sql); if ($result) { @@ -157,7 +157,7 @@ if ($modecompta != 'CREANCES-DETTES') $sql.= " GROUP BY dm"; $sql.= " ORDER BY dm"; - dol_syslog("get old customers payments not linked to invoices sql=".$sql); + dol_syslog("get old customers payments not linked to invoices", LOG_DEBUG); $result = $db->query($sql); if ($result) { $num = $db->num_rows($result); @@ -208,7 +208,7 @@ $sql.= " AND f.entity = ".$conf->entity; if ($socid) $sql.= " AND f.fk_soc = ".$socid; $sql.= " GROUP BY dm"; -dol_syslog("get suppliers invoices sql=".$sql); +dol_syslog("get suppliers invoices", LOG_DEBUG); $result=$db->query($sql); if ($result) { @@ -249,7 +249,7 @@ if ($modecompta == 'CREANCES-DETTES') $sql.= " AND f.entity = ".$conf->entity; $sql.= " GROUP BY dm"; - dol_syslog("get vat to pay sql=".$sql); + dol_syslog("get vat to pay", LOG_DEBUG); $result=$db->query($sql); if ($result) { $num = $db->num_rows($result); @@ -280,7 +280,7 @@ if ($modecompta == 'CREANCES-DETTES') $sql.= " AND f.entity = ".$conf->entity; $sql.= " GROUP BY dm"; - dol_syslog("get vat to receive back sql=".$sql); + dol_syslog("get vat to receive back", LOG_DEBUG); $result=$db->query($sql); if ($result) { $num = $db->num_rows($result); @@ -311,7 +311,7 @@ else { $sql.= " AND t.entity = ".$conf->entity; $sql.= " GROUP BY dm"; - dol_syslog("get vat really paid sql=".$sql); + dol_syslog("get vat really paid", LOG_DEBUG); $result=$db->query($sql); if ($result) { $num = $db->num_rows($result); @@ -340,7 +340,7 @@ else { $sql.= " AND t.entity = ".$conf->entity; $sql.= " GROUP BY dm"; - dol_syslog("get vat really received back sql=".$sql); + dol_syslog("get vat really received back", LOG_DEBUG); $result=$db->query($sql); if ($result) { $num = $db->num_rows($result); @@ -390,7 +390,7 @@ else $sql.= " AND cs.entity = ".$conf->entity; $sql.= " GROUP BY c.libelle, dm"; -dol_syslog("get social contributions deductible=0 sql=".$sql); +dol_syslog("get social contributions deductible=0 ", LOG_DEBUG); $result=$db->query($sql); if ($result) { $num = $db->num_rows($result); @@ -440,7 +440,7 @@ else $sql.= " AND cs.entity = ".$conf->entity; $sql.= " GROUP BY c.libelle, dm"; -dol_syslog("get social contributions paid deductible=1 sql=".$sql); +dol_syslog("get social contributions paid deductible=1", LOG_DEBUG); $result=$db->query($sql); if ($result) { $num = $db->num_rows($result); diff --git a/htdocs/compta/salaries/class/paymentsalary.class.php b/htdocs/compta/salaries/class/paymentsalary.class.php index ecf4b16212b..76a781bfe9b 100644 --- a/htdocs/compta/salaries/class/paymentsalary.class.php +++ b/htdocs/compta/salaries/class/paymentsalary.class.php @@ -114,7 +114,7 @@ class PaymentSalary extends CommonObject $sql.= " WHERE rowid=".$this->id; - dol_syslog(get_class($this)."::update sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::update", LOG_DEBUG); $resql = $this->db->query($sql); if (! $resql) { @@ -174,7 +174,7 @@ class PaymentSalary extends CommonObject $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."bank as b ON s.fk_bank = b.rowid"; $sql.= " WHERE s.rowid = ".$id; - dol_syslog(get_class($this)."::fetch sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::fetch", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -230,7 +230,7 @@ class PaymentSalary extends CommonObject $sql = "DELETE FROM ".MAIN_DB_PREFIX."payment_salary"; $sql.= " WHERE rowid=".$this->id; - dol_syslog(get_class($this)."::delete sql=".$sql); + dol_syslog(get_class($this)."::delete", LOG_DEBUG); $resql = $this->db->query($sql); if (! $resql) { @@ -355,7 +355,7 @@ class PaymentSalary extends CommonObject $sql.= ", ".$conf->entity; $sql.= ")"; - dol_syslog(get_class($this)."::create sql=".$sql); + dol_syslog(get_class($this)."::create", LOG_DEBUG); $result = $this->db->query($sql); if ($result) { diff --git a/htdocs/compta/sociales/class/chargesociales.class.php b/htdocs/compta/sociales/class/chargesociales.class.php index 6404d9f26c8..09e4ebaef0c 100644 --- a/htdocs/compta/sociales/class/chargesociales.class.php +++ b/htdocs/compta/sociales/class/chargesociales.class.php @@ -74,7 +74,7 @@ class ChargeSociales extends CommonObject $sql.= " WHERE cs.fk_type = c.id"; $sql.= " AND cs.rowid = ".$id; - dol_syslog(get_class($this)."::fetch sql=".$sql); + dol_syslog(get_class($this)."::fetch", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -137,7 +137,7 @@ class ChargeSociales extends CommonObject $sql.= " ".$conf->entity; $sql.= ")"; - dol_syslog(get_class($this)."::create sql=".$sql); + dol_syslog(get_class($this)."::create", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -192,7 +192,7 @@ class ChargeSociales extends CommonObject if (! $error) { $sql = "DELETE FROM ".MAIN_DB_PREFIX."paiementcharge where fk_charge='".$this->id."'"; - dol_syslog(get_class($this)."::delete sql=".$sql); + dol_syslog(get_class($this)."::delete", LOG_DEBUG); $resql=$this->db->query($sql); if (! $resql) { @@ -204,7 +204,7 @@ class ChargeSociales extends CommonObject if (! $error) { $sql = "DELETE FROM ".MAIN_DB_PREFIX."chargesociales where rowid='".$this->id."'"; - dol_syslog(get_class($this)."::delete sql=".$sql); + dol_syslog(get_class($this)."::delete", LOG_DEBUG); $resql=$this->db->query($sql); if (! $resql) { @@ -243,7 +243,7 @@ class ChargeSociales extends CommonObject $sql.= " periode='".$this->db->idate($this->periode)."'"; $sql.= " WHERE rowid=".$this->id; - dol_syslog(get_class($this)."::update sql=".$sql); + dol_syslog(get_class($this)."::update", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -419,7 +419,7 @@ class ChargeSociales extends CommonObject $sql.= ' FROM '.MAIN_DB_PREFIX.$table; $sql.= ' WHERE '.$field.' = '.$this->id; - dol_syslog(get_class($this)."::getSommePaiement sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::getSommePaiement", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -449,7 +449,7 @@ class ChargeSociales extends CommonObject $sql.= " FROM ".MAIN_DB_PREFIX."chargesociales as e"; $sql.= " WHERE e.rowid = ".$id; - dol_syslog(get_class($this)."::info sql=".$sql); + dol_syslog(get_class($this)."::info", LOG_DEBUG); $result=$this->db->query($sql); if ($result) { diff --git a/htdocs/compta/sociales/class/paymentsocialcontribution.class.php b/htdocs/compta/sociales/class/paymentsocialcontribution.class.php index e89f2a273f8..95e796f98a0 100644 --- a/htdocs/compta/sociales/class/paymentsocialcontribution.class.php +++ b/htdocs/compta/sociales/class/paymentsocialcontribution.class.php @@ -116,7 +116,7 @@ class PaymentSocialContribution extends CommonObject $sql.= " ".$this->paiementtype.", '".$this->db->escape($this->num_paiement)."', '".$this->db->escape($this->note)."', ".$user->id.","; $sql.= " 0)"; - dol_syslog(get_class($this)."::create sql=".$sql); + dol_syslog(get_class($this)."::create", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -173,7 +173,7 @@ class PaymentSocialContribution extends CommonObject $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'bank as b ON t.fk_bank = b.rowid'; $sql.= " WHERE t.rowid = ".$id." AND t.fk_typepaiement = pt.id"; - dol_syslog(get_class($this)."::fetch sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::fetch", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -263,7 +263,7 @@ class PaymentSocialContribution extends CommonObject $this->db->begin(); - dol_syslog(get_class($this)."::update sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::update", LOG_DEBUG); $resql = $this->db->query($sql); if (! $resql) { $error++; $this->errors[]="Error ".$this->db->lasterror(); } @@ -321,7 +321,7 @@ class PaymentSocialContribution extends CommonObject $sql = "DELETE FROM ".MAIN_DB_PREFIX."bank_url"; $sql.= " WHERE type='payment_sc' AND url_id=".$this->id; - dol_syslog(get_class($this)."::delete sql=".$sql); + dol_syslog(get_class($this)."::delete", LOG_DEBUG); $resql = $this->db->query($sql); if (! $resql) { $error++; $this->errors[]="Error ".$this->db->lasterror(); } } @@ -331,7 +331,7 @@ class PaymentSocialContribution extends CommonObject $sql = "DELETE FROM ".MAIN_DB_PREFIX."paiementcharge"; $sql.= " WHERE rowid=".$this->id; - dol_syslog(get_class($this)."::delete sql=".$sql); + dol_syslog(get_class($this)."::delete", LOG_DEBUG); $resql = $this->db->query($sql); if (! $resql) { $error++; $this->errors[]="Error ".$this->db->lasterror(); } } @@ -560,7 +560,7 @@ class PaymentSocialContribution extends CommonObject { $sql = "UPDATE ".MAIN_DB_PREFIX."paiementcharge SET fk_bank = ".$id_bank." WHERE rowid = ".$this->id; - dol_syslog(get_class($this)."::update_fk_bank sql=".$sql); + dol_syslog(get_class($this)."::update_fk_bank", LOG_DEBUG); $result = $this->db->query($sql); if ($result) { diff --git a/htdocs/compta/stats/cabyprodserv.php b/htdocs/compta/stats/cabyprodserv.php index 2b2ad5be02f..1bc88e176d9 100644 --- a/htdocs/compta/stats/cabyprodserv.php +++ b/htdocs/compta/stats/cabyprodserv.php @@ -212,7 +212,7 @@ if ($modecompta == 'CREANCES-DETTES') $sql.= " GROUP BY p.rowid"; $sql.= " ORDER BY p.ref"; - dol_syslog("cabyprodserv sql=".$sql); + dol_syslog("cabyprodserv", LOG_DEBUG); $result = $db->query($sql); if ($result) { $num = $db->num_rows($result); diff --git a/htdocs/compta/stats/casoc.php b/htdocs/compta/stats/casoc.php index fd4afbfdf01..3535db5594a 100644 --- a/htdocs/compta/stats/casoc.php +++ b/htdocs/compta/stats/casoc.php @@ -250,7 +250,7 @@ $sql.= " GROUP BY s.rowid, s.nom"; $sql.= " ORDER BY s.rowid"; //echo $sql; -dol_syslog("casoc sql=".$sql); +dol_syslog("casoc", LOG_DEBUG); $result = $db->query($sql); if ($result) { $num = $db->num_rows($result); diff --git a/htdocs/compta/tva/class/tva.class.php b/htdocs/compta/tva/class/tva.class.php index c605c97fed9..386158d1c7e 100644 --- a/htdocs/compta/tva/class/tva.class.php +++ b/htdocs/compta/tva/class/tva.class.php @@ -115,7 +115,7 @@ class Tva extends CommonObject $sql.= ")"; - dol_syslog(get_class($this)."::create sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::create", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -178,7 +178,7 @@ class Tva extends CommonObject $sql.= " WHERE rowid=".$this->id; - dol_syslog(get_class($this)."::update sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::update", LOG_DEBUG); $resql = $this->db->query($sql); if (! $resql) { @@ -233,7 +233,7 @@ class Tva extends CommonObject $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."bank as b ON t.fk_bank = b.rowid"; $sql.= " WHERE t.rowid = ".$id; - dol_syslog(get_class($this)."::fetch sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::fetch", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -286,7 +286,7 @@ class Tva extends CommonObject $sql = "DELETE FROM ".MAIN_DB_PREFIX."tva"; $sql.= " WHERE rowid=".$this->id; - dol_syslog(get_class($this)."::delete sql=".$sql); + dol_syslog(get_class($this)."::delete", LOG_DEBUG); $resql = $this->db->query($sql); if (! $resql) { @@ -539,7 +539,7 @@ class Tva extends CommonObject $sql.= ", ".$conf->entity; $sql.= ")"; - dol_syslog(get_class($this)."::addPayment sql=".$sql); + dol_syslog(get_class($this)."::addPayment", LOG_DEBUG); $result = $this->db->query($sql); if ($result) { diff --git a/htdocs/contact/class/contact.class.php b/htdocs/contact/class/contact.class.php index 4187de7136c..727fa6486a9 100644 --- a/htdocs/contact/class/contact.class.php +++ b/htdocs/contact/class/contact.class.php @@ -155,7 +155,7 @@ class Contact extends CommonObject $sql.= " ".(! empty($this->import_key)?"'".$this->import_key."'":"null"); $sql.= ")"; - dol_syslog(get_class($this)."::create sql=".$sql); + dol_syslog(get_class($this)."::create", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -276,7 +276,7 @@ class Contact extends CommonObject $sql .= ", no_email=".($this->no_email?"'".$this->no_email."'":"0"); $sql .= " WHERE rowid=".$this->db->escape($id); - dol_syslog(get_class($this)."::update sql=".$sql,LOG_DEBUG); + dol_syslog(get_class($this)."::update", LOG_DEBUG); $result = $this->db->query($sql); if ($result) { @@ -444,7 +444,7 @@ class Contact extends CommonObject if ($user) $sql .= ", fk_user_modif=".$user->id; $sql.= " WHERE rowid=".$this->db->escape($id); - dol_syslog(get_class($this)."::update_perso this->birthday=".$this->birthday." - sql=".$sql); + dol_syslog(get_class($this)."::update_perso this->birthday=".$this->birthday." -", LOG_DEBUG); $resql = $this->db->query($sql); if (! $resql) { @@ -523,7 +523,7 @@ class Contact extends CommonObject $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON c.fk_soc = s.rowid"; $sql.= " WHERE c.rowid = ". $id; - dol_syslog(get_class($this)."::fetch sql=".$sql); + dol_syslog(get_class($this)."::fetch", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -664,7 +664,7 @@ class Contact extends CommonObject $sql.=" AND fk_socpeople = ". $this->id; $sql.=" GROUP BY tc.element"; - dol_syslog(get_class($this)."::load_ref_elements sql=".$sql); + dol_syslog(get_class($this)."::load_ref_elements", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) @@ -716,7 +716,7 @@ class Contact extends CommonObject $sql.= " WHERE ec.fk_socpeople=".$this->id; $sql.= " AND ec.fk_c_type_contact=tc.rowid"; $sql.= " AND tc.source='external'"; - dol_syslog(get_class($this)."::delete sql=".$sql); + dol_syslog(get_class($this)."::delete", LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { @@ -751,7 +751,7 @@ class Contact extends CommonObject { // Remove category $sql = "DELETE FROM ".MAIN_DB_PREFIX."categorie_contact WHERE fk_socpeople = ".$this->id; - dol_syslog(get_class($this)."::delete sql=".$sql); + dol_syslog(get_class($this)."::delete", LOG_DEBUG); $resql=$this->db->query($sql); if (! $resql) { @@ -766,7 +766,7 @@ class Contact extends CommonObject { $sql = "DELETE FROM ".MAIN_DB_PREFIX."socpeople"; $sql .= " WHERE rowid=".$this->id; - dol_syslog(get_class($this)."::delete sql=".$sql); + dol_syslog(get_class($this)."::delete", LOG_DEBUG); $result = $this->db->query($sql); if (! $result) { @@ -866,7 +866,7 @@ class Contact extends CommonObject $sql.= " WHERE mc.email = '".$this->db->escape($this->email)."'"; $sql.= " AND mc.statut NOT IN (-1,0)"; // -1 erreur, 0 non envoye, 1 envoye avec succes - dol_syslog(get_class($this)."::getNbOfEMailings sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::getNbOfEMailings", LOG_DEBUG); $resql=$this->db->query($sql); @@ -1070,7 +1070,7 @@ class Contact extends CommonObject $sql.= " WHERE rowid = ".$this->id; $result = $this->db->query($sql); - dol_syslog(get_class($this)."::setstatus sql=".$sql); + dol_syslog(get_class($this)."::setstatus", LOG_DEBUG); if ($result) { // Appel des triggers diff --git a/htdocs/contact/list.php b/htdocs/contact/list.php index 8e1d54944c0..5c2b2f04938 100644 --- a/htdocs/contact/list.php +++ b/htdocs/contact/list.php @@ -239,7 +239,7 @@ else } //print $sql; -dol_syslog("contact/list.php sql=".$sql); +dol_syslog("contact/list.php", LOG_DEBUG); $result = $db->query($sql); if ($result) { diff --git a/htdocs/contrat/class/contrat.class.php b/htdocs/contrat/class/contrat.class.php index daf22e0af7c..140d64c2daf 100644 --- a/htdocs/contrat/class/contrat.class.php +++ b/htdocs/contrat/class/contrat.class.php @@ -154,7 +154,7 @@ class Contrat extends CommonObject $sql.= " commentaire = '".$this->db->escape($comment)."'"; $sql.= " WHERE rowid = ".$line_id . " AND (statut = 0 OR statut = 3 OR statut = 5)"; - dol_syslog(get_class($this)."::active_line sql=".$sql); + dol_syslog(get_class($this)."::active_line", LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { @@ -315,7 +315,7 @@ class Contrat extends CommonObject //$sql.= ", fk_user_valid = ".$user->id.", date_valid = '".$this->db->idate($now)."'"; $sql .= " WHERE rowid = ".$this->id . " AND statut = 0"; - dol_syslog(get_class($this)."::validate sql=".$sql); + dol_syslog(get_class($this)."::validate", LOG_DEBUG); $resql = $this->db->query($sql); if (! $resql) { @@ -416,7 +416,7 @@ class Contrat extends CommonObject } else $sql.= " WHERE rowid=".$id; - dol_syslog(get_class($this)."::fetch sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::fetch", LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { @@ -505,7 +505,7 @@ class Contrat extends CommonObject $sql.= " WHERE d.fk_contrat = ".$this->id ." AND d.fk_product = p.rowid"; $sql.= " ORDER by d.rowid ASC"; - dol_syslog(get_class($this)."::fetch_lines sql=".$sql); + dol_syslog(get_class($this)."::fetch_lines", LOG_DEBUG); $result = $this->db->query($sql); if ($result) { @@ -794,7 +794,7 @@ class Contrat extends CommonObject } else { - $this->error=$langs->trans("UnknownError: ".$this->db->error()." - sql=".$sql); + $this->error=$langs->trans("UnknownError: ".$this->db->error()." -", LOG_DEBUG); dol_syslog(get_class($this)."::create - 10 - ".$this->error, LOG_ERR); $this->db->rollback(); @@ -840,7 +840,7 @@ class Contrat extends CommonObject $sql.= " FROM ".MAIN_DB_PREFIX."contratdet_log as cdl, ".MAIN_DB_PREFIX."contratdet as cd"; $sql.= " WHERE cdl.fk_contratdet=cd.rowid AND cd.fk_contrat=".$this->id; - dol_syslog(get_class($this)."::delete contratdet_log sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::delete contratdet_log", LOG_DEBUG); $resql=$this->db->query($sql); if (! $resql) { @@ -861,7 +861,7 @@ class Contrat extends CommonObject $sql= "DELETE FROM ".MAIN_DB_PREFIX."contratdet_log "; $sql.= " WHERE ".MAIN_DB_PREFIX."contratdet_log.rowid IN (".implode(",",$tab_resql).")"; - dol_syslog(get_class($this)."::delete contratdet_log sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::delete contratdet_log", LOG_DEBUG); $resql=$this->db->query($sql); if (! $resql) { @@ -877,7 +877,7 @@ class Contrat extends CommonObject $sql = "DELETE FROM ".MAIN_DB_PREFIX."contratdet"; $sql.= " WHERE fk_contrat=".$this->id; - dol_syslog(get_class($this)."::delete contratdet sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::delete contratdet", LOG_DEBUG); $resql=$this->db->query($sql); if (! $resql) { @@ -892,7 +892,7 @@ class Contrat extends CommonObject $sql = "DELETE FROM ".MAIN_DB_PREFIX."contrat"; $sql.= " WHERE rowid=".$this->id; - dol_syslog(get_class($this)."::delete contrat sql=".$sql); + dol_syslog(get_class($this)."::delete contrat", LOG_DEBUG); $resql=$this->db->query($sql); if (! $resql) { @@ -1067,7 +1067,7 @@ class Contrat extends CommonObject if ($date_end > 0) { $sql.= ",'".$this->db->idate($date_end)."'"; } $sql.= ")"; - dol_syslog(get_class($this)."::addline sql=".$sql); + dol_syslog(get_class($this)."::addline", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) @@ -1214,7 +1214,7 @@ class Contrat extends CommonObject else { $sql.=",date_cloture=null"; } $sql .= " WHERE rowid = ".$rowid; - dol_syslog(get_class($this)."::updateline sql=".$sql); + dol_syslog(get_class($this)."::updateline", LOG_DEBUG); $result = $this->db->query($sql); if ($result) { @@ -1258,7 +1258,7 @@ class Contrat extends CommonObject $sql = "DELETE FROM ".MAIN_DB_PREFIX."contratdet"; $sql.= " WHERE rowid=".$idline; - dol_syslog(get_class($this)."::delete sql=".$sql); + dol_syslog(get_class($this)."::delete", LOG_DEBUG); $resql = $this->db->query($sql); if (! $resql) { @@ -1468,7 +1468,7 @@ class Contrat extends CommonObject $sql.= " WHERE fk_contrat =".$this->id; if ($statut >= 0) $sql.= " AND statut = '$statut'"; - dol_syslog(get_class($this)."::array_detail() sql=".$sql,LOG_DEBUG); + dol_syslog(get_class($this)."::array_detail()", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -1504,7 +1504,7 @@ class Contrat extends CommonObject $sql.= " WHERE fk_soc =".$this->socid; if ($option == 'others') $sql.= " AND c.rowid != ".$this->id; - dol_syslog(get_class($this)."::getOtherContracts() sql=".$sql,LOG_DEBUG); + dol_syslog(get_class($this)."::getOtherContracts()", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -1944,7 +1944,7 @@ class ContratLigne if ($id) $sql.= " WHERE t.rowid = ".$id; if ($ref) $sql.= " WHERE t.rowid = '".$ref."'"; - dol_syslog(get_class($this)."::fetch sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::fetch", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -2099,7 +2099,7 @@ class ContratLigne $sql.= " commentaire='".$this->db->escape($this->commentaire)."'"; $sql.= " WHERE rowid=".$this->id; - dol_syslog(get_class($this)."::update sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::update", LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { @@ -2147,7 +2147,7 @@ class ContratLigne $sql.= ",total_ttc=".price2num($this->total_ttc,'MT').""; $sql.= " WHERE rowid = ".$this->rowid; - dol_syslog(get_class($this)."::update_total sql=".$sql); + dol_syslog(get_class($this)."::update_total", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) diff --git a/htdocs/contrat/index.php b/htdocs/contrat/index.php index 772b0e1ecdc..680ea9c201f 100644 --- a/htdocs/contrat/index.php +++ b/htdocs/contrat/index.php @@ -312,7 +312,7 @@ $sql.= " GROUP BY c.rowid, c.ref, c.datec, c.tms, c.statut, s.nom, s.rowid"; $sql.= " ORDER BY c.tms DESC"; $sql.= " LIMIT ".$max; -dol_syslog("contrat/index.php sql=".$sql, LOG_DEBUG); +dol_syslog("contrat/index.php", LOG_DEBUG); $result=$db->query($sql); if ($result) { diff --git a/htdocs/contrat/services.php b/htdocs/contrat/services.php index 382dcad5e93..2f656d14211 100644 --- a/htdocs/contrat/services.php +++ b/htdocs/contrat/services.php @@ -113,7 +113,7 @@ $sql .= $db->order($sortfield,$sortorder); $sql .= $db->plimit($limit + 1, $offset); //print $sql; -dol_syslog("contrat/services.php sql=".$sql); +dol_syslog("contrat/services.php", LOG_DEBUG); $resql=$db->query($sql); if ($resql) { diff --git a/htdocs/core/boxes/box_actions.php b/htdocs/core/boxes/box_actions.php index ff63927b526..9dcfc76016a 100644 --- a/htdocs/core/boxes/box_actions.php +++ b/htdocs/core/boxes/box_actions.php @@ -77,7 +77,7 @@ class box_actions extends ModeleBoxes $sql.= " ORDER BY a.datec DESC"; $sql.= $db->plimit($max, 0); - dol_syslog("Box_actions::loadBox sql=".$sql, LOG_DEBUG); + dol_syslog("Box_actions::loadBox", LOG_DEBUG); $result = $db->query($sql); if ($result) { diff --git a/htdocs/core/boxes/box_clients.php b/htdocs/core/boxes/box_clients.php index b2ad0a6b718..12145294d64 100644 --- a/htdocs/core/boxes/box_clients.php +++ b/htdocs/core/boxes/box_clients.php @@ -73,7 +73,7 @@ class box_clients extends ModeleBoxes $sql.= " ORDER BY s.tms DESC"; $sql.= $db->plimit($max, 0); - dol_syslog(get_class($this)."::loadBox sql=".$sql,LOG_DEBUG); + dol_syslog(get_class($this)."::loadBox", LOG_DEBUG); $result = $db->query($sql); if ($result) { diff --git a/htdocs/core/boxes/box_comptes.php b/htdocs/core/boxes/box_comptes.php index 8fdc4aff39e..c66326b27fb 100644 --- a/htdocs/core/boxes/box_comptes.php +++ b/htdocs/core/boxes/box_comptes.php @@ -90,7 +90,7 @@ class box_comptes extends ModeleBoxes $sql.= " ORDER BY label"; $sql.= $db->plimit($max, 0); - dol_syslog(get_class($this)."::loadBox sql=".$sql); + dol_syslog(get_class($this)."::loadBox", LOG_DEBUG); $result = $db->query($sql); if ($result) { diff --git a/htdocs/core/boxes/box_prospect.php b/htdocs/core/boxes/box_prospect.php index 9c7a666bc4a..c0234f97dc3 100644 --- a/htdocs/core/boxes/box_prospect.php +++ b/htdocs/core/boxes/box_prospect.php @@ -73,7 +73,7 @@ class box_prospect extends ModeleBoxes $sql.= " ORDER BY s.tms DESC"; $sql.= $db->plimit($max, 0); - dol_syslog(get_class($this)."::loadBox sql=".$sql,LOG_DEBUG); + dol_syslog(get_class($this)."::loadBox", LOG_DEBUG); $resql = $db->query($sql); if ($resql) { diff --git a/htdocs/core/class/commoninvoice.class.php b/htdocs/core/class/commoninvoice.class.php index 80d719decae..0bea45832e6 100644 --- a/htdocs/core/class/commoninvoice.class.php +++ b/htdocs/core/class/commoninvoice.class.php @@ -47,7 +47,7 @@ abstract class CommonInvoice extends CommonObject $sql.= ' FROM '.MAIN_DB_PREFIX.$table; $sql.= ' WHERE '.$field.' = '.$this->id; - dol_syslog(get_class($this)."::getSommePaiement sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::getSommePaiement", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index e2b79448ea8..2eb63db6d9b 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -78,7 +78,7 @@ abstract class CommonObject return -1; } - dol_syslog(get_class()."::isExistingObject sql=".$sql); + dol_syslog(get_class()."::isExistingObject", LOG_DEBUG); $resql = $db->query($sql); if ($resql) { @@ -212,7 +212,7 @@ abstract class CommonObject $sql.= "'".$this->db->idate($datecreate)."'"; $sql.= ", 4, '". $id_type_contact . "' "; $sql.= ")"; - dol_syslog(get_class($this)."::add_contact sql=".$sql); + dol_syslog(get_class($this)."::add_contact", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) @@ -316,7 +316,7 @@ abstract class CommonObject $sql = "DELETE FROM ".MAIN_DB_PREFIX."element_contact"; $sql.= " WHERE rowid =".$rowid; - dol_syslog(get_class($this)."::delete_contact sql=".$sql); + dol_syslog(get_class($this)."::delete_contact", LOG_DEBUG); if ($this->db->query($sql)) { if (! $notrigger) @@ -361,7 +361,7 @@ abstract class CommonObject $sql.= " WHERE element_id =".$this->id; $sql.= " AND fk_c_type_contact IN (".$listId.")"; - dol_syslog(get_class($this)."::delete_linked_contact sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::delete_linked_contact", LOG_DEBUG); if ($this->db->query($sql)) { return 1; @@ -406,7 +406,7 @@ abstract class CommonObject if ($statut >= 0) $sql.= " AND ec.statut = '".$statut."'"; $sql.=" ORDER BY t.lastname ASC"; - dol_syslog(get_class($this)."::liste_contact sql=".$sql); + dol_syslog(get_class($this)."::liste_contact", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -461,7 +461,7 @@ abstract class CommonObject $sql.= " AND ec.fk_c_type_contact=tc.rowid"; $sql.= " AND tc.element = '".$this->element."'"; - dol_syslog(get_class($this)."::swapContactStatus sql=".$sql); + dol_syslog(get_class($this)."::swapContactStatus", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -563,7 +563,7 @@ abstract class CommonObject $sql.= " AND tc.active = 1"; if ($status) $sql.= " AND ec.statut = ".$status; - dol_syslog(get_class($this)."::getIdContact sql=".$sql); + dol_syslog(get_class($this)."::getIdContact", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -805,7 +805,7 @@ abstract class CommonObject if (is_object($user)) $sql.=", fk_user_modif = ".$user->id; $sql.= " WHERE ".$id_field." = ".$id; - dol_syslog(get_class($this)."::".__FUNCTION__." sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::".__FUNCTION__."", LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { @@ -931,7 +931,7 @@ abstract class CommonObject else $sql.= ' SET fk_projet = NULL'; $sql.= ' WHERE rowid = '.$this->id; - dol_syslog(get_class($this)."::setProject sql=".$sql); + dol_syslog(get_class($this)."::setProject", LOG_DEBUG); if ($this->db->query($sql)) { $this->fk_project = $projectid; @@ -1075,7 +1075,7 @@ abstract class CommonObject // if ($this->element == 'facture') $sql.= " AND fk_statut < 2"; // if ($this->element == 'propal') $sql.= " AND fk_statut = 0"; - dol_syslog(get_class($this)."::setDocModel sql=".$sql); + dol_syslog(get_class($this)."::setDocModel", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -1119,7 +1119,7 @@ abstract class CommonObject if (! $renum) $sql.= ' AND rang = 0'; if ($renum) $sql.= ' AND rang <> 0'; - dol_syslog(get_class($this)."::line_order sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::line_order", LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { @@ -1139,7 +1139,7 @@ abstract class CommonObject if ($fk_parent_line) $sql.= ' AND fk_parent_line IS NULL'; $sql.= ' ORDER BY rang ASC, rowid '.$rowidorder; - dol_syslog(get_class($this)."::line_order search all parent lines sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::line_order search all parent lines", LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { @@ -1191,7 +1191,7 @@ abstract class CommonObject $sql.= ' AND fk_parent_line = '.$id; $sql.= ' ORDER BY rang ASC'; - dol_syslog(get_class($this)."::getChildrenOfLine search children lines for line ".$id." sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::getChildrenOfLine search children lines for line ".$id."", LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { @@ -1259,7 +1259,7 @@ abstract class CommonObject $sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element_line.' SET rang = '.$rang; $sql.= ' WHERE rowid = '.$rowid; - dol_syslog(get_class($this)."::updateRangOfLine sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::updateRangOfLine", LOG_DEBUG); if (! $this->db->query($sql)) { dol_print_error($this->db); @@ -1353,7 +1353,7 @@ abstract class CommonObject $sql = 'SELECT rang FROM '.MAIN_DB_PREFIX.$this->table_element_line; $sql.= ' WHERE rowid ='.$rowid; - dol_syslog(get_class($this)."::getRangOfLine sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::getRangOfLine", LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { @@ -1396,7 +1396,7 @@ abstract class CommonObject $sql.= ' WHERE '.$this->fk_element.' = '.$this->id; $sql.= ' AND fk_parent_line = '.$fk_parent_line; - dol_syslog(get_class($this)."::line_max sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::line_max", LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { @@ -1417,7 +1417,7 @@ abstract class CommonObject $sql = 'SELECT max(rang) FROM '.MAIN_DB_PREFIX.$this->table_element_line; $sql.= ' WHERE '.$this->fk_element.' = '.$this->id; - dol_syslog(get_class($this)."::line_max sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::line_max", LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { @@ -1445,7 +1445,7 @@ abstract class CommonObject $sql.= " SET ref_ext = '".$this->db->escape($ref_ext)."'"; $sql.= " WHERE ".(isset($this->table_rowid)?$this->table_rowid:'rowid')." = ". $this->id; - dol_syslog(get_class($this)."::update_ref_ext sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::update_ref_ext", LOG_DEBUG); if ($this->db->query($sql)) { $this->ref_ext = $ref_ext; @@ -1483,7 +1483,7 @@ abstract class CommonObject $sql.= " SET note".$suffix." = ".(!empty($note)?("'".$this->db->escape($note)."'"):"NULL"); $sql.= " WHERE rowid =". $this->id; - dol_syslog(get_class($this)."::update_note sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::update_note", LOG_DEBUG); if ($this->db->query($sql)) { if ($suffix == '_public') $this->note_public = $note; @@ -1558,7 +1558,7 @@ abstract class CommonObject } $sql.= ' ORDER by rowid'; // We want to be sure to always use same order of line to not change lines differently when option MAIN_ROUNDOFTOTAL_NOT_TOTALOFROUND is used - dol_syslog(get_class($this)."::update_price sql=".$sql); + dol_syslog(get_class($this)."::update_price", LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { @@ -1658,7 +1658,7 @@ abstract class CommonObject $sql .= ' WHERE rowid = '.$this->id; //print "xx".$sql; - dol_syslog(get_class($this)."::update_price sql=".$sql); + dol_syslog(get_class($this)."::update_price", LOG_DEBUG); $resql=$this->db->query($sql); if (! $resql) { @@ -1710,7 +1710,7 @@ abstract class CommonObject $sql.= ", '".$this->element."'"; $sql.= ")"; - dol_syslog(get_class($this)."::add_object_linked sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::add_object_linked", LOG_DEBUG); if ($this->db->query($sql)) { $this->db->commit(); @@ -1787,7 +1787,7 @@ abstract class CommonObject $sql .= ' ORDER BY sourcetype'; //print $sql; - dol_syslog(get_class($this)."::fetchObjectLink sql=".$sql); + dol_syslog(get_class($this)."::fetchObjectLink", LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { @@ -1912,7 +1912,7 @@ abstract class CommonObject $sql.= " AND sourcetype = '".$this->element."'"; } - dol_syslog(get_class($this)."::updateObjectLinked sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::updateObjectLinked", LOG_DEBUG); if ($this->db->query($sql)) { return 1; @@ -1966,7 +1966,7 @@ abstract class CommonObject $sql.= " (fk_target = ".$this->id." AND targettype = '".$this->element."')"; } - dol_syslog(get_class($this)."::deleteObjectLinked sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::deleteObjectLinked", LOG_DEBUG); if ($this->db->query($sql)) { return 1; @@ -2001,7 +2001,7 @@ abstract class CommonObject $sql.= " SET ".$fieldstatus." = ".$status; $sql.= " WHERE rowid=".$elementId; - dol_syslog(get_class($this)."::setStatut sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::setStatut", LOG_DEBUG); if ($this->db->query($sql)) { $this->db->commit(); @@ -2110,7 +2110,7 @@ abstract class CommonObject $sql.= " FROM ".MAIN_DB_PREFIX.$this->table_element."_extrafields"; $sql.= " WHERE fk_object = ".$rowid; - dol_syslog(get_class($this)."::fetch_optionals sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::fetch_optionals", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -2258,7 +2258,7 @@ abstract class CommonObject } $sql.=")"; - dol_syslog(get_class($this)."::insertExtraFields insert sql=".$sql); + dol_syslog(get_class($this)."::insertExtraFields insert", LOG_DEBUG); $resql = $this->db->query($sql); if (! $resql) { @@ -2527,7 +2527,7 @@ abstract class CommonObject $sql.= " SET extraparams = ".(! empty($extraparams) ? "'".$this->db->escape($extraparams)."'" : "null"); $sql.= " WHERE rowid = ".$this->id; - dol_syslog(get_class($this)."::setExtraParameters sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::setExtraParameters", LOG_DEBUG); $resql = $this->db->query($sql); if (! $resql) { @@ -3328,7 +3328,7 @@ abstract class CommonObject $sql.= ", '".$mandatory."'"; $sql.= ")"; - dol_syslog(get_class($this)."::add_element_resource sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::add_element_resource", LOG_DEBUG); if ($this->db->query($sql)) { $this->db->commit(); @@ -3359,7 +3359,7 @@ abstract class CommonObject $sql = "DELETE FROM ".MAIN_DB_PREFIX."element_resources"; $sql.= " WHERE rowid =".$rowid; - dol_syslog(get_class($this)."::delete_resource sql=".$sql); + dol_syslog(get_class($this)."::delete_resource", LOG_DEBUG); if ($this->db->query($sql)) { if (! $notrigger) diff --git a/htdocs/core/class/cpays.class.php b/htdocs/core/class/cpays.class.php index e6db8e4b2e9..5e32b9bad22 100644 --- a/htdocs/core/class/cpays.class.php +++ b/htdocs/core/class/cpays.class.php @@ -97,7 +97,7 @@ class Cpays // extends CommonObject $this->db->begin(); - dol_syslog(get_class($this)."::create sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::create", LOG_DEBUG); $resql=$this->db->query($sql); if (! $resql) { $error++; $this->errors[]="Error ".$this->db->lasterror(); } @@ -158,7 +158,7 @@ class Cpays // extends CommonObject if ($id) $sql.= " WHERE t.rowid = ".$id; elseif ($code) $sql.= " WHERE t.code = '".$this->db->escape($code)."'"; - dol_syslog(get_class($this)."::fetch sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::fetch", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -217,7 +217,7 @@ class Cpays // extends CommonObject $this->db->begin(); - dol_syslog(get_class($this)."::update sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::update", LOG_DEBUG); $resql = $this->db->query($sql); if (! $resql) { $error++; $this->errors[]="Error ".$this->db->lasterror(); } @@ -273,7 +273,7 @@ class Cpays // extends CommonObject $this->db->begin(); - dol_syslog(get_class($this)."::delete sql=".$sql); + dol_syslog(get_class($this)."::delete", LOG_DEBUG); $resql = $this->db->query($sql); if (! $resql) { $error++; $this->errors[]="Error ".$this->db->lasterror(); } diff --git a/htdocs/core/class/ctypent.class.php b/htdocs/core/class/ctypent.class.php index 33070f83412..057e23892b4 100644 --- a/htdocs/core/class/ctypent.class.php +++ b/htdocs/core/class/ctypent.class.php @@ -102,7 +102,7 @@ class Ctypent // extends CommonObject $this->db->begin(); - dol_syslog(get_class($this)."::create sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::create", LOG_DEBUG); $resql=$this->db->query($sql); if (! $resql) { $error++; $this->errors[]="Error ".$this->db->lasterror(); } @@ -163,7 +163,7 @@ class Ctypent // extends CommonObject if ($id) $sql.= " WHERE t.id = ".$id; elseif ($code) $sql.= " WHERE t.code = '".$this->db->escape($code)."'"; - dol_syslog(get_class($this)."::fetch sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::fetch", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -222,7 +222,7 @@ class Ctypent // extends CommonObject $this->db->begin(); - dol_syslog(get_class($this)."::update sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::update", LOG_DEBUG); $resql = $this->db->query($sql); if (! $resql) { $error++; $this->errors[]="Error ".$this->db->lasterror(); } @@ -278,7 +278,7 @@ class Ctypent // extends CommonObject $this->db->begin(); - dol_syslog(get_class($this)."::delete sql=".$sql); + dol_syslog(get_class($this)."::delete", LOG_DEBUG); $resql = $this->db->query($sql); if (! $resql) { $error++; $this->errors[]="Error ".$this->db->lasterror(); } diff --git a/htdocs/core/class/discount.class.php b/htdocs/core/class/discount.class.php index 23ce9f97f6d..6d45f1034f4 100644 --- a/htdocs/core/class/discount.class.php +++ b/htdocs/core/class/discount.class.php @@ -85,7 +85,7 @@ class DiscountAbsolute if ($rowid) $sql.= " sr.rowid=".$rowid; if ($fk_facture_source) $sql.= " sr.fk_facture_source=".$fk_facture_source; - dol_syslog(get_class($this)."::fetch sql=".$sql); + dol_syslog(get_class($this)."::fetch", LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { @@ -159,7 +159,7 @@ class DiscountAbsolute $sql.= " ".($this->fk_facture_source?"'".$this->fk_facture_source."'":"null"); $sql.= ")"; - dol_syslog(get_class($this)."::create sql=".$sql); + dol_syslog(get_class($this)."::create", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -195,7 +195,7 @@ class DiscountAbsolute $sql.=" AND fk_facture_source = ".$this->fk_facture_source; //$sql.=" AND rowid != ".$this->id; - dol_syslog(get_class($this)."::delete Check if we can remove discount sql=".$sql); + dol_syslog(get_class($this)."::delete Check if we can remove discount", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -222,7 +222,7 @@ class DiscountAbsolute $sql.= " AND (fk_facture_line IS NULL"; // Not used as absolute simple discount $sql.= " AND fk_facture IS NULL)"; // Not used as credit note and not used as deposit - dol_syslog(get_class($this)."::delete Delete discount sql=".$sql); + dol_syslog(get_class($this)."::delete Delete discount", LOG_DEBUG); $result=$this->db->query($sql); if ($result) { @@ -233,7 +233,7 @@ class DiscountAbsolute $sql.=" set paye=0, fk_statut=1"; $sql.=" WHERE (type = 2 or type = 3) AND rowid=".$this->fk_facture_source; - dol_syslog(get_class($this)."::delete Update credit note or deposit invoice statut sql=".$sql); + dol_syslog(get_class($this)."::delete Update credit note or deposit invoice statut", LOG_DEBUG); $result=$this->db->query($sql); if ($result) { @@ -291,7 +291,7 @@ class DiscountAbsolute if ($rowidinvoice) $sql.=" SET fk_facture = ".$rowidinvoice; $sql.=" WHERE rowid = ".$this->id; - dol_syslog(get_class($this)."::link_to_invoice sql=".$sql,LOG_DEBUG); + dol_syslog(get_class($this)."::link_to_invoice", LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { @@ -320,7 +320,7 @@ class DiscountAbsolute $sql.=" SET fk_facture_line = NULL, fk_facture = NULL"; $sql.=" WHERE rowid = ".$this->id; - dol_syslog(get_class($this)."::unlink_invoice sql=".$sql,LOG_DEBUG); + dol_syslog(get_class($this)."::unlink_invoice", LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { @@ -355,7 +355,7 @@ class DiscountAbsolute if ($filter) $sql.=' AND ('.$filter.')'; if ($maxvalue) $sql.=' AND rc.amount_ttc <= '.price2num($maxvalue); - dol_syslog(get_class($this)."::getAvailableDiscounts sql=".$sql,LOG_DEBUG); + dol_syslog(get_class($this)."::getAvailableDiscounts", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -384,7 +384,7 @@ class DiscountAbsolute $sql.= ' WHERE rc.fk_facture_source=f.rowid AND rc.fk_facture = '.$invoice->id; $sql.= ' AND f.type = 2'; - dol_syslog(get_class($this)."::getSumCreditNotesUsed sql=".$sql,LOG_DEBUG); + dol_syslog(get_class($this)."::getSumCreditNotesUsed", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -410,7 +410,7 @@ class DiscountAbsolute $sql.= ' WHERE rc.fk_facture_source=f.rowid AND rc.fk_facture = '.$invoice->id; $sql.= ' AND f.type = 3'; - dol_syslog(get_class($this)."::getSumDepositsUsed sql=".$sql,LOG_DEBUG); + dol_syslog(get_class($this)."::getSumDepositsUsed", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { diff --git a/htdocs/core/class/events.class.php b/htdocs/core/class/events.class.php index b344a0c4059..98e4b101669 100644 --- a/htdocs/core/class/events.class.php +++ b/htdocs/core/class/events.class.php @@ -132,7 +132,7 @@ class Events // extends CommonObject $sql.= " '".$this->db->escape($this->description)."'"; $sql.= ")"; - dol_syslog(get_class($this)."::create sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::create", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -174,7 +174,7 @@ class Events // extends CommonObject $sql.= " description='".$this->db->escape($this->description)."'"; $sql.= " WHERE rowid=".$this->id; - dol_syslog(get_class($this)."::update sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::update", LOG_DEBUG); $resql = $this->db->query($sql); if (! $resql) { @@ -209,7 +209,7 @@ class Events // extends CommonObject $sql.= " FROM ".MAIN_DB_PREFIX."events as t"; $sql.= " WHERE t.rowid = ".$id; - dol_syslog(get_class($this)."::fetch sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::fetch", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -252,7 +252,7 @@ class Events // extends CommonObject $sql = "DELETE FROM ".MAIN_DB_PREFIX."events"; $sql.= " WHERE rowid=".$this->id; - dol_syslog(get_class($this)."::delete sql=".$sql); + dol_syslog(get_class($this)."::delete", LOG_DEBUG); $resql = $this->db->query($sql); if (! $resql) { diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index df302f0ffad..df6d16767d6 100644 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -255,7 +255,7 @@ class ExtraFields $sql.= " '".$params."'"; $sql.=')'; - dol_syslog(get_class($this)."::create_label sql=".$sql); + dol_syslog(get_class($this)."::create_label", LOG_DEBUG); if ($this->db->query($sql)) { return 1; @@ -318,7 +318,7 @@ class ExtraFields $sql.= " AND entity IN (0,".$conf->entity.')'; $sql.= " AND elementtype = '".$elementtype."'"; - dol_syslog(get_class($this)."::delete_label sql=".$sql); + dol_syslog(get_class($this)."::delete_label", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -480,7 +480,7 @@ class ExtraFields $sql.= " '".$pos."',"; $sql.= " '".$param."'"; $sql.= ")"; - dol_syslog(get_class($this)."::update_label sql=".$sql); + dol_syslog(get_class($this)."::update_label", LOG_DEBUG); $resql2=$this->db->query($sql); if ($resql1 && $resql2) @@ -537,7 +537,7 @@ class ExtraFields if ($elementtype) $sql.= " AND elementtype = '".$elementtype."'"; $sql.= " ORDER BY pos"; - dol_syslog(get_class($this)."::fetch_name_optionals_label sql=".$sql); + dol_syslog(get_class($this)."::fetch_name_optionals_label", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index bd4783282f2..c83bbf6864c 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -486,7 +486,7 @@ class Form $sql.= " WHERE active = 1"; //$sql.= " ORDER BY code ASC"; - dol_syslog(get_class($this)."::select_country sql=".$sql); + dol_syslog(get_class($this)."::select_country", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -795,7 +795,7 @@ class Form $sql.=$this->db->order("nom","ASC"); if ($limit > 0) $sql.=$this->db->plimit($limit); - dol_syslog(get_class($this)."::select_thirdparty_list sql=".$sql); + dol_syslog(get_class($this)."::select_thirdparty_list", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -889,7 +889,7 @@ class Form if ($filter) $sql.= " AND ".$filter; $sql.= " ORDER BY re.description ASC"; - dol_syslog(get_class($this)."::select_remises sql=".$sql); + dol_syslog(get_class($this)."::select_remises", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -995,7 +995,7 @@ class Form if (! empty($conf->global->CONTACT_HIDE_INACTIVE_IN_COMBOBOX)) $sql.= " AND sp.statut<>0 "; $sql.= " ORDER BY sp.lastname ASC"; - dol_syslog(get_class($this)."::select_contacts sql=".$sql); + dol_syslog(get_class($this)."::select_contacts", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -1162,7 +1162,7 @@ class Form if (! empty($conf->global->USER_HIDE_INACTIVE_IN_COMBOBOX)) $sql.= " AND u.statut<>0 "; $sql.= " ORDER BY u.lastname ASC"; - dol_syslog(get_class($this)."::select_dolusers sql=".$sql); + dol_syslog(get_class($this)."::select_dolusers", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -1412,7 +1412,7 @@ class Form $sql.= $db->plimit($limit); // Build output string - dol_syslog(get_class($this)."::select_produits_list search product sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::select_produits_list search product", LOG_DEBUG); $result=$this->db->query($sql); if ($result) { @@ -1435,7 +1435,7 @@ class Form $sql.= " WHERE fk_product_price=".$objp->price_rowid; $sql.= " ORDER BY quantity ASC"; - dol_syslog(get_class($this)."::select_produits_list search price by qty sql=".$sql); + dol_syslog(get_class($this)."::select_produits_list search price by qty", LOG_DEBUG); $result2 = $this->db->query($sql); if ($result2) { @@ -1775,7 +1775,7 @@ class Form // Build output string - dol_syslog(get_class($this)."::select_produits_fournisseurs_list sql=".$sql,LOG_DEBUG); + dol_syslog(get_class($this)."::select_produits_fournisseurs_list", LOG_DEBUG); $result=$this->db->query($sql); if ($result) { @@ -1921,7 +1921,7 @@ class Form $sql.= " AND p.rowid = ".$productid; $sql.= " ORDER BY s.nom, pfp.ref_fourn DESC"; - dol_syslog(get_class($this)."::select_product_fourn_price sql=".$sql,LOG_DEBUG); + dol_syslog(get_class($this)."::select_product_fourn_price", LOG_DEBUG); $result=$this->db->query($sql); if ($result) @@ -2005,7 +2005,7 @@ class Form $sql .= " WHERE a.fk_soc = ".$socid; $sql .= " ORDER BY a.label ASC"; - dol_syslog(get_class($this)."::select_address sql=".$sql); + dol_syslog(get_class($this)."::select_address", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -2167,7 +2167,7 @@ class Form $sql.= " FROM ".MAIN_DB_PREFIX.'c_input_reason'; $sql.= " WHERE active=1"; $sql.= " ORDER BY rowid"; - dol_syslog(get_class($this)."::loadCacheInputReason sql=".$sql,LOG_DEBUG); + dol_syslog(get_class($this)."::loadCacheInputReason", LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { @@ -2248,7 +2248,7 @@ class Form $sql.= " FROM ".MAIN_DB_PREFIX."c_paiement"; $sql.= " WHERE active > 0"; $sql.= " ORDER BY id"; - dol_syslog(get_class($this)."::load_cache_types_paiements sql=".$sql,LOG_DEBUG); + dol_syslog(get_class($this)."::load_cache_types_paiements", LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { @@ -2437,7 +2437,7 @@ class Form if ($filtre) $sql.=" AND ".$filtre; $sql.= " ORDER BY label"; - dol_syslog(get_class($this)."::select_comptes sql=".$sql); + dol_syslog(get_class($this)."::select_comptes", LOG_DEBUG); $result = $this->db->query($sql); if ($result) { @@ -4224,7 +4224,7 @@ class Form if (is_array($include) && $includeGroups) $sql.= " AND ug.rowid IN ('".$includeGroups."')"; $sql.= " ORDER BY ug.nom ASC"; - dol_syslog(get_class($this)."::select_dolgroups sql=".$sql); + dol_syslog(get_class($this)."::select_dolgroups", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { diff --git a/htdocs/core/class/html.formcompany.class.php b/htdocs/core/class/html.formcompany.class.php index a22f0b38c10..2f1be6d7d56 100644 --- a/htdocs/core/class/html.formcompany.class.php +++ b/htdocs/core/class/html.formcompany.class.php @@ -229,7 +229,7 @@ class FormCompany if ($country_codeid && ! is_numeric($country_codeid)) $sql .= " AND p.code = '".$country_codeid."'"; $sql .= " ORDER BY p.code, d.code_departement"; - dol_syslog(get_class($this)."::select_departement sql=".$sql); + dol_syslog(get_class($this)."::select_departement", LOG_DEBUG); $result=$this->db->query($sql); if ($result) { @@ -306,7 +306,7 @@ class FormCompany $sql.= " WHERE r.fk_pays=p.rowid AND r.active = 1 and p.active = 1"; $sql.= " ORDER BY p.code, p.libelle ASC"; - dol_syslog(get_class($this)."::select_region sql=".$sql); + dol_syslog(get_class($this)."::select_region", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -369,7 +369,7 @@ class FormCompany $sql = "SELECT rowid, code, civilite as civility_label, active FROM ".MAIN_DB_PREFIX."c_civilite"; $sql.= " WHERE active = 1"; - dol_syslog("Form::select_civility sql=".$sql); + dol_syslog("Form::select_civility", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -447,7 +447,7 @@ class FormCompany if ($filter) $sql .= " ".$filter; $sql .= " ORDER BY p.code"; - dol_syslog(get_class($this)."::select_juridicalstatus sql=".$sql); + dol_syslog(get_class($this)."::select_juridicalstatus", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { diff --git a/htdocs/core/class/html.formcontract.class.php b/htdocs/core/class/html.formcontract.class.php index cfc5be29b92..e0d550b4205 100644 --- a/htdocs/core/class/html.formcontract.class.php +++ b/htdocs/core/class/html.formcontract.class.php @@ -67,7 +67,7 @@ class FormContract if ($socid == 0) $sql.= " AND (c.fk_soc = 0 OR c.fk_soc IS NULL)"; else $sql.= " AND c.fk_soc = ".$socid; - dol_syslog(get_class($this)."::select_contract sql=".$sql); + dol_syslog(get_class($this)."::select_contract", LOG_DEBUG); $resql=$db->query($sql); if ($resql) { diff --git a/htdocs/core/class/html.formorder.class.php b/htdocs/core/class/html.formorder.class.php index 6bc626b13f3..5ea5b33c1f4 100644 --- a/htdocs/core/class/html.formorder.class.php +++ b/htdocs/core/class/html.formorder.class.php @@ -116,7 +116,7 @@ class FormOrder $sql.= " FROM ".MAIN_DB_PREFIX."c_input_method"; $sql.= " WHERE active = 1"; - dol_syslog(get_class($this)."::selectInputMethod sql=".$sql); + dol_syslog(get_class($this)."::selectInputMethod", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { diff --git a/htdocs/core/class/html.formother.class.php b/htdocs/core/class/html.formother.class.php index b6065909ade..35ebe48e168 100644 --- a/htdocs/core/class/html.formother.class.php +++ b/htdocs/core/class/html.formother.class.php @@ -1122,7 +1122,7 @@ class FormOther $sql.= " FROM ".MAIN_DB_PREFIX.$dictionarytable; $sql.= " ORDER BY ".$labelfield; - dol_syslog(get_class($this)."::select_dictionary sql=".$sql); + dol_syslog(get_class($this)."::select_dictionary", LOG_DEBUG); $result = $this->db->query($sql); if ($result) { diff --git a/htdocs/core/class/html.formprojet.class.php b/htdocs/core/class/html.formprojet.class.php index 2c371d4afcd..1ea498e19dd 100644 --- a/htdocs/core/class/html.formprojet.class.php +++ b/htdocs/core/class/html.formprojet.class.php @@ -79,7 +79,7 @@ class FormProjets if ($socid == 0) $sql.= " AND (p.fk_soc=0 OR p.fk_soc IS NULL)"; $sql.= " ORDER BY p.title ASC"; - dol_syslog(get_class($this)."::select_projects sql=".$sql,LOG_DEBUG); + dol_syslog(get_class($this)."::select_projects", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { diff --git a/htdocs/core/class/html.formpropal.class.php b/htdocs/core/class/html.formpropal.class.php index fcbe46ab51b..df0f2d644dd 100644 --- a/htdocs/core/class/html.formpropal.class.php +++ b/htdocs/core/class/html.formpropal.class.php @@ -56,7 +56,7 @@ class FormPropal $sql = "SELECT id, code, label, active FROM ".MAIN_DB_PREFIX."c_propalst"; $sql .= " WHERE active = 1"; - dol_syslog(get_class($this)."::selectProposalStatus sql=".$sql); + dol_syslog(get_class($this)."::selectProposalStatus", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { diff --git a/htdocs/core/class/html.formsocialcontrib.class.php b/htdocs/core/class/html.formsocialcontrib.class.php index f84f14c1446..b3c5a4c7d9c 100644 --- a/htdocs/core/class/html.formsocialcontrib.class.php +++ b/htdocs/core/class/html.formsocialcontrib.class.php @@ -79,7 +79,7 @@ class FormSocialContrib $sql.= " ORDER BY c.libelle ASC"; } - dol_syslog("Form::select_type_socialcontrib sql=".$sql, LOG_DEBUG); + dol_syslog("Form::select_type_socialcontrib", LOG_DEBUG); $resql=$db->query($sql); if ($resql) { diff --git a/htdocs/core/class/infobox.class.php b/htdocs/core/class/infobox.class.php index c01d2d1f0f5..43c057ac859 100644 --- a/htdocs/core/class/infobox.class.php +++ b/htdocs/core/class/infobox.class.php @@ -73,7 +73,7 @@ class InfoBox } } - dol_syslog(get_class()."::listBoxes get default box list for mode=".$mode." userid=".(is_object($user)?$user->id:'')." sql=".$sql, LOG_DEBUG); + dol_syslog(get_class()."::listBoxes get default box list for mode=".$mode." userid=".(is_object($user)?$user->id:'')."", LOG_DEBUG); $resql = $db->query($sql); if ($resql) { @@ -212,7 +212,7 @@ class InfoBox $sql.= " AND fk_user = ".$userid; $sql.= " AND position = ".$zone; - dol_syslog(get_class()."::saveboxorder sql=".$sql); + dol_syslog(get_class()."::saveboxorder", LOG_DEBUG); $result = $db->query($sql); if ($result) { @@ -243,7 +243,7 @@ class InfoBox $sql.= " ".$conf->entity; $sql.= ")"; - dol_syslog(get_class()."::saveboxorder sql=".$sql); + dol_syslog(get_class()."::saveboxorder", LOG_DEBUG); $result = $db->query($sql); if ($result < 0) { diff --git a/htdocs/core/class/link.class.php b/htdocs/core/class/link.class.php index 08d520d519e..e92aa273105 100644 --- a/htdocs/core/class/link.class.php +++ b/htdocs/core/class/link.class.php @@ -93,7 +93,7 @@ class Link extends CommonObject $sql .= ", '" . $this->objecttype . "'"; $sql .= ", " . $this->objectid . ")"; - dol_syslog(get_class($this)."::create sql=".$sql); + dol_syslog(get_class($this)."::create", LOG_DEBUG); $result = $this->db->query($sql); if ($result) { $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX . "links"); @@ -256,7 +256,7 @@ class Link extends CommonObject $sql .= " ORDER BY " . $sortfield . " " . $sortorder; } - dol_syslog(get_class($this)."::fetchAll sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::fetchAll", LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { @@ -305,7 +305,7 @@ class Link extends CommonObject $sql .= " WHERE rowid = " . $rowid; if($conf->entity != 0) $sql .= " AND entity = " . $conf->entity; - dol_syslog(get_class($this)."::fetch sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::fetch", LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { diff --git a/htdocs/core/class/menubase.class.php b/htdocs/core/class/menubase.class.php index 966b9ac7f77..60375f8c283 100644 --- a/htdocs/core/class/menubase.class.php +++ b/htdocs/core/class/menubase.class.php @@ -162,7 +162,7 @@ class Menubase $sql.= " '".$this->user."'"; $sql.= ")"; - dol_syslog(get_class($this)."::create sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::create", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -232,7 +232,7 @@ class Menubase $sql.= " usertype='".$this->user."'"; $sql.= " WHERE rowid=".$this->id; - dol_syslog(get_class($this)."::update sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::update", LOG_DEBUG); $resql = $this->db->query($sql); if (! $resql) { @@ -277,7 +277,7 @@ class Menubase $sql.= " FROM ".MAIN_DB_PREFIX."menu as t"; $sql.= " WHERE t.rowid = ".$id; - dol_syslog(get_class($this)."::fetch sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::fetch", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -330,7 +330,7 @@ class Menubase $sql = "DELETE FROM ".MAIN_DB_PREFIX."menu"; $sql.= " WHERE rowid=".$this->id; - dol_syslog(get_class($this)."::delete sql=".$sql); + dol_syslog(get_class($this)."::delete", LOG_DEBUG); $resql = $this->db->query($sql); if (! $resql) { @@ -516,7 +516,7 @@ class Menubase //$tmp1=dol_microtime_float(); //print '>>> 1 0
'; - dol_syslog(get_class($this)."::menuLoad mymainmenu=".$mymainmenu." myleftmenu=".$myleftmenu." type_user=".$type_user." menu_handler=".$menu_handler." tabMenu size=".count($tabMenu)." sql=".$sql); + dol_syslog(get_class($this)."::menuLoad mymainmenu=".$mymainmenu." myleftmenu=".$myleftmenu." type_user=".$type_user." menu_handler=".$menu_handler." tabMenu size=".count($tabMenu)."", LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { diff --git a/htdocs/core/class/notify.class.php b/htdocs/core/class/notify.class.php index 317b00dd33a..03e2a641828 100644 --- a/htdocs/core/class/notify.class.php +++ b/htdocs/core/class/notify.class.php @@ -99,7 +99,7 @@ class Notify $sql.= " AND s.entity IN (".getEntity('societe', 1).")"; $sql.= " AND s.rowid = ".$socid; - dol_syslog("Notify.class::countDefinedNotifications ".$action.", ".$socid." sql=".$sql); + dol_syslog("Notify.class::countDefinedNotifications ".$action.", ".$socid."", LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) @@ -147,7 +147,7 @@ class Notify else $sql.= " AND a.code = '".$action."'"; // New usage $sql .= " AND s.rowid = ".$socid; - dol_syslog("Notify::send sql=".$sql); + dol_syslog("Notify::send", LOG_DEBUG); $result = $this->db->query($sql); if ($result) { @@ -226,7 +226,7 @@ class Notify $sql = "INSERT INTO ".MAIN_DB_PREFIX."notify (daten, fk_action, fk_contact, objet_type, objet_id, email)"; $sql.= " VALUES ('".$this->db->idate($now)."', ".$actiondefid.", ".$obj->cid.", '".$objet_type."', ".$objet_id.", '".$this->db->escape($obj->email)."')"; - dol_syslog("Notify::send sql=".$sql); + dol_syslog("Notify::send", LOG_DEBUG); if (! $this->db->query($sql) ) { dol_print_error($this->db); diff --git a/htdocs/core/class/stats.class.php b/htdocs/core/class/stats.class.php index 5018d63cecf..b2e85b3113a 100644 --- a/htdocs/core/class/stats.class.php +++ b/htdocs/core/class/stats.class.php @@ -334,7 +334,7 @@ abstract class Stats { $result = array(); - dol_syslog(get_class($this).'::'.__FUNCTION__." sql=".$sql); + dol_syslog(get_class($this).'::'.__FUNCTION__."", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -364,7 +364,7 @@ abstract class Stats { $result = array(); - dol_syslog(get_class($this).'::'.__FUNCTION__." sql=".$sql); + dol_syslog(get_class($this).'::'.__FUNCTION__."", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -400,7 +400,7 @@ abstract class Stats $result=array(); $res=array(); - dol_syslog(get_class($this).'::'.__FUNCTION__." sql=".$sql); + dol_syslog(get_class($this).'::'.__FUNCTION__."", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -451,7 +451,7 @@ abstract class Stats $result=array(); $res=array(); - dol_syslog(get_class($this).'::'.__FUNCTION__." sql=".$sql); + dol_syslog(get_class($this).'::'.__FUNCTION__."", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) @@ -499,7 +499,7 @@ abstract class Stats $result=array(); $res=array(); - dol_syslog(get_class($this).'::'.__FUNCTION__." sql=".$sql); + dol_syslog(get_class($this).'::'.__FUNCTION__."", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -548,7 +548,7 @@ abstract class Stats $result=array(); $res=array(); - dol_syslog(get_class($this).'::'.__FUNCTION__." sql=".$sql); + dol_syslog(get_class($this).'::'.__FUNCTION__."", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { diff --git a/htdocs/core/db/mysql.class.php b/htdocs/core/db/mysql.class.php index 00cc3868cd6..5e5b4c360d0 100644 --- a/htdocs/core/db/mysql.class.php +++ b/htdocs/core/db/mysql.class.php @@ -849,7 +849,7 @@ class DoliDBMysql extends DoliDB $sql="FLUSH Privileges"; - dol_syslog(get_class($this)."::DDLCreateUser sql=".$sql); + dol_syslog(get_class($this)."::DDLCreateUser", LOG_DEBUG); $resql=$this->query($sql); if (! $resql) { diff --git a/htdocs/core/db/mysqli.class.php b/htdocs/core/db/mysqli.class.php index 336780a1a09..16915dcd22d 100644 --- a/htdocs/core/db/mysqli.class.php +++ b/htdocs/core/db/mysqli.class.php @@ -853,7 +853,7 @@ class DoliDBMysqli extends DoliDB $sql="FLUSH Privileges"; - dol_syslog(get_class($this)."::DDLCreateUser sql=".$sql); + dol_syslog(get_class($this)."::DDLCreateUser", LOG_DEBUG); $resql=$this->query($sql); if (! $resql) { diff --git a/htdocs/core/db/sqlite.class.php b/htdocs/core/db/sqlite.class.php index f06a92c401f..45c1bbd182f 100644 --- a/htdocs/core/db/sqlite.class.php +++ b/htdocs/core/db/sqlite.class.php @@ -981,7 +981,7 @@ class DoliDBSqlite extends DoliDB $sql.= " VALUES ('".$this->escape($dolibarr_main_db_host)."','".$this->escape($dolibarr_main_db_name)."','".addslashes($dolibarr_main_db_user)."'"; $sql.= ",'Y','Y','Y','Y','Y','Y','Y','Y','Y')"; - dol_syslog(get_class($this)."::DDLCreateUser sql=".$sql); + dol_syslog(get_class($this)."::DDLCreateUser", LOG_DEBUG); $resql=$this->query($sql); if (! $resql) { @@ -991,7 +991,7 @@ class DoliDBSqlite extends DoliDB $sql="FLUSH Privileges"; - dol_syslog(get_class($this)."::DDLCreateUser sql=".$sql); + dol_syslog(get_class($this)."::DDLCreateUser", LOG_DEBUG); $resql=$this->query($sql); if (! $resql) { diff --git a/htdocs/core/lib/admin.lib.php b/htdocs/core/lib/admin.lib.php index 2f5e217641f..9040d6a1caf 100644 --- a/htdocs/core/lib/admin.lib.php +++ b/htdocs/core/lib/admin.lib.php @@ -393,7 +393,7 @@ function dolibarr_del_const($db, $name, $entity=1) $sql.= ")"; if ($entity >= 0) $sql.= " AND entity = ".$entity; - dol_syslog("admin.lib::dolibarr_del_const sql=".$sql); + dol_syslog("admin.lib::dolibarr_del_const", LOG_DEBUG); $resql=$db->query($sql); if ($resql) { @@ -427,7 +427,7 @@ function dolibarr_get_const($db, $name, $entity=1) $sql.= " WHERE name = ".$db->encrypt($name,1); $sql.= " AND entity = ".$entity; - dol_syslog("admin.lib::dolibarr_get_const sql=".$sql); + dol_syslog("admin.lib::dolibarr_get_const", LOG_DEBUG); $resql=$db->query($sql); if ($resql) { @@ -474,7 +474,7 @@ function dolibarr_set_const($db, $name, $value, $type='chaine', $visible=0, $not $sql.= " WHERE name = ".$db->encrypt($name,1); if ($entity >= 0) $sql.= " AND entity = ".$entity; - dol_syslog("admin.lib::dolibarr_set_const sql=".$sql, LOG_DEBUG); + dol_syslog("admin.lib::dolibarr_set_const", LOG_DEBUG); $resql=$db->query($sql); if (strcmp($value,'')) // true if different. Must work for $value='0' or $value=0 @@ -487,7 +487,7 @@ function dolibarr_set_const($db, $name, $value, $type='chaine', $visible=0, $not //print "sql".$value."-".pg_escape_string($value)."-".$sql;exit; //print "xx".$db->escape($value); - dol_syslog("admin.lib::dolibarr_set_const sql=".$sql, LOG_DEBUG); + dol_syslog("admin.lib::dolibarr_set_const", LOG_DEBUG); $resql=$db->query($sql); } @@ -1041,7 +1041,7 @@ function form_constantes($tableau,$strictw3c=0) $sql.= " ORDER BY name ASC, entity DESC"; $result = $db->query($sql); - dol_syslog("List params sql=".$sql); + dol_syslog("List params", LOG_DEBUG); if ($result) { $obj = $db->fetch_object($result); // Take first result of select @@ -1215,7 +1215,7 @@ function addDocumentModel($name, $type, $label='', $description='') $sql.= (! empty($description)?"'".$db->escape($description)."'":"null"); $sql.= ")"; - dol_syslog("admin.lib::addDocumentModel sql=".$sql); + dol_syslog("admin.lib::addDocumentModel", LOG_DEBUG); $resql=$db->query($sql); if ($resql) { @@ -1248,7 +1248,7 @@ function delDocumentModel($name, $type) $sql.= " AND type = '".$type."'"; $sql.= " AND entity = ".$conf->entity; - dol_syslog("admin.lib::delDocumentModel sql=".$sql); + dol_syslog("admin.lib::delDocumentModel", LOG_DEBUG); $resql=$db->query($sql); if ($resql) { diff --git a/htdocs/core/lib/company.lib.php b/htdocs/core/lib/company.lib.php index 0851fb0b7c1..9bf8bead072 100644 --- a/htdocs/core/lib/company.lib.php +++ b/htdocs/core/lib/company.lib.php @@ -267,7 +267,7 @@ function getCountry($searchkey,$withcode='',$dbtouse=0,$outputlangs='',$entconv= elseif (! empty($searchkey)) $sql.= " WHERE code='".$db->escape($searchkey)."'"; else $sql.= " WHERE libelle='".$db->escape($searchlabel)."'"; - dol_syslog("Company.lib::getCountry sql=".$sql); + dol_syslog("Company.lib::getCountry", LOG_DEBUG); $resql=$dbtouse->query($sql); if ($resql) { @@ -317,7 +317,7 @@ function getState($id,$withcode='',$dbtouse=0) $sql = "SELECT rowid, code_departement as code, nom as label FROM ".MAIN_DB_PREFIX."c_departements"; $sql.= " WHERE rowid=".$id; - dol_syslog("Company.lib::getState sql=".$sql); + dol_syslog("Company.lib::getState", LOG_DEBUG); $resql=$dbtouse->query($sql); if ($resql) { @@ -394,7 +394,7 @@ function getFormeJuridiqueLabel($code) $sql = "SELECT libelle FROM ".MAIN_DB_PREFIX."c_forme_juridique"; $sql.= " WHERE code='$code'"; - dol_syslog("Company.lib::getFormeJuridiqueLabel sql=".$sql); + dol_syslog("Company.lib::getFormeJuridiqueLabel", LOG_DEBUG); $resql=$db->query($sql); if ($resql) { @@ -953,7 +953,7 @@ function show_actions_todo($conf,$langs,$db,$object,$objcon='',$noprint=0) $sql.= " AND ((a.percent >= 0 AND a.percent < 100) OR (a.percent = -1 AND a.datep > '".$db->idate($now)."'))"; $sql.= " ORDER BY a.datep DESC, a.id DESC"; - dol_syslog("company.lib::show_actions_todo sql=".$sql); + dol_syslog("company.lib::show_actions_todo", LOG_DEBUG); $result=$db->query($sql); if ($result) { @@ -1089,7 +1089,7 @@ function show_actions_done($conf,$langs,$db,$object,$objcon='',$noprint=0) $sql.= " AND (a.percent = 100 OR (a.percent = -1 AND a.datep <= '".$db->idate($now)."'))"; $sql.= " ORDER BY a.datep DESC, a.id DESC"; - dol_syslog("company.lib::show_actions_done sql=".$sql, LOG_DEBUG); + dol_syslog("company.lib::show_actions_done", LOG_DEBUG); $resql=$db->query($sql); if ($resql) { @@ -1141,7 +1141,7 @@ function show_actions_done($conf,$langs,$db,$object,$objcon='',$noprint=0) $sql.= " AND mc.fk_mailing=m.rowid"; $sql.= " ORDER BY mc.date_envoi DESC, m.rowid DESC"; - dol_syslog("company.lib::show_actions_done sql=".$sql, LOG_DEBUG); + dol_syslog("company.lib::show_actions_done", LOG_DEBUG); $resql=$db->query($sql); if ($resql) { diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index a22c38834cf..1cd4f582494 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -2934,7 +2934,7 @@ function get_localtax($tva, $local, $thirdparty_buyer="", $thirdparty_seller="") $sql .= " WHERE t.fk_pays = p.rowid AND p.code = '".$thirdparty_seller->country_code."'"; $sql .= " AND t.taux = ".$tva." AND t.active = 1"; - dol_syslog("get_localtax sql=".$sql); + dol_syslog("get_localtax", LOG_DEBUG); $resql=$db->query($sql); if ($resql) { diff --git a/htdocs/core/lib/functions2.lib.php b/htdocs/core/lib/functions2.lib.php index 2f2a313699a..606589971a9 100644 --- a/htdocs/core/lib/functions2.lib.php +++ b/htdocs/core/lib/functions2.lib.php @@ -744,7 +744,7 @@ function get_next_value($db,$mask,$table,$field,$where='',$objsoc='',$date='',$m if ($sqlwhere) $sql.=' AND '.$sqlwhere; //print $sql.'
'; - dol_syslog("functions2::get_next_value mode=".$mode." sql=".$sql, LOG_DEBUG); + dol_syslog("functions2::get_next_value mode=".$mode."", LOG_DEBUG); $resql=$db->query($sql); if ($resql) { @@ -783,7 +783,7 @@ function get_next_value($db,$mask,$table,$field,$where='',$objsoc='',$date='',$m if ($where) $sql.=$where; if ($sqlwhere) $sql.=' AND '.$sqlwhere; - dol_syslog("functions2::get_next_value sql=".$sql); + dol_syslog("functions2::get_next_value", LOG_DEBUG); $resql=$db->query($sql); if ($resql) { @@ -1168,7 +1168,7 @@ function dol_set_user_param($db, $conf, &$user, $tab) $i++; } $sql.= ")"; - dol_syslog("functions2.lib::dol_set_user_param sql=".$sql, LOG_DEBUG); + dol_syslog("functions2.lib::dol_set_user_param", LOG_DEBUG); $resql=$db->query($sql); if (! $resql) @@ -1187,7 +1187,7 @@ function dol_set_user_param($db, $conf, &$user, $tab) $sql.= " VALUES (".$user->id.",".$conf->entity.","; $sql.= " '".$key."','".$db->escape($value)."')"; - dol_syslog("functions2.lib::dol_set_user_param sql=".$sql, LOG_DEBUG); + dol_syslog("functions2.lib::dol_set_user_param", LOG_DEBUG); $result=$db->query($sql); if (! $result) { diff --git a/htdocs/core/lib/invoice2.lib.php b/htdocs/core/lib/invoice2.lib.php index 9309d083187..39405db4468 100644 --- a/htdocs/core/lib/invoice2.lib.php +++ b/htdocs/core/lib/invoice2.lib.php @@ -128,7 +128,7 @@ function rebuild_merge_pdf($db, $langs, $conf, $diroutputpdf, $newlangid, $filte if ($sqlorder) $sql.=$sqlorder; //print $sql; exit; - dol_syslog("scripts/invoices/rebuild_merge.php: sql=".$sql); + dol_syslog("scripts/invoices/rebuild_merge.php:", LOG_DEBUG); if ($usestdout) print '--- start'."\n"; @@ -139,7 +139,7 @@ function rebuild_merge_pdf($db, $langs, $conf, $diroutputpdf, $newlangid, $filte $result = 0; $files = array() ; // liste les fichiers - dol_syslog("scripts/invoices/rebuild_merge.php sql=".$sql); + dol_syslog("scripts/invoices/rebuild_merge.php", LOG_DEBUG); if ( $resql=$db->query($sql) ) { $num = $db->num_rows($resql); diff --git a/htdocs/core/lib/price.lib.php b/htdocs/core/lib/price.lib.php index ac9845f22a1..00144db74e5 100644 --- a/htdocs/core/lib/price.lib.php +++ b/htdocs/core/lib/price.lib.php @@ -111,7 +111,7 @@ function calcul_price_total($qty, $pu, $remise_percent_ligne, $txtva, $uselocalt $sql.= " FROM ".MAIN_DB_PREFIX."c_tva as cv"; $sql.= " WHERE cv.taux = ".$txtva; $sql.= " AND cv.fk_pays = ".$countryid; - dol_syslog("calcul_price_total search vat information sql=".$sql); + dol_syslog("calcul_price_total search vat information", LOG_DEBUG); $resql = $db->query($sql); if ($resql) { diff --git a/htdocs/core/lib/sendings.lib.php b/htdocs/core/lib/sendings.lib.php index 2bfb2ba7c17..d2f3bf563c6 100644 --- a/htdocs/core/lib/sendings.lib.php +++ b/htdocs/core/lib/sendings.lib.php @@ -171,7 +171,7 @@ function show_list_sending_receive($origin,$origin_id,$filter='') $sql.= " ORDER BY obj.fk_product"; - dol_syslog("show_list_sending_receive sql=".$sql, LOG_DEBUG); + dol_syslog("show_list_sending_receive", LOG_DEBUG); $resql = $db->query($sql); if ($resql) { diff --git a/htdocs/core/lib/tax.lib.php b/htdocs/core/lib/tax.lib.php index a52aeb37345..164d346ac1c 100644 --- a/htdocs/core/lib/tax.lib.php +++ b/htdocs/core/lib/tax.lib.php @@ -194,7 +194,7 @@ function vat_by_thirdparty($db, $y, $date_start, $date_end, $modetax, $direction if ($sql == 'TODO') return -2; if ($sql != 'TODO') { - dol_syslog("Tax.lib:thirdparty sql=".$sql); + dol_syslog("Tax.lib:thirdparty", LOG_DEBUG); $resql = $db->query($sql); if ($resql) { @@ -366,7 +366,7 @@ function vat_by_date($db, $y, $q, $date_start, $date_end, $modetax, $direction, if ($sql == 'TODO') return -2; if ($sql != 'TODO') { - dol_syslog("Tax.lib.php::vat_by_date sql=".$sql); + dol_syslog("Tax.lib.php::vat_by_date", LOG_DEBUG); $resql = $db->query($sql); if ($resql) @@ -531,7 +531,7 @@ function vat_by_date($db, $y, $q, $date_start, $date_end, $modetax, $direction, if ($sql == 'TODO') return -2; // -2 = Feature not yet available if ($sql != 'TODO') { - dol_syslog("Tax.lib.php::vat_by_date sql=".$sql); + dol_syslog("Tax.lib.php::vat_by_date", LOG_DEBUG); $resql = $db->query($sql); if ($resql) { diff --git a/htdocs/core/login/functions_dolibarr.php b/htdocs/core/login/functions_dolibarr.php index 400b5765719..d1555678313 100644 --- a/htdocs/core/login/functions_dolibarr.php +++ b/htdocs/core/login/functions_dolibarr.php @@ -58,7 +58,7 @@ function check_user_password_dolibarr($usertotest,$passwordtotest,$entitytotest= $sql.=' WHERE '.$usernamecol." = '".$db->escape($usertotest)."'"; $sql.=' AND '.$entitycol." IN (0," . ($entity ? $entity : 1) . ")"; - dol_syslog("functions_dolibarr::check_user_password_dolibarr sql=".$sql); + dol_syslog("functions_dolibarr::check_user_password_dolibarr", LOG_DEBUG); $resql=$db->query($sql); if ($resql) { diff --git a/htdocs/core/login/functions_openid.php b/htdocs/core/login/functions_openid.php index e183bc40795..3abb69be4f2 100644 --- a/htdocs/core/login/functions_openid.php +++ b/htdocs/core/login/functions_openid.php @@ -79,7 +79,7 @@ function check_user_password_openid($usertotest,$passwordtotest,$entitytotest) $sql.=" WHERE openid = '".$db->escape($_GET['openid_identity'])."'"; $sql.=" AND entity IN (0," . ($_SESSION["dol_entity"] ? $_SESSION["dol_entity"] : 1) . ")"; - dol_syslog("functions_openid::check_user_password_openid sql=".$sql); + dol_syslog("functions_openid::check_user_password_openid", LOG_DEBUG); $resql=$db->query($sql); if ($resql) { diff --git a/htdocs/core/modules/DolibarrModules.class.php b/htdocs/core/modules/DolibarrModules.class.php index e25f4d0c715..9809c418f0c 100644 --- a/htdocs/core/modules/DolibarrModules.class.php +++ b/htdocs/core/modules/DolibarrModules.class.php @@ -113,7 +113,7 @@ abstract class DolibarrModules // Add current entity id $sql=str_replace('__ENTITY__', $conf->entity, $sql); - dol_syslog(get_class($this)."::_init ignoreerror=".$ignoreerror." sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::_init ignoreerror=".$ignoreerror."", LOG_DEBUG); $result=$this->db->query($sql, $ignoreerror); if (! $result) { @@ -373,7 +373,7 @@ abstract class DolibarrModules $sql.= " WHERE ".$this->db->decrypt('name')." = '".$this->const_name."'"; $sql.= " AND entity IN (0, ".$entity.")"; - dol_syslog(get_class($this)."::_active sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::_active", LOG_DEBUG); $resql=$this->db->query($sql); if (! $resql) $err++; @@ -382,7 +382,7 @@ abstract class DolibarrModules $sql.= ",".$this->db->encrypt('1',1); $sql.= ",0,".$entity.")"; - dol_syslog(get_class($this)."::_active sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::_active", LOG_DEBUG); $resql=$this->db->query($sql); if (! $resql) $err++; @@ -408,7 +408,7 @@ abstract class DolibarrModules $sql.= " WHERE ".$this->db->decrypt('name')." = '".$this->const_name."'"; $sql.= " AND entity IN (0, ".$entity.")"; - dol_syslog(get_class($this)."::_unactive sql=".$sql); + dol_syslog(get_class($this)."::_unactive", LOG_DEBUG); $this->db->query($sql); return $err; @@ -540,7 +540,7 @@ abstract class DolibarrModules $sql.= " AND entity = ".$conf->entity; if ($note) $sql.=" AND note ='".$this->db->escape($note)."'"; - dol_syslog(get_class($this)."::insert_boxes sql=".$sql); + dol_syslog(get_class($this)."::insert_boxes", LOG_DEBUG); $result=$this->db->query($sql); if ($result) { @@ -557,7 +557,7 @@ abstract class DolibarrModules $sql.= $note?"'".$this->db->escape($note)."'":"null"; $sql.= ")"; - dol_syslog(get_class($this)."::insert_boxes sql=".$sql); + dol_syslog(get_class($this)."::insert_boxes", LOG_DEBUG); $resql=$this->db->query($sql); if (! $resql) $err++; @@ -575,7 +575,7 @@ abstract class DolibarrModules $sql = "INSERT INTO ".MAIN_DB_PREFIX."boxes (box_id,position,box_order,fk_user,entity)"; $sql.= " VALUES (".$lastid.", ".$key2.", '0', 0, ".$conf->entity.")"; - dol_syslog(get_class($this)."::insert_boxes onto page ".$key2."=".$val2." sql=".$sql); + dol_syslog(get_class($this)."::insert_boxes onto page ".$key2."=".$val2."", LOG_DEBUG); $resql=$this->db->query($sql); if (! $resql) $err++; } @@ -634,7 +634,7 @@ abstract class DolibarrModules $sql.= " AND ".MAIN_DB_PREFIX."boxes_def.file = '".$this->db->escape($file)."'"; $sql.= " AND ".MAIN_DB_PREFIX."boxes.entity = ".$conf->entity; - dol_syslog(get_class($this)."::delete_boxes sql=".$sql); + dol_syslog(get_class($this)."::delete_boxes", LOG_DEBUG); $resql=$this->db->query($sql); if (! $resql) { @@ -647,7 +647,7 @@ abstract class DolibarrModules $sql.= " WHERE file = '".$this->db->escape($file)."'"; $sql.= " AND entity = ".$conf->entity; - dol_syslog(get_class($this)."::delete_boxes sql=".$sql); + dol_syslog(get_class($this)."::delete_boxes", LOG_DEBUG); $resql=$this->db->query($sql); if (! $resql) { @@ -676,7 +676,7 @@ abstract class DolibarrModules $sql.= " WHERE ".$this->db->decrypt('name')." like '".$this->const_name."_TABS_%'"; $sql.= " AND entity = ".$conf->entity; - dol_syslog(get_class($this)."::delete_tabs sql=".$sql); + dol_syslog(get_class($this)."::delete_tabs", LOG_DEBUG); if (! $this->db->query($sql)) { $this->error=$this->db->lasterror(); @@ -722,7 +722,7 @@ abstract class DolibarrModules $sql.= ", ".$conf->entity; $sql.= ")"; - dol_syslog(get_class($this)."::insert_tabs sql=".$sql); + dol_syslog(get_class($this)."::insert_tabs", LOG_DEBUG); $resql=$this->db->query($sql); /* Allow duplicate key if (! $resql) @@ -784,7 +784,7 @@ abstract class DolibarrModules $sql.= ")"; - dol_syslog(get_class($this)."::insert_const sql=".$sql); + dol_syslog(get_class($this)."::insert_const", LOG_DEBUG); if (! $this->db->query($sql) ) { dol_syslog(get_class($this)."::insert_const ".$this->db->lasterror(), LOG_ERR); @@ -826,7 +826,7 @@ abstract class DolibarrModules $sql = "DELETE FROM ".MAIN_DB_PREFIX."const"; $sql.= " WHERE ".$this->db->decrypt('name')." = '".$name."'"; $sql.= " AND entity in (0, ".$conf->entity.")"; - dol_syslog(get_class($this)."::delete_const sql=".$sql); + dol_syslog(get_class($this)."::delete_const", LOG_DEBUG); if (! $this->db->query($sql)) { $this->error=$this->db->lasterror(); @@ -904,7 +904,7 @@ abstract class DolibarrModules $sql .= "(".$r_id.",".$entity.",'".$this->db->escape($r_desc)."','".$r_modul."','".$r_type."',".$r_def.")"; } - dol_syslog(get_class($this)."::insert_permissions sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::insert_permissions", LOG_DEBUG); $resqlinsert=$this->db->query($sql,1); if (! $resqlinsert) { @@ -927,7 +927,7 @@ abstract class DolibarrModules require DOL_DOCUMENT_ROOT.'/user/class/user.class.php'; } $sql="SELECT rowid FROM ".MAIN_DB_PREFIX."user WHERE admin = 1"; - dol_syslog(get_class($this)."::insert_permissions Search all admin users sql=".$sql); + dol_syslog(get_class($this)."::insert_permissions Search all admin users", LOG_DEBUG); $resqlseladmin=$this->db->query($sql,1); if ($resqlseladmin) { @@ -982,7 +982,7 @@ abstract class DolibarrModules $sql = "DELETE FROM ".MAIN_DB_PREFIX."rights_def"; $sql.= " WHERE module = '".$this->rights_class."'"; $sql.= " AND entity = ".$conf->entity; - dol_syslog(get_class($this)."::delete_permissions sql=".$sql); + dol_syslog(get_class($this)."::delete_permissions", LOG_DEBUG); if (! $this->db->query($sql)) { $this->error=$this->db->lasterror(); @@ -1113,7 +1113,7 @@ abstract class DolibarrModules $sql.= " WHERE module = '".$this->db->escape($this->rights_class)."'"; $sql.= " AND entity = ".$conf->entity; - dol_syslog(get_class($this)."::delete_menus sql=".$sql); + dol_syslog(get_class($this)."::delete_menus", LOG_DEBUG); $resql=$this->db->query($sql); if (! $resql) { @@ -1201,7 +1201,7 @@ abstract class DolibarrModules $sql.= " WHERE ".$this->db->decrypt('name')." = '".$name."'"; $sql.= " AND entity = ".$conf->entity; - dol_syslog(get_class($this)."::insert_dirs sql=".$sql); + dol_syslog(get_class($this)."::insert_dirs", LOG_DEBUG); $result=$this->db->query($sql); if ($result) { @@ -1212,7 +1212,7 @@ abstract class DolibarrModules $sql = "INSERT INTO ".MAIN_DB_PREFIX."const (name,type,value,note,visible,entity)"; $sql.= " VALUES (".$this->db->encrypt($name,1).",'chaine',".$this->db->encrypt($dir,1).",'Directory for module ".$this->name."','0',".$conf->entity.")"; - dol_syslog(get_class($this)."::insert_dirs sql=".$sql); + dol_syslog(get_class($this)."::insert_dirs", LOG_DEBUG); $resql=$this->db->query($sql); } } @@ -1242,7 +1242,7 @@ abstract class DolibarrModules $sql.= " WHERE ".$this->db->decrypt('name')." LIKE '".$this->const_name."_DIR_%'"; $sql.= " AND entity = ".$conf->entity; - dol_syslog(get_class($this)."::delete_dirs sql=".$sql); + dol_syslog(get_class($this)."::delete_dirs", LOG_DEBUG); if (! $this->db->query($sql)) { $this->error=$this->db->lasterror(); @@ -1319,7 +1319,7 @@ abstract class DolibarrModules $sql.= ", ".$entity; $sql.= ")"; - dol_syslog(get_class($this)."::insert_const_".$key." sql=".$sql); + dol_syslog(get_class($this)."::insert_const_".$key."", LOG_DEBUG); $resql=$this->db->query($sql,1); if (! $resql) { @@ -1362,7 +1362,7 @@ abstract class DolibarrModules $sql.= " WHERE ".$this->db->decrypt('name')." LIKE '".$this->const_name."_".strtoupper($key)."'"; $sql.= " AND entity = ".$entity; - dol_syslog(get_class($this)."::delete_const_".$key." sql=".$sql); + dol_syslog(get_class($this)."::delete_const_".$key."", LOG_DEBUG); if (! $this->db->query($sql)) { $this->error=$this->db->lasterror(); diff --git a/htdocs/core/modules/action/rapport.pdf.php b/htdocs/core/modules/action/rapport.pdf.php index b864205f2c9..7b539f92494 100644 --- a/htdocs/core/modules/action/rapport.pdf.php +++ b/htdocs/core/modules/action/rapport.pdf.php @@ -186,7 +186,7 @@ class CommActionRapport $sql.= " AND '".$this->db->idate(dol_get_last_day($this->year,$this->month,false))."'"; $sql.= " ORDER BY a.datep DESC"; - dol_syslog(get_class($this)."::_page sql=".$sql); + dol_syslog(get_class($this)."::_page", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { diff --git a/htdocs/core/modules/commande/mod_commande_marbre.php b/htdocs/core/modules/commande/mod_commande_marbre.php index 8075099cdd6..92c8f55581c 100644 --- a/htdocs/core/modules/commande/mod_commande_marbre.php +++ b/htdocs/core/modules/commande/mod_commande_marbre.php @@ -119,7 +119,7 @@ class mod_commande_marbre extends ModeleNumRefCommandes } else { - dol_syslog("mod_commande_marbre::getNextValue sql=".$sql); + dol_syslog("mod_commande_marbre::getNextValue", LOG_DEBUG); return -1; } diff --git a/htdocs/core/modules/contract/mod_contract_serpis.php b/htdocs/core/modules/contract/mod_contract_serpis.php index a07f3261133..61ca01ae419 100644 --- a/htdocs/core/modules/contract/mod_contract_serpis.php +++ b/htdocs/core/modules/contract/mod_contract_serpis.php @@ -116,7 +116,7 @@ class mod_contract_serpis extends ModelNumRefContracts } else { - dol_syslog("mod_contract_serpis::getNextValue sql=".$sql); + dol_syslog("mod_contract_serpis::getNextValue", LOG_DEBUG); return -1; } diff --git a/htdocs/core/modules/expedition/mod_expedition_safor.php b/htdocs/core/modules/expedition/mod_expedition_safor.php index ba779658051..581657c6547 100644 --- a/htdocs/core/modules/expedition/mod_expedition_safor.php +++ b/htdocs/core/modules/expedition/mod_expedition_safor.php @@ -116,7 +116,7 @@ class mod_expedition_safor extends ModelNumRefExpedition } else { - dol_syslog("mod_expedition_safor::getNextValue sql=".$sql); + dol_syslog("mod_expedition_safor::getNextValue", LOG_DEBUG); return -1; } diff --git a/htdocs/core/modules/facture/mod_facture_mars.php b/htdocs/core/modules/facture/mod_facture_mars.php index f1a46913e25..100b9193fd5 100644 --- a/htdocs/core/modules/facture/mod_facture_mars.php +++ b/htdocs/core/modules/facture/mod_facture_mars.php @@ -144,7 +144,7 @@ class mod_facture_mars extends ModeleNumRefFactures $sql.= " AND entity = ".$conf->entity; $resql=$db->query($sql); - dol_syslog(get_class($this)."::getNextValue sql=".$sql); + dol_syslog(get_class($this)."::getNextValue", LOG_DEBUG); if ($resql) { $obj = $db->fetch_object($resql); @@ -168,7 +168,7 @@ class mod_facture_mars extends ModeleNumRefFactures $sql.= " WHERE facnumber LIKE '".$prefix."____-".$num."'"; $sql.= " AND entity = ".$conf->entity; - dol_syslog(get_class($this)."::getNextValue sql=".$sql); + dol_syslog(get_class($this)."::getNextValue", LOG_DEBUG); $resql=$db->query($sql); if ($resql) { diff --git a/htdocs/core/modules/facture/mod_facture_terre.php b/htdocs/core/modules/facture/mod_facture_terre.php index 9a8b5feaed7..6270bb9ae9c 100644 --- a/htdocs/core/modules/facture/mod_facture_terre.php +++ b/htdocs/core/modules/facture/mod_facture_terre.php @@ -160,7 +160,7 @@ class mod_facture_terre extends ModeleNumRefFactures $sql.= " AND entity = ".$conf->entity; $resql=$db->query($sql); - dol_syslog(get_class($this)."::getNextValue sql=".$sql); + dol_syslog(get_class($this)."::getNextValue", LOG_DEBUG); if ($resql) { $obj = $db->fetch_object($resql); @@ -184,7 +184,7 @@ class mod_facture_terre extends ModeleNumRefFactures $sql.= " WHERE facnumber LIKE '".$prefix."____-".$num."'"; $sql.= " AND entity = ".$conf->entity; - dol_syslog(get_class($this)."::getNextValue sql=".$sql); + dol_syslog(get_class($this)."::getNextValue", LOG_DEBUG); $resql=$db->query($sql); if ($resql) { diff --git a/htdocs/core/modules/import/import_csv.modules.php b/htdocs/core/modules/import/import_csv.modules.php index e83f812e8c4..cd3d82576ff 100644 --- a/htdocs/core/modules/import/import_csv.modules.php +++ b/htdocs/core/modules/import/import_csv.modules.php @@ -621,7 +621,7 @@ class ImportCsv extends ModeleImports } if (! empty($objimport->array_import_tables_creator[0][$alias])) $sql.=', '.$user->id; $sql.=')'; - dol_syslog("import_csv.modules sql=".$sql); + dol_syslog("import_csv.modules", LOG_DEBUG); //print '> '.join(',',$arrayrecord); //print 'sql='.$sql; diff --git a/htdocs/core/modules/livraison/mod_livraison_jade.php b/htdocs/core/modules/livraison/mod_livraison_jade.php index 77ca85f8e6c..e7cd8c926ac 100644 --- a/htdocs/core/modules/livraison/mod_livraison_jade.php +++ b/htdocs/core/modules/livraison/mod_livraison_jade.php @@ -118,7 +118,7 @@ class mod_livraison_jade extends ModeleNumRefDeliveryOrder $sql.= " AND entity = ".$conf->entity; $resql=$db->query($sql); - dol_syslog("mod_livraison_jade::getNextValue sql=".$sql); + dol_syslog("mod_livraison_jade::getNextValue", LOG_DEBUG); if ($resql) { $obj = $db->fetch_object($resql); diff --git a/htdocs/core/modules/mailings/fraise.modules.php b/htdocs/core/modules/mailings/fraise.modules.php index 0e79a1f6e91..a9df6300f80 100644 --- a/htdocs/core/modules/mailings/fraise.modules.php +++ b/htdocs/core/modules/mailings/fraise.modules.php @@ -180,7 +180,7 @@ class mailing_fraise extends MailingTargets //print $sql; // Add targets into table - dol_syslog(get_class($this)."::add_to_target sql=".$sql); + dol_syslog(get_class($this)."::add_to_target", LOG_DEBUG); $result=$this->db->query($sql); if ($result) { diff --git a/htdocs/core/modules/project/mod_project_simple.php b/htdocs/core/modules/project/mod_project_simple.php index da1c914f484..17ae9f29ddf 100644 --- a/htdocs/core/modules/project/mod_project_simple.php +++ b/htdocs/core/modules/project/mod_project_simple.php @@ -122,7 +122,7 @@ class mod_project_simple extends ModeleNumRefProjects } else { - dol_syslog("mod_project_simple::getNextValue sql=".$sql); + dol_syslog("mod_project_simple::getNextValue", LOG_DEBUG); return -1; } diff --git a/htdocs/core/modules/project/task/mod_task_simple.php b/htdocs/core/modules/project/task/mod_task_simple.php index afc17d663c0..eb8928d3b8f 100644 --- a/htdocs/core/modules/project/task/mod_task_simple.php +++ b/htdocs/core/modules/project/task/mod_task_simple.php @@ -122,7 +122,7 @@ class mod_task_simple extends ModeleNumRefTask } else { - dol_syslog("mod_task_simple::getNextValue sql=".$sql); + dol_syslog("mod_task_simple::getNextValue", LOG_DEBUG); return -1; } diff --git a/htdocs/core/modules/propale/mod_propale_marbre.php b/htdocs/core/modules/propale/mod_propale_marbre.php index aa2959691e6..ff38bc5f9cb 100644 --- a/htdocs/core/modules/propale/mod_propale_marbre.php +++ b/htdocs/core/modules/propale/mod_propale_marbre.php @@ -124,7 +124,7 @@ class mod_propale_marbre extends ModeleNumRefPropales } else { - dol_syslog("mod_propale_marbre::getNextValue sql=".$sql); + dol_syslog("mod_propale_marbre::getNextValue", LOG_DEBUG); return -1; } diff --git a/htdocs/core/modules/rapport/pdf_paiement.class.php b/htdocs/core/modules/rapport/pdf_paiement.class.php index d0defd260dd..78e8998f7d6 100644 --- a/htdocs/core/modules/rapport/pdf_paiement.class.php +++ b/htdocs/core/modules/rapport/pdf_paiement.class.php @@ -156,7 +156,7 @@ class pdf_paiement if (! empty($socid)) $sql .= " AND s.rowid = ".$socid; $sql.= " ORDER BY p.datep ASC, pf.fk_paiement ASC"; - dol_syslog(get_class($this)."::write_file sql=".$sql); + dol_syslog(get_class($this)."::write_file", LOG_DEBUG); $result = $this->db->query($sql); if ($result) { diff --git a/htdocs/core/modules/societe/mod_codeclient_monkey.php b/htdocs/core/modules/societe/mod_codeclient_monkey.php index 8b31e581e26..8e2baa28c9f 100644 --- a/htdocs/core/modules/societe/mod_codeclient_monkey.php +++ b/htdocs/core/modules/societe/mod_codeclient_monkey.php @@ -225,7 +225,7 @@ class mod_codeclient_monkey extends ModeleThirdPartyCode $sql.= " AND entity IN (".getEntity('societe', 1).")"; if ($soc->id > 0) $sql.= " AND rowid <> ".$soc->id; - dol_syslog(get_class($this)."::verif_dispo sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::verif_dispo", LOG_DEBUG); $resql=$db->query($sql); if ($resql) { diff --git a/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_cactus.php b/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_cactus.php index 049c312e1ef..82961405825 100644 --- a/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_cactus.php +++ b/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_cactus.php @@ -118,7 +118,7 @@ class mod_facture_fournisseur_cactus extends ModeleNumRefSuppliersInvoices $sql.= " AND entity = ".$conf->entity; $resql=$db->query($sql); - dol_syslog(get_class($this)."::getNextValue sql=".$sql); + dol_syslog(get_class($this)."::getNextValue", LOG_DEBUG); if ($resql) { $obj = $db->fetch_object($resql); @@ -142,7 +142,7 @@ class mod_facture_fournisseur_cactus extends ModeleNumRefSuppliersInvoices $sql.= " WHERE ref LIKE '".$prefix."____-".$num."'"; $sql.= " AND entity = ".$conf->entity; - dol_syslog(get_class($this)."::getNextValue sql=".$sql); + dol_syslog(get_class($this)."::getNextValue", LOG_DEBUG); $resql=$db->query($sql); if ($resql) { diff --git a/htdocs/core/triggers/interface_50_modNotification_Notification.class.php b/htdocs/core/triggers/interface_50_modNotification_Notification.class.php index c035acac207..aff6e526b93 100644 --- a/htdocs/core/triggers/interface_50_modNotification_Notification.class.php +++ b/htdocs/core/triggers/interface_50_modNotification_Notification.class.php @@ -238,7 +238,7 @@ class InterfaceNotification $sql = "SELECT rowid, code, label, description, elementtype"; $sql.= " FROM ".MAIN_DB_PREFIX."c_action_trigger"; $sql.= $this->db->order("elementtype, code"); - dol_syslog("Get list of notifications sql=".$sql); + dol_syslog("Get list of notifications", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { diff --git a/htdocs/cron/class/cronjob.class.php b/htdocs/cron/class/cronjob.class.php index f1fc788a198..8b9704cfb83 100644 --- a/htdocs/cron/class/cronjob.class.php +++ b/htdocs/cron/class/cronjob.class.php @@ -224,7 +224,7 @@ class Cronjob extends CommonObject $this->db->begin(); - dol_syslog(get_class($this)."::create sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::create", LOG_DEBUG); $resql=$this->db->query($sql); if (! $resql) { $error++; $this->errors[]="Error ".$this->db->lasterror(); } @@ -309,7 +309,7 @@ class Cronjob extends CommonObject $sql.= " FROM ".MAIN_DB_PREFIX."cronjob as t"; $sql.= " WHERE t.rowid = ".$id; - dol_syslog(get_class($this)."::fetch sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::fetch", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -429,7 +429,7 @@ class Cronjob extends CommonObject $sql.= " WHERE ".implode(' AND ',$sqlwhere); } - dol_syslog(get_class($this)."::fetch_all sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::fetch_all", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -609,7 +609,7 @@ class Cronjob extends CommonObject $this->db->begin(); - dol_syslog(get_class($this)."::update sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::update", LOG_DEBUG); $resql = $this->db->query($sql); if (! $resql) { $error++; $this->errors[]="Error ".$this->db->lasterror(); } @@ -683,7 +683,7 @@ class Cronjob extends CommonObject $sql = "DELETE FROM ".MAIN_DB_PREFIX."cronjob"; $sql.= " WHERE rowid=".$this->id; - dol_syslog(get_class($this)."::delete sql=".$sql); + dol_syslog(get_class($this)."::delete", LOG_DEBUG); $resql = $this->db->query($sql); if (! $resql) { $error++; $this->errors[]="Error ".$this->db->lasterror(); } } @@ -816,7 +816,7 @@ class Cronjob extends CommonObject $sql.= " FROM ".MAIN_DB_PREFIX."cronjob as f"; $sql.= " WHERE f.rowid = ".$this->id; - dol_syslog(get_class($this)."::fetch sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::fetch", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { diff --git a/htdocs/ecm/class/ecmdirectory.class.php b/htdocs/ecm/class/ecmdirectory.class.php index ea29d822102..d5b46b90c08 100644 --- a/htdocs/ecm/class/ecmdirectory.class.php +++ b/htdocs/ecm/class/ecmdirectory.class.php @@ -142,7 +142,7 @@ class EcmDirectory // extends CommonObject $sql.= " '".$this->fk_user_c."'"; $sql.= ")"; - dol_syslog(get_class($this)."::create sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::create", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -210,7 +210,7 @@ class EcmDirectory // extends CommonObject $sql.= " description='".$this->db->escape($this->description)."'"; $sql.= " WHERE rowid=".$this->id; - dol_syslog(get_class($this)."::update sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::update", LOG_DEBUG); $resql = $this->db->query($sql); if (! $resql) { @@ -257,7 +257,7 @@ class EcmDirectory // extends CommonObject $sql.= " cachenbofdoc = cachenbofdoc ".$sign." 1"; $sql.= " WHERE rowid = ".$this->id; - dol_syslog(get_class($this)."::changeNbOfFiles sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::changeNbOfFiles", LOG_DEBUG); $resql = $this->db->query($sql); if (! $resql) { @@ -291,7 +291,7 @@ class EcmDirectory // extends CommonObject $sql.= " FROM ".MAIN_DB_PREFIX."ecm_directories as t"; $sql.= " WHERE t.rowid = ".$id; - dol_syslog(get_class($this)."::fetch sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::fetch", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -348,7 +348,7 @@ class EcmDirectory // extends CommonObject $sql = "DELETE FROM ".MAIN_DB_PREFIX."ecm_directories"; $sql.= " WHERE rowid=".$this->id; - dol_syslog(get_class($this)."::delete sql=".$sql); + dol_syslog(get_class($this)."::delete", LOG_DEBUG); $resql = $this->db->query($sql); if (! $resql) { @@ -499,7 +499,7 @@ class EcmDirectory // extends CommonObject $sql.= " WHERE fk_parent != 0"; $sql.= " AND entity = ".$conf->entity; - dol_syslog(get_class($this)."::load_motherof sql=".$sql); + dol_syslog(get_class($this)."::load_motherof", LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { @@ -563,7 +563,7 @@ class EcmDirectory // extends CommonObject $sql.= " AND c.entity = ".$conf->entity; $sql.= " ORDER BY c.label, c.rowid"; - dol_syslog(get_class($this)."::get_full_arbo sql=".$sql); + dol_syslog(get_class($this)."::get_full_arbo", LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { @@ -688,7 +688,7 @@ class EcmDirectory // extends CommonObject $sql.= " WHERE entity = ".$conf->entity; } - dol_syslog(get_class($this)."::refreshcachenboffile sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::refreshcachenboffile", LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { diff --git a/htdocs/expedition/class/expedition.class.php b/htdocs/expedition/class/expedition.class.php index 5cf09642c68..585fb9f8a88 100644 --- a/htdocs/expedition/class/expedition.class.php +++ b/htdocs/expedition/class/expedition.class.php @@ -227,7 +227,7 @@ class Expedition extends CommonObject $sql.= ", ".(!empty($this->model_pdf)?"'".$this->db->escape($this->model_pdf)."'":"null"); $sql.= ")"; - dol_syslog(get_class($this)."::create sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::create", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -237,7 +237,7 @@ class Expedition extends CommonObject $sql.= " SET ref = '(PROV".$this->id.")'"; $sql.= " WHERE rowid = ".$this->id; - dol_syslog(get_class($this)."::create sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::create", LOG_DEBUG); if ($this->db->query($sql)) { // Insertion des lignes @@ -334,7 +334,7 @@ class Expedition extends CommonObject $sql.= ", ".$qty; $sql.= ")"; - dol_syslog(get_class($this)."::create_line sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::create_line", LOG_DEBUG); if (! $this->db->query($sql)) { $error++; @@ -399,7 +399,7 @@ class Expedition extends CommonObject if ($ref_ext) $sql.= " AND e.ref_ext='".$this->db->escape($ref_ext)."'"; if ($ref_int) $sql.= " AND e.ref_int='".$this->db->escape($ref_int)."'"; - dol_syslog(get_class($this)."::fetch sql=".$sql); + dol_syslog(get_class($this)."::fetch", LOG_DEBUG); $result = $this->db->query($sql); if ($result) { @@ -545,7 +545,7 @@ class Expedition extends CommonObject $sql.= ", fk_user_valid = ".$user->id; $sql.= " WHERE rowid = ".$this->id; - dol_syslog(get_class($this)."::valid update expedition sql=".$sql); + dol_syslog(get_class($this)."::valid update expedition", LOG_DEBUG); $resql=$this->db->query($sql); if (! $resql) { @@ -569,7 +569,7 @@ class Expedition extends CommonObject $sql.= " WHERE ed.fk_expedition = ".$this->id; $sql.= " AND cd.rowid = ed.fk_origin_line"; - dol_syslog(get_class($this)."::valid select details sql=".$sql); + dol_syslog(get_class($this)."::valid select details", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -846,7 +846,7 @@ class Expedition extends CommonObject $this->db->begin(); - dol_syslog(get_class($this)."::update sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::update", LOG_DEBUG); $resql = $this->db->query($sql); if (! $resql) { $error++; $this->errors[]="Error ".$this->db->lasterror(); } @@ -922,7 +922,7 @@ class Expedition extends CommonObject $sql.= " WHERE ed.fk_expedition = ".$this->id; $sql.= " AND cd.rowid = ed.fk_origin_line"; - dol_syslog(get_class($this)."::delete select details sql=".$sql); + dol_syslog(get_class($this)."::delete select details", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -1062,7 +1062,7 @@ class Expedition extends CommonObject $sql.= " WHERE ed.fk_expedition = ".$this->id; $sql.= " AND ed.fk_origin_line = cd.rowid"; - dol_syslog(get_class($this)."::fetch_lines sql=".$sql); + dol_syslog(get_class($this)."::fetch_lines", LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { @@ -1324,7 +1324,7 @@ class Expedition extends CommonObject $sql.= " SET date_delivery = ".($date_livraison ? "'".$this->db->idate($date_livraison)."'" : 'null'); $sql.= " WHERE rowid = ".$this->id; - dol_syslog(get_class($this)."::set_date_livraison sql=".$sql,LOG_DEBUG); + dol_syslog(get_class($this)."::set_date_livraison", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { diff --git a/htdocs/expedition/class/expeditionbatch.class.php b/htdocs/expedition/class/expeditionbatch.class.php index 7bbd99706bd..a0a22fefdd6 100644 --- a/htdocs/expedition/class/expeditionbatch.class.php +++ b/htdocs/expedition/class/expeditionbatch.class.php @@ -69,7 +69,7 @@ class ExpeditionLigneBatch extends CommonObject $sql.= MAIN_DB_PREFIX."product_stock as e on t.fk_product_stock=e.rowid "; $sql.= " WHERE t.rowid = ".(int) $id_stockdluo; - dol_syslog(get_class($this)."::fetch sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::fetch", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -123,7 +123,7 @@ class ExpeditionLigneBatch extends CommonObject $sql.= " ".(! isset($this->fk_origin_stock)?'NULL':$this->fk_origin_stock); $sql.= ")"; - dol_syslog(__METHOD__ ." sql=".$sql, LOG_DEBUG); + dol_syslog(__METHOD__ ."", LOG_DEBUG); $resql=$this->db->query($sql); if (! $resql) { $error++; $this->errors[]="Error ".$this->db->lasterror(); } @@ -157,7 +157,7 @@ class ExpeditionLigneBatch extends CommonObject $sql="DELETE FROM ".MAIN_DB_PREFIX.self::$_table_element; $sql.=" WHERE fk_expeditiondet in (SELECT rowid FROM ".MAIN_DB_PREFIX."expeditiondet WHERE fk_expedition=".$id_expedition.")"; - dol_syslog(__METHOD__ ." sql=".$sql, LOG_DEBUG); + dol_syslog(__METHOD__ ."", LOG_DEBUG); if ( $db->query($sql) ) { return 1; @@ -185,7 +185,7 @@ class ExpeditionLigneBatch extends CommonObject $sql.= " FROM ".MAIN_DB_PREFIX.self::$_table_element; $sql.= " WHERE fk_expeditiondet=".(int) $id_line_expdet; - dol_syslog(__METHOD__ ." sql=".$sql, LOG_DEBUG); + dol_syslog(__METHOD__ ."", LOG_DEBUG); $resql=$db->query($sql); if ($resql) { diff --git a/htdocs/expedition/shipment.php b/htdocs/expedition/shipment.php index fce9c3bf6a5..d44a7d5f4a4 100644 --- a/htdocs/expedition/shipment.php +++ b/htdocs/expedition/shipment.php @@ -363,7 +363,7 @@ if ($id > 0 || ! empty($ref)) $sql.= " ORDER BY cd.rang, cd.rowid"; //print $sql; - dol_syslog("shipment.php sql=".$sql, LOG_DEBUG); + dol_syslog("shipment.php", LOG_DEBUG); $resql = $db->query($sql); if ($resql) { diff --git a/htdocs/exports/class/export.class.php b/htdocs/exports/class/export.class.php index fda062952d1..3c7f9a14902 100644 --- a/htdocs/exports/class/export.class.php +++ b/htdocs/exports/class/export.class.php @@ -519,7 +519,7 @@ class Export // Run the sql $this->sqlusedforexport=$sql; - dol_syslog(get_class($this)."::".__FUNCTION__." sql=".$sql); + dol_syslog(get_class($this)."::".__FUNCTION__."", LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { @@ -628,7 +628,7 @@ class Export $sql.= (! empty($filter)?"'".$filter."'":"null"); $sql.= ")"; - dol_syslog("Export::create sql=".$sql, LOG_DEBUG); + dol_syslog("Export::create", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -657,7 +657,7 @@ class Export $sql.= ' FROM '.MAIN_DB_PREFIX.'export_model as em'; $sql.= ' WHERE em.rowid = '.$id; - dol_syslog("Export::fetch sql=".$sql, LOG_DEBUG); + dol_syslog("Export::fetch", LOG_DEBUG); $result = $this->db->query($sql); if ($result) { @@ -706,7 +706,7 @@ class Export $this->db->begin(); - dol_syslog(get_class($this)."::delete sql=".$sql); + dol_syslog(get_class($this)."::delete", LOG_DEBUG); $resql = $this->db->query($sql); if (! $resql) { $error++; $this->errors[]="Error ".$this->db->lasterror(); } diff --git a/htdocs/fichinter/class/fichinter.class.php b/htdocs/fichinter/class/fichinter.class.php index 52585d29122..72d20443d8f 100644 --- a/htdocs/fichinter/class/fichinter.class.php +++ b/htdocs/fichinter/class/fichinter.class.php @@ -151,7 +151,7 @@ class Fichinter extends CommonObject $sql.= ", ".($this->note_public?"'".$this->db->escape($this->note_public)."'":"null"); $sql.= ")"; - dol_syslog(get_class($this)."::create sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::create", LOG_DEBUG); $result=$this->db->query($sql); if ($result) { @@ -162,7 +162,7 @@ class Fichinter extends CommonObject $this->ref='(PROV'.$this->id.')'; $sql = 'UPDATE '.MAIN_DB_PREFIX."fichinter SET ref='".$this->ref."' WHERE rowid=".$this->id; - dol_syslog(get_class($this)."::create sql=".$sql); + dol_syslog(get_class($this)."::create", LOG_DEBUG); $resql=$this->db->query($sql); if (! $resql) $error++; } @@ -234,7 +234,7 @@ class Fichinter extends CommonObject $sql.= ", note_public = ".($this->note_public?"'".$this->db->escape($this->note_public)."'":"null"); $sql.= " WHERE rowid = ".$this->id; - dol_syslog(get_class($this)."::update sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::update", LOG_DEBUG); if ($this->db->query($sql)) { @@ -280,7 +280,7 @@ class Fichinter extends CommonObject if ($ref) $sql.= " WHERE f.ref='".$this->db->escape($ref)."'"; else $sql.= " WHERE f.rowid=".$rowid; - dol_syslog(get_class($this)."::fetch sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::fetch", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -350,7 +350,7 @@ class Fichinter extends CommonObject $sql.= " WHERE rowid = ".$this->id; $sql.= " AND entity = ".$conf->entity; - dol_syslog("Fichinter::setDraft sql=".$sql); + dol_syslog("Fichinter::setDraft", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -405,7 +405,7 @@ class Fichinter extends CommonObject $sql.= " AND entity = ".$conf->entity; $sql.= " AND fk_statut = 0"; - dol_syslog(get_class($this)."::setValid sql=".$sql); + dol_syslog(get_class($this)."::setValid", LOG_DEBUG); $resql=$this->db->query($sql); if (! $resql) { @@ -723,14 +723,14 @@ class Fichinter extends CommonObject $sql = "DELETE FROM ".MAIN_DB_PREFIX."fichinterdet"; $sql.= " WHERE fk_fichinter = ".$this->id; - dol_syslog("Fichinter::delete sql=".$sql); + dol_syslog("Fichinter::delete", LOG_DEBUG); if ( $this->db->query($sql) ) { $sql = "DELETE FROM ".MAIN_DB_PREFIX."fichinter"; $sql.= " WHERE rowid = ".$this->id; $sql.= " AND entity = ".$conf->entity; - dol_syslog("Fichinter::delete sql=".$sql); + dol_syslog("Fichinter::delete", LOG_DEBUG); if ( $this->db->query($sql) ) { @@ -982,7 +982,7 @@ class Fichinter extends CommonObject $sql.= ' FROM '.MAIN_DB_PREFIX.'fichinterdet'; $sql.= ' WHERE fk_fichinter = '.$this->id; - dol_syslog(get_class($this)."::fetch_lines sql=".$sql); + dol_syslog(get_class($this)."::fetch_lines", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -1057,7 +1057,7 @@ class FichinterLigne $sql.= ' FROM '.MAIN_DB_PREFIX.'fichinterdet as ft'; $sql.= ' WHERE ft.rowid = '.$rowid; - dol_syslog("FichinterLigne::fetch sql=".$sql); + dol_syslog("FichinterLigne::fetch", LOG_DEBUG); $result = $this->db->query($sql); if ($result) { @@ -1125,7 +1125,7 @@ class FichinterLigne $sql.= ' '.$rangToUse; $sql.= ')'; - dol_syslog("FichinterLigne::insert sql=".$sql); + dol_syslog("FichinterLigne::insert", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -1188,7 +1188,7 @@ class FichinterLigne $sql.= ",rang='".$this->rang."'"; $sql.= " WHERE rowid = ".$this->rowid; - dol_syslog("FichinterLigne::update sql=".$sql); + dol_syslog("FichinterLigne::update", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -1246,7 +1246,7 @@ class FichinterLigne $sql.= " FROM ".MAIN_DB_PREFIX."fichinterdet"; $sql.= " WHERE fk_fichinter=".$this->fk_fichinter; - dol_syslog("FichinterLigne::update_total sql=".$sql); + dol_syslog("FichinterLigne::update_total", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -1259,7 +1259,7 @@ class FichinterLigne $sql.= " WHERE rowid = ".$this->fk_fichinter; $sql.= " AND entity = ".$conf->entity; - dol_syslog("FichinterLigne::update_total sql=".$sql); + dol_syslog("FichinterLigne::update_total", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -1301,7 +1301,7 @@ class FichinterLigne $sql = "DELETE FROM ".MAIN_DB_PREFIX."fichinterdet WHERE rowid = ".$this->rowid; $resql = $this->db->query($sql); - dol_syslog(get_class($this)."::deleteline sql=".$sql); + dol_syslog(get_class($this)."::deleteline", LOG_DEBUG); if ($resql) { diff --git a/htdocs/fourn/ajax/getSupplierPrices.php b/htdocs/fourn/ajax/getSupplierPrices.php index bbe3aeba4dc..fc891af53a3 100644 --- a/htdocs/fourn/ajax/getSupplierPrices.php +++ b/htdocs/fourn/ajax/getSupplierPrices.php @@ -58,7 +58,7 @@ if (! empty($idprod)) $sql.= " AND s.fournisseur = 1"; $sql.= " ORDER BY s.nom, pfp.ref_fourn DESC"; - dol_syslog("Ajax::getSupplierPrices sql=".$sql, LOG_DEBUG); + dol_syslog("Ajax::getSupplierPrices", LOG_DEBUG); $result=$db->query($sql); if ($result) diff --git a/htdocs/fourn/class/fournisseur.class.php b/htdocs/fourn/class/fournisseur.class.php index f557573fdfc..71942a27f97 100644 --- a/htdocs/fourn/class/fournisseur.class.php +++ b/htdocs/fourn/class/fournisseur.class.php @@ -157,7 +157,7 @@ class Fournisseur extends Societe $sql.= " VALUES "; $sql.= " ('".$this->db->escape($name)."',1,1)"; - dol_syslog("Fournisseur::CreateCategory sql=".$sql); + dol_syslog("Fournisseur::CreateCategory", LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index 591fce671b1..a9b4a5b90b1 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -138,7 +138,7 @@ class CommandeFournisseur extends CommonOrder if ($ref) $sql.= " AND c.ref='".$ref."'"; else $sql.= " AND c.rowid=".$id; - dol_syslog(get_class($this)."::fetch sql=".$sql,LOG_DEBUG); + dol_syslog(get_class($this)."::fetch", LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { @@ -207,7 +207,7 @@ class CommandeFournisseur extends CommonOrder $sql.= " ORDER BY l.rowid"; //print $sql; - dol_syslog(get_class($this)."::fetch get lines sql=".$sql,LOG_DEBUG); + dol_syslog(get_class($this)."::fetch get lines", LOG_DEBUG); $result = $this->db->query($sql); if ($result) { @@ -288,7 +288,7 @@ class CommandeFournisseur extends CommonOrder $sql.= ($comment?"'".$this->db->escape($comment)."'":'null'); $sql.= ")"; - dol_syslog("FournisseurCommande::log sql=".$sql, LOG_DEBUG); + dol_syslog("FournisseurCommande::log", LOG_DEBUG); if ( $this->db->query($sql) ) { return 1; @@ -756,7 +756,7 @@ class CommandeFournisseur extends CommonOrder $sql = "UPDATE ".MAIN_DB_PREFIX."commande_fournisseur SET fk_statut = ".$statut; $sql .= " WHERE rowid = ".$this->id; - dol_syslog(get_class($this)."::cancel sql=".$sql); + dol_syslog(get_class($this)."::cancel", LOG_DEBUG); if ($this->db->query($sql)) { $result = 0; @@ -815,7 +815,7 @@ class CommandeFournisseur extends CommonOrder $sql = "UPDATE ".MAIN_DB_PREFIX."commande_fournisseur SET fk_statut = 3, fk_input_method=".$methode.",date_commande=".$this->db->idate("$date"); $sql .= " WHERE rowid = ".$this->id; - dol_syslog(get_class($this)."::commande sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::commande", LOG_DEBUG); if ($this->db->query($sql)) { $result = 1; @@ -889,7 +889,7 @@ class CommandeFournisseur extends CommonOrder $sql.= ", ".($this->cond_reglement_id > 0 ? $this->cond_reglement_id : 'null'); $sql.= ")"; - dol_syslog(get_class($this)."::create sql=".$sql); + dol_syslog(get_class($this)."::create", LOG_DEBUG); if ($this->db->query($sql)) { $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."commande_fournisseur"); @@ -928,7 +928,7 @@ class CommandeFournisseur extends CommonOrder $sql = "UPDATE ".MAIN_DB_PREFIX."commande_fournisseur"; $sql.= " SET ref='(PROV".$this->id.")'"; $sql.= " WHERE rowid=".$this->id; - dol_syslog(get_class($this)."::create sql=".$sql); + dol_syslog(get_class($this)."::create", LOG_DEBUG); if ($this->db->query($sql)) { // On logue creation pour historique @@ -1198,7 +1198,7 @@ class CommandeFournisseur extends CommonOrder $sql.= "'".price2num($total_ttc)."'"; $sql.= ")"; - dol_syslog(get_class($this)."::addline sql=".$sql); + dol_syslog(get_class($this)."::addline", LOG_DEBUG); $resql=$this->db->query($sql); //print $sql; if ($resql) @@ -1269,7 +1269,7 @@ class CommandeFournisseur extends CommonOrder $sql.= " (fk_commande,fk_product, qty, fk_entrepot, fk_user, datec) VALUES "; $sql.= " ('".$this->id."','".$product."','".$qty."',".($entrepot>0?"'".$entrepot."'":"null").",'".$user->id."','".$this->db->idate($now)."')"; - dol_syslog(get_class($this)."::DispatchProduct sql=".$sql); + dol_syslog(get_class($this)."::DispatchProduct", LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { @@ -1342,7 +1342,7 @@ class CommandeFournisseur extends CommonOrder $sql = "DELETE FROM ".MAIN_DB_PREFIX."commande_fournisseurdet WHERE rowid = ".$idline; $resql=$this->db->query($sql); - dol_syslog(get_class($this)."::deleteline sql=".$sql); + dol_syslog(get_class($this)."::deleteline", LOG_DEBUG); if (!$notrigger && $resql) { @@ -1390,14 +1390,14 @@ class CommandeFournisseur extends CommonOrder $this->db->begin(); $sql = "DELETE FROM ".MAIN_DB_PREFIX."commande_fournisseurdet WHERE fk_commande =". $this->id ; - dol_syslog(get_class($this)."::delete sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::delete", LOG_DEBUG); if (! $this->db->query($sql) ) { $error++; } $sql = "DELETE FROM ".MAIN_DB_PREFIX."commande_fournisseur WHERE rowid =".$this->id; - dol_syslog(get_class($this)."::delete sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::delete", LOG_DEBUG); if ($resql = $this->db->query($sql) ) { if ($this->db->affected_rows($resql) < 1) @@ -1540,7 +1540,7 @@ class CommandeFournisseur extends CommonOrder $sql.= " WHERE rowid = ".$this->id; $sql.= " AND fk_statut IN (3,4)"; // Process running or Partially received - dol_syslog(get_class($this)."::Livraison sql=".$sql); + dol_syslog(get_class($this)."::Livraison", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -1586,7 +1586,7 @@ class CommandeFournisseur extends CommonOrder $sql.= " SET date_livraison = ".($date_livraison ? "'".$this->db->idate($date_livraison)."'" : 'null'); $sql.= " WHERE rowid = ".$this->id; - dol_syslog(get_class($this)."::set_date_livraison sql=".$sql,LOG_DEBUG); + dol_syslog(get_class($this)."::set_date_livraison", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -1666,7 +1666,7 @@ class CommandeFournisseur extends CommonOrder $sql.= ' SET fk_statut='.$status; $sql.= ' WHERE rowid = '.$this->id; - dol_syslog(get_class($this)."::setStatus sql=".$sql); + dol_syslog(get_class($this)."::setStatus", LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { @@ -1781,7 +1781,7 @@ class CommandeFournisseur extends CommonOrder $sql.= ",product_type=".$type; $sql.= " WHERE rowid = ".$rowid; - dol_syslog(get_class($this)."::updateline sql=".$sql); + dol_syslog(get_class($this)."::updateline", LOG_DEBUG); $result = $this->db->query($sql); if ($result > 0) { diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php index a9619a33902..a5eb09f43f7 100644 --- a/htdocs/fourn/class/fournisseur.facture.class.php +++ b/htdocs/fourn/class/fournisseur.facture.class.php @@ -196,7 +196,7 @@ class FactureFournisseur extends CommonInvoice $sql.= $this->date_echeance!=''?"'".$this->db->idate($this->date_echeance)."'":"null"; $sql.= ")"; - dol_syslog(get_class($this)."::create sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::create", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -206,7 +206,7 @@ class FactureFournisseur extends CommonInvoice $this->ref='(PROV'.$this->id.')'; $sql = 'UPDATE '.MAIN_DB_PREFIX."facture_fourn SET ref='".$this->ref."' WHERE rowid=".$this->id; - dol_syslog(get_class($this)."::create sql=".$sql); + dol_syslog(get_class($this)."::create", LOG_DEBUG); $resql=$this->db->query($sql); if (! $resql) $error++; @@ -226,7 +226,7 @@ class FactureFournisseur extends CommonInvoice $sql = 'INSERT INTO '.MAIN_DB_PREFIX.'facture_fourn_det (fk_facture_fourn)'; $sql .= ' VALUES ('.$this->id.');'; - dol_syslog(get_class($this)."::create sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::create", LOG_DEBUG); $resql_insert=$this->db->query($sql); if ($resql_insert) { @@ -350,7 +350,7 @@ class FactureFournisseur extends CommonInvoice if ($id) $sql.= " WHERE t.rowid=".$id; if ($ref) $sql.= " WHERE t.ref='".$this->db->escape($ref)."'"; - dol_syslog(get_class($this)."::fetch sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::fetch", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -453,7 +453,7 @@ class FactureFournisseur extends CommonInvoice $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'product as p ON f.fk_product = p.rowid'; $sql.= ' WHERE fk_facture_fourn='.$this->id; - dol_syslog(get_class($this)."::fetch_lines sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::fetch_lines", LOG_DEBUG); $resql_rows = $this->db->query($sql); if ($resql_rows) { @@ -591,7 +591,7 @@ class FactureFournisseur extends CommonInvoice $this->db->begin(); - dol_syslog(get_class($this)."::update sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::update", LOG_DEBUG); $resql = $this->db->query($sql); if (! $resql) { $error++; $this->errors[]="Error ".$this->db->lasterror(); } @@ -647,12 +647,12 @@ class FactureFournisseur extends CommonInvoice $this->db->begin(); $sql = 'DELETE FROM '.MAIN_DB_PREFIX.'facture_fourn_det WHERE fk_facture_fourn = '.$rowid.';'; - dol_syslog(get_class($this)."::delete sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::delete", LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { $sql = 'DELETE FROM '.MAIN_DB_PREFIX.'facture_fourn WHERE rowid = '.$rowid; - dol_syslog(get_class($this)."::delete sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::delete", LOG_DEBUG); $resql2 = $this->db->query($sql); if (! $resql2) { $error++; @@ -763,7 +763,7 @@ class FactureFournisseur extends CommonInvoice $sql.= ' SET paye = 1, fk_statut=2'; $sql.= ' WHERE rowid = '.$this->id; - dol_syslog("FactureFournisseur::set_paid sql=".$sql); + dol_syslog("FactureFournisseur::set_paid", LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { @@ -813,7 +813,7 @@ class FactureFournisseur extends CommonInvoice $sql.= ' SET paye=0, fk_statut=1, close_code=null, close_note=null'; $sql.= ' WHERE rowid = '.$this->id; - dol_syslog("FactureFournisseur::set_unpaid sql=".$sql); + dol_syslog("FactureFournisseur::set_unpaid", LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { @@ -891,7 +891,7 @@ class FactureFournisseur extends CommonInvoice $sql.= " SET ref='".$num."', fk_statut = 1, fk_user_valid = ".$user->id; $sql.= " WHERE rowid = ".$this->id; - dol_syslog(get_class($this)."::validate sql=".$sql); + dol_syslog(get_class($this)."::validate", LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { @@ -1011,7 +1011,7 @@ class FactureFournisseur extends CommonInvoice $sql.= " SET fk_statut = 0"; $sql.= " WHERE rowid = ".$this->id; - dol_syslog(get_class($this)."::set_draft sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::set_draft", LOG_DEBUG); $result=$this->db->query($sql); if ($result) { @@ -1110,7 +1110,7 @@ class FactureFournisseur extends CommonInvoice $sql = 'INSERT INTO '.MAIN_DB_PREFIX.'facture_fourn_det (fk_facture_fourn)'; $sql.= ' VALUES ('.$this->id.')'; - dol_syslog(get_class($this)."::addline sql=".$sql); + dol_syslog(get_class($this)."::addline", LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) @@ -1241,7 +1241,7 @@ class FactureFournisseur extends CommonInvoice $sql.= ", info_bits = ".$info_bits; $sql.= " WHERE rowid = ".$id; - dol_syslog(get_class($this)."::updateline sql=".$sql); + dol_syslog(get_class($this)."::updateline", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -1306,7 +1306,7 @@ class FactureFournisseur extends CommonInvoice // Supprime ligne $sql = 'DELETE FROM '.MAIN_DB_PREFIX.'facture_fourn_det '; $sql.= ' WHERE rowid = '.$rowid; - dol_syslog(get_class($this)."::delete sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::delete", LOG_DEBUG); $resql = $this->db->query($sql); if (! $resql) { diff --git a/htdocs/fourn/class/fournisseur.product.class.php b/htdocs/fourn/class/fournisseur.product.class.php index b642926f802..d72291c6038 100644 --- a/htdocs/fourn/class/fournisseur.product.class.php +++ b/htdocs/fourn/class/fournisseur.product.class.php @@ -83,7 +83,7 @@ class ProductFournisseur extends Product $sql = "DELETE FROM ".MAIN_DB_PREFIX."product_fournisseur_price"; $sql.= " WHERE fk_product = ".$this->id." AND fk_soc = ".$id_fourn; - dol_syslog(get_class($this)."::remove_fournisseur sql=".$sql); + dol_syslog(get_class($this)."::remove_fournisseur", LOG_DEBUG); $resql2=$this->db->query($sql); if (! $resql2) { @@ -120,7 +120,7 @@ class ProductFournisseur extends Product $sql = "DELETE FROM ".MAIN_DB_PREFIX."product_fournisseur_price"; $sql.= " WHERE rowid = ".$rowid; - dol_syslog(get_class($this)."::remove_product_fournisseur_price sql=".$sql); + dol_syslog(get_class($this)."::remove_product_fournisseur_price", LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { @@ -263,7 +263,7 @@ class ProductFournisseur extends Product $sql.= $conf->entity; $sql.=")"; - dol_syslog(get_class($this)."::update_buyprice sql=".$sql); + dol_syslog(get_class($this)."::update_buyprice", LOG_DEBUG); if (! $this->db->query($sql)) { $error++; @@ -340,7 +340,7 @@ class ProductFournisseur extends Product $sql.= " FROM ".MAIN_DB_PREFIX."product_fournisseur_price as pfp"; $sql.= " WHERE pfp.rowid = ".$rowid; - dol_syslog(get_class($this)."::fetch_product_fournisseur_price sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::fetch_product_fournisseur_price", LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { @@ -399,7 +399,7 @@ class ProductFournisseur extends Product $sql.= " AND pfp.fk_product = ".$prodid; if (empty($sortfield)) $sql.= " ORDER BY s.nom, pfp.quantity, pfp.price"; else $sql.= $this->db->order($sortfield,$sortorder); - dol_syslog(get_class($this)."::list_product_fournisseur_price sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::list_product_fournisseur_price", LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) @@ -488,7 +488,7 @@ class ProductFournisseur extends Product $sql.= " ORDER BY pfp.unitprice"; $sql.= $this->db->plimit(1); - dol_syslog(get_class($this)."::find_min_price_product_fournisseur sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::find_min_price_product_fournisseur", LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) diff --git a/htdocs/fourn/class/paiementfourn.class.php b/htdocs/fourn/class/paiementfourn.class.php index 69912e77cb0..3daee072886 100644 --- a/htdocs/fourn/class/paiementfourn.class.php +++ b/htdocs/fourn/class/paiementfourn.class.php @@ -149,7 +149,7 @@ class PaiementFourn extends Paiement $sql.= " VALUES ('".$this->db->idate($now)."',"; $sql.= " '".$this->db->idate($this->datepaye)."', '".$this->total."', ".$this->paiementid.", '".$this->num_paiement."', '".$this->db->escape($this->note)."', ".$user->id.", 0)"; - dol_syslog("PaiementFourn::create sql=".$sql); + dol_syslog("PaiementFourn::create", LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { diff --git a/htdocs/fourn/product/liste.php b/htdocs/fourn/product/liste.php index ffd413cbf2f..ec186cd8339 100644 --- a/htdocs/fourn/product/liste.php +++ b/htdocs/fourn/product/liste.php @@ -121,7 +121,7 @@ if ($fourn_id > 0) $sql .= " ORDER BY ".$sortfield." ".$sortorder; $sql .= $db->plimit($limit + 1, $offset); -dol_syslog("fourn/product/liste.php: sql=".$sql); +dol_syslog("fourn/product/liste.php:", LOG_DEBUG); $resql = $db->query($sql); if ($resql) { diff --git a/htdocs/ftp/admin/ftpclient.php b/htdocs/ftp/admin/ftpclient.php index 1ff142f7be7..3e9d2bfd590 100644 --- a/htdocs/ftp/admin/ftpclient.php +++ b/htdocs/ftp/admin/ftpclient.php @@ -218,7 +218,7 @@ else $sql.=" WHERE name like 'FTP_SERVER_%'"; $sql.=" ORDER BY name"; - dol_syslog("ftpclient select ftp setup sql=".$sql,LOG_DEBUG); + dol_syslog("ftpclient select ftp setup", LOG_DEBUG); $resql=$db->query($sql); if ($resql) { diff --git a/htdocs/holiday/class/holiday.class.php b/htdocs/holiday/class/holiday.class.php index dfa0e0d9b32..995f33e62ff 100644 --- a/htdocs/holiday/class/holiday.class.php +++ b/htdocs/holiday/class/holiday.class.php @@ -137,7 +137,7 @@ class Holiday extends CommonObject $this->db->begin(); - dol_syslog(get_class($this)."::create sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::create", LOG_DEBUG); $resql=$this->db->query($sql); if (! $resql) { $error++; $this->errors[]="Error ".$this->db->lasterror(); @@ -200,7 +200,7 @@ class Holiday extends CommonObject $sql.= " FROM ".MAIN_DB_PREFIX."holiday as cp"; $sql.= " WHERE cp.rowid = ".$id; - dol_syslog(get_class($this)."::fetch sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::fetch", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -294,7 +294,7 @@ class Holiday extends CommonObject $sql.= $order; } - dol_syslog(get_class($this)."::fetchByUser sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::fetchByUser", LOG_DEBUG); $resql=$this->db->query($sql); // Si pas d'erreur SQL @@ -405,7 +405,7 @@ class Holiday extends CommonObject $sql.= $order; } - dol_syslog(get_class($this)."::fetchAll sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::fetchAll", LOG_DEBUG); $resql=$this->db->query($sql); // Si pas d'erreur SQL @@ -544,7 +544,7 @@ class Holiday extends CommonObject $this->db->begin(); - dol_syslog(get_class($this)."::update sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::update", LOG_DEBUG); $resql = $this->db->query($sql); if (! $resql) { $error++; $this->errors[]="Error ".$this->db->lasterror(); @@ -591,7 +591,7 @@ class Holiday extends CommonObject $this->db->begin(); - dol_syslog(get_class($this)."::delete sql=".$sql); + dol_syslog(get_class($this)."::delete", LOG_DEBUG); $resql = $this->db->query($sql); if (! $resql) { $error++; $this->errors[]="Error ".$this->db->lasterror(); @@ -787,7 +787,7 @@ class Holiday extends CommonObject $sql.= " FROM ".MAIN_DB_PREFIX."usergroup as u"; $sql.= " ORDER BY u.rowid"; - dol_syslog(get_class($this)."::selectUserGroup sql=".$sql,LOG_DEBUG); + dol_syslog(get_class($this)."::selectUserGroup", LOG_DEBUG); $result = $this->db->query($sql); // Si pas d'erreur SQL @@ -1071,7 +1071,7 @@ class Holiday extends CommonObject $sql.= " FROM ".MAIN_DB_PREFIX."user as u"; $sql.= " WHERE statut > 0"; - dol_syslog(get_class($this)."::fetchUsers sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::fetchUsers", LOG_DEBUG); $resql=$this->db->query($sql); // Si pas d'erreur SQL @@ -1109,7 +1109,7 @@ class Holiday extends CommonObject $sql = "SELECT u.fk_user"; $sql.= " FROM ".MAIN_DB_PREFIX."holiday_users as u"; - dol_syslog(get_class($this)."::fetchUsers sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::fetchUsers", LOG_DEBUG); $resql=$this->db->query($sql); // Si pas d'erreur SQL @@ -1153,7 +1153,7 @@ class Holiday extends CommonObject $sql.= " FROM ".MAIN_DB_PREFIX."user as u"; $sql.= " WHERE statut > 0"; - dol_syslog(get_class($this)."::fetchUsers sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::fetchUsers", LOG_DEBUG); $resql=$this->db->query($sql); // Si pas d'erreur SQL @@ -1193,7 +1193,7 @@ class Holiday extends CommonObject $sql.= " ".MAIN_DB_PREFIX."user as u"; $sql.= " WHERE cpu.fk_user = u.rowid"; - dol_syslog(get_class($this)."::fetchUsers sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::fetchUsers", LOG_DEBUG); $resql=$this->db->query($sql); // Si pas d'erreur SQL @@ -1369,7 +1369,7 @@ class Holiday extends CommonObject $sql.= " FROM ".MAIN_DB_PREFIX."holiday_events as cpe"; - dol_syslog(get_class($this)."::fetchEventsCP sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::fetchEventsCP", LOG_DEBUG); $resql=$this->db->query($sql); // Si pas d'erreur SQL @@ -1434,7 +1434,7 @@ class Holiday extends CommonObject $this->db->begin(); - dol_syslog(get_class($this)."::createEventCP sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::createEventCP", LOG_DEBUG); $resql=$this->db->query($sql); if (! $resql) { $error++; $this->errors[]="Error ".$this->db->lasterror(); @@ -1627,7 +1627,7 @@ class Holiday extends CommonObject $this->db->begin(); - dol_syslog(get_class($this)."::addLogCP sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::addLogCP", LOG_DEBUG); $resql=$this->db->query($sql); if (! $resql) { $error++; $this->errors[]="Error ".$this->db->lasterror(); @@ -1690,7 +1690,7 @@ class Holiday extends CommonObject $sql.= $order; } - dol_syslog(get_class($this)."::fetchLog sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::fetchLog", LOG_DEBUG); $resql=$this->db->query($sql); // Si pas d'erreur SQL diff --git a/htdocs/imports/class/import.class.php b/htdocs/imports/class/import.class.php index b1fa3552d9a..ff23bc12cc8 100644 --- a/htdocs/imports/class/import.class.php +++ b/htdocs/imports/class/import.class.php @@ -233,7 +233,7 @@ class Import $sql.= ')'; $sql.= " VALUES (".($user->id > 0 ? $user->id : 0).", '".$this->db->escape($this->model_name)."', '".$this->datatoimport."', '".$this->hexa."')"; - dol_syslog(get_class($this)."::create sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::create", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -262,7 +262,7 @@ class Import $sql.= ' FROM '.MAIN_DB_PREFIX.'import_model as em'; $sql.= ' WHERE em.rowid = '.$id; - dol_syslog(get_class($this)."::fetch sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::fetch", LOG_DEBUG); $result = $this->db->query($sql); if ($result) { @@ -306,7 +306,7 @@ class Import $this->db->begin(); - dol_syslog(get_class($this)."::delete sql=".$sql); + dol_syslog(get_class($this)."::delete", LOG_DEBUG); $resql = $this->db->query($sql); if (! $resql) { $error++; $this->errors[]="Error ".$this->db->lasterror(); } diff --git a/htdocs/install/upgrade.php b/htdocs/install/upgrade.php index 9b15d36ffe9..875f5974dd7 100644 --- a/htdocs/install/upgrade.php +++ b/htdocs/install/upgrade.php @@ -203,7 +203,7 @@ if (! GETPOST("action") || preg_match('/upgrade/i',GETPOST('action'))) $filles=array(); $sql = "SELECT fk_categorie_mere, fk_categorie_fille"; $sql.= " FROM ".MAIN_DB_PREFIX."categorie_association"; - dolibarr_install_syslog("upgrade: search duplicate sql=".$sql); + dolibarr_install_syslog("upgrade: search duplicate", LOG_DEBUG); $resql = $db->query($sql); if ($resql) { @@ -231,7 +231,7 @@ if (! GETPOST("action") || preg_match('/upgrade/i',GETPOST('action'))) // We delete all $sql="DELETE FROM ".MAIN_DB_PREFIX."categorie_association"; - dolibarr_install_syslog("upgrade: delete association sql=".$sql); + dolibarr_install_syslog("upgrade: delete association", LOG_DEBUG); $resqld=$db->query($sql); if ($resqld) { @@ -240,7 +240,7 @@ if (! GETPOST("action") || preg_match('/upgrade/i',GETPOST('action'))) { $sql ="INSERT INTO ".MAIN_DB_PREFIX."categorie_association(fk_categorie_mere,fk_categorie_fille)"; $sql.=" VALUES(".$val['mere'].", ".$val['fille'].")"; - dolibarr_install_syslog("upgrade: insert association sql=".$sql); + dolibarr_install_syslog("upgrade: insert association", LOG_DEBUG); $resqli=$db->query($sql); if (! $resqli) $error++; } diff --git a/htdocs/install/upgrade2.php b/htdocs/install/upgrade2.php index 736346d0f72..23c9c311650 100644 --- a/htdocs/install/upgrade2.php +++ b/htdocs/install/upgrade2.php @@ -413,7 +413,7 @@ function migrate_paiements($db,$langs,$conf) $resql = $db->query($sql); - dolibarr_install_syslog("upgrade2::migrate_paiements sql=".$sql); + dolibarr_install_syslog("upgrade2::migrate_paiements", LOG_DEBUG); if ($resql) { $i = 0; @@ -513,7 +513,7 @@ function migrate_paiements_orphelins_1($db,$langs,$conf) $resql = $db->query($sql); - dolibarr_install_syslog("upgrade2::migrate_paiements_orphelins_1 sql=".$sql); + dolibarr_install_syslog("upgrade2::migrate_paiements_orphelins_1", LOG_DEBUG); $row = array(); if ($resql) { @@ -639,7 +639,7 @@ function migrate_paiements_orphelins_2($db,$langs,$conf) $resql = $db->query($sql); - dolibarr_install_syslog("upgrade2::migrate_paiements_orphelins_2 sql=".$sql); + dolibarr_install_syslog("upgrade2::migrate_paiements_orphelins_2", LOG_DEBUG); $row = array(); if ($resql) { @@ -779,7 +779,7 @@ function migrate_contracts_det($db,$langs,$conf) $sql.= " WHERE cd.rowid IS NULL AND p.rowid IS NOT NULL"; $resql = $db->query($sql); - dolibarr_install_syslog("upgrade2::migrate_contracts_det sql=".$sql); + dolibarr_install_syslog("upgrade2::migrate_contracts_det", LOG_DEBUG); if ($resql) { $i = 0; @@ -875,7 +875,7 @@ function migrate_links_transfert($db,$langs,$conf) $sql.= " AND bu.fk_bank IS NULL"; $resql = $db->query($sql); - dolibarr_install_syslog("upgrade2::migrate_links_transfert sql=".$sql); + dolibarr_install_syslog("upgrade2::migrate_links_transfert", LOG_DEBUG); if ($resql) { $i = 0; @@ -899,7 +899,7 @@ function migrate_links_transfert($db,$langs,$conf) $sql.= ")"; print $sql.'
'; - dolibarr_install_syslog("migrate_links_transfert sql=".$sql); + dolibarr_install_syslog("migrate_links_transfert", LOG_DEBUG); if (! $db->query($sql)) { @@ -950,7 +950,7 @@ function migrate_contracts_date1($db,$langs,$conf) print ''.$langs->trans('MigrationContractsEmptyDatesUpdate')."
\n"; $sql="update llx_contrat set date_contrat=tms where date_contrat is null"; - dolibarr_install_syslog("upgrade2::migrate_contracts_date1 sql=".$sql); + dolibarr_install_syslog("upgrade2::migrate_contracts_date1", LOG_DEBUG); $resql = $db->query($sql); if (! $resql) dol_print_error($db); if ($db->affected_rows($resql) > 0) @@ -959,7 +959,7 @@ function migrate_contracts_date1($db,$langs,$conf) print $langs->trans('MigrationContractsEmptyDatesNothingToUpdate')."
\n"; $sql="update llx_contrat set datec=tms where datec is null"; - dolibarr_install_syslog("upgrade2::migrate_contracts_date1 sql=".$sql); + dolibarr_install_syslog("upgrade2::migrate_contracts_date1", LOG_DEBUG); $resql = $db->query($sql); if (! $resql) dol_print_error($db); if ($db->affected_rows($resql) > 0) @@ -989,7 +989,7 @@ function migrate_contracts_date2($db,$langs,$conf) $sql.= " GROUP BY c.rowid, c.date_contrat"; $resql = $db->query($sql); - dolibarr_install_syslog("upgrade2::migrate_contracts_date2 sql=".$sql); + dolibarr_install_syslog("upgrade2::migrate_contracts_date2", LOG_DEBUG); if ($resql) { $i = 0; @@ -1050,7 +1050,7 @@ function migrate_contracts_date3($db,$langs,$conf) print ''.$langs->trans('MigrationContractsIncoherentCreationDateUpdate')."
\n"; $sql="update llx_contrat set datec=date_contrat where datec is null or datec > date_contrat"; - dolibarr_install_syslog("upgrade2::migrate_contracts_date3 sql=".$sql); + dolibarr_install_syslog("upgrade2::migrate_contracts_date3", LOG_DEBUG); $resql = $db->query($sql); if (! $resql) dol_print_error($db); if ($db->affected_rows($resql) > 0) @@ -1078,7 +1078,7 @@ function migrate_contracts_open($db,$langs,$conf) $sql = "SELECT c.rowid as cref FROM llx_contrat as c, llx_contratdet as cd"; $sql.= " WHERE cd.statut = 4 AND c.statut=2 AND c.rowid=cd.fk_contrat"; - dolibarr_install_syslog("upgrade2::migrate_contracts_open sql=".$sql); + dolibarr_install_syslog("upgrade2::migrate_contracts_open", LOG_DEBUG); $resql = $db->query($sql); if (! $resql) dol_print_error($db); if ($db->affected_rows($resql) > 0) { @@ -1264,7 +1264,7 @@ function migrate_price_facture($db,$langs,$conf) $sql.= " AND (((fd.total_ttc = 0 AND fd.remise_percent != 100) or fd.total_ttc IS NULL) or f.total_ttc IS NULL)"; //print $sql; - dolibarr_install_syslog("upgrade2::migrate_price_facture sql=".$sql); + dolibarr_install_syslog("upgrade2::migrate_price_facture", LOG_DEBUG); $resql=$db->query($sql); if ($resql) { @@ -1377,7 +1377,7 @@ function migrate_price_propal($db,$langs,$conf) $sql.= " WHERE pd.fk_propal = p.rowid"; $sql.= " AND ((pd.total_ttc = 0 AND pd.remise_percent != 100) or pd.total_ttc IS NULL)"; - dolibarr_install_syslog("upgrade2::migrate_price_propal sql=".$sql); + dolibarr_install_syslog("upgrade2::migrate_price_propal", LOG_DEBUG); $resql=$db->query($sql); if ($resql) { @@ -1486,7 +1486,7 @@ function migrate_price_contrat($db,$langs,$conf) $sql.= " WHERE cd.fk_contrat = c.rowid"; $sql.= " AND ((cd.total_ttc = 0 AND cd.remise_percent != 100 AND cd.subprice > 0) or cd.total_ttc IS NULL)"; - dolibarr_install_syslog("upgrade2::migrate_price_contrat sql=".$sql); + dolibarr_install_syslog("upgrade2::migrate_price_contrat", LOG_DEBUG); $resql=$db->query($sql); if ($resql) { @@ -1571,7 +1571,7 @@ function migrate_price_commande($db,$langs,$conf) $sql.= " WHERE cd.fk_commande = c.rowid"; $sql.= " AND ((cd.total_ttc = 0 AND cd.remise_percent != 100) or cd.total_ttc IS NULL)"; - dolibarr_install_syslog("upgrade2::migrate_price_commande sql=".$sql); + dolibarr_install_syslog("upgrade2::migrate_price_commande", LOG_DEBUG); $resql=$db->query($sql); if ($resql) { @@ -1685,7 +1685,7 @@ function migrate_price_commande_fournisseur($db,$langs,$conf) $sql.= " WHERE cd.fk_commande = c.rowid"; $sql.= " AND ((cd.total_ttc = 0 AND cd.remise_percent != 100) or cd.total_ttc IS NULL)"; - dolibarr_install_syslog("upgrade2::migrate_price_commande_fournisseur sql=".$sql); + dolibarr_install_syslog("upgrade2::migrate_price_commande_fournisseur", LOG_DEBUG); $resql=$db->query($sql); if ($resql) { @@ -2406,7 +2406,7 @@ function migrate_restore_missing_links($db,$langs,$conf) $sql.= " (SELECT t2.rowid FROM ".MAIN_DB_PREFIX.$table2." as t2"; $sql.= " WHERE t1.rowid = t2.".$field2.")"; - dolibarr_install_syslog("upgrade2:migrate_restore_missing_links DIRECTION 1 sql=".$sql); + dolibarr_install_syslog("upgrade2:migrate_restore_missing_links DIRECTION 1", LOG_DEBUG); $resql = $db->query($sql); if ($resql) { @@ -2472,7 +2472,7 @@ function migrate_restore_missing_links($db,$langs,$conf) $sql.= " (SELECT t2.rowid FROM ".MAIN_DB_PREFIX.$table2." as t2"; $sql.= " WHERE t1.rowid = t2.".$field2.")"; - dolibarr_install_syslog("upgrade2:migrate_restore_missing_links DIRECTION 2 sql=".$sql); + dolibarr_install_syslog("upgrade2:migrate_restore_missing_links DIRECTION 2", LOG_DEBUG); $resql = $db->query($sql); if ($resql) { diff --git a/htdocs/livraison/class/livraison.class.php b/htdocs/livraison/class/livraison.class.php index 58ad4f1bc0d..1921ef1633d 100644 --- a/htdocs/livraison/class/livraison.class.php +++ b/htdocs/livraison/class/livraison.class.php @@ -128,7 +128,7 @@ class Livraison extends CommonObject $sql.= ", ".(!empty($this->model_pdf)?"'".$this->db->escape($this->model_pdf)."'":"null"); $sql.= ")"; - dol_syslog("Livraison::create sql=".$sql, LOG_DEBUG); + dol_syslog("Livraison::create", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -140,7 +140,7 @@ class Livraison extends CommonObject $sql.= "SET ref = '".$this->db->escape($numref)."'"; $sql.= " WHERE rowid = ".$this->id; - dol_syslog("Livraison::create sql=".$sql, LOG_DEBUG); + dol_syslog("Livraison::create", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -241,7 +241,7 @@ class Livraison extends CommonObject $sql.= " ".($description?"'".$this->db->escape($description)."'":"null").","; $sql.= $qty.")"; - dol_syslog(get_class($this)."::create_line sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::create_line", LOG_DEBUG); if (! $this->db->query($sql) ) { $error++; @@ -271,7 +271,7 @@ class Livraison extends CommonObject $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."element_element as el ON el.fk_target = l.rowid AND el.targettype = '".$this->element."'"; $sql.= " WHERE l.rowid = ".$id; - dol_syslog(get_class($this)."::fetch sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::fetch", LOG_DEBUG); $result = $this->db->query($sql); if ($result) { @@ -685,7 +685,7 @@ class Livraison extends CommonObject $sql.= " WHERE ld.fk_origin_line = cd.rowid"; $sql.= " AND ld.fk_livraison = ".$this->id; - dol_syslog(get_class($this)."::fetch_lines sql=".$sql); + dol_syslog(get_class($this)."::fetch_lines", LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { @@ -915,7 +915,7 @@ class Livraison extends CommonObject $sql.= " SET date_delivery = ".($date_livraison ? "'".$this->db->idate($date_livraison)."'" : 'null'); $sql.= " WHERE rowid = ".$this->id; - dol_syslog(get_class($this)."::set_date_livraison sql=".$sql,LOG_DEBUG); + dol_syslog(get_class($this)."::set_date_livraison", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { diff --git a/htdocs/opensurvey/class/opensurveysondage.class.php b/htdocs/opensurvey/class/opensurveysondage.class.php index 602f5405ca2..b6cc0a0e6fc 100644 --- a/htdocs/opensurvey/class/opensurveysondage.class.php +++ b/htdocs/opensurvey/class/opensurveysondage.class.php @@ -132,7 +132,7 @@ class Opensurveysondage extends CommonObject $this->db->begin(); - dol_syslog(get_class($this)."::create sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::create", LOG_DEBUG); $resql=$this->db->query($sql); if (! $resql) { $error++; $this->errors[]="Error ".$this->db->lasterror(); } @@ -196,7 +196,7 @@ class Opensurveysondage extends CommonObject $sql.= " FROM ".MAIN_DB_PREFIX."opensurvey_sondage as t"; $sql.= " WHERE t.id_sondage = '".$this->db->escape($numsurvey)."'"; - dol_syslog(get_class($this)."::fetch sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::fetch", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -281,7 +281,7 @@ class Opensurveysondage extends CommonObject $this->db->begin(); - dol_syslog(get_class($this)."::update sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::update", LOG_DEBUG); $resql = $this->db->query($sql); if (! $resql) { $error++; $this->errors[]="Error ".$this->db->lasterror(); } @@ -352,16 +352,16 @@ class Opensurveysondage extends CommonObject { $sql='DELETE FROM '.MAIN_DB_PREFIX."opensurvey_comments WHERE id_sondage = '".$this->db->escape($numsondage)."'"; - dol_syslog(get_class($this)."::delete sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::delete", LOG_DEBUG); $resql=$this->db->query($sql); $sql='DELETE FROM '.MAIN_DB_PREFIX."opensurvey_user_studs WHERE id_sondage = '".$this->db->escape($numsondage)."'"; - dol_syslog(get_class($this)."::delete sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::delete", LOG_DEBUG); $resql=$this->db->query($sql); $sql = "DELETE FROM ".MAIN_DB_PREFIX."opensurvey_sondage"; $sql.= " WHERE id_sondage = '".$this->db->escape($numsondage)."'"; - dol_syslog(get_class($this)."::delete sql=".$sql); + dol_syslog(get_class($this)."::delete", LOG_DEBUG); $resql = $this->db->query($sql); if (! $resql) { $error++; $this->errors[]="Error ".$this->db->lasterror(); } } diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index a2d2ee36d9c..1f320f28504 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -370,7 +370,7 @@ class Product extends CommonObject $sql.= ", ".((empty($this->status_batch) || $this->status_batch < 0)? '0':$this->status_batch); $sql.= ")"; - dol_syslog(get_class($this)."::Create sql=".$sql); + dol_syslog(get_class($this)."::Create", LOG_DEBUG); $result = $this->db->query($sql); if ( $result ) { @@ -628,7 +628,7 @@ class Product extends CommonObject $sql.= ", desiredstock = " . ((isset($this->desiredstock) && $this->desiredstock != '') ? $this->desiredstock : "null"); $sql.= " WHERE rowid = " . $id; - dol_syslog(get_class($this)."update sql=".$sql); + dol_syslog(get_class($this)."update", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -1000,7 +1000,7 @@ class Product extends CommonObject $sql.= " ".$this->localtax1_tx.",".$this->localtax2_tx.",".$this->price_min.",".$this->price_min_ttc.",".$this->price_by_qty.",".$conf->entity; $sql.= ")"; - dol_syslog(get_class($this)."_log_price sql=".$sql); + dol_syslog(get_class($this)."_log_price", LOG_DEBUG); $resql=$this->db->query($sql); if(! $resql) { @@ -1027,7 +1027,7 @@ class Product extends CommonObject $sql = "DELETE FROM ".MAIN_DB_PREFIX."product_price"; $sql.= " WHERE rowid=".$rowid; - dol_syslog(get_class($this)."log_price_delete sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."log_price_delete", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -1063,7 +1063,7 @@ class Product extends CommonObject $sql.= " WHERE pfp.rowid = ".$prodfournprice; if ($qty) $sql.= " AND pfp.quantity <= ".$qty; - dol_syslog(get_class($this)."::get_buyprice sql=".$sql); + dol_syslog(get_class($this)."::get_buyprice", LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { @@ -1089,7 +1089,7 @@ class Product extends CommonObject $sql.= " ORDER BY pfp.quantity DESC"; $sql.= " LIMIT 1"; - dol_syslog(get_class($this)."::get_buyprice sql=".$sql); + dol_syslog(get_class($this)."::get_buyprice", LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { @@ -1222,7 +1222,7 @@ class Product extends CommonObject $sql.= " recuperableonly='".$newnpr."'"; $sql.= " WHERE rowid = ".$id; - dol_syslog(get_class($this)."update_price sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."update_price", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -1303,7 +1303,7 @@ class Product extends CommonObject else if ($ref_ext) $sql.= " AND ref_ext = '".$this->db->escape($ref_ext)."'"; } - dol_syslog(get_class($this)."::fetch sql=".$sql); + dol_syslog(get_class($this)."::fetch", LOG_DEBUG); $resql = $this->db->query($sql); if ( $resql ) { @@ -2152,7 +2152,7 @@ class Product extends CommonObject $sql.= " AND fk_product != ".$this->id; $sql.= " AND entity = ".$conf->entity; - dol_syslog(get_class($this)."::add_fournisseur sql=".$sql); + dol_syslog(get_class($this)."::add_fournisseur", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -2176,7 +2176,7 @@ class Product extends CommonObject $sql.= " AND fk_product = ".$this->id; $sql.= " AND entity = ".$conf->entity; - dol_syslog(get_class($this)."::add_fournisseur sql=".$sql); + dol_syslog(get_class($this)."::add_fournisseur", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -2205,7 +2205,7 @@ class Product extends CommonObject $sql.= ", 0"; $sql.= ")"; - dol_syslog(get_class($this)."::add_fournisseur sql=".$sql); + dol_syslog(get_class($this)."::add_fournisseur", LOG_DEBUG); if ($this->db->query($sql)) { $this->product_fourn_price_id = $this->db->last_insert_id(MAIN_DB_PREFIX."product_fournisseur_price"); @@ -2829,7 +2829,7 @@ class Product extends CommonObject $sql.= " AND w.rowid = ps.fk_entrepot"; $sql.= " AND ps.fk_product = ".$this->id; - dol_syslog(get_class($this)."::load_stock sql=".$sql); + dol_syslog(get_class($this)."::load_stock", LOG_DEBUG); $result = $this->db->query($sql); if ($result) { diff --git a/htdocs/product/class/productbatch.class.php b/htdocs/product/class/productbatch.class.php index 9c92431c563..78af2b01037 100644 --- a/htdocs/product/class/productbatch.class.php +++ b/htdocs/product/class/productbatch.class.php @@ -97,7 +97,7 @@ class Productbatch extends CommonObject $this->db->begin(); - dol_syslog(get_class($this)."::create sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::create", LOG_DEBUG); $resql=$this->db->query($sql); if (! $resql) { $error++; $this->errors[]="Error ".$this->db->lasterror(); } if (! $error) @@ -161,7 +161,7 @@ class Productbatch extends CommonObject $sql.= " FROM ".MAIN_DB_PREFIX.self::$_table_element." as t"; $sql.= " WHERE t.rowid = ".$id; - dol_syslog(get_class($this)."::fetch sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::fetch", LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { @@ -217,7 +217,7 @@ class Productbatch extends CommonObject $this->db->begin(); - dol_syslog(get_class($this)."::update sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::update", LOG_DEBUG); $resql = $this->db->query($sql); if (! $resql) { $error++; $this->errors[]="Error ".$this->db->lasterror(); } if (! $error) @@ -289,7 +289,7 @@ class Productbatch extends CommonObject $sql = "DELETE FROM ".MAIN_DB_PREFIX.self::$_table_element.""; $sql.= " WHERE rowid=".$this->id; - dol_syslog(get_class($this)."::delete sql=".$sql); + dol_syslog(get_class($this)."::delete", LOG_DEBUG); $resql = $this->db->query($sql); if (! $resql) { $error++; $this->errors[]="Error ".$this->db->lasterror(); } } @@ -431,7 +431,7 @@ class Productbatch extends CommonObject if (! empty($where)) $sql.= " AND (".implode(" OR ",$where).")"; - dol_syslog(get_class($this)."::fetch sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::fetch", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -487,7 +487,7 @@ class Productbatch extends CommonObject $sql.= " WHERE fk_product_stock=".$fk_product_stock; if ($with_qty) $sql.= " AND qty<>0"; - dol_syslog("productbatch::findAll sql=".$sql, LOG_DEBUG); + dol_syslog("productbatch::findAll", LOG_DEBUG); $resql=$db->query($sql); if ($resql) { diff --git a/htdocs/product/liste.php b/htdocs/product/liste.php index 40e99a2d2ee..8d82b5548a5 100644 --- a/htdocs/product/liste.php +++ b/htdocs/product/liste.php @@ -199,7 +199,7 @@ else $sql.= $db->order($sortfield,$sortorder); $sql.= $db->plimit($limit + 1, $offset); - dol_syslog("product:list.php: sql=".$sql); + dol_syslog("product:list.php:", LOG_DEBUG); $resql = $db->query($sql); if ($resql) { diff --git a/htdocs/product/stock/class/entrepot.class.php b/htdocs/product/stock/class/entrepot.class.php index b28a8f9451f..b7061352fe6 100644 --- a/htdocs/product/stock/class/entrepot.class.php +++ b/htdocs/product/stock/class/entrepot.class.php @@ -89,7 +89,7 @@ class Entrepot extends CommonObject $sql = "INSERT INTO ".MAIN_DB_PREFIX."entrepot (entity, datec, fk_user_author, label)"; $sql .= " VALUES (".$conf->entity.",'".$this->db->idate($now)."',".$user->id.",'".$this->db->escape($this->libelle)."')"; - dol_syslog(get_class($this)."::create sql=".$sql); + dol_syslog(get_class($this)."::create", LOG_DEBUG); $result=$this->db->query($sql); if ($result) { @@ -158,7 +158,7 @@ class Entrepot extends CommonObject $this->db->begin(); - dol_syslog(get_class($this)."::update sql=".$sql); + dol_syslog(get_class($this)."::update", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -187,12 +187,12 @@ class Entrepot extends CommonObject $sql = "DELETE FROM ".MAIN_DB_PREFIX."stock_mouvement"; $sql.= " WHERE fk_entrepot = " . $this->id; - dol_syslog("Entrepot::delete sql=".$sql); + dol_syslog("Entrepot::delete", LOG_DEBUG); $resql1=$this->db->query($sql); $sql = "DELETE FROM ".MAIN_DB_PREFIX."product_stock"; $sql.= " WHERE fk_entrepot = " . $this->id; - dol_syslog("Entrepot::delete sql=".$sql); + dol_syslog("Entrepot::delete", LOG_DEBUG); $resql2=$this->db->query($sql); if ($resql1 && $resql2) @@ -200,13 +200,13 @@ class Entrepot extends CommonObject $sql = "DELETE FROM ".MAIN_DB_PREFIX."entrepot"; $sql.= " WHERE rowid = " . $this->id; - dol_syslog(get_class($this)."::delete sql=".$sql); + dol_syslog(get_class($this)."::delete", LOG_DEBUG); $resql1=$this->db->query($sql); // Update denormalized fields because we change content of produt_stock $sql = "UPDATE ".MAIN_DB_PREFIX."product p SET p.stock= (SELECT SUM(ps.reel) FROM ".MAIN_DB_PREFIX."product_stock ps WHERE ps.fk_product = p.rowid)"; - dol_syslog(get_class($this)."::delete sql=".$sql); + dol_syslog(get_class($this)."::delete", LOG_DEBUG); $resql2=$this->db->query($sql); if ($resql1 && $resql2) @@ -258,7 +258,7 @@ class Entrepot extends CommonObject if ($ref) $sql.= " AND label = '".$this->db->escape($ref)."'"; } - dol_syslog(get_class($this)."::fetch sql=".$sql); + dol_syslog(get_class($this)."::fetch", LOG_DEBUG); $result = $this->db->query($sql); if ($result) { @@ -309,7 +309,7 @@ class Entrepot extends CommonObject $sql.= " FROM ".MAIN_DB_PREFIX."entrepot as e"; $sql.= " WHERE e.rowid = ".$id; - dol_syslog(get_class($this)."::info sql=".$sql); + dol_syslog(get_class($this)."::info", LOG_DEBUG); $result=$this->db->query($sql); if ($result) { diff --git a/htdocs/product/stock/class/mouvementstock.class.php b/htdocs/product/stock/class/mouvementstock.class.php index e8861d60ddb..2bdb24e355b 100644 --- a/htdocs/product/stock/class/mouvementstock.class.php +++ b/htdocs/product/stock/class/mouvementstock.class.php @@ -112,7 +112,7 @@ class MouvementStock $sql.= " '".$origintype."'"; $sql.= ")"; - dol_syslog(get_class($this)."::_create sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::_create", LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { @@ -138,7 +138,7 @@ class MouvementStock $sql = "SELECT rowid, reel, pmp FROM ".MAIN_DB_PREFIX."product_stock"; $sql.= " WHERE fk_entrepot = ".$entrepot_id." AND fk_product = ".$fk_product; - dol_syslog(get_class($this)."::_create sql=".$sql); + dol_syslog(get_class($this)."::_create", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -203,7 +203,7 @@ class MouvementStock $sql.= " (".$newpmpwarehouse.", ".$qty.", ".$entrepot_id.", ".$fk_product.")"; } - dol_syslog(get_class($this)."::_create sql=".$sql); + dol_syslog(get_class($this)."::_create", LOG_DEBUG); $resql=$this->db->query($sql); if (! $resql) { @@ -230,7 +230,7 @@ class MouvementStock // May be this request is better: // UPDATE llx_product p SET p.stock= (SELECT SUM(ps.reel) FROM llx_product_stock ps WHERE ps.fk_product = p.rowid); - dol_syslog(get_class($this)."::_create sql=".$sql); + dol_syslog(get_class($this)."::_create", LOG_DEBUG); $resql=$this->db->query($sql); if (! $resql) { @@ -298,7 +298,7 @@ class MouvementStock $sql.= " FROM ".MAIN_DB_PREFIX."product_association"; $sql.= " WHERE fk_product_pere = ".$idProduct; - dol_syslog(get_class($this)."::_createSubProduct sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::_createSubProduct", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { diff --git a/htdocs/product/stock/index.php b/htdocs/product/stock/index.php index da52a5aac58..1309da95a2a 100644 --- a/htdocs/product/stock/index.php +++ b/htdocs/product/stock/index.php @@ -124,7 +124,7 @@ if (empty($conf->global->STOCK_SUPPORTS_SERVICES)) $sql.= " AND p.fk_product_typ $sql.= $db->order("datem","DESC"); $sql.= $db->plimit($max,0); -dol_syslog("Index:list stock movements sql=".$sql, LOG_DEBUG); +dol_syslog("Index:list stock movements", LOG_DEBUG); $resql = $db->query($sql); if ($resql) { diff --git a/htdocs/projet/class/task.class.php b/htdocs/projet/class/task.class.php index 0a56b5253a9..ff2934eb970 100644 --- a/htdocs/projet/class/task.class.php +++ b/htdocs/projet/class/task.class.php @@ -123,7 +123,7 @@ class Task extends CommonObject $this->db->begin(); - dol_syslog(get_class($this)."::create sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::create", LOG_DEBUG); $resql=$this->db->query($sql); if (! $resql) { $error++; $this->errors[]="Error ".$this->db->lasterror(); } @@ -212,7 +212,7 @@ class Task extends CommonObject $sql.="t.rowid = ".$id; } - dol_syslog(get_class($this)."::fetch sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::fetch", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -295,7 +295,7 @@ class Task extends CommonObject $this->db->begin(); - dol_syslog(get_class($this)."::update sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::update", LOG_DEBUG); $resql = $this->db->query($sql); if (! $resql) { $error++; $this->errors[]="Error ".$this->db->lasterror(); } @@ -386,7 +386,7 @@ class Task extends CommonObject $sql = "DELETE FROM ".MAIN_DB_PREFIX."projet_task"; $sql.= " WHERE rowid=".$this->id; - dol_syslog(get_class($this)."::delete sql=".$sql); + dol_syslog(get_class($this)."::delete", LOG_DEBUG); $resql = $this->db->query($sql); if (! $resql) { $error++; $this->errors[]="Error ".$this->db->lasterror(); } @@ -457,7 +457,7 @@ class Task extends CommonObject $sql.= " FROM ".MAIN_DB_PREFIX."projet_task"; $sql.= " WHERE fk_task_parent=".$this->id; - dol_syslog(get_class($this)."::hasChildren sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::hasChildren", LOG_DEBUG); $resql = $this->db->query($sql); if (! $resql) { $error++; $this->errors[]="Error ".$this->db->lasterror(); } else @@ -572,7 +572,7 @@ class Task extends CommonObject $sql.= " ORDER BY p.ref, t.rang, t.dateo"; //print $sql; - dol_syslog(get_class($this)."::getTasksArray sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::getTasksArray", LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { @@ -686,7 +686,7 @@ class Task extends CommonObject } //print $sql; - dol_syslog(get_class($this)."::getUserRolesForProjectsOrTasks sql=".$sql); + dol_syslog(get_class($this)."::getUserRolesForProjectsOrTasks", LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { @@ -764,7 +764,7 @@ class Task extends CommonObject $sql.= ", ".(isset($this->timespent_note)?"'".$this->db->escape($this->timespent_note)."'":"null"); $sql.= ")"; - dol_syslog(get_class($this)."::addTimeSpent sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::addTimeSpent", LOG_DEBUG); if ($this->db->query($sql) ) { $tasktime_id = $this->db->last_insert_id(MAIN_DB_PREFIX."projet_task_time"); @@ -793,7 +793,7 @@ class Task extends CommonObject $sql.= " SET duration_effective = duration_effective + '".price2num($this->timespent_duration)."'"; $sql.= " WHERE rowid = ".$this->id; - dol_syslog(get_class($this)."::addTimeSpent sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::addTimeSpent", LOG_DEBUG); if (! $this->db->query($sql) ) { $this->error=$this->db->lasterror(); @@ -808,7 +808,7 @@ class Task extends CommonObject $sql.= " SET thm = (SELECT thm FROM ".MAIN_DB_PREFIX."user WHERE rowid = ".$this->timespent_fk_user.")"; $sql.= " WHERE rowid = ".$tasktime_id; - dol_syslog(get_class($this)."::addTimeSpent sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::addTimeSpent", LOG_DEBUG); if (! $this->db->query($sql) ) { $this->error=$this->db->lasterror(); @@ -840,7 +840,7 @@ class Task extends CommonObject $sql.= " FROM ".MAIN_DB_PREFIX."projet_task_time as t"; $sql.= " WHERE t.rowid = ".$id; - dol_syslog(get_class($this)."::fetchTimeSpent sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::fetchTimeSpent", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -892,7 +892,7 @@ class Task extends CommonObject $sql.= " note = ".(isset($this->timespent_note)?"'".$this->db->escape($this->timespent_note)."'":"null"); $sql.= " WHERE rowid = ".$this->timespent_id; - dol_syslog(get_class($this)."::updateTimeSpent sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::updateTimeSpent", LOG_DEBUG); if ($this->db->query($sql) ) { if (! $notrigger) @@ -921,7 +921,7 @@ class Task extends CommonObject $sql.= " SET duration_effective = duration_effective + '".$newDuration."'"; $sql.= " WHERE rowid = ".$this->id; - dol_syslog(get_class($this)."::updateTimeSpent sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::updateTimeSpent", LOG_DEBUG); if (! $this->db->query($sql) ) { $this->error=$this->db->lasterror(); @@ -951,7 +951,7 @@ class Task extends CommonObject $sql = "DELETE FROM ".MAIN_DB_PREFIX."projet_task_time"; $sql.= " WHERE rowid = ".$this->timespent_id; - dol_syslog(get_class($this)."::delTimeSpent sql=".$sql); + dol_syslog(get_class($this)."::delTimeSpent", LOG_DEBUG); $resql = $this->db->query($sql); if (! $resql) { $error++; $this->errors[]="Error ".$this->db->lasterror(); } @@ -974,7 +974,7 @@ class Task extends CommonObject $sql.= " SET duration_effective = duration_effective - '".$this->timespent_duration."'"; $sql.= " WHERE rowid = ".$this->id; - dol_syslog(get_class($this)."::delTimeSpent sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::delTimeSpent", LOG_DEBUG); if ($this->db->query($sql) ) { $result = 0; diff --git a/htdocs/projet/liste.php b/htdocs/projet/liste.php index 39fcdb64a01..3dab05c1826 100644 --- a/htdocs/projet/liste.php +++ b/htdocs/projet/liste.php @@ -100,7 +100,7 @@ if ($search_societe) $sql.= $db->order($sortfield,$sortorder); $sql.= $db->plimit($conf->liste_limit+1, $offset); -dol_syslog("list allowed project sql=".$sql); +dol_syslog("list allowed project", LOG_DEBUG); $resql = $db->query($sql); if ($resql) { diff --git a/htdocs/resource/class/resource.class.php b/htdocs/resource/class/resource.class.php index 6edeef201fb..33d7af532b2 100644 --- a/htdocs/resource/class/resource.class.php +++ b/htdocs/resource/class/resource.class.php @@ -106,7 +106,7 @@ class Resource extends CommonObject $this->db->begin(); - dol_syslog(get_class($this)."::create sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::create", LOG_DEBUG); $resql=$this->db->query($sql); if (! $resql) { $error++; $this->errors[]="Error ".$this->db->lasterror(); @@ -168,7 +168,7 @@ class Resource extends CommonObject $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_type_resource as ty ON ty.code=t.fk_code_type_resource"; $sql.= " WHERE t.rowid = ".$this->db->escape($id); - dol_syslog(get_class($this)."::fetch sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::fetch", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -225,7 +225,7 @@ class Resource extends CommonObject $this->db->begin(); - dol_syslog(get_class($this)."::update sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::update", LOG_DEBUG); $resql = $this->db->query($sql); if (! $resql) { $error++; $this->errors[]="Error ".$this->db->lasterror(); } @@ -285,7 +285,7 @@ class Resource extends CommonObject $sql.= " FROM ".MAIN_DB_PREFIX."element_resources as t"; $sql.= " WHERE t.rowid = ".$this->db->escape($id); - dol_syslog(get_class($this)."::fetch sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::fetch", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -336,12 +336,12 @@ class Resource extends CommonObject $sql = "DELETE FROM ".MAIN_DB_PREFIX."resource"; $sql.= " WHERE rowid =".$rowid; - dol_syslog(get_class($this)."::delete sql=".$sql); + dol_syslog(get_class($this)."::delete", LOG_DEBUG); if ($this->db->query($sql)) { $sql = "DELETE FROM ".MAIN_DB_PREFIX."element_resources"; $sql.= " WHERE element_type='resource' AND resource_id ='".$this->db->escape($rowid)."'"; - dol_syslog(get_class($this)."::delete sql=".$sql); + dol_syslog(get_class($this)."::delete", LOG_DEBUG); if ($this->db->query($sql)) { if (! $notrigger) @@ -411,7 +411,7 @@ class Resource extends CommonObject $sql.= " GROUP BY t.rowid"; $sql.= " ORDER BY $sortfield $sortorder "; if ($limit) $sql.= $this->db->plimit($limit+1,$offset); - dol_syslog(get_class($this)."::fetch_all sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::fetch_all", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) @@ -484,7 +484,7 @@ class Resource extends CommonObject } $sql.= " GROUP BY t.rowid"; $sql.= " ORDER BY $sortfield $sortorder " . $this->db->plimit($limit+1,$offset); - dol_syslog(get_class($this)."::fetch_all sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::fetch_all", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) @@ -569,7 +569,7 @@ class Resource extends CommonObject } $sql.= " GROUP BY t.resource_id"; $sql.= " ORDER BY " . $sortfield . " " . $sortorder . " " . $this->db->plimit($limit+1,$offset); - dol_syslog(get_class($this)."::fetch_all sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::fetch_all", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) @@ -729,7 +729,7 @@ class Resource extends CommonObject $this->db->begin(); - dol_syslog(get_class($this)."::update sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::update", LOG_DEBUG); $resql = $this->db->query($sql); if (! $resql) { $error++; $this->errors[]="Error ".$this->db->lasterror(); } @@ -784,7 +784,7 @@ class Resource extends CommonObject $sql.=" AND resource_type LIKE '%".$resource_type."%'"; $sql .= ' ORDER BY resource_type'; - dol_syslog(get_class($this)."::getElementResources sql=".$sql); + dol_syslog(get_class($this)."::getElementResources", LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { @@ -837,7 +837,7 @@ class Resource extends CommonObject $sql.= " FROM ".MAIN_DB_PREFIX."c_type_resource"; $sql.= " WHERE active > 0"; $sql.= " ORDER BY rowid"; - dol_syslog(get_class($this)."::load_cache_code_type_resource sql=".$sql,LOG_DEBUG); + dol_syslog(get_class($this)."::load_cache_code_type_resource", LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { diff --git a/htdocs/societe/ajaxcompanies.php b/htdocs/societe/ajaxcompanies.php index 32fbe2e2c00..36abbb909ad 100644 --- a/htdocs/societe/ajaxcompanies.php +++ b/htdocs/societe/ajaxcompanies.php @@ -84,7 +84,7 @@ if (GETPOST('newcompany') || GETPOST('socid','int') || GETPOST('id_fourn')) if (! empty($_GET["filter"])) $sql.= " AND ".$_GET["filter"]; // Add other filters $sql.= " ORDER BY nom ASC"; - //dol_syslog("ajaxcompanies sql=".$sql); + //dol_syslog("ajaxcompanies", LOG_DEBUG); $resql=$db->query($sql); if ($resql) { diff --git a/htdocs/societe/class/address.class.php b/htdocs/societe/class/address.class.php index 174afbe5671..fe109b9137e 100644 --- a/htdocs/societe/class/address.class.php +++ b/htdocs/societe/class/address.class.php @@ -200,7 +200,7 @@ class Address if ($user) $sql .= ",fk_user_modif = '".$user->id."'"; $sql .= " WHERE fk_soc = '" . $socid ."' AND rowid = '" . $this->db->escape($id) ."'"; - dol_syslog(get_class($this)."::Update sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::Update", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { diff --git a/htdocs/societe/class/companybankaccount.class.php b/htdocs/societe/class/companybankaccount.class.php index 189556b186d..784b02ed930 100644 --- a/htdocs/societe/class/companybankaccount.class.php +++ b/htdocs/societe/class/companybankaccount.class.php @@ -227,7 +227,7 @@ class CompanyBankAccount extends Account $sql = "DELETE FROM ".MAIN_DB_PREFIX."societe_rib"; $sql.= " WHERE rowid = ".$this->id; - dol_syslog(get_class($this)."::delete sql=".$sql); + dol_syslog(get_class($this)."::delete", LOG_DEBUG); $result = $this->db->query($sql); if ($result) { return 1; diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index 9ffa0546782..5615961de86 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -418,7 +418,7 @@ class Societe extends CommonObject $sql.= ", 0"; $sql.= ", ".(! empty($this->import_key) ? "'".$this->import_key."'":"null").")"; - dol_syslog(get_class($this)."::create sql=".$sql); + dol_syslog(get_class($this)."::create", LOG_DEBUG); $result=$this->db->query($sql); if ($result) { @@ -785,7 +785,7 @@ class Societe extends CommonObject $sql .= " WHERE rowid = '" . $id ."'"; - dol_syslog(get_class($this)."::Update sql=".$sql); + dol_syslog(get_class($this)."::Update", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -885,7 +885,7 @@ class Societe extends CommonObject else { - $this->error = $langs->trans("Error sql=".$sql); + $this->error = $langs->trans("Error", LOG_DEBUG); dol_syslog(get_class($this)."::Update fails update sql=".$sql, LOG_ERR); $result = -2; } @@ -1266,7 +1266,7 @@ class Societe extends CommonObject { $sql = "DELETE FROM ".MAIN_DB_PREFIX."socpeople"; $sql.= " WHERE fk_soc = " . $id; - dol_syslog(get_class($this)."::delete sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::delete", LOG_DEBUG); if (! $this->db->query($sql)) { $error++; @@ -1280,7 +1280,7 @@ class Societe extends CommonObject { $sql = "UPDATE ".MAIN_DB_PREFIX."adherent"; $sql.= " SET fk_soc = NULL WHERE fk_soc = " . $id; - dol_syslog(get_class($this)."::delete sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::delete", LOG_DEBUG); if (! $this->db->query($sql)) { $error++; @@ -1294,7 +1294,7 @@ class Societe extends CommonObject { $sql = "DELETE FROM ".MAIN_DB_PREFIX."societe_rib"; $sql.= " WHERE fk_soc = " . $id; - dol_syslog(get_class($this)."::Delete sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::Delete", LOG_DEBUG); if (! $this->db->query($sql)) { $error++; @@ -1319,7 +1319,7 @@ class Societe extends CommonObject { $sql = "DELETE FROM ".MAIN_DB_PREFIX."societe"; $sql.= " WHERE rowid = " . $id; - dol_syslog(get_class($this)."::delete sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::delete", LOG_DEBUG); if (! $this->db->query($sql)) { $error++; @@ -2689,7 +2689,7 @@ class Societe extends CommonObject $sql.= " SET fk_soc=".$this->id; $sql.= " WHERE rowid=".$member->id; - dol_syslog(get_class($this)."::create_from_member sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::create_from_member", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -2863,7 +2863,7 @@ class Societe extends CommonObject elseif ($localTaxNum == 1) $sql .= " AND t.localtax1_type <> '0'"; elseif ($localTaxNum == 2) $sql .= " AND t.localtax2_type <> '0'"; - dol_syslog("useLocalTax sql=".$sql); + dol_syslog("useLocalTax", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -2883,7 +2883,7 @@ class Societe extends CommonObject $sql .= " WHERE r.fk_pays = p.rowid AND p.code = '".$this->country_code."'"; $sql .= " AND r.active = 1"; - dol_syslog("useRevenueStamp sql=".$sql); + dol_syslog("useRevenueStamp", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -2944,7 +2944,7 @@ class Societe extends CommonObject $sql.= " fk_prospectlevel='".$this->fk_prospectlevel."'"; $sql.= ",fk_user_modif='".$user->id."'"; $sql.= " WHERE rowid = ".$this->id; - dol_syslog(get_class($this)."::set_prospect_level sql=".$sql); + dol_syslog(get_class($this)."::set_prospect_level", LOG_DEBUG); $resql=$this->db->query($sql); if (! $resql) { @@ -3027,7 +3027,7 @@ class Societe extends CommonObject $sql.= ",fk_user_modif='".$user->id."'"; $sql.= " WHERE rowid = ".$this->id; - dol_syslog(get_class($this)."::set_commnucation_level sql=".$sql); + dol_syslog(get_class($this)."::set_commnucation_level", LOG_DEBUG); $resql=$this->db->query($sql); if (! $resql) { @@ -3061,7 +3061,7 @@ class Societe extends CommonObject $sql.= " outstanding_limit= ".($outstanding!=''?$outstanding:'null'); $sql.= " WHERE rowid = ".$this->id; - dol_syslog(get_class($this)."::set_outstanding sql=".$sql); + dol_syslog(get_class($this)."::set_outstanding", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -3098,7 +3098,7 @@ class Societe extends CommonObject //$sql .= " AND (fk_statut <> 3 OR close_code <> 'abandon')"; // Not abandonned for undefined reason $sql .= " AND fk_statut <> 3"; // Not abandonned - dol_syslog("get_OutstandingBill sql=".$sql); + dol_syslog("get_OutstandingBill", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { diff --git a/htdocs/societe/soc.php b/htdocs/societe/soc.php index f2d2e64791d..1ed5c1afc2c 100644 --- a/htdocs/societe/soc.php +++ b/htdocs/societe/soc.php @@ -432,7 +432,7 @@ if (empty($reshook)) $sql = "UPDATE ".MAIN_DB_PREFIX."adherent"; $sql.= " SET fk_soc = NULL WHERE fk_soc = " . $id; - dol_syslog(get_class($this)."::delete sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::delete", LOG_DEBUG); if (! $this->db->query($sql)) { $error++; diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index d671322d0dc..7eac18240f0 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -181,7 +181,7 @@ class User extends CommonObject $sql.= " AND u.rowid = ".$id; } - dol_syslog(get_class($this)."::fetch sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::fetch", LOG_DEBUG); $result = $this->db->query($sql); if ($result) { @@ -664,7 +664,7 @@ class User extends CommonObject $sql.= " WHERE rowid = ".$this->id; $result = $this->db->query($sql); - dol_syslog(get_class($this)."::setstatus sql=".$sql); + dol_syslog(get_class($this)."::setstatus", LOG_DEBUG); if ($result) { // Appel des triggers @@ -748,7 +748,7 @@ class User extends CommonObject if (! $error) { $sql = "DELETE FROM ".MAIN_DB_PREFIX."user WHERE rowid = ".$this->id; - dol_syslog(get_class($this)."::delete sql=".$sql); + dol_syslog(get_class($this)."::delete", LOG_DEBUG); if (! $this->db->query($sql)) { $error++; @@ -811,7 +811,7 @@ class User extends CommonObject $sql.= " WHERE login ='".$this->db->escape($this->login)."'"; $sql.= " AND entity IN (0,".$conf->entity.")"; - dol_syslog(get_class($this)."::create sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::create", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -831,7 +831,7 @@ class User extends CommonObject $sql.= " VALUES('".$this->db->idate($this->datec)."','".$this->db->escape($this->login)."','".$this->ldap_sid."',".$this->entity.")"; $result=$this->db->query($sql); - dol_syslog(get_class($this)."::create sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::create", LOG_DEBUG); if ($result) { $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."user"); @@ -950,7 +950,7 @@ class User extends CommonObject $sql.= " WHERE rowid=".$this->id; $resql=$this->db->query($sql); - dol_syslog(get_class($this)."::create_from_contact sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::create_from_contact", LOG_DEBUG); if ($resql) { // Appel des triggers @@ -1025,7 +1025,7 @@ class User extends CommonObject $sql.= " SET fk_societe=".$member->fk_soc; $sql.= " WHERE rowid=".$this->id; - dol_syslog(get_class($this)."::create_from_member sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::create_from_member", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -1176,7 +1176,7 @@ class User extends CommonObject $sql.= ", entity = '".$this->entity."'"; $sql.= " WHERE rowid = ".$this->id; - dol_syslog(get_class($this)."::update sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::update", LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { @@ -1197,13 +1197,13 @@ class User extends CommonObject if ($this->fk_member > 0) { $sql = "UPDATE ".MAIN_DB_PREFIX."user SET fk_member = NULL where fk_member = ".$this->fk_member; - dol_syslog(get_class($this)."::update sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::update", LOG_DEBUG); $resql = $this->db->query($sql); if (! $resql) { $this->error=$this->db->error(); $this->db->rollback(); return -5; } } // Set link to user $sql = "UPDATE ".MAIN_DB_PREFIX."user SET fk_member =".($this->fk_member>0?$this->fk_member:'null')." where rowid = ".$this->id; - dol_syslog(get_class($this)."::update sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::update", LOG_DEBUG); $resql = $this->db->query($sql); if (! $resql) { $this->error=$this->db->error(); $this->db->rollback(); return -5; } @@ -2199,7 +2199,7 @@ class User extends CommonObject $sql.= " WHERE fk_user != 0"; $sql.= " AND entity = ".$conf->entity; - dol_syslog(get_class($this)."::load_parentof sql=".$sql); + dol_syslog(get_class($this)."::load_parentof", LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { @@ -2249,7 +2249,7 @@ class User extends CommonObject { $sql.= " WHERE u.entity IN (".getEntity('user',1).")"; } - dol_syslog(get_class($this)."::get_full_tree get user list sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::get_full_tree get user list", LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { diff --git a/htdocs/user/class/usergroup.class.php b/htdocs/user/class/usergroup.class.php index 72dc0b7cf48..84b0bd4cbb5 100644 --- a/htdocs/user/class/usergroup.class.php +++ b/htdocs/user/class/usergroup.class.php @@ -85,7 +85,7 @@ class UserGroup extends CommonObject $sql.= " WHERE g.rowid = ".$id; } - dol_syslog(get_class($this)."::fetch sql=".$sql); + dol_syslog(get_class($this)."::fetch", LOG_DEBUG); $result = $this->db->query($sql); if ($result) { @@ -146,7 +146,7 @@ class UserGroup extends CommonObject } $sql.= " ORDER BY g.nom"; - dol_syslog(get_class($this)."::listGroupsForUser sql=".$sql,LOG_DEBUG); + dol_syslog(get_class($this)."::listGroupsForUser", LOG_DEBUG); $result = $this->db->query($sql); if ($result) { @@ -204,7 +204,7 @@ class UserGroup extends CommonObject } if (! empty($excludefilter)) $sql.=' AND ('.$excludefilter.')'; - dol_syslog(get_class($this)."::listUsersForGroup sql=".$sql,LOG_DEBUG); + dol_syslog(get_class($this)."::listUsersForGroup", LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { @@ -592,7 +592,7 @@ class UserGroup extends CommonObject $sql.= ",".$entity; $sql.= ")"; - dol_syslog(get_class($this)."::create sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::create", LOG_DEBUG); $result=$this->db->query($sql); if ($result) { @@ -644,7 +644,7 @@ class UserGroup extends CommonObject $sql.= ", note = '" . $this->db->escape($this->note) . "'"; $sql.= " WHERE rowid = " . $this->id; - dol_syslog(get_class($this)."::update sql=".$sql); + dol_syslog(get_class($this)."::update", LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { diff --git a/htdocs/user/fiche.php b/htdocs/user/fiche.php index d78a512bf53..179214c1bc4 100644 --- a/htdocs/user/fiche.php +++ b/htdocs/user/fiche.php @@ -395,7 +395,7 @@ if ($action == 'update' && ! $_POST["cancel"]) $sql.= " WHERE rowid=".$object->id; } $resql=$db->query($sql); - dol_syslog("fiche::update sql=".$sql, LOG_DEBUG); + dol_syslog("fiche::update", LOG_DEBUG); if (! $resql) { $error++; diff --git a/htdocs/user/perms.php b/htdocs/user/perms.php index af7a95af74d..2be426bb571 100644 --- a/htdocs/user/perms.php +++ b/htdocs/user/perms.php @@ -191,7 +191,7 @@ else } $sql.= " AND ur.fk_user = ".$fuser->id; -dol_syslog("get user perms sql=".$sql); +dol_syslog("get user perms", LOG_DEBUG); $result=$db->query($sql); if ($result) { @@ -227,7 +227,7 @@ if (! empty($conf->multicompany->enabled) && ! empty($conf->multicompany->transv $sql.= " AND gr.fk_usergroup = gu.fk_usergroup"; $sql.= " AND gu.fk_user = ".$fuser->id; -dol_syslog("get user perms sql=".$sql); +dol_syslog("get user perms", LOG_DEBUG); $result=$db->query($sql); if ($result) { diff --git a/htdocs/webservices/server_productorservice.php b/htdocs/webservices/server_productorservice.php index c2eba3f9d1b..f866e197e15 100644 --- a/htdocs/webservices/server_productorservice.php +++ b/htdocs/webservices/server_productorservice.php @@ -867,7 +867,7 @@ function getProductsForCategory($authentication,$id,$lang='') $sql .= " ORDER BY fk_".$field." ASC" ; - dol_syslog("getProductsForCategory get id of product into category sql=".$sql); + dol_syslog("getProductsForCategory get id of product into category", LOG_DEBUG); $res = $db->query($sql); if ($res) { diff --git a/htdocs/webservices/server_thirdparty.php b/htdocs/webservices/server_thirdparty.php index c5ac0c8c686..632a4c164e5 100644 --- a/htdocs/webservices/server_thirdparty.php +++ b/htdocs/webservices/server_thirdparty.php @@ -660,7 +660,7 @@ function getListOfThirdParties($authentication,$filterthirdparty) if ($key == 'supplier' && $val != '') $sql.=" AND s.fournisseur = ".$db->escape($val); if ($key == 'category' && $val != '') $sql.=" AND s.rowid IN (SELECT fk_societe FROM ".MAIN_DB_PREFIX."categorie_societe WHERE fk_categorie=".$db->escape($val).") "; } - dol_syslog("Function: getListOfThirdParties sql=".$sql); + dol_syslog("Function: getListOfThirdParties", LOG_DEBUG); $extrafields=new ExtraFields($db); $extralabels=$extrafields->fetch_name_optionals_label('societe',true); diff --git a/scripts/emailings/mailing-send.php b/scripts/emailings/mailing-send.php index c271b6dd7a2..cf8dceb8f9e 100755 --- a/scripts/emailings/mailing-send.php +++ b/scripts/emailings/mailing-send.php @@ -226,7 +226,7 @@ if ($resql) { //Update status communication of thirdparty prospect $sqlx = "UPDATE ".MAIN_DB_PREFIX."societe SET fk_stcomm=2 WHERE rowid IN (SELECT source_id FROM ".MAIN_DB_PREFIX."mailing_cibles WHERE rowid=".$obj2->rowid.")"; - dol_syslog("fiche.php: set prospect thirdparty status sql=".$sql, LOG_DEBUG); + dol_syslog("fiche.php: set prospect thirdparty status", LOG_DEBUG); $resqlx=$db->query($sqlx); if (! $resqlx) { @@ -236,7 +236,7 @@ if ($resql) //Update status communication of contact prospect $sqlx = "UPDATE ".MAIN_DB_PREFIX."societe SET fk_stcomm=2 WHERE rowid IN (SELECT sc.fk_soc FROM ".MAIN_DB_PREFIX."socpeople AS sc INNER JOIN ".MAIN_DB_PREFIX."mailing_cibles AS mc ON mc.rowid=".$obj2->rowid." AND mc.source_type = 'contact' AND mc.source_id = sc.rowid)"; - dol_syslog("fiche.php: set prospect contact status sql=".$sql, LOG_DEBUG); + dol_syslog("fiche.php: set prospect contact status", LOG_DEBUG); $resqlx=$db->query($sqlx); if (! $resqlx) From d1d4c6d8a5e3dd33fadab0304784cdc76a07be8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Thu, 12 Jun 2014 11:45:32 +0200 Subject: [PATCH 004/258] Increased SQL Error to LOG_ERROR level --- htdocs/core/db/mssql.class.php | 2 +- htdocs/core/db/mysql.class.php | 2 +- htdocs/core/db/mysqli.class.php | 2 +- htdocs/core/db/pgsql.class.php | 2 +- htdocs/core/db/sqlite.class.php | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/htdocs/core/db/mssql.class.php b/htdocs/core/db/mssql.class.php index 52c4fc85de1..02edeb7cf16 100644 --- a/htdocs/core/db/mssql.class.php +++ b/htdocs/core/db/mssql.class.php @@ -372,7 +372,7 @@ class DoliDBMssql extends DoliDB $this->lastqueryerror = $query; $this->lasterror = $this->error(); $this->lasterrno = $row["code"]; - dol_syslog(get_class($this)."::query SQL error: ".$query, LOG_WARNING); + dol_syslog(get_class($this)."::query SQL error: ".$query, LOG_ERROR); } $this->lastquery=$query; $this->_results = $ret; diff --git a/htdocs/core/db/mysql.class.php b/htdocs/core/db/mysql.class.php index 5e5b4c360d0..18e40264495 100644 --- a/htdocs/core/db/mysql.class.php +++ b/htdocs/core/db/mysql.class.php @@ -273,7 +273,7 @@ class DoliDBMysql extends DoliDB $this->lastqueryerror = $query; $this->lasterror = $this->error(); $this->lasterrno = $this->errno(); - dol_syslog(get_class($this)."::query SQL error: ".$query." ".$this->lasterrno, LOG_WARNING); + dol_syslog(get_class($this)."::query SQL error: ".$query." ".$this->lasterrno, LOG_ERROR); } $this->lastquery=$query; $this->_results = $ret; diff --git a/htdocs/core/db/mysqli.class.php b/htdocs/core/db/mysqli.class.php index 16915dcd22d..ed73d8621c0 100644 --- a/htdocs/core/db/mysqli.class.php +++ b/htdocs/core/db/mysqli.class.php @@ -275,7 +275,7 @@ class DoliDBMysqli extends DoliDB $this->lastqueryerror = $query; $this->lasterror = $this->error(); $this->lasterrno = $this->errno(); - dol_syslog(get_class($this)."::query SQL error: ".$query." ".$this->lasterrno, LOG_WARNING); + dol_syslog(get_class($this)."::query SQL error: ".$query." ".$this->lasterrno, LOG_ERROR); } $this->lastquery=$query; $this->_results = $ret; diff --git a/htdocs/core/db/pgsql.class.php b/htdocs/core/db/pgsql.class.php index b5959df1f63..8ce4e700d66 100644 --- a/htdocs/core/db/pgsql.class.php +++ b/htdocs/core/db/pgsql.class.php @@ -506,7 +506,7 @@ class DoliDBPgsql extends DoliDB $this->lasterror = $this->error(); $this->lasterrno = $this->errno(); } - dol_syslog(get_class($this)."::query SQL error usesavepoint = ".$usesavepoint." - ".$query." - ".pg_last_error($this->db)." => ".$this->errno(), LOG_WARNING); + dol_syslog(get_class($this)."::query SQL error usesavepoint = ".$usesavepoint." - ".$query." - ".pg_last_error($this->db)." => ".$this->errno(), LOG_ERROR); //print "\n>> ".$query."
\n"; //print '>> '.$this->lasterrno.' - '.$this->lasterror.' - '.$this->lastqueryerror."
\n"; diff --git a/htdocs/core/db/sqlite.class.php b/htdocs/core/db/sqlite.class.php index 45c1bbd182f..39f33341526 100644 --- a/htdocs/core/db/sqlite.class.php +++ b/htdocs/core/db/sqlite.class.php @@ -409,8 +409,8 @@ class DoliDBSqlite extends DoliDB $this->lastqueryerror = $query; $this->lasterror = $this->error(); $this->lasterrno = $this->errno(); - if (preg_match('/[0-9]/',$this->lasterrno)) dol_syslog(get_class($this)."::query SQL error: ".$query." ".$this->lasterrno." ".$this->lasterror, LOG_WARNING); - else dol_syslog(get_class($this)."::query SQL error: ".$query." ".$this->lasterrno, LOG_WARNING); + if (preg_match('/[0-9]/',$this->lasterrno)) dol_syslog(get_class($this)."::query SQL error: ".$query." ".$this->lasterrno." ".$this->lasterror, LOG_ERROR); + else dol_syslog(get_class($this)."::query SQL error: ".$query." ".$this->lasterrno, LOG_ERROR); } $this->lastquery=$query; $this->_results = $ret; From 7e7958cf73dfabee195616e50db43f9fac6e1cd6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Thu, 12 Jun 2014 13:49:05 +0200 Subject: [PATCH 005/258] Removed SQL errors as they are logged by the database handler --- htdocs/categories/class/categorie.class.php | 11 +---------- htdocs/comm/propal/class/propal.class.php | 2 -- htdocs/commande/class/commande.class.php | 1 - htdocs/compta/bank/class/account.class.php | 2 -- .../compta/facture/class/facture-rec.class.php | 1 - htdocs/compta/facture/class/facture.class.php | 16 +++++++--------- .../prelevement/class/bonprelevement.class.php | 3 +-- htdocs/contact/class/contact.class.php | 2 +- htdocs/contrat/class/contrat.class.php | 2 -- htdocs/core/class/commonobject.class.php | 5 ++--- htdocs/core/class/extrafields.class.php | 2 +- htdocs/core/class/link.class.php | 1 - htdocs/core/lib/security.lib.php | 1 - htdocs/core/modules/DolibarrModules.class.php | 5 ++--- htdocs/core/modules/facture/mod_facture_mars.php | 1 - .../core/modules/facture/mod_facture_terre.php | 1 - .../modules/livraison/mod_livraison_jade.php | 1 - .../core/modules/mailings/contacts4.modules.php | 6 ++---- .../modules/societe/mod_codeclient_monkey.php | 3 ++- .../modules/societe/mod_codecompta_aquarium.php | 1 - .../mod_facture_fournisseur_cactus.php | 1 - htdocs/expedition/class/expedition.class.php | 1 - htdocs/exports/class/export.class.php | 1 - htdocs/fichinter/class/fichinter.class.php | 4 ---- .../fourn/class/fournisseur.commande.class.php | 3 --- htdocs/install/upgrade2.php | 2 +- htdocs/livraison/class/livraison.class.php | 3 --- htdocs/societe/class/address.class.php | 1 - htdocs/societe/class/societe.class.php | 4 ---- htdocs/user/class/user.class.php | 3 +-- scripts/emailings/mailing-send.php | 2 +- 31 files changed, 22 insertions(+), 70 deletions(-) diff --git a/htdocs/categories/class/categorie.class.php b/htdocs/categories/class/categorie.class.php index 2d657dc6e1c..e90e0fc626e 100644 --- a/htdocs/categories/class/categorie.class.php +++ b/htdocs/categories/class/categorie.class.php @@ -185,7 +185,7 @@ class Categorie extends CommonObject $sql.= $conf->entity; $sql.= ")"; - dol_syslog(get_class($this).'::create sql='.$sql); + dol_syslog(get_class($this).'::create', LOG_DEBUG); $res = $this->db->query($sql); if ($res) { @@ -232,7 +232,6 @@ class Categorie extends CommonObject else { $this->error=$this->db->error(); - dol_syslog(get_class($this)."::create error ".$this->error." sql=".$sql, LOG_ERR); $this->db->rollback(); return -1; } @@ -346,7 +345,6 @@ class Categorie extends CommonObject if (!$this->db->query($sql)) { $this->error=$this->db->lasterror(); - dol_syslog("Error sql=".$sql." ".$this->error, LOG_ERR); $error++; } } @@ -357,7 +355,6 @@ class Categorie extends CommonObject if (!$this->db->query($sql)) { $this->error=$this->db->lasterror(); - dol_syslog("Error sql=".$sql." ".$this->error, LOG_ERR); $error++; } } @@ -368,7 +365,6 @@ class Categorie extends CommonObject if (!$this->db->query($sql)) { $this->error=$this->db->lasterror(); - dol_syslog("Error sql=".$sql." ".$this->error, LOG_ERR); $error++; } } @@ -379,7 +375,6 @@ class Categorie extends CommonObject if (!$this->db->query($sql)) { $this->error=$this->db->lasterror(); - dol_syslog("Error sql=".$sql." ".$this->error, LOG_ERR); $error++; } } @@ -390,7 +385,6 @@ class Categorie extends CommonObject if (!$this->db->query($sql)) { $this->error=$this->db->lasterror(); - dol_syslog("Error sql=".$sql." ".$this->error, LOG_ERR); $error++; } } @@ -401,7 +395,6 @@ class Categorie extends CommonObject if (!$this->db->query($sql)) { $this->error=$this->db->lasterror(); - dol_syslog("Error sql=".$sql." ".$this->error, LOG_ERR); $error++; } } @@ -414,7 +407,6 @@ class Categorie extends CommonObject if (!$this->db->query($sql)) { $this->error=$this->db->lasterror(); - dol_syslog("Error sql=".$sql." ".$this->error, LOG_ERR); $error++; } else @@ -1006,7 +998,6 @@ class Categorie extends CommonObject else { $this->error=$this->db->error(); - dol_syslog(get_class($this)."::already_exists error ".$this->error." sql=".$sql, LOG_ERR); return -1; } } diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index 5122bd15f51..31b6fc67468 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -2955,7 +2955,6 @@ class PropaleLigne extends CommonObject else { $this->error=$this->db->error()." sql=".$sql; - dol_syslog(get_class($this).'::insert Error '.$this->error, LOG_ERR); $this->db->rollback(); return -1; } @@ -3006,7 +3005,6 @@ class PropaleLigne extends CommonObject else { $this->error=$this->db->error()." sql=".$sql; - dol_syslog("PropaleLigne::delete Error ".$this->error, LOG_ERR); $this->db->rollback(); return -1; } diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index 5af12ef11bb..e9f0ff9e43a 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -233,7 +233,6 @@ class Commande extends CommonOrder $resql=$this->db->query($sql); if (! $resql) { - dol_syslog(get_class($this)."::valid Echec update - 10 - sql=".$sql, LOG_ERR); dol_print_error($this->db); $error++; } diff --git a/htdocs/compta/bank/class/account.class.php b/htdocs/compta/bank/class/account.class.php index 0179149e69f..48e175b0c2e 100644 --- a/htdocs/compta/bank/class/account.class.php +++ b/htdocs/compta/bank/class/account.class.php @@ -448,12 +448,10 @@ class Account extends CommonObject if ($this->db->errno() == 'DB_ERROR_RECORD_ALREADY_EXISTS') { $this->error=$langs->trans("ErrorBankLabelAlreadyExists"); - dol_syslog($this->error, LOG_ERR); return -1; } else { $this->error=$this->db->error()." sql=".$sql; - dol_syslog($this->error, LOG_ERR); return -2; } } diff --git a/htdocs/compta/facture/class/facture-rec.class.php b/htdocs/compta/facture/class/facture-rec.class.php index f87e640d78e..39d5d7ca398 100644 --- a/htdocs/compta/facture/class/facture-rec.class.php +++ b/htdocs/compta/facture/class/facture-rec.class.php @@ -507,7 +507,6 @@ class FactureRec extends Facture else { $this->error=$this->db->lasterror(); - dol_syslog("FactureRec::addline sql=".$this->error, LOG_ERR); return -1; } } diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index 48d6e4d34e8..36ea7739652 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -516,7 +516,6 @@ class Facture extends CommonInvoice else { $this->error=$this->db->error(); - dol_syslog(get_class($this)."::create error ".$this->error." sql=".$sql, LOG_ERR); $this->db->rollback(); return -1; } @@ -1315,7 +1314,6 @@ class Facture extends CommonInvoice if (! $this->db->query($sql)) { $this->error=$this->db->error()." sql=".$sql; - dol_syslog(get_class($this)."::delete ".$this->error, LOG_ERR); $this->db->rollback(); return -5; } @@ -1344,9 +1342,15 @@ class Facture extends CommonInvoice // Delete invoice line $sql = 'DELETE FROM '.MAIN_DB_PREFIX.'facturedet WHERE fk_facture = '.$rowid; + + dol_syslog(get_class($this)."::delete", LOG_DEBUG); + if ($this->db->query($sql) && $this->delete_linked_contact()) { $sql = 'DELETE FROM '.MAIN_DB_PREFIX.'facture WHERE rowid = '.$rowid; + + dol_syslog(get_class($this)."::delete", LOG_DEBUG); + $resql=$this->db->query($sql); if ($resql) { @@ -1384,7 +1388,6 @@ class Facture extends CommonInvoice else { $this->error=$this->db->lasterror()." sql=".$sql; - dol_syslog(get_class($this)."::delete ".$this->error, LOG_ERR); $this->db->rollback(); return -6; } @@ -1392,7 +1395,6 @@ class Facture extends CommonInvoice else { $this->error=$this->db->lasterror()." sql=".$sql; - dol_syslog(get_class($this)."::delete ".$this->error, LOG_ERR); $this->db->rollback(); return -4; } @@ -1400,7 +1402,6 @@ class Facture extends CommonInvoice else { $this->error=$this->db->lasterror(); - dol_syslog(get_class($this)."::delete ".$this->error, LOG_ERR); $this->db->rollback(); return -2; } @@ -1771,7 +1772,6 @@ class Facture extends CommonInvoice $resql=$this->db->query($sql); if (! $resql) { - dol_syslog(get_class($this)."::validate Echec update - 10 - sql=".$sql, LOG_ERR); dol_print_error($this->db); $error++; } @@ -3255,7 +3255,7 @@ class Facture extends CommonInvoice $sql.= ' WHERE l.fk_facture = '.$this->id; $sql.= ' ORDER BY l.rang ASC, l.rowid'; - dol_syslog(get_class($this).'::getLinesArray sql='.$sql,LOG_DEBUG); + dol_syslog(get_class($this).'::getLinesArray',LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { @@ -3305,7 +3305,6 @@ class Facture extends CommonInvoice else { $this->error=$this->db->error(); - dol_syslog("Error sql=".$sql.", error=".$this->error,LOG_ERR); return -1; } } @@ -3802,7 +3801,6 @@ class FactureLigne extends CommonInvoiceLine else { $this->error=$this->db->error()." sql=".$sql; - dol_syslog(get_class($this)."::delete Error ".$this->error, LOG_ERR); $this->db->rollback(); return -1; } diff --git a/htdocs/compta/prelevement/class/bonprelevement.class.php b/htdocs/compta/prelevement/class/bonprelevement.class.php index 3d224bbe274..759981b696e 100644 --- a/htdocs/compta/prelevement/class/bonprelevement.class.php +++ b/htdocs/compta/prelevement/class/bonprelevement.class.php @@ -314,7 +314,6 @@ class BonPrelevement extends CommonObject } else { - dol_syslog(get_class($this)."::Fetch Erreur sql=".$sql, LOG_ERR); return -2; } } @@ -705,6 +704,7 @@ class BonPrelevement extends CommonObject //if ($banque) $sql.= " AND sr.code_banque = '".$conf->global->PRELEVEMENT_CODE_BANQUE."'"; //if ($agence) $sql.= " AND sr.code_guichet = '".$conf->global->PRELEVEMENT_CODE_GUICHET."'"; + dol_syslog(get_class($this)."::SommeAPrelever"); $resql = $this->db->query($sql); if ( $resql ) @@ -718,7 +718,6 @@ class BonPrelevement extends CommonObject else { $this->error=get_class($this)."::SommeAPrelever Erreur -1 sql=".$this->db->error(); - dol_syslog($this->error, LOG_ERR); return -1; } } diff --git a/htdocs/contact/class/contact.class.php b/htdocs/contact/class/contact.class.php index 727fa6486a9..26827a3d504 100644 --- a/htdocs/contact/class/contact.class.php +++ b/htdocs/contact/class/contact.class.php @@ -729,7 +729,7 @@ class Contact extends CommonObject $sqldel = "DELETE FROM ".MAIN_DB_PREFIX."element_contact"; $sqldel.=" WHERE rowid = ".$obj->rowid; - dol_syslog(get_class($this)."::delete sql=".$sqldel); + dol_syslog(get_class($this)."::delete", LOG_DEBUG); $result = $this->db->query($sqldel); if (! $result) { diff --git a/htdocs/contrat/class/contrat.class.php b/htdocs/contrat/class/contrat.class.php index 140d64c2daf..173a7239e4e 100644 --- a/htdocs/contrat/class/contrat.class.php +++ b/htdocs/contrat/class/contrat.class.php @@ -319,7 +319,6 @@ class Contrat extends CommonObject $resql = $this->db->query($sql); if (! $resql) { - dol_syslog(get_class($this)."::validate Echec update - 10 - sql=".$sql, LOG_ERR); dol_print_error($this->db); $error++; } @@ -1089,7 +1088,6 @@ class Contrat extends CommonObject { $this->db->rollback(); $this->error=$this->db->error()." sql=".$sql; - dol_syslog(get_class($this)."::addline ".$this->error,LOG_ERR); return -1; } } diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 2eb63db6d9b..0c366cb561f 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -2158,12 +2158,11 @@ abstract class CommonObject $this->db->begin(); $sql_del = "DELETE FROM ".MAIN_DB_PREFIX.$this->table_element."_extrafields WHERE fk_object = ".$this->id; - dol_syslog(get_class($this)."::deleteExtraFields delete sql=".$sql_del); + dol_syslog(get_class($this)."::deleteExtraFields delete", LOG_DEBUG); $resql=$this->db->query($sql_del); if (! $resql) { $this->error=$this->db->lasterror(); - dol_syslog(get_class($this)."::deleteExtraFields ".$this->error,LOG_ERR); $this->db->rollback(); return -1; } @@ -2229,7 +2228,7 @@ abstract class CommonObject $this->db->begin(); $sql_del = "DELETE FROM ".MAIN_DB_PREFIX.$this->table_element."_extrafields WHERE fk_object = ".$this->id; - dol_syslog(get_class($this)."::insertExtraFields delete sql=".$sql_del); + dol_syslog(get_class($this)."::insertExtraFields delete", LOG_DEBUG); $this->db->query($sql_del); $sql = "INSERT INTO ".MAIN_DB_PREFIX.$this->table_element."_extrafields (fk_object"; foreach($this->array_options as $key => $value) diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index df6d16767d6..84279b7eb9e 100644 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -454,7 +454,7 @@ class ExtraFields $sql_del.= " WHERE name = '".$attrname."'"; $sql_del.= " AND entity = ".$conf->entity; $sql_del.= " AND elementtype = '".$elementtype."'"; - dol_syslog(get_class($this)."::update_label sql=".$sql_del); + dol_syslog(get_class($this)."::update_label", LOG_DEBUG); $resql1=$this->db->query($sql_del); $sql = "INSERT INTO ".MAIN_DB_PREFIX."extrafields("; diff --git a/htdocs/core/class/link.class.php b/htdocs/core/class/link.class.php index e92aa273105..85c365d3443 100644 --- a/htdocs/core/class/link.class.php +++ b/htdocs/core/class/link.class.php @@ -136,7 +136,6 @@ class Link extends CommonObject else { $this->error=$this->db->lasterror(); - dol_syslog(get_class($this)."::Create fails insert sql=".$sql, LOG_ERR); $result=-2; } $this->db->rollback(); diff --git a/htdocs/core/lib/security.lib.php b/htdocs/core/lib/security.lib.php index 31e900f8e7e..c8cccefda7f 100644 --- a/htdocs/core/lib/security.lib.php +++ b/htdocs/core/lib/security.lib.php @@ -470,7 +470,6 @@ function restrictedArea($user, $features, $objectid=0, $dbtablename='', $feature } else { - dol_syslog("security.lib:restrictedArea sql=".$sql, LOG_ERR); accessforbidden(); } } diff --git a/htdocs/core/modules/DolibarrModules.class.php b/htdocs/core/modules/DolibarrModules.class.php index 9809c418f0c..f8456b4cf23 100644 --- a/htdocs/core/modules/DolibarrModules.class.php +++ b/htdocs/core/modules/DolibarrModules.class.php @@ -188,12 +188,11 @@ abstract class DolibarrModules { if (! $err) { - dol_syslog(get_class($this)."::_remove sql=".$array_sql[$i], LOG_DEBUG); + dol_syslog(get_class($this)."::_remove", LOG_DEBUG); $result=$this->db->query($array_sql[$i]); if (! $result) { $this->error=$this->db->error(); - dol_syslog(get_class($this)."::_remove Error ".$this->error, LOG_ERR); $err++; } } @@ -859,7 +858,7 @@ abstract class DolibarrModules $sql_del.= " WHERE ".$this->db->decrypt('name')." = '".$this->const_name."'"; $sql_del.= " AND entity IN (0,".$entity.")"; - dol_syslog(get_class($this)."::insert_permissions sql=".$sql_del); + dol_syslog(get_class($this)."::insert_permissions", LOG_DEBUG); $resql=$this->db->query($sql_del); if ($resql) { diff --git a/htdocs/core/modules/facture/mod_facture_mars.php b/htdocs/core/modules/facture/mod_facture_mars.php index 100b9193fd5..25c6d2cd2ad 100644 --- a/htdocs/core/modules/facture/mod_facture_mars.php +++ b/htdocs/core/modules/facture/mod_facture_mars.php @@ -153,7 +153,6 @@ class mod_facture_mars extends ModeleNumRefFactures } else { - dol_syslog(get_class($this)."::getNextValue sql=".$sql, LOG_ERR); return -1; } diff --git a/htdocs/core/modules/facture/mod_facture_terre.php b/htdocs/core/modules/facture/mod_facture_terre.php index 6270bb9ae9c..dc06c6202ec 100644 --- a/htdocs/core/modules/facture/mod_facture_terre.php +++ b/htdocs/core/modules/facture/mod_facture_terre.php @@ -169,7 +169,6 @@ class mod_facture_terre extends ModeleNumRefFactures } else { - dol_syslog(get_class($this)."::getNextValue sql=".$sql, LOG_ERR); return -1; } diff --git a/htdocs/core/modules/livraison/mod_livraison_jade.php b/htdocs/core/modules/livraison/mod_livraison_jade.php index e7cd8c926ac..3480bb6d609 100644 --- a/htdocs/core/modules/livraison/mod_livraison_jade.php +++ b/htdocs/core/modules/livraison/mod_livraison_jade.php @@ -127,7 +127,6 @@ class mod_livraison_jade extends ModeleNumRefDeliveryOrder } else { - dol_syslog("mod_livraison_jade::getNextValue sql=".$sql, LOG_ERR); return -1; } diff --git a/htdocs/core/modules/mailings/contacts4.modules.php b/htdocs/core/modules/mailings/contacts4.modules.php index acf4a316660..eb14b3995f4 100644 --- a/htdocs/core/modules/mailings/contacts4.modules.php +++ b/htdocs/core/modules/mailings/contacts4.modules.php @@ -89,7 +89,7 @@ class mailing_contacts4 extends MailingTargets if ($filtersarray[0] <> 'all') $sql.= " AND c.label = '".$this->db->escape($filtersarray[0])."'"; $sql.= " ORDER BY sp.lastname, sp.firstname"; - dol_syslog(get_class($this).':: add_to_target sql='.$sql,LOG_DEBUG); + dol_syslog(get_class($this).':: add_to_target',LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { @@ -115,7 +115,6 @@ class mailing_contacts4 extends MailingTargets } }else { $this->error=$this->db->lasterrno(); - dol_syslog(get_class($this)."Error sql=".$sql." ".$this->error, LOG_ERR); return -1; } @@ -215,7 +214,7 @@ class mailing_contacts4 extends MailingTargets $resql = $this->db->query($sql); - dol_syslog(get_class($this).':: formFilter sql='.$sql,LOG_DEBUG); + dol_syslog(get_class($this).':: formFilter',LOG_DEBUG); if ($resql) { $s=''; $s.=''; print ''; @@ -182,15 +180,13 @@ if ($action == 'create') print ''.$langs->trans("Label").''; // Date start - print ""; - print ''.$langs->trans("DateStart").''; - print $form->select_date($datestart?$datestart:-1,'','','','','add',1,1); + print ''.$langs->trans("DateStart").''; + print $form->select_date(($date_start?$date_start:''),'fiscalyear'); print ''; - - // Date end - print ""; - print ''.$langs->trans("DateEnd").''; - print $form->select_date($dateend?$dateend:-1,'','','','','add',1,1); + + // Date end + print ''.$langs->trans("DateEnd").''; + print $form->select_date(($date_end?$date_end:-1),'fiscalyearend'); print ''; // Statut @@ -212,6 +208,10 @@ else if ($id) { dol_htmloutput_mesg($mesg); + $head = fiscalyear_prepare_head($object); + + dol_fiche_head($head, 'card', $langs->trans("FiscalYearCard"), 0, 'cron'); + if ($action == 'edit') { print '
' . "\n"; @@ -224,7 +224,7 @@ else if ($id) // Ref print ""; print ''.$langs->trans("Ref").''; - print $object->rowid; + print $object->ref; print ''; // Label @@ -262,14 +262,14 @@ else if ($id) print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$id,$langs->trans("DeleteFiscalYear"),$langs->trans("ConfirmDeleteFiscalYear"),"confirm_delete"); } - - print ''; + + print '
'; $linkback = ''.$langs->trans("BackToList").''; - + // Ref print ''; diff --git a/htdocs/core/class/fiscalyear.class.php b/htdocs/core/class/fiscalyear.class.php index 3d48d47a082..6956884e733 100644 --- a/htdocs/core/class/fiscalyear.class.php +++ b/htdocs/core/class/fiscalyear.class.php @@ -18,7 +18,7 @@ /** * \file htdocs/core/class/fiscalyear.php * \ingroup fiscal year - * \brief Page d'administration/configuration + * \brief File of class to manage fiscal years */ require_once DOL_DOCUMENT_ROOT .'/core/class/commonobject.class.php'; @@ -28,7 +28,7 @@ require_once DOL_DOCUMENT_ROOT .'/core/class/commonobject.class.php'; */ class Fiscalyear { - public $element='Fiscalyear'; + public $element='fiscalyear'; public $table_element='accounting_fiscalyear'; public $table_element_line = ''; public $fk_element = ''; @@ -69,11 +69,13 @@ class Fiscalyear function create() { global $conf; + + $error = 0; $this->db->begin(); $sql = "INSERT INTO ".MAIN_DB_PREFIX."accounting_fiscalyear ("; - $sql.= " label"; + $sql.= "label"; $sql.= ", datestart"; $sql.= ", dateend"; $sql.= ", statut"; @@ -216,7 +218,34 @@ class Fiscalyear return -1; } } - + + /** + * Delete record + * + * @param int $id Id of record to delete + * @return int <0 if KO, >0 if OK + */ + function delete($id) + { + $this->db->begin(); + + $sql = "DELETE FROM ".MAIN_DB_PREFIX."accounting_fiscalyear WHERE rowid = ".$id; + + dol_syslog(get_class($this)."::delete sql=".$sql, LOG_DEBUG); + $result = $this->db->query($sql); + if ($result) + { + $this->db->commit(); + return 1; + } + else + { + $this->error=$this->db->error(); + $this->db->rollback(); + return -1; + } + } + /** * Give a label from a status * @@ -249,23 +278,23 @@ class Fiscalyear } if ($mode == 2) { - if ($statut==0) return img_picto($langs->trans($this->statuts_short[$statut]),'statut0').' '.$langs->trans($this->statuts_short[$statut]); - if ($statut==1) return img_picto($langs->trans($this->statuts_short[$statut]),'statut4').' '.$langs->trans($this->statuts_short[$statut]); + if ($statut==0) return img_picto($langs->trans($this->statuts_short[$statut]),'statut4').' '.$langs->trans($this->statuts_short[$statut]); + if ($statut==1) return img_picto($langs->trans($this->statuts_short[$statut]),'statut8').' '.$langs->trans($this->statuts_short[$statut]); } if ($mode == 3) { - if ($statut==0 && ! empty($this->statuts_short[$statut])) return img_picto($langs->trans($this->statuts_short[$statut]),'statut0'); - if ($statut==1 && ! empty($this->statuts_short[$statut])) return img_picto($langs->trans($this->statuts_short[$statut]),'statut4'); + if ($statut==0 && ! empty($this->statuts_short[$statut])) return img_picto($langs->trans($this->statuts_short[$statut]),'statut4'); + if ($statut==1 && ! empty($this->statuts_short[$statut])) return img_picto($langs->trans($this->statuts_short[$statut]),'statut8'); } if ($mode == 4) { - if ($statut==0 && ! empty($this->statuts_short[$statut])) return img_picto($langs->trans($this->statuts_short[$statut]),'statut0').' '.$langs->trans($this->statuts[$statut]); - if ($statut==1 && ! empty($this->statuts_short[$statut])) return img_picto($langs->trans($this->statuts_short[$statut]),'statut4').' '.$langs->trans($this->statuts[$statut]); + if ($statut==0 && ! empty($this->statuts_short[$statut])) return img_picto($langs->trans($this->statuts_short[$statut]),'statut4').' '.$langs->trans($this->statuts[$statut]); + if ($statut==1 && ! empty($this->statuts_short[$statut])) return img_picto($langs->trans($this->statuts_short[$statut]),'statut8').' '.$langs->trans($this->statuts[$statut]); } if ($mode == 5) { - if ($statut==0 && ! empty($this->statuts_short[$statut])) return $langs->trans($this->statuts_short[$statut]).' '.img_picto($langs->trans($this->statuts_short[$statut]),'statut0'); - if ($statut==1 && ! empty($this->statuts_short[$statut])) return $langs->trans($this->statuts_short[$statut]).' '.img_picto($langs->trans($this->statuts_short[$statut]),'statut4'); + if ($statut==0 && ! empty($this->statuts_short[$statut])) return $langs->trans($this->statuts_short[$statut]).' '.img_picto($langs->trans($this->statuts_short[$statut]),'statut4'); + if ($statut==1 && ! empty($this->statuts_short[$statut])) return $langs->trans($this->statuts_short[$statut]).' '.img_picto($langs->trans($this->statuts_short[$statut]),'statut8'); } } diff --git a/htdocs/core/lib/fiscalyear.lib.php b/htdocs/core/lib/fiscalyear.lib.php new file mode 100644 index 00000000000..6865c875efa --- /dev/null +++ b/htdocs/core/lib/fiscalyear.lib.php @@ -0,0 +1,51 @@ + + * + * 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 + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * or see http://www.gnu.org/ + */ + +/** + * \file htdocs/core/lib/fiscalyear.lib.php + * \brief Set basic functions for fiscal years + */ + +/** + * Prepare array with list of tabs + * + * @param Object $object Object related to tabs + * @return array Array of tabs to shoc + */ +function fiscalyear_prepare_head($object) +{ + global $langs, $conf; + + $h = 0; + $head = array(); + + $head[$h][0] = DOL_URL_ROOT . '/admin/fiscalyear_card.php?id=' . $object->id; + $head[$h][1] = $langs->trans("Card"); + $head[$h][2] = 'card'; + $h++; + + // Show more tabs from modules + // Entries must be declared in modules descriptor with line + // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab + // $this->tabs = array('entity:-tabname); to remove a tab + complete_head_from_modules($conf,$langs,$object,$head,$h,'fiscalyear'); + + complete_head_from_modules($conf,$langs,$object,$head,$h,'fiscalyear','remove'); + + return $head; +} \ No newline at end of file diff --git a/htdocs/langs/fr_FR/admin.lang b/htdocs/langs/fr_FR/admin.lang index 0c9d9c92481..e04bbe72483 100644 --- a/htdocs/langs/fr_FR/admin.lang +++ b/htdocs/langs/fr_FR/admin.lang @@ -1504,9 +1504,15 @@ TaskModelModule=Modèles de document de rapport tâches ECMSetup = Configuration du module GED ECMAutoTree = L'arborescence automatique est disponible ##### Fiscal Year ##### -Fiscalyear=Exercices fiscaux +FiscalYears=Exercices fiscaux +FiscalYear=Exercice fiscal +FiscalYearCard=Fiche exercice fiscal +NewFiscalYear=Nouvel exercice fiscal +EditFiscalYear=Editer exercice fiscal OpenFiscalYear=Exercice fiscal ouvert CloseFiscalYear=Exercice fiscal fermé +DeleteFiscalYear=Supprimer exercice fiscal +ConfirmDeleteFiscalYear=Êtes-vous sûr de vouloir supprimer cet exercice fiscal ? Opened=Ouvert Closed=Fermé From 57b546650a81f004c1f48da93cdce8b332b27147 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 30 Jun 2014 19:03:52 +0200 Subject: [PATCH 013/258] Fix: Hide title of event when agenda module disabled. --- ChangeLog | 1 + htdocs/contact/fiche.php | 13 ++++++++----- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 72cc7bbcede..cfe4950e2f1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,7 @@ English Dolibarr ChangeLog -------------------------------------------------------------- ***** ChangeLog for 3.5.4 compared to 3.5.3 ***** +Fix: Hide title of event when agenda module disabled. Fix: When using option MAIN_MAIL_ALLOW_SENDMAIL_F, a mail was sent to sender. Fix: Question about warehouse must not be done when module stock is disabled. Fix: Option STOCK_SUPPORTS_SERVICES was not correctly implemented diff --git a/htdocs/contact/fiche.php b/htdocs/contact/fiche.php index 0becec81abb..3519583d96c 100644 --- a/htdocs/contact/fiche.php +++ b/htdocs/contact/fiche.php @@ -749,7 +749,7 @@ else $doleditor = new DolEditor('note_public', $object->note_public, '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, 70); print $doleditor->Create(1); print ''; - + // Note Private print ''; - + // Note Private print ''; - -print_liste_field_titre( - $langs->trans('Ref'), - $_SERVER["PHP_SELF"], - 'p.ref', - $param, - '', - '', - $sortfield, - $sortorder -); -print_liste_field_titre( - $langs->trans('Label'), - $_SERVER["PHP_SELF"], - 'p.label', - $param, - '', - '', - $sortfield, - $sortorder -); -if (!empty($conf->service->enabled) && $type == 1) -{ - print_liste_field_titre( - $langs->trans('Duration'), - $_SERVER["PHP_SELF"], - 'p.duration', - $param, - '', - 'align="center"', - $sortfield, - $sortorder - ); -} -print_liste_field_titre( - $langs->trans('DesiredStock'), - $_SERVER["PHP_SELF"], - 'p.desiredstock', - $param, - '', - 'align="right"', - $sortfield, - $sortorder -); - $stocklabel = $langs->trans('Stock'); if ($usevirtualstock == 1) $stocklabel = $langs->trans('VirtualStock'); if ($usevirtualstock == 0) $stocklabel = $langs->trans('PhysicalStock'); -print_liste_field_titre( - $stocklabel, - $_SERVER["PHP_SELF"], - 'stock_physique', - $param, - '', - 'align="right"', - $sortfield, - $sortorder -); -print_liste_field_titre( - $langs->trans('Ordered'), - $_SERVER["PHP_SELF"], - '', - $param, - '', - 'align="right"', - $sortfield, - $sortorder -); -print_liste_field_titre( - $langs->trans('StockToBuy'), - $_SERVER["PHP_SELF"], - '', - $param, - '', - 'align="right"', - $sortfield, - $sortorder -); -print_liste_field_titre( - $langs->trans('Supplier'), - $_SERVER["PHP_SELF"], - '', - $param, - '', - 'align="right"', - $sortfield, - $sortorder -); + +// Lines of title +print ''; + +print_liste_field_titre($langs->trans('Ref'), $_SERVER["PHP_SELF"], 'p.ref', $param, '', '', $sortfield, $sortorder); +print_liste_field_titre($langs->trans('Label'), $_SERVER["PHP_SELF"], 'p.label', $param, '', '', $sortfield, $sortorder); +if (!empty($conf->service->enabled) && $type == 1) print_liste_field_titre($langs->trans('Duration'), $_SERVER["PHP_SELF"], 'p.duration', $param, '', 'align="center"', $sortfield, $sortorder); +print_liste_field_titre($langs->trans('DesiredStock'), $_SERVER["PHP_SELF"], 'p.desiredstock', $param, '', 'align="right"', $sortfield, $sortorder); +print_liste_field_titre($langs->trans('StockLimitShort'), $_SERVER["PHP_SELF"], 'p.seuil_stock_alerte', $param, '', 'align="right"', $sortfield, $sortorder); +print_liste_field_titre($stocklabel, $_SERVER["PHP_SELF"], 'stock_physique', $param, '', 'align="right"', $sortfield, $sortorder); +print_liste_field_titre($langs->trans('Ordered'), $_SERVER["PHP_SELF"], '', $param, '', 'align="right"', $sortfield, $sortorder); +print_liste_field_titre($langs->trans('StockToBuy'), $_SERVER["PHP_SELF"], '', $param, '', 'align="right"', $sortfield, $sortorder); +print_liste_field_titre($langs->trans('Supplier'), $_SERVER["PHP_SELF"], '', $param, '', 'align="right"', $sortfield, $sortorder); + print ''; // Lignes des champs de filtre print ''. ''. -''. -''; -if (!empty($conf->service->enabled) && $type == 1) -{ - print ''; -} +''. +''; +if (!empty($conf->service->enabled) && $type == 1) print ''; print ''. - ''. + ''. + ''. ''. ''. ''. - ''; + ''; +print ''; $prod = new Product($db); @@ -533,35 +462,21 @@ while ($i < ($limit ? min($num, $limit) : $num)) } $stock_commande_fournisseur = $prod->stats_commande_fournisseur['qty']; $stock = $objp->stock_physique - $stock_commande_client + $stock_commande_fournisseur; + var_dump($stock_commande_fournisseur); } else { $stock = $objp->stock_physique; } $warning=''; - if ($objp->seuil_stock_alerte && ($stock < $objp->seuil_stock_alerte)) + if ($objp->alertstock && ($stock < $objp->alertstock)) { $warning = img_warning($langs->trans('StockTooLow')) . ' '; } //depending on conf, use either physical stock or //virtual stock to compute the stock to buy value - $stocktobuy = max($objp->desiredstock - $stock - $ordered, 0); - /* - $disabled = ''; - if($ordered > 0) - { - if ($ordered + $stock >= $objp->desiredstock) - { - $picto = img_picto('', 'ok', ''); - $disabled = 'disabled="disabled"'; - } - else { - $picto = img_picto($langs->trans("NotEnough"), 'warning', ''); - } - } else { - $picto = img_picto('', 'info', ''); - }*/ + $stocktobuy = max(max($objp->desiredstock, $objp->alertstock) - $stock - $ordered, 0); print ''; @@ -590,6 +505,9 @@ while ($i < ($limit ? min($num, $limit) : $num)) // Desired stock print ''; + // Limit stock for alerr + print ''; + // Current stock print ''; From 2537a9d35fd2f4414c01a592487d571583e21ca5 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 2 Jul 2014 19:44:25 +0200 Subject: [PATCH 016/258] Fix: Error if module multicompany was removed without being disabled. --- htdocs/user/fiche.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/user/fiche.php b/htdocs/user/fiche.php index 359b42856ab..f71cd7565fb 100644 --- a/htdocs/user/fiche.php +++ b/htdocs/user/fiche.php @@ -909,7 +909,7 @@ if (($action == 'create') || ($action == 'adduserldap')) // Multicompany if (! empty($conf->multicompany->enabled)) { - if (empty($conf->multicompany->transverse_mode) && $conf->entity == 1 && $user->admin && ! $user->entity) + if (empty($conf->multicompany->transverse_mode) && $conf->entity == 1 && $user->admin && ! $user->entity && is_object($mc)) { print "".''; print "'; print "\n"; @@ -603,6 +639,16 @@ if ($action == 'edit' || $action == 'updateedit') print ""; $example=$langs->transcountry("LocalTax2IsUsedExample",$mysoc->country_code); print ($example!="LocalTax2IsUsedExample"?"\n":""); + print ''; + } + print ''; print "
'.$langs->trans("Ref").''; - print $object->rowid; + print $object->ref; print ''; print $linkback; print '
'.$langs->trans("NotePrivate").''; $doleditor = new DolEditor('note_private', $object->note_private, '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, 70); @@ -971,7 +971,7 @@ else print '
'.$langs->trans("NotePublic").''; print nl2br($object->note_public); print '
'.$langs->trans("NotePrivate").''; print nl2br($object->note_private); @@ -1068,11 +1068,14 @@ else print "
"; } - print load_fiche_titre($langs->trans("TasksHistoryForThisContact"),'',''); + if (! empty($conf->agenda->enabled)) + { + print load_fiche_titre($langs->trans("TasksHistoryForThisContact"),'',''); - print show_actions_todo($conf,$langs,$db,$objsoc,$object); + print show_actions_todo($conf,$langs,$db,$objsoc,$object); - print show_actions_done($conf,$langs,$db,$objsoc,$object); + print show_actions_done($conf,$langs,$db,$objsoc,$object); + } } } From b70a090de2fcb031c17f5e155e2ff9c1d217156c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Wed, 2 Jul 2014 19:10:17 +0200 Subject: [PATCH 014/258] Corrected English typo --- htdocs/langs/en_US/users.lang | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/langs/en_US/users.lang b/htdocs/langs/en_US/users.lang index 2c797b7ac97..c4742cc87e3 100644 --- a/htdocs/langs/en_US/users.lang +++ b/htdocs/langs/en_US/users.lang @@ -86,7 +86,7 @@ MyInformations=My data ExportDataset_user_1=Dolibarr's users and properties DomainUser=Domain user %s Reactivate=Reactivate -CreateInternalUserDesc=This form allows you to creat an user internal to your company/foundation. To creat an external user (customer, supplier, ...), use button 'Create Dolibarr user' from third party's contact card. +CreateInternalUserDesc=This form allows you to create an user internal to your company/foundation. To create an external user (customer, supplier, ...), use the button 'Create Dolibarr user' from third party's contact card. InternalExternalDesc=An internal user is a user that is part of your company/foundation.
An external user is a customer, supplier or other.

In both cases, permissions defines rights on Dolibarr, also external user can have a different menu manager than internal user (See Home - Setup - Display) PermissionInheritedFromAGroup=Permission granted because inherited from one of a user's group. Inherited=Inherited From c2f0d84e454a0deca35c8653081d2ddd77885e7d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 2 Jul 2014 19:35:02 +0200 Subject: [PATCH 015/258] =?UTF-8?q?Fix:=20[=20bug=20#1512=20]=20Manque=20d?= =?UTF-8?q?es=20produits=20dans=20la=20page=20r=C3=A9approvisionement?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/langs/en_US/stocks.lang | 4 +- htdocs/product/stock/replenish.php | 182 ++++++++--------------------- 2 files changed, 52 insertions(+), 134 deletions(-) diff --git a/htdocs/langs/en_US/stocks.lang b/htdocs/langs/en_US/stocks.lang index 08992207628..7a08148c9ce 100644 --- a/htdocs/langs/en_US/stocks.lang +++ b/htdocs/langs/en_US/stocks.lang @@ -62,8 +62,8 @@ OrderStatusNotReadyToDispatch=Order has not yet or no more a status that allows StockDiffPhysicTeoric=Reason for difference stock physical and theoretical NoPredefinedProductToDispatch=No predefined products for this object. So no dispatching in stock is required. DispatchVerb=Dispatch -StockLimitShort=Limit -StockLimit=Stock limit for alerts +StockLimitShort=Limit for alert +StockLimit=Stock limit for alert PhysicalStock=Physical stock RealStock=Real Stock VirtualStock=Virtual stock diff --git a/htdocs/product/stock/replenish.php b/htdocs/product/stock/replenish.php index fc3591efc71..6aee0bada53 100644 --- a/htdocs/product/stock/replenish.php +++ b/htdocs/product/stock/replenish.php @@ -64,7 +64,7 @@ if (!$sortorder) { $limit = $conf->liste_limit; $offset = $limit * $page ; -// Force limit to non (currently solution to solve loosing selection when using pagination. No pagination on this page) +// Force limit to no (currently solution to solve loosing selection when using pagination. No pagination on this page) $limit = 0; @@ -190,9 +190,10 @@ if ($action == 'order' && isset($_POST['valid'])) $form = new Form($db); $virtualdiffersfromphysical=0; -if (! empty($conf->global->STOCK_CALCULATE_ON_SHIPMENT) - || ! empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER) - ) $virtualdiffersfromphysical=1; // According to increase/decrease stock options, virtual and physical stock may differs. +if (! empty($conf->global->STOCK_CALCULATE_ON_SHIPMENT) || ! empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER)) +{ + $virtualdiffersfromphysical=1; // According to increase/decrease stock options, virtual and physical stock may differs. +} $usevirtualstock=-1; if ($virtualdiffersfromphysical) @@ -206,8 +207,8 @@ $title = $langs->trans('Status'); $sql = 'SELECT p.rowid, p.ref, p.label, p.price,'; $sql.= ' p.price_ttc, p.price_base_type,p.fk_product_type,'; -$sql.= ' p.tms as datem, p.duration, p.tobuy, p.seuil_stock_alerte,'; -$sql.= ' p.desiredstock,'; +$sql.= ' p.tms as datem, p.duration, p.tobuy,'; +$sql.= ' p.desiredstock, p.seuil_stock_alerte as alertstock,'; $sql.= ' SUM('.$db->ifsql("s.reel IS NULL", "0", "s.reel").') as stock_physique'; $sql.= ' FROM ' . MAIN_DB_PREFIX . 'product as p'; $sql.= ' LEFT JOIN ' . MAIN_DB_PREFIX . 'product_stock as s'; @@ -245,10 +246,12 @@ $sql.= ' AND p.tobuy = 1'; if (!empty($canvas)) $sql .= ' AND p.canvas = "' . $db->escape($canvas) . '"'; $sql.= ' GROUP BY p.rowid, p.ref, p.label, p.price'; $sql.= ', p.price_ttc, p.price_base_type,p.fk_product_type, p.tms'; -$sql.= ', p.duration, p.tobuy, p.seuil_stock_alerte'; -$sql.= ', p.desiredstock, s.fk_product'; +$sql.= ', p.duration, p.tobuy'; +$sql.= ', p.desiredstock, p.seuil_stock_alerte'; +$sql.= ', s.fk_product'; -if($usevirtualstock) { +if ($usevirtualstock) +{ $sqlCommandesCli = "(SELECT SUM(cd.qty) as qty"; $sqlCommandesCli.= " FROM ".MAIN_DB_PREFIX."commandedet as cd"; $sqlCommandesCli.= ", ".MAIN_DB_PREFIX."commande as c"; @@ -265,11 +268,14 @@ if($usevirtualstock) { $sqlCommandesFourn.= " AND cd.fk_product = p.rowid"; $sqlCommandesFourn.= " AND c.fk_statut in (3))"; - $sql.= ' HAVING p.desiredstock > SUM('.$db->ifsql("s.reel IS NULL", "0", "s.reel").')'; - $sql.= ' - '.$db->ifsql($sqlCommandesCli.' IS NULL', '0', $sqlCommandesCli).' + '.$db->ifsql($sqlCommandesFourn.' IS NULL', '0', $sqlCommandesFourn); + $sql.= ' HAVING ((p.desiredstock > 0 AND p.desiredstock > (SUM('.$db->ifsql("s.reel IS NULL", "0", "s.reel").')'; + $sql.= ' - '.$db->ifsql($sqlCommandesCli.' IS NULL', '0', $sqlCommandesCli).' + '.$db->ifsql($sqlCommandesFourn.' IS NULL', '0', $sqlCommandesFourn).'))'; + + $sql.= ' OR (p.seuil_stock_alerte > 0 AND p.seuil_stock_alerte > (SUM('.$db->ifsql("s.reel IS NULL", "0", "s.reel").')'; + $sql.= ' - '.$db->ifsql($sqlCommandesCli.' IS NULL', '0', $sqlCommandesCli).' + '.$db->ifsql($sqlCommandesFourn.' IS NULL', '0', $sqlCommandesFourn).'))'; + $sql.= " )"; } else { - $sql.= ' HAVING p.desiredstock > SUM('.$db->ifsql("s.reel IS NULL", "0", "s.reel").')'; - $sql.= ' AND p.desiredstock > 0'; + $sql.= ' HAVING ((p.desiredstock > 0 AND (p.desiredstock > SUM('.$db->ifsql("s.reel IS NULL", "0", "s.reel").'))) OR (p.seuil_stock_alerte > 0 AND (seuil_stock_alerte > SUM('.$db->ifsql("s.reel IS NULL", "0", "s.reel").'))))'; } if ($salert == 'on') // Option to see when stock is lower than alert { @@ -277,8 +283,9 @@ if ($salert == 'on') // Option to see when stock is lower than alert $alertchecked = 'checked="checked"'; } $sql.= $db->order($sortfield,$sortorder); -$sql.= $db->plimit($limit + 1, $offset); +$sql.= $db->plimit($limit, $offset); +//print $sql; dol_syslog('Execute request sql='.$sql); $resql = $db->query($sql); if (empty($resql)) @@ -286,6 +293,7 @@ if (empty($resql)) dol_print_error($db); exit; } +//print $sql; $num = $db->num_rows($resql); $i = 0; @@ -339,7 +347,7 @@ if ($sref || $snom || $sall || $salert || GETPOST('search', 'alpha')) { $filters = '&sref=' . $sref . '&snom=' . $snom; $filters .= '&fourn_id=' . $fourn_id; $filters .= (isset($type)?'&type=' . $type:''); - $filters .= '&salert=' . $salert; + $filters .= '&=' . $salert; $filters .= '&mode=' . $mode; print_barre_liste( $texte, @@ -368,121 +376,42 @@ $param .= '&fourn_id=' . $fourn_id . '&snom='. $snom . '&salert=' . $salert; $param .= '&sref=' . $sref; $param .= '&mode=' . $mode; -// Lines of title -print '
 '. -''. -''. -''. -'   ' . $langs->trans('AlertOnly') . '  ' . $langs->trans('AlertOnly') . '   '. ''. ''. - '
' . $objp->desiredstock . '' . $objp->alertstock . ''. $warning . $stock. '
'.$langs->trans("Entity").'".$mc->select_entities($conf->entity); From ea310efba50308f657dfe80d2148c2bdba10dd08 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 2 Jul 2014 19:57:18 +0200 Subject: [PATCH 017/258] Fix: [ bug #1471 ] Several PHP warnings when intercepting USER_CREATE trigger --- ChangeLog | 1 + htdocs/user/fiche.php | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index c908243a5fb..df3198a7bf5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -68,6 +68,7 @@ For users: - Fix: [ bug #1478 ] BILL_PAYED trigger action does not intercept failure under some circumstances - Fix: [ bug #1479 ] Several customer invoice triggers do not intercept trigger action - Fix: [ bug #1477 ] Several customer invoice triggers do not show trigger error messages +- Fix: [ bug #1471 ] Several PHP warnings when intercepting USER_CREATE trigger. TODO - New: Predefined product and free product use same form. diff --git a/htdocs/user/fiche.php b/htdocs/user/fiche.php index f71cd7565fb..13f890c6013 100644 --- a/htdocs/user/fiche.php +++ b/htdocs/user/fiche.php @@ -238,8 +238,8 @@ if ($action == 'add' && $canadduser) { $langs->load("errors"); $db->rollback(); - if (is_array($object->errors) && count($object->errors)) $message='
'.join('
',$langs->trans($object->errors)).'
'; - else $message='
'.$langs->trans($object->error).'
'; + if (is_array($object->errors) && count($object->errors)) setEventMessage($object->errors,'errors'); + else setEventMessage($object->error); $action="create"; // Go back to create page } From de527365a8bc4dc6cd4966d2981eadb7d8ef8ebc Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 2 Jul 2014 20:10:44 +0200 Subject: [PATCH 018/258] Fix: [ bug #1517 ] Packages sizes --- htdocs/install/mysql/migration/3.5.0-3.6.0.sql | 11 ++++++++++- htdocs/install/mysql/tables/llx_expedition.sql | 10 +++++----- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/htdocs/install/mysql/migration/3.5.0-3.6.0.sql b/htdocs/install/mysql/migration/3.5.0-3.6.0.sql index e9d24685027..b3d71fe5af7 100644 --- a/htdocs/install/mysql/migration/3.5.0-3.6.0.sql +++ b/htdocs/install/mysql/migration/3.5.0-3.6.0.sql @@ -18,6 +18,15 @@ -- -- VMYSQL4.1 DELETE FROM llx_usergroup_user WHERE fk_usergroup NOT IN (SELECT rowid from llx_usergroup); + + + +ALTER TABLE llx_expedition MODIFY COLUMN height float; +ALTER TABLE llx_expedition MODIFY COLUMN width float; +ALTER TABLE llx_expedition MODIFY COLUMN size float; +ALTER TABLE llx_expedition MODIFY COLUMN weight float; + + ALTER TABLE llx_societe DROP COLUMN datea; ALTER TABLE llx_holiday ADD COLUMN fk_user_create integer; @@ -1663,4 +1672,4 @@ INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, -- Fix: Missing instruction not correctly done into 3.5 -- VPGSQL8.2 ALTER TABLE llx_facture_fourn ALTER fk_mode_reglement DROP NOT NULL; -- VPGSQL8.2 ALTER TABLE llx_facture_fourn ALTER fk_cond_reglement DROP NOT NULL; - + \ No newline at end of file diff --git a/htdocs/install/mysql/tables/llx_expedition.sql b/htdocs/install/mysql/tables/llx_expedition.sql index 08ea9683281..0a152b13069 100644 --- a/htdocs/install/mysql/tables/llx_expedition.sql +++ b/htdocs/install/mysql/tables/llx_expedition.sql @@ -41,13 +41,13 @@ create table llx_expedition fk_shipping_method integer, tracking_number varchar(50), fk_statut smallint DEFAULT 0, - - height integer, -- height - width integer, -- with + + height float, -- height + width float, -- with size_units integer, -- unit of all sizes (height, width, depth) - size integer, -- depth + size float, -- depth weight_units integer, -- unit of weight - weight integer, -- weight + weight float, -- weight note_private text, note_public text, model_pdf varchar(255) From c1d33af50d3f968976778c03374e245389c4c8d0 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 2 Jul 2014 20:11:08 +0200 Subject: [PATCH 019/258] - Fix: [ bug #1517 ] Packages sizes. --- ChangeLog | 1 + 1 file changed, 1 insertion(+) diff --git a/ChangeLog b/ChangeLog index df3198a7bf5..fbc13e8ba77 100644 --- a/ChangeLog +++ b/ChangeLog @@ -69,6 +69,7 @@ For users: - Fix: [ bug #1479 ] Several customer invoice triggers do not intercept trigger action - Fix: [ bug #1477 ] Several customer invoice triggers do not show trigger error messages - Fix: [ bug #1471 ] Several PHP warnings when intercepting USER_CREATE trigger. +- Fix: [ bug #1517 ] Packages sizes. TODO - New: Predefined product and free product use same form. From d38bebf99064916053885424c8b1416b6b52a608 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Wed, 2 Jul 2014 21:04:34 +0200 Subject: [PATCH 020/258] Created foreign key relations for llx_product and llx_product_price table --- .../install/mysql/migration/3.6.0-3.7.0.sql | 33 +++++++++++++++++++ .../install/mysql/tables/llx_product.key.sql | 17 +++++++++- htdocs/install/mysql/tables/llx_product.sql | 7 ++-- .../mysql/tables/llx_product_price.key.sql | 28 ++++++++++++++++ 4 files changed, 81 insertions(+), 4 deletions(-) create mode 100644 htdocs/install/mysql/tables/llx_product_price.key.sql 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 a8019d3af4c..2b98536fa95 100644 --- a/htdocs/install/mysql/migration/3.6.0-3.7.0.sql +++ b/htdocs/install/mysql/migration/3.6.0-3.7.0.sql @@ -49,3 +49,36 @@ ALTER TABLE llx_user MODIFY COLUMN accountancy_code varchar(32); ALTER TABLE llx_bank_account ADD COLUMN accountancy_journal varchar(3) DEFAULT NULL AFTER account_number; + +-- Added missing relations of llx_product +-- fk_country +ALTER TABLE llx_product CHANGE fk_country fk_country INT( 11 ) NULL DEFAULT NULL; +ALTER TABLE llx_product ADD INDEX ( fk_country ); +ALTER TABLE llx_product ADD FOREIGN KEY ( fk_country ) REFERENCES llx_c_pays ( +rowid +) ON DELETE RESTRICT ON UPDATE RESTRICT ; +-- fk_user_author +ALTER TABLE llx_product CHANGE fk_user_author fk_user_author INT( 11 ) NULL DEFAULT NULL; +ALTER TABLE llx_product ADD INDEX ( fk_user_author ); +ALTER TABLE llx_product ADD FOREIGN KEY ( fk_user_author ) REFERENCES llx_user ( +rowid +) ON DELETE RESTRICT ON UPDATE RESTRICT ; +-- fk_barcode_type +ALTER TABLE llx_product CHANGE fk_barcode_type fk_barcode_type INT( 11 ) NULL DEFAULT NULL; +UPDATE llx_product SET fk_barcode_type = NULL WHERE fk_barcode_type = 0; +ALTER TABLE llx_product ADD INDEX ( fk_barcode_type ); +ALTER TABLE llx_product ADD FOREIGN KEY ( fk_barcode_type ) REFERENCES llx_c_barcode_type ( +rowid +) ON DELETE RESTRICT ON UPDATE RESTRICT ; + +-- Added missing relations of llx_product_price +-- fk_user_author +ALTER TABLE llx_product_price ADD INDEX ( fk_user_author ); +ALTER TABLE llx_product_price ADD FOREIGN KEY ( fk_user_author ) REFERENCES llx_user ( + rowid +) ON DELETE RESTRICT ON UPDATE RESTRICT ; +-- fk_user_author +ALTER TABLE llx_product_price ADD INDEX ( fk_product ); +ALTER TABLE llx_product_price ADD FOREIGN KEY ( fk_product ) REFERENCES llx_product ( + rowid +) ON DELETE RESTRICT ON UPDATE RESTRICT ; \ No newline at end of file diff --git a/htdocs/install/mysql/tables/llx_product.key.sql b/htdocs/install/mysql/tables/llx_product.key.sql index a2cb0e539f9..4faa2bcb13c 100644 --- a/htdocs/install/mysql/tables/llx_product.key.sql +++ b/htdocs/install/mysql/tables/llx_product.key.sql @@ -2,6 +2,7 @@ -- Copyright (C) 2002-2004 Rodolphe Quiedeville -- Copyright (C) 2004-2013 Laurent Destailleur -- Copyright (C) 2005-2009 Regis Houssin +-- Copyright (C) 2014 Marcos García -- -- 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 @@ -25,6 +26,20 @@ ALTER TABLE llx_product ADD INDEX idx_product_label (label); ALTER TABLE llx_product ADD INDEX idx_product_barcode (barcode); ALTER TABLE llx_product ADD INDEX idx_product_import_key (import_key); ALTER TABLE llx_product ADD INDEX idx_product_seuil_stock_alerte (seuil_stock_alerte); - +ALTER TABLE llx_product ADD INDEX ( fk_country ); +ALTER TABLE llx_product ADD INDEX ( fk_user_author ); +ALTER TABLE llx_product ADD INDEX ( fk_barcode_type ); ALTER TABLE llx_product ADD UNIQUE INDEX uk_product_barcode (barcode, fk_barcode_type, entity); + +ALTER TABLE llx_product ADD FOREIGN KEY ( fk_country ) REFERENCES llx_c_pays ( +rowid +) ON DELETE RESTRICT ON UPDATE RESTRICT ; + +ALTER TABLE llx_product ADD FOREIGN KEY ( fk_user_author ) REFERENCES llx_user ( +rowid +) ON DELETE RESTRICT ON UPDATE RESTRICT ; + +ALTER TABLE llx_product ADD FOREIGN KEY ( fk_barcode_type ) REFERENCES llx_c_barcode_type ( +rowid +) ON DELETE RESTRICT ON UPDATE RESTRICT ; \ No newline at end of file diff --git a/htdocs/install/mysql/tables/llx_product.sql b/htdocs/install/mysql/tables/llx_product.sql index 0ff94c19530..0ab9a24785c 100644 --- a/htdocs/install/mysql/tables/llx_product.sql +++ b/htdocs/install/mysql/tables/llx_product.sql @@ -4,6 +4,7 @@ -- Copyright (C) 2005-2010 Regis Houssin -- Copyright (C) 2010 juanjo Menent -- Copyright (C) 2013 Cédric Salvador +-- Copyright (C) 2014 Marcos García -- -- 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 @@ -37,7 +38,7 @@ create table llx_product description text, note text, customcode varchar(32), -- Optionnal custom code - fk_country integer, -- Optionnal id of original country + fk_country integer DEFAULT NULL, -- Optionnal id of original country price double(24,8) DEFAULT 0, price_ttc double(24,8) DEFAULT 0, price_min double(24,8) DEFAULT 0, @@ -47,7 +48,7 @@ create table llx_product recuperableonly integer NOT NULL DEFAULT '0', -- French NPR VAT localtax1_tx double(6,3) DEFAULT 0, -- Spanish local VAT 1 localtax2_tx double(6,3) DEFAULT 0, -- Spanish local VAT 2 - fk_user_author integer, + fk_user_author integer DEFAULT NULL, tosell tinyint DEFAULT 1, -- Product you sell tobuy tinyint DEFAULT 1, -- Product you buy tobatch tinyint DEFAULT 0 NOT NULL, -- Is it a product that need a batch or eat-by management @@ -56,7 +57,7 @@ create table llx_product seuil_stock_alerte integer DEFAULT 0, url varchar(255), barcode varchar(255) DEFAULT NULL, - fk_barcode_type integer DEFAULT 0, + fk_barcode_type integer DEFAULT NULL, accountancy_code_sell varchar(32), -- Selling accountancy code accountancy_code_buy varchar(32), -- Buying accountancy code partnumber varchar(32), -- Not used. Used by external modules. diff --git a/htdocs/install/mysql/tables/llx_product_price.key.sql b/htdocs/install/mysql/tables/llx_product_price.key.sql new file mode 100644 index 00000000000..a7e43d95d86 --- /dev/null +++ b/htdocs/install/mysql/tables/llx_product_price.key.sql @@ -0,0 +1,28 @@ +-- ============================================================================ +-- Copyright (C) 2014 Marcos García +-- +-- 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 +-- the Free Software Foundation; either version 3 of the License, or +-- (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program. If not, see . +-- +-- ============================================================================ + +ALTER TABLE llx_product_price ADD INDEX ( fk_user_author ); +ALTER TABLE llx_product_price ADD INDEX ( fk_product ); + +ALTER TABLE llx_product_price ADD FOREIGN KEY ( fk_product ) REFERENCES llx_product ( + rowid +) ON DELETE RESTRICT ON UPDATE RESTRICT ; + +ALTER TABLE llx_product_price ADD FOREIGN KEY ( fk_user_author ) REFERENCES llx_user ( + rowid +) ON DELETE RESTRICT ON UPDATE RESTRICT ; \ No newline at end of file From 460fb7a453f38f0a28ea1a72e4ea872cfbe8ed19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Wed, 2 Jul 2014 21:29:07 +0200 Subject: [PATCH 021/258] Removed new SQL double-debug --- htdocs/adherents/card_subscriptions.php | 4 ++-- htdocs/comm/propal/class/propal.class.php | 4 +--- htdocs/commande/class/commande.class.php | 6 +++--- htdocs/compta/bank/class/account.class.php | 2 +- htdocs/compta/facture/class/facture.class.php | 4 ++-- htdocs/compta/paiement/cheque/class/remisecheque.class.php | 4 ++-- htdocs/contrat/class/contrat.class.php | 1 - htdocs/core/class/commoninvoice.class.php | 2 +- htdocs/core/lib/functions2.lib.php | 2 +- htdocs/fourn/class/fournisseur.commande.class.php | 4 ++-- htdocs/fourn/class/fournisseur.facture.class.php | 2 +- htdocs/opensurvey/public/studs.php | 1 - htdocs/opensurvey/results.php | 1 - htdocs/product/class/product.class.php | 2 +- htdocs/product/price.php | 1 - htdocs/societe/class/address.class.php | 5 +---- htdocs/user/class/user.class.php | 4 ++-- 17 files changed, 20 insertions(+), 29 deletions(-) diff --git a/htdocs/adherents/card_subscriptions.php b/htdocs/adherents/card_subscriptions.php index ff1abc8199c..e436fd5f694 100644 --- a/htdocs/adherents/card_subscriptions.php +++ b/htdocs/adherents/card_subscriptions.php @@ -454,8 +454,8 @@ if ($user->rights->adherent->cotisation->creer && $action == 'cotisation' && ! $ // Update fk_bank into subscription table $sql = 'UPDATE '.MAIN_DB_PREFIX.'cotisation SET fk_bank='.$bank_line_id; $sql.= ' WHERE rowid='.$crowid; - dol_syslog('sql='.$sql); - $result = $db->query($sql); + + $result = $db->query($sql); if (! $result) { $error++; diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index aafe6d11d8a..27dd65e6217 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -1594,7 +1594,6 @@ class Propal extends CommonObject else { $this->error=$this->db->error(); - dol_syslog(get_class($this)."::set_remise_percent Error sql=$sql"); return -1; } } @@ -1629,7 +1628,6 @@ class Propal extends CommonObject else { $this->error=$this->db->error(); - dol_syslog(get_class($this)."::set_remise_absolue Error sql=$sql"); return -1; } } @@ -3131,7 +3129,7 @@ class PropaleLigne extends CommonObject $sql.= ",total_ttc=".price2num($this->total_ttc,'MT').""; $sql.= " WHERE rowid = ".$this->rowid; - dol_syslog("PropaleLigne::update_total sql=$sql"); + dol_syslog("PropaleLigne::update_total", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index 2d06fc135f3..a48dd0b9b43 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -1888,7 +1888,7 @@ class Commande extends CommonOrder $sql.= ' SET remise_absolue = '.$remise; $sql.= ' WHERE rowid = '.$this->id.' AND fk_statut = 0 ;'; - dol_syslog(get_class($this)."::set_remise_absolue sql=$sql"); + dol_syslog(get_class($this)."::set_remise_absolue", LOG_DEBUG); if ($this->db->query($sql)) { @@ -1920,7 +1920,7 @@ class Commande extends CommonOrder $sql.= " SET date_commande = ".($date ? $this->db->idate($date) : 'null'); $sql.= " WHERE rowid = ".$this->id." AND fk_statut = 0"; - dol_syslog(get_class($this)."::set_date sql=$sql",LOG_DEBUG); + dol_syslog(get_class($this)."::set_date",LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -3485,7 +3485,7 @@ class OrderLine extends CommonOrderLine $sql.= ",total_ttc='".price2num($this->total_ttc)."'"; $sql.= " WHERE rowid = ".$this->rowid; - dol_syslog("OrderLine::update_total sql=$sql"); + dol_syslog("OrderLine::update_total", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) diff --git a/htdocs/compta/bank/class/account.class.php b/htdocs/compta/bank/class/account.class.php index 8729c44e494..e50c7bb34f6 100644 --- a/htdocs/compta/bank/class/account.class.php +++ b/htdocs/compta/bank/class/account.class.php @@ -569,7 +569,7 @@ class Account extends CommonObject $sql.= " WHERE rowid = ".$this->id; $sql.= " AND entity = ".$conf->entity; - dol_syslog(get_class($this)."::update_bban sql=$sql"); + dol_syslog(get_class($this)."::update_bban", LOG_DEBUG); $result = $this->db->query($sql); if ($result) diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index f08a2af3feb..477735ca9ec 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -2346,7 +2346,7 @@ class Facture extends CommonInvoice $sql.= ' WHERE rowid = '.$this->id; $sql.= ' AND fk_statut = 0'; - dol_syslog(get_class($this)."::set_remise_absolue sql=$sql"); + dol_syslog(get_class($this)."::set_remise_absolue", LOG_DEBUG); if ($this->db->query($sql)) { @@ -2737,7 +2737,7 @@ class Facture extends CommonInvoice if ($socid > 0) $sql.=" AND f.fk_soc = ".$socid; $sql.= " ORDER BY f.facnumber"; - dol_syslog(get_class($this)."::list_replacable_invoices sql=$sql"); + dol_syslog(get_class($this)."::list_replacable_invoices", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { diff --git a/htdocs/compta/paiement/cheque/class/remisecheque.class.php b/htdocs/compta/paiement/cheque/class/remisecheque.class.php index 990238cf543..39b8f209247 100644 --- a/htdocs/compta/paiement/cheque/class/remisecheque.class.php +++ b/htdocs/compta/paiement/cheque/class/remisecheque.class.php @@ -704,7 +704,7 @@ class RemiseCheque extends CommonObject $sql.= " SET date_bordereau = ".($date ? $this->db->idate($date) : 'null'); $sql.= " WHERE rowid = ".$this->id; - dol_syslog("RemiseCheque::set_date sql=$sql",LOG_DEBUG); + dol_syslog("RemiseCheque::set_date", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -738,7 +738,7 @@ class RemiseCheque extends CommonObject $sql.= " SET number = '".$number."'" ; $sql.= " WHERE rowid = ".$this->id; - dol_syslog("RemiseCheque::set_number sql=$sql",LOG_DEBUG); + dol_syslog("RemiseCheque::set_number", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { diff --git a/htdocs/contrat/class/contrat.class.php b/htdocs/contrat/class/contrat.class.php index 049825578e7..8217749f260 100644 --- a/htdocs/contrat/class/contrat.class.php +++ b/htdocs/contrat/class/contrat.class.php @@ -1075,7 +1075,6 @@ class Contrat extends CommonObject } else { - dol_syslog("Error sql=$sql, error=".$this->error,LOG_ERR); $this->db->rollback(); return -1; } diff --git a/htdocs/core/class/commoninvoice.class.php b/htdocs/core/class/commoninvoice.class.php index fa08ef5566a..fdc4a35a585 100644 --- a/htdocs/core/class/commoninvoice.class.php +++ b/htdocs/core/class/commoninvoice.class.php @@ -308,7 +308,7 @@ abstract class CommonInvoice extends CommonObject if (is_numeric($cond_reglement)) $sqltemp.= " WHERE c.rowid=".$cond_reglement; else $sqltemp.= " WHERE c.code='".$this->db->escape($cond_reglement)."'"; - dol_syslog(get_class($this).'::calculate_date_lim_reglement sql='.$sqltemp); + dol_syslog(get_class($this).'::calculate_date_lim_reglement', LOG_DEBUG); $resqltemp=$this->db->query($sqltemp); if ($resqltemp) { diff --git a/htdocs/core/lib/functions2.lib.php b/htdocs/core/lib/functions2.lib.php index e6a9e139109..4e9598d5e20 100644 --- a/htdocs/core/lib/functions2.lib.php +++ b/htdocs/core/lib/functions2.lib.php @@ -837,7 +837,7 @@ function get_next_value($db,$mask,$table,$field,$where='',$objsoc='',$date='',$m if ($sqlwhere) $maskrefclient_sql.=' AND '.$sqlwhere; //use the same sqlwhere as general mask $maskrefclient_sql.=' AND (SUBSTRING('.$field.', '.(strpos($maskwithnocode,$maskrefclient)+1).', '.dol_strlen($maskrefclient_maskclientcode).")='".$maskrefclient_clientcode."')"; - dol_syslog("functions2::get_next_value maskrefclient_sql=".$maskrefclient_sql, LOG_DEBUG); + dol_syslog("functions2::get_next_value maskrefclient", LOG_DEBUG); $maskrefclient_resql=$db->query($maskrefclient_sql); if ($maskrefclient_resql) { diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index 83681a3a4b9..8637364f578 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -145,7 +145,7 @@ class CommandeFournisseur extends CommonOrder $obj = $this->db->fetch_object($resql); if (! $obj) { - $this->error='Bill with id '.$id.' not found sql='.$sql; + $this->error='Bill with id '.$id.' not found'; dol_syslog(get_class($this).'::fetch '.$this->error); return 0; } @@ -2140,7 +2140,7 @@ class CommandeFournisseurLigne $sql.= ",total_ttc='".price2num($this->total_ttc)."'"; $sql.= " WHERE rowid = ".$this->rowid; - dol_syslog("CommandeFournisseurLigne.class.php::update_total sql=$sql"); + dol_syslog("CommandeFournisseurLigne.class.php::update_total", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php index 95aaeb16eea..a224f1fafb0 100644 --- a/htdocs/fourn/class/fournisseur.facture.class.php +++ b/htdocs/fourn/class/fournisseur.facture.class.php @@ -420,7 +420,7 @@ class FactureFournisseur extends CommonInvoice } else { - $this->error='Bill with id '.$id.' not found sql='.$sql; + $this->error='Bill with id '.$id.' not found'; dol_syslog(get_class($this).'::fetch '.$this->error); return 0; } diff --git a/htdocs/opensurvey/public/studs.php b/htdocs/opensurvey/public/studs.php index f970df5bc4d..c85a62ae61a 100644 --- a/htdocs/opensurvey/public/studs.php +++ b/htdocs/opensurvey/public/studs.php @@ -392,7 +392,6 @@ $compteur = 0; $sql ="SELECT id_users, nom, id_sondage, reponses"; $sql.=" FROM ".MAIN_DB_PREFIX."opensurvey_user_studs"; $sql.=" WHERE id_sondage = '".$db->escape($numsondage)."'"; -dol_syslog('sql='.$sql); $resql=$db->query($sql); if (! $resql) { diff --git a/htdocs/opensurvey/results.php b/htdocs/opensurvey/results.php index 2d93dfd5de4..7dbdac8c2bc 100644 --- a/htdocs/opensurvey/results.php +++ b/htdocs/opensurvey/results.php @@ -286,7 +286,6 @@ for ($i = 0; $i < $nblignes; $i++) $sql ="SELECT id_users, nom, id_sondage, reponses"; $sql.=" FROM ".MAIN_DB_PREFIX."opensurvey_user_studs"; $sql.=" WHERE id_sondage = '".$db->escape($numsondage)."'"; - dol_syslog('sql='.$sql); $resql=$db->query($sql); if (! $resql) dol_print_error($db); $num=$db->num_rows($resql); diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index c00701fbdbb..0d4c884abf8 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -945,7 +945,7 @@ class Product extends CommonObject $sql = "DELETE FROM ".MAIN_DB_PREFIX."product_lang"; $sql.= " WHERE fk_product=".$this->id." AND lang='".$this->db->escape($langtodelete)."'"; - dol_syslog(get_class($this).'::delMultiLangs sql='.$sql); + dol_syslog(get_class($this).'::delMultiLangs', LOG_DEBUG); $result = $this->db->query($sql); if ($result) { diff --git a/htdocs/product/price.php b/htdocs/product/price.php index 9268a3a59a4..f5db524ed27 100644 --- a/htdocs/product/price.php +++ b/htdocs/product/price.php @@ -686,7 +686,6 @@ if (! empty($socid) && ! empty($conf->global->PRODUIT_MULTIPRICES)) $sql .= " ORDER BY p.date_price DESC, p.price_level ASC"; // $sql .= $db->plimit(); -dol_syslog("sql=" . $sql); $result = $db->query($sql); if ($result) { $num = $db->num_rows($result); diff --git a/htdocs/societe/class/address.class.php b/htdocs/societe/class/address.class.php index 14b1605fdd9..d8ef1565bbd 100644 --- a/htdocs/societe/class/address.class.php +++ b/htdocs/societe/class/address.class.php @@ -114,10 +114,7 @@ class Address $this->error=$langs->trans("ErrorCompanyNameAlreadyExists",$this->nom); } - else - { - dol_syslog(get_class($this)."::create echec insert sql=$sql"); - } + $this->db->rollback(); return -2; } diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index 35ae30d0641..0a2ccf00638 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -1370,7 +1370,7 @@ class User extends CommonObject } $sql.= " WHERE rowid = ".$this->id; - dol_syslog(get_class($this)."::setPassword sql=hidden", LOG_DEBUG); + dol_syslog(get_class($this)."::setPassword", LOG_DEBUG); $result = $this->db->query($sql); if ($result) { @@ -1439,7 +1439,7 @@ class User extends CommonObject $sql.= " SET pass_temp = '".$this->db->escape($password)."'"; $sql.= " WHERE rowid = ".$this->id; - dol_syslog(get_class($this)."::setPassword sql=hidden", LOG_DEBUG); // No log + dol_syslog(get_class($this)."::setPassword", LOG_DEBUG); // No log $result = $this->db->query($sql); if ($result) { From e351657cc08d111e13680d971ab2425d3e4c4ff9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Thu, 3 Jul 2014 10:16:37 +0200 Subject: [PATCH 022/258] Removed key restrictions --- htdocs/install/mysql/migration/3.6.0-3.7.0.sql | 10 +++++----- htdocs/install/mysql/tables/llx_product.key.sql | 6 +++--- htdocs/install/mysql/tables/llx_product_price.key.sql | 4 ++-- 3 files changed, 10 insertions(+), 10 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 2b98536fa95..1a9c59b6275 100644 --- a/htdocs/install/mysql/migration/3.6.0-3.7.0.sql +++ b/htdocs/install/mysql/migration/3.6.0-3.7.0.sql @@ -56,29 +56,29 @@ ALTER TABLE llx_product CHANGE fk_country fk_country INT( 11 ) NULL DEFAULT N ALTER TABLE llx_product ADD INDEX ( fk_country ); ALTER TABLE llx_product ADD FOREIGN KEY ( fk_country ) REFERENCES llx_c_pays ( rowid -) ON DELETE RESTRICT ON UPDATE RESTRICT ; +); -- fk_user_author ALTER TABLE llx_product CHANGE fk_user_author fk_user_author INT( 11 ) NULL DEFAULT NULL; ALTER TABLE llx_product ADD INDEX ( fk_user_author ); ALTER TABLE llx_product ADD FOREIGN KEY ( fk_user_author ) REFERENCES llx_user ( rowid -) ON DELETE RESTRICT ON UPDATE RESTRICT ; +); -- fk_barcode_type ALTER TABLE llx_product CHANGE fk_barcode_type fk_barcode_type INT( 11 ) NULL DEFAULT NULL; UPDATE llx_product SET fk_barcode_type = NULL WHERE fk_barcode_type = 0; ALTER TABLE llx_product ADD INDEX ( fk_barcode_type ); ALTER TABLE llx_product ADD FOREIGN KEY ( fk_barcode_type ) REFERENCES llx_c_barcode_type ( rowid -) ON DELETE RESTRICT ON UPDATE RESTRICT ; +); -- Added missing relations of llx_product_price -- fk_user_author ALTER TABLE llx_product_price ADD INDEX ( fk_user_author ); ALTER TABLE llx_product_price ADD FOREIGN KEY ( fk_user_author ) REFERENCES llx_user ( rowid -) ON DELETE RESTRICT ON UPDATE RESTRICT ; +); -- fk_user_author ALTER TABLE llx_product_price ADD INDEX ( fk_product ); ALTER TABLE llx_product_price ADD FOREIGN KEY ( fk_product ) REFERENCES llx_product ( rowid -) ON DELETE RESTRICT ON UPDATE RESTRICT ; \ No newline at end of file +); \ No newline at end of file diff --git a/htdocs/install/mysql/tables/llx_product.key.sql b/htdocs/install/mysql/tables/llx_product.key.sql index 4faa2bcb13c..b692a2740b0 100644 --- a/htdocs/install/mysql/tables/llx_product.key.sql +++ b/htdocs/install/mysql/tables/llx_product.key.sql @@ -34,12 +34,12 @@ ALTER TABLE llx_product ADD UNIQUE INDEX uk_product_barcode (barcode, fk_barcode ALTER TABLE llx_product ADD FOREIGN KEY ( fk_country ) REFERENCES llx_c_pays ( rowid -) ON DELETE RESTRICT ON UPDATE RESTRICT ; +); ALTER TABLE llx_product ADD FOREIGN KEY ( fk_user_author ) REFERENCES llx_user ( rowid -) ON DELETE RESTRICT ON UPDATE RESTRICT ; +); ALTER TABLE llx_product ADD FOREIGN KEY ( fk_barcode_type ) REFERENCES llx_c_barcode_type ( rowid -) ON DELETE RESTRICT ON UPDATE RESTRICT ; \ No newline at end of file +); \ No newline at end of file diff --git a/htdocs/install/mysql/tables/llx_product_price.key.sql b/htdocs/install/mysql/tables/llx_product_price.key.sql index a7e43d95d86..fbc5ee3f05f 100644 --- a/htdocs/install/mysql/tables/llx_product_price.key.sql +++ b/htdocs/install/mysql/tables/llx_product_price.key.sql @@ -21,8 +21,8 @@ ALTER TABLE llx_product_price ADD INDEX ( fk_product ); ALTER TABLE llx_product_price ADD FOREIGN KEY ( fk_product ) REFERENCES llx_product ( rowid -) ON DELETE RESTRICT ON UPDATE RESTRICT ; +); ALTER TABLE llx_product_price ADD FOREIGN KEY ( fk_user_author ) REFERENCES llx_user ( rowid -) ON DELETE RESTRICT ON UPDATE RESTRICT ; \ No newline at end of file +); \ No newline at end of file From 959c41e8db19c8577233042c9b2617630fc68f2d Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Thu, 3 Jul 2014 10:24:29 +0200 Subject: [PATCH 023/258] Fix : virtual stock was not correctly calculated because reception was not included. --- htdocs/product/class/product.class.php | 83 ++++++++++++++++++++++++++ htdocs/product/stock/product.php | 21 +------ 2 files changed, 85 insertions(+), 19 deletions(-) diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index cee5c72abea..61b885f02c7 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -1709,6 +1709,48 @@ class Product extends CommonObject } } + /** + * Charge tableau des stats réception fournisseur pour le produit/service + * + * @param int $socid Id societe pour filtrer sur une societe + * @param int $filtrestatut Id statut pour filtrer sur un statut + * @return array Tableau des stats + */ + function load_stats_reception($socid=0,$filtrestatut='') + { + global $conf,$user; + + $sql = "SELECT COUNT(DISTINCT cf.fk_soc) as nb_customers, COUNT(DISTINCT cf.rowid) as nb,"; + $sql.= " COUNT(fd.rowid) as nb_rows, SUM(fd.qty) as qty"; + $sql.= " FROM ".MAIN_DB_PREFIX."commande_fournisseur_dispatch as fd"; + $sql.= ", ".MAIN_DB_PREFIX."commande_fournisseur as cf"; + $sql.= ", ".MAIN_DB_PREFIX."societe as s"; + if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + $sql.= " WHERE cf.rowid = fd.fk_commande"; + $sql.= " AND cf.fk_soc = s.rowid"; + $sql.= " AND cf.entity = ".$conf->entity; + $sql.= " AND fd.fk_product = ".$this->id; + if (!$user->rights->societe->client->voir && !$socid) $sql.= " AND cf.fk_soc = sc.fk_soc AND sc.fk_user = " .$user->id; + if ($socid > 0) $sql.= " AND cf.fk_soc = ".$socid; + if ($filtrestatut <> '') $sql.= " AND cf.fk_statut in (".$filtrestatut.")"; + + $result = $this->db->query($sql); + if ( $result ) + { + $obj=$this->db->fetch_object($result); + $this->stats_reception['suppliers']=$obj->nb_customers; + $this->stats_reception['nb']=$obj->nb; + $this->stats_reception['rows']=$obj->nb_rows; + $this->stats_reception['qty']=$obj->qty?$obj->qty:0; + return 1; + } + else + { + $this->error=$this->db->error(); + return -1; + } + } + /** * Charge tableau des stats contrat pour le produit/service * @@ -2872,6 +2914,7 @@ class Product extends CommonObject } } $this->db->free($result); + $this->load_virtual_stock(); return 1; } else @@ -2881,6 +2924,46 @@ class Product extends CommonObject } } + /** + * Load information about virtual stock of a product + * + * @return int < 0 if KO, > 0 if OK + */ + function load_virtual_stock() + { + global $conf; + + if (! empty($conf->global->STOCK_CALCULATE_ON_SHIPMENT)) + { + $stock_commande_client=$stock_commande_fournisseur=0; + $stock_sending_client=$stock_reception_fournisseur=0; + + if (! empty($conf->commande->enabled)) + { + $result=$this->load_stats_commande(0,'1,2'); + if ($result < 0) dol_print_error($db,$this->error); + $stock_commande_client=$this->stats_commande['qty']; + } + if (! empty($conf->expedition->enabled)) + { + $result=$this->load_stats_sending(0,''); + if ($result < 0) dol_print_error($db,$this->error); + $stock_sending_client=$this->stats_expedition['qty']; + } + if (! empty($conf->fournisseur->enabled)) + { + $result=$this->load_stats_commande_fournisseur(0,'3'); + if ($result < 0) dol_print_error($db,$this->error); + $stock_commande_fournisseur=$this->stats_commande_fournisseur['qty']; + + $result=$this->load_stats_reception(0,''); + if ($result < 0) dol_print_error($db,$this->error); + $stock_reception_fournisseur=$this->stats_reception['qty']; + } + + $this->stock_theorique=$this->stock_reel-($stock_commande_client-$stock_sending_client)+($stock_commande_fournisseur-$stock_reception_fournisseur); + } + } /** * Deplace fichier uploade sous le nom $files dans le repertoire sdir diff --git a/htdocs/product/stock/product.php b/htdocs/product/stock/product.php index 3f26d8c0980..338169a6154 100644 --- a/htdocs/product/stock/product.php +++ b/htdocs/product/stock/product.php @@ -321,23 +321,6 @@ if ($id > 0 || $ref) // If stock if stock increment is done on real sending if (! empty($conf->global->STOCK_CALCULATE_ON_SHIPMENT)) { - $stock_commande_client=$stock_commande_fournisseur=0; - - if (! empty($conf->commande->enabled)) - { - $result=$product->load_stats_commande(0,'1,2'); - if ($result < 0) dol_print_error($db,$product->error); - $stock_commande_client=$product->stats_commande['qty']; - } - if (! empty($conf->fournisseur->enabled)) - { - $result=$product->load_stats_commande_fournisseur(0,'3'); - if ($result < 0) dol_print_error($db,$product->error); - $stock_commande_fournisseur=$product->stats_commande_fournisseur['qty']; - } - - $product->stock_theorique=$product->stock_reel-($stock_commande_client+$stock_sending_client)+$stock_commande_fournisseur; - // Stock theorique print '
'.$langs->trans("VirtualStock").'".$product->stock_theorique; @@ -360,7 +343,7 @@ if ($id > 0 || $ref) if (! empty($conf->commande->enabled)) { if ($found) print '
'; else $found=1; - print $langs->trans("CustomersOrdersRunning").': '.($stock_commande_client+$stock_sending_client); + print $langs->trans("CustomersOrdersRunning").': '.($product->stats_commande['qty']-$product->stats_sendings['qty']); $result=$product->load_stats_commande(0,'0'); if ($result < 0) dol_print_error($db,$product->error); print ' ('.$langs->trans("Draft").': '.$product->stats_commande['qty'].')'; @@ -372,7 +355,7 @@ if ($id > 0 || $ref) if (! empty($conf->fournisseur->enabled)) { if ($found) print '
'; else $found=1; - print $langs->trans("SuppliersOrdersRunning").': '.$stock_commande_fournisseur; + print $langs->trans("SuppliersOrdersRunning").': '.($product->stats_commande_fournisseur['qty']-$product->stats_reception['qty']); $result=$product->load_stats_commande_fournisseur(0,'0,1,2'); if ($result < 0) dol_print_error($db,$product->error); print ' ('.$langs->trans("DraftOrWaitingApproved").': '.$product->stats_commande_fournisseur['qty'].')'; From b115e9b943c24a2408aedb8db3c835eddb19dfd4 Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Thu, 3 Jul 2014 12:07:34 +0200 Subject: [PATCH 024/258] Fix : replenish function was not working with virtual stock --- htdocs/product/stock/replenish.php | 78 ++++++++++++++++++------------ 1 file changed, 46 insertions(+), 32 deletions(-) diff --git a/htdocs/product/stock/replenish.php b/htdocs/product/stock/replenish.php index 6aee0bada53..0bfdbfb9159 100644 --- a/htdocs/product/stock/replenish.php +++ b/htdocs/product/stock/replenish.php @@ -252,36 +252,58 @@ $sql.= ', s.fk_product'; if ($usevirtualstock) { - $sqlCommandesCli = "(SELECT SUM(cd.qty) as qty"; + $sqlCommandesCli = "(SELECT ".$db->ifsql("SUM(cd.qty) IS NULL", "0", "SUM(cd.qty)")." as qty"; $sqlCommandesCli.= " FROM ".MAIN_DB_PREFIX."commandedet as cd"; - $sqlCommandesCli.= ", ".MAIN_DB_PREFIX."commande as c"; - $sqlCommandesCli.= " WHERE c.rowid = cd.fk_commande"; - $sqlCommandesCli.= " AND c.entity = ".$conf->entity; + $sqlCommandesCli.= " LEFT JOIN ".MAIN_DB_PREFIX."commande as c ON (c.rowid = cd.fk_commande)"; + $sqlCommandesCli.= " WHERE c.entity = ".$conf->entity; $sqlCommandesCli.= " AND cd.fk_product = p.rowid"; $sqlCommandesCli.= " AND c.fk_statut in (1,2))"; - - $sqlCommandesFourn = "(SELECT SUM(cd.qty) as qty"; + + $sqlExpeditionsCli = "(SELECT ".$db->ifsql("SUM(ed.qty) IS NULL", "0", "SUM(ed.qty)")." as qty"; + $sqlExpeditionsCli.= " FROM ".MAIN_DB_PREFIX."expedition as e"; + $sqlExpeditionsCli.= " LEFT JOIN ".MAIN_DB_PREFIX."expeditiondet as ed ON (ed.fk_expedition = e.rowid)"; + $sqlExpeditionsCli.= " LEFT JOIN ".MAIN_DB_PREFIX."commandedet as cd ON (cd.rowid = ed.fk_origin_line)"; + $sqlExpeditionsCli.= " WHERE e.entity = ".$conf->entity; + $sqlExpeditionsCli.= " AND cd.fk_product = p.rowid"; + $sqlExpeditionsCli.= " AND e.fk_statut > 0)"; + + $sqlCommandesFourn = "(SELECT ".$db->ifsql("SUM(cd.qty) IS NULL", "0", "SUM(cd.qty)")." as qty"; $sqlCommandesFourn.= " FROM ".MAIN_DB_PREFIX."commande_fournisseurdet as cd"; $sqlCommandesFourn.= ", ".MAIN_DB_PREFIX."commande_fournisseur as c"; $sqlCommandesFourn.= " WHERE c.rowid = cd.fk_commande"; $sqlCommandesFourn.= " AND c.entity = ".$conf->entity; $sqlCommandesFourn.= " AND cd.fk_product = p.rowid"; - $sqlCommandesFourn.= " AND c.fk_statut in (3))"; - - $sql.= ' HAVING ((p.desiredstock > 0 AND p.desiredstock > (SUM('.$db->ifsql("s.reel IS NULL", "0", "s.reel").')'; - $sql.= ' - '.$db->ifsql($sqlCommandesCli.' IS NULL', '0', $sqlCommandesCli).' + '.$db->ifsql($sqlCommandesFourn.' IS NULL', '0', $sqlCommandesFourn).'))'; - - $sql.= ' OR (p.seuil_stock_alerte > 0 AND p.seuil_stock_alerte > (SUM('.$db->ifsql("s.reel IS NULL", "0", "s.reel").')'; - $sql.= ' - '.$db->ifsql($sqlCommandesCli.' IS NULL', '0', $sqlCommandesCli).' + '.$db->ifsql($sqlCommandesFourn.' IS NULL', '0', $sqlCommandesFourn).'))'; - $sql.= " )"; + $sqlCommandesFourn.= " AND c.fk_statut in (2,3))"; + + $sqlReceptionFourn = "(SELECT ".$db->ifsql("SUM(fd.qty) IS NULL", "0", "SUM(fd.qty)")." as qty"; + $sqlReceptionFourn.= " FROM ".MAIN_DB_PREFIX."commande_fournisseur as cf"; + $sqlReceptionFourn.= " LEFT JOIN ".MAIN_DB_PREFIX."commande_fournisseurdet as cfd ON (cfd.fk_commande = cf.rowid)"; + $sqlReceptionFourn.= " LEFT JOIN ".MAIN_DB_PREFIX."commande_fournisseur_dispatch as fd ON (fd.fk_commande = cf.rowid)"; + $sqlReceptionFourn.= " WHERE cf.entity = ".$conf->entity; + $sqlReceptionFourn.= " AND fd.fk_product = p.rowid)"; + + $sql.= ' HAVING ((p.desiredstock > 0 AND (p.desiredstock > SUM('.$db->ifsql("s.reel IS NULL", "0", "s.reel").')'; + $sql.= ' - ('.$sqlCommandesCli.' - '.$sqlExpeditionsCli.') + ('.$sqlCommandesFourn.' - '.$sqlReceptionFourn.')))'; + $sql.= ' OR (p.seuil_stock_alerte > 0 AND (p.seuil_stock_alerte > SUM('.$db->ifsql("s.reel IS NULL", "0", "s.reel").')'; + $sql.= ' - ('.$sqlCommandesCli.' - '.$sqlExpeditionsCli.') + ('.$sqlCommandesFourn.' - '.$sqlReceptionFourn.'))))'; + + if ($salert == 'on') // Option to see when stock is lower than alert + { + $sql.= ' AND (p.seuil_stock_alerte > 0 AND (p.seuil_stock_alerte > SUM('.$db->ifsql("s.reel IS NULL", "0", "s.reel").')'; + $sql.= ' - ('.$sqlCommandesCli.' - '.$sqlExpeditionsCli.') + ('.$sqlCommandesFourn.' - '.$sqlReceptionFourn.')))'; + $alertchecked = 'checked="checked"'; + } } else { - $sql.= ' HAVING ((p.desiredstock > 0 AND (p.desiredstock > SUM('.$db->ifsql("s.reel IS NULL", "0", "s.reel").'))) OR (p.seuil_stock_alerte > 0 AND (seuil_stock_alerte > SUM('.$db->ifsql("s.reel IS NULL", "0", "s.reel").'))))'; -} -if ($salert == 'on') // Option to see when stock is lower than alert -{ - $sql .= ' AND SUM('.$db->ifsql("s.reel IS NULL", "0", "s.reel").') < p.seuil_stock_alerte AND p.seuil_stock_alerte is not NULL'; - $alertchecked = 'checked="checked"'; + $sql.= ' HAVING ((p.desiredstock > 0 AND (p.desiredstock > SUM('.$db->ifsql("s.reel IS NULL", "0", "s.reel").')))'; + $sql.= ' OR (p.seuil_stock_alerte > 0 AND (p.seuil_stock_alerte > SUM('.$db->ifsql("s.reel IS NULL", "0", "s.reel").'))))'; + + if ($salert == 'on') // Option to see when stock is lower than alert + { + $sql.= ' AND (p.seuil_stock_alerte > 0 AND (p.seuil_stock_alerte > SUM('.$db->ifsql("s.reel IS NULL", "0", "s.reel").')))'; + $alertchecked = 'checked="checked"'; + } } + $sql.= $db->order($sortfield,$sortorder); $sql.= $db->plimit($limit, $offset); @@ -368,6 +390,7 @@ print '' ''. ''. ''. + ''. ''; @@ -451,18 +474,9 @@ while ($i < ($limit ? min($num, $limit) : $num)) { // If option to increase/decrease is not on an object validation, virtual stock may differs from physical stock. $prod->fetch($prod->id); - $result=$prod->load_stats_commande(0, '1,2'); - if ($result < 0) { - dol_print_error($db, $prod->error); - } - $stock_commande_client = $prod->stats_commande['qty']; - $result=$prod->load_stats_commande_fournisseur(0, '3'); - if ($result < 0) { - dol_print_error($db,$prod->error); - } - $stock_commande_fournisseur = $prod->stats_commande_fournisseur['qty']; - $stock = $objp->stock_physique - $stock_commande_client + $stock_commande_fournisseur; - var_dump($stock_commande_fournisseur); + $prod->load_stock(); + + $stock = $prod->stock_theorique; } else { From 830cc30f802c0569ac16a8e2bdf574724f5a6f36 Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Thu, 3 Jul 2014 12:31:55 +0200 Subject: [PATCH 025/258] Fix : sendings and reception stock calculation must be on the same status than order and oreder supplier calculation --- htdocs/product/class/product.class.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index 61b885f02c7..2bdc950495e 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -1680,17 +1680,19 @@ class Product extends CommonObject $sql.= " COUNT(ed.rowid) as nb_rows, SUM(ed.qty) as qty"; $sql.= " FROM ".MAIN_DB_PREFIX."expeditiondet as ed"; $sql.= ", ".MAIN_DB_PREFIX."commandedet as cd"; + $sql.= ", ".MAIN_DB_PREFIX."commande as c"; $sql.= ", ".MAIN_DB_PREFIX."expedition as e"; $sql.= ", ".MAIN_DB_PREFIX."societe as s"; if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; $sql.= " WHERE e.rowid = ed.fk_expedition"; + $sql.= " AND c.rowid = cd.fk_commande"; $sql.= " AND e.fk_soc = s.rowid"; $sql.= " AND e.entity = ".$conf->entity; $sql.= " AND ed.fk_origin_line = cd.rowid"; $sql.= " AND cd.fk_product = ".$this->id; if (!$user->rights->societe->client->voir && !$socid) $sql.= " AND e.fk_soc = sc.fk_soc AND sc.fk_user = " .$user->id; if ($socid > 0) $sql.= " AND e.fk_soc = ".$socid; - if ($filtrestatut <> '') $sql.= " AND e.fk_statut in (".$filtrestatut.")"; + if ($filtrestatut <> '') $sql.= " AND c.fk_statut in (".$filtrestatut.")"; $result = $this->db->query($sql); if ( $result ) @@ -2946,7 +2948,7 @@ class Product extends CommonObject } if (! empty($conf->expedition->enabled)) { - $result=$this->load_stats_sending(0,''); + $result=$this->load_stats_sending(0,'1,2'); if ($result < 0) dol_print_error($db,$this->error); $stock_sending_client=$this->stats_expedition['qty']; } @@ -2956,12 +2958,13 @@ class Product extends CommonObject if ($result < 0) dol_print_error($db,$this->error); $stock_commande_fournisseur=$this->stats_commande_fournisseur['qty']; - $result=$this->load_stats_reception(0,''); + $result=$this->load_stats_reception(0,'3'); if ($result < 0) dol_print_error($db,$this->error); $stock_reception_fournisseur=$this->stats_reception['qty']; } $this->stock_theorique=$this->stock_reel-($stock_commande_client-$stock_sending_client)+($stock_commande_fournisseur-$stock_reception_fournisseur); + //echo $this->stock_theorique.' = '.$this->stock_reel.' - ('.$stock_commande_client.' - '.$stock_sending_client.') + ('.$stock_commande_fournisseur.' - '.$stock_reception_fournisseur.')'; } } From a1b6aedc905ac6f9e7c44d1251c50af0da6a5bba Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 3 Jul 2014 12:53:26 +0200 Subject: [PATCH 026/258] Add field task_datehour --- htdocs/install/mysql/migration/3.6.0-3.7.0.sql | 2 ++ htdocs/install/mysql/tables/llx_projet_task_time.sql | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) 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 a8019d3af4c..df1c0cb64c4 100644 --- a/htdocs/install/mysql/migration/3.6.0-3.7.0.sql +++ b/htdocs/install/mysql/migration/3.6.0-3.7.0.sql @@ -49,3 +49,5 @@ ALTER TABLE llx_user MODIFY COLUMN accountancy_code varchar(32); ALTER TABLE llx_bank_account ADD COLUMN accountancy_journal varchar(3) DEFAULT NULL AFTER account_number; + +ALTER TABLE llx_projet_task_time ADD COLUMN task_datehour datetime after task_date; diff --git a/htdocs/install/mysql/tables/llx_projet_task_time.sql b/htdocs/install/mysql/tables/llx_projet_task_time.sql index 8bef980a12e..d5d89812b4a 100644 --- a/htdocs/install/mysql/tables/llx_projet_task_time.sql +++ b/htdocs/install/mysql/tables/llx_projet_task_time.sql @@ -20,7 +20,8 @@ create table llx_projet_task_time ( rowid integer AUTO_INCREMENT PRIMARY KEY, fk_task integer NOT NULL, - task_date date, + task_date date, -- only the day + task_datehour datetime, -- day + hour task_duration double, fk_user integer, thm double(24,8), From 1e5c35093ba6baa77e1842f118badb8d09184038 Mon Sep 17 00:00:00 2001 From: KreizIT Date: Thu, 3 Jul 2014 14:01:01 +0200 Subject: [PATCH 027/258] Review trigger for user module --- dev/skeletons/skeleton_class.class.php | 24 +++--- htdocs/user/class/user.class.php | 100 ++++++++++++------------- htdocs/user/class/usergroup.class.php | 49 +++++++----- 3 files changed, 84 insertions(+), 89 deletions(-) diff --git a/dev/skeletons/skeleton_class.class.php b/dev/skeletons/skeleton_class.class.php index c36dad4b4b5..49937c40314 100644 --- a/dev/skeletons/skeleton_class.class.php +++ b/dev/skeletons/skeleton_class.class.php @@ -105,10 +105,8 @@ class Skeleton_Class extends CommonObject // want this action calls a trigger. //// Call triggers - //include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - //$interface=new Interfaces($this->db); - //$result=$interface->run_triggers('MYOBJECT_CREATE',$this,$user,$langs,$conf); - //if ($result < 0) { $error++; $this->errors=$interface->errors; } + //$result=$this->call_trigger('MYOBJECT_CREATE',$user); + //if ($result < 0) { $error++; //Do also what you must do to rollback action if trigger fail} //// End call triggers } } @@ -216,12 +214,10 @@ class Skeleton_Class extends CommonObject // want this action calls a trigger. //// Call triggers - //include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - //$interface=new Interfaces($this->db); - //$result=$interface->run_triggers('MYOBJECT_MODIFY',$this,$user,$langs,$conf); - //if ($result < 0) { $error++; $this->errors=$interface->errors; } + //$result=$this->call_trigger('MYOBJECT_MODIFY',$user); + //if ($result < 0) { $error++; //Do also what you must do to rollback action if trigger fail} //// End call triggers - } + } } // Commit or rollback @@ -264,12 +260,10 @@ class Skeleton_Class extends CommonObject // Uncomment this and change MYOBJECT to your own tag if you // want this action calls a trigger. - //// Call triggers - //include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - //$interface=new Interfaces($this->db); - //$result=$interface->run_triggers('MYOBJECT_DELETE',$this,$user,$langs,$conf); - //if ($result < 0) { $error++; $this->errors=$interface->errors; } - //// End call triggers + //// Call triggers + //$result=$this->call_trigger('MYOBJECT_DELETE',$user); + //if ($result < 0) { $error++; //Do also what you must do to rollback action if trigger fail} + //// End call triggers } } diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index ac4c830fed2..b7e492de58e 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -667,12 +667,10 @@ class User extends CommonObject dol_syslog(get_class($this)."::setstatus sql=".$sql); if ($result) { - // Appel des triggers - include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $interface=new Interfaces($this->db); - $result=$interface->run_triggers('USER_ENABLEDISABLE',$this,$user,$langs,$conf); - if ($result < 0) { $error++; $this->errors=$interface->errors; } - // Fin appel triggers + // Call trigger + $result=$this->call_trigger('USER_ENABLEDISABLE',$user); + if ($result < 0) { $error++; } + // End call triggers } if ($error) @@ -759,13 +757,16 @@ class User extends CommonObject if (! $error) { - // Appel des triggers - include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $interface=new Interfaces($this->db); - $result=$interface->run_triggers('USER_DELETE',$this,$user,$langs,$conf); - if ($result < 0) { $error++; $this->errors=$interface->errors; } - // Fin appel triggers - + // Call trigger + $result=$this->call_trigger('USER_DELETE',$user); + if ($result < 0) + { + $error++; + $this->db->rollback(); + return -1; + } + // End call triggers + $this->db->commit(); return 1; } @@ -866,12 +867,10 @@ class User extends CommonObject if (! $notrigger) { - // Appel des triggers - include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $interface = new Interfaces($this->db); - $result = $interface->run_triggers('USER_CREATE',$this,$user,$langs,$conf); - if ($result < 0) { $error++; $this->errors=$interface->errors; } - // Fin appel triggers + // Call trigger + $result=$this->call_trigger('USER_CREATE',$user); + if ($result < 0) { $error++; } + // End call triggers } if (! $error) @@ -881,7 +880,7 @@ class User extends CommonObject } else { - $this->error=$interface->error; + //$this->error=$interface->error; dol_syslog(get_class($this)."::create ".$this->error, LOG_ERR); $this->db->rollback(); return -3; @@ -953,13 +952,11 @@ class User extends CommonObject dol_syslog(get_class($this)."::create_from_contact sql=".$sql, LOG_DEBUG); if ($resql) { - // Appel des triggers - include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $interface = new Interfaces($this->db); - $result = $interface->run_triggers('USER_CREATE_FROM_CONTACT',$this,$user,$langs,$conf); - if ($result < 0) { $error++; $this->errors=$interface->errors; } - // Fin appel triggers - + // Call trigger + $result=$this->call_trigger('USER_CREATE_FROM_CONTACT',$user); + if ($result < 0) { $error++; $this->db->rollback(); return -1; } + // End call triggers + $this->db->commit(); return $this->id; } @@ -1271,12 +1268,10 @@ class User extends CommonObject if (! $error && ! $notrigger) { - // Appel des triggers - include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $interface=new Interfaces($this->db); - $result=$interface->run_triggers('USER_MODIFY',$this,$user,$langs,$conf); - if ($result < 0) { $error++; $this->errors=$interface->errors; } - // Fin appel triggers + // Call trigger + $result=$this->call_trigger('USER_MODIFY',$user); + if ($result < 0) { $error++; } + // End call triggers } if (! $error) @@ -1286,7 +1281,6 @@ class User extends CommonObject } else { - $this->error=$this->db->lasterror(); dol_syslog(get_class($this)."::update error=".$this->error,LOG_ERR); $this->db->rollback(); return -1; @@ -1367,6 +1361,8 @@ class User extends CommonObject { if (! is_object($this->oldcopy)) $this->oldcopy=dol_clone($this); + $this->db->begin(); + $sql = "UPDATE ".MAIN_DB_PREFIX."user"; $sql.= " SET pass_crypted = '".$this->db->escape($password_crypted)."',"; $sql.= " pass_temp = null"; @@ -1420,23 +1416,24 @@ class User extends CommonObject if (! $error && ! $notrigger) { - // Appel des triggers - include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $interface=new Interfaces($this->db); - $result=$interface->run_triggers('USER_NEW_PASSWORD',$this,$user,$langs,$conf); - if ($result < 0) $this->errors=$interface->errors; - // Fin appel triggers + // Call trigger + $result=$this->call_trigger('USER_NEW_PASSWORD',$user); + if ($result < 0) { $error++; $this->db->rollback(); return -1; } + // End call triggers } - + + $this->db->commit(); return $this->pass; } else { + $this->db->rollback(); return 0; } } else { + $this->db->rollback(); dol_print_error($this->db); return -1; } @@ -1677,12 +1674,10 @@ class User extends CommonObject { $this->newgroupid=$group; - // Appel des triggers - include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $interface=new Interfaces($this->db); - $result=$interface->run_triggers('USER_SETINGROUP',$this,$user,$langs,$conf); - if ($result < 0) { $error++; $this->errors=$interface->errors; } - // Fin appel triggers + // Call trigger + $result=$this->call_trigger('USER_SETINGROUP',$user); + if ($result < 0) { $error++; } + // End call triggers } if (! $error) @@ -1692,7 +1687,6 @@ class User extends CommonObject } else { - $this->error=$interface->error; dol_syslog(get_class($this)."::SetInGroup ".$this->error, LOG_ERR); $this->db->rollback(); return -2; @@ -1735,12 +1729,10 @@ class User extends CommonObject { $this->oldgroupid=$group; - // Appel des triggers - include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $interface=new Interfaces($this->db); - $result=$interface->run_triggers('USER_REMOVEFROMGROUP',$this,$user,$langs,$conf); - if ($result < 0) { $error++; $this->errors=$interface->errors; } - // Fin appel triggers + // Call trigger + $result=$this->call_trigger('USER_REMOVEFROMGROUP',$user); + if ($result < 0) { $error++; } + // End call triggers } if (! $error) diff --git a/htdocs/user/class/usergroup.class.php b/htdocs/user/class/usergroup.class.php index b43794a4b64..7a94ccc0a0d 100644 --- a/htdocs/user/class/usergroup.class.php +++ b/htdocs/user/class/usergroup.class.php @@ -547,12 +547,10 @@ class UserGroup extends CommonObject $result=$this->db->query($sql); if ($result) { - // Appel des triggers - include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $interface=new Interfaces($this->db); - $result=$interface->run_triggers('GROUP_DELETE',$this,$user,$langs,$conf); - if ($result < 0) { $error++; $this->errors=$interface->errors; } - // Fin appel triggers + // Call trigger + $result=$this->call_trigger('GROUP_DELETE',$user); + if ($result < 0) { $error++; $this->db->rollback(); return -1; } + // End call triggers $this->db->commit(); return 1; @@ -583,6 +581,8 @@ class UserGroup extends CommonObject $entity=$this->entity; if (! empty($conf->multicompany->enabled) && $conf->entity == 1) $entity=$this->entity; + $this->db->begin(); + $sql = "INSERT INTO ".MAIN_DB_PREFIX."usergroup ("; $sql.= "datec"; $sql.= ", nom"; @@ -603,18 +603,18 @@ class UserGroup extends CommonObject if (! $notrigger) { - // Appel des triggers - include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $interface=new Interfaces($this->db); - $result=$interface->run_triggers('GROUP_CREATE',$this,$user,$langs,$conf); - if ($result < 0) { $error++; $this->errors=$interface->errors; } - // Fin appel triggers + // Call trigger + $result=$this->call_trigger('GROUP_CREATE',$user); + if ($result < 0) { $error++; $this->db->rollback(); return -1; } + // End call triggers } + $this->db->commit(); return $this->id; } else { + $this->db->rollback(); $this->error=$this->db->lasterror(); dol_syslog(get_class($this)."::create ".$this->error,LOG_ERR); return -1; @@ -639,6 +639,8 @@ class UserGroup extends CommonObject $entity=$this->entity; } + $this->db->begin(); + $sql = "UPDATE ".MAIN_DB_PREFIX."usergroup SET "; $sql.= " nom = '" . $this->db->escape($this->nom) . "'"; $sql.= ", entity = " . $this->db->escape($entity); @@ -651,19 +653,26 @@ class UserGroup extends CommonObject { if (! $notrigger) { - // Appel des triggers - include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $interface=new Interfaces($this->db); - $result=$interface->run_triggers('GROUP_MODIFY',$this,$user,$langs,$conf); - if ($result < 0) { $error++; $this->errors=$interface->errors; } - // Fin appel triggers + // Call trigger + $result=$this->call_trigger('GROUP_MODIFY',$user); + if ($result < 0) { $error++; } + // End call triggers } - if (! $error) return 1; - else return -$error; + if (! $error) + { + $this->db->commit(); + return 1; + } + else + { + $this->db->rollback(); + return -$error; + } } else { + $this->db->rollback(); dol_print_error($this->db); return -1; } From 7d30df42a25c4d89fd35c4bd308e60df14e9872f Mon Sep 17 00:00:00 2001 From: KreizIT Date: Thu, 3 Jul 2014 14:15:15 +0200 Subject: [PATCH 028/258] ChangeLog modification --- ChangeLog | 1 + 1 file changed, 1 insertion(+) diff --git a/ChangeLog b/ChangeLog index ec144c6534b..2ab4929bc68 100644 --- a/ChangeLog +++ b/ChangeLog @@ -10,6 +10,7 @@ For users: - New: Can filter events on a group of users. - New: Add thirdparty to filter on events. - Fix: [ bug #1487 ] PAYMENT_DELETE trigger does not intercept trigger action +- Fix: [ bug #1470, #1472, #1473] User trigger problem For translators: - Update language files. From a22963e4329cf73be2a22874fbfd9c4ca02a1ec6 Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Thu, 3 Jul 2014 14:37:30 +0200 Subject: [PATCH 029/258] Fix : filter by status + was not working if desiredstock not defined --- htdocs/product/stock/replenish.php | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/htdocs/product/stock/replenish.php b/htdocs/product/stock/replenish.php index 0bfdbfb9159..ec4a98d3d2e 100644 --- a/htdocs/product/stock/replenish.php +++ b/htdocs/product/stock/replenish.php @@ -257,15 +257,16 @@ if ($usevirtualstock) $sqlCommandesCli.= " LEFT JOIN ".MAIN_DB_PREFIX."commande as c ON (c.rowid = cd.fk_commande)"; $sqlCommandesCli.= " WHERE c.entity = ".$conf->entity; $sqlCommandesCli.= " AND cd.fk_product = p.rowid"; - $sqlCommandesCli.= " AND c.fk_statut in (1,2))"; + $sqlCommandesCli.= " AND c.fk_statut IN (1,2))"; $sqlExpeditionsCli = "(SELECT ".$db->ifsql("SUM(ed.qty) IS NULL", "0", "SUM(ed.qty)")." as qty"; $sqlExpeditionsCli.= " FROM ".MAIN_DB_PREFIX."expedition as e"; $sqlExpeditionsCli.= " LEFT JOIN ".MAIN_DB_PREFIX."expeditiondet as ed ON (ed.fk_expedition = e.rowid)"; $sqlExpeditionsCli.= " LEFT JOIN ".MAIN_DB_PREFIX."commandedet as cd ON (cd.rowid = ed.fk_origin_line)"; + $sqlExpeditionsCli.= " LEFT JOIN ".MAIN_DB_PREFIX."commande as c ON (c.rowid = cd.fk_commande)"; $sqlExpeditionsCli.= " WHERE e.entity = ".$conf->entity; $sqlExpeditionsCli.= " AND cd.fk_product = p.rowid"; - $sqlExpeditionsCli.= " AND e.fk_statut > 0)"; + $sqlExpeditionsCli.= " AND c.fk_statut IN (1,2))"; $sqlCommandesFourn = "(SELECT ".$db->ifsql("SUM(cd.qty) IS NULL", "0", "SUM(cd.qty)")." as qty"; $sqlCommandesFourn.= " FROM ".MAIN_DB_PREFIX."commande_fournisseurdet as cd"; @@ -273,18 +274,18 @@ if ($usevirtualstock) $sqlCommandesFourn.= " WHERE c.rowid = cd.fk_commande"; $sqlCommandesFourn.= " AND c.entity = ".$conf->entity; $sqlCommandesFourn.= " AND cd.fk_product = p.rowid"; - $sqlCommandesFourn.= " AND c.fk_statut in (2,3))"; + $sqlCommandesFourn.= " AND c.fk_statut IN (3,4))"; $sqlReceptionFourn = "(SELECT ".$db->ifsql("SUM(fd.qty) IS NULL", "0", "SUM(fd.qty)")." as qty"; $sqlReceptionFourn.= " FROM ".MAIN_DB_PREFIX."commande_fournisseur as cf"; - $sqlReceptionFourn.= " LEFT JOIN ".MAIN_DB_PREFIX."commande_fournisseurdet as cfd ON (cfd.fk_commande = cf.rowid)"; $sqlReceptionFourn.= " LEFT JOIN ".MAIN_DB_PREFIX."commande_fournisseur_dispatch as fd ON (fd.fk_commande = cf.rowid)"; $sqlReceptionFourn.= " WHERE cf.entity = ".$conf->entity; - $sqlReceptionFourn.= " AND fd.fk_product = p.rowid)"; + $sqlReceptionFourn.= " AND fd.fk_product = p.rowid"; + $sqlReceptionFourn.= " AND cf.fk_statut IN (3,4))"; - $sql.= ' HAVING ((p.desiredstock > 0 AND (p.desiredstock > SUM('.$db->ifsql("s.reel IS NULL", "0", "s.reel").')'; + $sql.= ' HAVING ((('.$db->ifsql("p.desiredstock IS NULL", "0", "p.desiredstock").' > SUM('.$db->ifsql("s.reel IS NULL", "0", "s.reel").')'; $sql.= ' - ('.$sqlCommandesCli.' - '.$sqlExpeditionsCli.') + ('.$sqlCommandesFourn.' - '.$sqlReceptionFourn.')))'; - $sql.= ' OR (p.seuil_stock_alerte > 0 AND (p.seuil_stock_alerte > SUM('.$db->ifsql("s.reel IS NULL", "0", "s.reel").')'; + $sql.= ' OR (p.seuil_stock_alerte >= 0 AND (p.seuil_stock_alerte > SUM('.$db->ifsql("s.reel IS NULL", "0", "s.reel").')'; $sql.= ' - ('.$sqlCommandesCli.' - '.$sqlExpeditionsCli.') + ('.$sqlCommandesFourn.' - '.$sqlReceptionFourn.'))))'; if ($salert == 'on') // Option to see when stock is lower than alert From a26db9ab524010e9ddf6b2da1aa9f10353584bf4 Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Thu, 3 Jul 2014 14:47:28 +0200 Subject: [PATCH 030/258] Fix : qty ordered was not including qty already received --- htdocs/product/stock/replenish.php | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/htdocs/product/stock/replenish.php b/htdocs/product/stock/replenish.php index ec4a98d3d2e..ca014e50cf0 100644 --- a/htdocs/product/stock/replenish.php +++ b/htdocs/product/stock/replenish.php @@ -446,6 +446,9 @@ while ($i < ($limit ? min($num, $limit) : $num)) if (! empty($conf->global->STOCK_SUPPORTS_SERVICES) || $objp->fk_product_type == 0) { + $prod->fetch($objp->rowid); + $prod->load_stock(); + // Multilangs if (! empty($conf->global->MAIN_MULTILANGS)) { @@ -462,27 +465,21 @@ while ($i < ($limit ? min($num, $limit) : $num)) if (!empty($objtp->label)) $objp->label = $objtp->label; } } + $form = new Form($db); $var =! $var; - $prod->ref = $objp->ref; - $prod->id = $objp->rowid; - $prod->type = $objp->fk_product_type; - // Get number already ordered. - $ordered = ordered($prod->id); - - // Defined current stock number and warning if required if ($usevirtualstock) { // If option to increase/decrease is not on an object validation, virtual stock may differs from physical stock. - $prod->fetch($prod->id); - $prod->load_stock(); - $stock = $prod->stock_theorique; } else { - $stock = $objp->stock_physique; + $stock = $prod->stock_reel; } + + $ordered = $prod->stats_commande_fournisseur['qty']-$prod->stats_reception['qty']; + $warning=''; if ($objp->alertstock && ($stock < $objp->alertstock)) { From 174edb6140f26ecc86ffa8d33d5ff987e9c5c93f Mon Sep 17 00:00:00 2001 From: KreizIT Date: Thu, 3 Jul 2014 14:57:16 +0200 Subject: [PATCH 031/258] FIX: Intervention trigger --- ChangeLog | 1 + htdocs/fichinter/class/fichinter.class.php | 91 ++++++++-------------- 2 files changed, 32 insertions(+), 60 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2ab4929bc68..3cf736d8edf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -11,6 +11,7 @@ For users: - New: Add thirdparty to filter on events. - Fix: [ bug #1487 ] PAYMENT_DELETE trigger does not intercept trigger action - Fix: [ bug #1470, #1472, #1473] User trigger problem +- Fix: [ bug #1489, #1491 ] Intervention trigger problem For translators: - Update language files. diff --git a/htdocs/fichinter/class/fichinter.class.php b/htdocs/fichinter/class/fichinter.class.php index d7bb50682fe..1aff2964eea 100644 --- a/htdocs/fichinter/class/fichinter.class.php +++ b/htdocs/fichinter/class/fichinter.class.php @@ -176,13 +176,10 @@ class Fichinter extends CommonObject if (! $notrigger) { - // Appel des triggers - include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $interface=new Interfaces($this->db); - $result=$interface->run_triggers('FICHINTER_CREATE',$this,$user,$langs,$conf); - if ($result < 0) { - $error++; $this->errors=$interface->errors; - } + // Call trigger + $result=$this->call_trigger('FICHINTER_CREATE',$user); + if ($result < 0) { $error++; } + // End call triggers } if (! $error) @@ -240,14 +237,10 @@ class Fichinter extends CommonObject if (! $notrigger) { - // Appel des triggers - include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $interface=new Interfaces($this->db); - $result=$interface->run_triggers('FICHINTER_MODIFY',$this,$user,$langs,$conf); - if ($result < 0) { - $error++; $this->errors=$interface->errors; - } - // Fin appel triggers + // Call trigger + $result=$this->call_trigger('FICHINTER_MODIFY',$user); + if ($result < 0) { $error++; $this->db->rollback(); return -1; } + // End call triggers } $this->db->commit(); @@ -454,14 +447,10 @@ class Fichinter extends CommonObject if (! $error) { - // Appel des triggers - include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $interface=new Interfaces($this->db); - $result=$interface->run_triggers('FICHINTER_VALIDATE',$this,$user,$langs,$conf); - if ($result < 0) { - $error++; $this->errors=$interface->errors; - } - // Fin appel triggers + // Call trigger + $result=$this->call_trigger('FICHINTER_VALIDATE',$user); + if ($result < 0) { $error++; } + // End call triggers } if (! $error) @@ -762,14 +751,10 @@ class Fichinter extends CommonObject if (! $notrigger) { - // Appel des triggers - include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $interface=new Interfaces($this->db); - $result=$interface->run_triggers('FICHINTER_DELETE',$this,$user,$langs,$conf); - if ($result < 0) { - $error++; $this->errors=$interface->errors; - } - // Fin appel triggers + // Call trigger + $result=$this->call_trigger('FICHINTER_DELETE',$user); + if ($result < 0) { $error++; $this->db->rollback(); return -1; } + // End call triggers } $this->db->commit(); @@ -1137,14 +1122,10 @@ class FichinterLigne if (! $notrigger) { - // Appel des triggers - include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $interface=new Interfaces($this->db); - $resulttrigger=$interface->run_triggers('LINEFICHINTER_CREATE',$this,$user,$langs,$conf); - if ($resulttrigger < 0) { - $error++; $this->errors=$interface->errors; - } - // Fin appel triggers + // Call trigger + $result=$this->call_trigger('LINEFICHINTER_CREATE',$user); + if ($result < 0) { $error++; } + // End call triggers } } @@ -1199,14 +1180,10 @@ class FichinterLigne if (! $notrigger) { - // Appel des triggers - include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $interface=new Interfaces($this->db); - $resulttrigger=$interface->run_triggers('LINEFICHINTER_UPDATE',$this,$user,$langs,$conf); - if ($resulttrigger < 0) { - $error++; $this->errors=$interface->errors; - } - // Fin appel triggers + // Call trigger + $result=$this->call_trigger('LINEFICHINTER_UPDATE',$user); + if ($result < 0) { $error++; } + // End call triggers } } @@ -1217,7 +1194,6 @@ class FichinterLigne } else { - $this->error=$this->db->lasterror(); dol_syslog("FichinterLigne::update Error ".$this->error, LOG_ERR); $this->db->rollback(); return -1; @@ -1309,21 +1285,16 @@ class FichinterLigne $result = $this->update_total(); if ($result > 0) { - $this->db->commit(); - if (! $notrigger) { - // Appel des triggers - include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $interface=new Interfaces($this->db); - $resulttrigger=$interface->run_triggers('LINEFICHINTER_DELETE',$this,$user,$langs,$conf); - if ($resulttrigger < 0) { - $error++; $this->errors=$interface->errors; - } - // Fin appel triggers + // Call trigger + $result=$this->call_trigger('LINEFICHINTER_DELETE',$user); + if ($result < 0) { $error++; $this->db->rollback(); return -1; } + // End call triggers } - - return $result; + + $this->db->commit(); + return $result; } else { From 685b7b23adfc6d4225be147042ccd3a50e84d7bc Mon Sep 17 00:00:00 2001 From: KreizIT Date: Thu, 3 Jul 2014 15:09:46 +0200 Subject: [PATCH 032/258] FIX: Member's trigger problem --- ChangeLog | 1 + htdocs/adherents/class/adherent.class.php | 75 ++++++++++------------- 2 files changed, 34 insertions(+), 42 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3cf736d8edf..20ac8a3dff5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -12,6 +12,7 @@ For users: - Fix: [ bug #1487 ] PAYMENT_DELETE trigger does not intercept trigger action - Fix: [ bug #1470, #1472, #1473] User trigger problem - Fix: [ bug #1489, #1491 ] Intervention trigger problem +- Fix: [ bug #1492, #1493 ] Member trigger problem For translators: - Update language files. diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php index b03bff940dd..99b4e7df1f4 100644 --- a/htdocs/adherents/class/adherent.class.php +++ b/htdocs/adherents/class/adherent.class.php @@ -347,12 +347,10 @@ class Adherent extends CommonObject if (! $notrigger) { - // Appel des triggers - include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $interface=new Interfaces($this->db); - $result=$interface->run_triggers('MEMBER_CREATE',$this,$user,$langs,$conf); - if ($result < 0) { $error++; $this->errors=$interface->errors; } - // Fin appel triggers + // Call trigger + $result=$this->call_trigger('MEMBER_CREATE',$user); + if ($result < 0) { $error++; } + // End call triggers } if (count($this->errors)) @@ -599,12 +597,10 @@ class Adherent extends CommonObject if (! $error && ! $notrigger) { - // Appel des triggers - include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $interface=new Interfaces($this->db); - $result=$interface->run_triggers('MEMBER_MODIFY',$this,$user,$langs,$conf); - if ($result < 0) { $error++; $this->errors=$interface->errors; } - // Fin appel triggers + // Call trigger + $result=$this->call_trigger('MEMBER_MODIFY',$user); + if ($result < 0) { $error++; } + // End call triggers } } @@ -782,12 +778,10 @@ class Adherent extends CommonObject if (! $error) { - // Appel des triggers - include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $interface=new Interfaces($this->db); - $result=$interface->run_triggers('MEMBER_DELETE',$this,$user,$langs,$conf); - if ($result < 0) {$error++; $this->errors=$interface->errors;} - // Fin appel triggers + // Call trigger + $result=$this->call_trigger('MEMBER_DELETE',$user); + if ($result < 0) { $error++; } + // End call triggers } @@ -841,6 +835,8 @@ class Adherent extends CommonObject $password_indatabase = $password; } + $this->db->begin(); + // Mise a jour $sql = "UPDATE ".MAIN_DB_PREFIX."adherent SET pass = '".$this->db->escape($password_indatabase)."'"; $sql.= " WHERE rowid = ".$this->id; @@ -885,23 +881,24 @@ class Adherent extends CommonObject if (! $error && ! $notrigger) { - // Appel des triggers - include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $interface=new Interfaces($this->db); - $result=$interface->run_triggers('MEMBER_NEW_PASSWORD',$this,$user,$langs,$conf); - if ($result < 0) { $error++; $this->errors=$interface->errors; } - // Fin appel triggers + // Call trigger + $result=$this->call_trigger('MEMBER_NEW_PASSWORD',$user); + if ($result < 0) { $error++; $this->db->rollback(); return -1; } + // End call triggers } + $this->db->commit(); return $this->pass; } else { + $this->db->rollback(); return 0; } } else { + $this->db->rollback(); dol_print_error($this->db); return -1; } @@ -1301,12 +1298,10 @@ class Adherent extends CommonObject $this->last_subscription_date_start=$date; $this->last_subscription_date_end=$datefin; - // Appel des triggers - include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $interface=new Interfaces($this->db); - $result=$interface->run_triggers('MEMBER_SUBSCRIPTION',$this,$user,$langs,$conf); - if ($result < 0) { $error++; $this->errors=$interface->errors; } - // Fin appel triggers + // Call trigger + $result=$this->call_trigger('MEMBER_SUBSCRIPTION',$user); + if ($result < 0) { $error++; } + // End call triggers } if (! $error) @@ -1362,12 +1357,10 @@ class Adherent extends CommonObject { $this->statut=1; - // Appel des triggers - include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $interface=new Interfaces($this->db); - $result=$interface->run_triggers('MEMBER_VALIDATE',$this,$user,$langs,$conf); - if ($result < 0) { $error++; $this->errors=$interface->errors; } - // Fin appel triggers + // Call trigger + $result=$this->call_trigger('MEMBER_VALIDATE',$user); + if ($result < 0) { $error++; $this->db->rollback(); return -1; } + // End call triggers $this->db->commit(); return 1; @@ -1412,12 +1405,10 @@ class Adherent extends CommonObject { $this->statut=0; - // Appel des triggers - include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $interface=new Interfaces($this->db); - $result=$interface->run_triggers('MEMBER_RESILIATE',$this,$user,$langs,$conf); - if ($result < 0) { $error++; $this->errors=$interface->errors; } - // Fin appel triggers + // Call trigger + $result=$this->call_trigger('MEMBER_RESILIATE',$user); + if ($result < 0) { $error++; $this->db->rollback(); return -1; } + // End call triggers $this->db->commit(); return 1; From f0323e5b802a862b04aef0ed4ab922c55db7bf63 Mon Sep 17 00:00:00 2001 From: KreizIT Date: Thu, 3 Jul 2014 15:21:43 +0200 Subject: [PATCH 033/258] FIX: Contract's trigger problem --- ChangeLog | 1 + htdocs/contrat/class/contrat.class.php | 89 ++++++++++++-------------- 2 files changed, 41 insertions(+), 49 deletions(-) diff --git a/ChangeLog b/ChangeLog index 20ac8a3dff5..81ec4b5c1e5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -13,6 +13,7 @@ For users: - Fix: [ bug #1470, #1472, #1473] User trigger problem - Fix: [ bug #1489, #1491 ] Intervention trigger problem - Fix: [ bug #1492, #1493 ] Member trigger problem +- Fix: [ bug #1474, #1475 ] Contract trigger problem For translators: - Update language files. diff --git a/htdocs/contrat/class/contrat.class.php b/htdocs/contrat/class/contrat.class.php index daf22e0af7c..960d84c65d6 100644 --- a/htdocs/contrat/class/contrat.class.php +++ b/htdocs/contrat/class/contrat.class.php @@ -158,12 +158,10 @@ class Contrat extends CommonObject $resql = $this->db->query($sql); if ($resql) { - // Appel des triggers - include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $interface=new Interfaces($this->db); - $result=$interface->run_triggers('CONTRACT_SERVICE_ACTIVATE',$this,$user,$langs,$conf); - if ($result < 0) { $error++; $this->errors=$interface->errors; } - // Fin appel triggers + // Call trigger + $result=$this->call_trigger('CONTRACT_SERVICE_ACTIVATE',$user); + if ($result < 0) { $error++; $this->db->rollback(); return -1; } + // End call triggers $this->db->commit(); return 1; @@ -206,12 +204,10 @@ class Contrat extends CommonObject $resql = $this->db->query($sql); if ($resql) { - // Appel des triggers - include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $interface=new Interfaces($this->db); - $result=$interface->run_triggers('CONTRACT_SERVICE_CLOSE',$this,$user,$langs,$conf); - if ($result < 0) { $error++; $this->errors=$interface->errors; } - // Fin appel triggers + // Call trigger + $result=$this->call_trigger('CONTRACT_SERVICE_CLOSE',$user); + if ($result < 0) { $error++; $this->db->rollback(); return -1; } + // End call triggers $this->db->commit(); return 1; @@ -322,6 +318,7 @@ class Contrat extends CommonObject dol_syslog(get_class($this)."::validate Echec update - 10 - sql=".$sql, LOG_ERR); dol_print_error($this->db); $error++; + $this->error=$this->db->lasterror(); } if (! $error) @@ -365,12 +362,10 @@ class Contrat extends CommonObject // Trigger calls if (! $error) { - // Appel des triggers - include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $interface=new Interfaces($this->db); - $result=$interface->run_triggers('CONTRACT_VALIDATE',$this,$user,$langs,$conf); - if ($result < 0) { $error++; $this->errors=$interface->errors; } - // Fin appel triggers + // Call trigger + $result=$this->call_trigger('CONTRACT_VALIDATE',$user); + if ($result < 0) { $error++; } + // End call triggers } } else @@ -386,7 +381,6 @@ class Contrat extends CommonObject else { $this->db->rollback(); - $this->error=$this->db->lasterror(); return -1; } @@ -756,12 +750,10 @@ class Contrat extends CommonObject if (! $error) { - // Appel des triggers - include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $interface=new Interfaces($this->db); - $result=$interface->run_triggers('CONTRACT_CREATE',$this,$user,$langs,$conf); - if ($result < 0) { $error++; $this->errors=$interface->errors; } - // Fin appel triggers + // Call trigger + $result=$this->call_trigger('CONTRACT_CREATE',$user); + if ($result < 0) { $error++; } + // End call triggers if (! $error) { @@ -776,7 +768,6 @@ class Contrat extends CommonObject } else { - $this->error=$interface->error; dol_syslog(get_class($this)."::create - 30 - ".$this->error, LOG_ERR); $this->db->rollback(); @@ -903,14 +894,10 @@ class Contrat extends CommonObject if (! $error) { - // Appel des triggers - include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $interface=new Interfaces($this->db); - $result=$interface->run_triggers('CONTRACT_DELETE',$this,$user,$langs,$conf); - if ($result < 0) { - $error++; $this->errors=$interface->errors; - } - // Fin appel triggers + // Call trigger + $result=$this->call_trigger('CONTRACT_DELETE',$user); + if ($result < 0) { $error++; } + // End call triggers } if (! $error) @@ -938,8 +925,7 @@ class Contrat extends CommonObject return 1; } else - { - $this->error=$this->db->error(); + { dol_syslog(get_class($this)."::delete ERROR ".$this->error, LOG_ERR); $this->db->rollback(); return -1; @@ -1255,6 +1241,9 @@ class Contrat extends CommonObject if ($this->statut >= 0) { + + $this->db->begin(); + $sql = "DELETE FROM ".MAIN_DB_PREFIX."contratdet"; $sql.= " WHERE rowid=".$idline; @@ -1264,16 +1253,16 @@ class Contrat extends CommonObject { $this->error="Error ".$this->db->lasterror(); dol_syslog(get_class($this)."::delete ".$this->error, LOG_ERR); + $this->db->rollback(); return -1; } - // Appel des triggers - include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $interface=new Interfaces($this->db); - $result=$interface->run_triggers('LINECONTRACT_DELETE',$this,$user,$langs,$conf); - if ($result < 0) { $error++; $this->errors=$interface->errors; } - // Fin appel triggers + // Call trigger + $result=$this->call_trigger('LINECONTRACT_DELETE',$user); + if ($result < 0) { $error++; $this->db->rollback(); return -1; } + // End call triggers + $this->db->commit(); return 1; } else @@ -2064,6 +2053,8 @@ class ContratLigne $this->pa_ht = $this->subprice * (1 - $this->remise_percent / 100); } + $this->db->begin(); + // Update request $sql = "UPDATE ".MAIN_DB_PREFIX."contratdet SET"; $sql.= " fk_contrat='".$this->fk_contrat."',"; @@ -2111,19 +2102,19 @@ class ContratLigne { $this->error="Error ".$this->db->lasterror(); dol_syslog(get_class($this)."::update ".$this->error, LOG_ERR); + $this->db->rollback(); return -1; } if (! $notrigger) { - // Appel des triggers - include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $interface=new Interfaces($this->db); - $result=$interface->run_triggers('LINECONTRACT_UPDATE',$this,$user,$langs,$conf); - if ($result < 0) { $error++; $this->errors=$interface->errors; } - // Fin appel triggers + // Call trigger + $result=$this->call_trigger('LINECONTRACT_UPDATE',$user); + if ($result < 0) { $error++; $this->db->rollback(); return -1; } + // End call triggers } - + + $this->db->commit(); return 1; } From 51e4fa0d3613629347a7df1a51c06441584412c2 Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Thu, 3 Jul 2014 15:31:51 +0200 Subject: [PATCH 034/258] Fix : picto for already ordered product was missing --- htdocs/product/stock/replenish.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/htdocs/product/stock/replenish.php b/htdocs/product/stock/replenish.php index ca014e50cf0..817ec5cbf7a 100644 --- a/htdocs/product/stock/replenish.php +++ b/htdocs/product/stock/replenish.php @@ -489,6 +489,19 @@ while ($i < ($limit ? min($num, $limit) : $num)) //depending on conf, use either physical stock or //virtual stock to compute the stock to buy value $stocktobuy = max(max($objp->desiredstock, $objp->alertstock) - $stock - $ordered, 0); + $disabled = ''; + if($ordered > 0) { + $compare = $usevirtualstock ? $stock : $stock + $ordered; + if($compare >= $objp->desiredstock) { + $picto = img_picto('', './img/yes', '', 1); + $disabled = 'disabled="disabled"'; + } + else { + $picto = img_picto('', './img/no', '', 1); + } + } else { + $picto = img_picto('', './img/no', '', 1); + } print ''; From 538cf90f5e8f550e0a9bd43568a34ec60291434f Mon Sep 17 00:00:00 2001 From: KreizIT Date: Thu, 3 Jul 2014 15:39:40 +0200 Subject: [PATCH 035/258] FIX : [ bug #1496 ] ACTION_DELETE trigger does not show trigger error -Add ACTION_* trigger in interface_90_all --- ChangeLog | 2 ++ htdocs/comm/action/class/actioncomm.class.php | 36 +++++++------------ htdocs/comm/action/fiche.php | 3 +- .../interface_90_all_Demo.class.php-NORUN | 16 +++++++++ 4 files changed, 31 insertions(+), 26 deletions(-) diff --git a/ChangeLog b/ChangeLog index 81ec4b5c1e5..02f58dedd5f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -14,6 +14,8 @@ For users: - Fix: [ bug #1489, #1491 ] Intervention trigger problem - Fix: [ bug #1492, #1493 ] Member trigger problem - Fix: [ bug #1474, #1475 ] Contract trigger problem +- Fix: [ bug #1496 ] ACTION_DELETE trigger does not show trigger error + For translators: - Update language files. diff --git a/htdocs/comm/action/class/actioncomm.class.php b/htdocs/comm/action/class/actioncomm.class.php index ee9e4c032ee..139ab2d048a 100644 --- a/htdocs/comm/action/class/actioncomm.class.php +++ b/htdocs/comm/action/class/actioncomm.class.php @@ -227,14 +227,10 @@ class ActionComm extends CommonObject if (! $error && ! $notrigger) { - // Appel des triggers - include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $interface=new Interfaces($this->db); - $result=$interface->run_triggers('ACTION_CREATE',$this,$user,$langs,$conf); - if ($result < 0) { - $error++; $this->errors=$interface->errors; - } - // Fin appel triggers + // Call trigger + $result=$this->call_trigger('ACTION_CREATE',$user); + if ($result < 0) { $error++; } + // End call triggers } if (! $error) @@ -390,14 +386,10 @@ class ActionComm extends CommonObject { if (! $notrigger) { - // Appel des triggers - include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $interface=new Interfaces($this->db); - $result=$interface->run_triggers('ACTION_DELETE',$this,$user,$langs,$conf); - if ($result < 0) { - $error++; $this->errors=$interface->errors; - } - // Fin appel triggers + // Call trigger + $result=$this->call_trigger('ACTION_DELETE',$user); + if ($result < 0) { $error++; } + // End call triggers } if (! $error) @@ -500,14 +492,10 @@ class ActionComm extends CommonObject if (! $notrigger) { - // Appel des triggers - include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $interface=new Interfaces($this->db); - $result=$interface->run_triggers('ACTION_MODIFY',$this,$user,$langs,$conf); - if ($result < 0) { - $error++; $this->errors=$interface->errors; - } - // Fin appel triggers + // Call trigger + $result=$this->call_trigger('ACTION_MODIFY',$user); + if ($result < 0) { $error++; } + // End call triggers } if (! $error) diff --git a/htdocs/comm/action/fiche.php b/htdocs/comm/action/fiche.php index 450d7475947..ca17c261680 100644 --- a/htdocs/comm/action/fiche.php +++ b/htdocs/comm/action/fiche.php @@ -283,8 +283,7 @@ if ($action == 'confirm_delete' && GETPOST("confirm") == 'yes') } else { - $mesg=$object->error; - setEventMessage($mesg,'errors'); + setEventMessage($object->error,'errors'); } } } diff --git a/htdocs/core/triggers/interface_90_all_Demo.class.php-NORUN b/htdocs/core/triggers/interface_90_all_Demo.class.php-NORUN index f0f96961b86..f3811afc45b 100644 --- a/htdocs/core/triggers/interface_90_all_Demo.class.php-NORUN +++ b/htdocs/core/triggers/interface_90_all_Demo.class.php-NORUN @@ -119,6 +119,8 @@ class InterfaceDemo } elseif ($action == 'USER_CREATE') { + $object->error=$action; + return -1; dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); } elseif ($action == 'USER_CREATE_FROM_CONTACT') @@ -154,6 +156,20 @@ class InterfaceDemo dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); } + // Action + elseif ($action == 'ACTION_MODIFY') + { + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + } + elseif ($action == 'ACTION_CREATE') + { + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + } + elseif ($action == 'ACTION_DELETE') + { + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + } + // Groups elseif ($action == 'GROUP_CREATE') { From cb4c3a4431a9bbca6877faf1fe71fb0708763358 Mon Sep 17 00:00:00 2001 From: Juanjo Menent Date: Thu, 3 Jul 2014 15:51:46 +0200 Subject: [PATCH 036/258] [ task #1063 ] Allow edit localtaxes rate for thirds. Works withd database --- htdocs/install/mysql/migration/3.6.0-3.7.0.sql | 7 +++++++ htdocs/install/mysql/tables/llx_c_tva.sql | 8 ++++---- htdocs/install/mysql/tables/llx_localtax.sql | 5 +++-- htdocs/install/mysql/tables/llx_societe.sql | 2 ++ 4 files changed, 16 insertions(+), 6 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 df1c0cb64c4..f5757a39754 100644 --- a/htdocs/install/mysql/migration/3.6.0-3.7.0.sql +++ b/htdocs/install/mysql/migration/3.6.0-3.7.0.sql @@ -51,3 +51,10 @@ ALTER TABLE llx_user MODIFY COLUMN accountancy_code varchar(32); ALTER TABLE llx_bank_account ADD COLUMN accountancy_journal varchar(3) DEFAULT NULL AFTER account_number; ALTER TABLE llx_projet_task_time ADD COLUMN task_datehour datetime after task_date; + +-- Localtaxes by thirds +ALTER TABLE llx_c_tva MODIFY COLUMN localtax1 varchar(10); +ALTER TABLE llx_c_tva MODIFY COLUMN localtax2 varchar(10); +ALTER TABLE llx_localtax ADD COLUMN localtaxtype tinyint(4) after entity; +ALTER TABLE llx_societe ADD COLUMN localtax1_value double(6,3) after localtax1_assuj; +ALTER TABLE llx_societe ADD COLUMN localtax2_value double(6,3) after localtax2_assuj; diff --git a/htdocs/install/mysql/tables/llx_c_tva.sql b/htdocs/install/mysql/tables/llx_c_tva.sql index e2de4c3b5ef..2a0b275ce96 100644 --- a/htdocs/install/mysql/tables/llx_c_tva.sql +++ b/htdocs/install/mysql/tables/llx_c_tva.sql @@ -1,6 +1,6 @@ -- ======================================================================== -- Copyright (C) 2005 Laurent Destailleur --- Copyright (C) 2010 Juanjo Menent +-- Copyright (C) 2010-2014 Juanjo Menent -- Copyright (C) 2011-2012 Alexandre Spangaro -- -- This program is free software; you can redistribute it and/or modify @@ -23,10 +23,10 @@ create table llx_c_tva rowid integer NOT NULL AUTO_INCREMENT PRIMARY KEY, fk_pays integer NOT NULL, taux double NOT NULL, - localtax1 double NOT NULL DEFAULT 0, + localtax1 varchar(10) NOT NULL DEFAULT '0', localtax1_type varchar(10) NOT NULL DEFAULT '0', - localtax2 double NOT NULL DEFAULT 0, - localtax2_type varchar(10) NOT NULL DEFAULT '0', + localtax2 varchar(10) NOT NULL DEFAULT '0', + localtax2_type varchar(10) NOT NULL DEFAULT '0', recuperableonly integer NOT NULL DEFAULT 0, note varchar(128), active tinyint DEFAULT 1 NOT NULL, diff --git a/htdocs/install/mysql/tables/llx_localtax.sql b/htdocs/install/mysql/tables/llx_localtax.sql index c7ca3ca44f6..bc646ffc245 100644 --- a/htdocs/install/mysql/tables/llx_localtax.sql +++ b/htdocs/install/mysql/tables/llx_localtax.sql @@ -1,6 +1,6 @@ -- =================================================================== --- Copyright (C) 2011 Juanjo Menent --- Copyright (C) 2011 Regis Houssin +-- Copyright (C) 2011-2014 Juanjo Menent +-- Copyright (C) 2011 Regis Houssin -- -- 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 @@ -21,6 +21,7 @@ create table llx_localtax ( rowid integer AUTO_INCREMENT PRIMARY KEY, entity integer DEFAULT 1 NOT NULL, + localtaxtype tinyint(4), tms timestamp, datep date, -- date of payment datev date, -- date of value diff --git a/htdocs/install/mysql/tables/llx_societe.sql b/htdocs/install/mysql/tables/llx_societe.sql index e2c08d246be..b7f91c2d1ef 100644 --- a/htdocs/install/mysql/tables/llx_societe.sql +++ b/htdocs/install/mysql/tables/llx_societe.sql @@ -81,7 +81,9 @@ create table llx_societe cond_reglement_supplier tinyint, -- condition de reglement fournisseur tva_assuj tinyint DEFAULT 1, -- assujeti ou non a la TVA localtax1_assuj tinyint DEFAULT 0, -- assujeti ou non a local tax 1 + localtax1_value double(6,3), localtax2_assuj tinyint DEFAULT 0, -- assujeti ou non a local tax 2 + localtax2_value double(6,3), barcode varchar(255), -- barcode fk_barcode_type integer NULL DEFAULT 0, -- barcode type price_level integer NULL, -- level of price for multiprices From 07f2d9474e6c158690a4f99de4661d6e948da1ed Mon Sep 17 00:00:00 2001 From: KreizIT Date: Thu, 3 Jul 2014 15:52:37 +0200 Subject: [PATCH 037/258] FIX: [ bug #1494 ] CATEGORY_CREATE and CATEGORY_MODIFY triggers do not intercept trigger action --- ChangeLog | 1 + htdocs/categories/class/categorie.class.php | 96 +++++++++++++-------- 2 files changed, 60 insertions(+), 37 deletions(-) diff --git a/ChangeLog b/ChangeLog index 02f58dedd5f..14f7129bb70 100644 --- a/ChangeLog +++ b/ChangeLog @@ -15,6 +15,7 @@ For users: - Fix: [ bug #1492, #1493 ] Member trigger problem - Fix: [ bug #1474, #1475 ] Contract trigger problem - Fix: [ bug #1496 ] ACTION_DELETE trigger does not show trigger error +- Fix: [ bug #1494 ] CATEGORY_CREATE and CATEGORY_MODIFY triggers do not intercept trigger action For translators: diff --git a/htdocs/categories/class/categorie.class.php b/htdocs/categories/class/categorie.class.php index 8d2c4ceed46..6eecb1370d6 100644 --- a/htdocs/categories/class/categorie.class.php +++ b/htdocs/categories/class/categorie.class.php @@ -212,16 +212,22 @@ class Categorie extends CommonObject } } else if ($reshook < 0) $error++; + + // Call trigger + $result=$this->call_trigger('CATEGORY_CREATE',$user); + if ($result < 0) { $error++; } + // End call triggers - // Appel des triggers - include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $interface=new Interfaces($this->db); - $result=$interface->run_triggers('CATEGORY_CREATE',$this,$user,$langs,$conf); - if ($result < 0) { $error++; $this->errors=$interface->errors; } - // Fin appel triggers - - $this->db->commit(); - return $id; + if ( ! $error ) + { + $this->db->rollback(); + return -3; + } + else + { + $this->db->commit(); + return $id; + } } else { @@ -303,12 +309,10 @@ class Categorie extends CommonObject $this->db->commit(); - // Appel des triggers - include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $interface=new Interfaces($this->db); - $result=$interface->run_triggers('CATEGORY_MODIFY',$this,$user,$langs,$conf); - if ($result < 0) { $error++; $this->errors=$interface->errors; } - // Fin appel triggers + // Call trigger + $result=$this->call_trigger('CATEGORY_MODIFY',$user); + if ($result < 0) { $error++; $this->db->rollback(); return -1; } + // End call triggers return 1; } @@ -432,12 +436,10 @@ class Categorie extends CommonObject } } } - // Appel des triggers - include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $interface=new Interfaces($this->db); - $result=$interface->run_triggers('CATEGORY_DELETE',$this,$user,$langs,$conf); - if ($result < 0) { $error++; $this->errors=$interface->errors; $this->error=join(',',$this->errors); } - // Fin appel triggers + // Call trigger + $result=$this->call_trigger('CATEGORY_DELETE',$user); + if ($result < 0) { $error++; } + // End call triggers } } @@ -477,6 +479,8 @@ class Categorie extends CommonObject if ($type=='contact') $column_name='socpeople'; if ($type=='fournisseur') $column_name='societe'; + $this->db->begin(); + $sql = "INSERT INTO ".MAIN_DB_PREFIX."categorie_".$type." (fk_categorie, fk_".$column_name.")"; $sql .= " VALUES (".$this->id.", ".$obj->id.")"; @@ -517,6 +521,7 @@ class Categorie extends CommonObject if ($error) { + $this->db->rollback(); return -1; } } @@ -524,18 +529,26 @@ class Categorie extends CommonObject // Save object we want to link category to into category instance to provide information to trigger $this->linkto=$obj; - // Appel des triggers - include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $interface=new Interfaces($this->db); - $result=$interface->run_triggers('CATEGORY_LINK',$this,$user,$langs,$conf); - if ($result < 0) { $error++; $this->errors=$interface->errors; $this->error=$interface->error; } - // Fin appel triggers + // Call trigger + $result=$this->call_trigger('CATEGORY_LINK',$user); + if ($result < 0) { $error++; } + // End call triggers - if (! $error) return 1; - else return -2; + if (! $error) + { + $this->db->commit(); + return 1; + } + else + { + $this->db->rollback(); + return -2; + } + } else { + $this->db->rollback(); if ($this->db->lasterrno() == 'DB_ERROR_RECORD_ALREADY_EXISTS') { $this->error=$this->db->lasterrno(); @@ -570,6 +583,8 @@ class Categorie extends CommonObject $column_name=$type; if ($type=='contact') $column_name='socpeople'; if ($type=='fournisseur') $column_name='societe'; + + $this->db->begin(); $sql = "DELETE FROM ".MAIN_DB_PREFIX."categorie_".$type; $sql .= " WHERE fk_categorie = ".$this->id; @@ -581,18 +596,25 @@ class Categorie extends CommonObject // Save object we want to unlink category off into category instance to provide information to trigger $this->unlinkoff=$obj; - // Appel des triggers - include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $interface=new Interfaces($this->db); - $result=$interface->run_triggers('CATEGORY_UNLINK',$this,$user,$langs,$conf); - if ($result < 0) { $error++; $this->errors=$interface->errors; } - // Fin appel triggers + // Call trigger + $result=$this->call_trigger('CATEGORY_UNLINK',$user); + if ($result < 0) { $error++; } + // End call triggers - if (! $error) return 1; - else return -2; + if (! $error) + { + $this->db->commit(); + return 1; + } + else + { + $this->db->rollback(); + return -2; + } } else { + $this->db->rollback(); $this->error=$this->db->lasterror(); return -1; } From 023e7ce8ce33935baeef2864a50467e8804749ec Mon Sep 17 00:00:00 2001 From: KreizIT Date: Thu, 3 Jul 2014 16:04:12 +0200 Subject: [PATCH 038/258] FIX : [ bug #1502 ] DON_CREATE trigger does not intercept trigger action - Add DON_CREATE in interface_90_all - Add new trigger DON_UPDATE, DON_DELETE --- ChangeLog | 2 ++ htdocs/compta/dons/class/don.class.php | 34 ++++++++++++++----- .../interface_90_all_Demo.class.php-NORUN | 16 +++++++++ 3 files changed, 44 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 14f7129bb70..26ded2e941d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -16,6 +16,7 @@ For users: - Fix: [ bug #1474, #1475 ] Contract trigger problem - Fix: [ bug #1496 ] ACTION_DELETE trigger does not show trigger error - Fix: [ bug #1494 ] CATEGORY_CREATE and CATEGORY_MODIFY triggers do not intercept trigger action +- Fix: [ bug #1502 ] DON_CREATE trigger does not intercept trigger action For translators: @@ -23,6 +24,7 @@ For translators: For developers: - New: Add hook "searchAgendaFrom". +- New: Add trigger DON_UPDATE, DON_DELETE ***** ChangeLog for 3.6 compared to 3.5.* ***** diff --git a/htdocs/compta/dons/class/don.class.php b/htdocs/compta/dons/class/don.class.php index f7bd819d969..c9580fcf5c0 100644 --- a/htdocs/compta/dons/class/don.class.php +++ b/htdocs/compta/dons/class/don.class.php @@ -307,6 +307,8 @@ class Don extends CommonObject $this->country=($this->country?$this->country:$this->country); $now=dol_now(); + + $this->db->begin(); $sql = "INSERT INTO ".MAIN_DB_PREFIX."don ("; $sql.= "datec"; @@ -360,19 +362,17 @@ class Don extends CommonObject { $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."don"); - // Appel des triggers - include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $interface=new Interfaces($this->db); - $result=$interface->run_triggers('DON_CREATE',$this,$user,$langs,$conf); - if ($result < 0) { - $error++; $this->errors=$interface->errors; - } - // Fin appel triggers + // Call trigger + $result=$this->call_trigger('DON_CREATE',$user); + if ($result < 0) { $error++; $this->db->rollback(); return -1; } + // End call triggers + $this->db->commit(); return $this->id; } else { + $this->db->rollback(); dol_print_error($this->db); return -1; } @@ -393,6 +393,8 @@ class Don extends CommonObject $this->country_id=($this->country_id>0?$this->country_id:$this->country_id); $this->country=($this->country?$this->country:$this->country); + $this->db->begin(); + $sql = "UPDATE ".MAIN_DB_PREFIX."don SET "; $sql .= "amount = " . price2num($this->amount); $sql .= ",fk_paiement = ".($this->modepaiementid?$this->modepaiementid:"null"); @@ -418,10 +420,17 @@ class Don extends CommonObject $result = $this->db->query($sql); if ($result) { + // Call trigger + $result=$this->call_trigger('DON_UPDATE',$user); + if ($result < 0) { $error++; $this->db->rollback(); return -1; } + // End call triggers + + $this->db->commit(); return 1; } else { + $this->db->rollback(); dol_print_error($this->db); return -1; } @@ -435,6 +444,8 @@ class Don extends CommonObject */ function delete($rowid) { + + $this->db-begin(); $sql = "DELETE FROM ".MAIN_DB_PREFIX."don WHERE rowid = $rowid AND fk_statut = 0;"; @@ -443,10 +454,17 @@ class Don extends CommonObject { if ( $this->db->affected_rows($resql) ) { + // Call trigger + $result=$this->call_trigger('DON_DELETE',$user); + if ($result < 0) { $error++; $this->db->rollback(); return -1; } + // End call triggers + + $this->db->commit(); return 1; } else { + $this->db->rollback(); return -1; } } diff --git a/htdocs/core/triggers/interface_90_all_Demo.class.php-NORUN b/htdocs/core/triggers/interface_90_all_Demo.class.php-NORUN index f3811afc45b..62b758739c7 100644 --- a/htdocs/core/triggers/interface_90_all_Demo.class.php-NORUN +++ b/htdocs/core/triggers/interface_90_all_Demo.class.php-NORUN @@ -503,6 +503,22 @@ class InterfaceDemo { dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); } + + //Donation + elseif ($action == 'DON_CREATE') + { + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + } + elseif ($action == 'DON_UPDATE') + { + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + } + elseif ($action == 'DON_DELETE') + { + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + } + + // Interventions elseif ($action == 'FICHINTER_CREATE') From e0201535e26cb067e0cf3c9d2efffd3cf423b9c3 Mon Sep 17 00:00:00 2001 From: KreizIT Date: Thu, 3 Jul 2014 17:15:42 +0200 Subject: [PATCH 039/258] Fix: [ bug #1505, #1504] Project trigger problem --- ChangeLog | 1 + htdocs/projet/class/project.class.php | 84 ++++++++++++--------------- htdocs/projet/class/task.class.php | 68 +++++++++++----------- htdocs/projet/fiche.php | 3 +- htdocs/projet/tasks.php | 7 +++ htdocs/projet/tasks/task.php | 6 ++ htdocs/projet/tasks/time.php | 2 +- 7 files changed, 89 insertions(+), 82 deletions(-) diff --git a/ChangeLog b/ChangeLog index 26ded2e941d..b6c474f6f92 100644 --- a/ChangeLog +++ b/ChangeLog @@ -17,6 +17,7 @@ For users: - Fix: [ bug #1496 ] ACTION_DELETE trigger does not show trigger error - Fix: [ bug #1494 ] CATEGORY_CREATE and CATEGORY_MODIFY triggers do not intercept trigger action - Fix: [ bug #1502 ] DON_CREATE trigger does not intercept trigger action +- Fix: [ bug #1505, #1504] Project trigger problem For translators: diff --git a/htdocs/projet/class/project.class.php b/htdocs/projet/class/project.class.php index c2b8b95f608..82e9dd72874 100644 --- a/htdocs/projet/class/project.class.php +++ b/htdocs/projet/class/project.class.php @@ -130,15 +130,9 @@ class Project extends CommonObject if (!$notrigger) { - // Call triggers - include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $interface = new Interfaces($this->db); - $result = $interface->run_triggers('PROJECT_CREATE', $this, $user, $langs, $conf); - if ($result < 0) - { - $error++; - $this->errors = $interface->errors; - } + // Call trigger + $result=$this->call_trigger('PROJECT_CREATE',$user); + if ($result < 0) { $error++; } // End call triggers } } @@ -199,6 +193,8 @@ class Project extends CommonObject if (dol_strlen(trim($this->ref)) > 0) { + $this->db->begin(); + $sql = "UPDATE " . MAIN_DB_PREFIX . "projet SET"; $sql.= " ref='" . $this->db->escape($this->ref) . "'"; $sql.= ", title = '" . $this->db->escape($this->title) . "'"; @@ -216,15 +212,9 @@ class Project extends CommonObject { if (!$notrigger) { - // Call triggers - include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $interface = new Interfaces($this->db); - $result = $interface->run_triggers('PROJECT_MODIFY', $this, $user, $langs, $conf); - if ($result < 0) - { - $error++; - $this->errors = $interface->errors; - } + // Call trigger + $result=$this->call_trigger('PROJECT_MODIFY',$user); + if ($result < 0) { $error++; } // End call triggers } @@ -259,13 +249,24 @@ class Project extends CommonObject } } } + if (! $error ) + { + $this->db->commit(); + $result = 1; + } + else + { + $this->db->rollback(); + $result = -1; + } - $result = 1; + } else { $this->error = $this->db->lasterror(); dol_syslog(get_class($this)."::Update error -2 " . $this->error, LOG_ERR); + $this->db->rollback(); $result = -2; } } @@ -528,17 +529,18 @@ class Project extends CommonObject if (!$notrigger) { - // Call triggers - include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $interface = new Interfaces($this->db); - $result = $interface->run_triggers('PROJECT_DELETE', $this, $user, $langs, $conf); + // Call trigger + $result=$this->call_trigger('PROJECT_DELETE',$user); if ($result < 0) { $error++; - foreach ($interface->errors as $errmsg ) { - dol_syslog(get_class($this) . "::delete " . $errmsg, LOG_ERR); - $this->errors[] =$errmsg; - } + if (! empty($interface->errors)) + { + foreach ($interface->errors as $errmsg ) { + dol_syslog(get_class($this) . "::delete " . $errmsg, LOG_ERR); + $this->errors[] =$errmsg; + } + } } // End call triggers } @@ -587,16 +589,10 @@ class Project extends CommonObject $resql = $this->db->query($sql); if ($resql) { - // Appel des triggers - include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $interface = new Interfaces($this->db); - $result = $interface->run_triggers('PROJECT_VALIDATE', $this, $user, $langs, $conf); - if ($result < 0) - { - $error++; - $this->errors = $interface->errors; - } - // Fin appel triggers + // Call trigger + $result=$this->call_trigger('PROJECT_VALIDATE',$user); + if ($result < 0) { $error++; } + // End call triggers if (!$error) { @@ -648,16 +644,10 @@ class Project extends CommonObject $resql = $this->db->query($sql); if ($resql) { - // Appel des triggers - include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $interface = new Interfaces($this->db); - $result = $interface->run_triggers('PROJECT_CLOSE', $this, $user, $langs, $conf); - if ($result < 0) - { - $error++; - $this->errors = $interface->errors; - } - // Fin appel triggers + // Call trigger + $result=$this->call_trigger('PROJECT_CLOSE',$user); + if ($result < 0) { $error++; } + // End call triggers if (!$error) { diff --git a/htdocs/projet/class/task.class.php b/htdocs/projet/class/task.class.php index 697d773f02c..5dc3a6fd52e 100644 --- a/htdocs/projet/class/task.class.php +++ b/htdocs/projet/class/task.class.php @@ -133,11 +133,9 @@ class Task extends CommonObject if (! $notrigger) { - // Call triggers - include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $interface=new Interfaces($this->db); - $result=$interface->run_triggers('TASK_CREATE',$this,$user,$langs,$conf); - if ($result < 0) { $error++; $this->errors=$interface->errors; } + // Call trigger + $result=$this->call_trigger('TASK_CREATE',$user); + if ($result < 0) { $error++; } // End call triggers } } @@ -303,11 +301,9 @@ class Task extends CommonObject { if (! $notrigger) { - // Call triggers - include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $interface=new Interfaces($this->db); - $result=$interface->run_triggers('TASK_MODIFY',$this,$user,$langs,$conf); - if ($result < 0) { $error++; $this->errors=$interface->errors; } + // Call trigger + $result=$this->call_trigger('TASK_MODIFY',$user); + if ($result < 0) { $error++; } // End call triggers } } @@ -394,11 +390,9 @@ class Task extends CommonObject { if (! $notrigger) { - // Call triggers - include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $interface=new Interfaces($this->db); - $result=$interface->run_triggers('TASK_DELETE',$this,$user,$langs,$conf); - if ($result < 0) { $error++; $this->errors=$interface->errors; } + // Call trigger + $result=$this->call_trigger('TASK_DELETE',$user); + if ($result < 0) { $error++; } // End call triggers } } @@ -744,11 +738,12 @@ class Task extends CommonObject { global $conf,$langs; - $error=0; $ret = 0; // Clean parameters if (isset($this->timespent_note)) $this->timespent_note = trim($this->timespent_note); + + $this->db->begin(); $sql = "INSERT INTO ".MAIN_DB_PREFIX."projet_task_time ("; $sql.= "fk_task"; @@ -772,11 +767,9 @@ class Task extends CommonObject if (! $notrigger) { - // Call triggers - include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $interface=new Interfaces($this->db); - $result=$interface->run_triggers('TASK_TIMESPENT_CREATE',$this,$user,$langs,$conf); - if ($result < 0) { $error++; $this->errors=$interface->errors; } + // Call trigger + $result=$this->call_trigger('TASK_TIMESPENT_CREATE',$user); + if ($result < 0) { $this->db->rollback(); $ret=-1; } // End call triggers } } @@ -784,6 +777,7 @@ class Task extends CommonObject { $this->error=$this->db->lasterror(); dol_syslog(get_class($this)."::addTimeSpent error -1 ".$this->error,LOG_ERR); + $this->db->rollback(); $ret = -1; } @@ -798,6 +792,7 @@ class Task extends CommonObject { $this->error=$this->db->lasterror(); dol_syslog(get_class($this)."::addTimeSpent error -2 ".$this->error, LOG_ERR); + $this->db->rollback(); $ret = -2; } } @@ -813,10 +808,12 @@ class Task extends CommonObject { $this->error=$this->db->lasterror(); dol_syslog(get_class($this)."::addTimeSpent error -2 ".$this->error, LOG_ERR); + $this->db->rollback(); $ret = -2; } } + if ($ret >=0) $this->db->commit(); return $ret; } @@ -879,11 +876,12 @@ class Task extends CommonObject { global $conf,$langs; - $error=0; $ret = 0; // Clean parameters if (isset($this->timespent_note)) $this->timespent_note = trim($this->timespent_note); + + $this->db->begin(); $sql = "UPDATE ".MAIN_DB_PREFIX."projet_task_time SET"; $sql.= " task_date = '".$this->db->idate($this->timespent_date)."',"; @@ -897,19 +895,23 @@ class Task extends CommonObject { if (! $notrigger) { - // Call triggers - include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $interface=new Interfaces($this->db); - $result=$interface->run_triggers('TASK_TIMESPENT_MODIFY',$this,$user,$langs,$conf); - if ($result < 0) { $error++; $this->errors=$interface->errors; } + // Call trigger + $result=$this->call_trigger('TASK_TIMESPENT_MODIFY',$user); + if ($result < 0) + { + $this->db->rollback(); + $ret = -1; + } + else $ret = 1; // End call triggers } - $ret = 1; + else $ret = 1; } else { $this->error=$this->db->lasterror(); dol_syslog(get_class($this)."::updateTimeSpent error -1 ".$this->error,LOG_ERR); + $this->db->rollback(); $ret = -1; } @@ -925,11 +927,13 @@ class Task extends CommonObject if (! $this->db->query($sql) ) { $this->error=$this->db->lasterror(); + $this->db->rollback(); dol_syslog(get_class($this)."::addTimeSpent error -2 ".$this->error, LOG_ERR); $ret = -2; } } + if ($ret >= 0) $this->db->commit(); return $ret; } @@ -959,11 +963,9 @@ class Task extends CommonObject { if (! $notrigger) { - // Call triggers - include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $interface=new Interfaces($this->db); - $result=$interface->run_triggers('TASK_TIMESPENT_DELETE',$this,$user,$langs,$conf); - if ($result < 0) { $error++; $this->errors=$interface->errors; } + // Call trigger + $result=$this->call_trigger('TASK_TIMESPENT_DELETE',$user); + if ($result < 0) { $error++; } // End call triggers } } diff --git a/htdocs/projet/fiche.php b/htdocs/projet/fiche.php index 123b4a611b4..00fdf65d15a 100644 --- a/htdocs/projet/fiche.php +++ b/htdocs/projet/fiche.php @@ -340,7 +340,8 @@ if (empty($reshook)) else { dol_syslog($object->error,LOG_DEBUG); - $mesg='
'.$langs->trans("CantRemoveProject").'
'; + setEventMessage($object->error,'errors'); + setEventMessage($object->errors,'errors'); } } diff --git a/htdocs/projet/tasks.php b/htdocs/projet/tasks.php index 356eed55e6d..7c94401f861 100644 --- a/htdocs/projet/tasks.php +++ b/htdocs/projet/tasks.php @@ -130,6 +130,11 @@ if ($action == 'createtask' && $user->rights->projet->creer) if ($taskid > 0) { $result = $task->add_contact($_POST["userid"], 'TASKEXECUTIVE', 'internal'); + } + else + { + setEventMessage($task->error,'errors'); + setEventMessage($task->errors,'errors'); } } @@ -193,6 +198,8 @@ if ($id > 0 || ! empty($ref)) $head=project_prepare_head($object); dol_fiche_head($head, $tab, $langs->trans("Project"),0,($object->public?'projectpub':'project')); + + dol_htmloutput_mesg(); $param=($mode=='mine'?'&mode=mine':''); diff --git a/htdocs/projet/tasks/task.php b/htdocs/projet/tasks/task.php index dd83cf57d8f..14339291c4c 100644 --- a/htdocs/projet/tasks/task.php +++ b/htdocs/projet/tasks/task.php @@ -91,6 +91,12 @@ if ($action == 'update' && ! $_POST["cancel"] && $user->rights->projet->creer) $ret = $extrafields->setOptionalsFromPost($extralabels,$object); $result=$object->update($user); + + if ($result < 0) + { + setEventMessage($object->error,'errors'); + setEventMessage($object->errors,'errors'); + } } else { diff --git a/htdocs/projet/tasks/time.php b/htdocs/projet/tasks/time.php index f6c5a1840ea..f6430ff4f55 100644 --- a/htdocs/projet/tasks/time.php +++ b/htdocs/projet/tasks/time.php @@ -140,7 +140,7 @@ if ($action == 'confirm_delete' && $confirm == "yes" && $user->rights->projet->c $object->fetchTimeSpent($_GET['lineid']); $result = $object->delTimeSpent($user); - if (!$result) + if ($result < 0) { $langs->load("errors"); setEventMessage($langs->trans($object->error),'errors'); From e30649dcd27ccedeb574cd78d863cbaea8cc3a22 Mon Sep 17 00:00:00 2001 From: Juanjo Menent Date: Thu, 3 Jul 2014 17:39:31 +0200 Subject: [PATCH 040/258] [ task #1063 ] Allow edit localtaxes rate for thirds. Works with company --- htdocs/admin/company.php | 74 +++++++- htdocs/core/class/html.formcompany.class.php | 38 ++++ htdocs/core/lib/functions.lib.php | 180 +++++++++++++++++-- htdocs/install/mysql/data/llx_c_tva.sql | 8 +- htdocs/langs/en_US/admin.lang | 7 + 5 files changed, 292 insertions(+), 15 deletions(-) diff --git a/htdocs/admin/company.php b/htdocs/admin/company.php index 2cf381b31cb..fd3629b1cba 100644 --- a/htdocs/admin/company.php +++ b/htdocs/admin/company.php @@ -2,7 +2,7 @@ /* Copyright (C) 2001-2007 Rodolphe Quiedeville * Copyright (C) 2004-2013 Laurent Destailleur * Copyright (C) 2005-2012 Regis Houssin - * Copyright (C) 2010-2013 Juanjo Menent + * Copyright (C) 2010-2014 Juanjo Menent * Copyright (C) 2011 Philippe Grand * * This program is free software; you can redistribute it and/or modify @@ -158,6 +158,31 @@ if ( ($action == 'update' && empty($_POST["cancel"])) // Local taxes dolibarr_set_const($db, "FACTURE_LOCAL_TAX1_OPTION",$_POST["optionlocaltax1"],'chaine',0,'',$conf->entity); dolibarr_set_const($db, "FACTURE_LOCAL_TAX2_OPTION",$_POST["optionlocaltax2"],'chaine',0,'',$conf->entity); + + if($_POST["optionlocaltax1"]=="localtax1on") + { + if(!isset($_REQUEST['lt1'])) + { + dolibarr_set_const($db, "MAIN_INFO_VALUE_LOCALTAX1", 0,'chaine',0,'',$conf->entity); + } + else + { + dolibarr_set_const($db, "MAIN_INFO_VALUE_LOCALTAX1", GETPOST('lt1'),'chaine',0,'',$conf->entity); + } + dolibarr_set_const($db,"MAIN_INFO_LOCALTAX_CALC1", $_POST["clt1"],'chaine',0,'',$conf->entity); + } + if($_POST["optionlocaltax2"]=="localtax2on") + { + if(!isset($_REQUEST['lt2'])) + { + dolibarr_set_const($db, "MAIN_INFO_VALUE_LOCALTAX2", 0,'chaine',0,'',$conf->entity); + } + else + { + dolibarr_set_const($db, "MAIN_INFO_VALUE_LOCALTAX2", GETPOST('lt2'),'chaine',0,'',$conf->entity); + } + dolibarr_set_const($db,"MAIN_INFO_LOCALTAX_CALC2", $_POST["clt2"],'chaine',0,'',$conf->entity); + } if ($action != 'updateedit' && ! $error) { @@ -570,6 +595,17 @@ if ($action == 'edit' || $action == 'updateedit') print "
"; $example=$langs->transcountry("LocalTax1IsUsedExample",$mysoc->country_code); print ($example!="LocalTax1IsUsedExample"?"\n":""); + if(! isOnlyOneLocalTax(1)) + { + print ''; + + print ''; print "
".$langs->transcountry("LocalTax1IsUsedDesc",$mysoc->country_code)."
".$langs->trans("Example").': '.$langs->transcountry("LocalTax1IsUsedExample",$mysoc->country_code)."
'.$langs->transcountry("LocalTax1Management",$mysoc->country_code).': '; + $formcompany->select_localtax(1,$conf->global->MAIN_INFO_VALUE_LOCALTAX1, "lt1"); + } + print '
'.$langs->trans("CalcLocaltax").': '; + $opcions=array($langs->transcountry("CalcLocaltax1",$mysoc->country_code),$langs->transcountry("CalcLocaltax2",$mysoc->country_code),$langs->transcountry("CalcLocaltax3",$mysoc->country_code)); + print $form->selectarray("clt1", $opcions, $conf->global->MAIN_INFO_LOCALTAX_CALC1); + print '
"; print "
".$langs->transcountry("LocalTax2IsUsedDesc",$mysoc->country_code)."
".$langs->trans("Example").': '.$langs->transcountry("LocalTax2IsUsedExample",$mysoc->country_code)."
'.$langs->transcountry("LocalTax2Management",$mysoc->country_code).': '; + if(! isOnlyOneLocalTax(2)) + { + $formcompany->select_localtax(2,$conf->global->MAIN_INFO_VALUE_LOCALTAX2, "lt2"); + print '
'.$langs->trans("CalcLocaltax").': '; + $opcions=array($langs->transcountry("CalcLocaltax1",$mysoc->country_code),$langs->transcountry("CalcLocaltax2",$mysoc->country_code),$langs->transcountry("CalcLocaltax3",$mysoc->country_code)); + print $form->selectarray("clt2", $opcions, $conf->global->MAIN_INFO_LOCALTAX_CALC2); + print '
"; print "\n"; @@ -954,6 +1000,19 @@ else print "".$langs->transcountry("LocalTax1IsUsedDesc",$mysoc->country_code).""; $example=$langs->transcountry("LocalTax1IsUsedExample",$mysoc->country_code); print ($example!="LocalTax1IsUsedExample"?"".$langs->trans("Example").': '.$langs->transcountry("LocalTax1IsUsedExample",$mysoc->country_code)."\n":""); + if($conf->global->MAIN_INFO_VALUE_LOCALTAX1!=0){ + print ''.$langs->transcountry("LocalTax1Management",$mysoc->country_code).': '. $conf->global->MAIN_INFO_VALUE_LOCALTAX1 .''; + } + print ''.$langs->trans("CalcLocaltax").': '; + if($conf->global->MAIN_INFO_LOCALTAX_CALC1==0){ + print $langs->transcountry("CalcLocaltax1",$mysoc->country_code); + }else if($conf->global->MAIN_INFO_LOCALTAX_CALC1==1){ + print $langs->transcountry("CalcLocaltax2",$mysoc->country_code); + }else if($conf->global->MAIN_INFO_LOCALTAX_CALC1==2){ + print $langs->transcountry("CalcLocaltax3",$mysoc->country_code); + } + + print ''; print ""; print "\n"; @@ -987,6 +1046,19 @@ else print "".$langs->transcountry("LocalTax2IsUsedDesc",$mysoc->country_code).""; $example=$langs->transcountry("LocalTax2IsUsedExample",$mysoc->country_code); print ($example!="LocalTax2IsUsedExample"?"".$langs->trans("Example").': '.$langs->transcountry("LocalTax2IsUsedExample",$mysoc->country_code)."\n":""); + if($conf->global->MAIN_INFO_VALUE_LOCALTAX2!=0){ + print ''.$langs->transcountry("LocalTax2Management",$mysoc->country_code).': '. $conf->global->MAIN_INFO_VALUE_LOCALTAX2 .''; + } + print ''.$langs->trans("CalcLocaltax").': '; + if($conf->global->MAIN_INFO_LOCALTAX_CALC2==0){ + print $langs->transcountry("CalcLocaltax1",$mysoc->country_code); + }else if($conf->global->MAIN_INFO_LOCALTAX_CALC2==1){ + print $langs->transcountry("CalcLocaltax2",$mysoc->country_code); + }else if($conf->global->MAIN_INFO_LOCALTAX_CALC2==2){ + print $langs->transcountry("CalcLocaltax3",$mysoc->country_code); + } + + print ''; print ""; print "\n"; diff --git a/htdocs/core/class/html.formcompany.class.php b/htdocs/core/class/html.formcompany.class.php index a22f0b38c10..7c32c31f696 100644 --- a/htdocs/core/class/html.formcompany.class.php +++ b/htdocs/core/class/html.formcompany.class.php @@ -1,6 +1,7 @@ * Copyright (C) 2008-2012 Regis Houssin + * Copyright (C) 2014 Juanjo Menent * * 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 @@ -775,6 +776,43 @@ class FormCompany return $out; } + + /** + * Return a select with localtax values for thirds + * + * @param int $local LocalTax + * @param int $selected Preselected value + * @param varchar $htmlname HTML select name + */ + function select_localtax($local, $selected, $htmlname) + { + $tax=get_localtax_by_third($local); + + $num = $this->db->num_rows($tax); + $i = 0; + if ($num) + { + $valors=explode(":", $tax); + + if(sizeof($valors)>1) + { + //montar select + print ''; + + } + } + } } diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index e81c8b3b2d9..3a4fd073336 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -7,7 +7,7 @@ * Copyright (C) 2004 Christophe Combelles * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2008 Raphael Bertrand (Resultic) - * Copyright (C) 2010-2011 Juanjo Menent + * Copyright (C) 2010-2014 Juanjo Menent * Copyright (C) 2013 Cédric Salvador * Copyright (C) 2013 Alexandre Spangaro * @@ -2886,7 +2886,11 @@ function get_localtax($tva, $local, $thirdparty_buyer="", $thirdparty_seller="") if (empty($thirdparty_seller) || ! is_object($thirdparty_seller)) $thirdparty_seller=$mysoc; dol_syslog("get_localtax tva=".$tva." local=".$local." thirdparty_buyer id=".(is_object($thirdparty_buyer)?$thirdparty_buyer->id:'')."/country_code=".(is_object($thirdparty_buyer)?$thirdparty_buyer->country_code:'')." thirdparty_seller id=".$thirdparty_seller->id."/country_code=".$thirdparty_seller->country_code." thirdparty_seller localtax1_assuj=".$thirdparty_seller->localtax1_assuj." thirdparty_seller localtax2_assuj=".$thirdparty_seller->localtax2_assuj); - + + if($thirdparty_buyer->country_code!=$thirdparty_seller->country_code) + { + return 0; + } // Some test to guess with no need to make database access if ($mysoc->country_code == 'ES') // For spain localtaxes 1 and 2, tax is qualified if buyer use local taxe { @@ -2898,14 +2902,14 @@ function get_localtax($tva, $local, $thirdparty_buyer="", $thirdparty_seller="") } else { - if (! $thirdparty_seller->localtax1_assuj) return 0; + if (! $thirdparty_seller->localtax1_assuj) return 0; } } if ($local == 2) { - - if ($thirdparty_seller->id==$mysoc->id) + + if ($thirdparty_seller->id==$mysoc->id ) { if (! $thirdparty_buyer->localtax2_assuj) return 0; } @@ -2931,6 +2935,43 @@ function get_localtax($tva, $local, $thirdparty_buyer="", $thirdparty_seller="") }*/ // Search local taxes + if ($local==1) + { + if($thirdparty_seller!=$mysoc ) + { + if(!isOnlyOneLocalTax($local)) + { + return $thirdparty_seller->localtax1_value; + } + } + else + { + if(!isOnlyOneLocalTax($local)) + { + return $conf->global->MAIN_INFO_VALUE_LOCALTAX1; + } + } + } + if ($local==2) + { + if($thirdparty_seller!=$mysoc) + { + if(!isOnlyOneLocalTax($local)) + { + return $thirdparty_seller->localtax2_value; + } + } + else + { + if(!isOnlyOneLocalTax($local)) + { + return $conf->global->MAIN_INFO_VALUE_LOCALTAX2; + } + } + } + + + $sql = "SELECT t.localtax1, t.localtax2, t.localtax1_type, t.localtax2_type"; $sql .= " FROM ".MAIN_DB_PREFIX."c_tva as t, ".MAIN_DB_PREFIX."c_pays as p"; $sql .= " WHERE t.fk_pays = p.rowid AND p.code = '".$thirdparty_seller->country_code."'"; @@ -2948,6 +2989,57 @@ function get_localtax($tva, $local, $thirdparty_buyer="", $thirdparty_seller="") return 0; } + +/** + * Return true if LocalTax is unique + * + * @param int $local Local taxt to test + * @return boolean True if LocalTax have multiple values, False if not + */ +function isOnlyOneLocalTax($local) +{ + $tax=get_localtax_by_third($local); + + $valors=explode(":", $tax); + + if(sizeof($valors)>1) + { + return false; + } + else + { + return true; + } +} + +/** + * Get values of localtaxes + * + * @param int $local LocalTax to get + * @return number Values of localtax + */ +function get_localtax_by_third($local) +{ + global $db, $mysoc; + $sql="SELECT t.localtax1, t.localtax2 "; + $sql.=" FROM ".MAIN_DB_PREFIX."c_tva as t inner join ".MAIN_DB_PREFIX."c_pays as p ON p.rowid=t.fk_pays"; + $sql.=" WHERE p.code = '".$mysoc->country_code."' AND t.taux=(SELECT max(tt.taux)"; + $sql.=" FROM ".MAIN_DB_PREFIX."c_tva as tt inner join ".MAIN_DB_PREFIX."c_pays as p ON p.rowid=tt.fk_pays"; + $sql.= " WHERE p.code = '".$mysoc->country_code."')"; + + $resql=$db->query($sql); + if ($resql) + { + $obj = $db->fetch_object($resql); + if ($local==1) return $obj->localtax1; + elseif ($local==2) return $obj->localtax2; + } + + return 0; + +} + + /** * Get type and rate of localtaxes for a particular vat rate/country fo thirdparty * TODO @@ -2960,7 +3052,7 @@ function get_localtax($tva, $local, $thirdparty_buyer="", $thirdparty_seller="") * @param int $thirdparty Company object * @return array array(localtax_type1(1-6 / 0 if not found), rate of localtax1, ...) */ -function getLocalTaxesFromRate($vatrate, $local, $thirdparty) +function getLocalTaxesFromRate($vatrate, $local, $buyer, $seller) { global $db; @@ -2969,16 +3061,84 @@ function getLocalTaxesFromRate($vatrate, $local, $thirdparty) // Search local taxes $sql = "SELECT t.localtax1, t.localtax1_type, t.localtax2, t.localtax2_type, t.accountancy_code_sell, t.accountancy_code_buy"; $sql .= " FROM ".MAIN_DB_PREFIX."c_tva as t, ".MAIN_DB_PREFIX."c_pays as p"; - $sql .= " WHERE t.fk_pays = p.rowid AND p.code = '".$thirdparty->country_code."'"; + $sql .= " WHERE t.fk_pays = p.rowid AND p.code = '".$buyer->country_code."'"; $sql .= " AND t.taux = ".$vatrate." AND t.active = 1"; $resql=$db->query($sql); if ($resql) { $obj = $db->fetch_object($resql); - if ($local == 1) return array($obj->localtax1_type, $obj->localtax1,$obj->accountancy_code_sell,$obj->accountancy_code_buy); - elseif ($local == 2) return array($obj->localtax2_type, $obj->localtax2,$obj->accountancy_code_sell,$obj->accountancy_code_buy); - else return array($obj->localtax1_type, $obj->localtax1, $obj->localtax2_type, $obj->localtax2,$obj->accountancy_code_sell,$obj->accountancy_code_buy); + if ($local == 1) + { + if (! isOnlyOneLocalTax(1)) + { + return array($obj->localtax1_type, get_localtax($vatrate, $local, $buyer, $seller), $obj->accountancy_code_sell,$obj->accountancy_code_buy); + } + else + { + return array($obj->localtax1_type, $obj->localtax1,$obj->accountancy_code_sell,$obj->accountancy_code_buy); + } + } + elseif ($local == 2) + { + if (! isOnlyOneLocalTax(2)) + { + return array($obj->localtax2_type, get_localtax($vatrate, $local, $buyer, $seller),$obj->accountancy_code_sell,$obj->accountancy_code_buy); + } + else + { + return array($obj->localtax2_type, $obj->localtax2,$obj->accountancy_code_sell,$obj->accountancy_code_buy); + } + } + else + { + if(! isOnlyOneLocalTax(1)) + { + if(! isOnlyOneLocalTax(2)) + { + return array($obj->localtax1_type, get_localtax($vatrate, 1, $buyer, $seller), $obj->localtax2_type, get_localtax($vatrate, 2, $buyer, $seller),$obj->accountancy_code_sell,$obj->accountancy_code_buy); + } + else + { + return array($obj->localtax1_type, get_localtax($vatrate, 1, $buyer, $seller), $obj->localtax2_type, $obj->localtax2,$obj->accountancy_code_sell,$obj->accountancy_code_buy); + } + } + else + { + if(! isOnlyOneLocalTax(2)) + { + return array($obj->localtax1_type, $obj->localtax1, $obj->localtax2_type,get_localtax($vatrate, 2, $buyer, $seller) ,$obj->accountancy_code_sell,$obj->accountancy_code_buy); + } + else + { + return array($obj->localtax1_type, $obj->localtax1, $obj->localtax2_type, $obj->localtax2,$obj->accountancy_code_sell,$obj->accountancy_code_buy); + } + } + + if(! isOnlyOneLocalTax(2)) + { + if(! isOnlyOneLocalTax(1)) + { + return array($obj->localtax2_type, get_localtax($vatrate, 1, $buyer, $seller), $obj->localtax2_type, get_localtax($vatrate, 2, $buyer, $seller),$obj->accountancy_code_sell,$obj->accountancy_code_buy); + } + else + { + return array($obj->localtax2_type, get_localtax($vatrate, 1, $buyer, $seller), $obj->localtax2_type, $obj->localtax2,$obj->accountancy_code_sell,$obj->accountancy_code_buy); + } + } + else + { + if(! isOnlyOneLocalTax(1)) + { + return array($obj->localtax2_type, $obj->localtax2, $obj->localtax1_type,get_localtax($vatrate, 1, $buyer, $seller) ,$obj->accountancy_code_sell,$obj->accountancy_code_buy); + } + else + { + return array($obj->localtax2_type, $obj->localtax2, $obj->localtax1_type, $obj->localtax1,$obj->accountancy_code_sell,$obj->accountancy_code_buy); + } + } + + } } return 0; diff --git a/htdocs/install/mysql/data/llx_c_tva.sql b/htdocs/install/mysql/data/llx_c_tva.sql index c8091e3889e..1d4572591d1 100644 --- a/htdocs/install/mysql/data/llx_c_tva.sql +++ b/htdocs/install/mysql/data/llx_c_tva.sql @@ -216,10 +216,10 @@ INSERT INTO llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) VALUES (20 INSERT INTO llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) VALUES (2023, 202, '0', '0', 'VAT Rate 0', 1); -- SPAIN (id country=4) -insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,localtax1,localtax1_type,localtax2,localtax2_type,note,active) values ( 41, 4,'21','0','5.2','3','-21','1','VAT standard rate',1); -insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,localtax1,localtax1_type,localtax2,localtax2_type,note,active) values ( 42, 4,'10','0','1.4','3','-21','1','VAT reduced rate',1); -insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,localtax1,localtax1_type,localtax2,localtax2_type,note,active) values ( 43, 4, '4','0','0.5','3','-21','1','VAT super-reduced rate',1); -insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,localtax1,localtax1_type,localtax2,localtax2_type,note,active) values ( 44, 4, '0','0', '0','3','-21','1','VAT Rate 0',1); +insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,localtax1,localtax1_type,localtax2,localtax2_type,note,active) values ( 41, 4,'21','0','5.2','3','-21:-9:-2','1','VAT standard rate',1); +insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,localtax1,localtax1_type,localtax2,localtax2_type,note,active) values ( 42, 4,'10','0','1.4','3','-21:-9:-2','1','VAT reduced rate',1); +insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,localtax1,localtax1_type,localtax2,localtax2_type,note,active) values ( 43, 4, '4','0','0.5','3','-21:-9:-2','1','VAT super-reduced rate',1); +insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,localtax1,localtax1_type,localtax2,localtax2_type,note,active) values ( 44, 4, '0','0', '0','3','-21:-9:-2','1','VAT Rate 0',1); -- SWEDEN (id country=20) insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (201,20, '25','0','VAT standard rate',1); diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 4bec9fed799..dc03720ccd2 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -807,6 +807,13 @@ LocalTax2IsUsedDescES= The RE rate by default when creating prospects, invoices, LocalTax2IsNotUsedDescES= By default the proposed IRPF is 0. End of rule. LocalTax2IsUsedExampleES= In Spain, freelancers and independent professionals who provide services and companies who have chosen the tax system of modules. LocalTax2IsNotUsedExampleES= In Spain they are bussines not subject to tax system of modules. +CalcLocaltax=Reports +CalcLocaltax1ES=Sales - Purchases +CalcLocaltax1Desc=Local Taxes reports are calculated with the difference between localtaxes sales and localtaxes purchases +CalcLocaltax2ES=Purchases +CalcLocaltax2Desc=Local Taxes reports are the total of localtaxes purchases +CalcLocaltax3ES=Sales +CalcLocaltax3Desc=Local Taxes reports are the total of localtaxes sales LabelUsedByDefault=Label used by default if no translation can be found for code LabelOnDocuments=Label on documents NbOfDays=Nb of days From f2248d5bc887b66b9254f315992d5c8eadc19952 Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Thu, 3 Jul 2014 17:57:36 +0200 Subject: [PATCH 041/258] Fix : ordered should display qty in supplier order not yet send --- htdocs/product/stock/replenish.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/htdocs/product/stock/replenish.php b/htdocs/product/stock/replenish.php index 817ec5cbf7a..590260a7c99 100644 --- a/htdocs/product/stock/replenish.php +++ b/htdocs/product/stock/replenish.php @@ -478,21 +478,21 @@ while ($i < ($limit ? min($num, $limit) : $num)) $stock = $prod->stock_reel; } - $ordered = $prod->stats_commande_fournisseur['qty']-$prod->stats_reception['qty']; + $ordered = $prod->stats_commande_fournisseur['qty']; $warning=''; - if ($objp->alertstock && ($stock < $objp->alertstock)) + + if ($objp->seuil_stock_alerte && ($stock < $objp->seuil_stock_alerte)) { $warning = img_warning($langs->trans('StockTooLow')) . ' '; } - //depending on conf, use either physical stock or //virtual stock to compute the stock to buy value - $stocktobuy = max(max($objp->desiredstock, $objp->alertstock) - $stock - $ordered, 0); + //echo $objp->desiredstock." * ".$stock." * ".$ordered."
"; + $stocktobuy = max($objp->desiredstock - $stock - $ordered, 0); $disabled = ''; if($ordered > 0) { - $compare = $usevirtualstock ? $stock : $stock + $ordered; - if($compare >= $objp->desiredstock) { + if($stock + $ordered >= $objp->desiredstock) { $picto = img_picto('', './img/yes', '', 1); $disabled = 'disabled="disabled"'; } From 8eb8f33f28850a8f8be69c0d61540c33caf475ce Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Thu, 3 Jul 2014 18:14:26 +0200 Subject: [PATCH 042/258] =?UTF-8?q?Ajout=20qt=C3=A9=20dans=20=C3=A9cran=20?= =?UTF-8?q?consommation=20produit?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/product/stats/commande.php | 4 +++- htdocs/product/stats/commande_fournisseur.php | 4 +++- htdocs/product/stats/facture.php | 4 +++- htdocs/product/stats/facture_fournisseur.php | 4 +++- htdocs/product/stats/propal.php | 4 +++- 5 files changed, 15 insertions(+), 5 deletions(-) diff --git a/htdocs/product/stats/commande.php b/htdocs/product/stats/commande.php index b19c3c7fd68..97e9a612ae1 100644 --- a/htdocs/product/stats/commande.php +++ b/htdocs/product/stats/commande.php @@ -118,7 +118,7 @@ if ($id > 0 || ! empty($ref)) $sql = "SELECT distinct s.nom, s.rowid as socid, s.code_client, c.rowid, c.total_ht as total_ht, c.ref,"; - $sql.= " c.date_commande, c.fk_statut as statut, c.facture, c.rowid as commandeid"; + $sql.= " c.date_commande, c.fk_statut as statut, c.facture, c.rowid as commandeid, d.qty"; if (!$user->rights->societe->client->voir && !$socid) $sql.= ", sc.fk_soc, sc.fk_user "; $sql.= " FROM ".MAIN_DB_PREFIX."societe as s"; $sql.= ", ".MAIN_DB_PREFIX."commande as c"; @@ -148,6 +148,7 @@ if ($id > 0 || ! empty($ref)) print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"s.nom","","&id=".$product->id,'',$sortfield,$sortorder); print_liste_field_titre($langs->trans("CustomerCode"),$_SERVER["PHP_SELF"],"s.code_client","","&id=".$product->id,'',$sortfield,$sortorder); print_liste_field_titre($langs->trans("OrderDate"),$_SERVER["PHP_SELF"],"c.date_commande","","&id=".$product->id,'align="center"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Qty"),$_SERVER["PHP_SELF"],"d.qty","","&id=".$product->id,'align="center"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("AmountHT"),$_SERVER["PHP_SELF"],"c.total_ht","","&id=".$product->id,'align="right"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"c.fk_statut","","&id=".$product->id,'align="right"',$sortfield,$sortorder); print "\n"; @@ -170,6 +171,7 @@ if ($id > 0 || ! empty($ref)) print "".$objp->code_client."\n"; print ""; print dol_print_date($db->jdate($objp->date_commande)).""; + print "".$objp->qty."\n"; print "".price($objp->total_ht)."\n"; print ''.$commandestatic->LibStatut($objp->statut,$objp->facture,5).''; print "\n"; diff --git a/htdocs/product/stats/commande_fournisseur.php b/htdocs/product/stats/commande_fournisseur.php index 69845b4b264..22e3e2b30ba 100644 --- a/htdocs/product/stats/commande_fournisseur.php +++ b/htdocs/product/stats/commande_fournisseur.php @@ -111,7 +111,7 @@ if ($id > 0 || ! empty($ref)) $sql = "SELECT distinct s.nom, s.rowid as socid, s.code_client,"; $sql.= " c.rowid, c.total_ht as total_ht, c.ref,"; - $sql.= " c.date_commande, c.fk_statut as statut, c.rowid as commandeid"; + $sql.= " c.date_commande, c.fk_statut as statut, c.rowid as commandeid, d.qty"; if (!$user->rights->societe->client->voir && !$socid) $sql .= ", sc.fk_soc, sc.fk_user "; $sql.= " FROM ".MAIN_DB_PREFIX."societe as s"; $sql.= ", ".MAIN_DB_PREFIX."commande_fournisseur as c"; @@ -141,6 +141,7 @@ if ($id > 0 || ! empty($ref)) print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"s.nom","","&id=".$product->id,'',$sortfield,$sortorder); print_liste_field_titre($langs->trans("SupplierCode"),$_SERVER["PHP_SELF"],"s.code_client","","&id=".$product->id,'',$sortfield,$sortorder); print_liste_field_titre($langs->trans("OrderDate"),$_SERVER["PHP_SELF"],"c.date_commande","","&id=".$product->id,'align="center"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Qty"),$_SERVER["PHP_SELF"],"d.qty","","&id=".$product->id,'align="center"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("AmountHT"),$_SERVER["PHP_SELF"],"c.total_ht","","&id=".$product->id,'align="right"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"c.fk_statut","","&id=".$product->id,'align="right"',$sortfield,$sortorder); print "\n"; @@ -165,6 +166,7 @@ if ($id > 0 || ! empty($ref)) print ''.img_object($langs->trans("ShowCompany"),"company").' '.dol_trunc($objp->nom,44).''; print "".$objp->code_client."\n"; print ''.dol_print_date($db->jdate($objp->date_commande)).""; + print "".$objp->qty."\n"; print ''.price($objp->total_ht)."\n"; print ''.$commandestatic->getLibStatut(4).''; print "\n"; diff --git a/htdocs/product/stats/facture.php b/htdocs/product/stats/facture.php index cac2bccc45b..dc65764defd 100644 --- a/htdocs/product/stats/facture.php +++ b/htdocs/product/stats/facture.php @@ -122,7 +122,7 @@ if ($id > 0 || ! empty($ref)) $sql = "SELECT distinct s.nom, s.rowid as socid, s.code_client,"; $sql.= " f.facnumber, f.total as total_ht,"; - $sql.= " f.datef, f.paye, f.fk_statut as statut, f.rowid as facid"; + $sql.= " f.datef, f.paye, f.fk_statut as statut, f.rowid as facid, d.qty"; if (!$user->rights->societe->client->voir && !$socid) $sql.= ", sc.fk_soc, sc.fk_user "; $sql.= " FROM ".MAIN_DB_PREFIX."societe as s"; $sql.= ", ".MAIN_DB_PREFIX."facture as f"; @@ -152,6 +152,7 @@ if ($id > 0 || ! empty($ref)) print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"s.nom","","&id=".$product->id,'',$sortfield,$sortorder); print_liste_field_titre($langs->trans("CustomerCode"),$_SERVER["PHP_SELF"],"s.code_client","","&id=".$product->id,'',$sortfield,$sortorder); print_liste_field_titre($langs->trans("DateInvoice"),$_SERVER["PHP_SELF"],"f.datef","","&id=".$product->id,'align="center"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Qty"),$_SERVER["PHP_SELF"],"d.qty","","&id=".$product->id,'align="center"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("AmountHT"),$_SERVER["PHP_SELF"],"f.total_ht","","&id=".$product->id,'align="right"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"f.paye,f.fk_statut","","&id=".$product->id,'align="right"',$sortfield,$sortorder); print "\n"; @@ -174,6 +175,7 @@ if ($id > 0 || ! empty($ref)) print "".$objp->code_client."\n"; print ""; print dol_print_date($db->jdate($objp->datef),'day').""; + print "".$objp->qty."\n"; print "".price($objp->total_ht)."\n"; print ''.$invoicestatic->LibStatut($objp->paye,$objp->statut,5).''; print "\n"; diff --git a/htdocs/product/stats/facture_fournisseur.php b/htdocs/product/stats/facture_fournisseur.php index 2a06c30a496..4cbeaec7e76 100644 --- a/htdocs/product/stats/facture_fournisseur.php +++ b/htdocs/product/stats/facture_fournisseur.php @@ -123,7 +123,7 @@ if ($id > 0 || ! empty($ref)) $sql = "SELECT distinct s.nom, s.rowid as socid, s.code_client, f.ref, f.total_ht as total_ht,"; - $sql.= " f.datef, f.paye, f.fk_statut as statut, f.rowid as facid"; + $sql.= " f.datef, f.paye, f.fk_statut as statut, f.rowid as facid, d.qty"; if (!$user->rights->societe->client->voir && !$socid) $sql.= ", sc.fk_soc, sc.fk_user "; $sql.= " FROM ".MAIN_DB_PREFIX."societe as s"; $sql.= ", ".MAIN_DB_PREFIX."facture_fourn as f"; @@ -153,6 +153,7 @@ if ($id > 0 || ! empty($ref)) print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"s.nom","","&id=".$product->id,'',$sortfield,$sortorder); print_liste_field_titre($langs->trans("SupplierCode"),$_SERVER["PHP_SELF"],"s.code_client","","&id=".$product->id,'',$sortfield,$sortorder); print_liste_field_titre($langs->trans("DateInvoice"),$_SERVER["PHP_SELF"],"f.datef","","&id=".$product->id,'align="center"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Qty"),$_SERVER["PHP_SELF"],"d.qty","","&id=".$product->id,'align="center"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("AmountHT"),$_SERVER["PHP_SELF"],"f.total_ht","","&id=".$product->id,'align="right"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"f.paye,f.fk_statut","","&id=".$product->id,'align="right"',$sortfield,$sortorder); print "\n"; @@ -175,6 +176,7 @@ if ($id > 0 || ! empty($ref)) print "".$objp->code_client."\n"; print ""; print dol_print_date($db->jdate($objp->datef)).""; + print "".$objp->qty."\n"; print "".price($objp->total_ht)."\n"; print ''.$supplierinvoicestatic->LibStatut($objp->paye,$objp->statut,5).''; print "\n"; diff --git a/htdocs/product/stats/propal.php b/htdocs/product/stats/propal.php index a55673c62b0..e9a78f18b05 100644 --- a/htdocs/product/stats/propal.php +++ b/htdocs/product/stats/propal.php @@ -113,7 +113,7 @@ if ($id > 0 || ! empty($ref)) $sql = "SELECT DISTINCT s.nom, s.rowid as socid, p.rowid as propalid, p.ref, p.total_ht as amount,"; - $sql.= "p.datep, p.fk_statut as statut"; + $sql.= "p.datep, p.fk_statut as statut, d.qty"; if (!$user->rights->societe->client->voir && !$socid) $sql.= ", sc.fk_soc, sc.fk_user "; $sql.= " FROM ".MAIN_DB_PREFIX."societe as s"; $sql.= ",".MAIN_DB_PREFIX."propal as p"; @@ -141,6 +141,7 @@ if ($id > 0 || ! empty($ref)) print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"p.rowid","","&id=".$product->id,'',$sortfield,$sortorder); print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"s.nom","","&id=".$product->id,'',$sortfield,$sortorder); print_liste_field_titre($langs->trans("DatePropal"),$_SERVER["PHP_SELF"],"p.datep","","&id=".$product->id,'align="center"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Qty"),$_SERVER["PHP_SELF"],"d.qty","","&id=".$product->id,'align="center"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("AmountHT"),$_SERVER["PHP_SELF"],"p.total","","&id=".$product->id,'align="right"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"p.fk_statut","","&id=".$product->id,'align="right"',$sortfield,$sortorder); print "\n"; @@ -162,6 +163,7 @@ if ($id > 0 || ! empty($ref)) print ''.img_object($langs->trans("ShowCompany"),"company").' '.dol_trunc($objp->nom,44).''; print ''; print dol_print_date($db->jdate($objp->datep)).""; + print "".$objp->qty."\n"; print ''.price($objp->amount).''."\n"; print ''.$propalstatic->LibStatut($objp->statut,5).''; print ''."\n"; From db0fa0afd0ab803122f13b8172a72b552d18feea Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Thu, 3 Jul 2014 18:17:34 +0200 Subject: [PATCH 043/258] Revert "Fix : ordered should display qty in supplier order not yet send" This reverts commit f2248d5bc887b66b9254f315992d5c8eadc19952. --- htdocs/product/stock/replenish.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/htdocs/product/stock/replenish.php b/htdocs/product/stock/replenish.php index 590260a7c99..817ec5cbf7a 100644 --- a/htdocs/product/stock/replenish.php +++ b/htdocs/product/stock/replenish.php @@ -478,21 +478,21 @@ while ($i < ($limit ? min($num, $limit) : $num)) $stock = $prod->stock_reel; } - $ordered = $prod->stats_commande_fournisseur['qty']; + $ordered = $prod->stats_commande_fournisseur['qty']-$prod->stats_reception['qty']; $warning=''; - - if ($objp->seuil_stock_alerte && ($stock < $objp->seuil_stock_alerte)) + if ($objp->alertstock && ($stock < $objp->alertstock)) { $warning = img_warning($langs->trans('StockTooLow')) . ' '; } + //depending on conf, use either physical stock or //virtual stock to compute the stock to buy value - //echo $objp->desiredstock." * ".$stock." * ".$ordered."
"; - $stocktobuy = max($objp->desiredstock - $stock - $ordered, 0); + $stocktobuy = max(max($objp->desiredstock, $objp->alertstock) - $stock - $ordered, 0); $disabled = ''; if($ordered > 0) { - if($stock + $ordered >= $objp->desiredstock) { + $compare = $usevirtualstock ? $stock : $stock + $ordered; + if($compare >= $objp->desiredstock) { $picto = img_picto('', './img/yes', '', 1); $disabled = 'disabled="disabled"'; } From 4c7eba0ee0bbb2c456b888db7e9636be7fff419f Mon Sep 17 00:00:00 2001 From: Juanjo Menent Date: Thu, 3 Jul 2014 18:47:06 +0200 Subject: [PATCH 044/258] [ task #1063 ] Allow edit localtaxes rate for thirds. Works with thirds --- htdocs/societe/class/societe.class.php | 52 ++++++- htdocs/societe/soc.php | 191 ++++++++++++++++++++++--- 2 files changed, 224 insertions(+), 19 deletions(-) diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index 5893fbab021..307c2fe03de 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -6,7 +6,7 @@ * Copyright (C) 2006 Andre Cianfarani * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2008 Patrick Raguin - * Copyright (C) 2010-2011 Juanjo Menent + * Copyright (C) 2010-2014 Juanjo Menent * Copyright (C) 2013 Florian Henry * Copyright (C) 2013 Alexandre Spangaro * Copyright (C) 2013 Peter Fontaine @@ -196,7 +196,9 @@ class Societe extends CommonObject // Local taxes var $localtax1_assuj; + var $localtax1_value; var $localtax2_assuj; + var $localtax2_value; var $managers; var $capital; @@ -597,6 +599,24 @@ class Societe extends CommonObject return $result; } + /** + * Update localtax value of third party + * @param int $id id societe + * @param int $local Localtax to update + * @param double $value value of localtax + */ + function update_localtax($id, $local, $value) + { + global $db; + $sql = "UPDATE ".MAIN_DB_PREFIX."societe SET "; + if($local==1) $sql .= "localtax1_value = '" .$value."'"; + else $sql.="localtax2_value='".$value."'"; + $sql.="WHERE rowid=".$id; + + $resql=$this->db->query($sql); + + } + /** * Update parameters of third party * @@ -654,6 +674,9 @@ class Societe extends CommonObject // Local taxes $this->localtax1_assuj=trim($this->localtax1_assuj); $this->localtax2_assuj=trim($this->localtax2_assuj); + + $this->localtax1_value=trim($this->localtax1_value); + $this->localtax2_value=trim($this->localtax2_value); $this->capital=price2num(trim($this->capital),'MT'); if (empty($this->capital)) $this->capital = 0; @@ -753,6 +776,27 @@ class Societe extends CommonObject // Local taxes $sql .= ",localtax1_assuj = ".($this->localtax1_assuj!=''?"'".$this->localtax1_assuj."'":"null"); $sql .= ",localtax2_assuj = ".($this->localtax2_assuj!=''?"'".$this->localtax2_assuj."'":"null"); + if($this->localtax1_assuj==1) + { + if($this->localtax1_value!='') + { + $sql .=",localtax1_value =".$this->localtax1_value; + } + else $sql .=",localtax1_value =0.000"; + + } + else $sql .=",localtax1_value =0.000"; + + if($this->localtax2_assuj==1) + { + if($this->localtax2_value!='') + { + $sql .=",localtax2_value =".$this->localtax2_value; + } + else $sql .=",localtax2_value =0.000"; + + } + else $sql .=",localtax2_value =0.000"; $sql .= ",capital = ".$this->capital; @@ -933,7 +977,7 @@ class Societe extends CommonObject $sql .= ', s.fk_forme_juridique as forme_juridique_code'; $sql .= ', s.code_client, s.code_fournisseur, s.code_compta, s.code_compta_fournisseur, s.parent, s.barcode'; $sql .= ', s.fk_departement, s.fk_pays as country_id, s.fk_stcomm, s.remise_client, s.mode_reglement, s.cond_reglement, s.tva_assuj'; - $sql .= ', s.mode_reglement_supplier, s.cond_reglement_supplier, s.localtax1_assuj, s.localtax2_assuj, s.fk_prospectlevel, s.default_lang, s.logo'; + $sql .= ', s.mode_reglement_supplier, s.cond_reglement_supplier, s.localtax1_assuj, s.localtax1_value, s.localtax2_assuj, s.localtax2_value, s.fk_prospectlevel, s.default_lang, s.logo'; $sql .= ', s.outstanding_limit, s.import_key, s.canvas'; $sql .= ', fj.libelle as forme_juridique'; $sql .= ', e.libelle as effectif'; @@ -1034,7 +1078,9 @@ class Societe extends CommonObject // Local Taxes $this->localtax1_assuj = $obj->localtax1_assuj; $this->localtax2_assuj = $obj->localtax2_assuj; - + + $this->localtax1_value = $obj->localtax1_value; + $this->localtax2_value = $obj->localtax2_value; $this->typent_id = $obj->typent_id; $this->typent_code = $obj->typent_code; diff --git a/htdocs/societe/soc.php b/htdocs/societe/soc.php index da6c7771eb3..d903b4d540b 100644 --- a/htdocs/societe/soc.php +++ b/htdocs/societe/soc.php @@ -5,7 +5,7 @@ * Copyright (C) 2005 Eric Seigne * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2008 Patrick Raguin - * Copyright (C) 2010-2013 Juanjo Menent + * Copyright (C) 2010-2014 Juanjo Menent * Copyright (C) 2011-2013 Alexandre Spangaro * * This program is free software; you can redistribute it and/or modify @@ -32,6 +32,7 @@ require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/functions.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; @@ -100,6 +101,23 @@ if (empty($reshook)) // We defined value code_fournisseur $_POST["code_fournisseur"]="Acompleter"; } + + if($action=='set_localtax1') + { + //obtidre selected del combobox + $value=GETPOST('lt1'); + $object = new Societe($db); + $res=$object->update_localtax($socid, 1, $value); + + } + if($action=='set_localtax2') + { + //obtidre selected del combobox + $value=GETPOST('lt2'); + $object = new Societe($db); + $res=$object->update_localtax($socid, 2, $value); + + } // Add new third party if ((! GETPOST('getcustomercode') && ! GETPOST('getsuppliercode')) @@ -157,6 +175,9 @@ if (empty($reshook)) // Local Taxes $object->localtax1_assuj = GETPOST('localtax1assuj_value'); $object->localtax2_assuj = GETPOST('localtax2assuj_value'); + + $object->localtax1_value = GETPOST('lt1'); + $object->localtax2_value = GETPOST('lt2'); $object->forme_juridique_code = GETPOST('forme_juridique_code'); $object->effectif_id = GETPOST('effectif_id'); @@ -659,6 +680,9 @@ else //Local Taxes $object->localtax1_assuj = GETPOST('localtax1assuj_value'); $object->localtax2_assuj = GETPOST('localtax2assuj_value'); + + $object->localtax1_value =GETPOST('lt1'); + $object->localtax2_value =GETPOST('lt2'); $object->tva_intra = GETPOST('tva_intra'); @@ -1004,13 +1028,14 @@ else print $form->selectyesno('localtax2assuj_value',0,1); print ''; } - +/* if ($mysoc->country_code=='ES' && $mysoc->localtax2_assuj!="1" && ! empty($conf->fournisseur->enabled) && (GETPOST("type")=='f' || GETPOST("type")=='') ) { print ''.$langs->transcountry("LocalTax2IsUsed",$mysoc->country_code).''; print $form->selectyesno('localtax2assuj_value',0,1); print ''; } +*/ if (! empty($conf->global->MAIN_MULTILANGS)) { print ''.$langs->trans("DefaultLang").''."\n"; @@ -1150,6 +1175,9 @@ else //Local Taxes $object->localtax1_assuj = GETPOST('localtax1assuj_value'); $object->localtax2_assuj = GETPOST('localtax2assuj_value'); + + $object->localtax1_value =GETPOST('lt1'); + $object->localtax2_value =GETPOST('lt2'); // We set country_id, and country_code label of the chosen country if ($object->country_id > 0) @@ -1162,6 +1190,53 @@ else dol_htmloutput_errors($error,$errors); + if($object->localtax1_assuj==0){ + $sub=0; + }else{$sub=1;} + if($object->localtax2_assuj==0){ + $sub2=0; + }else{$sub2=1;} + + + print "\n".''."\n"; + + if ($conf->use_javascript_ajax) { print "\n".''."\n"; - - + + if ($conf->use_javascript_ajax) { print "\n".''."\n"; - else print ''."\n"; + else print ''."\n"; if (constant('JS_JQUERY_UI')) print ''."\n"; else print ''."\n"; print ''."\n"; diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index 2bdc950495e..32d96ec60fc 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -1392,6 +1392,14 @@ class Product extends CommonObject $this->entity = $obj->entity; $this->db->free($resql); + + + // Retreive all extrafield for thirdparty + // fetch optionals attributes and labels + require_once(DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'); + $extrafields=new ExtraFields($this->db); + $extralabels=$extrafields->fetch_name_optionals_label($this->table_element,true); + $this->fetch_optionals($this->id,$extralabels); // multilangs From fe50d8b1ab8b34b672623c369dd0db87a9704480 Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Sat, 5 Jul 2014 11:19:49 +0200 Subject: [PATCH 088/258] restore min jquery --- htdocs/main.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 323f98ade04..c24f9fc2036 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -1084,7 +1084,7 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs // JQuery. Must be before other includes print ''."\n"; if (constant('JS_JQUERY')) print ''."\n"; - else print ''."\n"; + else print ''."\n"; if (constant('JS_JQUERY_UI')) print ''."\n"; else print ''."\n"; print ''."\n"; From fe547de0e3572c24a9e5c20a290daf8be0ba34ae Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 5 Jul 2014 11:32:44 +0200 Subject: [PATCH 089/258] Fix: Removed duplicate lines --- scripts/members/sync_members_ldap2dolibarr.php | 2 -- scripts/user/sync_groups_ldap2dolibarr.php | 2 -- scripts/user/sync_users_ldap2dolibarr.php | 2 -- 3 files changed, 6 deletions(-) diff --git a/scripts/members/sync_members_ldap2dolibarr.php b/scripts/members/sync_members_ldap2dolibarr.php index 56c91255c7e..dbc37e1ca20 100755 --- a/scripts/members/sync_members_ldap2dolibarr.php +++ b/scripts/members/sync_members_ldap2dolibarr.php @@ -95,8 +95,6 @@ $required_fields=array_unique(array_values(array_filter($required_fields, "dolVa if ($argv[3]) $conf->global->LDAP_SERVER_HOST=$argv[2]; -print "***** $script_file ($version) *****\n"; - if (! isset($argv[2]) || ! is_numeric($argv[2])) { print "Usage: $script_file (nocommitiferror|commitiferror) id_member_type [ldapserverhost]\n"; exit(-1); diff --git a/scripts/user/sync_groups_ldap2dolibarr.php b/scripts/user/sync_groups_ldap2dolibarr.php index e7bf8773a25..bab01ecf2dd 100755 --- a/scripts/user/sync_groups_ldap2dolibarr.php +++ b/scripts/user/sync_groups_ldap2dolibarr.php @@ -72,8 +72,6 @@ $required_fields=array_unique(array_values(array_filter($required_fields, "dolVa if ($argv[2]) $conf->global->LDAP_SERVER_HOST=$argv[2]; -print "***** $script_file ($version) *****\n"; - if (! isset($argv[1])) { //print "Usage: $script_file (nocommitiferror|commitiferror) [id_group]\n"; print "Usage: $script_file (nocommitiferror|commitiferror) [ldapserverhost]\n"; diff --git a/scripts/user/sync_users_ldap2dolibarr.php b/scripts/user/sync_users_ldap2dolibarr.php index 60cb1118c37..b36aced01b0 100755 --- a/scripts/user/sync_users_ldap2dolibarr.php +++ b/scripts/user/sync_users_ldap2dolibarr.php @@ -85,8 +85,6 @@ $required_fields=array_unique(array_values(array_filter($required_fields, "dolVa if ($argv[2]) $conf->global->LDAP_SERVER_HOST=$argv[2]; -print "***** $script_file ($version) *****\n"; - if (! isset($argv[1])) { //print "Usage: $script_file (nocommitiferror|commitiferror) [id_group]\n"; print "Usage: $script_file (nocommitiferror|commitiferror) [ldapserverhost]\n"; From dec4ff2e199621c5ac6eb8b5ddff971a6f02168d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 5 Jul 2014 11:50:25 +0200 Subject: [PATCH 090/258] Fix: Duplicate confirmation --- scripts/members/sync_members_dolibarr2ldap.php | 1 + scripts/members/sync_members_ldap2dolibarr.php | 2 -- scripts/user/sync_groups_ldap2dolibarr.php | 3 +-- scripts/user/sync_users_ldap2dolibarr.php | 5 ++--- 4 files changed, 4 insertions(+), 7 deletions(-) diff --git a/scripts/members/sync_members_dolibarr2ldap.php b/scripts/members/sync_members_dolibarr2ldap.php index 840cf464ba2..7b0194a27bb 100755 --- a/scripts/members/sync_members_dolibarr2ldap.php +++ b/scripts/members/sync_members_dolibarr2ldap.php @@ -82,6 +82,7 @@ print "Press a key to confirm...\n"; $input = trim(fgets(STDIN)); print "Warning, this operation may result in data loss if it failed.\n"; print "Be sure to have a backup of your LDAP database (With OpenLDAP: slapcat > save.ldif).\n"; + print "Hit Enter to continue or CTRL+C to stop...\n"; $input = trim(fgets(STDIN)); diff --git a/scripts/members/sync_members_ldap2dolibarr.php b/scripts/members/sync_members_ldap2dolibarr.php index dbc37e1ca20..090fe25b42b 100755 --- a/scripts/members/sync_members_ldap2dolibarr.php +++ b/scripts/members/sync_members_ldap2dolibarr.php @@ -136,8 +136,6 @@ if ($typeid <= 0) } -print "Press a key to confirm..."; -$input = trim(fgets(STDIN)); print "Hit Enter to continue or CTRL+C to stop...\n"; $input = trim(fgets(STDIN)); diff --git a/scripts/user/sync_groups_ldap2dolibarr.php b/scripts/user/sync_groups_ldap2dolibarr.php index bab01ecf2dd..603263db58a 100755 --- a/scripts/user/sync_groups_ldap2dolibarr.php +++ b/scripts/user/sync_groups_ldap2dolibarr.php @@ -101,8 +101,7 @@ print "----- Options:\n"; print "commitiferror=".$forcecommit."\n"; print "Mapped LDAP fields=".join(',',$required_fields)."\n"; print "\n"; -print "Press a key to confirm..."; -$input = trim(fgets(STDIN)); + print "Hit Enter to continue or CTRL+C to stop...\n"; $input = trim(fgets(STDIN)); diff --git a/scripts/user/sync_users_ldap2dolibarr.php b/scripts/user/sync_users_ldap2dolibarr.php index b36aced01b0..86910c45f65 100755 --- a/scripts/user/sync_users_ldap2dolibarr.php +++ b/scripts/user/sync_users_ldap2dolibarr.php @@ -90,7 +90,7 @@ if (! isset($argv[1])) { print "Usage: $script_file (nocommitiferror|commitiferror) [ldapserverhost]\n"; exit(-1); } -$groupid=$argv[3]; + if ($argv[1] == 'commitiferror') $forcecommit=1; @@ -114,8 +114,7 @@ print "----- Options:\n"; print "commitiferror=".$forcecommit."\n"; print "Mapped LDAP fields=".join(',',$required_fields)."\n"; print "\n"; -print "Press a key to confirm..."; -$input = trim(fgets(STDIN)); + print "Hit Enter to continue or CTRL+C to stop...\n"; $input = trim(fgets(STDIN)); From 823e976f39f394ef685ce919d1b91a8547da984c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 5 Jul 2014 12:27:35 +0200 Subject: [PATCH 091/258] Change the way parameters are provides to scripts sync_xxx_ldap2dolibarr.php --- ChangeLog | 6 ++++- .../members/sync_members_ldap2dolibarr.php | 11 ++++++---- scripts/user/sync_groups_ldap2dolibarr.php | 11 ++++++---- scripts/user/sync_users_ldap2dolibarr.php | 22 ++++++++++++++----- 4 files changed, 35 insertions(+), 15 deletions(-) diff --git a/ChangeLog b/ChangeLog index 139069474c9..30b640ac130 100644 --- a/ChangeLog +++ b/ChangeLog @@ -23,7 +23,6 @@ For users: - Fix: [ bug #1502 ] DON_CREATE trigger does not intercept trigger action - Fix: [ bug #1505, #1504] Project trigger problem - For translators: - Update language files. @@ -31,6 +30,11 @@ For developers: - New: Add hook "searchAgendaFrom". - New: Add trigger DON_UPDATE, DON_DELETE +WARNING: Following change may create regression for some external modules, but was necessary to make +Dolibarr better: + +- Change the way parameters are provides to scripts sync_xxx_ldap2dolibarr.php + ***** ChangeLog for 3.6 compared to 3.5.* ***** For users: diff --git a/scripts/members/sync_members_ldap2dolibarr.php b/scripts/members/sync_members_ldap2dolibarr.php index 07cf3f45ac3..d081065a3fa 100755 --- a/scripts/members/sync_members_ldap2dolibarr.php +++ b/scripts/members/sync_members_ldap2dolibarr.php @@ -93,14 +93,17 @@ $required_fields = array( $required_fields=array_unique(array_values(array_filter($required_fields, "dolValidElement"))); -if ($argv[3]) $conf->global->LDAP_SERVER_HOST=$argv[2]; - if (! isset($argv[2]) || ! is_numeric($argv[2])) { - print "Usage: $script_file (nocommitiferror|commitiferror) id_member_type [ldapserverhost]\n"; + print "Usage: $script_file (nocommitiferror|commitiferror) id_member_type [--server=ldapserverhost]\n"; exit(-1); } + $typeid=$argv[2]; -if ($argv[1] == 'commitiferror') $forcecommit=1; +foreach($argv as $key => $val) +{ + if ($val == 'commitiferror') $forcecommit=1; + if (preg_match('/--server=([^\s]+)$/',$val,$reg)) $conf->global->LDAP_SERVER_HOST=$reg[1]; +} print "Mails sending disabled (useless in batch mode)\n"; $conf->global->MAIN_DISABLE_ALL_MAILS=1; // On bloque les mails diff --git a/scripts/user/sync_groups_ldap2dolibarr.php b/scripts/user/sync_groups_ldap2dolibarr.php index 1da80e57d4e..3170714124b 100755 --- a/scripts/user/sync_groups_ldap2dolibarr.php +++ b/scripts/user/sync_groups_ldap2dolibarr.php @@ -70,16 +70,19 @@ $required_fields = array( // Remove from required_fields all entries not configured in LDAP (empty) and duplicated $required_fields=array_unique(array_values(array_filter($required_fields, "dolValidElement"))); -if ($argv[2]) $conf->global->LDAP_SERVER_HOST=$argv[2]; if (! isset($argv[1])) { //print "Usage: $script_file (nocommitiferror|commitiferror) [id_group]\n"; - print "Usage: $script_file (nocommitiferror|commitiferror) [ldapserverhost]\n"; + print "Usage: $script_file (nocommitiferror|commitiferror) [--server=ldapserverhost] [--excludeuser=user1,user2...]\n"; exit(-1); } -$groupid=$argv[3]; -if ($argv[1] == 'commitiferror') $forcecommit=1; +foreach($argv as $key => $val) +{ + if ($val == 'commitiferror') $forcecommit=1; + if (preg_match('/--server=([^\s]+)$/',$val,$reg)) $conf->global->LDAP_SERVER_HOST=$reg[1]; + if (preg_match('/--excludeuser=([^\s]+)$/',$val,$reg)) $excludeuser=explode(',',$reg[1]); +} print "Mails sending disabled (useless in batch mode)\n"; $conf->global->MAIN_DISABLE_ALL_MAILS=1; // On bloque les mails diff --git a/scripts/user/sync_users_ldap2dolibarr.php b/scripts/user/sync_users_ldap2dolibarr.php index b7d041f64f9..774a56c45e5 100755 --- a/scripts/user/sync_users_ldap2dolibarr.php +++ b/scripts/user/sync_users_ldap2dolibarr.php @@ -47,6 +47,7 @@ $langs->load("errors"); $version=DOL_VERSION; $error=0; $forcecommit=0; +$excludeuser=array(); /* @@ -83,16 +84,17 @@ $required_fields = array( // Remove from required_fields all entries not configured in LDAP (empty) and duplicated $required_fields=array_unique(array_values(array_filter($required_fields, "dolValidElement"))); -if ($argv[2]) $conf->global->LDAP_SERVER_HOST=$argv[2]; - if (! isset($argv[1])) { - //print "Usage: $script_file (nocommitiferror|commitiferror) [id_group]\n"; - print "Usage: $script_file (nocommitiferror|commitiferror) [ldapserverhost]\n"; + print "Usage: $script_file (nocommitiferror|commitiferror) [--server=ldapserverhost] [--excludeuser=user1,user2...]\n"; exit(-1); } -if ($argv[1] == 'commitiferror') $forcecommit=1; - +foreach($argv as $key => $val) +{ + if ($val == 'commitiferror') $forcecommit=1; + if (preg_match('/--server=([^\s]+)$/',$val,$reg)) $conf->global->LDAP_SERVER_HOST=$reg[1]; + if (preg_match('/--excludeuser=([^\s]+)$/',$val,$reg)) $excludeuser=explode(',',$reg[1]); +} print "Mails sending disabled (useless in batch mode)\n"; $conf->global->MAIN_DISABLE_ALL_MAILS=1; // On bloque les mails @@ -112,6 +114,7 @@ print "login=".$conf->db->user."\n"; print "database=".$conf->db->name."\n"; print "----- Options:\n"; print "commitiferror=".$forcecommit."\n"; +print "excludeuser=".join(',',$excludeuser)."\n"; print "Mapped LDAP fields=".join(',',$required_fields)."\n"; print "\n"; @@ -179,6 +182,13 @@ if ($result >= 0) // Warning $ldapuser has a key in lowercase foreach ($ldaprecords as $key => $ldapuser) { + // If login into exclude list, we discard record + if (in_array($ldapuser[$conf->global->LDAP_FIELD_LOGIN],$excludeuser)) + { + print $langs->transnoentities("UserDiscarded").' # '.$key.': login='.$ldapuser[$conf->global->LDAP_FIELD_LOGIN].' --> Discarded'."\n"; + continue; + } + $fuser = new User($db); if($conf->global->LDAP_KEY_USERS == $conf->global->LDAP_FIELD_SID) { From 1aa719272b210eaba7f1e65906204c3307684faf Mon Sep 17 00:00:00 2001 From: frederic34 Date: Sat, 5 Jul 2014 14:56:45 +0200 Subject: [PATCH 092/258] Update .travis.yml Just check php files --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index f6e7bd230fa..081fb360bb4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -100,7 +100,7 @@ script: # - phpunit -d memory_limit=-1 --configuration test/phpunit/phpunittest.xml --coverage-text test/phpunit/BuildDocTest.php # - phpunit -d memory_limit=-1 --configuration test/phpunit/phpunittest.xml test/phpunit/WebservicesOtherTest.php # - phpcs -p --warning-severity=0 -s --report-checkstyle --report-summary --standard=dev/codesniffer/ruleset.xml --tab-width=4 --ignore=/build/html/,/documents/,/includes/,/test/report/ htdocs/core/class/dolgraph.class.php - - phpcs -p --warning-severity=0 -s --report-checkstyle --report-summary --standard=dev/codesniffer/ruleset.xml --tab-width=4 --ignore=/build/html/,/documents/,/includes/,/test/report/ . + - phpcs -p --extensions=php --warning-severity=0 -s --report-checkstyle --report-summary --standard=dev/codesniffer/ruleset.xml --tab-width=4 --ignore=/build/html/,/documents/,/includes/,/test/report/ . # - phpcs -p --warning-severity=0 -s --report-summary --standard=dev/codesniffer/ruleset.xml --tab-width=4 --ignore=/build/html/,/documents/,/includes/,/test/report/ . - phpunit -d memory_limit=-1 --configuration test/phpunit/phpunittest.xml test/phpunit/AllTests.php From e294fe1eddc150399c5aacd05ab0d98bddc52cf3 Mon Sep 17 00:00:00 2001 From: aspangaro Date: Sat, 5 Jul 2014 21:58:39 +0200 Subject: [PATCH 093/258] Update --- htdocs/core/class/fiscalyear.class.php | 38 ++++---------------------- 1 file changed, 5 insertions(+), 33 deletions(-) diff --git a/htdocs/core/class/fiscalyear.class.php b/htdocs/core/class/fiscalyear.class.php index 21dfa6f2381..39e72ff7416 100644 --- a/htdocs/core/class/fiscalyear.class.php +++ b/htdocs/core/class/fiscalyear.class.php @@ -62,11 +62,12 @@ class Fiscalyear } /** - * Create object in database + * Create object in database * - * @return int <0 if KO, >0 if OK + * @param User $user User making creation + * @return int <0 if KO, >0 if OK */ - function create() + function create($user) { global $conf; @@ -97,35 +98,6 @@ class Fiscalyear dol_syslog(get_class($this)."::create", LOG_DEBUG); $result = $this->db->query($sql); if ($result) - { - $error++; $this->errors[]="Error ".$this->db->lasterror(); - } - - if (! $error) - { - $this->rowid = $this->db->last_insert_id(MAIN_DB_PREFIX."accounting_fiscalyear"); - } - - // Commit or rollback - if ($error) - { - foreach($this->errors as $errmsg) - { - dol_syslog(get_class($this)."::create ".$errmsg, LOG_ERR); - $this->error.=($this->error?', '.$errmsg:$errmsg); - } - $this->db->rollback(); - return -1*$error; - } - else - { - $this->db->commit(); - return $this->rowid; - } - - dol_syslog(get_class($this)."::create=", LOG_DEBUG); - $result = $this->db->query($sql); - if ($result) { $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."accounting_fiscalyear"); @@ -133,7 +105,7 @@ class Fiscalyear if ($result > 0) { $this->db->commit(); - return $this->rowid; + return $this->id; } else { From cb9e0983dd1ebf11625472c846fdadc995301bcc Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Sun, 6 Jul 2014 10:24:01 +0200 Subject: [PATCH 094/258] Remove fetch_optionnal becauwe done in fetch from product class --- htdocs/product/fiche.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/htdocs/product/fiche.php b/htdocs/product/fiche.php index deeae6784e6..07830cd793c 100644 --- a/htdocs/product/fiche.php +++ b/htdocs/product/fiche.php @@ -1014,8 +1014,6 @@ else else if ($object->id > 0) { - $res=$object->fetch_optionals($object->id,$extralabels); - // Fiche en mode edition if ($action == 'edit' && ($user->rights->produit->creer || $user->rights->service->creer)) { From 4d9f78dc07d8df31d3ab58897cc1b7fdb8f4c9b8 Mon Sep 17 00:00:00 2001 From: BENKE Charles Date: Sun, 6 Jul 2014 15:06:34 +0200 Subject: [PATCH 095/258] getlibstatut added Add function getlibstatut and libstatut on task (fk_statut allready present on project_task table) --- htdocs/projet/class/task.class.php | 79 ++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) diff --git a/htdocs/projet/class/task.class.php b/htdocs/projet/class/task.class.php index 93fd2ac6b6d..d9f8357a751 100644 --- a/htdocs/projet/class/task.class.php +++ b/htdocs/projet/class/task.class.php @@ -1218,5 +1218,84 @@ class Task extends CommonObject } } + + /** + * \brief Return status label of object + * \param mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto + * \return string Label + */ + function getLibStatut($mode=0) + { + return $this->LibStatut($this->fk_statut,$mode); + } + + /** + * \brief Renvoi status label for a status + * \param statut id statut + * \param mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto + * \return string Label + */ + function LibStatut($statut,$mode=0) + { + // list of Statut of the task + $this->statuts[0]='Draft'; + $this->statuts[1]='Validated'; + $this->statuts[2]='Running'; + $this->statuts[3]='Finish'; + $this->statuts[4]='Transfered'; + $this->statuts_short[0]='Draft'; + $this->statuts_short[1]='Validated'; + $this->statuts_short[2]='Running'; + $this->statuts_short[3]='Finish'; + $this->statuts_short[4]='Transfered'; + + global $langs; + + if ($mode == 0) + { + return $langs->trans($this->statuts[$statut]); + } + if ($mode == 1) + { + return $langs->trans($this->statuts_short[$statut]); + } + if ($mode == 2) + { + if ($statut==0) return img_picto($langs->trans($this->statuts_short[$statut]),'statut0').' '.$langs->trans($this->statuts_short[$statut]); + if ($statut==1) return img_picto($langs->trans($this->statuts_short[$statut]),'statut1').' '.$langs->trans($this->statuts_short[$statut]); + if ($statut==2) return img_picto($langs->trans($this->statuts_short[$statut]),'statut3').' '.$langs->trans($this->statuts_short[$statut]); + if ($statut==3) return img_picto($langs->trans($this->statuts_short[$statut]),'statut4').' '.$langs->trans($this->statuts_short[$statut]); + if ($statut==4) return img_picto($langs->trans($this->statuts_short[$statut]),'statut6').' '.$langs->trans($this->statuts_short[$statut]); + if ($statut==5) return img_picto($langs->trans($this->statuts_short[$statut]),'statut5').' '.$langs->trans($this->statuts_short[$statut]); + } + if ($mode == 3) + { + if ($statut==0) return img_picto($langs->trans($this->statuts_short[$statut]),'statut0'); + if ($statut==1) return img_picto($langs->trans($this->statuts_short[$statut]),'statut1'); + if ($statut==2) return img_picto($langs->trans($this->statuts_short[$statut]),'statut3'); + if ($statut==3) return img_picto($langs->trans($this->statuts_short[$statut]),'statut4'); + if ($statut==4) return img_picto($langs->trans($this->statuts_short[$statut]),'statut6'); + if ($statut==5) return img_picto($langs->trans($this->statuts_short[$statut]),'statut5'); + } + if ($mode == 4) + { + if ($statut==0) return img_picto($langs->trans($this->statuts_short[$statut]),'statut0').' '.$langs->trans($this->statuts[$statut]); + if ($statut==1) return img_picto($langs->trans($this->statuts_short[$statut]),'statut1').' '.$langs->trans($this->statuts[$statut]); + if ($statut==2) return img_picto($langs->trans($this->statuts_short[$statut]),'statut3').' '.$langs->trans($this->statuts[$statut]); + if ($statut==3) return img_picto($langs->trans($this->statuts_short[$statut]),'statut4').' '.$langs->trans($this->statuts[$statut]); + if ($statut==4) return img_picto($langs->trans($this->statuts_short[$statut]),'statut6').' '.$langs->trans($this->statuts[$statut]); + if ($statut==5) return img_picto($langs->trans($this->statuts_short[$statut]),'statut5').' '.$langs->trans($this->statuts[$statut]); + } + if ($mode == 5) + { + if ($statut==0) return $langs->trans($this->statuts_short[$statut]).' '.img_picto($langs->trans($this->statuts_short[$statut]),'statut0'); + if ($statut==1) return $langs->trans($this->statuts_short[$statut]).' '.img_picto($langs->trans($this->statuts_short[$statut]),'statut1'); + if ($statut==2) return $langs->trans($this->statuts_short[$statut]).' '.img_picto($langs->trans($this->statuts_short[$statut]),'statut3'); + if ($statut==3) return $langs->trans($this->statuts_short[$statut]).' '.img_picto($langs->trans($this->statuts_short[$statut]),'statut4'); + if ($statut==4) return $langs->trans($this->statuts_short[$statut]).' '.img_picto($langs->trans($this->statuts_short[$statut]),'statut6'); + if ($statut==5) return $langs->trans($this->statuts_short[$statut]).' '.img_picto($langs->trans($this->statuts_short[$statut]),'statut5'); + } + } + } ?> From 2080f58c2c3625294bb9264a954f28bda733a015 Mon Sep 17 00:00:00 2001 From: frederic34 Date: Sun, 6 Jul 2014 15:49:24 +0200 Subject: [PATCH 096/258] Update ruleset.xml The closing ?> tag MUST be omitted from files containing only PHP. --- dev/codesniffer/ruleset.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dev/codesniffer/ruleset.xml b/dev/codesniffer/ruleset.xml index 24cc4b46e7b..1cf0442d744 100755 --- a/dev/codesniffer/ruleset.xml +++ b/dev/codesniffer/ruleset.xml @@ -18,6 +18,9 @@ 0 + + + From f7586cdbfafaad2732ba300c2f7572d9cb2d8a4d Mon Sep 17 00:00:00 2001 From: frederic34 Date: Sun, 6 Jul 2014 16:43:16 +0200 Subject: [PATCH 097/258] Update ruleset.xml PHP code MUST use only UTF-8 without BOM. --- dev/codesniffer/ruleset.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dev/codesniffer/ruleset.xml b/dev/codesniffer/ruleset.xml index 24cc4b46e7b..f507d5c2a16 100755 --- a/dev/codesniffer/ruleset.xml +++ b/dev/codesniffer/ruleset.xml @@ -46,6 +46,9 @@ --> + + + From ce3fa145118c5fffd88981524663d3243d050d6f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 6 Jul 2014 19:25:15 +0200 Subject: [PATCH 098/258] New: Add event FICHINTER_CLASSIFY_BILLED into list of possible events to create an automatic event into agenda. Qual: Removed hard coded rowid into data init. --- ChangeLog | 5 +- htdocs/admin/agenda.php | 9 ++- ...terface_50_modAgenda_ActionsAuto.class.php | 33 +++++++-- .../mysql/data/llx_c_action_trigger.sql | 71 ++++++++++--------- .../install/mysql/migration/3.6.0-3.7.0.sql | 1 + .../mysql/tables/llx_c_action_trigger.sql | 4 +- htdocs/langs/en_US/agenda.lang | 1 + 7 files changed, 78 insertions(+), 46 deletions(-) diff --git a/ChangeLog b/ChangeLog index 30b640ac130..864fb7fba21 100644 --- a/ChangeLog +++ b/ChangeLog @@ -12,7 +12,9 @@ For users: - New: Form to add a photo is immediatly available on photo page if permissions are ok (save one click per photo to add). - New: Add option PRODUCT_MAX_VISIBLE_PHOTO to limit number of photos - shown on main product card. + shown on main product card. +- New: Add event FICHINTER_CLASSIFY_BILLED into list of possible events to + create an automatic event into agenda. - Fix: [ bug #1487 ] PAYMENT_DELETE trigger does not intercept trigger action - Fix: [ bug #1470, #1472, #1473] User trigger problem - Fix: [ bug #1489, #1491 ] Intervention trigger problem @@ -29,6 +31,7 @@ For translators: For developers: - New: Add hook "searchAgendaFrom". - New: Add trigger DON_UPDATE, DON_DELETE +- Qual: Removed hard coded rowid into data init of table llx_c_action_trigger. WARNING: Following change may create regression for some external modules, but was necessary to make Dolibarr better: diff --git a/htdocs/admin/agenda.php b/htdocs/admin/agenda.php index f3fb1d9b6c9..c7cb4258935 100644 --- a/htdocs/admin/agenda.php +++ b/htdocs/admin/agenda.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2008-2014 Laurent Destailleur * Copyright (C) 2011 Regis Houssin * Copyright (C) 2011-2012 Juanjo Menent * @@ -36,11 +36,11 @@ $langs->load("other"); $action = GETPOST('action','alpha'); $cancel = GETPOST('cancel','alpha'); + // Get list of triggers available $sql = "SELECT a.rowid, a.code, a.label, a.elementtype"; $sql.= " FROM ".MAIN_DB_PREFIX."c_action_trigger as a"; $sql.= " ORDER BY a.rang ASC"; - $resql=$db->query($sql); if ($resql) { @@ -67,6 +67,7 @@ else /* * Actions */ + if ($action == "save" && empty($cancel)) { $i=0; @@ -153,6 +154,7 @@ print ''; print ''.$langs->trans("ActionsEvents").''; print ''.$langs->trans("All").'/'.$langs->trans("None").''; print ''."\n"; +// Show each trigger if (! empty($triggers)) { foreach ($triggers as $trigger) @@ -165,6 +167,9 @@ if (! empty($triggers)) //print 'module='.$module.'
'; if (! empty($conf->$module->enabled)) { + // Discard special case. + if ($trigger['code'] == 'FICHINTER_CLASSIFY_BILLED' && empty($conf->global->FICHINTER_CLASSIFY_BILLED)) continue; + $var=!$var; print ''; print ''.$trigger['code'].''; diff --git a/htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php b/htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php index 19facf72876..79193b07084 100644 --- a/htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php +++ b/htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php @@ -116,8 +116,8 @@ class InterfaceActionsAuto $key='MAIN_AGENDA_ACTIONAUTO_'.$action; //dol_syslog("xxxxxxxxxxx".$key); - if (empty($conf->agenda->enabled)) return 0; // Module not active, we do nothing - if (empty($conf->global->$key)) return 0; // Log events not enabled for this action + if (empty($conf->agenda->enabled)) return 0; // Module not active, we do nothing + if (empty($conf->global->$key)) return 0; // Do not log events not enabled for this action $ok=0; @@ -370,11 +370,26 @@ class InterfaceActionsAuto $object->actionmsg=$langs->transnoentities("InterventionSentByEMail",$object->ref); $object->actionmsg.="\n".$langs->transnoentities("Author").': '.$user->login; - // Parameters $object->sendotid defined by caller + // Parameters $object->sendtoid defined by caller //$object->sendtoid=0; $ok=1; } - elseif ($action == 'SHIPPING_VALIDATE') + elseif ($action == 'FICHINTER_CLASSIFY_BILLED') + { + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + $langs->load("other"); + $langs->load("interventions"); + $langs->load("agenda"); + + $object->actiontypecode='AC_OTH_AUTO'; + if (empty($object->actionmsg2)) $object->actionmsg2=$langs->transnoentities("InterventionClassifiedBilled",$object->ref); + $object->actionmsg=$langs->transnoentities("InterventionClassifiedBilled",$object->ref); + $object->actionmsg.="\n".$langs->transnoentities("Author").': '.$user->login; + + $object->sendtoid=0; + $ok=1; + } + elseif ($action == 'SHIPPING_VALIDATE') { dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); $langs->load("other"); @@ -470,7 +485,7 @@ class InterfaceActionsAuto $object->actionmsg.="\n".$langs->transnoentities("Author").': '.$user->login; } - // Parameters $object->sendotid defined by caller + // Parameters $object->sendtoid defined by caller //$object->sendtoid=0; $ok=1; } @@ -629,6 +644,7 @@ class InterfaceActionsAuto $object->actionmsg=$langs->transnoentities("ProjectCreatedInDolibarr",$object->ref); $object->actionmsg.="\n".$langs->transnoentities("Project").': '.$object->ref; $object->actionmsg.="\n".$langs->transnoentities("Author").': '.$user->login; + $object->sendtoid=0; $ok=1; } @@ -647,6 +663,7 @@ class InterfaceActionsAuto $object->actionmsg.="\n".$langs->transnoentities("Task").': '.$object->ref; $object->actionmsg.="\n".$langs->transnoentities("Author").': '.$user->login; + $object->sendtoid=0; $ok=1; } @@ -662,6 +679,7 @@ class InterfaceActionsAuto $object->actionmsg.="\n".$langs->transnoentities("Task").': '.$object->ref; $object->actionmsg.="\n".$langs->transnoentities("Author").': '.$user->login; + $object->sendtoid=0; $ok=1; } @@ -677,6 +695,7 @@ class InterfaceActionsAuto $object->actionmsg.="\n".$langs->transnoentities("Task").': '.$object->ref; $object->actionmsg.="\n".$langs->transnoentities("Author").': '.$user->login; + $object->sendtoid=0; $ok=1; } @@ -723,8 +742,8 @@ class InterfaceActionsAuto $actioncomm->contact = $contactforaction; $actioncomm->societe = $societeforaction; $actioncomm->author = $user; // User saving action - //$actioncomm->usertodo = $user; // User affected to action - $actioncomm->userdone = $user; // User doing action + $actioncomm->usertodo = $user; // User owner of action + //$actioncomm->userdone = $user; // User doing action $actioncomm->fk_element = $object->id; $actioncomm->elementtype = $object->element; diff --git a/htdocs/install/mysql/data/llx_c_action_trigger.sql b/htdocs/install/mysql/data/llx_c_action_trigger.sql index 971d2d7514a..6eddd5883c8 100644 --- a/htdocs/install/mysql/data/llx_c_action_trigger.sql +++ b/htdocs/install/mysql/data/llx_c_action_trigger.sql @@ -32,38 +32,39 @@ -- List of all managed triggered events (used for trigger agenda and for notification) -- delete from llx_c_action_trigger; -insert into llx_c_action_trigger (rowid,code,label,description,elementtype,rang) values (1,'FICHINTER_VALIDATE','Intervention validated','Executed when a intervention is validated','ficheinter',19); -insert into llx_c_action_trigger (rowid,code,label,description,elementtype,rang) values (2,'BILL_VALIDATE','Customer invoice validated','Executed when a customer invoice is approved','facture',6); -insert into llx_c_action_trigger (rowid,code,label,description,elementtype,rang) values (3,'ORDER_SUPPLIER_APPROVE','Supplier order request approved','Executed when a supplier order is approved','order_supplier',12); -insert into llx_c_action_trigger (rowid,code,label,description,elementtype,rang) values (4,'ORDER_SUPPLIER_REFUSE','Supplier order request refused','Executed when a supplier order is refused','order_supplier',13); -insert into llx_c_action_trigger (rowid,code,label,description,elementtype,rang) values (5,'ORDER_VALIDATE','Customer order validate','Executed when a customer order is validated','commande',4); -insert into llx_c_action_trigger (rowid,code,label,description,elementtype,rang) values (6,'PROPAL_VALIDATE','Customer proposal validated','Executed when a commercial proposal is validated','propal',2); -insert into llx_c_action_trigger (rowid,code,label,description,elementtype,rang) values (9,'COMPANY_SENTBYMAIL','Mails sent from third party card','Executed when you send email from third party card','societe',1); -insert into llx_c_action_trigger (rowid,code,label,description,elementtype,rang) values (10,'COMPANY_CREATE','Third party created','Executed when a third party is created','societe',1); -insert into llx_c_action_trigger (rowid,code,label,description,elementtype,rang) values (11,'CONTRACT_VALIDATE','Contract validated','Executed when a contract is validated','contrat',18); -insert into llx_c_action_trigger (rowid,code,label,description,elementtype,rang) values (12,'PROPAL_SENTBYMAIL','Commercial proposal sent by mail','Executed when a commercial proposal is sent by mail','propal',3); -insert into llx_c_action_trigger (rowid,code,label,description,elementtype,rang) values (13,'ORDER_SENTBYMAIL','Customer order sent by mail','Executed when a customer order is sent by mail ','commande',5); -insert into llx_c_action_trigger (rowid,code,label,description,elementtype,rang) values (14,'BILL_PAYED','Customer invoice payed','Executed when a customer invoice is payed','facture',7); -insert into llx_c_action_trigger (rowid,code,label,description,elementtype,rang) values (15,'BILL_CANCEL','Customer invoice canceled','Executed when a customer invoice is conceled','facture',8); -insert into llx_c_action_trigger (rowid,code,label,description,elementtype,rang) values (16,'BILL_SENTBYMAIL','Customer invoice sent by mail','Executed when a customer invoice is sent by mail','facture',9); -insert into llx_c_action_trigger (rowid,code,label,description,elementtype,rang) values (17,'ORDER_SUPPLIER_VALIDATE','Supplier order validated','Executed when a supplier order is validated','order_supplier',11); -insert into llx_c_action_trigger (rowid,code,label,description,elementtype,rang) values (18,'ORDER_SUPPLIER_SENTBYMAIL','Supplier order sent by mail','Executed when a supplier order is sent by mail','order_supplier',14); -insert into llx_c_action_trigger (rowid,code,label,description,elementtype,rang) values (19,'BILL_SUPPLIER_VALIDATE','Supplier invoice validated','Executed when a supplier invoice is validated','invoice_supplier',15); -insert into llx_c_action_trigger (rowid,code,label,description,elementtype,rang) values (20,'BILL_SUPPLIER_PAYED','Supplier invoice payed','Executed when a supplier invoice is payed','invoice_supplier',16); -insert into llx_c_action_trigger (rowid,code,label,description,elementtype,rang) values (21,'BILL_SUPPLIER_SENTBYMAIL','Supplier invoice sent by mail','Executed when a supplier invoice is sent by mail','invoice_supplier',17); -insert into llx_c_action_trigger (rowid,code,label,description,elementtype,rang) values (22,'SHIPPING_VALIDATE','Shipping validated','Executed when a shipping is validated','shipping',20); -insert into llx_c_action_trigger (rowid,code,label,description,elementtype,rang) values (23,'SHIPPING_SENTBYMAIL','Shipping sent by mail','Executed when a shipping is sent by mail','shipping',21); -insert into llx_c_action_trigger (rowid,code,label,description,elementtype,rang) values (24,'MEMBER_VALIDATE','Member validated','Executed when a member is validated','member',22); -insert into llx_c_action_trigger (rowid,code,label,description,elementtype,rang) values (25,'MEMBER_SUBSCRIPTION','Member subscribed','Executed when a member is subscribed','member',23); -insert into llx_c_action_trigger (rowid,code,label,description,elementtype,rang) values (26,'MEMBER_RESILIATE','Member resiliated','Executed when a member is resiliated','member',24); -insert into llx_c_action_trigger (rowid,code,label,description,elementtype,rang) values (27,'MEMBER_DELETE','Member deleted','Executed when a member is deleted','member',25); -insert into llx_c_action_trigger (rowid,code,label,description,elementtype,rang) values (28,'BILL_UNVALIDATE','Customer invoice unvalidated','Executed when a customer invoice status set back to draft','facture',10); -insert into llx_c_action_trigger (rowid,code,label,description,elementtype,rang) values (29,'FICHINTER_SENTBYMAIL','Intervention sent by mail','Executed when a intervention is sent by mail','ficheinter',29); -insert into llx_c_action_trigger (rowid,code,label,description,elementtype,rang) values (30,'PROJECT_CREATE','Project creation','Executed when a project is created','project',30); -insert into llx_c_action_trigger (rowid,code,label,description,elementtype,rang) values (31,'PROPAL_CLOSE_SIGNED','Customer proposal closed signed','Executed when a customer proposal is closed signed','propal',31); -insert into llx_c_action_trigger (rowid,code,label,description,elementtype,rang) values (32,'PROPAL_CLOSE_REFUSED','Customer proposal closed refused','Executed when a customer proposal is closed refused','propal',32); -insert into llx_c_action_trigger (rowid,code,label,description,elementtype,rang) values (33,'BILL_SUPPLIER_CANCELED','Supplier invoice cancelled','Executed when a supplier invoice is cancelled','invoice_supplier',33); -insert into llx_c_action_trigger (rowid,code,label,description,elementtype,rang) values (34,'MEMBER_MODIFY','Member modified','Executed when a member is modified','member',34); -insert into llx_c_action_trigger (rowid,code,label,description,elementtype,rang) values (35,'TASK_CREATE','Task created','Executed when a project task is created','project',35); -insert into llx_c_action_trigger (rowid,code,label,description,elementtype,rang) values (36,'TASK_MODIFY','Task modified','Executed when a project task is modified','project',36); -insert into llx_c_action_trigger (rowid,code,label,description,elementtype,rang) values (37,'TASK_DELETE','Task deleted','Executed when a project task is deleted','project',37); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('FICHINTER_VALIDATE','Intervention validated','Executed when a intervention is validated','ficheinter',19); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('BILL_VALIDATE','Customer invoice validated','Executed when a customer invoice is approved','facture',6); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('ORDER_SUPPLIER_APPROVE','Supplier order request approved','Executed when a supplier order is approved','order_supplier',12); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('ORDER_SUPPLIER_REFUSE','Supplier order request refused','Executed when a supplier order is refused','order_supplier',13); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('ORDER_VALIDATE','Customer order validate','Executed when a customer order is validated','commande',4); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('PROPAL_VALIDATE','Customer proposal validated','Executed when a commercial proposal is validated','propal',2); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('COMPANY_SENTBYMAIL','Mails sent from third party card','Executed when you send email from third party card','societe',1); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('COMPANY_CREATE','Third party created','Executed when a third party is created','societe',1); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('CONTRACT_VALIDATE','Contract validated','Executed when a contract is validated','contrat',18); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('PROPAL_SENTBYMAIL','Commercial proposal sent by mail','Executed when a commercial proposal is sent by mail','propal',3); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('ORDER_SENTBYMAIL','Customer order sent by mail','Executed when a customer order is sent by mail ','commande',5); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('BILL_PAYED','Customer invoice payed','Executed when a customer invoice is payed','facture',7); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('BILL_CANCEL','Customer invoice canceled','Executed when a customer invoice is conceled','facture',8); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('BILL_SENTBYMAIL','Customer invoice sent by mail','Executed when a customer invoice is sent by mail','facture',9); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('ORDER_SUPPLIER_VALIDATE','Supplier order validated','Executed when a supplier order is validated','order_supplier',11); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('ORDER_SUPPLIER_SENTBYMAIL','Supplier order sent by mail','Executed when a supplier order is sent by mail','order_supplier',14); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('BILL_SUPPLIER_VALIDATE','Supplier invoice validated','Executed when a supplier invoice is validated','invoice_supplier',15); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('BILL_SUPPLIER_PAYED','Supplier invoice payed','Executed when a supplier invoice is payed','invoice_supplier',16); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('BILL_SUPPLIER_SENTBYMAIL','Supplier invoice sent by mail','Executed when a supplier invoice is sent by mail','invoice_supplier',17); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('SHIPPING_VALIDATE','Shipping validated','Executed when a shipping is validated','shipping',20); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('SHIPPING_SENTBYMAIL','Shipping sent by mail','Executed when a shipping is sent by mail','shipping',21); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('MEMBER_VALIDATE','Member validated','Executed when a member is validated','member',22); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('MEMBER_SUBSCRIPTION','Member subscribed','Executed when a member is subscribed','member',23); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('MEMBER_RESILIATE','Member resiliated','Executed when a member is resiliated','member',24); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('MEMBER_DELETE','Member deleted','Executed when a member is deleted','member',25); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('BILL_UNVALIDATE','Customer invoice unvalidated','Executed when a customer invoice status set back to draft','facture',10); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('FICHINTER_SENTBYMAIL','Intervention sent by mail','Executed when a intervention is sent by mail','ficheinter',19); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('PROJECT_CREATE','Project creation','Executed when a project is created','project',30); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('PROPAL_CLOSE_SIGNED','Customer proposal closed signed','Executed when a customer proposal is closed signed','propal',2); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('PROPAL_CLOSE_REFUSED','Customer proposal closed refused','Executed when a customer proposal is closed refused','propal',2); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('BILL_SUPPLIER_CANCELED','Supplier invoice cancelled','Executed when a supplier invoice is cancelled','invoice_supplier',17); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('MEMBER_MODIFY','Member modified','Executed when a member is modified','member',24); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('TASK_CREATE','Task created','Executed when a project task is created','project',35); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('TASK_MODIFY','Task modified','Executed when a project task is modified','project',36); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('TASK_DELETE','Task deleted','Executed when a project task is deleted','project',37); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('FICHINTER_CLASSIFY_BILLED','Classify intervention as billed','Executed when a intervention is classified as billed (when option FICHINTER_DISABLE_DETAILS is set)','ficheinter',19); 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 707772e8981..86e290552c9 100644 --- a/htdocs/install/mysql/migration/3.6.0-3.7.0.sql +++ b/htdocs/install/mysql/migration/3.6.0-3.7.0.sql @@ -20,6 +20,7 @@ ALTER TABLE llx_c_paiement ADD COLUMN accountancy_code varchar(32) DEFAULT NULL AFTER active; +insert into llx_c_action_trigger (rowid,code,label,description,elementtype,rang) values (29,'FICHINTER_CLASSIFY_BILLED','Classify intervention as billed','Executed when a intervention is classified as billed (when option FICHINTER_DISABLE_DETAILS is set)','ficheinter',19); ALTER TABLE llx_accountingaccount add column entity integer DEFAULT 1 NOT NULL AFTER rowid; ALTER TABLE llx_accountingaccount add column datec datetime NOT NULL AFTER entity; diff --git a/htdocs/install/mysql/tables/llx_c_action_trigger.sql b/htdocs/install/mysql/tables/llx_c_action_trigger.sql index 26f46c6ff8f..fa8052d77f9 100644 --- a/htdocs/install/mysql/tables/llx_c_action_trigger.sql +++ b/htdocs/install/mysql/tables/llx_c_action_trigger.sql @@ -14,6 +14,9 @@ -- You should have received a copy of the GNU General Public License -- along with this program. If not, see . -- +-- This table is a list of all available possible automatic actions +-- It is read only by admin page to select action code and save them +-- into llx_const with name MAIN_AGENDA_ACTIONAUTO_XXX_YYY. -- =================================================================== create table llx_c_action_trigger @@ -24,5 +27,4 @@ create table llx_c_action_trigger description varchar(255), elementtype varchar(16) NOT NULL, rang integer DEFAULT 0 - )ENGINE=innodb; diff --git a/htdocs/langs/en_US/agenda.lang b/htdocs/langs/en_US/agenda.lang index fcee3d669cf..347e2b5fb59 100644 --- a/htdocs/langs/en_US/agenda.lang +++ b/htdocs/langs/en_US/agenda.lang @@ -58,6 +58,7 @@ SupplierInvoiceSentByEMail=Supplier invoice %s sent by EMail ShippingSentByEMail=Shipping %s sent by EMail ShippingValidated= Shipping %s validated InterventionSentByEMail=Intervention %s sent by EMail +InterventionClassifiedBilled=Intervention %s classified as Billed NewCompanyToDolibarr= Third party created DateActionPlannedStart= Planned start date DateActionPlannedEnd= Planned end date From f29eeceb1a59b360715f89dd6f009c4b88e1dcb1 Mon Sep 17 00:00:00 2001 From: frederic34 Date: Sun, 6 Jul 2014 20:49:34 +0200 Subject: [PATCH 099/258] Select bank account for propal and order --- htdocs/comm/propal.php | 32 ++++++++++++++++++- htdocs/comm/propal/class/propal.class.php | 5 +++ htdocs/commande/class/commande.class.php | 7 ++++- htdocs/commande/fiche.php | 35 ++++++++++++++++++++- htdocs/core/class/commonobject.class.php | 34 ++++++++++++++++++++ htdocs/core/class/html.form.class.php | 38 +++++++++++++++++++++++ 6 files changed, 148 insertions(+), 3 deletions(-) diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php index 059af63b708..caf27c0aced 100644 --- a/htdocs/comm/propal.php +++ b/htdocs/comm/propal.php @@ -254,6 +254,7 @@ else if ($action == 'add' && $user->rights->propal->creer) { $object->duree_validite = $duration; $object->cond_reglement_id = GETPOST('cond_reglement_id'); $object->mode_reglement_id = GETPOST('mode_reglement_id'); + $object->fk_account = GETPOST('fk_account', 'int'); $object->remise_percent = GETPOST('remise_percent'); $object->remise_absolue = GETPOST('remise_absolue'); $object->socid = GETPOST('socid'); @@ -279,7 +280,7 @@ else if ($action == 'add' && $user->rights->propal->creer) { $object->duree_validite = GETPOST('duree_validite'); $object->cond_reglement_id = GETPOST('cond_reglement_id'); $object->mode_reglement_id = GETPOST('mode_reglement_id'); - + $object->fk_account = GETPOST('fk_account', 'int'); $object->contactid = GETPOST('contactidp'); $object->fk_project = GETPOST('projectid'); $object->modelpdf = GETPOST('model'); @@ -1104,6 +1105,11 @@ else if ($action == 'setmode' && $user->rights->propal->creer) { $result = $object->setPaymentMethods(GETPOST('mode_reglement_id', 'int')); } +// bank account +else if ($action == 'setbankaccount' && $user->rights->propal->creer) { + $result=$object->setBankAccount(GETPOST('fk_account', 'int')); +} + /* * Ordonnancement des lignes */ @@ -1368,6 +1374,11 @@ if ($action == 'create') { $form->select_types_paiements($soc->mode_reglement_id, 'mode_reglement_id'); print ''; + // Bank Account + print '' . $langs->trans('BankAccount') . ''; + $form->select_comptes($fk_account, 'fk_account', 0, '', 1); + print ''; + // What trigger creation print '' . $langs->trans('Source') . ''; $form->selectInputReason('', 'demand_reason_id', "SRC_PROP", 1); @@ -1965,6 +1976,25 @@ if ($action == 'create') { } } } + // Bank Account + print ''; + print ''; + print '
'; + print $langs->trans('BankAccount'); + print ''; + if (($action != 'editbankaccount') && $user->rights->propal->creer && ! empty($object->brouillon)) + print 'id.'">'.img_edit($langs->trans('SetBankAccount'),1).'
'; + print ''; + if ($action == 'editbankaccount') + { + $form->form_select_comptes($_SERVER['PHP_SELF'].'?id='.$object->id, $object->fk_account, 'fk_account', 1); + } + else + { + $form->form_select_comptes($_SERVER['PHP_SELF'].'?id='.$object->id, $object->fk_account, 'none'); + } + print ""; + print ''; // Amount HT print '' . $langs->trans('AmountHT') . ''; diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index 7f2ebf1de4b..a2d4d90f6c7 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -79,6 +79,7 @@ class Propal extends CommonObject var $cond_reglement_id; var $cond_reglement_code; + var $fk_account; // Id of bank account var $mode_reglement_id; var $mode_reglement_code; var $remise; @@ -714,6 +715,7 @@ class Propal extends CommonObject $sql.= ", fin_validite"; $sql.= ", fk_cond_reglement"; $sql.= ", fk_mode_reglement"; + $sql.= ", fk_account"; $sql.= ", ref_client"; $sql.= ", date_livraison"; $sql.= ", fk_availability"; @@ -739,6 +741,7 @@ class Propal extends CommonObject $sql.= ", ".($this->fin_validite!=''?"'".$this->db->idate($this->fin_validite)."'":"null"); $sql.= ", ".$this->cond_reglement_id; $sql.= ", ".$this->mode_reglement_id; + $sql.= ", ".($this->fk_account>0?$this->fk_account:'NULL'); $sql.= ", '".$this->db->escape($this->ref_client)."'"; $sql.= ", ".($this->date_livraison!=''?"'".$this->db->idate($this->date_livraison)."'":"null"); $sql.= ", ".$this->availability_id; @@ -1056,6 +1059,7 @@ class Propal extends CommonObject $sql.= ", p.fk_input_reason"; $sql.= ", p.fk_cond_reglement"; $sql.= ", p.fk_mode_reglement"; + $sql.= ', p.fk_account'; $sql.= ", c.label as statut_label"; $sql.= ", ca.code as availability_code, ca.label as availability"; $sql.= ", dr.code as demand_reason_code, dr.label as demand_reason"; @@ -1120,6 +1124,7 @@ class Propal extends CommonObject $this->mode_reglement_id = $obj->fk_mode_reglement; $this->mode_reglement_code = $obj->mode_reglement_code; $this->mode_reglement = $obj->mode_reglement; + $this->fk_account = ($obj->fk_account>0)?$obj->fk_account:null; $this->cond_reglement_id = $obj->fk_cond_reglement; $this->cond_reglement_code = $obj->cond_reglement_code; $this->cond_reglement = $obj->cond_reglement; diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index 472b46ce925..b6d06abf368 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -60,6 +60,7 @@ class Commande extends CommonOrder var $brouillon; var $cond_reglement_id; var $cond_reglement_code; + var $fk_account; var $mode_reglement_id; var $mode_reglement_code; var $availability_id; @@ -658,7 +659,7 @@ class Commande extends CommonOrder $sql = "INSERT INTO ".MAIN_DB_PREFIX."commande ("; $sql.= " ref, fk_soc, date_creation, fk_user_author, fk_projet, date_commande, source, note_private, note_public, ref_client, ref_int"; - $sql.= ", model_pdf, fk_cond_reglement, fk_mode_reglement, fk_availability, fk_input_reason, date_livraison, fk_delivery_address"; + $sql.= ", model_pdf, fk_cond_reglement, fk_mode_reglement, fk_account, fk_availability, fk_input_reason, date_livraison, fk_delivery_address"; $sql.= ", remise_absolue, remise_percent"; $sql.= ", entity"; $sql.= ")"; @@ -673,6 +674,7 @@ class Commande extends CommonOrder $sql.= ", '".$this->modelpdf."'"; $sql.= ", ".($this->cond_reglement_id>0?"'".$this->cond_reglement_id."'":"null"); $sql.= ", ".($this->mode_reglement_id>0?"'".$this->mode_reglement_id."'":"null"); + $sql.= ", ".($this->fk_account>0?$this->fk_account:'NULL'); $sql.= ", ".($this->availability_id>0?"'".$this->availability_id."'":"null"); $sql.= ", ".($this->demand_reason_id>0?"'".$this->demand_reason_id."'":"null"); $sql.= ", ".($this->date_livraison?"'".$this->db->idate($this->date_livraison)."'":"null"); @@ -986,6 +988,7 @@ class Commande extends CommonOrder $this->fk_project = $object->fk_project; $this->cond_reglement_id = $object->cond_reglement_id; $this->mode_reglement_id = $object->mode_reglement_id; + $this->fk_account = $object->fk_account; $this->availability_id = $object->availability_id; $this->demand_reason_id = $object->demand_reason_id; $this->date_livraison = $object->date_livraison; @@ -1329,6 +1332,7 @@ class Commande extends CommonOrder $sql = 'SELECT c.rowid, c.date_creation, c.ref, c.fk_soc, c.fk_user_author, c.fk_statut'; $sql.= ', c.amount_ht, c.total_ht, c.total_ttc, c.tva as total_tva, c.localtax1 as total_localtax1, c.localtax2 as total_localtax2, c.fk_cond_reglement, c.fk_mode_reglement, c.fk_availability, c.fk_input_reason'; + $sql.= ', c.fk_account'; $sql.= ', c.date_commande'; $sql.= ', c.date_livraison'; $sql.= ', c.fk_projet, c.remise_percent, c.remise, c.remise_absolue, c.source, c.facture as billed'; @@ -1388,6 +1392,7 @@ class Commande extends CommonOrder $this->cond_reglement_code = $obj->cond_reglement_code; $this->cond_reglement = $obj->cond_reglement_libelle; $this->cond_reglement_doc = $obj->cond_reglement_libelle_doc; + $this->fk_account = $obj->fk_account; $this->availability_id = $obj->fk_availability; $this->availability_code = $obj->availability_code; $this->demand_reason_id = $obj->fk_input_reason; diff --git a/htdocs/commande/fiche.php b/htdocs/commande/fiche.php index 8b1d6ec9ae3..b2f331b051f 100644 --- a/htdocs/commande/fiche.php +++ b/htdocs/commande/fiche.php @@ -227,6 +227,7 @@ else if ($action == 'add' && $user->rights->commande->creer) { $object->modelpdf = GETPOST('model'); $object->cond_reglement_id = GETPOST('cond_reglement_id'); $object->mode_reglement_id = GETPOST('mode_reglement_id'); + $object->fk_account = GETPOST('fk_account', 'int'); $object->availability_id = GETPOST('availability_id'); $object->demand_reason_id = GETPOST('demand_reason_id'); $object->date_livraison = $datelivraison; @@ -488,6 +489,11 @@ else if ($action == 'setconditions' && $user->rights->commande->creer) { } } +// bank account +else if ($action == 'setbankaccount' && $user->rights->propal->creer) { + $result=$object->setBankAccount(GETPOST('fk_account', 'int')); +} + else if ($action == 'setremisepercent' && $user->rights->commande->creer) { $result = $object->set_remise($user, GETPOST('remise_percent')); } @@ -1392,6 +1398,7 @@ if ($action == 'create' && $user->rights->commande->creer) { $soc = $objectsrc->client; $cond_reglement_id = (!empty($objectsrc->cond_reglement_id)?$objectsrc->cond_reglement_id:(!empty($soc->cond_reglement_id)?$soc->cond_reglement_id:1)); $mode_reglement_id = (!empty($objectsrc->mode_reglement_id)?$objectsrc->mode_reglement_id:(!empty($soc->mode_reglement_id)?$soc->mode_reglement_id:0)); + $fk_account = (!empty($objectsrc->fk_account)?$objectsrc->fk_account:(!empty($soc->fk_account)?$soc->fk_account:0)); $availability_id = (!empty($objectsrc->availability_id)?$objectsrc->availability_id:(!empty($soc->availability_id)?$soc->availability_id:0)); $demand_reason_id = (!empty($objectsrc->demand_reason_id)?$objectsrc->demand_reason_id:(!empty($soc->demand_reason_id)?$soc->demand_reason_id:0)); $remise_percent = (!empty($objectsrc->remise_percent)?$objectsrc->remise_percent:(!empty($soc->remise_percent)?$soc->remise_percent:0)); @@ -1411,6 +1418,7 @@ if ($action == 'create' && $user->rights->commande->creer) { { $cond_reglement_id = $soc->cond_reglement_id; $mode_reglement_id = $soc->mode_reglement_id; + $fk_account = $soc->fk_account; $availability_id = $soc->availability_id; $demand_reason_id = $soc->demand_reason_id; $remise_percent = $soc->remise_percent; @@ -1506,6 +1514,11 @@ if ($action == 'create' && $user->rights->commande->creer) { $form->select_types_paiements($mode_reglement_id, 'mode_reglement_id'); print ''; + // Bank Account + print '' . $langs->trans('BankAccount') . ''; + $form->select_comptes($fk_account, 'fk_account', 0, '', 1); + print ''; + // Delivery delay print '' . $langs->trans('AvailabilityPeriod') . ''; $form->selectAvailabilityDelay($availability_id, 'availability_id', '', 1); @@ -2120,7 +2133,27 @@ if ($action == 'create' && $user->rights->commande->creer) { if ($mysoc->localtax2_assuj == "1" || $object->total_localtax2 != 0) $rowspan ++; - // Total HT + // Bank Account + print ''; + print ''; + print '
'; + print $langs->trans('BankAccount'); + print ''; + if (($action != 'editbankaccount') && $user->rights->commande->creer && ! empty($object->brouillon)) + print 'id.'">'.img_edit($langs->trans('SetBankAccount'),1).'
'; + print ''; + if ($action == 'editbankaccount') + { + $form->form_select_comptes($_SERVER['PHP_SELF'].'?id='.$object->id, $object->fk_account, 'fk_account', 1); + } + else + { + $form->form_select_comptes($_SERVER['PHP_SELF'].'?id='.$object->id, $object->fk_account, 'none'); + } + print ""; + print ''; + + // Total HT print '' . $langs->trans('AmountHT') . ''; print '' . price($object->total_ht, 1, '', 1, - 1, - 1, $conf->currency) . ''; diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index c06c43eb4a4..44554d39180 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -1079,6 +1079,40 @@ abstract class CommonObject } + /** + * Change the bank account + * + * @param int $fk_account Id of bank account + * @return int 1 if OK, 0 if KO + */ + function setBankAccount($fk_account) + { + if (! $this->table_element) + { + dol_syslog(get_class($this)."::setBankAccount was called on objet with property table_element not defined",LOG_ERR); + return -1; + } + if ($fk_account<0) $fk_account='NULL'; + dol_syslog(get_class($this).'::setBankAccount('.$fk_account.')'); + + $sql = "UPDATE ".MAIN_DB_PREFIX.$this->table_element; + $sql.= " SET fk_account = ".$fk_account; + $sql.= " WHERE rowid=".$this->id; + + if ($this->db->query($sql)) + { + $this->fk_account = ($fk_account=='NULL')?null:$fk_account; + return 1; + } + else + { + dol_syslog(get_class($this).'::setBankAccount Error '.$sql.' - '.$this->db->error()); + $this->error=$this->db->error(); + return 0; + } + } + + /** * Save a new position (field rang) for details lines. * You can choose to set position for lines with already a position or lines without any position defined. diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 1e7f0bb8246..cdc7294c302 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -2480,6 +2480,44 @@ class Form } } + /** + * Display form to select bank account + * + * @param string $page Page + * @param int $selected Id of bank account + * @param string $htmlname Name of select html field + * @param int $addempty 1=Add an empty value in list, 2=Add an empty value in list only if there is more than 2 entries. + * @return void + */ + function form_select_comptes($page, $selected='', $htmlname='fk_account', $addempty=0) + { + global $langs; + if ($htmlname != "none") + { + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print '
'; + $this->select_comptes($selected, $htmlname, 0, '', $addempty); + print '
'; + } + else + { + if ($selected) + { + require_once DOL_DOCUMENT_ROOT .'/compta/bank/class/account.class.php'; + $bankstatic=new Account($this->db); + $bankstatic->fetch($selected); + print $bankstatic->label.' ('.$bankstatic->currency_code.')'; + } else { + print " "; + } + } + } + /** * Return list of categories having choosed type * From 8ed079893960c992793a1d2ca3f0e28adeb5aca9 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 6 Jul 2014 20:53:38 +0200 Subject: [PATCH 100/258] Use id of module + delta --- dev/skeletons/modMyModule.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev/skeletons/modMyModule.class.php b/dev/skeletons/modMyModule.class.php index bdeb61a7821..4c09e379d9b 100644 --- a/dev/skeletons/modMyModule.class.php +++ b/dev/skeletons/modMyModule.class.php @@ -173,7 +173,7 @@ class modMyModule extends DolibarrModules // Add here list of permission defined by an id, a label, a boolean and two constant strings. // Example: - // $this->rights[$r][0] = 2000; // Permission id (must not be already used) + // $this->rights[$r][0] = $this->numero + $r; // Permission id (must not be already used) // $this->rights[$r][1] = 'Permision label'; // Permission label // $this->rights[$r][3] = 1; // Permission by default for new user (0/1) // $this->rights[$r][4] = 'level1'; // In php code, permission will be checked by test if ($user->rights->permkey->level1->level2) From f43dd6c8343aae07adc97fcd07cee1d22439e566 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 6 Jul 2014 21:12:16 +0200 Subject: [PATCH 101/258] Fix: form is not allowed inside a table --- htdocs/fichinter/fiche.php | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/htdocs/fichinter/fiche.php b/htdocs/fichinter/fiche.php index 6ed1bbb2f59..1ef819ae349 100644 --- a/htdocs/fichinter/fiche.php +++ b/htdocs/fichinter/fiche.php @@ -50,6 +50,7 @@ if (! empty($conf->global->FICHEINTER_ADDON) && is_readable(DOL_DOCUMENT_ROOT ." require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; +$langs->load("bills"); $langs->load("companies"); $langs->load("interventions"); @@ -1143,6 +1144,13 @@ else if ($id > 0 || ! empty($ref)) } + print '
'; + print ''; + if ($action == 'edit_extras') print ''; + if ($action == 'contrat') print ''; + + print ''; + print ''; $linkback = ''.$langs->trans("BackToList").''; @@ -1218,9 +1226,6 @@ else if ($id > 0 || ! empty($ref)) print '
'; if ($action == 'contrat') { - print ''; - print ''; - print ''; print ''; print ''; print ''; - print '
'; $htmlcontract= new Formcontract($db); @@ -1229,7 +1234,7 @@ else if ($id > 0 || ! empty($ref)) print '
'; + print '
'; } else { @@ -1280,16 +1285,11 @@ else if ($id > 0 || ! empty($ref)) } if ($action == 'edit_extras' && $user->rights->ficheinter->creer && GETPOST('attribute') == $key) { - print '
'; - print ''; print ''; - print ''; - print ''; print $extrafields->showInputField($key,$value); print ''; - print '
'; } else { @@ -1302,6 +1302,7 @@ else if ($id > 0 || ! empty($ref)) } print ""; + print ''; if (! empty($conf->global->MAIN_DISABLE_CONTACTS_TAB)) { From 56c067f15c5e70eabbf34a63007b4036e0a461bd Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 6 Jul 2014 21:16:27 +0200 Subject: [PATCH 102/258] Fix: form is not allowed inside a table Conflicts: htdocs/fichinter/fiche.php --- htdocs/fichinter/fiche.php | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/htdocs/fichinter/fiche.php b/htdocs/fichinter/fiche.php index 551aa7b94a5..fcd03755136 100644 --- a/htdocs/fichinter/fiche.php +++ b/htdocs/fichinter/fiche.php @@ -50,6 +50,7 @@ if (! empty($conf->global->FICHEINTER_ADDON) && is_readable(DOL_DOCUMENT_ROOT ." require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; +$langs->load("bills"); $langs->load("companies"); $langs->load("interventions"); @@ -1143,6 +1144,13 @@ else if ($id > 0 || ! empty($ref)) } + print '
'; + print ''; + if ($action == 'edit_extras') print ''; + if ($action == 'contrat') print ''; + + print ''; + print ''; $linkback = ''.$langs->trans("BackToList").''; @@ -1218,9 +1226,6 @@ else if ($id > 0 || ! empty($ref)) print '
'; if ($action == 'contrat') { - print ''; - print ''; - print ''; print ''; print ''; print ''; - print '
'; $htmlcontract= new Formcontract($db); @@ -1229,7 +1234,7 @@ else if ($id > 0 || ! empty($ref)) print '
'; + print '
'; } else { @@ -1280,16 +1285,11 @@ else if ($id > 0 || ! empty($ref)) } if ($action == 'edit_extras' && $user->rights->ficheinter->creer && GETPOST('attribute') == $key) { - print '
'; - print ''; print ''; - print ''; - print ''; print $extrafields->showInputField($key,$value); print ''; - print '
'; } else { @@ -1302,6 +1302,7 @@ else if ($id > 0 || ! empty($ref)) } print "
"; + print ''; if (! empty($conf->global->MAIN_DISABLE_CONTACTS_TAB)) { From 1a2ed2138bb7ec42bc83fd3ca8744ee660197574 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 6 Jul 2014 21:25:25 +0200 Subject: [PATCH 103/258] New: Add new type of event (when type of events are used, not by default) --- ChangeLog | 2 ++ htdocs/install/mysql/data/llx_c_actioncomm.sql | 1 + htdocs/install/mysql/migration/3.6.0-3.7.0.sql | 2 ++ htdocs/langs/en_US/commercial.lang | 1 + 4 files changed, 6 insertions(+) diff --git a/ChangeLog b/ChangeLog index 864fb7fba21..941e2de7afc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -15,6 +15,8 @@ For users: shown on main product card. - New: Add event FICHINTER_CLASSIFY_BILLED into list of possible events to create an automatic event into agenda. +- New: Add new type of event (when type of events are used, not by + default) - Fix: [ bug #1487 ] PAYMENT_DELETE trigger does not intercept trigger action - Fix: [ bug #1470, #1472, #1473] User trigger problem - Fix: [ bug #1489, #1491 ] Intervention trigger problem diff --git a/htdocs/install/mysql/data/llx_c_actioncomm.sql b/htdocs/install/mysql/data/llx_c_actioncomm.sql index 43c00faba6a..2b84ee6ff82 100644 --- a/htdocs/install/mysql/data/llx_c_actioncomm.sql +++ b/htdocs/install/mysql/data/llx_c_actioncomm.sql @@ -36,6 +36,7 @@ insert into llx_c_actioncomm (id, code, type, libelle, module, active, position) insert into llx_c_actioncomm (id, code, type, libelle, module, active, position) values ( 2,'AC_FAX','system','Send Fax',NULL, 1, 3); insert into llx_c_actioncomm (id, code, type, libelle, module, active, position) values ( 4,'AC_EMAIL','system','Send Email',NULL, 1, 4); insert into llx_c_actioncomm (id, code, type, libelle, module, active, position) values ( 5,'AC_RDV','system','Rendez-vous',NULL, 1, 1); +insert into llx_c_actioncomm (id, code, type, libelle, module, active, position) values (11,'AC_INT','system','Intervention on site',NULL, 1, 4); -- Code kept for backward compatibility < 3.3 insert into llx_c_actioncomm (id, code, type, libelle, module, active, position) values ( 3,'AC_PROP','systemauto', 'Send commercial proposal by email','propal',0,10); insert into llx_c_actioncomm (id, code, type, libelle, module, active, position) values ( 8,'AC_COM','systemauto','Send customer order by email','order', 0,8); 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 86e290552c9..a717662c43f 100644 --- a/htdocs/install/mysql/migration/3.6.0-3.7.0.sql +++ b/htdocs/install/mysql/migration/3.6.0-3.7.0.sql @@ -22,6 +22,8 @@ ALTER TABLE llx_c_paiement ADD COLUMN accountancy_code varchar(32) DEFAULT NULL insert into llx_c_action_trigger (rowid,code,label,description,elementtype,rang) values (29,'FICHINTER_CLASSIFY_BILLED','Classify intervention as billed','Executed when a intervention is classified as billed (when option FICHINTER_DISABLE_DETAILS is set)','ficheinter',19); +insert into llx_c_actioncomm (id, code, type, libelle, module, active, position) values (11,'AC_INT','system','Intervention on site',NULL, 1, 4); + ALTER TABLE llx_accountingaccount add column entity integer DEFAULT 1 NOT NULL AFTER rowid; ALTER TABLE llx_accountingaccount add column datec datetime NOT NULL AFTER entity; ALTER TABLE llx_accountingaccount add column tms timestamp AFTER datec; diff --git a/htdocs/langs/en_US/commercial.lang b/htdocs/langs/en_US/commercial.lang index a863cf37b17..e7d2de76503 100644 --- a/htdocs/langs/en_US/commercial.lang +++ b/htdocs/langs/en_US/commercial.lang @@ -71,6 +71,7 @@ ActionAC_FAX=Send fax ActionAC_PROP=Send proposal by mail ActionAC_EMAIL=Send Email ActionAC_RDV=Meetings +ActionAC_INT=Intervention on site ActionAC_FAC=Send customer invoice by mail ActionAC_REL=Send customer invoice by mail (reminder) ActionAC_CLO=Close From 96ec3ad7f4b0e5ddbc457a3720df97773ef75b6f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 7 Jul 2014 00:14:24 +0200 Subject: [PATCH 104/258] Fix: Allow percent to solve presentation pb by some pages. --- htdocs/core/class/doleditor.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/class/doleditor.class.php b/htdocs/core/class/doleditor.class.php index d02f26e57a4..23fb8193fb9 100644 --- a/htdocs/core/class/doleditor.class.php +++ b/htdocs/core/class/doleditor.class.php @@ -60,7 +60,7 @@ class DolEditor * @param int $uselocalbrowser Enabled to add links to local object with local browser. If false, only external images can be added in content. * @param int $okforextendededitor True=Allow usage of extended editor tool (like fckeditor) * @param int $rows Size of rows for textarea tool - * @param int $cols Size of cols for textarea tool + * @param int $cols Size of cols for textarea tool (textarea number of cols or %) * @param int $readonly 0=Read/Edit, 1=Read only */ function __construct($htmlname,$content,$width='',$height=200,$toolbarname='Basic',$toolbarlocation='In',$toolbarstartexpanded=false,$uselocalbrowser=true,$okforextendededitor=true,$rows=0,$cols=0,$readonly=0) @@ -129,7 +129,7 @@ class DolEditor $this->toolbarname = $shorttoolbarname; $this->toolbarstartexpanded = $toolbarstartexpanded; $this->rows = max(ROWS_3,$rows); - $this->cols = max(40,$cols); + $this->cols = (preg_match('/%/',$cols)?$cols:max(40,$cols)); // If $cols is a percent, we keep it, otherwise, we take max $this->height = $height; $this->width = $width; } From 4e08e2b5d5ea05808ebb5be361777ad8abf231d6 Mon Sep 17 00:00:00 2001 From: KreizIT Date: Mon, 7 Jul 2014 11:32:56 +0200 Subject: [PATCH 105/258] Fix rollback and test errno --- htdocs/core/class/commonobject.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index c06c43eb4a4..54ad75515f7 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -229,15 +229,16 @@ abstract class CommonObject } else { - $this->db->rollback(); if ($this->db->errno() == 'DB_ERROR_RECORD_ALREADY_EXISTS') { $this->error=$this->db->errno(); + $this->db->rollback(); return -2; } else { $this->error=$this->db->error(); + $this->db->rollback(); return -1; } } From 516632e41d744d7831c23827723f776dc0a1f33e Mon Sep 17 00:00:00 2001 From: frederic34 Date: Mon, 7 Jul 2014 17:59:04 +0200 Subject: [PATCH 106/258] Select bank account for customer order --- htdocs/commande/fiche.php | 4 +-- htdocs/compta/facture.php | 35 +++++++++++++++++++ htdocs/compta/facture/class/facture.class.php | 5 +++ 3 files changed, 42 insertions(+), 2 deletions(-) diff --git a/htdocs/commande/fiche.php b/htdocs/commande/fiche.php index b2f331b051f..aeba517270b 100644 --- a/htdocs/commande/fiche.php +++ b/htdocs/commande/fiche.php @@ -490,7 +490,7 @@ else if ($action == 'setconditions' && $user->rights->commande->creer) { } // bank account -else if ($action == 'setbankaccount' && $user->rights->propal->creer) { +else if ($action == 'setbankaccount' && $user->rights->commande->creer) { $result=$object->setBankAccount(GETPOST('fk_account', 'int')); } @@ -1398,7 +1398,7 @@ if ($action == 'create' && $user->rights->commande->creer) { $soc = $objectsrc->client; $cond_reglement_id = (!empty($objectsrc->cond_reglement_id)?$objectsrc->cond_reglement_id:(!empty($soc->cond_reglement_id)?$soc->cond_reglement_id:1)); $mode_reglement_id = (!empty($objectsrc->mode_reglement_id)?$objectsrc->mode_reglement_id:(!empty($soc->mode_reglement_id)?$soc->mode_reglement_id:0)); - $fk_account = (!empty($objectsrc->fk_account)?$objectsrc->fk_account:(!empty($soc->fk_account)?$soc->fk_account:0)); + $fk_account = (! empty($objectsrc->fk_account)?$objectsrc->fk_account:(! empty($soc->fk_account)?$soc->fk_account:0)); $availability_id = (!empty($objectsrc->availability_id)?$objectsrc->availability_id:(!empty($soc->availability_id)?$soc->availability_id:0)); $demand_reason_id = (!empty($objectsrc->demand_reason_id)?$objectsrc->demand_reason_id:(!empty($soc->demand_reason_id)?$soc->demand_reason_id:0)); $remise_percent = (!empty($objectsrc->remise_percent)?$objectsrc->remise_percent:(!empty($soc->remise_percent)?$soc->remise_percent:0)); diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index e20173bf30c..1f437feaac7 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -302,6 +302,11 @@ else if ($action == 'setrevenuestamp' && $user->rights->facture->creer) { dol_print_error($db, $object->error); } +// bank account +else if ($action == 'setbankaccount' && $user->rights->facture->creer) { + $result=$object->setBankAccount(GETPOST('fk_account', 'int')); +} + else if ($action == 'setremisepercent' && $user->rights->facture->creer) { $object->fetch($id); $result = $object->set_remise($user, $_POST['remise_percent']); @@ -628,6 +633,7 @@ else if ($action == 'add' && $user->rights->facture->creer) $object->fk_project = $_POST['projectid']; $object->cond_reglement_id = $_POST['cond_reglement_id']; $object->mode_reglement_id = $_POST['mode_reglement_id']; + $object->fk_account = GETPOST('fk_account', 'int'); $object->remise_absolue = $_POST['remise_absolue']; $object->remise_percent = $_POST['remise_percent']; @@ -670,6 +676,7 @@ else if ($action == 'add' && $user->rights->facture->creer) $object->fk_project = $_POST['projectid']; $object->cond_reglement_id = 0; $object->mode_reglement_id = $_POST['mode_reglement_id']; + $object->fk_account = GETPOST('fk_account', 'int'); $object->remise_absolue = $_POST['remise_absolue']; $object->remise_percent = $_POST['remise_percent']; @@ -795,6 +802,7 @@ else if ($action == 'add' && $user->rights->facture->creer) $object->fk_project = $_POST['projectid']; $object->cond_reglement_id = ($_POST['type'] == 3?1:$_POST['cond_reglement_id']); $object->mode_reglement_id = $_POST['mode_reglement_id']; + $object->fk_account = GETPOST('fk_account', 'int'); $object->amount = $_POST['amount']; $object->remise_absolue = $_POST['remise_absolue']; $object->remise_percent = $_POST['remise_percent']; @@ -1886,6 +1894,7 @@ if ($action == 'create') $cond_reglement_id = (! empty($objectsrc->cond_reglement_id)?$objectsrc->cond_reglement_id:(! empty($soc->cond_reglement_id)?$soc->cond_reglement_id:1)); $mode_reglement_id = (! empty($objectsrc->mode_reglement_id)?$objectsrc->mode_reglement_id:(! empty($soc->mode_reglement_id)?$soc->mode_reglement_id:0)); + $fk_account = (! empty($objectsrc->fk_account)?$objectsrc->fk_account:(! empty($soc->fk_account)?$soc->fk_account:0)); $remise_percent = (! empty($objectsrc->remise_percent)?$objectsrc->remise_percent:(! empty($soc->remise_percent)?$soc->remise_percent:0)); $remise_absolue = (! empty($objectsrc->remise_absolue)?$objectsrc->remise_absolue:(! empty($soc->remise_absolue)?$soc->remise_absolue:0)); $dateinvoice = (empty($dateinvoice)?(empty($conf->global->MAIN_AUTOFILL_DATE)?-1:''):$dateinvoice); @@ -1900,6 +1909,7 @@ if ($action == 'create') { $cond_reglement_id = $soc->cond_reglement_id; $mode_reglement_id = $soc->mode_reglement_id; + $fk_account = $soc->fk_account; $remise_percent = $soc->remise_percent; $remise_absolue = 0; $dateinvoice = (empty($dateinvoice)?(empty($conf->global->MAIN_AUTOFILL_DATE)?-1:''):$dateinvoice); // Do not set 0 here (0 for a date is 1970) @@ -2215,6 +2225,11 @@ if ($action == 'create') $form->select_types_paiements(isset($_POST['mode_reglement_id']) ? $_POST['mode_reglement_id'] : $mode_reglement_id, 'mode_reglement_id'); print ''; + // Bank Account + print '' . $langs->trans('BankAccount') . ''; + $form->select_comptes($fk_account, 'fk_account', 0, '', 1); + print ''; + // Project if (! empty($conf->projet->enabled) && $socid > 0) { $formproject = new FormProjets($db); @@ -3166,6 +3181,26 @@ if ($action == 'create') } print ''; + // Bank Account + print ''; + print ''; + print '
'; + print $langs->trans('BankAccount'); + print ''; + if (($action != 'editbankaccount') && $user->rights->commande->creer && ! empty($object->brouillon)) + print 'id.'">'.img_edit($langs->trans('SetBankAccount'),1).'
'; + print ''; + if ($action == 'editbankaccount') + { + $form->form_select_comptes($_SERVER['PHP_SELF'].'?id='.$object->id, $object->fk_account, 'fk_account', 1); + } + else + { + $form->form_select_comptes($_SERVER['PHP_SELF'].'?id='.$object->id, $object->fk_account, 'none'); + } + print ""; + print ''; + // Amount print '' . $langs->trans('AmountHT') . ''; print '' . price($object->total_ht, 1, '', 1, - 1, - 1, $conf->currency) . ''; diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index 7ef7162e985..1cfb5fe3725 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -103,6 +103,7 @@ class Facture extends CommonInvoice var $cond_reglement_code; // Code in llx_c_paiement var $mode_reglement_id; // Id in llx_c_paiement var $mode_reglement_code; // Code in llx_c_paiement + var $fk_account; // Id of bank account var $fk_bank; // Field to store bank id to use when payment mode is withdraw var $modelpdf; var $products=array(); // deprecated @@ -239,6 +240,7 @@ class Facture extends CommonInvoice $sql.= ", note_private"; $sql.= ", note_public"; $sql.= ", ref_client, ref_int"; + $sql.= ", fk_account"; $sql.= ", fk_facture_source, fk_user_author, fk_projet"; $sql.= ", fk_cond_reglement, fk_mode_reglement, date_lim_reglement, model_pdf"; $sql.= ")"; @@ -256,6 +258,7 @@ class Facture extends CommonInvoice $sql.= ",".($this->note_public?"'".$this->db->escape($this->note_public)."'":"null"); $sql.= ",".($this->ref_client?"'".$this->db->escape($this->ref_client)."'":"null"); $sql.= ",".($this->ref_int?"'".$this->db->escape($this->ref_int)."'":"null"); + $sql.= ", ".($this->fk_account>0?$this->fk_account:'NULL'); $sql.= ",".($this->fk_facture_source?"'".$this->db->escape($this->fk_facture_source)."'":"null"); $sql.= ",".($user->id > 0 ? "'".$user->id."'":"null"); $sql.= ",".($this->fk_project?$this->fk_project:"null"); @@ -834,6 +837,7 @@ class Facture extends CommonInvoice $sql.= ', f.note_private, f.note_public, f.fk_statut, f.paye, f.close_code, f.close_note, f.fk_user_author, f.fk_user_valid, f.model_pdf'; $sql.= ', f.fk_facture_source'; $sql.= ', f.fk_mode_reglement, f.fk_cond_reglement, f.fk_projet, f.extraparams'; + $sql.= ', f.fk_account'; $sql.= ', p.code as mode_reglement_code, p.libelle as mode_reglement_libelle'; $sql.= ', c.code as cond_reglement_code, c.libelle as cond_reglement_libelle, c.libelle_facture as cond_reglement_libelle_doc'; $sql.= ' FROM '.MAIN_DB_PREFIX.'facture as f'; @@ -884,6 +888,7 @@ class Facture extends CommonInvoice $this->cond_reglement_code = $obj->cond_reglement_code; $this->cond_reglement = $obj->cond_reglement_libelle; $this->cond_reglement_doc = $obj->cond_reglement_libelle_doc; + $this->fk_account = ($obj->fk_account>0)?$obj->fk_account:null; $this->fk_project = $obj->fk_projet; $this->fk_facture_source = $obj->fk_facture_source; $this->note = $obj->note_private; // deprecated From 83d3af9bf8162468e6ea879dd0169fb83b3fec30 Mon Sep 17 00:00:00 2001 From: frederic34 Date: Mon, 7 Jul 2014 18:25:20 +0200 Subject: [PATCH 107/258] Select account for payment --- htdocs/compta/facture.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index 1f437feaac7..a92f189fd3a 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -3463,7 +3463,7 @@ if ($action == 'create') if ($resteapayer == 0) { print '
' . $langs->trans('DoPayment') . '
'; } else { - print ''; + print ''; } } } From 9949713d2043803bdf99758caf0f560cdf28768a Mon Sep 17 00:00:00 2001 From: frederic34 Date: Mon, 7 Jul 2014 18:40:18 +0200 Subject: [PATCH 108/258] Some cleaning --- htdocs/comm/propal.php | 32 +++++++++++------------- htdocs/commande/fiche.php | 9 +++---- htdocs/core/class/commonobject.class.php | 10 +++----- 3 files changed, 21 insertions(+), 30 deletions(-) diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php index caf27c0aced..994894f2b4c 100644 --- a/htdocs/comm/propal.php +++ b/htdocs/comm/propal.php @@ -1976,25 +1976,23 @@ if ($action == 'create') { } } } - // Bank Account - print ''; - print '"; - print ''; + print '
'; - print $langs->trans('BankAccount'); - print ''; + + // Bank Account + print '
'; + print ''; - print '
'; + print $langs->trans('BankAccount'); + print ''; if (($action != 'editbankaccount') && $user->rights->propal->creer && ! empty($object->brouillon)) print 'id.'">'.img_edit($langs->trans('SetBankAccount'),1).'
'; - print '
'; - if ($action == 'editbankaccount') - { - $form->form_select_comptes($_SERVER['PHP_SELF'].'?id='.$object->id, $object->fk_account, 'fk_account', 1); - } - else - { - $form->form_select_comptes($_SERVER['PHP_SELF'].'?id='.$object->id, $object->fk_account, 'none'); - } - print "
'; + print ''; + if ($action == 'editbankaccount') { + $form->form_select_comptes($_SERVER['PHP_SELF'].'?id='.$object->id, $object->fk_account, 'fk_account', 1); + } else { + $form->form_select_comptes($_SERVER['PHP_SELF'].'?id='.$object->id, $object->fk_account, 'none'); + } + print ''; + print ''; // Amount HT print '' . $langs->trans('AmountHT') . ''; diff --git a/htdocs/commande/fiche.php b/htdocs/commande/fiche.php index aeba517270b..58fede8e275 100644 --- a/htdocs/commande/fiche.php +++ b/htdocs/commande/fiche.php @@ -2142,15 +2142,12 @@ if ($action == 'create' && $user->rights->commande->creer) { print 'id.'">'.img_edit($langs->trans('SetBankAccount'),1).''; print ''; print ''; - if ($action == 'editbankaccount') - { + if ($action == 'editbankaccount') { $form->form_select_comptes($_SERVER['PHP_SELF'].'?id='.$object->id, $object->fk_account, 'fk_account', 1); - } - else - { + } else { $form->form_select_comptes($_SERVER['PHP_SELF'].'?id='.$object->id, $object->fk_account, 'none'); } - print ""; + print ''; print ''; // Total HT diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 44554d39180..fd6f83564ad 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -1087,8 +1087,7 @@ abstract class CommonObject */ function setBankAccount($fk_account) { - if (! $this->table_element) - { + if (! $this->table_element) { dol_syslog(get_class($this)."::setBankAccount was called on objet with property table_element not defined",LOG_ERR); return -1; } @@ -1099,13 +1098,10 @@ abstract class CommonObject $sql.= " SET fk_account = ".$fk_account; $sql.= " WHERE rowid=".$this->id; - if ($this->db->query($sql)) - { + if ($this->db->query($sql)) { $this->fk_account = ($fk_account=='NULL')?null:$fk_account; return 1; - } - else - { + } else { dol_syslog(get_class($this).'::setBankAccount Error '.$sql.' - '.$this->db->error()); $this->error=$this->db->error(); return 0; From 8e612b532a8aaeab33846537e4969e73d0a05e1f Mon Sep 17 00:00:00 2001 From: frederic34 Date: Mon, 7 Jul 2014 18:44:08 +0200 Subject: [PATCH 109/258] Use & instead & --- htdocs/compta/facture.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index a92f189fd3a..b01b6c5dfaa 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -3463,7 +3463,7 @@ if ($action == 'create') if ($resteapayer == 0) { print '
' . $langs->trans('DoPayment') . '
'; } else { - print ''; + print ''; } } } From 0cb5220d4db0c0684f765f26e9e04b288d41c220 Mon Sep 17 00:00:00 2001 From: frederic34 Date: Mon, 7 Jul 2014 20:54:41 +0200 Subject: [PATCH 110/258] Use english for the function name --- htdocs/comm/propal.php | 4 ++-- htdocs/commande/fiche.php | 4 ++-- htdocs/compta/facture.php | 4 ++-- htdocs/core/class/html.form.class.php | 12 ++++-------- 4 files changed, 10 insertions(+), 14 deletions(-) diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php index 994894f2b4c..7ce92a5b569 100644 --- a/htdocs/comm/propal.php +++ b/htdocs/comm/propal.php @@ -1987,9 +1987,9 @@ if ($action == 'create') { print ''; print ''; if ($action == 'editbankaccount') { - $form->form_select_comptes($_SERVER['PHP_SELF'].'?id='.$object->id, $object->fk_account, 'fk_account', 1); + $form->formSelectAccount($_SERVER['PHP_SELF'].'?id='.$object->id, $object->fk_account, 'fk_account', 1); } else { - $form->form_select_comptes($_SERVER['PHP_SELF'].'?id='.$object->id, $object->fk_account, 'none'); + $form->formSelectAccount($_SERVER['PHP_SELF'].'?id='.$object->id, $object->fk_account, 'none'); } print ''; print ''; diff --git a/htdocs/commande/fiche.php b/htdocs/commande/fiche.php index 58fede8e275..19948e3c1b7 100644 --- a/htdocs/commande/fiche.php +++ b/htdocs/commande/fiche.php @@ -2143,9 +2143,9 @@ if ($action == 'create' && $user->rights->commande->creer) { print ''; print ''; if ($action == 'editbankaccount') { - $form->form_select_comptes($_SERVER['PHP_SELF'].'?id='.$object->id, $object->fk_account, 'fk_account', 1); + $form->formSelectAccount($_SERVER['PHP_SELF'].'?id='.$object->id, $object->fk_account, 'fk_account', 1); } else { - $form->form_select_comptes($_SERVER['PHP_SELF'].'?id='.$object->id, $object->fk_account, 'none'); + $form->formSelectAccount($_SERVER['PHP_SELF'].'?id='.$object->id, $object->fk_account, 'none'); } print ''; print ''; diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index b01b6c5dfaa..29a25760886 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -3192,11 +3192,11 @@ if ($action == 'create') print ''; if ($action == 'editbankaccount') { - $form->form_select_comptes($_SERVER['PHP_SELF'].'?id='.$object->id, $object->fk_account, 'fk_account', 1); + $form->formSelectAccount($_SERVER['PHP_SELF'].'?id='.$object->id, $object->fk_account, 'fk_account', 1); } else { - $form->form_select_comptes($_SERVER['PHP_SELF'].'?id='.$object->id, $object->fk_account, 'none'); + $form->formSelectAccount($_SERVER['PHP_SELF'].'?id='.$object->id, $object->fk_account, 'none'); } print ""; print ''; diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index cdc7294c302..d1b338176a4 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -2489,11 +2489,10 @@ class Form * @param int $addempty 1=Add an empty value in list, 2=Add an empty value in list only if there is more than 2 entries. * @return void */ - function form_select_comptes($page, $selected='', $htmlname='fk_account', $addempty=0) + function formSelectAccount($page, $selected='', $htmlname='fk_account', $addempty=0) { global $langs; - if ($htmlname != "none") - { + if ($htmlname != "none") { print '
'; print ''; print ''; @@ -2503,11 +2502,8 @@ class Form print ''; print ''; print '
'; - } - else - { - if ($selected) - { + } else { + if ($selected) { require_once DOL_DOCUMENT_ROOT .'/compta/bank/class/account.class.php'; $bankstatic=new Account($this->db); $bankstatic->fetch($selected); From 9cca9f352fed18edc1e22dd595997b02b93270c7 Mon Sep 17 00:00:00 2001 From: frederic34 Date: Mon, 7 Jul 2014 21:11:03 +0200 Subject: [PATCH 111/258] Update ruleset.xml PHP code MUST NOT contain any character before the opening tag --- dev/codesniffer/ruleset.xml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/dev/codesniffer/ruleset.xml b/dev/codesniffer/ruleset.xml index 24cc4b46e7b..2b56dedb894 100755 --- a/dev/codesniffer/ruleset.xml +++ b/dev/codesniffer/ruleset.xml @@ -115,8 +115,12 @@ 0 - - + + + + + + From 07ff74b069f721e25d6681ffe06b701bbd3a532c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 8 Jul 2014 00:19:00 +0200 Subject: [PATCH 112/258] Revert "Update ruleset.xml" This reverts commit 9cca9f352fed18edc1e22dd595997b02b93270c7. --- dev/codesniffer/ruleset.xml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/dev/codesniffer/ruleset.xml b/dev/codesniffer/ruleset.xml index 5a7508aad6c..a0c085d5d67 100755 --- a/dev/codesniffer/ruleset.xml +++ b/dev/codesniffer/ruleset.xml @@ -121,12 +121,8 @@ 0 - - - - - - + + From 3c81c99656fb603e91c4e7752b8e7afb9b780d0d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 8 Jul 2014 00:29:25 +0200 Subject: [PATCH 113/258] Fix: Try to solve pb of timeout with travis. --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 081fb360bb4..24862950d7b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -100,7 +100,7 @@ script: # - phpunit -d memory_limit=-1 --configuration test/phpunit/phpunittest.xml --coverage-text test/phpunit/BuildDocTest.php # - phpunit -d memory_limit=-1 --configuration test/phpunit/phpunittest.xml test/phpunit/WebservicesOtherTest.php # - phpcs -p --warning-severity=0 -s --report-checkstyle --report-summary --standard=dev/codesniffer/ruleset.xml --tab-width=4 --ignore=/build/html/,/documents/,/includes/,/test/report/ htdocs/core/class/dolgraph.class.php - - phpcs -p --extensions=php --warning-severity=0 -s --report-checkstyle --report-summary --standard=dev/codesniffer/ruleset.xml --tab-width=4 --ignore=/build/html/,/documents/,/includes/,/test/report/ . + - phpcs -p --extensions=php --warning-severity=0 -s --report-checkstyle --report-summary --standard=dev/codesniffer/ruleset.xml --tab-width=4 --ignore=/build/html/,/documents/,/includes/,/test/report/ . 2>&1 # - phpcs -p --warning-severity=0 -s --report-summary --standard=dev/codesniffer/ruleset.xml --tab-width=4 --ignore=/build/html/,/documents/,/includes/,/test/report/ . - phpunit -d memory_limit=-1 --configuration test/phpunit/phpunittest.xml test/phpunit/AllTests.php From e8b7d36004ca4b4a1a921710a7aa45b51062e6f9 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 8 Jul 2014 00:50:05 +0200 Subject: [PATCH 114/258] Fix: Solve timeout pb. --- .travis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 2366201ce2e..1bfa8ba53d9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -97,9 +97,9 @@ script: # - phpunit -d memory_limit=-1 --configuration test/phpunit/phpunittest.xml --coverage-text test/phpunit/AllTests.php # - phpunit -d memory_limit=-1 --configuration test/phpunit/phpunittest.xml --coverage-text test/phpunit/BuildDocTest.php # - phpunit -d memory_limit=-1 --configuration test/phpunit/phpunittest.xml test/phpunit/WebservicesOtherTest.php -# - phpcs -p --warning-severity=0 -s --report-checkstyle --report-summary --standard=dev/codesniffer/ruleset.xml --tab-width=4 --ignore=/build/html/,/documents/,/includes/,/test/report/ htdocs/core/class/dolgraph.class.php - - phpcs -p --warning-severity=0 -s --report-checkstyle --report-summary --standard=dev/codesniffer/ruleset.xml --tab-width=4 --ignore=/build/html/,/documents/,/includes/,/test/report/ . -# - phpcs -p --warning-severity=0 -s --report-summary --standard=dev/codesniffer/ruleset.xml --tab-width=4 --ignore=/build/html/,/documents/,/includes/,/test/report/ . +# - phpcs -p --warning-severity=0 -s --report-checkstyle --report-summary --standard=dev/codesniffer/ruleset.xml --tab-width=4 --ignore=/build/html/,/documents/,/includes/,/test/report/ htdocs/core/class/dolgraph.class.php 2>&1 + - phpcs -p --warning-severity=0 -s --report-checkstyle --report-summary --standard=dev/codesniffer/ruleset.xml --tab-width=4 --ignore=/build/html/,/documents/,/includes/,/test/report/ . 2>&1 +# - phpcs -p --warning-severity=0 -s --report-summary --standard=dev/codesniffer/ruleset.xml --tab-width=4 --ignore=/build/html/,/documents/,/includes/,/test/report/ . 2>&1 - phpunit -d memory_limit=-1 --configuration test/phpunit/phpunittest.xml test/phpunit/AllTests.php after_script: From 6c8c23203632ddde0620c73b99f433dd069e9532 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 8 Jul 2014 00:53:15 +0200 Subject: [PATCH 115/258] Fix: Solve timeout pb. --- .travis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 26d4c64fef2..9d4c658018d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -87,9 +87,9 @@ script: # - phpunit -d memory_limit=-1 --configuration test/phpunit/phpunittest.xml --coverage-text test/phpunit/AllTests.php # - phpunit -d memory_limit=-1 --configuration test/phpunit/phpunittest.xml --coverage-text test/phpunit/BuildDocTest.php # - phpunit -d memory_limit=-1 --configuration test/phpunit/phpunittest.xml test/phpunit/WebservicesOtherTest.php -# - phpcs --warning-severity=0 -s --report-checkstyle --report-summary --standard=dev/codesniffer/ruleset.xml --tab-width=4 --ignore=/build/html/,/documents/,/includes/,/test/report/ htdocs/core/class/dolgraph.class.php - - phpcs --warning-severity=0 -s --report-checkstyle --report-summary --standard=dev/codesniffer/ruleset.xml --tab-width=4 --ignore=/build/html/,/documents/,/includes/,/test/report/ . -# - phpcs --warning-severity=0 -s --report-summary --standard=dev/codesniffer/ruleset.xml --tab-width=4 --ignore=/build/html/,/documents/,/includes/,/test/report/ . +# - phpcs -p --warning-severity=0 -s --report-checkstyle --report-summary --standard=dev/codesniffer/ruleset.xml --tab-width=4 --ignore=/build/html/,/documents/,/includes/,/test/report/ htdocs/core/class/dolgraph.class.php 2>&1 + - phpcs -p --warning-severity=0 -s --report-checkstyle --report-summary --standard=dev/codesniffer/ruleset.xml --tab-width=4 --ignore=/build/html/,/documents/,/includes/,/test/report/ . 2>&1 +# - phpcs -p --warning-severity=0 -s --report-summary --standard=dev/codesniffer/ruleset.xml --tab-width=4 --ignore=/build/html/,/documents/,/includes/,/test/report/ . 2>&1 - phpunit -d memory_limit=-1 --configuration test/phpunit/phpunittest.xml test/phpunit/AllTests.php after_script: From 90a5f6c7efffc37568a1f4f26410e6616cf96199 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 8 Jul 2014 01:02:30 +0200 Subject: [PATCH 116/258] Qual: Remove end php tag. --- htdocs/admin/commande.php | 1 - htdocs/admin/menus/other.php | 1 - htdocs/admin/stock.php | 7 +- htdocs/admin/system/database.php | 7 +- htdocs/admin/system/dbtable.php | 2 +- htdocs/admin/system/dolibarr.php | 1 - htdocs/admin/system/index.php | 1 - htdocs/admin/tools/eaccelerator.php | 1 - htdocs/admin/tools/purge.php | 2 +- htdocs/admin/tools/update.php | 2 +- htdocs/admin/translation.php | 1 - htdocs/admin/workflow.php | 1 - htdocs/cashdesk/affIndex.php | 1 - htdocs/cashdesk/facturation.php | 2 - htdocs/cashdesk/include/keypad.php | 1 - htdocs/categories/viewcat.php | 2 +- htdocs/comm/action/class/actioncomm.class.php | 7 +- htdocs/comm/fiche.php | 10 +-- htdocs/commande/customer.php | 8 +-- htdocs/compta/facture/apercu.php | 1 - htdocs/compta/localtax/quadri_detail.php | 67 +++++++++---------- htdocs/core/boxes/box_factures.php | 1 - htdocs/core/boxes/box_project.php | 18 ++--- htdocs/core/boxes/box_task.php | 19 +++--- htdocs/core/class/dolprintipp.class.php | 1 - htdocs/core/lib/holiday.lib.php | 2 - htdocs/core/lib/product.lib.php | 2 - htdocs/core/lib/trip.lib.php | 4 +- htdocs/core/lib/usergroups.lib.php | 1 - htdocs/core/login/functions_empty.php | 2 - htdocs/core/login/functions_forceuser.php | 2 - htdocs/core/login/functions_http.php | 2 - htdocs/core/login/functions_ldap.php | 2 - htdocs/core/login/functions_openid.php | 2 - htdocs/core/menus/standard/auguria.lib.php | 1 - .../core/modules/propale/modules_propale.php | 1 - htdocs/fichinter/document.php | 1 - htdocs/holiday/define_holiday.php | 1 - 38 files changed, 75 insertions(+), 113 deletions(-) diff --git a/htdocs/admin/commande.php b/htdocs/admin/commande.php index 6736f9d2279..1d05efa8e99 100644 --- a/htdocs/admin/commande.php +++ b/htdocs/admin/commande.php @@ -534,4 +534,3 @@ print '
'; llxFooter(); $db->close(); -?> diff --git a/htdocs/admin/menus/other.php b/htdocs/admin/menus/other.php index 0ec3119c097..36733add335 100644 --- a/htdocs/admin/menus/other.php +++ b/htdocs/admin/menus/other.php @@ -143,4 +143,3 @@ print ''; llxFooter(); $db->close(); -?> \ No newline at end of file diff --git a/htdocs/admin/stock.php b/htdocs/admin/stock.php index 9b80662c180..d0582a91630 100644 --- a/htdocs/admin/stock.php +++ b/htdocs/admin/stock.php @@ -77,7 +77,7 @@ if($action) if($action == 'STOCK_USE_VIRTUAL_STOCK') { $res = dolibarr_set_const($db, "STOCK_USE_VIRTUAL_STOCK", GETPOST('STOCK_USE_VIRTUAL_STOCK','alpha'),'chaine',0,'',$conf->entity); } - + if($action == 'STOCK_MUST_BE_ENOUGH_FOR_INVOICE') { $res = dolibarr_set_const($db, "STOCK_MUST_BE_ENOUGH_FOR_INVOICE", GETPOST('STOCK_MUST_BE_ENOUGH_FOR_INVOICE','alpha'),'chaine',0,'',$conf->entity); } @@ -329,7 +329,6 @@ if ($virtualdiffersfromphysical) print ''; } -$db->close(); - llxFooter(); -?> + +$db->close(); diff --git a/htdocs/admin/system/database.php b/htdocs/admin/system/database.php index f32122df7b9..d9833a13d01 100644 --- a/htdocs/admin/system/database.php +++ b/htdocs/admin/system/database.php @@ -81,7 +81,7 @@ else print ''.$langs->trans("Parameters").''; print ''.$langs->trans("Value").''; print ''."\n"; - + // arraytest is an array of test to do $arraytest=array(); if (preg_match('/mysql/i',$db->type)) @@ -91,7 +91,7 @@ else 'collation_database'=>array('var'=>'dolibarr_main_db_collation','valifempty'=>'utf8_general_ci') ); } - + $listtouse=array(); if ($listname == 'listofvars') $listtouse=$listofvars; if ($listname == 'listofstatus') $listtouse=$listofstatus; @@ -124,4 +124,5 @@ else } llxFooter(); -?> \ No newline at end of file + +$db->close(); diff --git a/htdocs/admin/system/dbtable.php b/htdocs/admin/system/dbtable.php index fe182c2e73e..3102248bc0a 100644 --- a/htdocs/admin/system/dbtable.php +++ b/htdocs/admin/system/dbtable.php @@ -129,5 +129,5 @@ else } llxFooter(); + $db->close(); -?> \ No newline at end of file diff --git a/htdocs/admin/system/dolibarr.php b/htdocs/admin/system/dolibarr.php index 8be469006ff..fe9bde59cec 100644 --- a/htdocs/admin/system/dolibarr.php +++ b/htdocs/admin/system/dolibarr.php @@ -379,4 +379,3 @@ print ''; llxFooter(); $db->close(); -?> diff --git a/htdocs/admin/system/index.php b/htdocs/admin/system/index.php index 640d5138362..70464aa1578 100644 --- a/htdocs/admin/system/index.php +++ b/htdocs/admin/system/index.php @@ -119,4 +119,3 @@ llxFooter(); $db->close(); -?> diff --git a/htdocs/admin/tools/eaccelerator.php b/htdocs/admin/tools/eaccelerator.php index a3f046f4510..8f82f33d039 100644 --- a/htdocs/admin/tools/eaccelerator.php +++ b/htdocs/admin/tools/eaccelerator.php @@ -350,4 +350,3 @@ print "

"; llxFooter(); $db->close(); -?> diff --git a/htdocs/admin/tools/purge.php b/htdocs/admin/tools/purge.php index cac0bce888c..4f3f14302fd 100644 --- a/htdocs/admin/tools/purge.php +++ b/htdocs/admin/tools/purge.php @@ -165,5 +165,5 @@ if (preg_match('/^confirm/i',$choice)) llxFooter(); + $db->close(); -?> \ No newline at end of file diff --git a/htdocs/admin/tools/update.php b/htdocs/admin/tools/update.php index 29e4c96b6c3..d58e7444e71 100644 --- a/htdocs/admin/tools/update.php +++ b/htdocs/admin/tools/update.php @@ -173,5 +173,5 @@ if (! empty($result['return'])) } llxFooter(); + $db->close(); -?> \ No newline at end of file diff --git a/htdocs/admin/translation.php b/htdocs/admin/translation.php index 8e5370a957e..66bc4fb22ba 100644 --- a/htdocs/admin/translation.php +++ b/htdocs/admin/translation.php @@ -69,4 +69,3 @@ print $langs->trans("SeeAlso").': '."\n"; -?> diff --git a/htdocs/cashdesk/facturation.php b/htdocs/cashdesk/facturation.php index 2f3da75d977..95f3583fe94 100644 --- a/htdocs/cashdesk/facturation.php +++ b/htdocs/cashdesk/facturation.php @@ -191,5 +191,3 @@ $obj_facturation->paiementLe('RESET'); // Affichage des templates require ('tpl/facturation1.tpl.php'); - -?> diff --git a/htdocs/cashdesk/include/keypad.php b/htdocs/cashdesk/include/keypad.php index cc56a2d1192..798c30c92fb 100644 --- a/htdocs/cashdesk/include/keypad.php +++ b/htdocs/cashdesk/include/keypad.php @@ -50,4 +50,3 @@ function genkeypad($keypadname, $formname) $sz.=''; return $sz; } -?> diff --git a/htdocs/categories/viewcat.php b/htdocs/categories/viewcat.php index bec834e1ff9..d0a4d2751df 100644 --- a/htdocs/categories/viewcat.php +++ b/htdocs/categories/viewcat.php @@ -519,5 +519,5 @@ if($object->type == 4) llxFooter(); + $db->close(); -?> \ No newline at end of file diff --git a/htdocs/comm/action/class/actioncomm.class.php b/htdocs/comm/action/class/actioncomm.class.php index dc29f687223..18bef50369d 100644 --- a/htdocs/comm/action/class/actioncomm.class.php +++ b/htdocs/comm/action/class/actioncomm.class.php @@ -229,7 +229,7 @@ class ActionComm extends CommonObject { // Call trigger $result=$this->call_trigger('ACTION_CREATE',$user); - if ($result < 0) { $error++; } + if ($result < 0) { $error++; } // End call triggers } @@ -387,7 +387,7 @@ class ActionComm extends CommonObject { // Call trigger $result=$this->call_trigger('ACTION_DELETE',$user); - if ($result < 0) { $error++; } + if ($result < 0) { $error++; } // End call triggers } @@ -492,7 +492,7 @@ class ActionComm extends CommonObject { // Call trigger $result=$this->call_trigger('ACTION_MODIFY',$user); - if ($result < 0) { $error++; } + if ($result < 0) { $error++; } // End call triggers } @@ -1054,4 +1054,3 @@ class ActionComm extends CommonObject } -?> diff --git a/htdocs/comm/fiche.php b/htdocs/comm/fiche.php index 0f2888fc1a3..bd2bf9630ea 100644 --- a/htdocs/comm/fiche.php +++ b/htdocs/comm/fiche.php @@ -309,7 +309,7 @@ if ($id > 0) print yn($object->localtax2_assuj); print ''; } - + // TVA Intra print ''.$langs->trans('VATIntra').''; @@ -819,11 +819,11 @@ if ($id > 0) /* * Barre d'actions */ - + $parameters = array(); $reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been - - + + print '
'; if (! empty($conf->propal->enabled) && $user->rights->propal->creer) @@ -930,5 +930,5 @@ dol_htmloutput_mesg('',$mesgs); // End of page llxFooter(); + $db->close(); -?> diff --git a/htdocs/commande/customer.php b/htdocs/commande/customer.php index 373775a0da0..29812903d12 100644 --- a/htdocs/commande/customer.php +++ b/htdocs/commande/customer.php @@ -156,7 +156,7 @@ if ($resql) print ""; print ''; - + $result=''; $lien=$lienfin=''; $lien = ''; @@ -164,7 +164,7 @@ if ($resql) $name=$obj->nom; $result.=($lien.img_object($langs->trans("ShowCompany").': '.$name,'company').$lienfin); $result.=$lien.(dol_trunc($name,$maxlen)).$lienfin; - + print $result; print ''; print ''.$obj->town.' '; @@ -185,7 +185,7 @@ else dol_print_error($db); } +llxFooter(); + $db->close(); -llxFooter(); -?> diff --git a/htdocs/compta/facture/apercu.php b/htdocs/compta/facture/apercu.php index e1662708489..856640e306e 100644 --- a/htdocs/compta/facture/apercu.php +++ b/htdocs/compta/facture/apercu.php @@ -420,4 +420,3 @@ elseif (file_exists($fileimagebis)) $db->close(); llxFooter(); -?> diff --git a/htdocs/compta/localtax/quadri_detail.php b/htdocs/compta/localtax/quadri_detail.php index 5989159dcd8..b1b4aad7722 100644 --- a/htdocs/compta/localtax/quadri_detail.php +++ b/htdocs/compta/localtax/quadri_detail.php @@ -315,7 +315,7 @@ else if ($modetax == 0) $span+=2; //print ''..')'; - + if($conf->global->$calc ==0 || $conf->global->$calc == 2){ // Customers invoices print ''; @@ -329,20 +329,20 @@ else print ''.$langs->trans("BI").''; print ''.$vatcust.''; print ''; - - + + $LT=0; $sameLT=false; foreach(array_keys($x_coll) as $rate) { $subtot_coll_total_ht = 0; $subtot_coll_vat = 0; - + if (is_array($x_both[$rate]['coll']['detail'])) { // VAT Rate $var=true; - + if($rate!=0){ print ""; //print ''.$langs->trans("Rate").': '.vatrate($rate).'%'; @@ -359,13 +359,13 @@ else // was not saved. if (! empty($fields['ddate_start'])) $type=1; if (! empty($fields['ddate_end'])) $type=1; - + $var=!$var; print ''; - + // Ref print ''.$fields['link'].''; - + // Description print ''; if ($fields['pid']) @@ -387,12 +387,12 @@ else else $fields['descr']=$langs->transnoentitiesnoconv($reg[1]); } print $text.' '.dol_trunc(dol_string_nohtmltag($fields['descr']),16); - + // Show range print_date_range($fields['ddate_start'],$fields['ddate_end']); } print ''; - + // Total HT if ($modetax == 0) { @@ -406,7 +406,7 @@ else } print ''; } - + // Payment $ratiopaymentinvoice=1; if ($modetax == 0) @@ -429,14 +429,14 @@ else } print ''; } - + // Total collected print ''; $temp_ht=$fields['totalht']; if ($type == 1) $temp_ht=$fields['totalht']*$ratiopaymentinvoice; print price(price2num($temp_ht,'MT')); print ''; - + // Localtax print ''; $temp_vat= $local==1?$fields['localtax1']:$fields['localtax2']; @@ -444,7 +444,7 @@ else //print price($fields['vat']); print ''; print ''; - + $subtot_coll_total_ht += $temp_ht; $subtot_coll_vat += $temp_vat; $x_coll_sum += $temp_vat; @@ -466,7 +466,7 @@ else print ''; } } - + if (count($x_coll) == 0) // Show a total ine if nothing shown { print ''; @@ -481,13 +481,13 @@ else print ''.price(price2num(0,'MT')).''; print ''; } - + // Blank line print ' '; print ''; $diff=$x_coll_sum; } - + if($conf->global->$calc ==0 || $conf->global->$calc == 1){ echo ''; //print table headers for this quadri - expenses now @@ -503,12 +503,12 @@ else print ''; print ''; print ''."\n"; - + foreach(array_keys($x_paye) as $rate) { $subtot_paye_total_ht = 0; $subtot_paye_vat = 0; - + if(is_array($x_both[$rate]['paye']['detail'])) { $var=true; @@ -526,13 +526,13 @@ else // was not saved. if (! empty($fields['ddate_start'])) $type=1; if (! empty($fields['ddate_end'])) $type=1; - + $var=!$var; print ''; - + // Ref print ''; - + // Description print ''; - + // Total HT if ($modetax == 0) { @@ -567,7 +567,7 @@ else } print ''; } - + // Payment $ratiopaymentinvoice=1; if ($modetax == 0) @@ -590,22 +590,22 @@ else } print ''; } - + // VAT paid print ''; - + // Localtax print ''; print ''; - + $subtot_paye_total_ht += $temp_ht; $subtot_paye_vat += $temp_vat; $x_paye_sum += $temp_vat; @@ -627,7 +627,7 @@ else print ''; } } - + if (count($x_paye) == 0) // Show a total ine if nothing shown { print ''; @@ -642,11 +642,11 @@ else print ''; print ''; } - + print '
'.$langs->trans("BI").''.$vatsup.'
'.$fields['link'].''; if ($fields['pid']) @@ -548,12 +548,12 @@ else if ($type) $text = img_object($langs->trans('Service'),'service'); else $text = img_object($langs->trans('Product'),'product'); print $text.' '.dol_trunc(dol_string_nohtmltag($fields['descr']),16); - + // Show range print_date_range($fields['ddate_start'],$fields['ddate_end']); } print ''; $temp_ht=$fields['totalht']; if ($type == 1) $temp_ht=$fields['totalht']*$ratiopaymentinvoice; print price(price2num($temp_ht,'MT')); print ''; $temp_vat= $local==1?$fields['localtax1']:$fields['localtax2']; - print price(price2num($temp_vat,'MT')); + print price(price2num($temp_vat,'MT')); //print price($fields['vat']); print '
'.price(price2num(0,'MT')).'
'; $diff=$x_paye_sum; } - + if($conf->global->$calc ==0){$diff=$x_coll_sum - $x_paye_sum;} echo ''; // Total to pay @@ -659,11 +659,10 @@ else print "\n"; echo '
'; - + $i++; } $db->close(); llxFooter(); -?> diff --git a/htdocs/core/boxes/box_factures.php b/htdocs/core/boxes/box_factures.php index 23ab2df8556..2e8f94e29ff 100644 --- a/htdocs/core/boxes/box_factures.php +++ b/htdocs/core/boxes/box_factures.php @@ -158,4 +158,3 @@ class box_factures extends ModeleBoxes } } -?> \ No newline at end of file diff --git a/htdocs/core/boxes/box_project.php b/htdocs/core/boxes/box_project.php index 5155c92b251..fab476c0c95 100644 --- a/htdocs/core/boxes/box_project.php +++ b/htdocs/core/boxes/box_project.php @@ -57,16 +57,16 @@ class box_project extends ModeleBoxes function loadBox($max=5) { global $conf, $user, $langs, $db; - + $this->max=$max; - + $totalMnt = 0; $totalnb = 0; $totalnbTask=0; include_once(DOL_DOCUMENT_ROOT."/projet/class/project.class.php"); require_once(DOL_DOCUMENT_ROOT."/core/lib/project.lib.php"); $projectstatic=new Project($db); - + $textHead = $langs->trans("Projet"); @@ -75,7 +75,7 @@ class box_project extends ModeleBoxes // list the summary of the orders if ($user->rights->projet->lire) { - + $sql = "SELECT p.rowid, p.ref, p.title, p.fk_statut "; $sql.= " FROM (".MAIN_DB_PREFIX."societe as s,".MAIN_DB_PREFIX."projet as p"; $sql.= ")"; @@ -97,7 +97,7 @@ class box_project extends ModeleBoxes $objp = $db->fetch_object($result); $projectstatic->fetch($objp->rowid); - + $this->info_box_contents[$i][1] = array('td' => 'align="left"', 'text' =>$projectstatic->getNomUrl(1) ); @@ -105,7 +105,7 @@ class box_project extends ModeleBoxes $this->info_box_contents[$i][2] = array('td' => 'align="left"', 'text' => $objp->title ); - + $sql ="SELECT count(*) as nb, sum(progress) as totprogress"; $sql.=" FROM ".MAIN_DB_PREFIX."projet_task as pt, ".MAIN_DB_PREFIX."projet as p"; $sql.=" WHERE pt.fk_projet = p.rowid"; @@ -137,8 +137,8 @@ class box_project extends ModeleBoxes $this->info_box_contents[$i][0] = array('tr' => 'class="liste_total"', 'td' => 'colspan=2 align="left" ', 'text' => $langs->trans("Total")." ".$textHead); $this->info_box_contents[$i][1] = array('td' => 'align="right" ', 'text' => number_format($num, 0, ',', ' ')." ".$langs->trans("Projects")); $this->info_box_contents[$i][2] = array('td' => 'align="right" ', 'text' => number_format($totalnbTask, 0, ',', ' ')." ".$langs->trans("Tasks")); - $this->info_box_contents[$i][4] = array('td' => 'colspan=2', 'text' => ""); - + $this->info_box_contents[$i][4] = array('td' => 'colspan=2', 'text' => ""); + } /** @@ -153,4 +153,4 @@ class box_project extends ModeleBoxes parent::showBox($this->info_box_head, $this->info_box_contents); } } -?> + diff --git a/htdocs/core/boxes/box_task.php b/htdocs/core/boxes/box_task.php index 20a0871bc7e..3f2e5f05c16 100644 --- a/htdocs/core/boxes/box_task.php +++ b/htdocs/core/boxes/box_task.php @@ -51,7 +51,7 @@ class box_task extends ModeleBoxes $langs->load("projects"); $this->boxlabel="Tasks"; } - + /** * Load data for box to show them later * @@ -61,23 +61,23 @@ class box_task extends ModeleBoxes function loadBox($max=5) { global $conf, $user, $langs, $db; - + $this->max=$max; - + $totalMnt = 0; $totalnb = 0; $totalDuree=0; include_once(DOL_DOCUMENT_ROOT."/projet/class/task.class.php"); $taskstatic=new Task($db); - - + + $textHead = $langs->trans("Tasks")." ".date("Y"); $this->info_box_head = array('text' => $textHead, 'limit'=> dol_strlen($textHead)); // list the summary of the orders if ($user->rights->projet->lire) { - + $sql = "SELECT pt.fk_statut, count(pt.rowid) as nb, sum(ptt.task_duration) as durationtot, sum(pt.planned_workload) as plannedtot"; $sql.= " FROM ".MAIN_DB_PREFIX."projet_task as pt, ".MAIN_DB_PREFIX."projet_task_time as ptt"; $sql.= " WHERE DATE_FORMAT(pt.datec,'%Y') = ".date("Y")." "; @@ -110,7 +110,7 @@ class box_task extends ModeleBoxes $totalplannedtot += $objp->plannedtot; $this->info_box_contents[$i][4] = array('td' => 'align="right"', 'text' => ConvertSecondToTime($objp->durationtot,'all',25200,5)); $totaldurationtot += $objp->durationtot; - + $this->info_box_contents[$i][5] = array('td' => 'align="right" width="18"', 'text' => $taskstatic->LibStatut($objp->fk_statut,3)); $i++; @@ -124,8 +124,8 @@ class box_task extends ModeleBoxes $this->info_box_contents[$i][1] = array('td' => 'align="right" ', 'text' => number_format($totalnb, 0, ',', ' ')." ".$langs->trans("Tasks")); $this->info_box_contents[$i][2] = array('td' => 'align="right" ', 'text' => ConvertSecondToTime($totalplannedtot,'all',25200,5)); $this->info_box_contents[$i][3] = array('td' => 'align="right" ', 'text' => ConvertSecondToTime($totaldurationtot,'all',25200,5)); - $this->info_box_contents[$i][4] = array('td' => 'colspan=2', 'text' => ""); - + $this->info_box_contents[$i][4] = array('td' => 'colspan=2', 'text' => ""); + } /** @@ -140,4 +140,3 @@ class box_task extends ModeleBoxes parent::showBox($this->info_box_head, $this->info_box_contents); } } -?> diff --git a/htdocs/core/class/dolprintipp.class.php b/htdocs/core/class/dolprintipp.class.php index 768741d9368..942ee3da3c3 100644 --- a/htdocs/core/class/dolprintipp.class.php +++ b/htdocs/core/class/dolprintipp.class.php @@ -201,4 +201,3 @@ class dolprintIPP return $ipp->printer_attributes; } } -?> diff --git a/htdocs/core/lib/holiday.lib.php b/htdocs/core/lib/holiday.lib.php index dd299ab5c2c..209ca16f585 100644 --- a/htdocs/core/lib/holiday.lib.php +++ b/htdocs/core/lib/holiday.lib.php @@ -49,5 +49,3 @@ function holiday_prepare_head($object) return $head; } - -?> diff --git a/htdocs/core/lib/product.lib.php b/htdocs/core/lib/product.lib.php index e8c86b37db9..a252b361dcf 100644 --- a/htdocs/core/lib/product.lib.php +++ b/htdocs/core/lib/product.lib.php @@ -357,5 +357,3 @@ function measuring_units_string($unit,$measuring_style='') return $measuring_units[$unit]; } - -?> diff --git a/htdocs/core/lib/trip.lib.php b/htdocs/core/lib/trip.lib.php index 60794497554..7d58e9e01b1 100644 --- a/htdocs/core/lib/trip.lib.php +++ b/htdocs/core/lib/trip.lib.php @@ -54,10 +54,8 @@ function trip_prepare_head($object) $head[$h][1] = $langs->trans("Info"); $head[$h][2] = 'info'; $h++; - + complete_head_from_modules($conf,$langs,$object,$head,$h,'trip','remove'); return $head; } - -?> \ No newline at end of file diff --git a/htdocs/core/lib/usergroups.lib.php b/htdocs/core/lib/usergroups.lib.php index d6097b6f5a1..75a78627f52 100644 --- a/htdocs/core/lib/usergroups.lib.php +++ b/htdocs/core/lib/usergroups.lib.php @@ -342,4 +342,3 @@ function show_theme($fuser,$edit=0,$foruserprofile=false) print ''; } -?> diff --git a/htdocs/core/login/functions_empty.php b/htdocs/core/login/functions_empty.php index c96a5023d4d..e4379ee2c3a 100644 --- a/htdocs/core/login/functions_empty.php +++ b/htdocs/core/login/functions_empty.php @@ -39,5 +39,3 @@ function check_user_password_empty($usertotest,$passwordtotest,$entitytotest) return $login; } - -?> \ No newline at end of file diff --git a/htdocs/core/login/functions_forceuser.php b/htdocs/core/login/functions_forceuser.php index e74a253550a..c990c0bd45e 100644 --- a/htdocs/core/login/functions_forceuser.php +++ b/htdocs/core/login/functions_forceuser.php @@ -47,5 +47,3 @@ function check_user_password_forceuser($usertotest,$passwordtotest,$entitytotest return $login; } - -?> \ No newline at end of file diff --git a/htdocs/core/login/functions_http.php b/htdocs/core/login/functions_http.php index b224b27f15b..9d03913d2bc 100644 --- a/htdocs/core/login/functions_http.php +++ b/htdocs/core/login/functions_http.php @@ -44,5 +44,3 @@ function check_user_password_http($usertotest,$passwordtotest,$entitytotest) return $login; } - -?> \ No newline at end of file diff --git a/htdocs/core/login/functions_ldap.php b/htdocs/core/login/functions_ldap.php index 403530ac80b..88a5f55de19 100644 --- a/htdocs/core/login/functions_ldap.php +++ b/htdocs/core/login/functions_ldap.php @@ -227,5 +227,3 @@ function check_user_password_ldap($usertotest,$passwordtotest,$entitytotest) return $login; } - -?> diff --git a/htdocs/core/login/functions_openid.php b/htdocs/core/login/functions_openid.php index 3abb69be4f2..83543c43dd5 100644 --- a/htdocs/core/login/functions_openid.php +++ b/htdocs/core/login/functions_openid.php @@ -112,5 +112,3 @@ function check_user_password_openid($usertotest,$passwordtotest,$entitytotest) return $login; } - -?> \ No newline at end of file diff --git a/htdocs/core/menus/standard/auguria.lib.php b/htdocs/core/menus/standard/auguria.lib.php index 837403828ee..bf5de3c6a91 100644 --- a/htdocs/core/menus/standard/auguria.lib.php +++ b/htdocs/core/menus/standard/auguria.lib.php @@ -431,4 +431,3 @@ function dol_auguria_showmenu($type_user, &$menuentry, &$listofmodulesforexterna return 1; } -?> diff --git a/htdocs/core/modules/propale/modules_propale.php b/htdocs/core/modules/propale/modules_propale.php index ed2673a1e70..13b933b6ccf 100644 --- a/htdocs/core/modules/propale/modules_propale.php +++ b/htdocs/core/modules/propale/modules_propale.php @@ -254,4 +254,3 @@ function propale_pdf_create($db, $object, $modele, $outputlangs, $hidedetails=0, } } -?> diff --git a/htdocs/fichinter/document.php b/htdocs/fichinter/document.php index 54728df36d9..1e90f2985c7 100644 --- a/htdocs/fichinter/document.php +++ b/htdocs/fichinter/document.php @@ -134,4 +134,3 @@ else llxFooter(); $db->close(); -?> diff --git a/htdocs/holiday/define_holiday.php b/htdocs/holiday/define_holiday.php index 9427a861590..0ac67b66579 100644 --- a/htdocs/holiday/define_holiday.php +++ b/htdocs/holiday/define_holiday.php @@ -190,4 +190,3 @@ dol_fiche_end(); llxFooter(); $db->close(); -?> From aaa2d75dc3aa45a0b2f029663edde16b5e754b98 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 8 Jul 2014 01:04:16 +0200 Subject: [PATCH 117/258] Disable test on Zend.Files.ClosingTag for the moment to try to restore a green status with travis. --- dev/codesniffer/ruleset.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev/codesniffer/ruleset.xml b/dev/codesniffer/ruleset.xml index a0c085d5d67..9d605cefbb1 100755 --- a/dev/codesniffer/ruleset.xml +++ b/dev/codesniffer/ruleset.xml @@ -19,7 +19,7 @@ - + From 0eabf26d270a87e5c0634fe7467bed662cea90c1 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 8 Jul 2014 01:15:59 +0200 Subject: [PATCH 118/258] Fix: Checkstyle --- htdocs/projet/class/task.class.php | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/htdocs/projet/class/task.class.php b/htdocs/projet/class/task.class.php index d9f8357a751..c6ad2b82604 100644 --- a/htdocs/projet/class/task.class.php +++ b/htdocs/projet/class/task.class.php @@ -1219,10 +1219,11 @@ class Task extends CommonObject } - /** - * \brief Return status label of object - * \param mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto - * \return string Label + /** + * Return status label of object + * + * @param string $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto + * @return string Label */ function getLibStatut($mode=0) { @@ -1230,10 +1231,11 @@ class Task extends CommonObject } /** - * \brief Renvoi status label for a status - * \param statut id statut - * \param mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto - * \return string Label + * Return status label for an object + * + * @param int $statut Id statut + * @param string $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto + * @return string Label */ function LibStatut($statut,$mode=0) { @@ -1246,9 +1248,9 @@ class Task extends CommonObject $this->statuts_short[0]='Draft'; $this->statuts_short[1]='Validated'; $this->statuts_short[2]='Running'; - $this->statuts_short[3]='Finish'; + $this->statuts_short[3]='Finish'; $this->statuts_short[4]='Transfered'; - + global $langs; if ($mode == 0) From 6d83882a5d355b0c3b6a09a4e8047ff039e5505f Mon Sep 17 00:00:00 2001 From: Alexis Algoud Date: Tue, 8 Jul 2014 09:00:41 +0200 Subject: [PATCH 119/258] FIX : Bad rank when a bill was made by multiple orders --- htdocs/commande/orderstoinvoice.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/commande/orderstoinvoice.php b/htdocs/commande/orderstoinvoice.php index 5ea4e5b72cb..7411d3a9368 100644 --- a/htdocs/commande/orderstoinvoice.php +++ b/htdocs/commande/orderstoinvoice.php @@ -285,7 +285,7 @@ if (($action == 'create' || $action == 'add') && empty($mesgs)) 'HT', 0, $product_type, - $lines[$i]->rang, + $ii, $lines[$i]->special_code, $object->origin, $lines[$i]->rowid, From a2911cef11d169816e5a5a4d45438e2802838b9e Mon Sep 17 00:00:00 2001 From: frederic34 Date: Tue, 8 Jul 2014 11:46:22 +0200 Subject: [PATCH 120/258] Filter on invoice for "treso" --- htdocs/compta/bank/treso.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/compta/bank/treso.php b/htdocs/compta/bank/treso.php index f6c59530605..f628965e976 100644 --- a/htdocs/compta/bank/treso.php +++ b/htdocs/compta/bank/treso.php @@ -161,6 +161,7 @@ if ($_REQUEST["account"] || $_REQUEST["ref"]) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON f.fk_soc = s.rowid"; $sql.= " WHERE f.entity = ".$conf->entity; $sql.= " AND f.paye = 0 AND f.fk_statut = 1"; // Not paid + $sql.= " AND f.fk_account IN (NULL, 0, ".$acct->id.")"; // Id bank account od invoice $sql.= " ORDER BY dlr ASC"; // Supplier invoices From 865fea37e9cc63ee904eeed05b380c6c0b7eaaec Mon Sep 17 00:00:00 2001 From: frederic34 Date: Tue, 8 Jul 2014 16:02:46 +0200 Subject: [PATCH 121/258] Correct filter --- htdocs/compta/bank/treso.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/compta/bank/treso.php b/htdocs/compta/bank/treso.php index f628965e976..223e5e9d534 100644 --- a/htdocs/compta/bank/treso.php +++ b/htdocs/compta/bank/treso.php @@ -161,8 +161,8 @@ if ($_REQUEST["account"] || $_REQUEST["ref"]) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON f.fk_soc = s.rowid"; $sql.= " WHERE f.entity = ".$conf->entity; $sql.= " AND f.paye = 0 AND f.fk_statut = 1"; // Not paid - $sql.= " AND f.fk_account IN (NULL, 0, ".$acct->id.")"; // Id bank account od invoice - $sql.= " ORDER BY dlr ASC"; + $sql.= " AND (f.fk_account IN (0, ".$acct->id.") OR f.fk_account IS NULL)"; // Id bank account of invoice + $sql.= " ORDER BY dlr ASC"; // Supplier invoices $sql2= " SELECT 'invoice_supplier' as family, ff.rowid as objid, ff.ref_supplier as ref, (-1*ff.total_ttc) as total_ttc, ff.type, ff.date_lim_reglement as dlr,"; From 076a8424882180e4c277dfba29d85aa879a80f67 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 8 Jul 2014 20:10:56 +0200 Subject: [PATCH 122/258] Fix: Ignore vagrant dir into CI --- .travis.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 85b0342670c..9e50a0551eb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -87,6 +87,7 @@ before_script: script: - cd htdocs/install + - date - php upgrade.php 3.4.0 3.5.0 > upgrade.log - php upgrade2.php 3.4.0 3.5.0 > upgrade2.log - php upgrade.php 3.5.0 3.6.0 >> upgrade.log @@ -96,12 +97,13 @@ script: # - cat upgrade.log # - cat upgrade2.log - cd ../.. + - date # - phpunit -d memory_limit=-1 --configuration test/phpunit/phpunittest.xml --coverage-text test/phpunit/AllTests.php # - phpunit -d memory_limit=-1 --configuration test/phpunit/phpunittest.xml --coverage-text test/phpunit/BuildDocTest.php # - phpunit -d memory_limit=-1 --configuration test/phpunit/phpunittest.xml test/phpunit/WebservicesOtherTest.php -# - phpcs -p --warning-severity=0 -s --report-checkstyle --report-summary --standard=dev/codesniffer/ruleset.xml --tab-width=4 --ignore=/build/html/,/documents/,/includes/,/test/report/ htdocs/core/class/dolgraph.class.php - phpcs -p --warning-severity=0 -s --report-checkstyle --report-summary --standard=dev/codesniffer/ruleset.xml --tab-width=4 --ignore=/build/html/,/documents/,/includes/,/test/report/ . 2>&1 -# - phpcs -p --warning-severity=0 -s --report-summary --standard=dev/codesniffer/ruleset.xml --tab-width=4 --ignore=/build/html/,/documents/,/includes/,/test/report/ . +# - phpcs -p --warning-severity=0 -s --report-summary --standard=dev/codesniffer/ruleset.xml --tab-width=4 --ignore=/build/html/,/dev/vagrant/,/documents/,/includes/,/test/report/ . + - date - phpunit -d memory_limit=-1 --configuration test/phpunit/phpunittest.xml test/phpunit/AllTests.php after_script: From 869bde5fb0e9daa44e9688761aff2199810183b9 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 8 Jul 2014 20:18:22 +0200 Subject: [PATCH 123/258] Fix: Ignore vagrant dir into CI Conflicts: .travis.yml --- .travis.yml | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 9d4c658018d..96395a4b32f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -84,12 +84,22 @@ before_script: script: -# - phpunit -d memory_limit=-1 --configuration test/phpunit/phpunittest.xml --coverage-text test/phpunit/AllTests.php + - cd htdocs/install + - date + - php upgrade.php 3.4.0 3.5.0 > upgrade.log + - php upgrade2.php 3.4.0 3.5.0 > upgrade2.log + - php upgrade.php 3.5.0 3.6.0 >> upgrade.log + - php upgrade2.php 3.5.0 3.6.0 >> upgrade2.log + - php upgrade.php 3.6.0 3.7.0 >> upgrade.log + - php upgrade2.php 3.6.0 3.7.0 >> upgrade2.log +# - cat upgrade.log +# - cat upgrade2.log + - cd ../.. + - date +# - phpcs -p --warning-severity=0 -s --report-summary --standard=dev/codesniffer/ruleset.xml --tab-width=4 --ignore=/build/html/,/dev/vagrant/,/documents/,/includes/,/test/report/ htdocs/core/class/dolgraph.class.php 2>&1 + - phpcs -p --warning-severity=0 -s --report-checkstyle --report-summary --standard=dev/codesniffer/ruleset.xml --tab-width=4 --ignore=/build/html/,/dev/vagrant/,/documents/,/includes/,/test/report/ . 2>&1 + - date # - phpunit -d memory_limit=-1 --configuration test/phpunit/phpunittest.xml --coverage-text test/phpunit/BuildDocTest.php -# - phpunit -d memory_limit=-1 --configuration test/phpunit/phpunittest.xml test/phpunit/WebservicesOtherTest.php -# - phpcs -p --warning-severity=0 -s --report-checkstyle --report-summary --standard=dev/codesniffer/ruleset.xml --tab-width=4 --ignore=/build/html/,/documents/,/includes/,/test/report/ htdocs/core/class/dolgraph.class.php 2>&1 - - phpcs -p --warning-severity=0 -s --report-checkstyle --report-summary --standard=dev/codesniffer/ruleset.xml --tab-width=4 --ignore=/build/html/,/documents/,/includes/,/test/report/ . 2>&1 -# - phpcs -p --warning-severity=0 -s --report-summary --standard=dev/codesniffer/ruleset.xml --tab-width=4 --ignore=/build/html/,/documents/,/includes/,/test/report/ . 2>&1 - phpunit -d memory_limit=-1 --configuration test/phpunit/phpunittest.xml test/phpunit/AllTests.php after_script: From 0598bb611429f53d8cf2d05ab312f2b61f05f73b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 8 Jul 2014 20:21:32 +0200 Subject: [PATCH 124/258] Fix: travis file for 3.5 --- .travis.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 96395a4b32f..26e09482f80 100644 --- a/.travis.yml +++ b/.travis.yml @@ -88,10 +88,6 @@ script: - date - php upgrade.php 3.4.0 3.5.0 > upgrade.log - php upgrade2.php 3.4.0 3.5.0 > upgrade2.log - - php upgrade.php 3.5.0 3.6.0 >> upgrade.log - - php upgrade2.php 3.5.0 3.6.0 >> upgrade2.log - - php upgrade.php 3.6.0 3.7.0 >> upgrade.log - - php upgrade2.php 3.6.0 3.7.0 >> upgrade2.log # - cat upgrade.log # - cat upgrade2.log - cd ../.. From f1d1736532874bddfad982d970dcfc36be1c3a1e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 8 Jul 2014 20:59:14 +0200 Subject: [PATCH 125/258] Fix: checkstyle --- htdocs/main.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index c24f9fc2036..bdaaffdafe3 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -448,7 +448,7 @@ if (! defined('NOLOGIN')) $dol_tz=$_POST["tz"]; $dol_tz_string=$_POST["tz_string"]; $dol_tz_string=preg_replace('/\s*\(.+\)$/','',$dol_tz_string); - $dol_tz_string=preg_replace('/,/' ,'/',$dol_tz_string); + $dol_tz_string=preg_replace('/,/','/',$dol_tz_string); $dol_tz_string=preg_replace('/\s/','_',$dol_tz_string); $dol_dst=0; if (isset($_POST["dst_first"]) && isset($_POST["dst_second"])) From 932206a1520dd80a48bc8c22b76b89b46443f606 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 8 Jul 2014 21:04:17 +0200 Subject: [PATCH 126/258] Fix: phpunit --- htdocs/install/mysql/tables/llx_localtax.sql | 3 +-- test/phpunit/SqlTest.php | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/htdocs/install/mysql/tables/llx_localtax.sql b/htdocs/install/mysql/tables/llx_localtax.sql index bc646ffc245..65c9fbe496b 100644 --- a/htdocs/install/mysql/tables/llx_localtax.sql +++ b/htdocs/install/mysql/tables/llx_localtax.sql @@ -21,7 +21,7 @@ create table llx_localtax ( rowid integer AUTO_INCREMENT PRIMARY KEY, entity integer DEFAULT 1 NOT NULL, - localtaxtype tinyint(4), + localtaxtype tinyint, tms timestamp, datep date, -- date of payment datev date, -- date of value @@ -31,5 +31,4 @@ create table llx_localtax fk_bank integer, fk_user_creat integer, fk_user_modif integer - )ENGINE=innodb; diff --git a/test/phpunit/SqlTest.php b/test/phpunit/SqlTest.php index bd2a3c57b5d..4cc5939b34d 100755 --- a/test/phpunit/SqlTest.php +++ b/test/phpunit/SqlTest.php @@ -152,7 +152,7 @@ class SqlTest extends PHPUnit_Framework_TestCase $this->assertTrue($result===false); $result=strpos($filecontent,'int('); - print __METHOD__." Result for checking we don't have back 'int(' instead of integer = ".$result."\n"; + print __METHOD__." Result for checking we don't have 'int(' instead of 'integer' = ".$result."\n"; $this->assertTrue($result===false); } From 5d2a81a4f014fc2cd66a6a8fa5205e514002c447 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 8 Jul 2014 21:17:40 +0200 Subject: [PATCH 127/258] Fix: checkstyle --- htdocs/main.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index c24f9fc2036..bdaaffdafe3 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -448,7 +448,7 @@ if (! defined('NOLOGIN')) $dol_tz=$_POST["tz"]; $dol_tz_string=$_POST["tz_string"]; $dol_tz_string=preg_replace('/\s*\(.+\)$/','',$dol_tz_string); - $dol_tz_string=preg_replace('/,/' ,'/',$dol_tz_string); + $dol_tz_string=preg_replace('/,/','/',$dol_tz_string); $dol_tz_string=preg_replace('/\s/','_',$dol_tz_string); $dol_dst=0; if (isset($_POST["dst_first"]) && isset($_POST["dst_second"])) From 94cd8debeb9c11672800e0d3c1f3720971b450db Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 8 Jul 2014 21:24:36 +0200 Subject: [PATCH 128/258] Fix: table declaration Fix: regretion into trigger management --- htdocs/categories/class/categorie.class.php | 32 +++++++++---------- .../install/mysql/migration/3.6.0-3.7.0.sql | 2 +- .../tables/llx_accounting_fiscalyear.sql | 2 +- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/htdocs/categories/class/categorie.class.php b/htdocs/categories/class/categorie.class.php index f6ff8570fed..915a1410933 100644 --- a/htdocs/categories/class/categorie.class.php +++ b/htdocs/categories/class/categorie.class.php @@ -212,21 +212,21 @@ class Categorie extends CommonObject } } else if ($reshook < 0) $error++; - + // Call trigger $result=$this->call_trigger('CATEGORY_CREATE',$user); - if ($result < 0) { $error++; } + if ($result < 0) { $error++; } // End call triggers if ( ! $error ) - { - $this->db->rollback(); - return -3; - } - else { $this->db->commit(); return $id; + } + else + { + $this->db->rollback(); + return -3; } } else @@ -310,7 +310,7 @@ class Categorie extends CommonObject // Call trigger $result=$this->call_trigger('CATEGORY_MODIFY',$user); - if ($result < 0) { $error++; $this->db->rollback(); return -1; } + if ($result < 0) { $error++; $this->db->rollback(); return -1; } // End call triggers return 1; @@ -430,7 +430,7 @@ class Categorie extends CommonObject } // Call trigger $result=$this->call_trigger('CATEGORY_DELETE',$user); - if ($result < 0) { $error++; } + if ($result < 0) { $error++; } // End call triggers } } @@ -472,7 +472,7 @@ class Categorie extends CommonObject if ($type=='fournisseur') $column_name='societe'; $this->db->begin(); - + $sql = "INSERT INTO ".MAIN_DB_PREFIX."categorie_".$type." (fk_categorie, fk_".$column_name.")"; $sql .= " VALUES (".$this->id.", ".$obj->id.")"; @@ -523,7 +523,7 @@ class Categorie extends CommonObject // Call trigger $result=$this->call_trigger('CATEGORY_LINK',$user); - if ($result < 0) { $error++; } + if ($result < 0) { $error++; } // End call triggers if (! $error) @@ -532,11 +532,11 @@ class Categorie extends CommonObject return 1; } else - { + { $this->db->rollback(); return -2; } - + } else { @@ -575,7 +575,7 @@ class Categorie extends CommonObject $column_name=$type; if ($type=='contact') $column_name='socpeople'; if ($type=='fournisseur') $column_name='societe'; - + $this->db->begin(); $sql = "DELETE FROM ".MAIN_DB_PREFIX."categorie_".$type; @@ -590,7 +590,7 @@ class Categorie extends CommonObject // Call trigger $result=$this->call_trigger('CATEGORY_UNLINK',$user); - if ($result < 0) { $error++; } + if ($result < 0) { $error++; } // End call triggers if (! $error) @@ -601,7 +601,7 @@ class Categorie extends CommonObject else { $this->db->rollback(); - return -2; + return -2; } } else 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 c95c4500fb8..a3f128b8afa 100644 --- a/htdocs/install/mysql/migration/3.6.0-3.7.0.sql +++ b/htdocs/install/mysql/migration/3.6.0-3.7.0.sql @@ -101,7 +101,7 @@ create table llx_accounting_fiscalyear statut tinyint DEFAULT 0 NOT NULL, entity integer DEFAULT 1 NOT NULL, -- multi company id datec datetime NOT NULL, - tms timestamp NULL, + tms timestamp, fk_user_author integer NULL, fk_user_modif integer NULL )ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_accounting_fiscalyear.sql b/htdocs/install/mysql/tables/llx_accounting_fiscalyear.sql index eba284e4002..569c22dd57e 100644 --- a/htdocs/install/mysql/tables/llx_accounting_fiscalyear.sql +++ b/htdocs/install/mysql/tables/llx_accounting_fiscalyear.sql @@ -25,7 +25,7 @@ create table llx_accounting_fiscalyear statut tinyint DEFAULT 0 NOT NULL, entity integer DEFAULT 1 NOT NULL, -- multi company id datec datetime NOT NULL, - tms timestamp DEFAULT NULL, + tms timestamp, fk_user_author integer DEFAULT NULL, fk_user_modif integer DEFAULT NULL )ENGINE=innodb; From 9b6b5feb4f367ecf84300b89737d2a514ccdea19 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 8 Jul 2014 21:38:20 +0200 Subject: [PATCH 129/258] Fix: ON DELETE CASCADE is forbidden. --- htdocs/install/mysql/migration/3.5.0-3.6.0.sql | 6 ++++-- htdocs/install/mysql/migration/3.6.0-3.7.0.sql | 6 +++--- .../install/mysql/tables/llx_expeditiondet_batch.key.sql | 2 +- htdocs/install/mysql/tables/llx_product_batch.key.sql | 2 +- test/phpunit/SqlTest.php | 8 ++++++-- 5 files changed, 15 insertions(+), 9 deletions(-) diff --git a/htdocs/install/mysql/migration/3.5.0-3.6.0.sql b/htdocs/install/mysql/migration/3.5.0-3.6.0.sql index d12f3cb0840..3bc61ef314c 100644 --- a/htdocs/install/mysql/migration/3.5.0-3.6.0.sql +++ b/htdocs/install/mysql/migration/3.5.0-3.6.0.sql @@ -1073,7 +1073,6 @@ CREATE TABLE llx_product_batch ( batch varchar(30) DEFAULT NULL, qty double NOT NULL DEFAULT 0, import_key varchar(14) DEFAULT NULL, - KEY ix_fk_product_stock (fk_product_stock) ) ENGINE=InnoDB; CREATE TABLE llx_expeditiondet_batch ( @@ -1084,7 +1083,6 @@ CREATE TABLE llx_expeditiondet_batch ( batch varchar(30) DEFAULT NULL, qty double NOT NULL DEFAULT 0, fk_origin_stock integer NOT NULL, - KEY ix_fk_expeditiondet (fk_expeditiondet) ) ENGINE=InnoDB; -- Salary payment in tax module @@ -1108,6 +1106,10 @@ CREATE TABLE llx_payment_salary ( fk_user_modif integer )ENGINE=innodb; +ALTER TABLE llx_product_batch ADD INDEX ix_fk_product_stock (fk_product_stock); +ALTER TABLE llx_product_batch ADD CONSTRAINT fk_product_batch_fk_product_stock FOREIGN KEY (fk_product_stock) REFERENCES llx_product_stock (rowid); + + -- New 1074 : Stock mouvement link to origin ALTER TABLE llx_stock_mouvement ADD fk_origin integer; ALTER TABLE llx_stock_mouvement ADD origintype VARCHAR(32); 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 a3f128b8afa..7839fece341 100644 --- a/htdocs/install/mysql/migration/3.6.0-3.7.0.sql +++ b/htdocs/install/mysql/migration/3.6.0-3.7.0.sql @@ -67,15 +67,15 @@ ALTER TABLE llx_societe ADD COLUMN localtax2_value double(6,3) after localtax2_a -- Added missing relations of llx_product -- fk_country -ALTER TABLE llx_product CHANGE COLUMN fk_country fk_country INTEGER NULL DEFAULT NULL; +ALTER TABLE llx_product MODIFY COLUMN fk_country INTEGER NULL DEFAULT NULL; UPDATE llx_product SET fk_country = NULL WHERE fk_country = 0; ALTER TABLE llx_product ADD INDEX idx_product_fk_country (fk_country); ALTER TABLE llx_product ADD CONSTRAINT fk_product_fk_country FOREIGN KEY (fk_country) REFERENCES llx_c_pays (rowid); -- fk_user_author -ALTER TABLE llx_product CHANGE COLUMN fk_user_author fk_user_author INTEGER NULL DEFAULT NULL; +ALTER TABLE llx_product MODIFY COLUMN fk_user_author INTEGER NULL DEFAULT NULL; ALTER TABLE llx_product ADD INDEX idx_product_fk_user_author (fk_user_author); -- fk_barcode_type -ALTER TABLE llx_product CHANGE COLUMN fk_barcode_type fk_barcode_type INTEGER NULL DEFAULT NULL; +ALTER TABLE llx_product MODIFY COLUMN fk_barcode_type INTEGER NULL DEFAULT NULL; UPDATE llx_product SET fk_barcode_type = NULL WHERE fk_barcode_type = 0; ALTER TABLE llx_product ADD INDEX idx_product_fk_barcode_type (fk_barcode_type); ALTER TABLE llx_product ADD CONSTRAINT fk_product_barcode_type FOREIGN KEY (fk_barcode_type) REFERENCES llx_c_barcode_type (rowid); diff --git a/htdocs/install/mysql/tables/llx_expeditiondet_batch.key.sql b/htdocs/install/mysql/tables/llx_expeditiondet_batch.key.sql index 2c5428d6224..f0438b6316c 100644 --- a/htdocs/install/mysql/tables/llx_expeditiondet_batch.key.sql +++ b/htdocs/install/mysql/tables/llx_expeditiondet_batch.key.sql @@ -16,4 +16,4 @@ -- -- ============================================================================ ALTER TABLE llx_expeditiondet_batch ADD INDEX ix_fk_expeditiondet (fk_expeditiondet); -ALTER TABLE llx_expeditiondet_batch ADD CONSTRAINT fk_expeditiondet_batch_fk_expeditiondet FOREIGN KEY (fk_expeditiondet) REFERENCES llx_expeditiondet (rowid) ON DELETE CASCADE; +ALTER TABLE llx_expeditiondet_batch ADD CONSTRAINT fk_expeditiondet_batch_fk_expeditiondet FOREIGN KEY (fk_expeditiondet) REFERENCES llx_expeditiondet(rowid); diff --git a/htdocs/install/mysql/tables/llx_product_batch.key.sql b/htdocs/install/mysql/tables/llx_product_batch.key.sql index 6c184f2e1b3..7057d872df4 100644 --- a/htdocs/install/mysql/tables/llx_product_batch.key.sql +++ b/htdocs/install/mysql/tables/llx_product_batch.key.sql @@ -16,4 +16,4 @@ -- -- ============================================================================ ALTER TABLE llx_product_batch ADD INDEX ix_fk_product_stock (fk_product_stock); -ALTER TABLE llx_product_batch ADD CONSTRAINT fk_product_batch_fk_product_stock FOREIGN KEY (fk_product_stock) REFERENCES llx_product_stock (rowid) ON DELETE CASCADE; +ALTER TABLE llx_product_batch ADD CONSTRAINT fk_product_batch_fk_product_stock FOREIGN KEY (fk_product_stock) REFERENCES llx_product_stock (rowid); diff --git a/test/phpunit/SqlTest.php b/test/phpunit/SqlTest.php index 4cc5939b34d..f86c6fcc57b 100755 --- a/test/phpunit/SqlTest.php +++ b/test/phpunit/SqlTest.php @@ -149,11 +149,15 @@ class SqlTest extends PHPUnit_Framework_TestCase $result=strpos($filecontent,'`'); print __METHOD__." Result for checking we don't have back quote = ".$result."\n"; - $this->assertTrue($result===false); + $this->assertTrue($result===false, 'Found ON back quote. Bad.'); $result=strpos($filecontent,'int('); print __METHOD__." Result for checking we don't have 'int(' instead of 'integer' = ".$result."\n"; - $this->assertTrue($result===false); + $this->assertTrue($result===false, 'Found int(x) instead of integer. Bad.'); + + $result=strpos($filecontent,'ON DELETE CASCADE'); + print __METHOD__." Result for checking we don't have 'ON DELETE CASCADE' = ".$result."\n"; + $this->assertTrue($result===false, 'Found ON DELETE CASCADE. Bad.'); } return; From 2b83d3fda7d245346eb7b96c2e32b88c0ca764d4 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 8 Jul 2014 21:44:55 +0200 Subject: [PATCH 130/258] Fix: File for migration 3.5 to 3.6 was modified. --- .../install/mysql/migration/3.5.0-3.6.0.sql | 2300 ++++++++++------- 1 file changed, 1381 insertions(+), 919 deletions(-) diff --git a/htdocs/install/mysql/migration/3.5.0-3.6.0.sql b/htdocs/install/mysql/migration/3.5.0-3.6.0.sql index 3bc61ef314c..e9bbe125644 100644 --- a/htdocs/install/mysql/migration/3.5.0-3.6.0.sql +++ b/htdocs/install/mysql/migration/3.5.0-3.6.0.sql @@ -86,923 +86,6 @@ ALTER TABLE llx_c_tva ADD UNIQUE INDEX uk_c_tva_id (fk_pays, taux, recuperableon ALTER TABLE llx_accountingaccount MODIFY COLUMN label varchar(255); --- Plan comptable BE PCMN-BASE -INSERT INTO llx_accounting_system (pcg_version, fk_pays, label, active) VALUES ('PCMN-BASE', '2', 'The base accountancy belgium plan', '1'); - -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CAPIT', 'XXXXXX', '10', '1', 'Capital', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CAPIT', 'XXXXXX', '100', '10', 'Capital souscrit ou capital personnel', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CAPIT', 'XXXXXX', '1000', '100', 'Capital non amorti', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CAPIT', 'XXXXXX', '1001', '100', 'Capital amorti', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CAPIT', 'XXXXXX', '101', '10', 'Capital non appelé', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CAPIT', 'XXXXXX', '109', '10', 'Compte de l''exploitant', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CAPIT', 'XXXXXX', '1090', '109', 'Opérations courantes', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CAPIT', 'XXXXXX', '1091', '109', 'Impôts personnels', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CAPIT', 'XXXXXX', '1092', '109', 'Rémunérations et autres avantages', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CAPIT', 'XXXXXX', '11', '1', 'Primes d''émission', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CAPIT', 'XXXXXX', '12', '1', 'Plus-values de réévaluation', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CAPIT', 'XXXXXX', '120', '12', 'Plus-values de réévaluation sur immobilisations incorporelles', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CAPIT', 'XXXXXX', '1200', '120', 'Plus-values de réévaluation', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CAPIT', 'XXXXXX', '1201', '120', 'Reprises de réductions de valeur', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CAPIT', 'XXXXXX', '121', '12', 'Plus-values de réévaluation sur immobilisations corporelles', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CAPIT', 'XXXXXX', '1210', '121', 'Plus-values de réévaluation', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CAPIT', 'XXXXXX', '1211', '121', 'Reprises de réductions de valeur', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CAPIT', 'XXXXXX', '122', '12', 'Plus-values de réévaluation sur immobilisations financières', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CAPIT', 'XXXXXX', '1220', '122', 'Plus-values de réévaluation', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CAPIT', 'XXXXXX', '1221', '122', 'Reprises de réductions de valeur', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CAPIT', 'XXXXXX', '123', '12', 'Plus-values de réévaluation sur stocks', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CAPIT', 'XXXXXX', '124', '12', 'Reprises de réductions de valeur sur placements de trésorerie', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CAPIT', 'XXXXXX', '13', '1', 'Réserve', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CAPIT', 'XXXXXX', '130', '13', 'Réserve légale', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CAPIT', 'XXXXXX', '131', '13', 'Réserves indisponibles', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CAPIT', 'XXXXXX', '1310', '131', 'Réserve pour actions propres', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CAPIT', 'XXXXXX', '1311', '131', 'Autres réserves indisponibles', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CAPIT', 'XXXXXX', '132', '13', 'Réserves immunisées', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CAPIT', 'XXXXXX', '133', '13', 'Réserves disponibles', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CAPIT', 'XXXXXX', '1330', '133', 'Réserve pour régularisation de dividendes', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CAPIT', 'XXXXXX', '1331', '133', 'Réserve pour renouvellement des immobilisations', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CAPIT', 'XXXXXX', '1332', '133', 'Réserve pour installations en faveur du personnel 1333 Réserves libres', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CAPIT', 'XXXXXX', '14', '1', 'Bénéfice reporté (ou perte reportée)', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CAPIT', 'XXXXXX', '15', '1', 'Subsides en capital', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CAPIT', 'XXXXXX', '150', '15', 'Montants obtenus', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CAPIT', 'XXXXXX', '151', '15', 'Montants transférés aux résultats', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CAPIT', 'XXXXXX', '16', '1', 'Provisions pour risques et charges', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CAPIT', 'XXXXXX', '160', '16', 'Provisions pour pensions et obligations similaires', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CAPIT', 'XXXXXX', '161', '16', 'Provisions pour charges fiscales', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CAPIT', 'XXXXXX', '162', '16', 'Provisions pour grosses réparations et gros entretiens', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CAPIT', 'XXXXXX', '163', '16', 'à 169 Provisions pour autres risques et charges', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CAPIT', 'XXXXXX', '164', '16', 'Provisions pour sûretés personnelles ou réelles constituées à l''appui de dettes et d''engagements de tiers', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CAPIT', 'XXXXXX', '165', '16', 'Provisions pour engagements relatifs à l''acquisition ou à la cession d''immobilisations', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CAPIT', 'XXXXXX', '166', '16', 'Provisions pour exécution de commandes passées ou reçues', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CAPIT', 'XXXXXX', '167', '16', 'Provisions pour positions et marchés à terme en devises ou positions et marchés à terme en marchandises', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CAPIT', 'XXXXXX', '168', '16', 'Provisions pour garanties techniques attachées aux ventes et prestations déjà effectuées par l''entreprise', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CAPIT', 'XXXXXX', '169', '16', 'Provisions pour autres risques et charges', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CAPIT', 'XXXXXX', '1690', '169', 'Pour litiges en cours', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CAPIT', 'XXXXXX', '1691', '169', 'Pour amendes, doubles droits et pénalités', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CAPIT', 'XXXXXX', '1692', '169', 'Pour propre assureur', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CAPIT', 'XXXXXX', '1693', '169', 'Pour risques inhérents aux opérations de crédits à moyen ou long terme', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CAPIT', 'XXXXXX', '1695', '169', 'Provision pour charge de liquidation', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CAPIT', 'XXXXXX', '1696', '169', 'Provision pour départ de personnel', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CAPIT', 'XXXXXX', '1699', '169', 'Pour risques divers', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CAPIT', 'XXXXXX', '17', '1', 'Dettes à plus d''un an', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CAPIT', 'XXXXXX', '170', '17', 'Emprunts subordonnés', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CAPIT', 'XXXXXX', '1700', '170', 'Convertibles', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CAPIT', 'XXXXXX', '1701', '170', 'Non convertibles', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CAPIT', 'XXXXXX', '171', '17', 'Emprunts obligataires non subordonnés', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CAPIT', 'XXXXXX', '1710', '171', 'Convertibles', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CAPIT', 'XXXXXX', '1711', '171', 'Non convertibles', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CAPIT', 'XXXXXX', '172', '17', 'Dettes de location-financement et assimilés', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CAPIT', 'XXXXXX', '1720', '172', 'Dettes de location-financement de biens immobiliers', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CAPIT', 'XXXXXX', '1721', '172', 'Dettes de location-financement de biens mobiliers', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CAPIT', 'XXXXXX', '1722', '172', 'Dettes sur droits réels sur immeubles', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CAPIT', 'XXXXXX', '173', '17', 'Etablissements de crédit', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CAPIT', 'XXXXXX', '1730', '173', 'Dettes en compte', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CAPIT', 'XXXXXX', '17300', '1730', 'Banque A', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CAPIT', 'XXXXXX', '17301', '1730', 'Banque B', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CAPIT', 'XXXXXX', '17302', '1730', 'Banque C', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CAPIT', 'XXXXXX', '17303', '1730', 'Banque D', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CAPIT', 'XXXXXX', '1731', '173', 'Promesses', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CAPIT', 'XXXXXX', '17310', '1731', 'Banque A', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CAPIT', 'XXXXXX', '17311', '1731', 'Banque B', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CAPIT', 'XXXXXX', '17312', '1731', 'Banque C', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CAPIT', 'XXXXXX', '17313', '1731', 'Banque D', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CAPIT', 'XXXXXX', '1732', '173', 'Crédits d''acceptation', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CAPIT', 'XXXXXX', '17320', '1732', 'Banque A', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CAPIT', 'XXXXXX', '17321', '1732', 'Banque B', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CAPIT', 'XXXXXX', '17322', '1732', 'Banque C', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CAPIT', 'XXXXXX', '17323', '1732', 'Banque D', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CAPIT', 'XXXXXX', '174', '17', 'Autres emprunts', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CAPIT', 'XXXXXX', '175', '17', 'Dettes commerciales', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CAPIT', 'XXXXXX', '1750', '175', 'Fournisseurs : dettes en compte', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CAPIT', 'XXXXXX', '17500', '1750', 'Entreprises apparentées', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CAPIT', 'XXXXXX', '175000', '17500', 'Entreprises liées', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CAPIT', 'XXXXXX', '175001', '17500', 'Entreprises avec lesquelles il existe un lien de participation', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CAPIT', 'XXXXXX', '17501', '1750', 'Fournisseurs ordinaires', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CAPIT', 'XXXXXX', '175010', '17501', 'Fournisseurs belges', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CAPIT', 'XXXXXX', '175011', '17501', 'Fournisseurs C.E.E.', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CAPIT', 'XXXXXX', '175012', '17501', 'Fournisseurs importation', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CAPIT', 'XXXXXX', '1751', '175', 'Effets à payer', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CAPIT', 'XXXXXX', '17510', '1751', 'Entreprises apparentées', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CAPIT', 'XXXXXX', '175100', '17510', 'Entreprises liées', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CAPIT', 'XXXXXX', '175101', '17510', 'Entreprises avec lesquelles il existe un lien de participation', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CAPIT', 'XXXXXX', '17511', '1751', 'Fournisseurs ordinaires', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CAPIT', 'XXXXXX', '175110', '17511', 'Fournisseurs belges', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CAPIT', 'XXXXXX', '175111', '17511', 'Fournisseurs C.E.E.', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CAPIT', 'XXXXXX', '175112', '17511', 'Fournisseurs importation', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CAPIT', 'XXXXXX', '176', '17', 'Acomptes reçus sur commandes', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CAPIT', 'XXXXXX', '178', '17', 'Cautionnements reçus en numéraires', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CAPIT', 'XXXXXX', '179', '17', 'Dettes diverses', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CAPIT', 'XXXXXX', '1790', '179', 'Entreprises liées', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CAPIT', 'XXXXXX', '1791', '179', 'Autres entreprises avec lesquelles il existe un lien de participation', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CAPIT', 'XXXXXX', '1792', '179', 'Administrateurs, gérants et associés', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CAPIT', 'XXXXXX', '1794', '179', 'Rentes viagères capitalisées', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CAPIT', 'XXXXXX', '1798', '179', 'Dettes envers les coparticipants des associations momentanées et en participation', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CAPIT', 'XXXXXX', '1799', '179', 'Autres dettes diverses', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CAPIT', 'XXXXXX', '18', '1', 'Comptes de liaison des établissements et succursales', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '20', '2', 'Frais d''établissement', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '200', '20', 'Frais de constitution et d''augmentation de capital', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2000', '200', 'Frais de constitution et d''augmentation de capital', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2009', '200', 'Amortissements sur frais de constitution et d''augmentation de capital', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '201', '20', 'Frais d''émission d''emprunts et primes de remboursement', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2010', '201', 'Agios sur emprunts et frais d''émission d''emprunts', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2019', '201', 'Amortissements sur agios sur emprunts et frais d''émission d''emprunts', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '202', '20', 'Autres frais d''établissement', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2020', '202', 'Autres frais d''établissement', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2029', '202', 'Amortissements sur autres frais d''établissement', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '203', '20', 'Intérêts intercalaires', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2030', '203', 'Intérêts intercalaires', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2039', '203', 'Amortissements sur intérêts intercalaires', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '204', '20', 'Frais de restructuration', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2040', '204', 'Coût des frais de restructuration', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2049', '204', 'Amortissements sur frais de restructuration', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '21', '2', 'Immobilisations incorporelles', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '210', '21', 'Frais de recherche et de développement', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2100', '210', 'Frais de recherche et de mise au point', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2108', '210', 'Plus-values actées sur frais de recherche et de mise au point', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2109', '210', 'Amortissements sur frais de recherche et de mise au point', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '211', '21', 'Concessions, brevets, licences, savoir-faire, marque et droits similaires', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2110', '211', 'Concessions, brevets, licences, marques, etc', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2118', '211', 'Plus-values actées sur concessions, etc', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2119', '211', 'Amortissements sur concessions, etc', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '212', '21', 'Goodwill', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2120', '212', 'Coût d''acquisition', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2128', '212', 'Plus-values actées', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2129', '212', 'Amortissements sur goodwill', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '213', '21', 'Acomptes versés', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '22', '2', 'Terrains et constructions', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '220', '22', 'Terrains', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2200', '220', 'Terrains', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2201', '220', 'Frais d''acquisition sur terrains', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2208', '220', 'Plus-values actées sur terrains', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2209', '220', 'Amortissements et réductions de valeur', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '22090', '2209', 'Amortissements sur frais d''acquisition', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '22091', '2209', 'Réductions de valeur sur terrains', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '221', '22', 'Constructions', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2210', '221', 'Bâtiments industriels', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2211', '221', 'Bâtiments administratifs et commerciaux', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2212', '221', 'Autres bâtiments d''exploitation', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2213', '221', 'Voies de transport et ouvrages d''art', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2215', '221', 'Constructions sur sol d''autrui', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2216', '221', 'Frais d''acquisition sur constructions', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2218', '221', 'Plus-values actées', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '22180', '2218', 'Sur bâtiments industriels', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '22181', '2218', 'Sur bâtiments administratifs et commerciaux', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '22182', '2218', 'Sur autres bâtiments d''exploitation', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '22184', '2218', 'Sur voies de transport et ouvrages d''art', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2219', '221', 'Amortissements sur constructions', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '22190', '2219', 'Sur bâtiments industriels', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '22191', '2219', 'Sur bâtiments administratifs et commerciaux', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '22192', '2219', 'Sur autres bâtiments d''exploitation', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '22194', '2219', 'Sur voies de transport et ouvrages d''art', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '22195', '2219', 'Sur constructions sur sol d''autrui', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '22196', '2219', 'Sur frais d''acquisition sur constructions', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '222', '22', 'Terrains bâtis', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2220', '222', 'Valeur d''acquisition', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '22200', '2220', 'Bâtiments industriels', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '22201', '2220', 'Bâtiments administratifs et commerciaux', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '22202', '2220', 'Autres bâtiments d''exploitation', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '22203', '2220', 'Voies de transport et ouvrages d''art', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '22204', '2220', 'Frais d''acquisition des terrains à bâtir', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2228', '222', 'Plus-values actées', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '22280', '2228', 'Sur bâtiments industriels', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '22281', '2228', 'Sur bâtiments administratifs et commerciaux', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '22282', '2228', 'Sur autres bâtiments d''exploitation', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '22283', '2228', 'Sur voies de transport et ouvrages d''art', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2229', '222', 'Amortissements sur terrains bâtis', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '22290', '2229', 'Sur bâtiments industriels', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '22291', '2229', 'Sur bâtiments administratifs et commerciaux', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '22292', '2229', 'Sur autres bâtiments d''exploitation', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '22293', '2229', 'Sur voies de transport et ouvrages d''art', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '22294', '2229', 'Sur frais d''acquisition des terrains bâtis', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '223', '22', 'Autres droits réels sur des immeubles', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2230', '223', 'Valeur d''acquisition', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2238', '223', 'Plus-values actées', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2239', '223', 'Amortissements', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '23', '2', 'Installations, machines et outillages', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '230', '23', 'Installations', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2300', '230', 'Installations bâtiments industriels', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2301', '230', 'Installations bâtiments administratifs et commerciaux', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2302', '230', 'Installations bâtiments d''exploitation', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2303', '230', 'Installations voies de transport et ouvrages d''art', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2300', '230', 'Installation d''eau', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2301', '230', 'Installation d''électricité', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2302', '230', 'Installation de vapeur', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2303', '230', 'Installation de gaz', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2304', '230', 'Installation de chauffage', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2305', '230', 'Installation de conditionnement d''air', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2306', '230', 'Installation de chargement', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '231', '23', 'Machines', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2310', '231', 'Division A', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2311', '231', 'Division B', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2312', '231', 'Division C', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '237', '23', 'Outillage', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2370', '237', 'Division A', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2371', '237', 'Division B', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2372', '237', 'Division C', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '238', '23', 'Plus-values actées', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2380', '238', 'Sur installations', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2381', '238', 'Sur machines', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2382', '238', 'Sur outillage', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '239', '23', 'Amortissements', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2390', '239', 'Sur installations', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2391', '239', 'Sur machines', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2392', '239', 'Sur outillage', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '24', '2', 'Mobilier et matériel roulant', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '240', '24', 'Mobilier', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2400', '240', 'Mobilier', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '24000', '2400', 'Mobilier des bâtiments industriels', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '24001', '2400', 'Mobilier des bâtiments administratifs et commerciaux', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '24002', '2400', 'Mobilier des autres bâtiments d''exploitation', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '24003', '2400', 'Mobilier oeuvres sociales', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2401', '240', 'Matériel de bureau et de service social', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '24010', '2401', 'Des bâtiments industriels', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '24011', '2401', 'Des bâtiments administratifs et commerciaux', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '24012', '2401', 'Des autres bâtiments d''exploitation', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '24013', '2401', 'Des oeuvres sociales', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2408', '240', 'Plus-values actées', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '24080', '2408', 'Plus-values actées sur mobilier', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '24081', '2408', 'Plus-values actées sur matériel de bureau et service social', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2409', '240', 'Amortissements', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '24090', '2409', 'Amortissements sur mobilier', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '24091', '2409', 'Amortissements sur matériel de bureau et service social', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '241', '24', 'Matériel roulant', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2410', '241', 'Matériel automobile', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '24100', '2410', 'Voitures', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '24105', '2410', 'Camions', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2411', '241', 'Matériel ferroviaire', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2412', '241', 'Matériel fluvial', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2413', '241', 'Matériel naval', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2414', '241', 'Matériel aérien', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2418', '241', 'Plus-values sur matériel roulant', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '24180', '2418', 'Plus-values sur matériel automobile', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '24181', '2418', 'Idem sur matériel ferroviaire', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '24182', '2418', 'Idem sur matériel fluvial', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '24183', '2418', 'Idem sur matériel naval', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '24184', '2418', 'Idem sur matériel aérien', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2419', '241', 'Amortissements sur matériel roulant', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '24190', '2419', 'Amortissements sur matériel automobile', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '24191', '2419', 'Idem sur matériel ferroviaire', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '24192', '2419', 'Idem sur matériel fluvial', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '24193', '2419', 'Idem sur matériel naval', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '24194', '2419', 'Idem sur matériel aérien', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '25', '2', 'Immobilisation détenues en location-financement et droits similaires', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '250', '25', 'Terrains et constructions', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2500', '250', 'Terrains', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2501', '250', 'Constructions', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2508', '250', 'Plus-values sur emphytéose, leasing et droits similaires : terrains et constructions', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2509', '250', 'Amortissements et réductions de valeur sur terrains et constructions en leasing', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '(', '25', 'Installations, machines et outillage', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2510', '251', 'Installations', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2511', '251', 'Machines', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2512', '251', 'Outillage', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2518', '251', 'Plus-values actées sur installations machines et outillage pris en leasing', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2519', '251', 'Amortissements sur installations machines et outillage pris en leasing', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '252', '25', 'Mobilier et matériel roulant', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2520', '252', 'Mobilier', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2521', '252', 'Matériel roulant', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2528', '252', 'Plus-values actées sur mobilier et matériel roulant en leasing', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2529', '252', 'Amortissements sur mobilier et matériel roulant en leasing', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '26', '2', 'Autres immobilisations corporelles', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '260', '26', 'Frais d''aménagements de locaux pris en location', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '261', '26', 'Maison d''habitation', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '262', '26', 'Réserve immobilière', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '263', '26', 'Matériel d''emballage', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '264', '26', 'Emballages récupérables', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '268', '26', 'Plus-values actées sur autres immobilisations corporelles', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '269', '26', 'Amortissements sur autres immobilisations corporelles', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2690', '269', 'Amortissements sur frais d''aménagement des locaux pris en location', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2691', '269', 'Amortissements sur maison d''habitation', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2692', '269', 'Amortissements sur réserve immobilière', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2693', '269', 'Amortissements sur matériel d''emballage', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2694', '269', 'Amortissements sur emballages récupérables', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '27', '2', 'Immobilisations corporelles en cours et acomptes versés', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '270', '27', 'Immobilisations en cours', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2700', '270', 'Constructions', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2701', '270', 'Installations machines et outillage', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2702', '270', 'Mobilier et matériel roulant', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2703', '270', 'Autres immobilisations corporelles', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '271', '27', 'Avances et acomptes versés sur immobilisations en cours', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '28', '2', 'Immobilisations financières', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '280', '28', 'Participations dans des entreprises liées', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2800', '280', 'Valeur d''acquisition (peut être subdivisé par participation)', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2801', '280', 'Montants non appelés (idem)', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2808', '280', 'Plus-values actées (idem)', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2809', '280', 'Réductions de valeurs actées (idem)', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '281', '28', 'Créances sur des entreprises liées', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2810', '281', 'Créances en compte', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2811', '281', 'Effets à recevoir', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2812', '281', 'Titres à revenu fixes', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2817', '281', 'Créances douteuses', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2819', '281', 'Réductions de valeurs actées', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '282', '28', 'Participations dans des entreprises avec lesquelles il existe un lien de participation', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2820', '282', 'Valeur d''acquisition (peut être subdivisé par participation)', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2821', '282', 'Montants non appelés (idem)', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2828', '282', 'Plus-values actées (idem)', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2829', '282', 'Réductions de valeurs actées (idem)', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '283', '28', 'Créances sur des entreprises avec lesquelles il existe un lien de participation', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2830', '283', 'Créances en compte', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2831', '283', 'Effets à recevoir', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2832', '283', 'Titres à revenu fixe', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2837', '283', 'Créances douteuses', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2839', '283', 'Réductions de valeurs actées', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '284', '28', 'Autres actions et parts', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2840', '284', 'Valeur d''acquisition', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2841', '284', 'Montants non appelés', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2848', '284', 'Plus-values actées', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2849', '284', 'Réductions de valeur actées', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '285', '28', 'Autres créances', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2850', '285', 'Créances en compte', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2851', '285', 'Effets à recevoir', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2852', '285', 'Titres à revenu fixe', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2857', '285', 'Créances douteuses', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2859', '285', 'Réductions de valeur actées', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '288', '28', 'Cautionnements versés en numéraires', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2880', '288', 'Téléphone, téléfax, télex', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2881', '288', 'Gaz', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2882', '288', 'Eau', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2883', '288', 'Electricité', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2887', '288', 'Autres cautionnements versés en numéraires', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '29', '2', 'Créances à plus d''un an', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '290', '29', 'Créances commerciales', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2900', '290', 'Clients', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '29000', '2900', 'Créances en compte sur entreprises liées', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '29001', '2900', 'Sur entreprises avec lesquelles il existe un lien de participation', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '29002', '2900', 'Sur clients Belgique', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '29003', '2900', 'Sur clients C.E.E.', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '29004', '2900', 'Sur clients exportation hors C.E.E.', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '29005', '2900', 'Créances sur les coparticipants (associations momentanées)', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2901', '290', 'Effets à recevoir', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '29010', '2901', 'Sur entreprises liées', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '29011', '2901', 'Sur entreprises avec lesquelles il existe un lien de participation', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '29012', '2901', 'Sur clients Belgique', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '29013', '2901', 'Sur clients C.E.E.', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '29014', '2901', 'Sur clients exportation hors C.E.E.', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2905', '290', 'Retenues sur garanties', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2906', '290', 'Acomptes versés', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2907', '290', 'Créances douteuses (à ventiler comme clients 2900)', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2909', '290', 'Réductions de valeur actées (à ventiler comme clients 2900)', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '291', '29', 'Autres créances', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2910', '291', 'Créances en compte', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '29100', '2910', 'Sur entreprises liées', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '29101', '2910', 'Sur entreprises avec lesquelles il existe un lien de participation', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '29102', '2910', 'Sur autres débiteurs', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2911', '291', 'Effets à recevoir', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '29110', '2911', 'Sur entreprises liées', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '29111', '2911', 'Sur entreprises avec lesquelles il existe un lien de participation', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '29112', '2911', 'Sur autres débiteurs', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2912', '291', 'Créances résultant de la cession d''immobilisations données en leasing', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2917', '291', 'Créances douteuses', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'IMMO', 'XXXXXX', '2919', '291', 'Réductions de valeur actées', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'STOCK', 'XXXXXX', '30', '3', 'Approvisionnements - matières premières', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'STOCK', 'XXXXXX', '300', '30', 'Valeur d''acquisition', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'STOCK', 'XXXXXX', '309', '30', 'Réductions de valeur actées', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'STOCK', 'XXXXXX', '31', '3', 'Approvsionnements et fournitures', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'STOCK', 'XXXXXX', '310', '31', 'Valeur d''acquisition', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'STOCK', 'XXXXXX', '3100', '310', 'Matières d''approvisionnement', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'STOCK', 'XXXXXX', '3101', '310', 'Energie, charbon, coke, mazout, essence, propane', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'STOCK', 'XXXXXX', '3102', '310', 'Produits d''entretien', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'STOCK', 'XXXXXX', '3103', '310', 'Fournitures diverses et petit outillage', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'STOCK', 'XXXXXX', '3104', '310', 'Imprimés et fournitures de bureau', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'STOCK', 'XXXXXX', '3105', '310', 'Fournitures de services sociaux', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'STOCK', 'XXXXXX', '3106', '310', 'Emballages commerciaux', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'STOCK', 'XXXXXX', '31060', '3106', 'Emballages perdus', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'STOCK', 'XXXXXX', '31061', '3106', 'Emballages récupérables', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'STOCK', 'XXXXXX', '319', '31', 'Réductions de valeur actées', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'STOCK', 'XXXXXX', '32', '3', 'En cours de fabrication', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'STOCK', 'XXXXXX', '320', '32', 'Valeur d''acquisition', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'STOCK', 'XXXXXX', '3200', '320', 'Produits semi-ouvrés', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'STOCK', 'XXXXXX', '3201', '320', 'Produits en cours de fabrication', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'STOCK', 'XXXXXX', '3202', '320', 'Travaux en cours', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'STOCK', 'XXXXXX', '3205', '320', 'Déchets', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'STOCK', 'XXXXXX', '3206', '320', 'Rebuts', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'STOCK', 'XXXXXX', '3209', '320', 'Travaux en association momentanée', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'STOCK', 'XXXXXX', '329', '32', 'Réductions de valeur actées', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'STOCK', 'XXXXXX', '33', '3', 'Produits finis', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'STOCK', 'XXXXXX', '330', '33', 'Valeur d''acquisition', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'STOCK', 'XXXXXX', '3300', '330', 'Produits finis', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'STOCK', 'XXXXXX', '339', '33', 'Réductions de valeur actées', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'STOCK', 'XXXXXX', '34', '3', 'Marchandises', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'STOCK', 'XXXXXX', '340', '34', 'Valeur d''acquisition', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'STOCK', 'XXXXXX', '3400', '340', 'Groupe A', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'STOCK', 'XXXXXX', '3401', '340', 'Groupe B', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'STOCK', 'XXXXXX', '3402', '340', 'Groupe C', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'STOCK', 'XXXXXX', '349', '34', 'Réductions de valeur actées', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'STOCK', 'XXXXXX', '35', '3', 'Immeubles destinés à la vente', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'STOCK', 'XXXXXX', '350', '35', 'Valeur d''acquisition', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'STOCK', 'XXXXXX', '3500', '350', 'Immeuble A', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'STOCK', 'XXXXXX', '3501', '350', 'Immeuble B', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'STOCK', 'XXXXXX', '3502', '350', 'Immeuble C', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'STOCK', 'XXXXXX', '351', '35', 'Immeubles construits en vue de leur revente', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'STOCK', 'XXXXXX', '3510', '351', 'Immeuble A', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'STOCK', 'XXXXXX', '3511', '351', 'Immeuble B', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'STOCK', 'XXXXXX', '3512', '351', 'Immeuble C', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'STOCK', 'XXXXXX', '359', '35', 'Réductions de valeurs actées', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'STOCK', 'XXXXXX', '36', '3', 'Acomptes versés sur achats pour stocks', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'STOCK', 'XXXXXX', '360', '36', 'Acomptes versés (à ventiler éventuellement par catégorie)', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'STOCK', 'XXXXXX', '369', '36', 'Réductions de valeur actées', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'STOCK', 'XXXXXX', '37', '3', 'Commandes en cours d''exécution', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'STOCK', 'XXXXXX', '370', '37', 'Valeur d''acquisition', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'STOCK', 'XXXXXX', '371', '37', 'Bénéfice pris en compte', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'STOCK', 'XXXXXX', '379', '37', 'Réductions de valeur actées', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '40', '4', 'Créances commerciales', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '400', '40', 'Clients', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '4007', '400', 'Rabais, remises et ristournes à accorder et autres notes de crédit à établir', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '4008', '400', 'Créances résultant de livraisons de biens (associations momentanées)', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '401', '40', 'Effets à recevoir', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '4010', '401', 'Effets à recevoir', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '4013', '401', 'Effets à l''encaissement', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '4015', '401', 'Effets à l''escompte', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '402', '40', 'Clients, créances courantes, entreprises apparentées, administrateurs et gérants', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '4020', '402', 'Entreprises liées', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '4021', '402', 'Autres entreprises avec lesquelles il existe un lien de participation', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '4022', '402', 'Administrateurs et gérants d''entreprise', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '403', '40', 'Effets à recevoir sur entreprises apparentées et administrateurs et gérants', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '4030', '403', 'Entreprises liées', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '4031', '403', 'Autres entreprises avec lesquelles il existe un lien de participation', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '4032', '403', 'Administrateurs et gérants de l''entreprise', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '404', '40', 'Produits à recevoir (factures à établir)', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '405', '40', 'Clients : retenues sur garanties', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '406', '40', 'Acomptes versés', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '407', '40', 'Créances douteuses', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '408', '40', 'Compensation clients', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '409', '40', 'Réductions de valeur actées', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '41', '4', 'Autres créances', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '410', '41', 'Capital appelé, non versé', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '4100', '410', 'Appels de fonds', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '4101', '410', 'Actionnaires défaillants', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '411', '41', 'T.V.A. à récupérer', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '4110', '411', 'T.V.A. due', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '4111', '411', 'T.V.A. déductible', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '4112', '411', 'Compte courant administration T.V.A.', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '4118', '411', 'Taxe d''égalisation due', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '412', '41', 'Impôts et versements fiscaux à récupérer', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '4120', '412', 'Impôts belges sur le résultat', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '4125', '412', 'Autres impôts belges', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '4128', '412', 'Impôts étrangers', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '414', '41', 'Produits à recevoir', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '416', '41', 'Créances diverses', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '4160', '416', 'Associés (compte d''apport en société)', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '4161', '416', 'Avances et prêts au personnel', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '4162', '416', 'Compte courant des associés en S.P.R.L.', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '4163', '416', 'Compte courant des administrateurs et gérants', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '4164', '416', 'Créances sur sociétés apparentées', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '4166', '416', 'Emballages et matériel à rendre', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '4167', '416', 'Etat et établissements publics', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '41670', '4167', 'Subsides à recevoir', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '41671', '4167', 'Autres créances', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '4168', '416', 'Rabais, ristournes et remises à obtenir et autres avoirs non encore reçus', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '417', '41', 'Créances douteuses', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '418', '41', 'Cautionnements versés en numéraires', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '419', '41', 'Réductions de valeur actées', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '42', '4', 'Dettes à plus d''un an échéant dans l''année', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '420', '42', 'Emprunts subordonnés', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '4200', '420', 'Convertibles', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '4201', '420', 'Non convertibles', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '421', '42', 'Emprunts obligataires non subordonnés', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '4210', '421', 'Convertibles', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '4211', '421', 'Non convertibles', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '422', '42', 'Dettes de location-financement et assimilées', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '4220', '422', 'Financement de biens immobiliers', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '4221', '422', 'Financement de biens mobiliers', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '423', '42', 'Etablissements de crédit', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '4230', '423', 'Dettes en compte', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '4231', '423', 'Promesses', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '4232', '423', 'Crédits d''acceptation', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '424', '42', 'Autres emprunts', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '425', '42', 'Dettes commerciales', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '4250', '425', 'Fournisseurs', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '4251', '425', 'Effets à payer', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '426', '42', 'Cautionnements reçus en numéraires', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '429', '42', 'Dettes diverses', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '4290', '429', 'Entreprises liées', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '4291', '429', 'Entreprises avec lesquelles il existe un lien de participation', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '4292', '429', 'Administrateurs, gérants, associés', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '4299', '429', 'Autres dettes', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '43', '4', 'Dettes financières', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '430', '43', 'Etablissements de crédit. Emprunts en compte à terme fixe', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '431', '43', 'Etablissements de crédit. Promesses', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '432', '43', 'Etablissements de crédit. Crédits d''acceptation', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '433', '43', 'Etablissements de crédit. Dettes en compte courant', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '439', '43', 'Autres emprunts', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '44', '4', 'Dettes commerciales', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '440', '44', 'Fournisseurs', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '4400', '440', 'Entreprises apparentées', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '44000', '4400', 'Entreprises liées', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '44001', '4400', 'Entreprises avec lesquelles il existe un lien de participation', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '4401', '440', 'Fournisseurs ordinaires', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '44010', '4401', 'Fournisseurs belges', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '44011', '4401', 'Fournisseurs CEE', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '44012', '4401', 'Fournisseurs importation', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '4402', '440', 'Dettes envers les coparticipants (associations momentanées)', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '4403', '440', 'Fournisseurs - retenues de garanties', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '441', '44', 'Effets à payer', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '4410', '441', 'Entreprises apparentées', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '44100', '4410', 'Entreprises liées', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '44101', '4410', 'Entreprises avec lesquelles il existe un lien de participation', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '4411', '441', 'Fournisseurs ordinaires', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '44110', '4411', 'Fournisseurs belges', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '44111', '4411', 'Fournisseurs CEE', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '44112', '4411', 'Fournisseurs importation', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '444', '44', 'Factures à recevoir', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '446', '44', 'Acomptes reçus', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '448', '44', 'Compensations fournisseurs', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '45', '4', 'Dettes fiscales, salariales et sociales', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '450', '45', 'Dettes fiscales estimées', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '4501', '450', 'Impôts sur le résultat', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '4505', '450', 'Autres impôts en Belgique', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '4508', '450', 'Impôts à l''étranger', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '451', '45', 'T.V.A. à payer', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '4510', '451', 'T.V.A. due', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '4511', '451', 'T.V.A. déductible', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '4512', '451', 'Compte courant administration T.V.A.', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '4518', '451', 'Taxe d''égalisation due', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '452', '45', 'Impôts et taxes à payer', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '4520', '452', 'Autres impôts sur le résultat', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '4525', '452', 'Autres impôts et taxes en Belgique', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '45250', '4525', 'Précompte immobilier', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '45251', '4525', 'Impôts communaux à payer', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '45252', '4525', 'Impôts provinciaux à payer', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '45253', '4525', 'Autres impôts et taxes à payer', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '4528', '452', 'Impôts et taxes à l''étranger', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '453', '45', 'Précomptes retenus', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '4530', '453', 'Précompte professionnel retenu sur rémunérations', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '4531', '453', 'Précompte professionnel retenu sur tantièmes', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '4532', '453', 'Précompte mobilier retenu sur dividendes attribués', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '4533', '453', 'Précompte mobilier retenu sur intérêts payés', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '4538', '453', 'Autres précomptes retenus', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '454', '45', 'Office National de la Sécurité Sociale', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '4540', '454', 'Arriérés', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '4541', '454', '1er trimestre', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '4542', '454', '2ème trimestre', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '4543', '454', '3ème trimestre', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '4544', '454', '4ème trimestre', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '455', '45', 'Rémunérations', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '4550', '455', 'Administrateurs, gérants et commissaires (non réviseurs)', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '4551', '455', 'Direction', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '4552', '455', 'Employés', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '4553', '455', 'Ouvriers', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '456', '45', 'Pécules de vacances', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '4560', '456', 'Direction', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '4561', '456', 'Employés', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '4562', '456', 'Ouvriers', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '459', '45', 'Autres dettes sociales', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '4590', '459', 'Provision pour gratifications de fin d''année', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '4591', '459', 'Départs de personnel', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '4592', '459', 'Oppositions sur rémunérations', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '4593', '459', 'Assurances relatives au personnel', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '45930', '4593', 'Assurance loi', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '45931', '4593', 'Assurance salaire garanti', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '45932', '4593', 'Assurance groupe', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '45933', '4593', 'Assurances individuelles', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '4594', '459', 'Caisse d''assurances sociales pour travailleurs indépendants', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '4597', '459', 'Dettes et provisions sociales diverses', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '46', '4', 'Acomptes reçus sur commande', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '47', '4', 'Dettes découlant de l''affectation des résultats', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '470', '47', 'Dividendes et tantièmes d''exercices antérieurs', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '471', '47', 'Dividendes de l''exercice', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '472', '47', 'Tantièmes de l''exercice', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '473', '47', 'Autres allocataires', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '48', '4', 'Dettes diverses', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '480', '48', 'Obligations et coupons échus', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '481', '48', 'Actionnaires - capital à rembourser', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '482', '48', 'Participation du personnel à payer', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '483', '48', 'Acomptes reçus d''autres tiers à moins d''un an', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '486', '48', 'Emballages et matériel consignés', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '488', '48', 'Cautionnements reçus en numéraires', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '489', '48', 'Autres dettes diverses', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '49', '4', 'Comptes de régularisation et compte d''attente', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '490', '49', 'Charges à reporter (à subdiviser par catégorie de charges)', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '491', '49', 'Produits acquis', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '4910', '491', 'Produits d''exploitation', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '49100', '4910', 'Ristournes et rabais à obtenir', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '49101', '4910', 'Commissions à obtenir', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '49102', '4910', 'Autres produits d''exploitation (redevances par exemple)', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '4911', '491', 'Produits financiers', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '49110', '4911', 'Intérêts courus et non échus sur prêts et débits', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '49111', '4911', 'Autres produits financiers', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '492', '49', 'Charges à imputer (à subdiviser par catégorie de charges)', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '493', '49', 'Produits à reporter', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '4930', '493', 'Produits d''exploitation à reporter', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '4931', '493', 'Produits financiers à reporter', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '499', '49', 'Comptes d''attente', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '4990', '499', 'Compte d''attente', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '4991', '499', 'Compte de répartition périodique des charges', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'TIERS', 'XXXXXX', '4999', '499', 'Transferts d''exercice', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'FINAN', 'XXXXXX', '50', '5', 'Actions propres', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'FINAN', 'XXXXXX', '51', '5', 'Actions et parts', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'FINAN', 'XXXXXX', '510', '51', 'Valeur d''acquisition', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'FINAN', 'XXXXXX', '511', '51', 'Montants non appelés', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'FINAN', 'XXXXXX', '519', '51', 'Réductions de valeur actées', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'FINAN', 'XXXXXX', '52', '5', 'Titres à revenus fixes', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'FINAN', 'XXXXXX', '520', '52', 'Valeur d''acquisition', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'FINAN', 'XXXXXX', '529', '52', 'Réductions de valeur actées', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'FINAN', 'XXXXXX', '53', '5', 'Dépots à terme', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'FINAN', 'XXXXXX', '530', '53', 'De plus d''un an', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'FINAN', 'XXXXXX', '531', '53', 'De plus d''un mois et à un an au plus', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'FINAN', 'XXXXXX', '532', '53', 'd''un mois au plus', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'FINAN', 'XXXXXX', '539', '53', 'Réductions de valeur actées', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'FINAN', 'XXXXXX', '54', '5', 'Valeurs échues à l''encaissement', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'FINAN', 'XXXXXX', '540', '54', 'Chèques à encaisser', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'FINAN', 'XXXXXX', '541', '54', 'Coupons à encaisser', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'FINAN', 'XXXXXX', '55', '5', 'Etablissements de crédit - Comptes ouverts auprès des divers établissements.', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'FINAN', 'XXXXXX', '550', '55', 'Comptes courants', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'FINAN', 'XXXXXX', '551', '55', 'Chèques émis', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'FINAN', 'XXXXXX', '559', '55', 'Réductions de valeur actées', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'FINAN', 'XXXXXX', '56', '5', 'Office des chèques postaux', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'FINAN', 'XXXXXX', '560', '56', 'Compte courant', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'FINAN', 'XXXXXX', '561', '56', 'Chèques émis', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'FINAN', 'XXXXXX', '57', '5', 'Caisses', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'FINAN', 'XXXXXX', '570', '57', 'à 577 Caisses - espèces ( 0 - centrale ; 7 - succursales et agences)', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'FINAN', 'XXXXXX', '578', '57', 'Caisses - timbres ( 0 - fiscaux ; 1 - postaux)', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'FINAN', 'XXXXXX', '58', '5', 'Virements internes', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '60', '6', 'Approvisionnements et marchandises', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '600', '60', 'Achats de matières premières', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '601', '60', 'Achats de fournitures', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '602', '60', 'Achats de services, travaux et études', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '603', '60', 'Sous-traitances générales', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '604', '60', 'Achats de marchandises', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '605', '60', 'Achats d''immeubles destinés à la revente', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '608', '60', 'Remises , ristournes et rabais obtenus sur achats', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '609', '60', 'Variations de stocks', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '6090', '609', 'De matières premières', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '6091', '609', 'De fournitures', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '6094', '609', 'De marchandises', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '6095', '609', 'd''immeubles destinés à la vente', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '61', '6', 'Services et biens divers', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '610', '61', 'Loyers et charges locatives', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '6100', '610', 'Loyers divers', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '6101', '610', 'Charges locatives (assurances, frais de confort,etc)', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '611', '61', 'Entretien et réparation (fournitures et prestations)', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '612', '61', 'Fournitures faites à l''entreprise', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '6120', '612', 'Eau, gaz, électricité, vapeur', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '61200', '6120', 'Eau', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '61201', '6120', 'Gaz', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '61202', '6120', 'Electricité', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '61203', '6120', 'Vapeur', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '6121', '612', 'Téléphone, télégrammes, télex, téléfax, frais postaux', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '61210', '6121', 'Téléphone', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '61211', '6121', 'Télégrammes', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '61212', '6121', 'Télex et téléfax', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '61213', '6121', 'Frais postaux', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '6122', '612', 'Livres, bibliothèque', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '6123', '612', 'Imprimés et fournitures de bureau (si non comptabilisé au 601)', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '613', '61', 'Rétributions de tiers', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '6130', '613', 'Redevances et royalties', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '61300', '6130', 'Redevances pour brevets, licences, marques et accessoires', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '61301', '6130', 'Autres redevances (procédés de fabrication)', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '6131', '613', 'Assurances non relatives au personnel', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '61310', '6131', 'Assurance incendie', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '61311', '6131', 'Assurance vol', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '61312', '6131', 'Assurance autos', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '61313', '6131', 'Assurance crédit', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '61314', '6131', 'Assurances frais généraux', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '6132', '613', 'Divers', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '61320', '6132', 'Commissions aux tiers', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '61321', '6132', 'Honoraires d''avocats, d''experts, etc', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '61322', '6132', 'Cotisations aux groupements professionnels', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '61323', '6132', 'Dons, libéralités, etc', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '61324', '6132', 'Frais de contentieux', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '61325', '6132', 'Publications légales', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '6133', '613', 'Transports et déplacements', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '61330', '6133', 'Transports de personnel', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '61331', '6133', 'Voyages, déplacements et représentations', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '6134', '613', 'Personnel intérimaire', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '614', '61', 'Annonces, publicité, propagande et documentation', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '6140', '614', 'Annonces et insertions', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '6141', '614', 'Catalogues et imprimés', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '6142', '614', 'Echantillons', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '6143', '614', 'Foires et expositions', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '6144', '614', 'Primes', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '6145', '614', 'Cadeaux à la clientèle', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '6146', '614', 'Missions et réceptions', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '6147', '614', 'Documentation', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '615', '61', 'Sous-traitants', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '6150', '615', 'Sous-traitants pour activités propres', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '6151', '615', 'Sous-traitants d''associations momentanées (coparticipants)', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '6152', '615', 'Quote-part bénéficiaire des coparticipants', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '61700', '6170', 'Personnel intérimaire et personnes mises à la disposition de l''entreprise', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '61800', '6180', 'Rémunérations, primes pour assurances extralégales, pensions de retraite et de survie des administrateurs, gérants et associés actifs qui ne sont pas attribuées en vertu d''un contrat de travail', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '62', '6', 'Rémunérations, charges sociales et pensions', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '620', '62', 'Rémunérations et avantages sociaux directs', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '6200', '620', 'Administrateurs ou gérants', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '6201', '620', 'Personnel de direction', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '6202', '620', 'Employés', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '6203', '620', 'Ouvriers', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '6204', '620', 'Autres membres du personnel', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '621', '62', 'Cotisations patronales d''assurances sociales', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '6210', '621', 'Sur salaires', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '6211', '621', 'Sur appointements et commissions', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '622', '62', 'Primes patronales pour assurances extralégales', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '623', '62', 'Autres frais de personnel', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '6230', '623', 'Assurances du personnel', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '62300', '6230', 'Assurances loi, responsabilité civile, chemin du travail', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '62301', '6230', 'Assurance salaire garanti', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '62302', '6230', 'Assurances individuelles', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '6231', '623', 'Charges sociales diverses', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '62310', '6231', 'Jours fériés payés', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '62311', '6231', 'Salaire hebdomadaire garanti', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '62312', '6231', 'Allocations familiales complémentaires', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '6232', '623', 'Charges sociales des administrateurs, gérants et commissaires', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '62320', '6232', 'Allocations familiales complémentaires pour non salariés', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '62321', '6232', 'Lois sociales pour indépendants', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '62322', '6232', 'Divers', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '624', '62', 'Pensions de retraite et de survie', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '6240', '624', 'Administrateurs et gérants', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '6241', '624', 'Personnel', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '625', '62', 'Provision pour pécule de vacances', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '6250', '625', 'Dotations', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '6251', '625', 'Utilisations et reprises', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '63', '6', 'Amortissements, réductions de valeur et provisions pour risques et charges', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '630', '63', 'Dotations aux amortissements et aux réductions de valeur sur immobilisations', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '6300', '630', 'Dotations aux amortissements sur frais d''établissement', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '6301', '630', 'Dotations aux amortissements sur immobilisations incorporelles', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '6302', '630', 'Dotations aux amortissements sur immobilisations corporelles', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '6308', '630', 'Dotations aux réductions de valeur sur immobilisations incorporelles', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '6309', '630', 'Dotations aux réductions de valeur sur immobilisations corporelles', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '631', '63', 'Réductions de valeur sur stocks', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '6310', '631', 'Dotations', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '6311', '631', 'Reprises', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '632', '63', 'Réductions de valeur sur commandes en cours d''exécution', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '6320', '632', 'Dotations', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '6321', '632', 'Reprises', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '633', '63', 'Réductions de valeur sur créances commerciales à plus d''un an', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '6330', '633', 'Dotations', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '6331', '633', 'Reprises', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '634', '63', 'Réductions de valeur sur créances commerciales à un an au plus', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '6340', '634', 'Dotations', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '6341', '634', 'Reprises', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '635', '63', 'Provisions pour pensions et obligations similaires', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '6350', '635', 'Dotations', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '6351', '635', 'Utilisations et reprises', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '636', '63', 'Provisions pour grosses réparations et gros entretiens', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '6360', '636', 'Dotations', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '6361', '636', 'Utilisations et reprises', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '637', '63', 'Provisions pour autres risques et charges', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '6370', '637', 'Dotations', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '6371', '637', 'Utilisations et reprises', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '64', '6', 'Autres charges d''exploitation', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '640', '64', 'Charges fiscales d''exploitation', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '6400', '640', 'Taxes et impôts directs', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '64000', '6400', 'Taxes sur autos et camions', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '6401', '640', 'Taxes et impôts indirects', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '64010', '6401', 'Timbres fiscaux pris en charge par la firme', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '64011', '6401', 'Droits d''enregistrement', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '64012', '6401', 'T.V.A. non déductible', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '6402', '640', 'Impôts provinciaux et communaux', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '64020', '6402', 'Taxe sur la force motrice', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '64021', '6402', 'Taxe sur le personnel occupé', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '6403', '640', 'Taxes diverses', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '641', '64', 'Moins-values sur réalisations courantes d''immobilisations corporelles', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '642', '64', 'Moins-values sur réalisations de créances commerciales', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '643', '64', 'à 648 Charges d''exploitations diverses', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '649', '64', 'Charges d''exploitation portées à l''actif au titre de restructuration', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '65', '6', 'Charges financières', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '650', '65', 'Charges des dettes', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '6500', '650', 'Intérêts, commissions et frais afférents aux dettes', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '6501', '650', 'Amortissements des agios et frais d''émission d''emprunts', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '6502', '650', 'Autres charges de dettes', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '6503', '650', 'Intérêts intercalaires portés à l''actif', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '651', '65', 'Réductions de valeur sur actifs circulants', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '6510', '651', 'Dotations', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '6511', '651', 'Reprises', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '652', '65', 'Moins-values sur réalisation d''actifs circulants', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '653', '65', 'Charges d''escompte de créances', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '654', '65', 'Différences de change', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '655', '65', 'Ecarts de conversion des devises', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '656', '65', 'Frais de banques, de chèques postaux', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '657', '65', 'Commissions sur ouvertures de crédit, cautions et avals', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '658', '65', 'Frais de vente des titres', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '66', '6', 'Charges exceptionnelles', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '660', '66', 'Amortissements et réductions de valeur exceptionnels', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '6600', '660', 'Sur frais d''établissement', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '6601', '660', 'Sur immobilisations incorporelles', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '6602', '660', 'Sur immobilisations corporelles', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '661', '66', 'Réductions de valeur sur immobilisations financières', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '662', '66', 'Provisions pour risques et charges exceptionnels', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '663', '66', 'Moins-values sur réalisation d''actifs immobilisés', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '6630', '663', 'Sur immobilisations incorporelles', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '6631', '663', 'Sur immobilisations corporelles', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '6632', '663', 'Sur immobilisations détenues en location-financement et droits similaires', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '6633', '663', 'Sur immobilisations financières', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '6634', '663', 'Sur immeubles acquis ou construits en vue de la revente', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '664', '66', 'à 668 Autres charges exceptionnelles', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '664', '66', 'Pénalités et amendes diverses', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '665', '66', 'Différence de charge', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '669', '66', 'Charges exceptionnelles transférées à l''actif en frais de restructuration', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '67', '6', 'Impôts sur le résultat', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '670', '67', 'Impôts belges sur le résultat de l''exercice', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '6700', '670', 'Impôts et précomptes dus ou versés', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '6701', '670', 'Excédent de versements d''impôts et précomptes porté à l''actif', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '6702', '670', 'Charges fiscales estimées', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '671', '67', 'Impôts belges sur le résultat d''exercices antérieurs', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '6710', '671', 'Suppléments d''impôts dus ou versés', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '6711', '671', 'Suppléments d''impôts estimés', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '6712', '671', 'Provisions fiscales constituées', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '672', '67', 'Impôts étrangers sur le résultat de l''exercice', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '673', '67', 'Impôts étrangers sur le résultat d''exercices antérieurs', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '68', '6', 'Transferts aux réserves immunisées', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '69', '6', 'Affectation des résultats', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '690', '69', 'Perte reportée de l''exercice précédent', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '691', '69', 'Dotation à la réserve légale', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '692', '69', 'Dotation aux autres réserves', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '693', '69', 'Bénéfice à reporter', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '694', '69', 'Rémunération du capital', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '695', '69', 'Administrateurs ou gérants', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'CHARGE', 'XXXXXX', '696', '69', 'Autres allocataires', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'PROD', 'XXXXXX', '70', '7', 'Chiffre d''affaires', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'PROD', 'XXXXXX', '700', '70', 'à 707 Ventes et prestations de services', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'PROD', 'XXXXXX', '700', '70', 'Ventes de marchandises', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'PROD', 'XXXXXX', '7000', '700', 'Ventes en Belgique', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'PROD', 'XXXXXX', '7001', '700', 'Ventes dans les pays membres de la C.E.E.', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'PROD', 'XXXXXX', '7002', '700', 'Ventes à l''exportation', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'PROD', 'XXXXXX', '701', '70', 'Ventes de produits finis', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'PROD', 'XXXXXX', '7010', '701', 'Ventes en Belgique', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'PROD', 'XXXXXX', '7011', '701', 'Ventes dans les pays membres de la C.E.E.', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'PROD', 'XXXXXX', '7012', '701', 'Ventes à l''exportation', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'PROD', 'XXXXXX', '702', '70', 'Ventes de déchets et rebuts', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'PROD', 'XXXXXX', '7020', '702', 'Ventes en Belgique', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'PROD', 'XXXXXX', '7021', '702', 'Ventes dans les pays membres de la C.E.E.', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'PROD', 'XXXXXX', '7022', '702', 'Ventes à l''exportation', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'PROD', 'XXXXXX', '703', '70', 'Ventes d''emballages récupérables', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'PROD', 'XXXXXX', '704', '70', 'Facturations des travaux en cours (associations momentanées)', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'PROD', 'XXXXXX', '705', '70', 'Prestations de services', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'PROD', 'XXXXXX', '7050', '705', 'Prestations de services en Belgique', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'PROD', 'XXXXXX', '7051', '705', 'Prestations de services dans les pays membres de la C.E.E.', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'PROD', 'XXXXXX', '7052', '705', 'Prestations de services en vue de l''exportation', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'PROD', 'XXXXXX', '706', '70', 'Pénalités et dédits obtenus par l''entreprise', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'PROD', 'XXXXXX', '708', '70', 'Remises, ristournes et rabais accordés', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'PROD', 'XXXXXX', '7080', '708', 'Sur ventes de marchandises', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'PROD', 'XXXXXX', '7081', '708', 'Sur ventes de produits finis', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'PROD', 'XXXXXX', '7082', '708', 'Sur ventes de déchets et rebuts', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'PROD', 'XXXXXX', '7083', '708', 'Sur prestations de services', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'PROD', 'XXXXXX', '7084', '708', 'Mali sur travaux facturés aux associations momentanées', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'PROD', 'XXXXXX', '71', '7', 'Variation des stocks et des commandes en cours d''exécution', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'PROD', 'XXXXXX', '712', '71', 'Des en cours de fabrication', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'PROD', 'XXXXXX', '713', '71', 'Des produits finis', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'PROD', 'XXXXXX', '715', '71', 'Des immeubles construits destinés à la vente', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'PROD', 'XXXXXX', '717', '71', 'Des commandes en cours d''exécution', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'PROD', 'XXXXXX', '7170', '717', 'Commandes en cours - Coût de revient', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'PROD', 'XXXXXX', '71700', '7170', 'Coût des commandes en cours d''exécution', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'PROD', 'XXXXXX', '71701', '7170', 'Coût des travaux en cours des associations momentanées', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'PROD', 'XXXXXX', '7171', '717', 'Bénéfices portés en compte sur commandes en cours', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'PROD', 'XXXXXX', '71710', '7171', 'Sur commandes en cours d''exécution', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'PROD', 'XXXXXX', '71711', '7171', 'Sur travaux en cours des associations momentanées', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'PROD', 'XXXXXX', '72', '7', 'Production immobilisée', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'PROD', 'XXXXXX', '720', '72', 'En frais d''établissement', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'PROD', 'XXXXXX', '721', '72', 'En immobilisations incorporelles', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'PROD', 'XXXXXX', '722', '72', 'En immobilisations corporelles', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'PROD', 'XXXXXX', '723', '72', 'En immobilisations en cours', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'PROD', 'XXXXXX', '74', '7', 'Autres produits d''exploitation', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'PROD', 'XXXXXX', '740', '74', 'Subsides d''exploitation et montants compensatoires', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'PROD', 'XXXXXX', '741', '74', 'Plus-values sur réalisations courantes d''immobilisations corporelles', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'PROD', 'XXXXXX', '742', '74', 'Plus-values sur réalisations de créances commerciales', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'PROD', 'XXXXXX', '743', '74', 'à 749 Produits d''exploitation divers', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'PROD', 'XXXXXX', '743', '74', 'Produits de services exploités dans l''intérêt du personnel', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'PROD', 'XXXXXX', '744', '74', 'Commissions et courtages', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'PROD', 'XXXXXX', '745', '74', 'Redevances pour brevets et licences', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'PROD', 'XXXXXX', '746', '74', 'Prestations de services (transports, études, etc)', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'PROD', 'XXXXXX', '747', '74', 'Revenus des immeubles affectés aux activités non professionnelles', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'PROD', 'XXXXXX', '748', '74', 'Locations diverses à caractère professionnel', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'PROD', 'XXXXXX', '749', '74', 'Produits divers', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'PROD', 'XXXXXX', '7490', '749', 'Bonis sur reprises d''emballages consignés', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'PROD', 'XXXXXX', '7491', '749', 'Bonis sur travaux en associations momentanées', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'PROD', 'XXXXXX', '75', '7', 'Produits financiers', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'PROD', 'XXXXXX', '750', '75', 'Produits des immobilisations financières', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'PROD', 'XXXXXX', '7500', '750', 'Revenus des actions', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'PROD', 'XXXXXX', '7501', '750', 'Revenus des obligations', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'PROD', 'XXXXXX', '7502', '750', 'Revenus des créances à plus d''un an', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'PROD', 'XXXXXX', '751', '75', 'Produits des actifs circulants', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'PROD', 'XXXXXX', '752', '75', 'Plus-values sur réalisations d''actifs circulants', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'PROD', 'XXXXXX', '753', '75', 'Subsides en capital et en intérêts', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'PROD', 'XXXXXX', '754', '75', 'Différences de change', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'PROD', 'XXXXXX', '755', '75', 'Ecarts de conversion des devises', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'PROD', 'XXXXXX', '756', '75', 'à 759 Produits financiers divers', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'PROD', 'XXXXXX', '756', '75', 'Produits des autres créances', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'PROD', 'XXXXXX', '757', '75', 'Escomptes obtenus', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'PROD', 'XXXXXX', '76', '7', 'Produits exceptionnels', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'PROD', 'XXXXXX', '760', '76', 'Reprises d''amortissements et de réductions de valeur', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'PROD', 'XXXXXX', '7600', '760', 'Sur immobilisations incorporelles', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'PROD', 'XXXXXX', '7601', '760', 'Sur immobilisations corporelles', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'PROD', 'XXXXXX', '761', '76', 'Reprises de réductions de valeur sur immobilisations financières', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'PROD', 'XXXXXX', '762', '76', 'Reprises de provisions pour risques et charges exceptionnelles', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'PROD', 'XXXXXX', '763', '76', 'Plus-values sur réalisation d''actifs immobilisés', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'PROD', 'XXXXXX', '7630', '763', 'Sur immobilisations incorporelles', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'PROD', 'XXXXXX', '7631', '763', 'Sur immobilisations corporelles', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'PROD', 'XXXXXX', '7632', '763', 'Sur immobilisations financières', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'PROD', 'XXXXXX', '764', '76', 'Autres produits exceptionnels', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'PROD', 'XXXXXX', '77', '7', 'Régularisations d''impôts et reprises de provisions fiscales', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'PROD', 'XXXXXX', '771', '77', 'Impôts belges sur le résultat', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'PROD', 'XXXXXX', '7710', '771', 'Régularisations d''impôts dus ou versés', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'PROD', 'XXXXXX', '7711', '771', 'Régularisations d''impôts estimés', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'PROD', 'XXXXXX', '7712', '771', 'Reprises de provisions fiscales', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'PROD', 'XXXXXX', '773', '77', 'Impôts étrangers sur le résultat', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'PROD', 'XXXXXX', '79', '7', 'Affectation aux résultats', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'PROD', 'XXXXXX', '790', '79', 'Bénéfice reporté de l''exercice précédent', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'PROD', 'XXXXXX', '791', '79', 'Prélèvement sur le capital et les primes d''émission', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'PROD', 'XXXXXX', '792', '79', 'Prélèvement sur les réserves', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'PROD', 'XXXXXX', '793', '79', 'Perte à reporter', '1'); -INSERT INTO llx_accountingaccount (fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ('PCMN-BASE', 'PROD', 'XXXXXX', '794', '79', 'Intervention d''associés (ou du propriétaire) dans la perte', '1'); - - ALTER TABLE llx_projet_task ADD COLUMN entity integer DEFAULT 1 NOT NULL AFTER ref; create table llx_product_customer_price @@ -1197,7 +280,7 @@ CREATE TABLE llx_element_resources ALTER TABLE llx_element_resources ADD UNIQUE INDEX idx_element_resources_idx1 (resource_id, resource_type, element_id, element_type); ALTER TABLE llx_element_resources ADD INDEX idx_element_element_element_id (element_id); --- Pas de contraite sur resource_id et element_id car pointe sur differentes tables +-- Pas de contrainte sur resource_id et element_id car pointe sur differentes tables create table llx_c_type_resource ( @@ -1209,7 +292,1386 @@ create table llx_c_type_resource ALTER TABLE llx_c_type_resource ADD UNIQUE INDEX uk_c_type_resource_id (label, code); +-- Fix :: account_parent must be an int, not an account number +DELETE FROM llx_accountingaccount; + +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ( 1,'PCG99-ABREGE','CAPIT', 'CAPITAL', '101', '1401', 'Capital', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ( 2,'PCG99-ABREGE','CAPIT', 'XXXXXX', '105', '1401', 'Ecarts de réévaluation', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ( 3,'PCG99-ABREGE','CAPIT', 'XXXXXX', '1061', '1401', 'Réserve légale', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ( 4,'PCG99-ABREGE','CAPIT', 'XXXXXX', '1063', '1401', 'Réserves statutaires ou contractuelles', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ( 5,'PCG99-ABREGE','CAPIT', 'XXXXXX', '1064', '1401', 'Réserves réglementées', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ( 6,'PCG99-ABREGE','CAPIT', 'XXXXXX', '1068', '1401', 'Autres réserves', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ( 7,'PCG99-ABREGE','CAPIT', 'XXXXXX', '108', '1401', 'Compte de l''exploitant', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ( 8,'PCG99-ABREGE','CAPIT', 'XXXXXX', '12', '1401', 'Résultat de l''exercice', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ( 9,'PCG99-ABREGE','CAPIT', 'XXXXXX', '145', '1401', 'Amortissements dérogatoires', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ( 10,'PCG99-ABREGE','CAPIT', 'XXXXXX', '146', '1401', 'Provision spéciale de réévaluation', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ( 11,'PCG99-ABREGE','CAPIT', 'XXXXXX', '147', '1401', 'Plus-values réinvesties', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ( 12,'PCG99-ABREGE','CAPIT', 'XXXXXX', '148', '1401', 'Autres provisions réglementées', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ( 13,'PCG99-ABREGE','CAPIT', 'XXXXXX', '15', '1401', 'Provisions pour risques et charges', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ( 14,'PCG99-ABREGE','CAPIT', 'XXXXXX', '16', '1401', 'Emprunts et dettes assimilees', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ( 15,'PCG99-ABREGE','IMMO', 'XXXXXX', '20', '1402', 'Immobilisations incorporelles', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ( 16,'PCG99-ABREGE','IMMO', 'XXXXXX', '201', '15', 'Frais d''établissement', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ( 17,'PCG99-ABREGE','IMMO', 'XXXXXX', '206', '15', 'Droit au bail', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ( 18,'PCG99-ABREGE','IMMO', 'XXXXXX', '207', '15', 'Fonds commercial', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ( 19,'PCG99-ABREGE','IMMO', 'XXXXXX', '208', '15', 'Autres immobilisations incorporelles', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ( 20,'PCG99-ABREGE','IMMO', 'XXXXXX', '21', '1402', 'Immobilisations corporelles', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ( 21,'PCG99-ABREGE','IMMO', 'XXXXXX', '23', '1402', 'Immobilisations en cours', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ( 22,'PCG99-ABREGE','IMMO', 'XXXXXX', '27', '1402', 'Autres immobilisations financieres', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ( 23,'PCG99-ABREGE','IMMO', 'XXXXXX', '280', '1402', 'Amortissements des immobilisations incorporelles', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ( 24,'PCG99-ABREGE','IMMO', 'XXXXXX', '281', '1402', 'Amortissements des immobilisations corporelles', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ( 25,'PCG99-ABREGE','IMMO', 'XXXXXX', '290', '1402', 'Provisions pour dépréciation des immobilisations incorporelles', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ( 26,'PCG99-ABREGE','IMMO', 'XXXXXX', '291', '1402', 'Provisions pour dépréciation des immobilisations corporelles', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ( 27,'PCG99-ABREGE','IMMO', 'XXXXXX', '297', '1402', 'Provisions pour dépréciation des autres immobilisations financières', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ( 28,'PCG99-ABREGE','STOCK', 'XXXXXX', '31', '1403', 'Matieres premières', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ( 29,'PCG99-ABREGE','STOCK', 'XXXXXX', '32', '1403', 'Autres approvisionnements', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ( 30,'PCG99-ABREGE','STOCK', 'XXXXXX', '33', '1403', 'En-cours de production de biens', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ( 31,'PCG99-ABREGE','STOCK', 'XXXXXX', '34', '1403', 'En-cours de production de services', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ( 32,'PCG99-ABREGE','STOCK', 'XXXXXX', '35', '1403', 'Stocks de produits', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ( 33,'PCG99-ABREGE','STOCK', 'XXXXXX', '37', '1403', 'Stocks de marchandises', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ( 34,'PCG99-ABREGE','STOCK', 'XXXXXX', '391', '1403', 'Provisions pour dépréciation des matières premières', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ( 35,'PCG99-ABREGE','STOCK', 'XXXXXX', '392', '1403', 'Provisions pour dépréciation des autres approvisionnements', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ( 36,'PCG99-ABREGE','STOCK', 'XXXXXX', '393', '1403', 'Provisions pour dépréciation des en-cours de production de biens', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ( 37,'PCG99-ABREGE','STOCK', 'XXXXXX', '394', '1403', 'Provisions pour dépréciation des en-cours de production de services', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ( 38,'PCG99-ABREGE','STOCK', 'XXXXXX', '395', '1403', 'Provisions pour dépréciation des stocks de produits', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ( 39,'PCG99-ABREGE','STOCK', 'XXXXXX', '397', '1403', 'Provisions pour dépréciation des stocks de marchandises', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ( 40,'PCG99-ABREGE','TIERS', 'SUPPLIER','400', '1404', 'Fournisseurs et Comptes rattachés', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ( 41,'PCG99-ABREGE','TIERS', 'XXXXXX', '409', '1404', 'Fournisseurs débiteurs', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ( 42,'PCG99-ABREGE','TIERS', 'CUSTOMER','410', '1404', 'Clients et Comptes rattachés', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ( 43,'PCG99-ABREGE','TIERS', 'XXXXXX', '419', '1404', 'Clients créditeurs', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ( 44,'PCG99-ABREGE','TIERS', 'XXXXXX', '421', '1404', 'Personnel', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ( 45,'PCG99-ABREGE','TIERS', 'XXXXXX', '428', '1404', 'Personnel', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ( 46,'PCG99-ABREGE','TIERS', 'XXXXXX', '43', '1404', 'Sécurité sociale et autres organismes sociaux', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ( 47,'PCG99-ABREGE','TIERS', 'XXXXXX', '444', '1404', 'Etat - impôts sur bénéfice', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ( 48,'PCG99-ABREGE','TIERS', 'XXXXXX', '445', '1404', 'Etat - Taxes sur chiffre affaires', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ( 49,'PCG99-ABREGE','TIERS', 'XXXXXX', '447', '1404', 'Autres impôts, taxes et versements assimilés', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ( 50,'PCG99-ABREGE','TIERS', 'XXXXXX', '45', '1404', 'Groupe et associes', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ( 51,'PCG99-ABREGE','TIERS', 'XXXXXX', '455', '50', 'Associés', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ( 52,'PCG99-ABREGE','TIERS', 'XXXXXX', '46', '1404', 'Débiteurs divers et créditeurs divers', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ( 53,'PCG99-ABREGE','TIERS', 'XXXXXX', '47', '1404', 'Comptes transitoires ou d''attente', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ( 54,'PCG99-ABREGE','TIERS', 'XXXXXX', '481', '1404', 'Charges à répartir sur plusieurs exercices', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ( 55,'PCG99-ABREGE','TIERS', 'XXXXXX', '486', '1404', 'Charges constatées d''avance', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ( 56,'PCG99-ABREGE','TIERS', 'XXXXXX', '487', '1404', 'Produits constatés d''avance', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ( 57,'PCG99-ABREGE','TIERS', 'XXXXXX', '491', '1404', 'Provisions pour dépréciation des comptes de clients', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ( 58,'PCG99-ABREGE','TIERS', 'XXXXXX', '496', '1404', 'Provisions pour dépréciation des comptes de débiteurs divers', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ( 59,'PCG99-ABREGE','FINAN', 'XXXXXX', '50', '1405', 'Valeurs mobilières de placement', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ( 60,'PCG99-ABREGE','FINAN', 'BANK', '51', '1405', 'Banques, établissements financiers et assimilés', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ( 61,'PCG99-ABREGE','FINAN', 'CASH', '53', '1405', 'Caisse', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ( 62,'PCG99-ABREGE','FINAN', 'XXXXXX', '54', '1405', 'Régies d''avance et accréditifs', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ( 63,'PCG99-ABREGE','FINAN', 'XXXXXX', '58', '1405', 'Virements internes', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ( 64,'PCG99-ABREGE','FINAN', 'XXXXXX', '590', '1405', 'Provisions pour dépréciation des valeurs mobilières de placement', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ( 65,'PCG99-ABREGE','CHARGE','PRODUCT', '60', '1406', 'Achats', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ( 66,'PCG99-ABREGE','CHARGE','XXXXXX', '603', '65', 'Variations des stocks', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ( 67,'PCG99-ABREGE','CHARGE','SERVICE', '61', '1406', 'Services extérieurs', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ( 68,'PCG99-ABREGE','CHARGE','XXXXXX', '62', '1406', 'Autres services extérieurs', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ( 69,'PCG99-ABREGE','CHARGE','XXXXXX', '63', '1406', 'Impôts, taxes et versements assimiles', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ( 70,'PCG99-ABREGE','CHARGE','XXXXXX', '641', '1406', 'Rémunérations du personnel', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ( 71,'PCG99-ABREGE','CHARGE','XXXXXX', '644', '1406', 'Rémunération du travail de l''exploitant', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ( 72,'PCG99-ABREGE','CHARGE','SOCIAL', '645', '1406', 'Charges de sécurité sociale et de prévoyance', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ( 73,'PCG99-ABREGE','CHARGE','XXXXXX', '646', '1406', 'Cotisations sociales personnelles de l''exploitant', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ( 74,'PCG99-ABREGE','CHARGE','XXXXXX', '65', '1406', 'Autres charges de gestion courante', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ( 75,'PCG99-ABREGE','CHARGE','XXXXXX', '66', '1406', 'Charges financières', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ( 76,'PCG99-ABREGE','CHARGE','XXXXXX', '67', '1406', 'Charges exceptionnelles', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ( 77,'PCG99-ABREGE','CHARGE','XXXXXX', '681', '1406', 'Dotations aux amortissements et aux provisions', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ( 78,'PCG99-ABREGE','CHARGE','XXXXXX', '686', '1406', 'Dotations aux amortissements et aux provisions', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ( 79,'PCG99-ABREGE','CHARGE','XXXXXX', '687', '1406', 'Dotations aux amortissements et aux provisions', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ( 80,'PCG99-ABREGE','CHARGE','XXXXXX', '691', '1406', 'Participation des salariés aux résultats', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ( 81,'PCG99-ABREGE','CHARGE','XXXXXX', '695', '1406', 'Impôts sur les bénéfices', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ( 82,'PCG99-ABREGE','CHARGE','XXXXXX', '697', '1406', 'Imposition forfaitaire annuelle des sociétés', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ( 83,'PCG99-ABREGE','CHARGE','XXXXXX', '699', '1406', 'Produits', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ( 84,'PCG99-ABREGE','PROD', 'PRODUCT', '701', '1407', 'Ventes de produits finis', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ( 85,'PCG99-ABREGE','PROD', 'SERVICE', '706', '1407', 'Prestations de services', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ( 86,'PCG99-ABREGE','PROD', 'PRODUCT', '707', '1407', 'Ventes de marchandises', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ( 87,'PCG99-ABREGE','PROD', 'PRODUCT', '708', '1407', 'Produits des activités annexes', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ( 88,'PCG99-ABREGE','PROD', 'XXXXXX', '709', '1407', 'Rabais, remises et ristournes accordés par l''entreprise', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ( 89,'PCG99-ABREGE','PROD', 'XXXXXX', '713', '1407', 'Variation des stocks', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ( 90,'PCG99-ABREGE','PROD', 'XXXXXX', '72', '1407', 'Production immobilisée', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ( 91,'PCG99-ABREGE','PROD', 'XXXXXX', '73', '1407', 'Produits nets partiels sur opérations à long terme', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ( 92,'PCG99-ABREGE','PROD', 'XXXXXX', '74', '1407', 'Subventions d''exploitation', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ( 93,'PCG99-ABREGE','PROD', 'XXXXXX', '75', '1407', 'Autres produits de gestion courante', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ( 94,'PCG99-ABREGE','PROD', 'XXXXXX', '753', '93', 'Jetons de présence et rémunérations d''administrateurs, gérants,...', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ( 95,'PCG99-ABREGE','PROD', 'XXXXXX', '754', '93', 'Ristournes perçues des coopératives', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ( 96,'PCG99-ABREGE','PROD', 'XXXXXX', '755', '93', 'Quotes-parts de résultat sur opérations faites en commun', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ( 97,'PCG99-ABREGE','PROD', 'XXXXXX', '76', '1407', 'Produits financiers', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ( 98,'PCG99-ABREGE','PROD', 'XXXXXX', '77', '1407', 'Produits exceptionnels', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ( 99,'PCG99-ABREGE','PROD', 'XXXXXX', '781', '1407', 'Reprises sur amortissements et provisions', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (100,'PCG99-ABREGE','PROD', 'XXXXXX', '786', '1407', 'Reprises sur provisions pour risques', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (101,'PCG99-ABREGE','PROD', 'XXXXXX', '787', '1407', 'Reprises sur provisions', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (102,'PCG99-ABREGE','PROD', 'XXXXXX', '79', '1407', 'Transferts de charges', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1401,'PCG99-ABREGE','CAPIT', 'XXXXXX', '1', '', 'Fonds propres, provisions pour risques et charges et dettes à plus d''un an', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1402,'PCG99-ABREGE','IMMO', 'XXXXXX', '2', '', 'Frais d''établissement. Actifs immobilisés et créances à plus d''un an', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1403,'PCG99-ABREGE','STOCK', 'XXXXXX', '3', '', 'Stock et commandes en cours d''exécution', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1404,'PCG99-ABREGE','TIERS', 'XXXXXX', '4', '', 'Créances et dettes à un an au plus', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1405,'PCG99-ABREGE','FINAN', 'XXXXXX', '5', '', 'Placement de trésorerie et de valeurs disponibles', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1406,'PCG99-ABREGE','CHARGE','XXXXXX', '6', '', 'Charges', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1407,'PCG99-ABREGE','PROD', 'XXXXXX', '7', '', 'Produits', '1'); + +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (103,'PCG99-BASE','CAPIT', 'XXXXXX', '10','1501', 'Capital et réserves', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (104,'PCG99-BASE','CAPIT', 'CAPITAL', '101', '103', 'Capital', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (105,'PCG99-BASE','CAPIT', 'XXXXXX', '104', '103', 'Primes liées au capital social', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (106,'PCG99-BASE','CAPIT', 'XXXXXX', '105', '103', 'Ecarts de réévaluation', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (107,'PCG99-BASE','CAPIT', 'XXXXXX', '106', '103', 'Réserves', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (108,'PCG99-BASE','CAPIT', 'XXXXXX', '107', '103', 'Ecart d''equivalence', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (109,'PCG99-BASE','CAPIT', 'XXXXXX', '108', '103', 'Compte de l''exploitant', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (110,'PCG99-BASE','CAPIT', 'XXXXXX', '109', '103', 'Actionnaires : capital souscrit - non appelé', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (111,'PCG99-BASE','CAPIT', 'XXXXXX', '11','1501', 'Report à nouveau (solde créditeur ou débiteur)', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (112,'PCG99-BASE','CAPIT', 'XXXXXX', '110', '111', 'Report à nouveau (solde créditeur)', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (113,'PCG99-BASE','CAPIT', 'XXXXXX', '119', '111', 'Report à nouveau (solde débiteur)', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (114,'PCG99-BASE','CAPIT', 'XXXXXX', '12','1501', 'Résultat de l''exercice (bénéfice ou perte)', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (115,'PCG99-BASE','CAPIT', 'XXXXXX', '120', '114', 'Résultat de l''exercice (bénéfice)', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (116,'PCG99-BASE','CAPIT', 'XXXXXX', '129', '114', 'Résultat de l''exercice (perte)', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (117,'PCG99-BASE','CAPIT', 'XXXXXX', '13','1501', 'Subventions d''investissement', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (118,'PCG99-BASE','CAPIT', 'XXXXXX', '131', '117', 'Subventions d''équipement', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (119,'PCG99-BASE','CAPIT', 'XXXXXX', '138', '117', 'Autres subventions d''investissement', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (120,'PCG99-BASE','CAPIT', 'XXXXXX', '139', '117', 'Subventions d''investissement inscrites au compte de résultat', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (121,'PCG99-BASE','CAPIT', 'XXXXXX', '14','1501', 'Provisions réglementées', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (122,'PCG99-BASE','CAPIT', 'XXXXXX', '142', '121', 'Provisions réglementées relatives aux immobilisations', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (123,'PCG99-BASE','CAPIT', 'XXXXXX', '143', '121', 'Provisions réglementées relatives aux stocks', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (124,'PCG99-BASE','CAPIT', 'XXXXXX', '144', '121', 'Provisions réglementées relatives aux autres éléments de l''actif', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (125,'PCG99-BASE','CAPIT', 'XXXXXX', '145', '121', 'Amortissements dérogatoires', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (126,'PCG99-BASE','CAPIT', 'XXXXXX', '146', '121', 'Provision spéciale de réévaluation', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (127,'PCG99-BASE','CAPIT', 'XXXXXX', '147', '121', 'Plus-values réinvesties', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (128,'PCG99-BASE','CAPIT', 'XXXXXX', '148', '121', 'Autres provisions réglementées', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (129,'PCG99-BASE','CAPIT', 'XXXXXX', '15','1501', 'Provisions pour risques et charges', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (130,'PCG99-BASE','CAPIT', 'XXXXXX', '151', '129', 'Provisions pour risques', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (131,'PCG99-BASE','CAPIT', 'XXXXXX', '153', '129', 'Provisions pour pensions et obligations similaires', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (132,'PCG99-BASE','CAPIT', 'XXXXXX', '154', '129', 'Provisions pour restructurations', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (133,'PCG99-BASE','CAPIT', 'XXXXXX', '155', '129', 'Provisions pour impôts', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (134,'PCG99-BASE','CAPIT', 'XXXXXX', '156', '129', 'Provisions pour renouvellement des immobilisations (entreprises concessionnaires)', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (135,'PCG99-BASE','CAPIT', 'XXXXXX', '157', '129', 'Provisions pour charges à répartir sur plusieurs exercices', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (136,'PCG99-BASE','CAPIT', 'XXXXXX', '158', '129', 'Autres provisions pour charges', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (137,'PCG99-BASE','CAPIT', 'XXXXXX', '16','1501', 'Emprunts et dettes assimilees', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (138,'PCG99-BASE','CAPIT', 'XXXXXX', '161', '137', 'Emprunts obligataires convertibles', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (139,'PCG99-BASE','CAPIT', 'XXXXXX', '163', '137', 'Autres emprunts obligataires', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (140,'PCG99-BASE','CAPIT', 'XXXXXX', '164', '137', 'Emprunts auprès des établissements de crédit', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (141,'PCG99-BASE','CAPIT', 'XXXXXX', '165', '137', 'Dépôts et cautionnements reçus', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (142,'PCG99-BASE','CAPIT', 'XXXXXX', '166', '137', 'Participation des salariés aux résultats', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (143,'PCG99-BASE','CAPIT', 'XXXXXX', '167', '137', 'Emprunts et dettes assortis de conditions particulières', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (144,'PCG99-BASE','CAPIT', 'XXXXXX', '168', '137', 'Autres emprunts et dettes assimilées', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (145,'PCG99-BASE','CAPIT', 'XXXXXX', '169', '137', 'Primes de remboursement des obligations', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (146,'PCG99-BASE','CAPIT', 'XXXXXX', '17','1501', 'Dettes rattachées à des participations', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (147,'PCG99-BASE','CAPIT', 'XXXXXX', '171', '146', 'Dettes rattachées à des participations (groupe)', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (148,'PCG99-BASE','CAPIT', 'XXXXXX', '174', '146', 'Dettes rattachées à des participations (hors groupe)', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (149,'PCG99-BASE','CAPIT', 'XXXXXX', '178', '146', 'Dettes rattachées à des sociétés en participation', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (150,'PCG99-BASE','CAPIT', 'XXXXXX', '18','1501', 'Comptes de liaison des établissements et sociétés en participation', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (151,'PCG99-BASE','CAPIT', 'XXXXXX', '181', '150', 'Comptes de liaison des établissements', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (152,'PCG99-BASE','CAPIT', 'XXXXXX', '186', '150', 'Biens et prestations de services échangés entre établissements (charges)', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (153,'PCG99-BASE','CAPIT', 'XXXXXX', '187', '150', 'Biens et prestations de services échangés entre établissements (produits)', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (154,'PCG99-BASE','CAPIT', 'XXXXXX', '188', '150', 'Comptes de liaison des sociétés en participation', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (155,'PCG99-BASE','IMMO', 'XXXXXX', '20','1502', 'Immobilisations incorporelles', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (156,'PCG99-BASE','IMMO', 'XXXXXX', '201', '155', 'Frais d''établissement', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (157,'PCG99-BASE','IMMO', 'XXXXXX', '203', '155', 'Frais de recherche et de développement', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (158,'PCG99-BASE','IMMO', 'XXXXXX', '205', '155', 'Concessions et droits similaires, brevets, licences, marques, procédés, logiciels, droits et valeurs similaires', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (159,'PCG99-BASE','IMMO', 'XXXXXX', '206', '155', 'Droit au bail', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (160,'PCG99-BASE','IMMO', 'XXXXXX', '207', '155', 'Fonds commercial', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (161,'PCG99-BASE','IMMO', 'XXXXXX', '208', '155', 'Autres immobilisations incorporelles', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (162,'PCG99-BASE','IMMO', 'XXXXXX', '21','1502', 'Immobilisations corporelles', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (163,'PCG99-BASE','IMMO', 'XXXXXX', '211', '162', 'Terrains', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (164,'PCG99-BASE','IMMO', 'XXXXXX', '212', '162', 'Agencements et aménagements de terrains', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (165,'PCG99-BASE','IMMO', 'XXXXXX', '213', '162', 'Constructions', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (166,'PCG99-BASE','IMMO', 'XXXXXX', '214', '162', 'Constructions sur sol d''autrui', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (167,'PCG99-BASE','IMMO', 'XXXXXX', '215', '162', 'Installations techniques, matériels et outillage industriels', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (168,'PCG99-BASE','IMMO', 'XXXXXX', '218', '162', 'Autres immobilisations corporelles', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (169,'PCG99-BASE','IMMO', 'XXXXXX', '22','1502', 'Immobilisations mises en concession', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (170,'PCG99-BASE','IMMO', 'XXXXXX', '23','1502', 'Immobilisations en cours', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (171,'PCG99-BASE','IMMO', 'XXXXXX', '231', '170', 'Immobilisations corporelles en cours', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (172,'PCG99-BASE','IMMO', 'XXXXXX', '232', '170', 'Immobilisations incorporelles en cours', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (173,'PCG99-BASE','IMMO', 'XXXXXX', '237', '170', 'Avances et acomptes versés sur immobilisations incorporelles', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (174,'PCG99-BASE','IMMO', 'XXXXXX', '238', '170', 'Avances et acomptes versés sur commandes d''immobilisations corporelles', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (175,'PCG99-BASE','IMMO', 'XXXXXX', '25','1502', 'Parts dans des entreprises liées et créances sur des entreprises liées', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (176,'PCG99-BASE','IMMO', 'XXXXXX', '26','1502', 'Participations et créances rattachées à des participations', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (177,'PCG99-BASE','IMMO', 'XXXXXX', '261', '176', 'Titres de participation', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (178,'PCG99-BASE','IMMO', 'XXXXXX', '266', '176', 'Autres formes de participation', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (179,'PCG99-BASE','IMMO', 'XXXXXX', '267', '176', 'Créances rattachées à des participations', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (180,'PCG99-BASE','IMMO', 'XXXXXX', '268', '176', 'Créances rattachées à des sociétés en participation', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (181,'PCG99-BASE','IMMO', 'XXXXXX', '269', '176', 'Versements restant à effectuer sur titres de participation non libérés', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (182,'PCG99-BASE','IMMO', 'XXXXXX', '27','1502', 'Autres immobilisations financieres', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (183,'PCG99-BASE','IMMO', 'XXXXXX', '271', '183', 'Titres immobilisés autres que les titres immobilisés de l''activité de portefeuille (droit de propriété)', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (184,'PCG99-BASE','IMMO', 'XXXXXX', '272', '183', 'Titres immobilisés (droit de créance)', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (185,'PCG99-BASE','IMMO', 'XXXXXX', '273', '183', 'Titres immobilisés de l''activité de portefeuille', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (186,'PCG99-BASE','IMMO', 'XXXXXX', '274', '183', 'Prêts', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (187,'PCG99-BASE','IMMO', 'XXXXXX', '275', '183', 'Dépôts et cautionnements versés', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (188,'PCG99-BASE','IMMO', 'XXXXXX', '276', '183', 'Autres créances immobilisées', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (189,'PCG99-BASE','IMMO', 'XXXXXX', '277', '183', '(Actions propres ou parts propres)', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (190,'PCG99-BASE','IMMO', 'XXXXXX', '279', '183', 'Versements restant à effectuer sur titres immobilisés non libérés', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (191,'PCG99-BASE','IMMO', 'XXXXXX', '28','1502', 'Amortissements des immobilisations', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (192,'PCG99-BASE','IMMO', 'XXXXXX', '280', '191', 'Amortissements des immobilisations incorporelles', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (193,'PCG99-BASE','IMMO', 'XXXXXX', '281', '191', 'Amortissements des immobilisations corporelles', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (194,'PCG99-BASE','IMMO', 'XXXXXX', '282', '191', 'Amortissements des immobilisations mises en concession', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (195,'PCG99-BASE','IMMO', 'XXXXXX', '29','1502', 'Dépréciations des immobilisations', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (196,'PCG99-BASE','IMMO', 'XXXXXX', '290', '195', 'Dépréciations des immobilisations incorporelles', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (197,'PCG99-BASE','IMMO', 'XXXXXX', '291', '195', 'Dépréciations des immobilisations corporelles', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (198,'PCG99-BASE','IMMO', 'XXXXXX', '292', '195', 'Dépréciations des immobilisations mises en concession', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (199,'PCG99-BASE','IMMO', 'XXXXXX', '293', '195', 'Dépréciations des immobilisations en cours', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (200,'PCG99-BASE','IMMO', 'XXXXXX', '296', '195', 'Provisions pour dépréciation des participations et créances rattachées à des participations', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (201,'PCG99-BASE','IMMO', 'XXXXXX', '297', '195', 'Provisions pour dépréciation des autres immobilisations financières', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (202,'PCG99-BASE','STOCK', 'XXXXXX', '31','1503', 'Matières premières (et fournitures)', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (203,'PCG99-BASE','STOCK', 'XXXXXX', '311', '202', 'Matières (ou groupe) A', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (204,'PCG99-BASE','STOCK', 'XXXXXX', '312', '202', 'Matières (ou groupe) B', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (205,'PCG99-BASE','STOCK', 'XXXXXX', '317', '202', 'Fournitures A, B, C,', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (206,'PCG99-BASE','STOCK', 'XXXXXX', '32','1503', 'Autres approvisionnements', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (207,'PCG99-BASE','STOCK', 'XXXXXX', '321', '206', 'Matières consommables', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (208,'PCG99-BASE','STOCK', 'XXXXXX', '322', '206', 'Fournitures consommables', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (209,'PCG99-BASE','STOCK', 'XXXXXX', '326', '206', 'Emballages', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (210,'PCG99-BASE','STOCK', 'XXXXXX', '33','1503', 'En-cours de production de biens', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (211,'PCG99-BASE','STOCK', 'XXXXXX', '331', '210', 'Produits en cours', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (212,'PCG99-BASE','STOCK', 'XXXXXX', '335', '210', 'Travaux en cours', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (213,'PCG99-BASE','STOCK', 'XXXXXX', '34','1503', 'En-cours de production de services', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (214,'PCG99-BASE','STOCK', 'XXXXXX', '341', '213', 'Etudes en cours', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (215,'PCG99-BASE','STOCK', 'XXXXXX', '345', '213', 'Prestations de services en cours', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (216,'PCG99-BASE','STOCK', 'XXXXXX', '35','1503', 'Stocks de produits', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (217,'PCG99-BASE','STOCK', 'XXXXXX', '351', '216', 'Produits intermédiaires', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (218,'PCG99-BASE','STOCK', 'XXXXXX', '355', '216', 'Produits finis', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (219,'PCG99-BASE','STOCK', 'XXXXXX', '358', '216', 'Produits résiduels (ou matières de récupération)', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (220,'PCG99-BASE','STOCK', 'XXXXXX', '37','1503', 'Stocks de marchandises', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (221,'PCG99-BASE','STOCK', 'XXXXXX', '371', '220', 'Marchandises (ou groupe) A', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (222,'PCG99-BASE','STOCK', 'XXXXXX', '372', '220', 'Marchandises (ou groupe) B', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (223,'PCG99-BASE','STOCK', 'XXXXXX', '39','1503', 'Provisions pour dépréciation des stocks et en-cours', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (224,'PCG99-BASE','STOCK', 'XXXXXX', '391', '223', 'Provisions pour dépréciation des matières premières', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (225,'PCG99-BASE','STOCK', 'XXXXXX', '392', '223', 'Provisions pour dépréciation des autres approvisionnements', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (226,'PCG99-BASE','STOCK', 'XXXXXX', '393', '223', 'Provisions pour dépréciation des en-cours de production de biens', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (227,'PCG99-BASE','STOCK', 'XXXXXX', '394', '223', 'Provisions pour dépréciation des en-cours de production de services', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (228,'PCG99-BASE','STOCK', 'XXXXXX', '395', '223', 'Provisions pour dépréciation des stocks de produits', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (229,'PCG99-BASE','STOCK', 'XXXXXX', '397', '223', 'Provisions pour dépréciation des stocks de marchandises', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (230,'PCG99-BASE','TIERS', 'XXXXXX', '40','1504', 'Fournisseurs et Comptes rattachés', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (231,'PCG99-BASE','TIERS', 'XXXXXX', '400', '230', 'Fournisseurs et Comptes rattachés', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (232,'PCG99-BASE','TIERS', 'SUPPLIER','401', '230', 'Fournisseurs', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (233,'PCG99-BASE','TIERS', 'XXXXXX', '403', '230', 'Fournisseurs - Effets à payer', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (234,'PCG99-BASE','TIERS', 'XXXXXX', '404', '230', 'Fournisseurs d''immobilisations', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (235,'PCG99-BASE','TIERS', 'XXXXXX', '405', '230', 'Fournisseurs d''immobilisations - Effets à payer', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (236,'PCG99-BASE','TIERS', 'XXXXXX', '408', '230', 'Fournisseurs - Factures non parvenues', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (237,'PCG99-BASE','TIERS', 'XXXXXX', '409', '230', 'Fournisseurs débiteurs', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (238,'PCG99-BASE','TIERS', 'XXXXXX', '41','1504', 'Clients et comptes rattachés', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (239,'PCG99-BASE','TIERS', 'XXXXXX', '410', '238', 'Clients et Comptes rattachés', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (240,'PCG99-BASE','TIERS', 'CUSTOMER','411', '238', 'Clients', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (241,'PCG99-BASE','TIERS', 'XXXXXX', '413', '238', 'Clients - Effets à recevoir', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (242,'PCG99-BASE','TIERS', 'XXXXXX', '416', '238', 'Clients douteux ou litigieux', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (243,'PCG99-BASE','TIERS', 'XXXXXX', '418', '238', 'Clients - Produits non encore facturés', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (244,'PCG99-BASE','TIERS', 'XXXXXX', '419', '238', 'Clients créditeurs', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (245,'PCG99-BASE','TIERS', 'XXXXXX', '42','1504', 'Personnel et comptes rattachés', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (246,'PCG99-BASE','TIERS', 'XXXXXX', '421', '245', 'Personnel - Rémunérations dues', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (247,'PCG99-BASE','TIERS', 'XXXXXX', '422', '245', 'Comités d''entreprises, d''établissement, ...', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (248,'PCG99-BASE','TIERS', 'XXXXXX', '424', '245', 'Participation des salariés aux résultats', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (249,'PCG99-BASE','TIERS', 'XXXXXX', '425', '245', 'Personnel - Avances et acomptes', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (250,'PCG99-BASE','TIERS', 'XXXXXX', '426', '245', 'Personnel - Dépôts', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (251,'PCG99-BASE','TIERS', 'XXXXXX', '427', '245', 'Personnel - Oppositions', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (252,'PCG99-BASE','TIERS', 'XXXXXX', '428', '245', 'Personnel - Charges à payer et produits à recevoir', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (253,'PCG99-BASE','TIERS', 'XXXXXX', '43','1504', 'Sécurité sociale et autres organismes sociaux', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (254,'PCG99-BASE','TIERS', 'XXXXXX', '431', '253', 'Sécurité sociale', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (255,'PCG99-BASE','TIERS', 'XXXXXX', '437', '253', 'Autres organismes sociaux', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (256,'PCG99-BASE','TIERS', 'XXXXXX', '438', '253', 'Organismes sociaux - Charges à payer et produits à recevoir', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (257,'PCG99-BASE','TIERS', 'XXXXXX', '44','1504', 'État et autres collectivités publiques', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (258,'PCG99-BASE','TIERS', 'XXXXXX', '441', '257', 'État - Subventions à recevoir', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (259,'PCG99-BASE','TIERS', 'XXXXXX', '442', '257', 'Etat - Impôts et taxes recouvrables sur des tiers', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (260,'PCG99-BASE','TIERS', 'XXXXXX', '443', '257', 'Opérations particulières avec l''Etat, les collectivités publiques, les organismes internationaux', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (261,'PCG99-BASE','TIERS', 'XXXXXX', '444', '257', 'Etat - Impôts sur les bénéfices', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (262,'PCG99-BASE','TIERS', 'XXXXXX', '445', '257', 'Etat - Taxes sur le chiffre d''affaires', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (263,'PCG99-BASE','TIERS', 'XXXXXX', '446', '257', 'Obligations cautionnées', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (264,'PCG99-BASE','TIERS', 'XXXXXX', '447', '257', 'Autres impôts, taxes et versements assimilés', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (265,'PCG99-BASE','TIERS', 'XXXXXX', '448', '257', 'Etat - Charges à payer et produits à recevoir', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (266,'PCG99-BASE','TIERS', 'XXXXXX', '449', '257', 'Quotas d''émission à restituer à l''Etat', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (267,'PCG99-BASE','TIERS', 'XXXXXX', '45','1504', 'Groupe et associes', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (268,'PCG99-BASE','TIERS', 'XXXXXX', '451', '267', 'Groupe', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (269,'PCG99-BASE','TIERS', 'XXXXXX', '455', '267', 'Associés - Comptes courants', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (270,'PCG99-BASE','TIERS', 'XXXXXX', '456', '267', 'Associés - Opérations sur le capital', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (271,'PCG99-BASE','TIERS', 'XXXXXX', '457', '267', 'Associés - Dividendes à payer', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (272,'PCG99-BASE','TIERS', 'XXXXXX', '458', '267', 'Associés - Opérations faites en commun et en G.I.E.', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (273,'PCG99-BASE','TIERS', 'XXXXXX', '46','1504', 'Débiteurs divers et créditeurs divers', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (274,'PCG99-BASE','TIERS', 'XXXXXX', '462', '273', 'Créances sur cessions d''immobilisations', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (275,'PCG99-BASE','TIERS', 'XXXXXX', '464', '273', 'Dettes sur acquisitions de valeurs mobilières de placement', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (276,'PCG99-BASE','TIERS', 'XXXXXX', '465', '273', 'Créances sur cessions de valeurs mobilières de placement', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (277,'PCG99-BASE','TIERS', 'XXXXXX', '467', '273', 'Autres comptes débiteurs ou créditeurs', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (278,'PCG99-BASE','TIERS', 'XXXXXX', '468', '273', 'Divers - Charges à payer et produits à recevoir', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (279,'PCG99-BASE','TIERS', 'XXXXXX', '47','1504', 'Comptes transitoires ou d''attente', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (280,'PCG99-BASE','TIERS', 'XXXXXX', '471', '279', 'Comptes d''attente', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (281,'PCG99-BASE','TIERS', 'XXXXXX', '476', '279', 'Différence de conversion - Actif', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (282,'PCG99-BASE','TIERS', 'XXXXXX', '477', '279', 'Différences de conversion - Passif', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (283,'PCG99-BASE','TIERS', 'XXXXXX', '478', '279', 'Autres comptes transitoires', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (284,'PCG99-BASE','TIERS', 'XXXXXX', '48','1504', 'Comptes de régularisation', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (285,'PCG99-BASE','TIERS', 'XXXXXX', '481', '284', 'Charges à répartir sur plusieurs exercices', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (286,'PCG99-BASE','TIERS', 'XXXXXX', '486', '284', 'Charges constatées d''avance', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (287,'PCG99-BASE','TIERS', 'XXXXXX', '487', '284', 'Produits constatés d''avance', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (288,'PCG99-BASE','TIERS', 'XXXXXX', '488', '284', 'Comptes de répartition périodique des charges et des produits', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (289,'PCG99-BASE','TIERS', 'XXXXXX', '489', '284', 'Quotas d''émission alloués par l''Etat', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (290,'PCG99-BASE','TIERS', 'XXXXXX', '49','1504', 'Provisions pour dépréciation des comptes de tiers', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (291,'PCG99-BASE','TIERS', 'XXXXXX', '491', '290', 'Provisions pour dépréciation des comptes de clients', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (292,'PCG99-BASE','TIERS', 'XXXXXX', '495', '290', 'Provisions pour dépréciation des comptes du groupe et des associés', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (293,'PCG99-BASE','TIERS', 'XXXXXX', '496', '290', 'Provisions pour dépréciation des comptes de débiteurs divers', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (294,'PCG99-BASE','FINAN', 'XXXXXX', '50','1505', 'Valeurs mobilières de placement', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (295,'PCG99-BASE','FINAN', 'XXXXXX', '501', '294', 'Parts dans des entreprises liées', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (296,'PCG99-BASE','FINAN', 'XXXXXX', '502', '294', 'Actions propres', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (297,'PCG99-BASE','FINAN', 'XXXXXX', '503', '294', 'Actions', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (298,'PCG99-BASE','FINAN', 'XXXXXX', '504', '294', 'Autres titres conférant un droit de propriété', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (299,'PCG99-BASE','FINAN', 'XXXXXX', '505', '294', 'Obligations et bons émis par la société et rachetés par elle', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (300,'PCG99-BASE','FINAN', 'XXXXXX', '506', '294', 'Obligations', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (301,'PCG99-BASE','FINAN', 'XXXXXX', '507', '294', 'Bons du Trésor et bons de caisse à court terme', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (302,'PCG99-BASE','FINAN', 'XXXXXX', '508', '294', 'Autres valeurs mobilières de placement et autres créances assimilées', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (303,'PCG99-BASE','FINAN', 'XXXXXX', '509', '294', 'Versements restant à effectuer sur valeurs mobilières de placement non libérées', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (304,'PCG99-BASE','FINAN', 'XXXXXX', '51','1505', 'Banques, établissements financiers et assimilés', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (305,'PCG99-BASE','FINAN', 'XXXXXX', '511', '304', 'Valeurs à l''encaissement', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (306,'PCG99-BASE','FINAN', 'BANK', '512', '304', 'Banques', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (307,'PCG99-BASE','FINAN', 'XXXXXX', '514', '304', 'Chèques postaux', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (308,'PCG99-BASE','FINAN', 'XXXXXX', '515', '304', '"Caisses" du Trésor et des établissements publics', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (309,'PCG99-BASE','FINAN', 'XXXXXX', '516', '304', 'Sociétés de bourse', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (310,'PCG99-BASE','FINAN', 'XXXXXX', '517', '304', 'Autres organismes financiers', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (311,'PCG99-BASE','FINAN', 'XXXXXX', '518', '304', 'Intérêts courus', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (312,'PCG99-BASE','FINAN', 'XXXXXX', '519', '304', 'Concours bancaires courants', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (313,'PCG99-BASE','FINAN', 'XXXXXX', '52','1505', 'Instruments de trésorerie', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (314,'PCG99-BASE','FINAN', 'CASH', '53','1505', 'Caisse', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (315,'PCG99-BASE','FINAN', 'XXXXXX', '531', '314', 'Caisse siège social', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (316,'PCG99-BASE','FINAN', 'XXXXXX', '532', '314', 'Caisse succursale (ou usine) A', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (317,'PCG99-BASE','FINAN', 'XXXXXX', '533', '314', 'Caisse succursale (ou usine) B', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (318,'PCG99-BASE','FINAN', 'XXXXXX', '54','1505', 'Régies d''avance et accréditifs', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (319,'PCG99-BASE','FINAN', 'XXXXXX', '58','1505', 'Virements internes', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (320,'PCG99-BASE','FINAN', 'XXXXXX', '59','1505', 'Provisions pour dépréciation des comptes financiers', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (321,'PCG99-BASE','FINAN', 'XXXXXX', '590', '320', 'Provisions pour dépréciation des valeurs mobilières de placement', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (322,'PCG99-BASE','CHARGE','PRODUCT', '60','1506', 'Achats', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (323,'PCG99-BASE','CHARGE','XXXXXX', '601', '322', 'Achats stockés - Matières premières (et fournitures)', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (324,'PCG99-BASE','CHARGE','XXXXXX', '602', '322', 'Achats stockés - Autres approvisionnements', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (325,'PCG99-BASE','CHARGE','XXXXXX', '603', '322', 'Variations des stocks (approvisionnements et marchandises)', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (326,'PCG99-BASE','CHARGE','XXXXXX', '604', '322', 'Achats stockés - Matières premières (et fournitures)', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (327,'PCG99-BASE','CHARGE','XXXXXX', '605', '322', 'Achats de matériel, équipements et travaux', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (328,'PCG99-BASE','CHARGE','XXXXXX', '606', '322', 'Achats non stockés de matière et fournitures', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (329,'PCG99-BASE','CHARGE','XXXXXX', '607', '322', 'Achats de marchandises', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (330,'PCG99-BASE','CHARGE','XXXXXX', '608', '322', '(Compte réservé, le cas échéant, à la récapitulation des frais accessoires incorporés aux achats)', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (331,'PCG99-BASE','CHARGE','XXXXXX', '609', '322', 'Rabais, remises et ristournes obtenus sur achats', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (332,'PCG99-BASE','CHARGE','SERVICE', '61','1506', 'Services extérieurs', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (333,'PCG99-BASE','CHARGE','XXXXXX', '611', '332', 'Sous-traitance générale', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (334,'PCG99-BASE','CHARGE','XXXXXX', '612', '332', 'Redevances de crédit-bail', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (335,'PCG99-BASE','CHARGE','XXXXXX', '613', '332', 'Locations', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (336,'PCG99-BASE','CHARGE','XXXXXX', '614', '332', 'Charges locatives et de copropriété', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (337,'PCG99-BASE','CHARGE','XXXXXX', '615', '332', 'Entretien et réparations', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (338,'PCG99-BASE','CHARGE','XXXXXX', '616', '332', 'Primes d''assurances', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (339,'PCG99-BASE','CHARGE','XXXXXX', '617', '332', 'Etudes et recherches', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (340,'PCG99-BASE','CHARGE','XXXXXX', '618', '332', 'Divers', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (341,'PCG99-BASE','CHARGE','XXXXXX', '619', '332', 'Rabais, remises et ristournes obtenus sur services extérieurs', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (342,'PCG99-BASE','CHARGE','XXXXXX', '62','1506', 'Autres services extérieurs', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (343,'PCG99-BASE','CHARGE','XXXXXX', '621', '342', 'Personnel extérieur à l''entreprise', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (344,'PCG99-BASE','CHARGE','XXXXXX', '622', '342', 'Rémunérations d''intermédiaires et honoraires', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (345,'PCG99-BASE','CHARGE','XXXXXX', '623', '342', 'Publicité, publications, relations publiques', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (346,'PCG99-BASE','CHARGE','XXXXXX', '624', '342', 'Transports de biens et transports collectifs du personnel', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (347,'PCG99-BASE','CHARGE','XXXXXX', '625', '342', 'Déplacements, missions et réceptions', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (348,'PCG99-BASE','CHARGE','XXXXXX', '626', '342', 'Frais postaux et de télécommunications', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (349,'PCG99-BASE','CHARGE','XXXXXX', '627', '342', 'Services bancaires et assimilés', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (350,'PCG99-BASE','CHARGE','XXXXXX', '628', '342', 'Divers', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (351,'PCG99-BASE','CHARGE','XXXXXX', '629', '342', 'Rabais, remises et ristournes obtenus sur autres services extérieurs', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (352,'PCG99-BASE','CHARGE','XXXXXX', '63','1506', 'Impôts, taxes et versements assimilés', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (353,'PCG99-BASE','CHARGE','XXXXXX', '631', '352', 'Impôts, taxes et versements assimilés sur rémunérations (administrations des impôts)', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (354,'PCG99-BASE','CHARGE','XXXXXX', '633', '352', 'Impôts, taxes et versements assimilés sur rémunérations (autres organismes)', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (355,'PCG99-BASE','CHARGE','XXXXXX', '635', '352', 'Autres impôts, taxes et versements assimilés (administrations des impôts)', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (356,'PCG99-BASE','CHARGE','XXXXXX', '637', '352', 'Autres impôts, taxes et versements assimilés (autres organismes)', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (357,'PCG99-BASE','CHARGE','XXXXXX', '64','1506', 'Charges de personnel', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (358,'PCG99-BASE','CHARGE','XXXXXX', '641', '357', 'Rémunérations du personnel', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (359,'PCG99-BASE','CHARGE','XXXXXX', '644', '357', 'Rémunération du travail de l''exploitant', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (360,'PCG99-BASE','CHARGE','SOCIAL', '645', '357', 'Charges de sécurité sociale et de prévoyance', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (361,'PCG99-BASE','CHARGE','XXXXXX', '646', '357', 'Cotisations sociales personnelles de l''exploitant', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (362,'PCG99-BASE','CHARGE','XXXXXX', '647', '357', 'Autres charges sociales', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (363,'PCG99-BASE','CHARGE','XXXXXX', '648', '357', 'Autres charges de personnel', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (364,'PCG99-BASE','CHARGE','XXXXXX', '65','1506', 'Autres charges de gestion courante', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (365,'PCG99-BASE','CHARGE','XXXXXX', '651', '364', 'Redevances pour concessions, brevets, licences, marques, procédés, logiciels, droits et valeurs similaires', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (366,'PCG99-BASE','CHARGE','XXXXXX', '653', '364', 'Jetons de présence', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (367,'PCG99-BASE','CHARGE','XXXXXX', '654', '364', 'Pertes sur créances irrécouvrables', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (368,'PCG99-BASE','CHARGE','XXXXXX', '655', '364', 'Quote-part de résultat sur opérations faites en commun', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (369,'PCG99-BASE','CHARGE','XXXXXX', '658', '364', 'Charges diverses de gestion courante', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (370,'PCG99-BASE','CHARGE','XXXXXX', '66','1506', 'Charges financières', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (371,'PCG99-BASE','CHARGE','XXXXXX', '661', '370', 'Charges d''intérêts', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (372,'PCG99-BASE','CHARGE','XXXXXX', '664', '370', 'Pertes sur créances liées à des participations', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (373,'PCG99-BASE','CHARGE','XXXXXX', '665', '370', 'Escomptes accordés', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (374,'PCG99-BASE','CHARGE','XXXXXX', '666', '370', 'Pertes de change', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (375,'PCG99-BASE','CHARGE','XXXXXX', '667', '370', 'Charges nettes sur cessions de valeurs mobilières de placement', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (376,'PCG99-BASE','CHARGE','XXXXXX', '668', '370', 'Autres charges financières', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (377,'PCG99-BASE','CHARGE','XXXXXX', '67','1506', 'Charges exceptionnelles', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (378,'PCG99-BASE','CHARGE','XXXXXX', '671', '377', 'Charges exceptionnelles sur opérations de gestion', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (379,'PCG99-BASE','CHARGE','XXXXXX', '672', '377', '(Compte à la disposition des entités pour enregistrer, en cours d''exercice, les charges sur exercices antérieurs)', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (380,'PCG99-BASE','CHARGE','XXXXXX', '675', '377', 'Valeurs comptables des éléments d''actif cédés', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (381,'PCG99-BASE','CHARGE','XXXXXX', '678', '377', 'Autres charges exceptionnelles', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (382,'PCG99-BASE','CHARGE','XXXXXX', '68','1506', 'Dotations aux amortissements et aux provisions', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (383,'PCG99-BASE','CHARGE','XXXXXX', '681', '382', 'Dotations aux amortissements et aux provisions - Charges d''exploitation', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (384,'PCG99-BASE','CHARGE','XXXXXX', '686', '382', 'Dotations aux amortissements et aux provisions - Charges financières', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (385,'PCG99-BASE','CHARGE','XXXXXX', '687', '382', 'Dotations aux amortissements et aux provisions - Charges exceptionnelles', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (386,'PCG99-BASE','CHARGE','XXXXXX', '69','1506', 'Participation des salariés - impôts sur les bénéfices et assimiles', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (387,'PCG99-BASE','CHARGE','XXXXXX', '691', '386', 'Participation des salariés aux résultats', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (388,'PCG99-BASE','CHARGE','XXXXXX', '695', '386', 'Impôts sur les bénéfices', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (389,'PCG99-BASE','CHARGE','XXXXXX', '696', '386', 'Suppléments d''impôt sur les sociétés liés aux distributions', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (390,'PCG99-BASE','CHARGE','XXXXXX', '697', '386', 'Imposition forfaitaire annuelle des sociétés', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (391,'PCG99-BASE','CHARGE','XXXXXX', '698', '386', 'Intégration fiscale', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (392,'PCG99-BASE','CHARGE','XXXXXX', '699', '386', 'Produits - Reports en arrière des déficits', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (393,'PCG99-BASE','PROD', 'XXXXXX', '70','1507', 'Ventes de produits fabriqués, prestations de services, marchandises', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (394,'PCG99-BASE','PROD', 'PRODUCT', '701', '393', 'Ventes de produits finis', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (395,'PCG99-BASE','PROD', 'XXXXXX', '702', '393', 'Ventes de produits intermédiaires', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (396,'PCG99-BASE','PROD', 'XXXXXX', '703', '393', 'Ventes de produits résiduels', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (397,'PCG99-BASE','PROD', 'XXXXXX', '704', '393', 'Travaux', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (398,'PCG99-BASE','PROD', 'XXXXXX', '705', '393', 'Etudes', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (399,'PCG99-BASE','PROD', 'SERVICE', '706', '393', 'Prestations de services', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (400,'PCG99-BASE','PROD', 'PRODUCT', '707', '393', 'Ventes de marchandises', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (401,'PCG99-BASE','PROD', 'PRODUCT', '708', '393', 'Produits des activités annexes', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (402,'PCG99-BASE','PROD', 'XXXXXX', '709', '393', 'Rabais, remises et ristournes accordés par l''entreprise', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (403,'PCG99-BASE','PROD', 'XXXXXX', '71','1507', 'Production stockée (ou déstockage)', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (404,'PCG99-BASE','PROD', 'XXXXXX', '713', '403', 'Variation des stocks (en-cours de production, produits)', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (405,'PCG99-BASE','PROD', 'XXXXXX', '72','1507', 'Production immobilisée', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (406,'PCG99-BASE','PROD', 'XXXXXX', '721', '405', 'Immobilisations incorporelles', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (407,'PCG99-BASE','PROD', 'XXXXXX', '722', '405', 'Immobilisations corporelles', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (408,'PCG99-BASE','PROD', 'XXXXXX', '74','1507', 'Subventions d''exploitation', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (409,'PCG99-BASE','PROD', 'XXXXXX', '75','1507', 'Autres produits de gestion courante', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (410,'PCG99-BASE','PROD', 'XXXXXX', '751', '409', 'Redevances pour concessions, brevets, licences, marques, procédés, logiciels, droits et valeurs similaires', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (411,'PCG99-BASE','PROD', 'XXXXXX', '752', '409', 'Revenus des immeubles non affectés à des activités professionnelles', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (412,'PCG99-BASE','PROD', 'XXXXXX', '753', '409', 'Jetons de présence et rémunérations d''administrateurs, gérants,...', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (413,'PCG99-BASE','PROD', 'XXXXXX', '754', '409', 'Ristournes perçues des coopératives (provenant des excédents)', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (414,'PCG99-BASE','PROD', 'XXXXXX', '755', '409', 'Quotes-parts de résultat sur opérations faites en commun', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (415,'PCG99-BASE','PROD', 'XXXXXX', '758', '409', 'Produits divers de gestion courante', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (416,'PCG99-BASE','PROD', 'XXXXXX', '76','1507', 'Produits financiers', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (417,'PCG99-BASE','PROD', 'XXXXXX', '761', '416', 'Produits de participations', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (418,'PCG99-BASE','PROD', 'XXXXXX', '762', '416', 'Produits des autres immobilisations financières', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (419,'PCG99-BASE','PROD', 'XXXXXX', '763', '416', 'Revenus des autres créances', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (420,'PCG99-BASE','PROD', 'XXXXXX', '764', '416', 'Revenus des valeurs mobilières de placement', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (421,'PCG99-BASE','PROD', 'XXXXXX', '765', '416', 'Escomptes obtenus', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (422,'PCG99-BASE','PROD', 'XXXXXX', '766', '416', 'Gains de change', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (423,'PCG99-BASE','PROD', 'XXXXXX', '767', '416', 'Produits nets sur cessions de valeurs mobilières de placement', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (424,'PCG99-BASE','PROD', 'XXXXXX', '768', '416', 'Autres produits financiers', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (425,'PCG99-BASE','PROD', 'XXXXXX', '77','1507', 'Produits exceptionnels', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (426,'PCG99-BASE','PROD', 'XXXXXX', '771', '425', 'Produits exceptionnels sur opérations de gestion', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (427,'PCG99-BASE','PROD', 'XXXXXX', '772', '425', '(Compte à la disposition des entités pour enregistrer, en cours d''exercice, les produits sur exercices antérieurs)', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (428,'PCG99-BASE','PROD', 'XXXXXX', '775', '425', 'Produits des cessions d''éléments d''actif', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (429,'PCG99-BASE','PROD', 'XXXXXX', '777', '425', 'Quote-part des subventions d''investissement virée au résultat de l''exercice', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (430,'PCG99-BASE','PROD', 'XXXXXX', '778', '425', 'Autres produits exceptionnels', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (431,'PCG99-BASE','PROD', 'XXXXXX', '78','1507', 'Reprises sur amortissements et provisions', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (432,'PCG99-BASE','PROD', 'XXXXXX', '781', '431', 'Reprises sur amortissements et provisions (à inscrire dans les produits d''exploitation)', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (433,'PCG99-BASE','PROD', 'XXXXXX', '786', '431', 'Reprises sur provisions pour risques (à inscrire dans les produits financiers)', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (434,'PCG99-BASE','PROD', 'XXXXXX', '787', '431', 'Reprises sur provisions (à inscrire dans les produits exceptionnels)', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (435,'PCG99-BASE','PROD', 'XXXXXX', '79','1507', 'Transferts de charges', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (436,'PCG99-BASE','PROD', 'XXXXXX', '791', '435', 'Transferts de charges d''exploitation ', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (437,'PCG99-BASE','PROD', 'XXXXXX', '796', '435', 'Transferts de charges financières', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (438,'PCG99-BASE','PROD', 'XXXXXX', '797', '435', 'Transferts de charges exceptionnelles', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1501,'PCG99-BASE','CAPIT', 'XXXXXX', '1', '', 'Fonds propres, provisions pour risques et charges et dettes à plus d''un an', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1502,'PCG99-BASE','IMMO', 'XXXXXX', '2', '', 'Frais d''établissement. Actifs immobilisés et créances à plus d''un an', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1503,'PCG99-BASE','STOCK', 'XXXXXX', '3', '', 'Stock et commandes en cours d''exécution', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1504,'PCG99-BASE','TIERS', 'XXXXXX', '4', '', 'Créances et dettes à un an au plus', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1505,'PCG99-BASE','FINAN', 'XXXXXX', '5', '', 'Placement de trésorerie et de valeurs disponibles', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1506,'PCG99-BASE','CHARGE','XXXXXX', '6', '', 'Charges', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1507,'PCG99-BASE','PROD', 'XXXXXX', '7', '', 'Produits', '1'); + +-- Plan comptable BE PCMN-BASE +INSERT INTO llx_accounting_system (rowid, pcg_version, fk_pays, label, active) VALUES (3, 'PCMN-BASE', '2', 'The base accountancy belgium plan', '1'); + +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (439, 'PCMN-BASE', 'CAPIT', 'XXXXXX', '10', '1351', 'Capital', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (440, 'PCMN-BASE', 'CAPIT', 'XXXXXX', '100', '439', 'Capital souscrit ou capital personnel', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (441, 'PCMN-BASE', 'CAPIT', 'XXXXXX', '1000', '440', 'Capital non amorti', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (442, 'PCMN-BASE', 'CAPIT', 'XXXXXX', '1001', '440', 'Capital amorti', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (443, 'PCMN-BASE', 'CAPIT', 'XXXXXX', '101', '439', 'Capital non appelé', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (444, 'PCMN-BASE', 'CAPIT', 'XXXXXX', '109', '439', 'Compte de l''exploitant', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (445, 'PCMN-BASE', 'CAPIT', 'XXXXXX', '1090', '444', 'Opérations courantes', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (446, 'PCMN-BASE', 'CAPIT', 'XXXXXX', '1091', '444', 'Impôts personnels', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (447, 'PCMN-BASE', 'CAPIT', 'XXXXXX', '1092', '444', 'Rémunérations et autres avantages', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (448, 'PCMN-BASE', 'CAPIT', 'XXXXXX', '11', '1351', 'Primes d''émission', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (449, 'PCMN-BASE', 'CAPIT', 'XXXXXX', '12', '1351', 'Plus-values de réévaluation', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (450, 'PCMN-BASE', 'CAPIT', 'XXXXXX', '120', '449', 'Plus-values de réévaluation sur immobilisations incorporelles', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (451, 'PCMN-BASE', 'CAPIT', 'XXXXXX', '1200', '450', 'Plus-values de réévaluation', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (452, 'PCMN-BASE', 'CAPIT', 'XXXXXX', '1201', '450', 'Reprises de réductions de valeur', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (453, 'PCMN-BASE', 'CAPIT', 'XXXXXX', '121', '449', 'Plus-values de réévaluation sur immobilisations corporelles', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (454, 'PCMN-BASE', 'CAPIT', 'XXXXXX', '1210', '453', 'Plus-values de réévaluation', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (455, 'PCMN-BASE', 'CAPIT', 'XXXXXX', '1211', '453', 'Reprises de réductions de valeur', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (456, 'PCMN-BASE', 'CAPIT', 'XXXXXX', '122', '449', 'Plus-values de réévaluation sur immobilisations financières', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (457, 'PCMN-BASE', 'CAPIT', 'XXXXXX', '1220', '456', 'Plus-values de réévaluation', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (458, 'PCMN-BASE', 'CAPIT', 'XXXXXX', '1221', '456', 'Reprises de réductions de valeur', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (459, 'PCMN-BASE', 'CAPIT', 'XXXXXX', '123', '449', 'Plus-values de réévaluation sur stocks', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (460, 'PCMN-BASE', 'CAPIT', 'XXXXXX', '124', '449', 'Reprises de réductions de valeur sur placements de trésorerie', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (461, 'PCMN-BASE', 'CAPIT', 'XXXXXX', '13', '1351', 'Réserve', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (462, 'PCMN-BASE', 'CAPIT', 'XXXXXX', '130', '461', 'Réserve légale', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (463, 'PCMN-BASE', 'CAPIT', 'XXXXXX', '131', '461', 'Réserves indisponibles', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (464, 'PCMN-BASE', 'CAPIT', 'XXXXXX', '1310', '463', 'Réserve pour actions propres', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (465, 'PCMN-BASE', 'CAPIT', 'XXXXXX', '1311', '463', 'Autres réserves indisponibles', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (466, 'PCMN-BASE', 'CAPIT', 'XXXXXX', '132', '461', 'Réserves immunisées', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (467, 'PCMN-BASE', 'CAPIT', 'XXXXXX', '133', '461', 'Réserves disponibles', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (468, 'PCMN-BASE', 'CAPIT', 'XXXXXX', '1330', '467', 'Réserve pour régularisation de dividendes', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (469, 'PCMN-BASE', 'CAPIT', 'XXXXXX', '1331', '467', 'Réserve pour renouvellement des immobilisations', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (470, 'PCMN-BASE', 'CAPIT', 'XXXXXX', '1332', '467', 'Réserve pour installations en faveur du personnel 1333 Réserves libres', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (471, 'PCMN-BASE', 'CAPIT', 'XXXXXX', '14', '1351', 'Bénéfice reporté (ou perte reportée)', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (472, 'PCMN-BASE', 'CAPIT', 'XXXXXX', '15', '1351', 'Subsides en capital', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (473, 'PCMN-BASE', 'CAPIT', 'XXXXXX', '150', '472', 'Montants obtenus', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (474, 'PCMN-BASE', 'CAPIT', 'XXXXXX', '151', '472', 'Montants transférés aux résultats', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (475, 'PCMN-BASE', 'CAPIT', 'XXXXXX', '16', '1351', 'Provisions pour risques et charges', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (476, 'PCMN-BASE', 'CAPIT', 'XXXXXX', '160', '475', 'Provisions pour pensions et obligations similaires', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (477, 'PCMN-BASE', 'CAPIT', 'XXXXXX', '161', '475', 'Provisions pour charges fiscales', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (478, 'PCMN-BASE', 'CAPIT', 'XXXXXX', '162', '475', 'Provisions pour grosses réparations et gros entretiens', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (479, 'PCMN-BASE', 'CAPIT', 'XXXXXX', '163', '475', 'à 169 Provisions pour autres risques et charges', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (480, 'PCMN-BASE', 'CAPIT', 'XXXXXX', '164', '475', 'Provisions pour sûretés personnelles ou réelles constituées à l''appui de dettes et d''engagements de tiers', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (481, 'PCMN-BASE', 'CAPIT', 'XXXXXX', '165', '475', 'Provisions pour engagements relatifs à l''acquisition ou à la cession d''immobilisations', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (482, 'PCMN-BASE', 'CAPIT', 'XXXXXX', '166', '475', 'Provisions pour exécution de commandes passées ou reçues', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (483, 'PCMN-BASE', 'CAPIT', 'XXXXXX', '167', '475', 'Provisions pour positions et marchés à terme en devises ou positions et marchés à terme en marchandises', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (484, 'PCMN-BASE', 'CAPIT', 'XXXXXX', '168', '475', 'Provisions pour garanties techniques attachées aux ventes et prestations déjà effectuées par l''entreprise', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (485, 'PCMN-BASE', 'CAPIT', 'XXXXXX', '169', '475', 'Provisions pour autres risques et charges', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (486, 'PCMN-BASE', 'CAPIT', 'XXXXXX', '1690', '485', 'Pour litiges en cours', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (487, 'PCMN-BASE', 'CAPIT', 'XXXXXX', '1691', '485', 'Pour amendes, doubles droits et pénalités', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (488, 'PCMN-BASE', 'CAPIT', 'XXXXXX', '1692', '485', 'Pour propre assureur', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (489, 'PCMN-BASE', 'CAPIT', 'XXXXXX', '1693', '485', 'Pour risques inhérents aux opérations de crédits à moyen ou long terme', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (490, 'PCMN-BASE', 'CAPIT', 'XXXXXX', '1695', '485', 'Provision pour charge de liquidation', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (491, 'PCMN-BASE', 'CAPIT', 'XXXXXX', '1696', '485', 'Provision pour départ de personnel', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (492, 'PCMN-BASE', 'CAPIT', 'XXXXXX', '1699', '485', 'Pour risques divers', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (493, 'PCMN-BASE', 'CAPIT', 'XXXXXX', '17', '1351', 'Dettes à plus d''un an', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (494, 'PCMN-BASE', 'CAPIT', 'XXXXXX', '170', '493', 'Emprunts subordonnés', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (495, 'PCMN-BASE', 'CAPIT', 'XXXXXX', '1700', '494', 'Convertibles', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (496, 'PCMN-BASE', 'CAPIT', 'XXXXXX', '1701', '494', 'Non convertibles', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (497, 'PCMN-BASE', 'CAPIT', 'XXXXXX', '171', '493', 'Emprunts obligataires non subordonnés', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (498, 'PCMN-BASE', 'CAPIT', 'XXXXXX', '1710', '498', 'Convertibles', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (499, 'PCMN-BASE', 'CAPIT', 'XXXXXX', '1711', '498', 'Non convertibles', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (500, 'PCMN-BASE', 'CAPIT', 'XXXXXX', '172', '493', 'Dettes de location-financement et assimilés', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (501, 'PCMN-BASE', 'CAPIT', 'XXXXXX', '1720', '500', 'Dettes de location-financement de biens immobiliers', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (502, 'PCMN-BASE', 'CAPIT', 'XXXXXX', '1721', '500', 'Dettes de location-financement de biens mobiliers', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (503, 'PCMN-BASE', 'CAPIT', 'XXXXXX', '1722', '500', 'Dettes sur droits réels sur immeubles', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (504, 'PCMN-BASE', 'CAPIT', 'XXXXXX', '173', '493', 'Etablissements de crédit', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (505, 'PCMN-BASE', 'CAPIT', 'XXXXXX', '1730', '504', 'Dettes en compte', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (506, 'PCMN-BASE', 'CAPIT', 'XXXXXX', '17300', '505', 'Banque A', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (507, 'PCMN-BASE', 'CAPIT', 'XXXXXX', '17301', '505', 'Banque B', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (508, 'PCMN-BASE', 'CAPIT', 'XXXXXX', '17302', '505', 'Banque C', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (509, 'PCMN-BASE', 'CAPIT', 'XXXXXX', '17303', '505', 'Banque D', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (510, 'PCMN-BASE', 'CAPIT', 'XXXXXX', '1731', '504', 'Promesses', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (511, 'PCMN-BASE', 'CAPIT', 'XXXXXX', '17310', '510', 'Banque A', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (512, 'PCMN-BASE', 'CAPIT', 'XXXXXX', '17311', '510', 'Banque B', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (513, 'PCMN-BASE', 'CAPIT', 'XXXXXX', '17312', '510', 'Banque C', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (514, 'PCMN-BASE', 'CAPIT', 'XXXXXX', '17313', '510', 'Banque D', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (515, 'PCMN-BASE', 'CAPIT', 'XXXXXX', '1732', '504', 'Crédits d''acceptation', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (516, 'PCMN-BASE', 'CAPIT', 'XXXXXX', '17320', '515', 'Banque A', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (517, 'PCMN-BASE', 'CAPIT', 'XXXXXX', '17321', '515', 'Banque B', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (518, 'PCMN-BASE', 'CAPIT', 'XXXXXX', '17322', '515', 'Banque C', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (519, 'PCMN-BASE', 'CAPIT', 'XXXXXX', '17323', '515', 'Banque D', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (520, 'PCMN-BASE', 'CAPIT', 'XXXXXX', '174', '493', 'Autres emprunts', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (521, 'PCMN-BASE', 'CAPIT', 'XXXXXX', '175', '493', 'Dettes commerciales', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (522, 'PCMN-BASE', 'CAPIT', 'XXXXXX', '1750', '521', 'Fournisseurs : dettes en compte', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (523, 'PCMN-BASE', 'CAPIT', 'XXXXXX', '17500', '522', 'Entreprises apparentées', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (524, 'PCMN-BASE', 'CAPIT', 'XXXXXX', '175000', '523', 'Entreprises liées', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (525, 'PCMN-BASE', 'CAPIT', 'XXXXXX', '175001', '523', 'Entreprises avec lesquelles il existe un lien de participation', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (526, 'PCMN-BASE', 'CAPIT', 'XXXXXX', '17501', '522', 'Fournisseurs ordinaires', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (527, 'PCMN-BASE', 'CAPIT', 'XXXXXX', '175010', '526', 'Fournisseurs belges', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (528, 'PCMN-BASE', 'CAPIT', 'XXXXXX', '175011', '526', 'Fournisseurs C.E.E.', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (529, 'PCMN-BASE', 'CAPIT', 'XXXXXX', '175012', '526', 'Fournisseurs importation', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (530, 'PCMN-BASE', 'CAPIT', 'XXXXXX', '1751', '521', 'Effets à payer', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (531, 'PCMN-BASE', 'CAPIT', 'XXXXXX', '17510', '530', 'Entreprises apparentées', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (532, 'PCMN-BASE', 'CAPIT', 'XXXXXX', '175100', '531', 'Entreprises liées', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (533, 'PCMN-BASE', 'CAPIT', 'XXXXXX', '175101', '531', 'Entreprises avec lesquelles il existe un lien de participation', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (534, 'PCMN-BASE', 'CAPIT', 'XXXXXX', '17511', '530', 'Fournisseurs ordinaires', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (535, 'PCMN-BASE', 'CAPIT', 'XXXXXX', '175110', '534', 'Fournisseurs belges', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (536, 'PCMN-BASE', 'CAPIT', 'XXXXXX', '175111', '534', 'Fournisseurs C.E.E.', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (537, 'PCMN-BASE', 'CAPIT', 'XXXXXX', '175112', '534', 'Fournisseurs importation', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (538, 'PCMN-BASE', 'CAPIT', 'XXXXXX', '176', '493', 'Acomptes reçus sur commandes', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (539, 'PCMN-BASE', 'CAPIT', 'XXXXXX', '178', '493', 'Cautionnements reçus en numéraires', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (540, 'PCMN-BASE', 'CAPIT', 'XXXXXX', '179', '493', 'Dettes diverses', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (541, 'PCMN-BASE', 'CAPIT', 'XXXXXX', '1790', '540', 'Entreprises liées', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (542, 'PCMN-BASE', 'CAPIT', 'XXXXXX', '1791', '540', 'Autres entreprises avec lesquelles il existe un lien de participation', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (543, 'PCMN-BASE', 'CAPIT', 'XXXXXX', '1792', '540', 'Administrateurs, gérants et associés', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (544, 'PCMN-BASE', 'CAPIT', 'XXXXXX', '1794', '540', 'Rentes viagères capitalisées', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (545, 'PCMN-BASE', 'CAPIT', 'XXXXXX', '1798', '540', 'Dettes envers les coparticipants des associations momentanées et en participation', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (546, 'PCMN-BASE', 'CAPIT', 'XXXXXX', '1799', '540', 'Autres dettes diverses', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (547, 'PCMN-BASE', 'CAPIT', 'XXXXXX', '18', '1351', 'Comptes de liaison des établissements et succursales', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (548, 'PCMN-BASE', 'IMMO', 'XXXXXX', '20', '1352', 'Frais d''établissement', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (549, 'PCMN-BASE', 'IMMO', 'XXXXXX', '200', '548', 'Frais de constitution et d''augmentation de capital', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (550, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2000', '549', 'Frais de constitution et d''augmentation de capital', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (551, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2009', '549', 'Amortissements sur frais de constitution et d''augmentation de capital', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (552, 'PCMN-BASE', 'IMMO', 'XXXXXX', '201', '548', 'Frais d''émission d''emprunts et primes de remboursement', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (553, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2010', '552', 'Agios sur emprunts et frais d''émission d''emprunts', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (554, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2019', '552', 'Amortissements sur agios sur emprunts et frais d''émission d''emprunts', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (555, 'PCMN-BASE', 'IMMO', 'XXXXXX', '202', '548', 'Autres frais d''établissement', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (556, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2020', '555', 'Autres frais d''établissement', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (557, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2029', '555', 'Amortissements sur autres frais d''établissement', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (558, 'PCMN-BASE', 'IMMO', 'XXXXXX', '203', '548', 'Intérêts intercalaires', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (559, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2030', '558', 'Intérêts intercalaires', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (560, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2039', '558', 'Amortissements sur intérêts intercalaires', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (561, 'PCMN-BASE', 'IMMO', 'XXXXXX', '204', '548', 'Frais de restructuration', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (562, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2040', '561', 'Coût des frais de restructuration', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (563, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2049', '561', 'Amortissements sur frais de restructuration', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (564, 'PCMN-BASE', 'IMMO', 'XXXXXX', '21', '1352', 'Immobilisations incorporelles', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (565, 'PCMN-BASE', 'IMMO', 'XXXXXX', '210', '564', 'Frais de recherche et de développement', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (566, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2100', '565', 'Frais de recherche et de mise au point', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (567, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2108', '565', 'Plus-values actées sur frais de recherche et de mise au point', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (568, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2109', '565', 'Amortissements sur frais de recherche et de mise au point', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (569, 'PCMN-BASE', 'IMMO', 'XXXXXX', '211', '564', 'Concessions, brevets, licences, savoir-faire, marque et droits similaires', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (570, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2110', '569', 'Concessions, brevets, licences, marques, etc', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (571, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2118', '569', 'Plus-values actées sur concessions, etc', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (572, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2119', '569', 'Amortissements sur concessions, etc', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (573, 'PCMN-BASE', 'IMMO', 'XXXXXX', '212', '564', 'Goodwill', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (574, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2120', '573', 'Coût d''acquisition', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (575, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2128', '573', 'Plus-values actées', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (576, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2129', '573', 'Amortissements sur goodwill', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (577, 'PCMN-BASE', 'IMMO', 'XXXXXX', '213', '564', 'Acomptes versés', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (578, 'PCMN-BASE', 'IMMO', 'XXXXXX', '22', '1352', 'Terrains et constructions', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (579, 'PCMN-BASE', 'IMMO', 'XXXXXX', '220', '578', 'Terrains', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (580, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2200', '579', 'Terrains', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (581, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2201', '579', 'Frais d''acquisition sur terrains', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (582, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2208', '579', 'Plus-values actées sur terrains', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (583, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2209', '579', 'Amortissements et réductions de valeur', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (584, 'PCMN-BASE', 'IMMO', 'XXXXXX', '22090', '583', 'Amortissements sur frais d''acquisition', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (585, 'PCMN-BASE', 'IMMO', 'XXXXXX', '22091', '583', 'Réductions de valeur sur terrains', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (586, 'PCMN-BASE', 'IMMO', 'XXXXXX', '221', '578', 'Constructions', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (587, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2210', '586', 'Bâtiments industriels', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (588, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2211', '586', 'Bâtiments administratifs et commerciaux', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (589, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2212', '586', 'Autres bâtiments d''exploitation', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (590, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2213', '586', 'Voies de transport et ouvrages d''art', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (591, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2215', '586', 'Constructions sur sol d''autrui', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (592, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2216', '586', 'Frais d''acquisition sur constructions', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (593, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2218', '586', 'Plus-values actées', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (594, 'PCMN-BASE', 'IMMO', 'XXXXXX', '22180', '593', 'Sur bâtiments industriels', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (595, 'PCMN-BASE', 'IMMO', 'XXXXXX', '22181', '593', 'Sur bâtiments administratifs et commerciaux', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (596, 'PCMN-BASE', 'IMMO', 'XXXXXX', '22182', '593', 'Sur autres bâtiments d''exploitation', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (597, 'PCMN-BASE', 'IMMO', 'XXXXXX', '22184', '593', 'Sur voies de transport et ouvrages d''art', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (598, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2219', '586', 'Amortissements sur constructions', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (599, 'PCMN-BASE', 'IMMO', 'XXXXXX', '22190', '598', 'Sur bâtiments industriels', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (600, 'PCMN-BASE', 'IMMO', 'XXXXXX', '22191', '598', 'Sur bâtiments administratifs et commerciaux', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (601, 'PCMN-BASE', 'IMMO', 'XXXXXX', '22192', '598', 'Sur autres bâtiments d''exploitation', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (602, 'PCMN-BASE', 'IMMO', 'XXXXXX', '22194', '598', 'Sur voies de transport et ouvrages d''art', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (603, 'PCMN-BASE', 'IMMO', 'XXXXXX', '22195', '598', 'Sur constructions sur sol d''autrui', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (604, 'PCMN-BASE', 'IMMO', 'XXXXXX', '22196', '598', 'Sur frais d''acquisition sur constructions', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (605, 'PCMN-BASE', 'IMMO', 'XXXXXX', '222', '578', 'Terrains bâtis', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (606, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2220', '605', 'Valeur d''acquisition', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (607, 'PCMN-BASE', 'IMMO', 'XXXXXX', '22200', '606', 'Bâtiments industriels', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (608, 'PCMN-BASE', 'IMMO', 'XXXXXX', '22201', '606', 'Bâtiments administratifs et commerciaux', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (609, 'PCMN-BASE', 'IMMO', 'XXXXXX', '22202', '606', 'Autres bâtiments d''exploitation', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (610, 'PCMN-BASE', 'IMMO', 'XXXXXX', '22203', '606', 'Voies de transport et ouvrages d''art', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (611, 'PCMN-BASE', 'IMMO', 'XXXXXX', '22204', '606', 'Frais d''acquisition des terrains à bâtir', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (612, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2228', '605', 'Plus-values actées', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (613, 'PCMN-BASE', 'IMMO', 'XXXXXX', '22280', '612', 'Sur bâtiments industriels', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (614, 'PCMN-BASE', 'IMMO', 'XXXXXX', '22281', '612', 'Sur bâtiments administratifs et commerciaux', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (615, 'PCMN-BASE', 'IMMO', 'XXXXXX', '22282', '612', 'Sur autres bâtiments d''exploitation', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (616, 'PCMN-BASE', 'IMMO', 'XXXXXX', '22283', '612', 'Sur voies de transport et ouvrages d''art', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (617, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2229', '605', 'Amortissements sur terrains bâtis', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (618, 'PCMN-BASE', 'IMMO', 'XXXXXX', '22290', '617', 'Sur bâtiments industriels', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (619, 'PCMN-BASE', 'IMMO', 'XXXXXX', '22291', '617', 'Sur bâtiments administratifs et commerciaux', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (620, 'PCMN-BASE', 'IMMO', 'XXXXXX', '22292', '617', 'Sur autres bâtiments d''exploitation', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (621, 'PCMN-BASE', 'IMMO', 'XXXXXX', '22293', '617', 'Sur voies de transport et ouvrages d''art', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (622, 'PCMN-BASE', 'IMMO', 'XXXXXX', '22294', '617', 'Sur frais d''acquisition des terrains bâtis', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (623, 'PCMN-BASE', 'IMMO', 'XXXXXX', '223', '578', 'Autres droits réels sur des immeubles', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (624, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2230', '623', 'Valeur d''acquisition', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (625, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2238', '623', 'Plus-values actées', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (626, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2239', '623', 'Amortissements', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (627, 'PCMN-BASE', 'IMMO', 'XXXXXX', '23', '1352', 'Installations, machines et outillages', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (628, 'PCMN-BASE', 'IMMO', 'XXXXXX', '230', '627', 'Installations', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (629, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2300', '628', 'Installations bâtiments industriels', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (630, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2301', '628', 'Installations bâtiments administratifs et commerciaux', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (631, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2302', '628', 'Installations bâtiments d''exploitation', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (632, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2303', '628', 'Installations voies de transport et ouvrages d''art', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (633, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2300', '628', 'Installation d''eau', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (634, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2301', '628', 'Installation d''électricité', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (635, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2302', '628', 'Installation de vapeur', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (636, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2303', '628', 'Installation de gaz', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (637, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2304', '628', 'Installation de chauffage', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (638, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2305', '628', 'Installation de conditionnement d''air', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (639, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2306', '628', 'Installation de chargement', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (640, 'PCMN-BASE', 'IMMO', 'XXXXXX', '231', '627', 'Machines', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (641, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2310', '640', 'Division A', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (642, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2311', '640', 'Division B', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (643, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2312', '640', 'Division C', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (644, 'PCMN-BASE', 'IMMO', 'XXXXXX', '237', '627', 'Outillage', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (645, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2370', '644', 'Division A', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (646, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2371', '644', 'Division B', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (647, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2372', '644', 'Division C', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (648, 'PCMN-BASE', 'IMMO', 'XXXXXX', '238', '627', 'Plus-values actées', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (649, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2380', '648', 'Sur installations', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (650, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2381', '648', 'Sur machines', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (651, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2382', '648', 'Sur outillage', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (652, 'PCMN-BASE', 'IMMO', 'XXXXXX', '239', '627', 'Amortissements', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (653, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2390', '652', 'Sur installations', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (654, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2391', '652', 'Sur machines', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (655, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2392', '652', 'Sur outillage', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (656, 'PCMN-BASE', 'IMMO', 'XXXXXX', '24', '1352', 'Mobilier et matériel roulant', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (657, 'PCMN-BASE', 'IMMO', 'XXXXXX', '240', '656', 'Mobilier', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (658, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2400', '656', 'Mobilier', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (659, 'PCMN-BASE', 'IMMO', 'XXXXXX', '24000', '658', 'Mobilier des bâtiments industriels', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (660, 'PCMN-BASE', 'IMMO', 'XXXXXX', '24001', '658', 'Mobilier des bâtiments administratifs et commerciaux', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (661, 'PCMN-BASE', 'IMMO', 'XXXXXX', '24002', '658', 'Mobilier des autres bâtiments d''exploitation', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (662, 'PCMN-BASE', 'IMMO', 'XXXXXX', '24003', '658', 'Mobilier oeuvres sociales', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (663, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2401', '657', 'Matériel de bureau et de service social', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (664, 'PCMN-BASE', 'IMMO', 'XXXXXX', '24010', '663', 'Des bâtiments industriels', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (665, 'PCMN-BASE', 'IMMO', 'XXXXXX', '24011', '663', 'Des bâtiments administratifs et commerciaux', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (666, 'PCMN-BASE', 'IMMO', 'XXXXXX', '24012', '663', 'Des autres bâtiments d''exploitation', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (667, 'PCMN-BASE', 'IMMO', 'XXXXXX', '24013', '663', 'Des oeuvres sociales', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (668, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2408', '657', 'Plus-values actées', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (669, 'PCMN-BASE', 'IMMO', 'XXXXXX', '24080', '668', 'Plus-values actées sur mobilier', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (670, 'PCMN-BASE', 'IMMO', 'XXXXXX', '24081', '668', 'Plus-values actées sur matériel de bureau et service social', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (671, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2409', '657', 'Amortissements', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (672, 'PCMN-BASE', 'IMMO', 'XXXXXX', '24090', '671', 'Amortissements sur mobilier', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (673, 'PCMN-BASE', 'IMMO', 'XXXXXX', '24091', '671', 'Amortissements sur matériel de bureau et service social', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (674, 'PCMN-BASE', 'IMMO', 'XXXXXX', '241', '656', 'Matériel roulant', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (675, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2410', '674', 'Matériel automobile', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (676, 'PCMN-BASE', 'IMMO', 'XXXXXX', '24100', '675', 'Voitures', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (677, 'PCMN-BASE', 'IMMO', 'XXXXXX', '24105', '675', 'Camions', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (678, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2411', '674', 'Matériel ferroviaire', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (679, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2412', '674', 'Matériel fluvial', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (680, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2413', '674', 'Matériel naval', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (681, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2414', '674', 'Matériel aérien', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (682, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2418', '674', 'Plus-values sur matériel roulant', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (683, 'PCMN-BASE', 'IMMO', 'XXXXXX', '24180', '682', 'Plus-values sur matériel automobile', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (684, 'PCMN-BASE', 'IMMO', 'XXXXXX', '24181', '682', 'Idem sur matériel ferroviaire', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (685, 'PCMN-BASE', 'IMMO', 'XXXXXX', '24182', '682', 'Idem sur matériel fluvial', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (686, 'PCMN-BASE', 'IMMO', 'XXXXXX', '24183', '682', 'Idem sur matériel naval', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (687, 'PCMN-BASE', 'IMMO', 'XXXXXX', '24184', '682', 'Idem sur matériel aérien', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (688, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2419', '674', 'Amortissements sur matériel roulant', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (689, 'PCMN-BASE', 'IMMO', 'XXXXXX', '24190', '688', 'Amortissements sur matériel automobile', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (690, 'PCMN-BASE', 'IMMO', 'XXXXXX', '24191', '688', 'Idem sur matériel ferroviaire', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (691, 'PCMN-BASE', 'IMMO', 'XXXXXX', '24192', '688', 'Idem sur matériel fluvial', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (692, 'PCMN-BASE', 'IMMO', 'XXXXXX', '24193', '688', 'Idem sur matériel naval', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (693, 'PCMN-BASE', 'IMMO', 'XXXXXX', '24194', '688', 'Idem sur matériel aérien', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (694, 'PCMN-BASE', 'IMMO', 'XXXXXX', '25', '1352', 'Immobilisation détenues en location-financement et droits similaires', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (695, 'PCMN-BASE', 'IMMO', 'XXXXXX', '250', '694', 'Terrains et constructions', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (696, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2500', '695', 'Terrains', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (697, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2501', '695', 'Constructions', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (698, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2508', '695', 'Plus-values sur emphytéose, leasing et droits similaires : terrains et constructions', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (699, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2509', '695', 'Amortissements et réductions de valeur sur terrains et constructions en leasing', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (700, 'PCMN-BASE', 'IMMO', 'XXXXXX', '251', '694', 'Installations, machines et outillage', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (701, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2510', '700', 'Installations', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (702, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2511', '700', 'Machines', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (703, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2512', '700', 'Outillage', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (704, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2518', '700', 'Plus-values actées sur installations machines et outillage pris en leasing', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (705, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2519', '700', 'Amortissements sur installations machines et outillage pris en leasing', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (706, 'PCMN-BASE', 'IMMO', 'XXXXXX', '252', '694', 'Mobilier et matériel roulant', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (707, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2520', '706', 'Mobilier', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (708, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2521', '706', 'Matériel roulant', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (709, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2528', '706', 'Plus-values actées sur mobilier et matériel roulant en leasing', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (710, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2529', '706', 'Amortissements sur mobilier et matériel roulant en leasing', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (711, 'PCMN-BASE', 'IMMO', 'XXXXXX', '26', '1352', 'Autres immobilisations corporelles', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (712, 'PCMN-BASE', 'IMMO', 'XXXXXX', '260', '711', 'Frais d''aménagements de locaux pris en location', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (713, 'PCMN-BASE', 'IMMO', 'XXXXXX', '261', '711', 'Maison d''habitation', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (714, 'PCMN-BASE', 'IMMO', 'XXXXXX', '262', '711', 'Réserve immobilière', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (715, 'PCMN-BASE', 'IMMO', 'XXXXXX', '263', '711', 'Matériel d''emballage', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (716, 'PCMN-BASE', 'IMMO', 'XXXXXX', '264', '711', 'Emballages récupérables', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (717, 'PCMN-BASE', 'IMMO', 'XXXXXX', '268', '711', 'Plus-values actées sur autres immobilisations corporelles', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (718, 'PCMN-BASE', 'IMMO', 'XXXXXX', '269', '711', 'Amortissements sur autres immobilisations corporelles', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (719, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2690', '718', 'Amortissements sur frais d''aménagement des locaux pris en location', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (720, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2691', '718', 'Amortissements sur maison d''habitation', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (721, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2692', '718', 'Amortissements sur réserve immobilière', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (722, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2693', '718', 'Amortissements sur matériel d''emballage', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (723, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2694', '718', 'Amortissements sur emballages récupérables', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (724, 'PCMN-BASE', 'IMMO', 'XXXXXX', '27', '1352', 'Immobilisations corporelles en cours et acomptes versés', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (725, 'PCMN-BASE', 'IMMO', 'XXXXXX', '270', '724', 'Immobilisations en cours', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (726, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2700', '725', 'Constructions', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (727, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2701', '725', 'Installations machines et outillage', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (728, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2702', '725', 'Mobilier et matériel roulant', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (729, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2703', '725', 'Autres immobilisations corporelles', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (730, 'PCMN-BASE', 'IMMO', 'XXXXXX', '271', '724', 'Avances et acomptes versés sur immobilisations en cours', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (731, 'PCMN-BASE', 'IMMO', 'XXXXXX', '28', '1352', 'Immobilisations financières', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (732, 'PCMN-BASE', 'IMMO', 'XXXXXX', '280', '731', 'Participations dans des entreprises liées', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (733, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2800', '732', 'Valeur d''acquisition (peut être subdivisé par participation)', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (734, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2801', '732', 'Montants non appelés (idem)', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (735, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2808', '732', 'Plus-values actées (idem)', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (736, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2809', '732', 'Réductions de valeurs actées (idem)', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (737, 'PCMN-BASE', 'IMMO', 'XXXXXX', '281', '731', 'Créances sur des entreprises liées', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (738, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2810', '737', 'Créances en compte', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (739, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2811', '737', 'Effets à recevoir', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (740, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2812', '737', 'Titres à revenu fixes', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (741, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2817', '737', 'Créances douteuses', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (742, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2819', '737', 'Réductions de valeurs actées', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (743, 'PCMN-BASE', 'IMMO', 'XXXXXX', '282', '731', 'Participations dans des entreprises avec lesquelles il existe un lien de participation', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (744, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2820', '743', 'Valeur d''acquisition (peut être subdivisé par participation)', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (745, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2821', '743', 'Montants non appelés (idem)', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (746, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2828', '743', 'Plus-values actées (idem)', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (747, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2829', '743', 'Réductions de valeurs actées (idem)', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (748, 'PCMN-BASE', 'IMMO', 'XXXXXX', '283', '731', 'Créances sur des entreprises avec lesquelles il existe un lien de participation', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (749, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2830', '748', 'Créances en compte', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (750, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2831', '748', 'Effets à recevoir', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (751, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2832', '748', 'Titres à revenu fixe', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (752, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2837', '748', 'Créances douteuses', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (753, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2839', '748', 'Réductions de valeurs actées', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (754, 'PCMN-BASE', 'IMMO', 'XXXXXX', '284', '731', 'Autres actions et parts', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (755, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2840', '754', 'Valeur d''acquisition', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (756, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2841', '754', 'Montants non appelés', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (757, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2848', '754', 'Plus-values actées', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (758, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2849', '754', 'Réductions de valeur actées', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (759, 'PCMN-BASE', 'IMMO', 'XXXXXX', '285', '731', 'Autres créances', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (760, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2850', '759', 'Créances en compte', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (761, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2851', '759', 'Effets à recevoir', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (762, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2852', '759', 'Titres à revenu fixe', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (763, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2857', '759', 'Créances douteuses', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (764, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2859', '759', 'Réductions de valeur actées', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (765, 'PCMN-BASE', 'IMMO', 'XXXXXX', '288', '731', 'Cautionnements versés en numéraires', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (766, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2880', '765', 'Téléphone, téléfax, télex', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (767, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2881', '765', 'Gaz', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (768, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2882', '765', 'Eau', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (769, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2883', '765', 'Electricité', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (770, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2887', '765', 'Autres cautionnements versés en numéraires', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (771, 'PCMN-BASE', 'IMMO', 'XXXXXX', '29', '1352', 'Créances à plus d''un an', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (772, 'PCMN-BASE', 'IMMO', 'XXXXXX', '290', '771', 'Créances commerciales', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (773, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2900', '772', 'Clients', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (774, 'PCMN-BASE', 'IMMO', 'XXXXXX', '29000', '773', 'Créances en compte sur entreprises liées', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (775, 'PCMN-BASE', 'IMMO', 'XXXXXX', '29001', '773', 'Sur entreprises avec lesquelles il existe un lien de participation', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (776, 'PCMN-BASE', 'IMMO', 'XXXXXX', '29002', '773', 'Sur clients Belgique', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (777, 'PCMN-BASE', 'IMMO', 'XXXXXX', '29003', '773', 'Sur clients C.E.E.', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (778, 'PCMN-BASE', 'IMMO', 'XXXXXX', '29004', '773', 'Sur clients exportation hors C.E.E.', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (779, 'PCMN-BASE', 'IMMO', 'XXXXXX', '29005', '773', 'Créances sur les coparticipants (associations momentanées)', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (780, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2901', '772', 'Effets à recevoir', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (781, 'PCMN-BASE', 'IMMO', 'XXXXXX', '29010', '780', 'Sur entreprises liées', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (782, 'PCMN-BASE', 'IMMO', 'XXXXXX', '29011', '780', 'Sur entreprises avec lesquelles il existe un lien de participation', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (783, 'PCMN-BASE', 'IMMO', 'XXXXXX', '29012', '780', 'Sur clients Belgique', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (784, 'PCMN-BASE', 'IMMO', 'XXXXXX', '29013', '780', 'Sur clients C.E.E.', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (785, 'PCMN-BASE', 'IMMO', 'XXXXXX', '29014', '780', 'Sur clients exportation hors C.E.E.', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (786, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2905', '772', 'Retenues sur garanties', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (787, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2906', '772', 'Acomptes versés', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (788, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2907', '772', 'Créances douteuses (à ventiler comme clients 2900)', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (789, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2909', '772', 'Réductions de valeur actées (à ventiler comme clients 2900)', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (790, 'PCMN-BASE', 'IMMO', 'XXXXXX', '291', '771', 'Autres créances', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (791, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2910', '790', 'Créances en compte', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (792, 'PCMN-BASE', 'IMMO', 'XXXXXX', '29100', '791', 'Sur entreprises liées', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (793, 'PCMN-BASE', 'IMMO', 'XXXXXX', '29101', '791', 'Sur entreprises avec lesquelles il existe un lien de participation', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (794, 'PCMN-BASE', 'IMMO', 'XXXXXX', '29102', '791', 'Sur autres débiteurs', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (795, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2911', '790', 'Effets à recevoir', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (796, 'PCMN-BASE', 'IMMO', 'XXXXXX', '29110', '795', 'Sur entreprises liées', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (797, 'PCMN-BASE', 'IMMO', 'XXXXXX', '29111', '795', 'Sur entreprises avec lesquelles il existe un lien de participation', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (798, 'PCMN-BASE', 'IMMO', 'XXXXXX', '29112', '795', 'Sur autres débiteurs', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (799, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2912', '790', 'Créances résultant de la cession d''immobilisations données en leasing', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (800, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2917', '790', 'Créances douteuses', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (801, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2919', '790', 'Réductions de valeur actées', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (802, 'PCMN-BASE', 'STOCK', 'XXXXXX', '30', '1353', 'Approvisionnements - matières premières', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (803, 'PCMN-BASE', 'STOCK', 'XXXXXX', '300', '802', 'Valeur d''acquisition', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (804, 'PCMN-BASE', 'STOCK', 'XXXXXX', '309', '802', 'Réductions de valeur actées', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (805, 'PCMN-BASE', 'STOCK', 'XXXXXX', '31', '1353', 'Approvsionnements et fournitures', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (806, 'PCMN-BASE', 'STOCK', 'XXXXXX', '310', '805', 'Valeur d''acquisition', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (807, 'PCMN-BASE', 'STOCK', 'XXXXXX', '3100', '806', 'Matières d''approvisionnement', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (808, 'PCMN-BASE', 'STOCK', 'XXXXXX', '3101', '806', 'Energie, charbon, coke, mazout, essence, propane', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (809, 'PCMN-BASE', 'STOCK', 'XXXXXX', '3102', '806', 'Produits d''entretien', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (810, 'PCMN-BASE', 'STOCK', 'XXXXXX', '3103', '806', 'Fournitures diverses et petit outillage', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (811, 'PCMN-BASE', 'STOCK', 'XXXXXX', '3104', '806', 'Imprimés et fournitures de bureau', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (812, 'PCMN-BASE', 'STOCK', 'XXXXXX', '3105', '806', 'Fournitures de services sociaux', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (813, 'PCMN-BASE', 'STOCK', 'XXXXXX', '3106', '806', 'Emballages commerciaux', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (814, 'PCMN-BASE', 'STOCK', 'XXXXXX', '31060', '813', 'Emballages perdus', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (815, 'PCMN-BASE', 'STOCK', 'XXXXXX', '31061', '813', 'Emballages récupérables', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (816, 'PCMN-BASE', 'STOCK', 'XXXXXX', '319', '805', 'Réductions de valeur actées', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (817, 'PCMN-BASE', 'STOCK', 'XXXXXX', '32', '1353', 'En cours de fabrication', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (818, 'PCMN-BASE', 'STOCK', 'XXXXXX', '320', '817', 'Valeur d''acquisition', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (819, 'PCMN-BASE', 'STOCK', 'XXXXXX', '3200', '818', 'Produits semi-ouvrés', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (820, 'PCMN-BASE', 'STOCK', 'XXXXXX', '3201', '818', 'Produits en cours de fabrication', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (821, 'PCMN-BASE', 'STOCK', 'XXXXXX', '3202', '818', 'Travaux en cours', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (822, 'PCMN-BASE', 'STOCK', 'XXXXXX', '3205', '818', 'Déchets', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (823, 'PCMN-BASE', 'STOCK', 'XXXXXX', '3206', '818', 'Rebuts', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (824, 'PCMN-BASE', 'STOCK', 'XXXXXX', '3209', '818', 'Travaux en association momentanée', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (825, 'PCMN-BASE', 'STOCK', 'XXXXXX', '329', '817', 'Réductions de valeur actées', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (826, 'PCMN-BASE', 'STOCK', 'XXXXXX', '33', '1353', 'Produits finis', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (827, 'PCMN-BASE', 'STOCK', 'XXXXXX', '330', '826', 'Valeur d''acquisition', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (828, 'PCMN-BASE', 'STOCK', 'XXXXXX', '3300', '827', 'Produits finis', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (829, 'PCMN-BASE', 'STOCK', 'XXXXXX', '339', '826', 'Réductions de valeur actées', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (830, 'PCMN-BASE', 'STOCK', 'XXXXXX', '34', '1353', 'Marchandises', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (831, 'PCMN-BASE', 'STOCK', 'XXXXXX', '340', '830', 'Valeur d''acquisition', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (832, 'PCMN-BASE', 'STOCK', 'XXXXXX', '3400', '831', 'Groupe A', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (833, 'PCMN-BASE', 'STOCK', 'XXXXXX', '3401', '831', 'Groupe B', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (834, 'PCMN-BASE', 'STOCK', 'XXXXXX', '3402', '831', 'Groupe C', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (835, 'PCMN-BASE', 'STOCK', 'XXXXXX', '349', '830', 'Réductions de valeur actées', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (836, 'PCMN-BASE', 'STOCK', 'XXXXXX', '35', '1353', 'Immeubles destinés à la vente', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (837, 'PCMN-BASE', 'STOCK', 'XXXXXX', '350', '836', 'Valeur d''acquisition', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (838, 'PCMN-BASE', 'STOCK', 'XXXXXX', '3500', '837', 'Immeuble A', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (839, 'PCMN-BASE', 'STOCK', 'XXXXXX', '3501', '837', 'Immeuble B', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (840, 'PCMN-BASE', 'STOCK', 'XXXXXX', '3502', '837', 'Immeuble C', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (841, 'PCMN-BASE', 'STOCK', 'XXXXXX', '351', '836', 'Immeubles construits en vue de leur revente', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (842, 'PCMN-BASE', 'STOCK', 'XXXXXX', '3510', '841', 'Immeuble A', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (843, 'PCMN-BASE', 'STOCK', 'XXXXXX', '3511', '841', 'Immeuble B', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (844, 'PCMN-BASE', 'STOCK', 'XXXXXX', '3512', '841', 'Immeuble C', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (845, 'PCMN-BASE', 'STOCK', 'XXXXXX', '359', '836', 'Réductions de valeurs actées', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (846, 'PCMN-BASE', 'STOCK', 'XXXXXX', '36', '1353', 'Acomptes versés sur achats pour stocks', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (847, 'PCMN-BASE', 'STOCK', 'XXXXXX', '360', '846', 'Acomptes versés (à ventiler éventuellement par catégorie)', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (848, 'PCMN-BASE', 'STOCK', 'XXXXXX', '369', '846', 'Réductions de valeur actées', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (849, 'PCMN-BASE', 'STOCK', 'XXXXXX', '37', '1353', 'Commandes en cours d''exécution', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (850, 'PCMN-BASE', 'STOCK', 'XXXXXX', '370', '849', 'Valeur d''acquisition', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (851, 'PCMN-BASE', 'STOCK', 'XXXXXX', '371', '849', 'Bénéfice pris en compte', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (852, 'PCMN-BASE', 'STOCK', 'XXXXXX', '379', '849', 'Réductions de valeur actées', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (853, 'PCMN-BASE', 'TIERS', 'XXXXXX', '40', '1354', 'Créances commerciales', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (854, 'PCMN-BASE', 'TIERS', 'XXXXXX', '400', '853', 'Clients', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (855, 'PCMN-BASE', 'TIERS', 'XXXXXX', '4007', '854', 'Rabais, remises et ristournes à accorder et autres notes de crédit à établir', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (856, 'PCMN-BASE', 'TIERS', 'XXXXXX', '4008', '854', 'Créances résultant de livraisons de biens (associations momentanées)', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (857, 'PCMN-BASE', 'TIERS', 'XXXXXX', '401', '853', 'Effets à recevoir', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (858, 'PCMN-BASE', 'TIERS', 'XXXXXX', '4010', '857', 'Effets à recevoir', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (859, 'PCMN-BASE', 'TIERS', 'XXXXXX', '4013', '857', 'Effets à l''encaissement', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (860, 'PCMN-BASE', 'TIERS', 'XXXXXX', '4015', '857', 'Effets à l''escompte', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (861, 'PCMN-BASE', 'TIERS', 'XXXXXX', '402', '853', 'Clients, créances courantes, entreprises apparentées, administrateurs et gérants', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (862, 'PCMN-BASE', 'TIERS', 'XXXXXX', '4020', '861', 'Entreprises liées', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (863, 'PCMN-BASE', 'TIERS', 'XXXXXX', '4021', '861', 'Autres entreprises avec lesquelles il existe un lien de participation', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (864, 'PCMN-BASE', 'TIERS', 'XXXXXX', '4022', '861', 'Administrateurs et gérants d''entreprise', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (865, 'PCMN-BASE', 'TIERS', 'XXXXXX', '403', '853', 'Effets à recevoir sur entreprises apparentées et administrateurs et gérants', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (866, 'PCMN-BASE', 'TIERS', 'XXXXXX', '4030', '865', 'Entreprises liées', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (867, 'PCMN-BASE', 'TIERS', 'XXXXXX', '4031', '865', 'Autres entreprises avec lesquelles il existe un lien de participation', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (868, 'PCMN-BASE', 'TIERS', 'XXXXXX', '4032', '865', 'Administrateurs et gérants de l''entreprise', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (869, 'PCMN-BASE', 'TIERS', 'XXXXXX', '404', '853', 'Produits à recevoir (factures à établir)', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (870, 'PCMN-BASE', 'TIERS', 'XXXXXX', '405', '853', 'Clients : retenues sur garanties', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (871, 'PCMN-BASE', 'TIERS', 'XXXXXX', '406', '853', 'Acomptes versés', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (872, 'PCMN-BASE', 'TIERS', 'XXXXXX', '407', '853', 'Créances douteuses', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (873, 'PCMN-BASE', 'TIERS', 'XXXXXX', '408', '853', 'Compensation clients', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (874, 'PCMN-BASE', 'TIERS', 'XXXXXX', '409', '853', 'Réductions de valeur actées', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (875, 'PCMN-BASE', 'TIERS', 'XXXXXX', '41', '1354', 'Autres créances', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (876, 'PCMN-BASE', 'TIERS', 'XXXXXX', '410', '875', 'Capital appelé, non versé', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (877, 'PCMN-BASE', 'TIERS', 'XXXXXX', '4100', '876', 'Appels de fonds', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (878, 'PCMN-BASE', 'TIERS', 'XXXXXX', '4101', '876', 'Actionnaires défaillants', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (879, 'PCMN-BASE', 'TIERS', 'XXXXXX', '411', '875', 'T.V.A. à récupérer', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (880, 'PCMN-BASE', 'TIERS', 'XXXXXX', '4110', '879', 'T.V.A. due', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (881, 'PCMN-BASE', 'TIERS', 'XXXXXX', '4111', '879', 'T.V.A. déductible', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (882, 'PCMN-BASE', 'TIERS', 'XXXXXX', '4112', '879', 'Compte courant administration T.V.A.', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (883, 'PCMN-BASE', 'TIERS', 'XXXXXX', '4118', '879', 'Taxe d''égalisation due', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (884, 'PCMN-BASE', 'TIERS', 'XXXXXX', '412', '875', 'Impôts et versements fiscaux à récupérer', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (885, 'PCMN-BASE', 'TIERS', 'XXXXXX', '4120', '884', 'Impôts belges sur le résultat', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (886, 'PCMN-BASE', 'TIERS', 'XXXXXX', '4125', '884', 'Autres impôts belges', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (887, 'PCMN-BASE', 'TIERS', 'XXXXXX', '4128', '884', 'Impôts étrangers', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (888, 'PCMN-BASE', 'TIERS', 'XXXXXX', '414', '875', 'Produits à recevoir', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (889, 'PCMN-BASE', 'TIERS', 'XXXXXX', '416', '875', 'Créances diverses', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (890, 'PCMN-BASE', 'TIERS', 'XXXXXX', '4160', '889', 'Associés (compte d''apport en société)', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (891, 'PCMN-BASE', 'TIERS', 'XXXXXX', '4161', '889', 'Avances et prêts au personnel', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (892, 'PCMN-BASE', 'TIERS', 'XXXXXX', '4162', '889', 'Compte courant des associés en S.P.R.L.', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (893, 'PCMN-BASE', 'TIERS', 'XXXXXX', '4163', '889', 'Compte courant des administrateurs et gérants', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (894, 'PCMN-BASE', 'TIERS', 'XXXXXX', '4164', '889', 'Créances sur sociétés apparentées', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (895, 'PCMN-BASE', 'TIERS', 'XXXXXX', '4166', '889', 'Emballages et matériel à rendre', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (896, 'PCMN-BASE', 'TIERS', 'XXXXXX', '4167', '889', 'Etat et établissements publics', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (897, 'PCMN-BASE', 'TIERS', 'XXXXXX', '41670', '896', 'Subsides à recevoir', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (898, 'PCMN-BASE', 'TIERS', 'XXXXXX', '41671', '896', 'Autres créances', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (899, 'PCMN-BASE', 'TIERS', 'XXXXXX', '4168', '889', 'Rabais, ristournes et remises à obtenir et autres avoirs non encore reçus', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (900, 'PCMN-BASE', 'TIERS', 'XXXXXX', '417', '875', 'Créances douteuses', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (901, 'PCMN-BASE', 'TIERS', 'XXXXXX', '418', '875', 'Cautionnements versés en numéraires', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (902, 'PCMN-BASE', 'TIERS', 'XXXXXX', '419', '875', 'Réductions de valeur actées', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (903, 'PCMN-BASE', 'TIERS', 'XXXXXX', '42', '1354', 'Dettes à plus d''un an échéant dans l''année', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (904, 'PCMN-BASE', 'TIERS', 'XXXXXX', '420', '903', 'Emprunts subordonnés', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (905, 'PCMN-BASE', 'TIERS', 'XXXXXX', '4200', '904', 'Convertibles', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (906, 'PCMN-BASE', 'TIERS', 'XXXXXX', '4201', '904', 'Non convertibles', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (907, 'PCMN-BASE', 'TIERS', 'XXXXXX', '421', '903', 'Emprunts obligataires non subordonnés', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (908, 'PCMN-BASE', 'TIERS', 'XXXXXX', '4210', '907', 'Convertibles', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (909, 'PCMN-BASE', 'TIERS', 'XXXXXX', '4211', '907', 'Non convertibles', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (910, 'PCMN-BASE', 'TIERS', 'XXXXXX', '422', '903', 'Dettes de location-financement et assimilées', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (911, 'PCMN-BASE', 'TIERS', 'XXXXXX', '4220', '910', 'Financement de biens immobiliers', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (912, 'PCMN-BASE', 'TIERS', 'XXXXXX', '4221', '910', 'Financement de biens mobiliers', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (913, 'PCMN-BASE', 'TIERS', 'XXXXXX', '423', '903', 'Etablissements de crédit', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (914, 'PCMN-BASE', 'TIERS', 'XXXXXX', '4230', '913', 'Dettes en compte', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (915, 'PCMN-BASE', 'TIERS', 'XXXXXX', '4231', '913', 'Promesses', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (916, 'PCMN-BASE', 'TIERS', 'XXXXXX', '4232', '913', 'Crédits d''acceptation', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (917, 'PCMN-BASE', 'TIERS', 'XXXXXX', '424', '903', 'Autres emprunts', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (918, 'PCMN-BASE', 'TIERS', 'XXXXXX', '425', '903', 'Dettes commerciales', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (919, 'PCMN-BASE', 'TIERS', 'XXXXXX', '4250', '918', 'Fournisseurs', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (920, 'PCMN-BASE', 'TIERS', 'XXXXXX', '4251', '918', 'Effets à payer', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (921, 'PCMN-BASE', 'TIERS', 'XXXXXX', '426', '903', 'Cautionnements reçus en numéraires', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (922, 'PCMN-BASE', 'TIERS', 'XXXXXX', '429', '903', 'Dettes diverses', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (923, 'PCMN-BASE', 'TIERS', 'XXXXXX', '4290', '922', 'Entreprises liées', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (924, 'PCMN-BASE', 'TIERS', 'XXXXXX', '4291', '922', 'Entreprises avec lesquelles il existe un lien de participation', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (925, 'PCMN-BASE', 'TIERS', 'XXXXXX', '4292', '922', 'Administrateurs, gérants, associés', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (926, 'PCMN-BASE', 'TIERS', 'XXXXXX', '4299', '922', 'Autres dettes', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (927, 'PCMN-BASE', 'TIERS', 'XXXXXX', '43', '1354', 'Dettes financières', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (928, 'PCMN-BASE', 'TIERS', 'XXXXXX', '430', '927', 'Etablissements de crédit. Emprunts en compte à terme fixe', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (929, 'PCMN-BASE', 'TIERS', 'XXXXXX', '431', '927', 'Etablissements de crédit. Promesses', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (930, 'PCMN-BASE', 'TIERS', 'XXXXXX', '432', '927', 'Etablissements de crédit. Crédits d''acceptation', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (931, 'PCMN-BASE', 'TIERS', 'XXXXXX', '433', '927', 'Etablissements de crédit. Dettes en compte courant', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (932, 'PCMN-BASE', 'TIERS', 'XXXXXX', '439', '927', 'Autres emprunts', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (933, 'PCMN-BASE', 'TIERS', 'XXXXXX', '44', '1354', 'Dettes commerciales', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (934, 'PCMN-BASE', 'TIERS', 'XXXXXX', '440', '933', 'Fournisseurs', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (935, 'PCMN-BASE', 'TIERS', 'XXXXXX', '4400', '934', 'Entreprises apparentées', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (936, 'PCMN-BASE', 'TIERS', 'XXXXXX', '44000', '935', 'Entreprises liées', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (937, 'PCMN-BASE', 'TIERS', 'XXXXXX', '44001', '935', 'Entreprises avec lesquelles il existe un lien de participation', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (938, 'PCMN-BASE', 'TIERS', 'XXXXXX', '4401', '934', 'Fournisseurs ordinaires', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (939, 'PCMN-BASE', 'TIERS', 'XXXXXX', '44010', '938', 'Fournisseurs belges', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (940, 'PCMN-BASE', 'TIERS', 'XXXXXX', '44011', '938', 'Fournisseurs CEE', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (941, 'PCMN-BASE', 'TIERS', 'XXXXXX', '44012', '938', 'Fournisseurs importation', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (942, 'PCMN-BASE', 'TIERS', 'XXXXXX', '4402', '934', 'Dettes envers les coparticipants (associations momentanées)', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (943, 'PCMN-BASE', 'TIERS', 'XXXXXX', '4403', '934', 'Fournisseurs - retenues de garanties', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (944, 'PCMN-BASE', 'TIERS', 'XXXXXX', '441', '933', 'Effets à payer', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (945, 'PCMN-BASE', 'TIERS', 'XXXXXX', '4410', '944', 'Entreprises apparentées', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (946, 'PCMN-BASE', 'TIERS', 'XXXXXX', '44100', '945', 'Entreprises liées', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (947, 'PCMN-BASE', 'TIERS', 'XXXXXX', '44101', '945', 'Entreprises avec lesquelles il existe un lien de participation', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (948, 'PCMN-BASE', 'TIERS', 'XXXXXX', '4411', '944', 'Fournisseurs ordinaires', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (949, 'PCMN-BASE', 'TIERS', 'XXXXXX', '44110', '948', 'Fournisseurs belges', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (950, 'PCMN-BASE', 'TIERS', 'XXXXXX', '44111', '948', 'Fournisseurs CEE', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (951, 'PCMN-BASE', 'TIERS', 'XXXXXX', '44112', '948', 'Fournisseurs importation', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (952, 'PCMN-BASE', 'TIERS', 'XXXXXX', '444', '933', 'Factures à recevoir', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (953, 'PCMN-BASE', 'TIERS', 'XXXXXX', '446', '933', 'Acomptes reçus', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (954, 'PCMN-BASE', 'TIERS', 'XXXXXX', '448', '933', 'Compensations fournisseurs', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (955, 'PCMN-BASE', 'TIERS', 'XXXXXX', '45', '1354', 'Dettes fiscales, salariales et sociales', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (956, 'PCMN-BASE', 'TIERS', 'XXXXXX', '450', '955', 'Dettes fiscales estimées', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (957, 'PCMN-BASE', 'TIERS', 'XXXXXX', '4501', '956', 'Impôts sur le résultat', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (958, 'PCMN-BASE', 'TIERS', 'XXXXXX', '4505', '956', 'Autres impôts en Belgique', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (959, 'PCMN-BASE', 'TIERS', 'XXXXXX', '4508', '956', 'Impôts à l''étranger', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (960, 'PCMN-BASE', 'TIERS', 'XXXXXX', '451', '955', 'T.V.A. à payer', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (961, 'PCMN-BASE', 'TIERS', 'XXXXXX', '4510', '960', 'T.V.A. due', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (962, 'PCMN-BASE', 'TIERS', 'XXXXXX', '4511', '960', 'T.V.A. déductible', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (963, 'PCMN-BASE', 'TIERS', 'XXXXXX', '4512', '960', 'Compte courant administration T.V.A.', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (964, 'PCMN-BASE', 'TIERS', 'XXXXXX', '4518', '960', 'Taxe d''égalisation due', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (965, 'PCMN-BASE', 'TIERS', 'XXXXXX', '452', '955', 'Impôts et taxes à payer', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (966, 'PCMN-BASE', 'TIERS', 'XXXXXX', '4520', '965', 'Autres impôts sur le résultat', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (967, 'PCMN-BASE', 'TIERS', 'XXXXXX', '4525', '965', 'Autres impôts et taxes en Belgique', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (968, 'PCMN-BASE', 'TIERS', 'XXXXXX', '45250', '967', 'Précompte immobilier', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (969, 'PCMN-BASE', 'TIERS', 'XXXXXX', '45251', '967', 'Impôts communaux à payer', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (970, 'PCMN-BASE', 'TIERS', 'XXXXXX', '45252', '967', 'Impôts provinciaux à payer', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (971, 'PCMN-BASE', 'TIERS', 'XXXXXX', '45253', '967', 'Autres impôts et taxes à payer', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (972, 'PCMN-BASE', 'TIERS', 'XXXXXX', '4528', '965', 'Impôts et taxes à l''étranger', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (973, 'PCMN-BASE', 'TIERS', 'XXXXXX', '453', '955', 'Précomptes retenus', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (974, 'PCMN-BASE', 'TIERS', 'XXXXXX', '4530', '973', 'Précompte professionnel retenu sur rémunérations', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (975, 'PCMN-BASE', 'TIERS', 'XXXXXX', '4531', '973', 'Précompte professionnel retenu sur tantièmes', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (976, 'PCMN-BASE', 'TIERS', 'XXXXXX', '4532', '973', 'Précompte mobilier retenu sur dividendes attribués', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (977, 'PCMN-BASE', 'TIERS', 'XXXXXX', '4533', '973', 'Précompte mobilier retenu sur intérêts payés', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (978, 'PCMN-BASE', 'TIERS', 'XXXXXX', '4538', '973', 'Autres précomptes retenus', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (979, 'PCMN-BASE', 'TIERS', 'XXXXXX', '454', '955', 'Office National de la Sécurité Sociale', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (980, 'PCMN-BASE', 'TIERS', 'XXXXXX', '4540', '979', 'Arriérés', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (981, 'PCMN-BASE', 'TIERS', 'XXXXXX', '4541', '979', '1er trimestre', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (982, 'PCMN-BASE', 'TIERS', 'XXXXXX', '4542', '979', '2ème trimestre', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (983, 'PCMN-BASE', 'TIERS', 'XXXXXX', '4543', '979', '3ème trimestre', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (984, 'PCMN-BASE', 'TIERS', 'XXXXXX', '4544', '979', '4ème trimestre', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (985, 'PCMN-BASE', 'TIERS', 'XXXXXX', '455', '955', 'Rémunérations', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (986, 'PCMN-BASE', 'TIERS', 'XXXXXX', '4550', '985', 'Administrateurs, gérants et commissaires (non réviseurs)', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (987, 'PCMN-BASE', 'TIERS', 'XXXXXX', '4551', '985', 'Direction', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (988, 'PCMN-BASE', 'TIERS', 'XXXXXX', '4552', '985', 'Employés', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (989, 'PCMN-BASE', 'TIERS', 'XXXXXX', '4553', '985', 'Ouvriers', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (990, 'PCMN-BASE', 'TIERS', 'XXXXXX', '456', '955', 'Pécules de vacances', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (991, 'PCMN-BASE', 'TIERS', 'XXXXXX', '4560', '990', 'Direction', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (992, 'PCMN-BASE', 'TIERS', 'XXXXXX', '4561', '990', 'Employés', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (993, 'PCMN-BASE', 'TIERS', 'XXXXXX', '4562', '990', 'Ouvriers', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (994, 'PCMN-BASE', 'TIERS', 'XXXXXX', '459', '955', 'Autres dettes sociales', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (995, 'PCMN-BASE', 'TIERS', 'XXXXXX', '4590', '994', 'Provision pour gratifications de fin d''année', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (996, 'PCMN-BASE', 'TIERS', 'XXXXXX', '4591', '994', 'Départs de personnel', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (997, 'PCMN-BASE', 'TIERS', 'XXXXXX', '4592', '994', 'Oppositions sur rémunérations', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (998, 'PCMN-BASE', 'TIERS', 'XXXXXX', '4593', '994', 'Assurances relatives au personnel', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (999, 'PCMN-BASE', 'TIERS', 'XXXXXX', '45930', '998', 'Assurance loi', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1000, 'PCMN-BASE', 'TIERS', 'XXXXXX', '45931', '998', 'Assurance salaire garanti', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1001, 'PCMN-BASE', 'TIERS', 'XXXXXX', '45932', '998', 'Assurance groupe', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1002, 'PCMN-BASE', 'TIERS', 'XXXXXX', '45933', '998', 'Assurances individuelles', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1003, 'PCMN-BASE', 'TIERS', 'XXXXXX', '4594', '994', 'Caisse d''assurances sociales pour travailleurs indépendants', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1004, 'PCMN-BASE', 'TIERS', 'XXXXXX', '4597', '994', 'Dettes et provisions sociales diverses', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1005, 'PCMN-BASE', 'TIERS', 'XXXXXX', '46', '1354', 'Acomptes reçus sur commande', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1006, 'PCMN-BASE', 'TIERS', 'XXXXXX', '47', '1354', 'Dettes découlant de l''affectation des résultats', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1007, 'PCMN-BASE', 'TIERS', 'XXXXXX', '470', '1006', 'Dividendes et tantièmes d''exercices antérieurs', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1008, 'PCMN-BASE', 'TIERS', 'XXXXXX', '471', '1006', 'Dividendes de l''exercice', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1009, 'PCMN-BASE', 'TIERS', 'XXXXXX', '472', '1006', 'Tantièmes de l''exercice', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1010, 'PCMN-BASE', 'TIERS', 'XXXXXX', '473', '1006', 'Autres allocataires', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1011, 'PCMN-BASE', 'TIERS', 'XXXXXX', '48', '4', 'Dettes diverses', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1012, 'PCMN-BASE', 'TIERS', 'XXXXXX', '480', '1011', 'Obligations et coupons échus', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1013, 'PCMN-BASE', 'TIERS', 'XXXXXX', '481', '1011', 'Actionnaires - capital à rembourser', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1014, 'PCMN-BASE', 'TIERS', 'XXXXXX', '482', '1011', 'Participation du personnel à payer', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1015, 'PCMN-BASE', 'TIERS', 'XXXXXX', '483', '1011', 'Acomptes reçus d''autres tiers à moins d''un an', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1016, 'PCMN-BASE', 'TIERS', 'XXXXXX', '486', '1011', 'Emballages et matériel consignés', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1017, 'PCMN-BASE', 'TIERS', 'XXXXXX', '488', '1011', 'Cautionnements reçus en numéraires', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1018, 'PCMN-BASE', 'TIERS', 'XXXXXX', '489', '1011', 'Autres dettes diverses', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1019, 'PCMN-BASE', 'TIERS', 'XXXXXX', '49', '1354', 'Comptes de régularisation et compte d''attente', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1020, 'PCMN-BASE', 'TIERS', 'XXXXXX', '490', '1019', 'Charges à reporter (à subdiviser par catégorie de charges)', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1021, 'PCMN-BASE', 'TIERS', 'XXXXXX', '491', '1019', 'Produits acquis', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1022, 'PCMN-BASE', 'TIERS', 'XXXXXX', '4910', '1021', 'Produits d''exploitation', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1023, 'PCMN-BASE', 'TIERS', 'XXXXXX', '49100', '1022', 'Ristournes et rabais à obtenir', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1024, 'PCMN-BASE', 'TIERS', 'XXXXXX', '49101', '1022', 'Commissions à obtenir', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1025, 'PCMN-BASE', 'TIERS', 'XXXXXX', '49102', '1022', 'Autres produits d''exploitation (redevances par exemple)', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1026, 'PCMN-BASE', 'TIERS', 'XXXXXX', '4911', '1021', 'Produits financiers', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1027, 'PCMN-BASE', 'TIERS', 'XXXXXX', '49110', '1026', 'Intérêts courus et non échus sur prêts et débits', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1028, 'PCMN-BASE', 'TIERS', 'XXXXXX', '49111', '1026', 'Autres produits financiers', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1029, 'PCMN-BASE', 'TIERS', 'XXXXXX', '492', '1019', 'Charges à imputer (à subdiviser par catégorie de charges)', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1030, 'PCMN-BASE', 'TIERS', 'XXXXXX', '493', '1019', 'Produits à reporter', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1031, 'PCMN-BASE', 'TIERS', 'XXXXXX', '4930', '1030', 'Produits d''exploitation à reporter', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1032, 'PCMN-BASE', 'TIERS', 'XXXXXX', '4931', '1030', 'Produits financiers à reporter', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1033, 'PCMN-BASE', 'TIERS', 'XXXXXX', '499', '1019', 'Comptes d''attente', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1034, 'PCMN-BASE', 'TIERS', 'XXXXXX', '4990', '1033', 'Compte d''attente', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1035, 'PCMN-BASE', 'TIERS', 'XXXXXX', '4991', '1033', 'Compte de répartition périodique des charges', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1036, 'PCMN-BASE', 'TIERS', 'XXXXXX', '4999', '1033', 'Transferts d''exercice', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1037, 'PCMN-BASE', 'FINAN', 'XXXXXX', '50', '1355', 'Actions propres', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1038, 'PCMN-BASE', 'FINAN', 'XXXXXX', '51', '1355', 'Actions et parts', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1039, 'PCMN-BASE', 'FINAN', 'XXXXXX', '510', '1038', 'Valeur d''acquisition', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1040, 'PCMN-BASE', 'FINAN', 'XXXXXX', '511', '1038', 'Montants non appelés', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1041, 'PCMN-BASE', 'FINAN', 'XXXXXX', '519', '1038', 'Réductions de valeur actées', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1042, 'PCMN-BASE', 'FINAN', 'XXXXXX', '52', '1355', 'Titres à revenus fixes', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1043, 'PCMN-BASE', 'FINAN', 'XXXXXX', '520', '1042', 'Valeur d''acquisition', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1044, 'PCMN-BASE', 'FINAN', 'XXXXXX', '529', '1042', 'Réductions de valeur actées', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1045, 'PCMN-BASE', 'FINAN', 'XXXXXX', '53', '1355', 'Dépots à terme', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1046, 'PCMN-BASE', 'FINAN', 'XXXXXX', '530', '1045', 'De plus d''un an', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1047, 'PCMN-BASE', 'FINAN', 'XXXXXX', '531', '1045', 'De plus d''un mois et à un an au plus', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1048, 'PCMN-BASE', 'FINAN', 'XXXXXX', '532', '1045', 'd''un mois au plus', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1049, 'PCMN-BASE', 'FINAN', 'XXXXXX', '539', '1045', 'Réductions de valeur actées', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1050, 'PCMN-BASE', 'FINAN', 'XXXXXX', '54', '1355', 'Valeurs échues à l''encaissement', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1051, 'PCMN-BASE', 'FINAN', 'XXXXXX', '540', '1050', 'Chèques à encaisser', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1052, 'PCMN-BASE', 'FINAN', 'XXXXXX', '541', '1050', 'Coupons à encaisser', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1053, 'PCMN-BASE', 'FINAN', 'XXXXXX', '55', '1355', 'Etablissements de crédit - Comptes ouverts auprès des divers établissements.', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1054, 'PCMN-BASE', 'FINAN', 'XXXXXX', '550', '1053', 'Comptes courants', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1055, 'PCMN-BASE', 'FINAN', 'XXXXXX', '551', '1053', 'Chèques émis', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1056, 'PCMN-BASE', 'FINAN', 'XXXXXX', '559', '1053', 'Réductions de valeur actées', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1057, 'PCMN-BASE', 'FINAN', 'XXXXXX', '56', '1355', 'Office des chèques postaux', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1058, 'PCMN-BASE', 'FINAN', 'XXXXXX', '560', '1057', 'Compte courant', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1059, 'PCMN-BASE', 'FINAN', 'XXXXXX', '561', '1057', 'Chèques émis', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1060, 'PCMN-BASE', 'FINAN', 'XXXXXX', '57', '1355', 'Caisses', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1061, 'PCMN-BASE', 'FINAN', 'XXXXXX', '570', '1060', 'à 577 Caisses - espèces ( 0 - centrale ; 7 - succursales et agences)', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1062, 'PCMN-BASE', 'FINAN', 'XXXXXX', '578', '1060', 'Caisses - timbres ( 0 - fiscaux ; 1 - postaux)', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1063, 'PCMN-BASE', 'FINAN', 'XXXXXX', '58', '1355', 'Virements internes', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1064, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '60', '1356', 'Approvisionnements et marchandises', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1065, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '600', '1064', 'Achats de matières premières', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1066, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '601', '1064', 'Achats de fournitures', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1067, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '602', '1064', 'Achats de services, travaux et études', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1068, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '603', '1064', 'Sous-traitances générales', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1069, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '604', '1064', 'Achats de marchandises', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1070, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '605', '1064', 'Achats d''immeubles destinés à la revente', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1071, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '608', '1064', 'Remises , ristournes et rabais obtenus sur achats', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1072, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '609', '1064', 'Variations de stocks', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1073, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '6090', '1072', 'De matières premières', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1074, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '6091', '1072', 'De fournitures', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1075, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '6094', '1072', 'De marchandises', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1076, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '6095', '1072', 'd''immeubles destinés à la vente', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1077, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '61', '1356', 'Services et biens divers', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1078, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '610', '1077', 'Loyers et charges locatives', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1079, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '6100', '1078', 'Loyers divers', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1080, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '6101', '1078', 'Charges locatives (assurances, frais de confort,etc)', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1081, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '611', '1077', 'Entretien et réparation (fournitures et prestations)', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1082, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '612', '1077', 'Fournitures faites à l''entreprise', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1083, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '6120', '1082', 'Eau, gaz, électricité, vapeur', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1084, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '61200', '1083', 'Eau', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1085, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '61201', '1083', 'Gaz', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1086, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '61202', '1083', 'Electricité', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1087, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '61203', '1083', 'Vapeur', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1088, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '6121', '1082', 'Téléphone, télégrammes, télex, téléfax, frais postaux', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1089, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '61210', '1088', 'Téléphone', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1090, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '61211', '1088', 'Télégrammes', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1091, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '61212', '1088', 'Télex et téléfax', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1092, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '61213', '1088', 'Frais postaux', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1093, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '6122', '1082', 'Livres, bibliothèque', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1094, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '6123', '1082', 'Imprimés et fournitures de bureau (si non comptabilisé au 601)', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1095, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '613', '1077', 'Rétributions de tiers', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1096, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '6130', '1095', 'Redevances et royalties', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1097, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '61300', '1096', 'Redevances pour brevets, licences, marques et accessoires', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1098, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '61301', '1096', 'Autres redevances (procédés de fabrication)', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1099, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '6131', '1095', 'Assurances non relatives au personnel', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1100, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '61310', '1099', 'Assurance incendie', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1101, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '61311', '1099', 'Assurance vol', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1102, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '61312', '1099', 'Assurance autos', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1103, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '61313', '1099', 'Assurance crédit', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1104, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '61314', '1099', 'Assurances frais généraux', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1105, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '6132', '1095', 'Divers', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1106, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '61320', '1105', 'Commissions aux tiers', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1107, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '61321', '1105', 'Honoraires d''avocats, d''experts, etc', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1108, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '61322', '1105', 'Cotisations aux groupements professionnels', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1109, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '61323', '1105', 'Dons, libéralités, etc', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1110, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '61324', '1105', 'Frais de contentieux', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1111, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '61325', '1105', 'Publications légales', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1112, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '6133', '1095', 'Transports et déplacements', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1113, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '61330', '1112', 'Transports de personnel', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1114, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '61331', '1112', 'Voyages, déplacements et représentations', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1115, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '6134', '1095', 'Personnel intérimaire', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1116, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '614', '1077', 'Annonces, publicité, propagande et documentation', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1117, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '6140', '1116', 'Annonces et insertions', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1118, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '6141', '1116', 'Catalogues et imprimés', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1119, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '6142', '1116', 'Echantillons', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1120, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '6143', '1116', 'Foires et expositions', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1121, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '6144', '1116', 'Primes', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1122, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '6145', '1116', 'Cadeaux à la clientèle', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1123, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '6146', '1116', 'Missions et réceptions', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1124, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '6147', '1116', 'Documentation', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1125, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '615', '1077', 'Sous-traitants', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1126, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '6150', '1125', 'Sous-traitants pour activités propres', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1127, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '6151', '1125', 'Sous-traitants d''associations momentanées (coparticipants)', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1128, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '6152', '1125', 'Quote-part bénéficiaire des coparticipants', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1129, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '617', '1077', 'Personnel intérimaire et personnes mises à la disposition de l''entreprise', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1130, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '618', '1077', 'Rémunérations, primes pour assurances extralégales, pensions de retraite et de survie des administrateurs, gérants et associés actifs qui ne sont pas attribuées en vertu d''un contrat de travail', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1131, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '62', '1356', 'Rémunérations, charges sociales et pensions', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1132, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '620', '1131', 'Rémunérations et avantages sociaux directs', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1133, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '6200', '1132', 'Administrateurs ou gérants', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1134, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '6201', '1132', 'Personnel de direction', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1135, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '6202', '1132', 'Employés', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1136, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '6203', '1132', 'Ouvriers', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1137, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '6204', '1132', 'Autres membres du personnel', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1138, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '621', '1131', 'Cotisations patronales d''assurances sociales', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1139, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '6210', '1138', 'Sur salaires', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1140, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '6211', '1138', 'Sur appointements et commissions', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1141, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '622', '1131', 'Primes patronales pour assurances extralégales', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1142, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '623', '1131', 'Autres frais de personnel', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1143, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '6230', '1142', 'Assurances du personnel', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1144, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '62300', '1143', 'Assurances loi, responsabilité civile, chemin du travail', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1145, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '62301', '1143', 'Assurance salaire garanti', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1146, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '62302', '1143', 'Assurances individuelles', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1147, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '6231', '1142', 'Charges sociales diverses', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1148, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '62310', '1147', 'Jours fériés payés', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1149, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '62311', '1147', 'Salaire hebdomadaire garanti', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1150, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '62312', '1147', 'Allocations familiales complémentaires', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1151, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '6232', '1142', 'Charges sociales des administrateurs, gérants et commissaires', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1152, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '62320', '1151', 'Allocations familiales complémentaires pour non salariés', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1153, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '62321', '1151', 'Lois sociales pour indépendants', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1154, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '62322', '1151', 'Divers', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1155, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '624', '1131', 'Pensions de retraite et de survie', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1156, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '6240', '1155', 'Administrateurs et gérants', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1157, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '6241', '1155', 'Personnel', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1158, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '625', '1131', 'Provision pour pécule de vacances', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1159, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '6250', '1158', 'Dotations', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1160, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '6251', '1158', 'Utilisations et reprises', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1161, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '63', '1356', 'Amortissements, réductions de valeur et provisions pour risques et charges', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1162, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '630', '1161', 'Dotations aux amortissements et aux réductions de valeur sur immobilisations', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1163, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '6300', '1162', 'Dotations aux amortissements sur frais d''établissement', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1164, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '6301', '1162', 'Dotations aux amortissements sur immobilisations incorporelles', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1165, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '6302', '1162', 'Dotations aux amortissements sur immobilisations corporelles', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1166, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '6308', '1162', 'Dotations aux réductions de valeur sur immobilisations incorporelles', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1167, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '6309', '1162', 'Dotations aux réductions de valeur sur immobilisations corporelles', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1168, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '631', '1161', 'Réductions de valeur sur stocks', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1169, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '6310', '1168', 'Dotations', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1170, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '6311', '1168', 'Reprises', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1171, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '632', '1161', 'Réductions de valeur sur commandes en cours d''exécution', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1172, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '6320', '1171', 'Dotations', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1173, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '6321', '1171', 'Reprises', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1174, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '633', '1161', 'Réductions de valeur sur créances commerciales à plus d''un an', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1175, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '6330', '1174', 'Dotations', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1176, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '6331', '1174', 'Reprises', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1177, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '634', '1161', 'Réductions de valeur sur créances commerciales à un an au plus', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1178, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '6340', '1177', 'Dotations', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1179, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '6341', '1177', 'Reprises', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1180, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '635', '1161', 'Provisions pour pensions et obligations similaires', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1181, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '6350', '1180', 'Dotations', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1182, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '6351', '1180', 'Utilisations et reprises', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1183, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '636', '11613', 'Provisions pour grosses réparations et gros entretiens', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1184, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '6360', '1183', 'Dotations', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1185, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '6361', '1183', 'Utilisations et reprises', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1186, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '637', '1161', 'Provisions pour autres risques et charges', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1187, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '6370', '1186', 'Dotations', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1188, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '6371', '1186', 'Utilisations et reprises', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1189, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '64', '1356', 'Autres charges d''exploitation', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1190, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '640', '1189', 'Charges fiscales d''exploitation', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1191, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '6400', '1190', 'Taxes et impôts directs', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1192, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '64000', '1191', 'Taxes sur autos et camions', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1193, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '6401', '1190', 'Taxes et impôts indirects', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1194, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '64010', '1193', 'Timbres fiscaux pris en charge par la firme', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1195, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '64011', '1193', 'Droits d''enregistrement', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1196, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '64012', '1193', 'T.V.A. non déductible', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1197, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '6402', '1190', 'Impôts provinciaux et communaux', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1198, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '64020', '1197', 'Taxe sur la force motrice', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1199, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '64021', '1197', 'Taxe sur le personnel occupé', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1200, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '6403', '1190', 'Taxes diverses', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1201, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '641', '1189', 'Moins-values sur réalisations courantes d''immobilisations corporelles', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1202, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '642', '1189', 'Moins-values sur réalisations de créances commerciales', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1203, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '643', '1189', 'à 648 Charges d''exploitations diverses', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1204, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '649', '1189', 'Charges d''exploitation portées à l''actif au titre de restructuration', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1205, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '65', '1356', 'Charges financières', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1206, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '650', '1205', 'Charges des dettes', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1207, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '6500', '1206', 'Intérêts, commissions et frais afférents aux dettes', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1208, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '6501', '1206', 'Amortissements des agios et frais d''émission d''emprunts', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1209, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '6502', '1206', 'Autres charges de dettes', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1210, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '6503', '1206', 'Intérêts intercalaires portés à l''actif', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1211, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '651', '1205', 'Réductions de valeur sur actifs circulants', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1212, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '6510', '1211', 'Dotations', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1213, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '6511', '1211', 'Reprises', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1214, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '652', '1205', 'Moins-values sur réalisation d''actifs circulants', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1215, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '653', '1205', 'Charges d''escompte de créances', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1216, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '654', '1205', 'Différences de change', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1217, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '655', '1205', 'Ecarts de conversion des devises', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1218, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '656', '1205', 'Frais de banques, de chèques postaux', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1219, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '657', '1205', 'Commissions sur ouvertures de crédit, cautions et avals', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1220, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '658', '1205', 'Frais de vente des titres', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1221, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '66', '1356', 'Charges exceptionnelles', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1222, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '660', '1221', 'Amortissements et réductions de valeur exceptionnels', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1223, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '6600', '1222', 'Sur frais d''établissement', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1224, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '6601', '1222', 'Sur immobilisations incorporelles', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1225, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '6602', '1222', 'Sur immobilisations corporelles', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1226, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '661', '1221', 'Réductions de valeur sur immobilisations financières', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1227, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '662', '1221', 'Provisions pour risques et charges exceptionnels', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1228, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '663', '1221', 'Moins-values sur réalisation d''actifs immobilisés', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1229, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '6630', '1228', 'Sur immobilisations incorporelles', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1230, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '6631', '1228', 'Sur immobilisations corporelles', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1231, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '6632', '1228', 'Sur immobilisations détenues en location-financement et droits similaires', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1232, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '6633', '1228', 'Sur immobilisations financières', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1233, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '6634', '1228', 'Sur immeubles acquis ou construits en vue de la revente', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1234, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '664', '1221', 'à 668 Autres charges exceptionnelles', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1235, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '664', '1221', 'Pénalités et amendes diverses', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1236, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '665', '1221', 'Différence de charge', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1237, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '669', '1221', 'Charges exceptionnelles transférées à l''actif en frais de restructuration', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1238, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '67', '1356', 'Impôts sur le résultat', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1239, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '670', '1238', 'Impôts belges sur le résultat de l''exercice', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1240, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '6700', '1239', 'Impôts et précomptes dus ou versés', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1241, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '6701', '1239', 'Excédent de versements d''impôts et précomptes porté à l''actif', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1242, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '6702', '1239', 'Charges fiscales estimées', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1243, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '671', '1238', 'Impôts belges sur le résultat d''exercices antérieurs', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1244, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '6710', '1243', 'Suppléments d''impôts dus ou versés', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1245, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '6711', '1243', 'Suppléments d''impôts estimés', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1246, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '6712', '1243', 'Provisions fiscales constituées', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1247, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '672', '1238', 'Impôts étrangers sur le résultat de l''exercice', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1248, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '673', '1238', 'Impôts étrangers sur le résultat d''exercices antérieurs', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1249, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '68', '1356', 'Transferts aux réserves immunisées', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1250, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '69', '1356', 'Affectation des résultats', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1251, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '690', '1250', 'Perte reportée de l''exercice précédent', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1252, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '691', '1250', 'Dotation à la réserve légale', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1253, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '692', '1250', 'Dotation aux autres réserves', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1254, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '693', '1250', 'Bénéfice à reporter', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1255, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '694', '1250', 'Rémunération du capital', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1256, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '695', '1250', 'Administrateurs ou gérants', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1257, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '696', '1250', 'Autres allocataires', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1258, 'PCMN-BASE', 'PROD', 'XXXXXX', '70', '1357', 'Chiffre d''affaires', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1260, 'PCMN-BASE', 'PROD', 'XXXXXX', '700', '1258', 'Ventes de marchandises', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1261, 'PCMN-BASE', 'PROD', 'XXXXXX', '7000', '1260', 'Ventes en Belgique', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1262, 'PCMN-BASE', 'PROD', 'XXXXXX', '7001', '1260', 'Ventes dans les pays membres de la C.E.E.', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1263, 'PCMN-BASE', 'PROD', 'XXXXXX', '7002', '1260', 'Ventes à l''exportation', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1264, 'PCMN-BASE', 'PROD', 'XXXXXX', '701', '1258', 'Ventes de produits finis', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1265, 'PCMN-BASE', 'PROD', 'XXXXXX', '7010', '1264', 'Ventes en Belgique', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1266, 'PCMN-BASE', 'PROD', 'XXXXXX', '7011', '1264', 'Ventes dans les pays membres de la C.E.E.', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1267, 'PCMN-BASE', 'PROD', 'XXXXXX', '7012', '1264', 'Ventes à l''exportation', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1268, 'PCMN-BASE', 'PROD', 'XXXXXX', '702', '1258', 'Ventes de déchets et rebuts', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1269, 'PCMN-BASE', 'PROD', 'XXXXXX', '7020', '1268', 'Ventes en Belgique', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1270, 'PCMN-BASE', 'PROD', 'XXXXXX', '7021', '1268', 'Ventes dans les pays membres de la C.E.E.', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1271, 'PCMN-BASE', 'PROD', 'XXXXXX', '7022', '1268', 'Ventes à l''exportation', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1272, 'PCMN-BASE', 'PROD', 'XXXXXX', '703', '1258', 'Ventes d''emballages récupérables', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1273, 'PCMN-BASE', 'PROD', 'XXXXXX', '704', '1258', 'Facturations des travaux en cours (associations momentanées)', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1274, 'PCMN-BASE', 'PROD', 'XXXXXX', '705', '1258', 'Prestations de services', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1275, 'PCMN-BASE', 'PROD', 'XXXXXX', '7050', '1274', 'Prestations de services en Belgique', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1276, 'PCMN-BASE', 'PROD', 'XXXXXX', '7051', '1274', 'Prestations de services dans les pays membres de la C.E.E.', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1277, 'PCMN-BASE', 'PROD', 'XXXXXX', '7052', '1274', 'Prestations de services en vue de l''exportation', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1278, 'PCMN-BASE', 'PROD', 'XXXXXX', '706', '1258', 'Pénalités et dédits obtenus par l''entreprise', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1279, 'PCMN-BASE', 'PROD', 'XXXXXX', '708', '1258', 'Remises, ristournes et rabais accordés', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1280, 'PCMN-BASE', 'PROD', 'XXXXXX', '7080', '1279', 'Sur ventes de marchandises', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1281, 'PCMN-BASE', 'PROD', 'XXXXXX', '7081', '1279', 'Sur ventes de produits finis', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1282, 'PCMN-BASE', 'PROD', 'XXXXXX', '7082', '1279', 'Sur ventes de déchets et rebuts', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1283, 'PCMN-BASE', 'PROD', 'XXXXXX', '7083', '1279', 'Sur prestations de services', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1284, 'PCMN-BASE', 'PROD', 'XXXXXX', '7084', '1279', 'Mali sur travaux facturés aux associations momentanées', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1285, 'PCMN-BASE', 'PROD', 'XXXXXX', '71', '1357', 'Variation des stocks et des commandes en cours d''exécution', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1286, 'PCMN-BASE', 'PROD', 'XXXXXX', '712', '1285', 'Des en cours de fabrication', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1287, 'PCMN-BASE', 'PROD', 'XXXXXX', '713', '1285', 'Des produits finis', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1288, 'PCMN-BASE', 'PROD', 'XXXXXX', '715', '1285', 'Des immeubles construits destinés à la vente', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1289, 'PCMN-BASE', 'PROD', 'XXXXXX', '717', '1285', 'Des commandes en cours d''exécution', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1290, 'PCMN-BASE', 'PROD', 'XXXXXX', '7170', '1289', 'Commandes en cours - Coût de revient', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1291, 'PCMN-BASE', 'PROD', 'XXXXXX', '71700', '1290', 'Coût des commandes en cours d''exécution', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1292, 'PCMN-BASE', 'PROD', 'XXXXXX', '71701', '1290', 'Coût des travaux en cours des associations momentanées', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1293, 'PCMN-BASE', 'PROD', 'XXXXXX', '7171', '1289', 'Bénéfices portés en compte sur commandes en cours', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1294, 'PCMN-BASE', 'PROD', 'XXXXXX', '71710', '1293', 'Sur commandes en cours d''exécution', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1295, 'PCMN-BASE', 'PROD', 'XXXXXX', '71711', '1293', 'Sur travaux en cours des associations momentanées', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1296, 'PCMN-BASE', 'PROD', 'XXXXXX', '72', '1357', 'Production immobilisée', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1297, 'PCMN-BASE', 'PROD', 'XXXXXX', '720', '1296', 'En frais d''établissement', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1298, 'PCMN-BASE', 'PROD', 'XXXXXX', '721', '1296', 'En immobilisations incorporelles', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1299, 'PCMN-BASE', 'PROD', 'XXXXXX', '722', '1296', 'En immobilisations corporelles', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1300, 'PCMN-BASE', 'PROD', 'XXXXXX', '723', '1296', 'En immobilisations en cours', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1301, 'PCMN-BASE', 'PROD', 'XXXXXX', '74', '1357', 'Autres produits d''exploitation', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1302, 'PCMN-BASE', 'PROD', 'XXXXXX', '740', '1301', 'Subsides d''exploitation et montants compensatoires', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1303, 'PCMN-BASE', 'PROD', 'XXXXXX', '741', '1301', 'Plus-values sur réalisations courantes d''immobilisations corporelles', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1304, 'PCMN-BASE', 'PROD', 'XXXXXX', '742', '1301', 'Plus-values sur réalisations de créances commerciales', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1305, 'PCMN-BASE', 'PROD', 'XXXXXX', '743', '1301', 'à 749 Produits d''exploitation divers', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1306, 'PCMN-BASE', 'PROD', 'XXXXXX', '743', '1301', 'Produits de services exploités dans l''intérêt du personnel', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1307, 'PCMN-BASE', 'PROD', 'XXXXXX', '744', '1301', 'Commissions et courtages', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1308, 'PCMN-BASE', 'PROD', 'XXXXXX', '745', '1301', 'Redevances pour brevets et licences', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1309, 'PCMN-BASE', 'PROD', 'XXXXXX', '746', '1301', 'Prestations de services (transports, études, etc)', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1310, 'PCMN-BASE', 'PROD', 'XXXXXX', '747', '1301', 'Revenus des immeubles affectés aux activités non professionnelles', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1311, 'PCMN-BASE', 'PROD', 'XXXXXX', '748', '1301', 'Locations diverses à caractère professionnel', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1312, 'PCMN-BASE', 'PROD', 'XXXXXX', '749', '1301', 'Produits divers', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1313, 'PCMN-BASE', 'PROD', 'XXXXXX', '7490', '1312', 'Bonis sur reprises d''emballages consignés', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1314, 'PCMN-BASE', 'PROD', 'XXXXXX', '7491', '1312', 'Bonis sur travaux en associations momentanées', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1315, 'PCMN-BASE', 'PROD', 'XXXXXX', '75', '1357', 'Produits financiers', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1316, 'PCMN-BASE', 'PROD', 'XXXXXX', '750', '1315', 'Produits des immobilisations financières', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1317, 'PCMN-BASE', 'PROD', 'XXXXXX', '7500', '1316', 'Revenus des actions', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1318, 'PCMN-BASE', 'PROD', 'XXXXXX', '7501', '1316', 'Revenus des obligations', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1319, 'PCMN-BASE', 'PROD', 'XXXXXX', '7502', '1316', 'Revenus des créances à plus d''un an', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1320, 'PCMN-BASE', 'PROD', 'XXXXXX', '751', '1315', 'Produits des actifs circulants', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1321, 'PCMN-BASE', 'PROD', 'XXXXXX', '752', '1315', 'Plus-values sur réalisations d''actifs circulants', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1322, 'PCMN-BASE', 'PROD', 'XXXXXX', '753', '1315', 'Subsides en capital et en intérêts', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1323, 'PCMN-BASE', 'PROD', 'XXXXXX', '754', '1315', 'Différences de change', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1324, 'PCMN-BASE', 'PROD', 'XXXXXX', '755', '1315', 'Ecarts de conversion des devises', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1325, 'PCMN-BASE', 'PROD', 'XXXXXX', '756', '1315', 'à 759 Produits financiers divers', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1326, 'PCMN-BASE', 'PROD', 'XXXXXX', '756', '1315', 'Produits des autres créances', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1327, 'PCMN-BASE', 'PROD', 'XXXXXX', '757', '1315', 'Escomptes obtenus', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1328, 'PCMN-BASE', 'PROD', 'XXXXXX', '76', '1357', 'Produits exceptionnels', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1329, 'PCMN-BASE', 'PROD', 'XXXXXX', '760', '1328', 'Reprises d''amortissements et de réductions de valeur', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1330, 'PCMN-BASE', 'PROD', 'XXXXXX', '7600', '1329', 'Sur immobilisations incorporelles', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1331, 'PCMN-BASE', 'PROD', 'XXXXXX', '7601', '1329', 'Sur immobilisations corporelles', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1332, 'PCMN-BASE', 'PROD', 'XXXXXX', '761', '1328', 'Reprises de réductions de valeur sur immobilisations financières', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1333, 'PCMN-BASE', 'PROD', 'XXXXXX', '762', '1328', 'Reprises de provisions pour risques et charges exceptionnelles', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1334, 'PCMN-BASE', 'PROD', 'XXXXXX', '763', '1328', 'Plus-values sur réalisation d''actifs immobilisés', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1335, 'PCMN-BASE', 'PROD', 'XXXXXX', '7630', '1334', 'Sur immobilisations incorporelles', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1336, 'PCMN-BASE', 'PROD', 'XXXXXX', '7631', '1334', 'Sur immobilisations corporelles', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1337, 'PCMN-BASE', 'PROD', 'XXXXXX', '7632', '1334', 'Sur immobilisations financières', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1338, 'PCMN-BASE', 'PROD', 'XXXXXX', '764', '1328', 'Autres produits exceptionnels', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1339, 'PCMN-BASE', 'PROD', 'XXXXXX', '77', '1357', 'Régularisations d''impôts et reprises de provisions fiscales', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1340, 'PCMN-BASE', 'PROD', 'XXXXXX', '771', '1339', 'Impôts belges sur le résultat', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1341, 'PCMN-BASE', 'PROD', 'XXXXXX', '7710', '1340', 'Régularisations d''impôts dus ou versés', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1342, 'PCMN-BASE', 'PROD', 'XXXXXX', '7711', '1340', 'Régularisations d''impôts estimés', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1343, 'PCMN-BASE', 'PROD', 'XXXXXX', '7712', '1340', 'Reprises de provisions fiscales', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1344, 'PCMN-BASE', 'PROD', 'XXXXXX', '773', '1339', 'Impôts étrangers sur le résultat', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1345, 'PCMN-BASE', 'PROD', 'XXXXXX', '79', '1357', 'Affectation aux résultats', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1346, 'PCMN-BASE', 'PROD', 'XXXXXX', '790', '1345', 'Bénéfice reporté de l''exercice précédent', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1347, 'PCMN-BASE', 'PROD', 'XXXXXX', '791', '1345', 'Prélèvement sur le capital et les primes d''émission', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1348, 'PCMN-BASE', 'PROD', 'XXXXXX', '792', '1345', 'Prélèvement sur les réserves', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1349, 'PCMN-BASE', 'PROD', 'XXXXXX', '793', '1345', 'Perte à reporter', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1350, 'PCMN-BASE', 'PROD', 'XXXXXX', '794', '1345', 'Intervention d''associés (ou du propriétaire) dans la perte', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1351, 'PCMN-BASE', 'CAPIT', 'XXXXXX', '1', '', 'Fonds propres, provisions pour risques et charges et dettes à plus d''un an', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1352, 'PCMN-BASE', 'IMMO', 'XXXXXX', '2', '', 'Frais d''établissement. Actifs immobilisés et créances à plus d''un an', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1353, 'PCMN-BASE', 'STOCK', 'XXXXXX', '3', '', 'Stock et commandes en cours d''exécution', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1354, 'PCMN-BASE', 'TIERS', 'XXXXXX', '4', '', 'Créances et dettes à un an au plus', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1355, 'PCMN-BASE', 'FINAN', 'XXXXXX', '5', '', 'Placement de trésorerie et de valeurs disponibles', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1356, 'PCMN-BASE', 'CHARGE', 'XXXXXX', '6', '', 'Charges', '1'); +INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (1357, 'PCMN-BASE', 'PROD', 'XXXXXX', '7', '', 'Produits', '1'); + -- Fix: Missing instruction not correctly done into 3.5 -- VPGSQL8.2 ALTER TABLE llx_facture_fourn ALTER fk_mode_reglement DROP NOT NULL; -- VPGSQL8.2 ALTER TABLE llx_facture_fourn ALTER fk_cond_reglement DROP NOT NULL; - + \ No newline at end of file From beb471980e3f093c5e0060cd915d84b251e56825 Mon Sep 17 00:00:00 2001 From: frederic34 Date: Tue, 8 Jul 2014 21:50:21 +0200 Subject: [PATCH 131/258] Add fields for supplier order and invoice --- htdocs/install/mysql/migration/3.6.0-3.7.0.sql | 3 +++ htdocs/install/mysql/tables/llx_commande_fournisseur.sql | 1 + htdocs/install/mysql/tables/llx_facture_fourn.sql | 1 + 3 files changed, 5 insertions(+) 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 707772e8981..3ef39a6bab1 100644 --- a/htdocs/install/mysql/migration/3.6.0-3.7.0.sql +++ b/htdocs/install/mysql/migration/3.6.0-3.7.0.sql @@ -87,3 +87,6 @@ ALTER TABLE llx_product_price ADD CONSTRAINT fk_product_price_user_author FOREI ALTER TABLE llx_product_price ADD INDEX idx_product_price_fk_product (fk_product); ALTER TABLE llx_product_price ADD CONSTRAINT fk_product_price_product FOREIGN KEY (fk_product) REFERENCES llx_product (rowid); +ALTER TABLE llx_commande_fournisseur ADD COLUMN fk_account integer AFTER date_livraison; +ALTER TABLE llx_facture_fourn ADD COLUMN fk_account integer AFTER fk_projet; + diff --git a/htdocs/install/mysql/tables/llx_commande_fournisseur.sql b/htdocs/install/mysql/tables/llx_commande_fournisseur.sql index 51e57452397..d8076c1c06c 100644 --- a/htdocs/install/mysql/tables/llx_commande_fournisseur.sql +++ b/htdocs/install/mysql/tables/llx_commande_fournisseur.sql @@ -55,6 +55,7 @@ create table llx_commande_fournisseur model_pdf varchar(255), date_livraison date default NULL, + fk_account integer, -- bank account fk_cond_reglement integer, -- condition de reglement fk_mode_reglement integer, -- mode de reglement fk_input_method integer default 0, diff --git a/htdocs/install/mysql/tables/llx_facture_fourn.sql b/htdocs/install/mysql/tables/llx_facture_fourn.sql index c980d43e40f..2bb85f8400e 100644 --- a/htdocs/install/mysql/tables/llx_facture_fourn.sql +++ b/htdocs/install/mysql/tables/llx_facture_fourn.sql @@ -58,6 +58,7 @@ create table llx_facture_fourn fk_facture_source integer, -- facture origine si facture avoir fk_projet integer, -- projet auquel est associee la facture + fk_account integer, -- bank account fk_cond_reglement integer, -- condition de reglement (30 jours, fin de mois ...) fk_mode_reglement integer, -- mode de reglement (CHQ, VIR, ...) date_lim_reglement date, -- date limite de reglement From a137b31a47526d56c286bf721efd7a2e58ce46fe Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 8 Jul 2014 21:50:29 +0200 Subject: [PATCH 132/258] Fix: ON DELETE CASCADE is forbidden. Conflicts: htdocs/install/mysql/migration/3.6.0-3.7.0.sql test/phpunit/SqlTest.php --- htdocs/install/mysql/migration/3.5.0-3.6.0.sql | 8 +++++--- .../mysql/tables/llx_expeditiondet_batch.key.sql | 2 +- htdocs/install/mysql/tables/llx_product_batch.key.sql | 5 +++-- test/phpunit/SqlTest.php | 10 +++++++--- 4 files changed, 16 insertions(+), 9 deletions(-) diff --git a/htdocs/install/mysql/migration/3.5.0-3.6.0.sql b/htdocs/install/mysql/migration/3.5.0-3.6.0.sql index b3d71fe5af7..8c8bebe8b73 100644 --- a/htdocs/install/mysql/migration/3.5.0-3.6.0.sql +++ b/htdocs/install/mysql/migration/3.5.0-3.6.0.sql @@ -156,7 +156,6 @@ CREATE TABLE llx_product_batch ( batch varchar(30) DEFAULT NULL, qty double NOT NULL DEFAULT 0, import_key varchar(14) DEFAULT NULL, - KEY ix_fk_product_stock (fk_product_stock) ) ENGINE=InnoDB; CREATE TABLE llx_expeditiondet_batch ( @@ -167,7 +166,6 @@ CREATE TABLE llx_expeditiondet_batch ( batch varchar(30) DEFAULT NULL, qty double NOT NULL DEFAULT 0, fk_origin_stock integer NOT NULL, - KEY ix_fk_expeditiondet (fk_expeditiondet) ) ENGINE=InnoDB; -- Salary payment in tax module @@ -191,6 +189,10 @@ CREATE TABLE llx_payment_salary ( fk_user_modif integer )ENGINE=innodb; +ALTER TABLE llx_product_batch ADD INDEX idx_fk_product_stock (fk_product_stock); +ALTER TABLE llx_product_batch ADD CONSTRAINT fk_product_batch_fk_product_stock FOREIGN KEY (fk_product_stock) REFERENCES llx_product_stock (rowid); + + -- New 1074 : Stock mouvement link to origin ALTER TABLE llx_stock_mouvement ADD fk_origin integer; ALTER TABLE llx_stock_mouvement ADD origintype VARCHAR(32); @@ -1672,4 +1674,4 @@ INSERT INTO llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, -- Fix: Missing instruction not correctly done into 3.5 -- VPGSQL8.2 ALTER TABLE llx_facture_fourn ALTER fk_mode_reglement DROP NOT NULL; -- VPGSQL8.2 ALTER TABLE llx_facture_fourn ALTER fk_cond_reglement DROP NOT NULL; - \ No newline at end of file + diff --git a/htdocs/install/mysql/tables/llx_expeditiondet_batch.key.sql b/htdocs/install/mysql/tables/llx_expeditiondet_batch.key.sql index 2c5428d6224..f0438b6316c 100644 --- a/htdocs/install/mysql/tables/llx_expeditiondet_batch.key.sql +++ b/htdocs/install/mysql/tables/llx_expeditiondet_batch.key.sql @@ -16,4 +16,4 @@ -- -- ============================================================================ ALTER TABLE llx_expeditiondet_batch ADD INDEX ix_fk_expeditiondet (fk_expeditiondet); -ALTER TABLE llx_expeditiondet_batch ADD CONSTRAINT fk_expeditiondet_batch_fk_expeditiondet FOREIGN KEY (fk_expeditiondet) REFERENCES llx_expeditiondet (rowid) ON DELETE CASCADE; +ALTER TABLE llx_expeditiondet_batch ADD CONSTRAINT fk_expeditiondet_batch_fk_expeditiondet FOREIGN KEY (fk_expeditiondet) REFERENCES llx_expeditiondet(rowid); diff --git a/htdocs/install/mysql/tables/llx_product_batch.key.sql b/htdocs/install/mysql/tables/llx_product_batch.key.sql index 6c184f2e1b3..f1f24c8b81a 100644 --- a/htdocs/install/mysql/tables/llx_product_batch.key.sql +++ b/htdocs/install/mysql/tables/llx_product_batch.key.sql @@ -15,5 +15,6 @@ -- along with this program. If not, see . -- -- ============================================================================ -ALTER TABLE llx_product_batch ADD INDEX ix_fk_product_stock (fk_product_stock); -ALTER TABLE llx_product_batch ADD CONSTRAINT fk_product_batch_fk_product_stock FOREIGN KEY (fk_product_stock) REFERENCES llx_product_stock (rowid) ON DELETE CASCADE; + +ALTER TABLE llx_product_batch ADD INDEX idx_fk_product_stock (fk_product_stock); +ALTER TABLE llx_product_batch ADD CONSTRAINT fk_product_batch_fk_product_stock FOREIGN KEY (fk_product_stock) REFERENCES llx_product_stock (rowid); diff --git a/test/phpunit/SqlTest.php b/test/phpunit/SqlTest.php index bd2a3c57b5d..f86c6fcc57b 100755 --- a/test/phpunit/SqlTest.php +++ b/test/phpunit/SqlTest.php @@ -149,11 +149,15 @@ class SqlTest extends PHPUnit_Framework_TestCase $result=strpos($filecontent,'`'); print __METHOD__." Result for checking we don't have back quote = ".$result."\n"; - $this->assertTrue($result===false); + $this->assertTrue($result===false, 'Found ON back quote. Bad.'); $result=strpos($filecontent,'int('); - print __METHOD__." Result for checking we don't have back 'int(' instead of integer = ".$result."\n"; - $this->assertTrue($result===false); + print __METHOD__." Result for checking we don't have 'int(' instead of 'integer' = ".$result."\n"; + $this->assertTrue($result===false, 'Found int(x) instead of integer. Bad.'); + + $result=strpos($filecontent,'ON DELETE CASCADE'); + print __METHOD__." Result for checking we don't have 'ON DELETE CASCADE' = ".$result."\n"; + $this->assertTrue($result===false, 'Found ON DELETE CASCADE. Bad.'); } return; From e6240491616e2253a373685dfc3cef391c6a555b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 8 Jul 2014 22:12:20 +0200 Subject: [PATCH 133/258] Fix: Pb with migration with pgsql --- htdocs/install/mysql/migration/3.6.0-3.7.0.sql | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 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 7839fece341..19b820d964c 100644 --- a/htdocs/install/mysql/migration/3.6.0-3.7.0.sql +++ b/htdocs/install/mysql/migration/3.6.0-3.7.0.sql @@ -11,9 +11,10 @@ -- To drop a foreign key: ALTER TABLE llx_table DROP FOREIGN KEY fk_name; -- To restrict request to Mysql version x.y use -- VMYSQLx.y -- To restrict request to Pgsql version x.y use -- VPGSQLx.y --- To make pk to be auto increment (mysql): VMYSQL4.3 ALTER TABLE llx_c_shipment_mode CHANGE COLUMN rowid rowid INTEGER NOT NULL AUTO_INCREMENT; --- To make pk to be auto increment (postgres) VPGSQL8.2 NOT POSSIBLE. MUST DELETE/CREATE TABLE - +-- To make pk to be auto increment (mysql): VMYSQL4.3 ALTER TABLE llx_c_shipment_mode CHANGE COLUMN rowid rowid INTEGER NOT NULL AUTO_INCREMENT; +-- To make pk to be auto increment (postgres): VPGSQL8.2 NOT POSSIBLE. MUST DELETE/CREATE TABLE +-- To set a field as NULL: VPGSQL8.2 ALTER TABLE llx_table ALTER COLUMN name DROP NOT NULL; +-- To set a field as defailt NULL: VPGSQL8.2 ALTER TABLE llx_table ALTER COLUMN name SET DEFAULT NULL; -- -- VPGSQL8.2 DELETE FROM llx_usergroup_user WHERE fk_user NOT IN (SELECT rowid from llx_user); -- -- VMYSQL4.1 DELETE FROM llx_usergroup_user WHERE fk_usergroup NOT IN (SELECT rowid from llx_usergroup); @@ -68,14 +69,20 @@ ALTER TABLE llx_societe ADD COLUMN localtax2_value double(6,3) after localtax2_a -- Added missing relations of llx_product -- fk_country ALTER TABLE llx_product MODIFY COLUMN fk_country INTEGER NULL DEFAULT NULL; +-- VPGSQL8.2 ALTER TABLE llx_product ALTER COLUMN fk_country DROP NOT NULL; +-- VPGSQL8.2 ALTER TABLE llx_product ALTER COLUMN fk_country SET DEFAULT NULL; UPDATE llx_product SET fk_country = NULL WHERE fk_country = 0; ALTER TABLE llx_product ADD INDEX idx_product_fk_country (fk_country); ALTER TABLE llx_product ADD CONSTRAINT fk_product_fk_country FOREIGN KEY (fk_country) REFERENCES llx_c_pays (rowid); -- fk_user_author ALTER TABLE llx_product MODIFY COLUMN fk_user_author INTEGER NULL DEFAULT NULL; +-- VPGSQL8.2 ALTER TABLE llx_product ALTER COLUMN fk_user_author DROP NOT NULL; +-- VPGSQL8.2 ALTER TABLE llx_product ALTER COLUMN fk_user_author SET DEFAULT NULL; ALTER TABLE llx_product ADD INDEX idx_product_fk_user_author (fk_user_author); -- fk_barcode_type ALTER TABLE llx_product MODIFY COLUMN fk_barcode_type INTEGER NULL DEFAULT NULL; +-- VPGSQL8.2 ALTER TABLE llx_product ALTER COLUMN fk_barcode_type DROP NOT NULL; +-- VPGSQL8.2 ALTER TABLE llx_product ALTER COLUMN fk_barcode_type SET DEFAULT NULL; UPDATE llx_product SET fk_barcode_type = NULL WHERE fk_barcode_type = 0; ALTER TABLE llx_product ADD INDEX idx_product_fk_barcode_type (fk_barcode_type); ALTER TABLE llx_product ADD CONSTRAINT fk_product_barcode_type FOREIGN KEY (fk_barcode_type) REFERENCES llx_c_barcode_type (rowid); From f0056b3b95e493ffd53801ebac798ee2fa70bc58 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 8 Jul 2014 22:40:06 +0200 Subject: [PATCH 134/258] Fix: Migration does not match tables --- htdocs/install/mysql/migration/3.5.0-3.6.0.sql | 3 +++ htdocs/install/mysql/tables/llx_expeditiondet_batch.key.sql | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/htdocs/install/mysql/migration/3.5.0-3.6.0.sql b/htdocs/install/mysql/migration/3.5.0-3.6.0.sql index 8c8bebe8b73..c624c69489b 100644 --- a/htdocs/install/mysql/migration/3.5.0-3.6.0.sql +++ b/htdocs/install/mysql/migration/3.5.0-3.6.0.sql @@ -192,6 +192,9 @@ CREATE TABLE llx_payment_salary ( ALTER TABLE llx_product_batch ADD INDEX idx_fk_product_stock (fk_product_stock); ALTER TABLE llx_product_batch ADD CONSTRAINT fk_product_batch_fk_product_stock FOREIGN KEY (fk_product_stock) REFERENCES llx_product_stock (rowid); +ALTER TABLE llx_expeditiondet_batch ADD INDEX idx_fk_expeditiondet (fk_expeditiondet); +ALTER TABLE llx_expeditiondet_batch ADD CONSTRAINT fk_expeditiondet_batch_fk_expeditiondet FOREIGN KEY (fk_expeditiondet) REFERENCES llx_expeditiondet(rowid); + -- New 1074 : Stock mouvement link to origin ALTER TABLE llx_stock_mouvement ADD fk_origin integer; diff --git a/htdocs/install/mysql/tables/llx_expeditiondet_batch.key.sql b/htdocs/install/mysql/tables/llx_expeditiondet_batch.key.sql index f0438b6316c..44acf1d7afe 100644 --- a/htdocs/install/mysql/tables/llx_expeditiondet_batch.key.sql +++ b/htdocs/install/mysql/tables/llx_expeditiondet_batch.key.sql @@ -15,5 +15,5 @@ -- along with this program. If not, see . -- -- ============================================================================ -ALTER TABLE llx_expeditiondet_batch ADD INDEX ix_fk_expeditiondet (fk_expeditiondet); +ALTER TABLE llx_expeditiondet_batch ADD INDEX idx_fk_expeditiondet (fk_expeditiondet); ALTER TABLE llx_expeditiondet_batch ADD CONSTRAINT fk_expeditiondet_batch_fk_expeditiondet FOREIGN KEY (fk_expeditiondet) REFERENCES llx_expeditiondet(rowid); From 32c15132df1c0cc19eda293cea8f5f84d68201cb Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 8 Jul 2014 23:19:46 +0200 Subject: [PATCH 135/258] Fix: sql syntax error --- htdocs/install/mysql/migration/3.5.0-3.6.0.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/install/mysql/migration/3.5.0-3.6.0.sql b/htdocs/install/mysql/migration/3.5.0-3.6.0.sql index c624c69489b..950263bfd12 100644 --- a/htdocs/install/mysql/migration/3.5.0-3.6.0.sql +++ b/htdocs/install/mysql/migration/3.5.0-3.6.0.sql @@ -155,7 +155,7 @@ CREATE TABLE llx_product_batch ( sellby datetime DEFAULT NULL, batch varchar(30) DEFAULT NULL, qty double NOT NULL DEFAULT 0, - import_key varchar(14) DEFAULT NULL, + import_key varchar(14) DEFAULT NULL ) ENGINE=InnoDB; CREATE TABLE llx_expeditiondet_batch ( @@ -165,7 +165,7 @@ CREATE TABLE llx_expeditiondet_batch ( sellby date DEFAULT NULL, batch varchar(30) DEFAULT NULL, qty double NOT NULL DEFAULT 0, - fk_origin_stock integer NOT NULL, + fk_origin_stock integer NOT NULL ) ENGINE=InnoDB; -- Salary payment in tax module From 682d765de915547340de3e5447b7623846194e0b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 9 Jul 2014 00:16:28 +0200 Subject: [PATCH 136/258] New: Add country iso code on 3 chars into table of countries. --- ChangeLog | 3 +- htdocs/install/mysql/data/llx_00_c_pays.sql | 753 +++++++------------- 2 files changed, 248 insertions(+), 508 deletions(-) diff --git a/ChangeLog b/ChangeLog index 941e2de7afc..32bb738eba6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -16,7 +16,7 @@ For users: - New: Add event FICHINTER_CLASSIFY_BILLED into list of possible events to create an automatic event into agenda. - New: Add new type of event (when type of events are used, not by - default) + default) - Fix: [ bug #1487 ] PAYMENT_DELETE trigger does not intercept trigger action - Fix: [ bug #1470, #1472, #1473] User trigger problem - Fix: [ bug #1489, #1491 ] Intervention trigger problem @@ -33,6 +33,7 @@ For translators: For developers: - New: Add hook "searchAgendaFrom". - New: Add trigger DON_UPDATE, DON_DELETE +- New: Add country iso code on 3 chars into table of countries. - Qual: Removed hard coded rowid into data init of table llx_c_action_trigger. WARNING: Following change may create regression for some external modules, but was necessary to make diff --git a/htdocs/install/mysql/data/llx_00_c_pays.sql b/htdocs/install/mysql/data/llx_00_c_pays.sql index 7500229407c..6db4454f3c2 100644 --- a/htdocs/install/mysql/data/llx_00_c_pays.sql +++ b/htdocs/install/mysql/data/llx_00_c_pays.sql @@ -19,515 +19,254 @@ -- You should have received a copy of the GNU General Public License -- along with this program. If not, see . -- --- +-- Do not add comment at end of line. This file is parsed by install and -- are removed -- --- Ne pas placer de commentaire en fin de ligne, ce fichier est parsé lors --- de l'install et tous les sigles '--' sont supprimés. --- - --- --- Pays +-- Countries -- -- delete from llx_c_pays; -insert into llx_c_pays (rowid,code,code_iso,libelle) values (0, '' , null, '-' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (1, 'FR', null, 'France' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (2, 'BE', null, 'Belgium' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (3, 'IT', null, 'Italy' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (4, 'ES', null, 'Spain' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (5, 'DE', null, 'Germany' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (6, 'CH', null, 'Switzerland' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (7, 'GB', null, 'United Kingdom' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (8, 'IE', null, 'Irland' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (9, 'CN', null, 'China' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (10, 'TN', null, 'Tunisia' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (11, 'US', null, 'United States' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (12, 'MA', null, 'Maroc' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (13, 'DZ', null, 'Algeria' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (14, 'CA', null, 'Canada' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (15, 'TG', null, 'Togo' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (16, 'GA', null, 'Gabon' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (17, 'NL', null, 'Nerderland' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (18, 'HU', null, 'Hongrie' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (19, 'RU', null, 'Russia' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (20, 'SE', null, 'Sweden' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (21, 'CI', null, 'Côte d''Ivoire' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (22, 'SN', null, 'Senegal' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (23, 'AR', null, 'Argentine' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (24, 'CM', null, 'Cameroun' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (25, 'PT', null, 'Portugal' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (26, 'SA', null, 'Saudi Arabia' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (27, 'MC', null, 'Monaco' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (28, 'AU', null, 'Australia' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (29, 'SG', null, 'Singapour' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (30, 'AF', null, 'Afghanistan' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (31, 'AX', null, 'Iles Aland' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (32, 'AL', null, 'Albanie' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (33, 'AS', null, 'Samoa américaines'); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (34, 'AD', null, 'Andorre' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (35, 'AO', null, 'Angola' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (36, 'AI', null, 'Anguilla' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (37, 'AQ', null, 'Antarctique' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (38, 'AG', null, 'Antigua-et-Barbuda'); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (39, 'AM', null, 'Arménie' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (40, 'AW', null, 'Aruba' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (41, 'AT', null, 'Autriche' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (42, 'AZ', null, 'Azerbaïdjan' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (43, 'BS', null, 'Bahamas' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (44, 'BH', null, 'Bahreïn' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (45, 'BD', null, 'Bangladesh' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (46, 'BB', null, 'Barbade' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (47, 'BY', null, 'Biélorussie' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (48, 'BZ', null, 'Belize' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (49, 'BJ', null, 'Bénin' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (50, 'BM', null, 'Bermudes' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (51, 'BT', null, 'Bhoutan' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (52, 'BO', null, 'Bolivie' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (53, 'BA', null, 'Bosnie-Herzégovine'); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (54, 'BW', null, 'Botswana' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (55, 'BV', null, 'Ile Bouvet' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (56, 'BR', null, 'Brazil' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (57, 'IO', null, 'Territoire britannique de l''Océan Indien'); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (58, 'BN', null, 'Brunei' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (59, 'BG', null, 'Bulgarie' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (60, 'BF', null, 'Burkina Faso' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (61, 'BI', null, 'Burundi' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (62, 'KH', null, 'Cambodge' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (63, 'CV', null, 'Cap-Vert' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (64, 'KY', null, 'Iles Cayman' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (65, 'CF', null, 'République centrafricaine'); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (66, 'TD', null, 'Tchad' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (67, 'CL', null, 'Chili' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (68, 'CX', null, 'Ile Christmas' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (69, 'CC', null, 'Iles des Cocos (Keeling)'); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (70, 'CO', null, 'Colombie' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (71, 'KM', null, 'Comores' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (72, 'CG', null, 'Congo' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (73, 'CD', null, 'République démocratique du Congo'); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (74, 'CK', null, 'Iles Cook' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (75, 'CR', null, 'Costa Rica' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (76, 'HR', null, 'Croatie' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (77, 'CU', null, 'Cuba' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (78, 'CY', null, 'Chypre' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (79, 'CZ', null, 'République Tchèque'); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (80, 'DK', null, 'Danemark' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (81, 'DJ', null, 'Djibouti' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (82, 'DM', null, 'Dominique' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (83, 'DO', null, 'République Dominicaine'); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (84, 'EC', null, 'Equateur' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (85, 'EG', null, 'Egypte' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (86, 'SV', null, 'Salvador' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (87, 'GQ', null, 'Guinée Equatoriale'); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (88, 'ER', null, 'Erythrée' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (89, 'EE', null, 'Estonia' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (90, 'ET', null, 'Ethiopie' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (91, 'FK', null, 'Iles Falkland' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (92, 'FO', null, 'Iles Féroé' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (93, 'FJ', null, 'Iles Fidji' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (94, 'FI', null, 'Finlande' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (95, 'GF', null, 'Guyane française'); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (96, 'PF', null, 'Polynésie française'); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (97, 'TF', null, 'Terres australes françaises'); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (98, 'GM', null, 'Gambie' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (99, 'GE', null, 'Georgia' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (100,'GH', null, 'Ghana' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (101,'GI', null, 'Gibraltar' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (102,'GR', null, 'Greece' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (103,'GL', null, 'Groenland' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (104,'GD', null, 'Grenade' ); ---insert into llx_c_pays (rowid,code,code_iso,libelle) values (105,'GP', null, 'Guadeloupe' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (106,'GU', null, 'Guam' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (107,'GT', null, 'Guatemala' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (108,'GN', null, 'Guinea' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (109,'GW', null, 'Guinea-Bissao' ); ---insert into llx_c_pays (rowid,code,code_iso,libelle) values (110,'GY', null, 'Guyana' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (111,'HT', null, 'Haiti' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (112,'HM', null, 'Iles Heard et McDonald'); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (113,'VA', null, 'Saint-Siège (Vatican)'); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (114,'HN', null, 'Honduras' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (115,'HK', null, 'Hong Kong' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (116,'IS', null, 'Islande' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (117,'IN', null, 'India' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (118,'ID', null, 'Indonésie' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (119,'IR', null, 'Iran' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (120,'IQ', null, 'Iraq' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (121,'IL', null, 'Israel' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (122,'JM', null, 'Jamaïque' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (123,'JP', null, 'Japon' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (124,'JO', null, 'Jordanie' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (125,'KZ', null, 'Kazakhstan' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (126,'KE', null, 'Kenya' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (127,'KI', null, 'Kiribati' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (128,'KP', null, 'North Corea' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (129,'KR', null, 'South Corea' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (130,'KW', null, 'Koweït' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (131,'KG', null, 'Kirghizistan' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (132,'LA', null, 'Laos' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (133,'LV', null, 'Lettonie' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (134,'LB', null, 'Liban' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (135,'LS', null, 'Lesotho' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (136,'LR', null, 'Liberia' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (137,'LY', null, 'Libye' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (138,'LI', null, 'Liechtenstein' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (139,'LT', null, 'Lituanie' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (140,'LU', null, 'Luxembourg' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (141,'MO', null, 'Macao' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (142,'MK', null, 'ex-République yougoslave de Macédoine'); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (143,'MG', null, 'Madagascar' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (144,'MW', null, 'Malawi' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (145,'MY', null, 'Malaisie' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (146,'MV', null, 'Maldives' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (147,'ML', null, 'Mali' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (148,'MT', null, 'Malte' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (149,'MH', null, 'Iles Marshall' ); ---insert into llx_c_pays (rowid,code,code_iso,libelle) values (150,'MQ', null, 'Martinique' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (151,'MR', null, 'Mauritanie' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (152,'MU', null, 'Maurice' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (153,'YT', null, 'Mayotte' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (154,'MX', null, 'Mexique' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (155,'FM', null, 'Micronésie' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (156,'MD', null, 'Moldavie' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (157,'MN', null, 'Mongolie' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (158,'MS', null, 'Monserrat' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (159,'MZ', null, 'Mozambique' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (160,'MM', null, 'Birmanie (Myanmar)' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (161,'NA', null, 'Namibie' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (162,'NR', null, 'Nauru' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (163,'NP', null, 'Népal' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (164,'AN', null, 'Antilles néerlandaises'); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (165,'NC', null, 'Nouvelle-Calédonie'); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (166,'NZ', null, 'Nouvelle-Zélande'); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (167,'NI', null, 'Nicaragua' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (168,'NE', null, 'Niger' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (169,'NG', null, 'Nigeria' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (170,'NU', null, 'Nioué' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (171,'NF', null, 'Ile Norfolk' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (172,'MP', null, 'Mariannes du Nord'); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (173,'NO', null, 'Norvège' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (174,'OM', null, 'Oman' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (175,'PK', null, 'Pakistan' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (176,'PW', null, 'Palaos' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (177,'PS', null, 'Territoire Palestinien Occupé'); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (178,'PA', null, 'Panama' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (179,'PG', null, 'Papouasie-Nouvelle-Guinée'); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (180,'PY', null, 'Paraguay' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (181,'PE', null, 'Peru' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (182,'PH', null, 'Philippines' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (183,'PN', null, 'Iles Pitcairn' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (184,'PL', null, 'Pologne' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (185,'PR', null, 'Porto Rico' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (186,'QA', null, 'Qatar' ); ---insert into llx_c_pays (rowid,code,code_iso,libelle) values (187,'RE', null, 'Réunion' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (188,'RO', null, 'Roumanie' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (189,'RW', null, 'Rwanda' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (190,'SH', null, 'Sainte-Hélène' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (191,'KN', null, 'Saint-Christophe-et-Niévès'); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (192,'LC', null, 'Sainte-Lucie' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (193,'PM', null, 'Saint-Pierre-et-Miquelon'); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (194,'VC', null, 'Saint-Vincent-et-les-Grenadines'); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (195,'WS', null, 'Samoa' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (196,'SM', null, 'Saint-Marin' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (197,'ST', null, 'Sao Tomé-et-Principe'); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (198,'RS', null, 'Serbie' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (199,'SC', null, 'Seychelles' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (200,'SL', null, 'Sierra Leone' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (201,'SK', null, 'Slovaquie' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (202,'SI', null, 'Slovénie' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (203,'SB', null, 'Iles Salomon' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (204,'SO', null, 'Somalie' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (205,'ZA', null, 'Afrique du Sud'); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (206,'GS', null, 'Iles Géorgie du Sud et Sandwich du Sud'); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (207,'LK', null, 'Sri Lanka' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (208,'SD', null, 'Soudan' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (209,'SR', null, 'Suriname' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (210,'SJ', null, 'Iles Svalbard et Jan Mayen'); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (211,'SZ', null, 'Swaziland' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (212,'SY', null, 'Syrie' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (213,'TW', null, 'Taïwan' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (214,'TJ', null, 'Tadjikistan' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (215,'TZ', null, 'Tanzanie' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (216,'TH', null, 'Thaïlande' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (217,'TL', null, 'Timor Oriental'); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (218,'TK', null, 'Tokélaou' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (219,'TO', null, 'Tonga' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (220,'TT', null, 'Trinité-et-Tobago'); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (221,'TR', null, 'Turquie' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (222,'TM', null, 'Turkménistan' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (223,'TC', null, 'Iles Turks-et-Caicos'); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (224,'TV', null, 'Tuvalu' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (225,'UG', null, 'Ouganda' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (226,'UA', null, 'Ukraine' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (227,'AE', null, 'Émirats arabes unis'); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (228,'UM', null, 'Iles mineures éloignées des États-Unis'); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (229,'UY', null, 'Uruguay' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (230,'UZ', null, 'Ouzbékistan' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (231,'VU', null, 'Vanuatu' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (232,'VE', null, 'Vénézuela' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (233,'VN', null, 'Viêt Nam' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (234,'VG', null, 'Iles Vierges britanniques'); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (235,'VI', null, 'Iles Vierges américaines'); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (236,'WF', null, 'Wallis-et-Futuna'); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (237,'EH', null, 'Sahara occidental'); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (238,'YE', null, 'Yémen' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (239,'ZM', null, 'Zambie' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (240,'ZW', null, 'Zimbabwe' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (241,'GG', null, 'Guernesey' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (242,'IM', null, 'Ile de Man' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (243,'JE', null, 'Jersey' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (244,'ME', null, 'Monténégro' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (245,'BL', null, 'Saint-Barthélemy'); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (246,'MF', null, 'Saint-Martin' ); -insert into llx_c_pays (rowid,code,code_iso,libelle) values (247,'BU', null, 'Burundi' ); - - -UPDATE llx_c_pays SET code_iso = 'AFG' WHERE code = 'AF'; -UPDATE llx_c_pays SET code_iso = 'ALA' WHERE code = 'AX'; -UPDATE llx_c_pays SET code_iso = 'ALB' WHERE code = 'AL'; -UPDATE llx_c_pays SET code_iso = 'DZA' WHERE code = 'DZ'; -UPDATE llx_c_pays SET code_iso = 'ASM' WHERE code = 'AS'; -UPDATE llx_c_pays SET code_iso = 'AND' WHERE code = 'AD'; -UPDATE llx_c_pays SET code_iso = 'AGO' WHERE code = 'AO'; -UPDATE llx_c_pays SET code_iso = 'AIA' WHERE code = 'AI'; -UPDATE llx_c_pays SET code_iso = 'ATA' WHERE code = 'AQ'; -UPDATE llx_c_pays SET code_iso = 'ATG' WHERE code = 'AG'; -UPDATE llx_c_pays SET code_iso = 'ARG' WHERE code = 'AR'; -UPDATE llx_c_pays SET code_iso = 'ARM' WHERE code = 'AM'; -UPDATE llx_c_pays SET code_iso = 'ABW' WHERE code = 'AW'; -UPDATE llx_c_pays SET code_iso = 'AUS' WHERE code = 'AU'; -UPDATE llx_c_pays SET code_iso = 'AUT' WHERE code = 'AT'; -UPDATE llx_c_pays SET code_iso = 'AZE' WHERE code = 'AZ'; -UPDATE llx_c_pays SET code_iso = 'BHS' WHERE code = 'BS'; -UPDATE llx_c_pays SET code_iso = 'BHR' WHERE code = 'BH'; -UPDATE llx_c_pays SET code_iso = 'BGD' WHERE code = 'BD'; -UPDATE llx_c_pays SET code_iso = 'BRB' WHERE code = 'BB'; -UPDATE llx_c_pays SET code_iso = 'BLR' WHERE code = 'BY'; -UPDATE llx_c_pays SET code_iso = 'BEL' WHERE code = 'BE'; -UPDATE llx_c_pays SET code_iso = 'BLZ' WHERE code = 'BZ'; -UPDATE llx_c_pays SET code_iso = 'BEN' WHERE code = 'BJ'; -UPDATE llx_c_pays SET code_iso = 'BMU' WHERE code = 'BM'; -UPDATE llx_c_pays SET code_iso = 'BTN' WHERE code = 'BT'; -UPDATE llx_c_pays SET code_iso = 'BOL' WHERE code = 'BO'; -UPDATE llx_c_pays SET code_iso = 'BES' WHERE code = 'BQ'; -UPDATE llx_c_pays SET code_iso = 'BIH' WHERE code = 'BA'; -UPDATE llx_c_pays SET code_iso = 'BWA' WHERE code = 'BW'; -UPDATE llx_c_pays SET code_iso = 'BVT' WHERE code = 'BV'; -UPDATE llx_c_pays SET code_iso = 'BRA' WHERE code = 'BR'; -UPDATE llx_c_pays SET code_iso = 'IOT' WHERE code = 'IO'; -UPDATE llx_c_pays SET code_iso = 'BRN' WHERE code = 'BN'; -UPDATE llx_c_pays SET code_iso = 'BGR' WHERE code = 'BG'; -UPDATE llx_c_pays SET code_iso = 'BFA' WHERE code = 'BF'; -UPDATE llx_c_pays SET code_iso = 'BDI' WHERE code = 'BI'; -UPDATE llx_c_pays SET code_iso = 'KHM' WHERE code = 'KH'; -UPDATE llx_c_pays SET code_iso = 'CMR' WHERE code = 'CM'; -UPDATE llx_c_pays SET code_iso = 'CAN' WHERE code = 'CA'; -UPDATE llx_c_pays SET code_iso = 'CPV' WHERE code = 'CV'; -UPDATE llx_c_pays SET code_iso = 'CYM' WHERE code = 'KY'; -UPDATE llx_c_pays SET code_iso = 'CAF' WHERE code = 'CF'; -UPDATE llx_c_pays SET code_iso = 'TCD' WHERE code = 'TD'; -UPDATE llx_c_pays SET code_iso = 'CHL' WHERE code = 'CL'; -UPDATE llx_c_pays SET code_iso = 'CHN' WHERE code = 'CN'; -UPDATE llx_c_pays SET code_iso = 'CXR' WHERE code = 'CX'; -UPDATE llx_c_pays SET code_iso = 'CCK' WHERE code = 'CC'; -UPDATE llx_c_pays SET code_iso = 'COL' WHERE code = 'CO'; -UPDATE llx_c_pays SET code_iso = 'COM' WHERE code = 'KM'; -UPDATE llx_c_pays SET code_iso = 'COG' WHERE code = 'CG'; -UPDATE llx_c_pays SET code_iso = 'COD' WHERE code = 'CD'; -UPDATE llx_c_pays SET code_iso = 'COK' WHERE code = 'CK'; -UPDATE llx_c_pays SET code_iso = 'CRI' WHERE code = 'CR'; -UPDATE llx_c_pays SET code_iso = 'CIV' WHERE code = 'CI'; -UPDATE llx_c_pays SET code_iso = 'HRV' WHERE code = 'HR'; -UPDATE llx_c_pays SET code_iso = 'CUB' WHERE code = 'CU'; -UPDATE llx_c_pays SET code_iso = 'CUW' WHERE code = 'CW'; -UPDATE llx_c_pays SET code_iso = 'CYP' WHERE code = 'CY'; -UPDATE llx_c_pays SET code_iso = 'CZE' WHERE code = 'CZ'; -UPDATE llx_c_pays SET code_iso = 'DNK' WHERE code = 'DK'; -UPDATE llx_c_pays SET code_iso = 'DJI' WHERE code = 'DJ'; -UPDATE llx_c_pays SET code_iso = 'DMA' WHERE code = 'DM'; -UPDATE llx_c_pays SET code_iso = 'DOM' WHERE code = 'DO'; -UPDATE llx_c_pays SET code_iso = 'ECU' WHERE code = 'EC'; -UPDATE llx_c_pays SET code_iso = 'EGY' WHERE code = 'EG'; -UPDATE llx_c_pays SET code_iso = 'SLV' WHERE code = 'SV'; -UPDATE llx_c_pays SET code_iso = 'GNQ' WHERE code = 'GQ'; -UPDATE llx_c_pays SET code_iso = 'ERI' WHERE code = 'ER'; -UPDATE llx_c_pays SET code_iso = 'EST' WHERE code = 'EE'; -UPDATE llx_c_pays SET code_iso = 'ETH' WHERE code = 'ET'; -UPDATE llx_c_pays SET code_iso = 'FLK' WHERE code = 'FK'; -UPDATE llx_c_pays SET code_iso = 'FRO' WHERE code = 'FO'; -UPDATE llx_c_pays SET code_iso = 'FJI' WHERE code = 'FJ'; -UPDATE llx_c_pays SET code_iso = 'FIN' WHERE code = 'FI'; -UPDATE llx_c_pays SET code_iso = 'FRA' WHERE code = 'FR'; -UPDATE llx_c_pays SET code_iso = 'GUF' WHERE code = 'GF'; -UPDATE llx_c_pays SET code_iso = 'PYF' WHERE code = 'PF'; -UPDATE llx_c_pays SET code_iso = 'ATF' WHERE code = 'TF'; -UPDATE llx_c_pays SET code_iso = 'GAB' WHERE code = 'GA'; -UPDATE llx_c_pays SET code_iso = 'GMB' WHERE code = 'GM'; -UPDATE llx_c_pays SET code_iso = 'GEO' WHERE code = 'GE'; -UPDATE llx_c_pays SET code_iso = 'DEU' WHERE code = 'DE'; -UPDATE llx_c_pays SET code_iso = 'GHA' WHERE code = 'GH'; -UPDATE llx_c_pays SET code_iso = 'GIB' WHERE code = 'GI'; -UPDATE llx_c_pays SET code_iso = 'GRC' WHERE code = 'GR'; -UPDATE llx_c_pays SET code_iso = 'GRL' WHERE code = 'GL'; -UPDATE llx_c_pays SET code_iso = 'GRD' WHERE code = 'GD'; -UPDATE llx_c_pays SET code_iso = 'GLP' WHERE code = 'GP'; -UPDATE llx_c_pays SET code_iso = 'GUM' WHERE code = 'GU'; -UPDATE llx_c_pays SET code_iso = 'GTM' WHERE code = 'GT'; -UPDATE llx_c_pays SET code_iso = 'GGY' WHERE code = 'GG'; -UPDATE llx_c_pays SET code_iso = 'GIN' WHERE code = 'GN'; -UPDATE llx_c_pays SET code_iso = 'GNB' WHERE code = 'GW'; -UPDATE llx_c_pays SET code_iso = 'GUY' WHERE code = 'GY'; -UPDATE llx_c_pays SET code_iso = 'HTI' WHERE code = 'HT'; -UPDATE llx_c_pays SET code_iso = 'HMD' WHERE code = 'HM'; -UPDATE llx_c_pays SET code_iso = 'VAT' WHERE code = 'VA'; -UPDATE llx_c_pays SET code_iso = 'HND' WHERE code = 'HN'; -UPDATE llx_c_pays SET code_iso = 'HKG' WHERE code = 'HK'; -UPDATE llx_c_pays SET code_iso = 'HUN' WHERE code = 'HU'; -UPDATE llx_c_pays SET code_iso = 'ISL' WHERE code = 'IS'; -UPDATE llx_c_pays SET code_iso = 'IND' WHERE code = 'IN'; -UPDATE llx_c_pays SET code_iso = 'IDN' WHERE code = 'ID'; -UPDATE llx_c_pays SET code_iso = 'IRN' WHERE code = 'IR'; -UPDATE llx_c_pays SET code_iso = 'IRQ' WHERE code = 'IQ'; -UPDATE llx_c_pays SET code_iso = 'IRL' WHERE code = 'IE'; -UPDATE llx_c_pays SET code_iso = 'IMN' WHERE code = 'IM'; -UPDATE llx_c_pays SET code_iso = 'ISR' WHERE code = 'IL'; -UPDATE llx_c_pays SET code_iso = 'ITA' WHERE code = 'IT'; -UPDATE llx_c_pays SET code_iso = 'JAM' WHERE code = 'JM'; -UPDATE llx_c_pays SET code_iso = 'JPN' WHERE code = 'JP'; -UPDATE llx_c_pays SET code_iso = 'JEY' WHERE code = 'JE'; -UPDATE llx_c_pays SET code_iso = 'JOR' WHERE code = 'JO'; -UPDATE llx_c_pays SET code_iso = 'KAZ' WHERE code = 'KZ'; -UPDATE llx_c_pays SET code_iso = 'KEN' WHERE code = 'KE'; -UPDATE llx_c_pays SET code_iso = 'KIR' WHERE code = 'KI'; -UPDATE llx_c_pays SET code_iso = 'PRK' WHERE code = 'KP'; -UPDATE llx_c_pays SET code_iso = 'KOR' WHERE code = 'KR'; -UPDATE llx_c_pays SET code_iso = 'KWT' WHERE code = 'KW'; -UPDATE llx_c_pays SET code_iso = 'KGZ' WHERE code = 'KG'; -UPDATE llx_c_pays SET code_iso = 'LAO' WHERE code = 'LA'; -UPDATE llx_c_pays SET code_iso = 'LVA' WHERE code = 'LV'; -UPDATE llx_c_pays SET code_iso = 'LBN' WHERE code = 'LB'; -UPDATE llx_c_pays SET code_iso = 'LSO' WHERE code = 'LS'; -UPDATE llx_c_pays SET code_iso = 'LBR' WHERE code = 'LR'; -UPDATE llx_c_pays SET code_iso = 'LBY' WHERE code = 'LY'; -UPDATE llx_c_pays SET code_iso = 'LIE' WHERE code = 'LI'; -UPDATE llx_c_pays SET code_iso = 'LTU' WHERE code = 'LT'; -UPDATE llx_c_pays SET code_iso = 'LUX' WHERE code = 'LU'; -UPDATE llx_c_pays SET code_iso = 'MAC' WHERE code = 'MO'; -UPDATE llx_c_pays SET code_iso = 'MKD' WHERE code = 'MK'; -UPDATE llx_c_pays SET code_iso = 'MDG' WHERE code = 'MG'; -UPDATE llx_c_pays SET code_iso = 'MWI' WHERE code = 'MW'; -UPDATE llx_c_pays SET code_iso = 'MYS' WHERE code = 'MY'; -UPDATE llx_c_pays SET code_iso = 'MDV' WHERE code = 'MV'; -UPDATE llx_c_pays SET code_iso = 'MLI' WHERE code = 'ML'; -UPDATE llx_c_pays SET code_iso = 'MLT' WHERE code = 'MT'; -UPDATE llx_c_pays SET code_iso = 'MHL' WHERE code = 'MH'; -UPDATE llx_c_pays SET code_iso = 'MTQ' WHERE code = 'MQ'; -UPDATE llx_c_pays SET code_iso = 'MRT' WHERE code = 'MR'; -UPDATE llx_c_pays SET code_iso = 'MUS' WHERE code = 'MU'; -UPDATE llx_c_pays SET code_iso = 'MYT' WHERE code = 'YT'; -UPDATE llx_c_pays SET code_iso = 'MEX' WHERE code = 'MX'; -UPDATE llx_c_pays SET code_iso = 'FSM' WHERE code = 'FM'; -UPDATE llx_c_pays SET code_iso = 'MDA' WHERE code = 'MD'; -UPDATE llx_c_pays SET code_iso = 'MCO' WHERE code = 'MC'; -UPDATE llx_c_pays SET code_iso = 'MNG' WHERE code = 'MN'; -UPDATE llx_c_pays SET code_iso = 'MNE' WHERE code = 'ME'; -UPDATE llx_c_pays SET code_iso = 'MSR' WHERE code = 'MS'; -UPDATE llx_c_pays SET code_iso = 'MAR' WHERE code = 'MA'; -UPDATE llx_c_pays SET code_iso = 'MOZ' WHERE code = 'MZ'; -UPDATE llx_c_pays SET code_iso = 'MMR' WHERE code = 'MM'; -UPDATE llx_c_pays SET code_iso = 'NAM' WHERE code = 'NA'; -UPDATE llx_c_pays SET code_iso = 'NRU' WHERE code = 'NR'; -UPDATE llx_c_pays SET code_iso = 'NPL' WHERE code = 'NP'; -UPDATE llx_c_pays SET code_iso = 'NLD' WHERE code = 'NL'; -UPDATE llx_c_pays SET code_iso = 'NCL' WHERE code = 'NC'; -UPDATE llx_c_pays SET code_iso = 'NZL' WHERE code = 'NZ'; -UPDATE llx_c_pays SET code_iso = 'NIC' WHERE code = 'NI'; -UPDATE llx_c_pays SET code_iso = 'NER' WHERE code = 'NE'; -UPDATE llx_c_pays SET code_iso = 'NGA' WHERE code = 'NG'; -UPDATE llx_c_pays SET code_iso = 'NIU' WHERE code = 'NU'; -UPDATE llx_c_pays SET code_iso = 'NFK' WHERE code = 'NF'; -UPDATE llx_c_pays SET code_iso = 'MNP' WHERE code = 'MP'; -UPDATE llx_c_pays SET code_iso = 'NOR' WHERE code = 'NO'; -UPDATE llx_c_pays SET code_iso = 'OMN' WHERE code = 'OM'; -UPDATE llx_c_pays SET code_iso = 'PAK' WHERE code = 'PK'; -UPDATE llx_c_pays SET code_iso = 'PLW' WHERE code = 'PW'; -UPDATE llx_c_pays SET code_iso = 'PSE' WHERE code = 'PS'; -UPDATE llx_c_pays SET code_iso = 'PAN' WHERE code = 'PA'; -UPDATE llx_c_pays SET code_iso = 'PNG' WHERE code = 'PG'; -UPDATE llx_c_pays SET code_iso = 'PRY' WHERE code = 'PY'; -UPDATE llx_c_pays SET code_iso = 'PER' WHERE code = 'PE'; -UPDATE llx_c_pays SET code_iso = 'PHL' WHERE code = 'PH'; -UPDATE llx_c_pays SET code_iso = 'PCN' WHERE code = 'PN'; -UPDATE llx_c_pays SET code_iso = 'POL' WHERE code = 'PL'; -UPDATE llx_c_pays SET code_iso = 'PRT' WHERE code = 'PT'; -UPDATE llx_c_pays SET code_iso = 'PRI' WHERE code = 'PR'; -UPDATE llx_c_pays SET code_iso = 'QAT' WHERE code = 'QA'; -UPDATE llx_c_pays SET code_iso = 'REU' WHERE code = 'RE'; -UPDATE llx_c_pays SET code_iso = 'ROU' WHERE code = 'RO'; -UPDATE llx_c_pays SET code_iso = 'RUS' WHERE code = 'RU'; -UPDATE llx_c_pays SET code_iso = 'RWA' WHERE code = 'RW'; -UPDATE llx_c_pays SET code_iso = 'BLM' WHERE code = 'BL'; -UPDATE llx_c_pays SET code_iso = 'SHN' WHERE code = 'SH'; -UPDATE llx_c_pays SET code_iso = 'KNA' WHERE code = 'KN'; -UPDATE llx_c_pays SET code_iso = 'LCA' WHERE code = 'LC'; -UPDATE llx_c_pays SET code_iso = 'MAF' WHERE code = 'MF'; -UPDATE llx_c_pays SET code_iso = 'SPM' WHERE code = 'PM'; -UPDATE llx_c_pays SET code_iso = 'VCT' WHERE code = 'VC'; -UPDATE llx_c_pays SET code_iso = 'WSM' WHERE code = 'WS'; -UPDATE llx_c_pays SET code_iso = 'SMR' WHERE code = 'SM'; -UPDATE llx_c_pays SET code_iso = 'STP' WHERE code = 'ST'; -UPDATE llx_c_pays SET code_iso = 'SAU' WHERE code = 'SA'; -UPDATE llx_c_pays SET code_iso = 'SEN' WHERE code = 'SN'; -UPDATE llx_c_pays SET code_iso = 'SRB' WHERE code = 'RS'; -UPDATE llx_c_pays SET code_iso = 'SYC' WHERE code = 'SC'; -UPDATE llx_c_pays SET code_iso = 'SLE' WHERE code = 'SL'; -UPDATE llx_c_pays SET code_iso = 'SGP' WHERE code = 'SG'; -UPDATE llx_c_pays SET code_iso = 'SXM' WHERE code = 'SX'; -UPDATE llx_c_pays SET code_iso = 'SVK' WHERE code = 'SK'; -UPDATE llx_c_pays SET code_iso = 'SVN' WHERE code = 'SI'; -UPDATE llx_c_pays SET code_iso = 'SLB' WHERE code = 'SB'; -UPDATE llx_c_pays SET code_iso = 'SOM' WHERE code = 'SO'; -UPDATE llx_c_pays SET code_iso = 'ZAF' WHERE code = 'ZA'; -UPDATE llx_c_pays SET code_iso = 'SGS' WHERE code = 'GS'; -UPDATE llx_c_pays SET code_iso = 'SSD' WHERE code = 'SS'; -UPDATE llx_c_pays SET code_iso = 'ESP' WHERE code = 'ES'; -UPDATE llx_c_pays SET code_iso = 'LKA' WHERE code = 'LK'; -UPDATE llx_c_pays SET code_iso = 'SDN' WHERE code = 'SD'; -UPDATE llx_c_pays SET code_iso = 'SUR' WHERE code = 'SR'; -UPDATE llx_c_pays SET code_iso = 'SJM' WHERE code = 'SJ'; -UPDATE llx_c_pays SET code_iso = 'SWZ' WHERE code = 'SZ'; -UPDATE llx_c_pays SET code_iso = 'SWE' WHERE code = 'SE'; -UPDATE llx_c_pays SET code_iso = 'CHE' WHERE code = 'CH'; -UPDATE llx_c_pays SET code_iso = 'SYR' WHERE code = 'SY'; -UPDATE llx_c_pays SET code_iso = 'TWN' WHERE code = 'TW'; -UPDATE llx_c_pays SET code_iso = 'TJK' WHERE code = 'TJ'; -UPDATE llx_c_pays SET code_iso = 'TZA' WHERE code = 'TZ'; -UPDATE llx_c_pays SET code_iso = 'THA' WHERE code = 'TH'; -UPDATE llx_c_pays SET code_iso = 'TLS' WHERE code = 'TL'; -UPDATE llx_c_pays SET code_iso = 'TGO' WHERE code = 'TG'; -UPDATE llx_c_pays SET code_iso = 'TKL' WHERE code = 'TK'; -UPDATE llx_c_pays SET code_iso = 'TON' WHERE code = 'TO'; -UPDATE llx_c_pays SET code_iso = 'TTO' WHERE code = 'TT'; -UPDATE llx_c_pays SET code_iso = 'TUN' WHERE code = 'TN'; -UPDATE llx_c_pays SET code_iso = 'TUR' WHERE code = 'TR'; -UPDATE llx_c_pays SET code_iso = 'TKM' WHERE code = 'TM'; -UPDATE llx_c_pays SET code_iso = 'TCA' WHERE code = 'TC'; -UPDATE llx_c_pays SET code_iso = 'TUV' WHERE code = 'TV'; -UPDATE llx_c_pays SET code_iso = 'UGA' WHERE code = 'UG'; -UPDATE llx_c_pays SET code_iso = 'UKR' WHERE code = 'UA'; -UPDATE llx_c_pays SET code_iso = 'ARE' WHERE code = 'AE'; -UPDATE llx_c_pays SET code_iso = 'GBR' WHERE code = 'GB'; -UPDATE llx_c_pays SET code_iso = 'USA' WHERE code = 'US'; -UPDATE llx_c_pays SET code_iso = 'UMI' WHERE code = 'UM'; -UPDATE llx_c_pays SET code_iso = 'URY' WHERE code = 'UY'; -UPDATE llx_c_pays SET code_iso = 'UZB' WHERE code = 'UZ'; -UPDATE llx_c_pays SET code_iso = 'VUT' WHERE code = 'VU'; -UPDATE llx_c_pays SET code_iso = 'VEN' WHERE code = 'VE'; -UPDATE llx_c_pays SET code_iso = 'VNM' WHERE code = 'VN'; -UPDATE llx_c_pays SET code_iso = 'VGB' WHERE code = 'VG'; -UPDATE llx_c_pays SET code_iso = 'VIR' WHERE code = 'VI'; -UPDATE llx_c_pays SET code_iso = 'WLF' WHERE code = 'WF'; -UPDATE llx_c_pays SET code_iso = 'ESH' WHERE code = 'EH'; -UPDATE llx_c_pays SET code_iso = 'YEM' WHERE code = 'YE'; -UPDATE llx_c_pays SET code_iso = 'ZMB' WHERE code = 'ZM'; -UPDATE llx_c_pays SET code_iso = 'ZWE' WHERE code = 'ZW'; - +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (0,'',NULL,'-',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (1,'FR','FRA','France',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (2,'BE','BEL','Belgium',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (3,'IT','ITA','Italy',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (4,'ES','ESP','Spain',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (5,'DE','DEU','Germany',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (6,'CH','CHE','Switzerland',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (7,'GB','GBR','United Kingdom',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (8,'IE','IRL','Irland',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (9,'CN','CHN','China',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (10,'TN','TUN','Tunisia',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (11,'US','USA','United States',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (12,'MA','MAR','Maroc',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (13,'DZ','DZA','Algeria',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (14,'CA','CAN','Canada',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (15,'TG','TGO','Togo',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (16,'GA','GAB','Gabon',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (17,'NL','NLD','Nerderland',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (18,'HU','HUN','Hongrie',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (19,'RU','RUS','Russia',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (20,'SE','SWE','Sweden',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (21,'CI','CIV','Côte d''Ivoire',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (22,'SN','SEN','Senegal',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (23,'AR','ARG','Argentine',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (24,'CM','CMR','Cameroun',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (25,'PT','PRT','Portugal',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (26,'SA','SAU','Saudi Arabia',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (27,'MC','MCO','Monaco',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (28,'AU','AUS','Australia',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (29,'SG','SGP','Singapour',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (30,'AF','AFG','Afghanistan',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (31,'AX','ALA','Iles Aland',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (32,'AL','ALB','Albanie',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (33,'AS','ASM','Samoa américaines',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (34,'AD','AND','Andorre',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (35,'AO','AGO','Angola',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (36,'AI','AIA','Anguilla',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (37,'AQ','ATA','Antarctique',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (38,'AG','ATG','Antigua-et-Barbuda',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (39,'AM','ARM','Arménie',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (40,'AW','ABW','Aruba',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (41,'AT','AUT','Autriche',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (42,'AZ','AZE','Azerbaïdjan',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (43,'BS','BHS','Bahamas',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (44,'BH','BHR','Bahreïn',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (45,'BD','BGD','Bangladesh',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (46,'BB','BRB','Barbade',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (47,'BY','BLR','Biélorussie',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (48,'BZ','BLZ','Belize',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (49,'BJ','BEN','Bénin',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (50,'BM','BMU','Bermudes',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (51,'BT','BTN','Bhoutan',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (52,'BO','BOL','Bolivie',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (53,'BA','BIH','Bosnie-Herzégovine',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (54,'BW','BWA','Botswana',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (55,'BV','BVT','Ile Bouvet',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (56,'BR','BRA','Brazil',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (57,'IO','IOT','Territoire britannique de l''Océan Indien',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (58,'BN','BRN','Brunei',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (59,'BG','BGR','Bulgarie',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (60,'BF','BFA','Burkina Faso',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (61,'BI','BDI','Burundi',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (62,'KH','KHM','Cambodge',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (63,'CV','CPV','Cap-Vert',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (64,'KY','CYM','Iles Cayman',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (65,'CF','CAF','République centrafricaine',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (66,'TD','TCD','Tchad',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (67,'CL','CHL','Chili',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (68,'CX','CXR','Ile Christmas',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (69,'CC','CCK','Iles des Cocos (Keeling)',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (70,'CO','COL','Colombie',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (71,'KM','COM','Comores',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (72,'CG','COG','Congo',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (73,'CD','COD','République démocratique du Congo',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (74,'CK','COK','Iles Cook',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (75,'CR','CRI','Costa Rica',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (76,'HR','HRV','Croatie',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (77,'CU','CUB','Cuba',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (78,'CY','CYP','Chypre',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (79,'CZ','CZE','République Tchèque',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (80,'DK','DNK','Danemark',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (81,'DJ','DJI','Djibouti',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (82,'DM','DMA','Dominique',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (83,'DO','DOM','République Dominicaine',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (84,'EC','ECU','Equateur',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (85,'EG','EGY','Egypte',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (86,'SV','SLV','Salvador',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (87,'GQ','GNQ','Guinée Equatoriale',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (88,'ER','ERI','Erythrée',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (89,'EE','EST','Estonia',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (90,'ET','ETH','Ethiopie',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (91,'FK','FLK','Iles Falkland',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (92,'FO','FRO','Iles Féroé',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (93,'FJ','FJI','Iles Fidji',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (94,'FI','FIN','Finlande',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (95,'GF','GUF','Guyane française',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (96,'PF','PYF','Polynésie française',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (97,'TF','ATF','Terres australes françaises',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (98,'GM','GMB','Gambie',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (99,'GE','GEO','Georgia',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (100,'GH','GHA','Ghana',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (101,'GI','GIB','Gibraltar',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (102,'GR','GRC','Greece',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (103,'GL','GRL','Groenland',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (104,'GD','GRD','Grenade',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (106,'GU','GUM','Guam',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (107,'GT','GTM','Guatemala',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (108,'GN','GIN','Guinea',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (109,'GW','GNB','Guinea-Bissao',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (111,'HT','HTI','Haiti',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (112,'HM','HMD','Iles Heard et McDonald',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (113,'VA','VAT','Saint-Siège (Vatican)',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (114,'HN','HND','Honduras',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (115,'HK','HKG','Hong Kong',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (116,'IS','ISL','Islande',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (117,'IN','IND','India',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (118,'ID','IDN','Indonésie',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (119,'IR','IRN','Iran',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (120,'IQ','IRQ','Iraq',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (121,'IL','ISR','Israel',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (122,'JM','JAM','Jamaïque',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (123,'JP','JPN','Japon',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (124,'JO','JOR','Jordanie',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (125,'KZ','KAZ','Kazakhstan',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (126,'KE','KEN','Kenya',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (127,'KI','KIR','Kiribati',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (128,'KP','PRK','North Corea',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (129,'KR','KOR','South Corea',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (130,'KW','KWT','Koweït',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (131,'KG','KGZ','Kirghizistan',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (132,'LA','LAO','Laos',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (133,'LV','LVA','Lettonie',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (134,'LB','LBN','Liban',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (135,'LS','LSO','Lesotho',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (136,'LR','LBR','Liberia',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (137,'LY','LBY','Libye',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (138,'LI','LIE','Liechtenstein',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (139,'LT','LTU','Lituanie',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (140,'LU','LUX','Luxembourg',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (141,'MO','MAC','Macao',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (142,'MK','MKD','ex-République yougoslave de Macédoine',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (143,'MG','MDG','Madagascar',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (144,'MW','MWI','Malawi',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (145,'MY','MYS','Malaisie',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (146,'MV','MDV','Maldives',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (147,'ML','MLI','Mali',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (148,'MT','MLT','Malte',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (149,'MH','MHL','Iles Marshall',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (151,'MR','MRT','Mauritanie',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (152,'MU','MUS','Maurice',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (153,'YT','MYT','Mayotte',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (154,'MX','MEX','Mexique',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (155,'FM','FSM','Micronésie',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (156,'MD','MDA','Moldavie',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (157,'MN','MNG','Mongolie',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (158,'MS','MSR','Monserrat',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (159,'MZ','MOZ','Mozambique',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (160,'MM','MMR','Birmanie (Myanmar)',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (161,'NA','NAM','Namibie',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (162,'NR','NRU','Nauru',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (163,'NP','NPL','Népal',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (164,'AN',NULL,'Antilles néerlandaises',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (165,'NC','NCL','Nouvelle-Calédonie',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (166,'NZ','NZL','Nouvelle-Zélande',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (167,'NI','NIC','Nicaragua',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (168,'NE','NER','Niger',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (169,'NG','NGA','Nigeria',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (170,'NU','NIU','Nioué',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (171,'NF','NFK','Ile Norfolk',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (172,'MP','MNP','Mariannes du Nord',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (173,'NO','NOR','Norvège',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (174,'OM','OMN','Oman',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (175,'PK','PAK','Pakistan',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (176,'PW','PLW','Palaos',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (177,'PS','PSE','Territoire Palestinien Occupé',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (178,'PA','PAN','Panama',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (179,'PG','PNG','Papouasie-Nouvelle-Guinée',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (180,'PY','PRY','Paraguay',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (181,'PE','PER','Peru',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (182,'PH','PHL','Philippines',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (183,'PN','PCN','Iles Pitcairn',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (184,'PL','POL','Pologne',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (185,'PR','PRI','Porto Rico',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (186,'QA','QAT','Qatar',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (188,'RO','ROU','Roumanie',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (189,'RW','RWA','Rwanda',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (190,'SH','SHN','Sainte-Hélène',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (191,'KN','KNA','Saint-Christophe-et-Niévès',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (192,'LC','LCA','Sainte-Lucie',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (193,'PM','SPM','Saint-Pierre-et-Miquelon',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (194,'VC','VCT','Saint-Vincent-et-les-Grenadines',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (195,'WS','WSM','Samoa',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (196,'SM','SMR','Saint-Marin',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (197,'ST','STP','Sao Tomé-et-Principe',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (198,'RS','SRB','Serbie',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (199,'SC','SYC','Seychelles',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (200,'SL','SLE','Sierra Leone',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (201,'SK','SVK','Slovaquie',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (202,'SI','SVN','Slovénie',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (203,'SB','SLB','Iles Salomon',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (204,'SO','SOM','Somalie',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (205,'ZA','ZAF','Afrique du Sud',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (206,'GS','SGS','Iles Géorgie du Sud et Sandwich du Sud',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (207,'LK','LKA','Sri Lanka',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (208,'SD','SDN','Soudan',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (209,'SR','SUR','Suriname',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (210,'SJ','SJM','Iles Svalbard et Jan Mayen',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (211,'SZ','SWZ','Swaziland',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (212,'SY','SYR','Syrie',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (213,'TW','TWN','Taïwan',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (214,'TJ','TJK','Tadjikistan',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (215,'TZ','TZA','Tanzanie',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (216,'TH','THA','Thaïlande',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (217,'TL','TLS','Timor Oriental',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (218,'TK','TKL','Tokélaou',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (219,'TO','TON','Tonga',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (220,'TT','TTO','Trinité-et-Tobago',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (221,'TR','TUR','Turquie',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (222,'TM','TKM','Turkménistan',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (223,'TC','TCA','Iles Turks-et-Caicos',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (224,'TV','TUV','Tuvalu',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (225,'UG','UGA','Ouganda',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (226,'UA','UKR','Ukraine',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (227,'AE','ARE','Émirats arabes unis',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (228,'UM','UMI','Iles mineures éloignées des États-Unis',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (229,'UY','URY','Uruguay',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (230,'UZ','UZB','Ouzbékistan',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (231,'VU','VUT','Vanuatu',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (232,'VE','VEN','Vénézuela',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (233,'VN','VNM','Viêt Nam',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (234,'VG','VGB','Iles Vierges britanniques',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (235,'VI','VIR','Iles Vierges américaines',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (236,'WF','WLF','Wallis-et-Futuna',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (237,'EH','ESH','Sahara occidental',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (238,'YE','YEM','Yémen',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (239,'ZM','ZMB','Zambie',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (240,'ZW','ZWE','Zimbabwe',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (241,'GG','GGY','Guernesey',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (242,'IM','IMN','Ile de Man',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (243,'JE','JEY','Jersey',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (244,'ME','MNE','Monténégro',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (245,'BL','BLM','Saint-Barthélemy',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (246,'MF','MAF','Saint-Martin',1); +INSERT INTO llx_c_pays (rowid,code,code_iso,libelle,active) VALUES (247,'BU', null, 'Burundi',1); From 387d36e4b06a2bf5a57da6d8f3bbf5fde8d3d191 Mon Sep 17 00:00:00 2001 From: frederic34 Date: Wed, 9 Jul 2014 18:00:21 +0200 Subject: [PATCH 137/258] Ste bank account for supplier order --- htdocs/comm/propal.php | 2 +- htdocs/commande/fiche.php | 2 +- .../class/fournisseur.commande.class.php | 5 ++++ htdocs/fourn/commande/fiche.php | 28 +++++++++++++++++++ 4 files changed, 35 insertions(+), 2 deletions(-) diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php index 7ce92a5b569..c2183a2b6e1 100644 --- a/htdocs/comm/propal.php +++ b/htdocs/comm/propal.php @@ -1982,7 +1982,7 @@ if ($action == 'create') { print ''; print '
'; print $langs->trans('BankAccount'); print ''; - if (($action != 'editbankaccount') && $user->rights->propal->creer && ! empty($object->brouillon)) + if ($action != 'editbankaccount' && $user->rights->propal->creer) print 'id.'">'.img_edit($langs->trans('SetBankAccount'),1).'
'; print ''; diff --git a/htdocs/commande/fiche.php b/htdocs/commande/fiche.php index 19948e3c1b7..7bf3705c07d 100644 --- a/htdocs/commande/fiche.php +++ b/htdocs/commande/fiche.php @@ -2138,7 +2138,7 @@ if ($action == 'create' && $user->rights->commande->creer) { print ''; print '
'; print $langs->trans('BankAccount'); print ''; - if (($action != 'editbankaccount') && $user->rights->commande->creer && ! empty($object->brouillon)) + if ($action != 'editbankaccount' && $user->rights->commande->creer) print 'id.'">'.img_edit($langs->trans('SetBankAccount'),1).'
'; print ''; diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index b65fe31ceec..19432c09b78 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -74,6 +74,7 @@ class CommandeFournisseur extends CommonOrder var $fk_project; var $cond_reglement_id; var $cond_reglement_code; + var $fk_account; var $mode_reglement_id; var $mode_reglement_code; var $user_author_id; @@ -126,6 +127,7 @@ class CommandeFournisseur extends CommonOrder $sql.= " c.date_creation, c.date_valid, c.date_approve,"; $sql.= " c.fk_user_author, c.fk_user_valid, c.fk_user_approve,"; $sql.= " c.date_commande as date_commande, c.date_livraison as date_livraison, c.fk_cond_reglement, c.fk_mode_reglement, c.fk_projet as fk_project, c.remise_percent, c.source, c.fk_input_method,"; + $sql.= " c.fk_account,"; $sql.= " c.note_private, c.note_public, c.model_pdf, c.extraparams,"; $sql.= " cm.libelle as methode_commande,"; $sql.= " cr.code as cond_reglement_code, cr.libelle as cond_reglement_libelle,"; @@ -180,6 +182,7 @@ class CommandeFournisseur extends CommonOrder $this->cond_reglement_code = $obj->cond_reglement_code; $this->cond_reglement = $obj->cond_reglement_libelle; $this->cond_reglement_doc = $obj->cond_reglement_libelle; + $this->fk_account = $obj->fk_account; $this->mode_reglement_id = $obj->fk_mode_reglement; $this->mode_reglement_code = $obj->mode_reglement_code; $this->mode_reglement = $obj->mode_reglement_libelle; @@ -876,6 +879,7 @@ class CommandeFournisseur extends CommonOrder $sql.= ", model_pdf"; $sql.= ", fk_mode_reglement"; $sql.= ", fk_cond_reglement"; + $sql.= ", fk_account"; $sql.= ") "; $sql.= " VALUES ("; $sql.= "''"; @@ -892,6 +896,7 @@ class CommandeFournisseur extends CommonOrder $sql.= ", '".$conf->global->COMMANDE_SUPPLIER_ADDON_PDF."'"; $sql.= ", ".($this->mode_reglement_id > 0 ? $this->mode_reglement_id : 'null'); $sql.= ", ".($this->cond_reglement_id > 0 ? $this->cond_reglement_id : 'null'); + $sql.= ", ".($this->fk_account>0?$this->fk_account:'NULL'); $sql.= ")"; dol_syslog(get_class($this)."::create", LOG_DEBUG); diff --git a/htdocs/fourn/commande/fiche.php b/htdocs/fourn/commande/fiche.php index 05e2fe8822f..dbac3c4230d 100644 --- a/htdocs/fourn/commande/fiche.php +++ b/htdocs/fourn/commande/fiche.php @@ -125,6 +125,11 @@ else if ($action == 'setmode' && $user->rights->fournisseur->commande->creer) $result = $object->setPaymentMethods(GETPOST('mode_reglement_id','int')); } +// bank account +else if ($action == 'setbankaccount' && $user->rights->fournisseur->commande->creer) { + $result=$object->setBankAccount(GETPOST('fk_account', 'int')); + } + // date de livraison if ($action == 'setdate_livraison' && $user->rights->fournisseur->commande->creer) { @@ -776,6 +781,7 @@ else if ($action == 'add' && $user->rights->fournisseur->commande->creer) $object->socid = $socid; $object->cond_reglement_id = GETPOST('cond_reglement_id'); $object->mode_reglement_id = GETPOST('mode_reglement_id'); + $object->fk_account = GETPOST('fk_account', 'int'); $object->note_private = GETPOST('note_private'); $object->note_public = GETPOST('note_public'); @@ -1116,6 +1122,11 @@ if ($action=="create") $form->select_types_paiements(isset($_POST['mode_reglement_id'])?$_POST['mode_reglement_id']:$mode_reglement_id,'mode_reglement_id'); print ''; + // Bank Account + print '' . $langs->trans('BankAccount') . ''; + $form->select_comptes($fk_account, 'fk_account', 0, '', 1); + print ''; + print ''.$langs->trans('NotePublic').''; print ''; $doleditor = new DolEditor('note_public', GETPOST('note_public'), '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, 70); @@ -1381,6 +1392,23 @@ elseif (! empty($object->id)) } print ''; + // Bank Account + print ''; + print ''; + print '
'; + print $langs->trans('BankAccount'); + print ''; + if ($action != 'editbankaccount' && $user->rights->fournisseur->commande->creer) + print 'id.'">'.img_edit($langs->trans('SetBankAccount'),1).'
'; + print ''; + if ($action == 'editbankaccount') { + $form->formSelectAccount($_SERVER['PHP_SELF'].'?id='.$object->id, $object->fk_account, 'fk_account', 1); + } else { + $form->formSelectAccount($_SERVER['PHP_SELF'].'?id='.$object->id, $object->fk_account, 'none'); + } + print ''; + print ''; + // Delivery date planed print ''; print ''; + // Bank Account + print ''; + // Project if (! empty($conf->projet->enabled)) { @@ -1776,6 +1788,23 @@ else } print ''; + // Bank Account + print '"; + print ''; + // Status $alreadypaid=$object->getSommePaiement(); print ''; @@ -2131,7 +2160,7 @@ else // Make payments if ($action != 'edit' && $object->statut == 1 && $object->paye == 0 && $user->societe_id == 0) { - print ''.$langs->trans('DoPayment').''; // must use facid because id is for payment id not invoice + print ''.$langs->trans('DoPayment').''; // must use facid because id is for payment id not invoice } // Classify paid From ab57c236bea95b6b93e6b2630bdf5e20672b40a2 Mon Sep 17 00:00:00 2001 From: fmarcet Date: Thu, 10 Jul 2014 12:06:09 +0200 Subject: [PATCH 139/258] New: Can have half day holiday New: Add Spanish holidays Fix: Holiday log shows nothing --- htdocs/core/lib/date.lib.php | 43 ++++++++++++++++++++++++++ htdocs/holiday/class/holiday.class.php | 4 +-- htdocs/holiday/fiche.php | 7 +++-- 3 files changed, 49 insertions(+), 5 deletions(-) diff --git a/htdocs/core/lib/date.lib.php b/htdocs/core/lib/date.lib.php index 4201cde9e9d..3c37a79b7dd 100644 --- a/htdocs/core/lib/date.lib.php +++ b/htdocs/core/lib/date.lib.php @@ -659,6 +659,49 @@ function num_public_holiday($timestampStart, $timestampEnd, $countrycode='FR') if($jour_semaine == 0 || $jour_semaine == 6) $ferie=true; //Samedi (6) et dimanche (0) } + + if ($countrycode == 'ES') + { + $countryfound=1; + + // Definition des dates feriees fixes + if($jour == 1 && $mois == 1) $ferie=true; // Año nuevo + if($jour == 6 && $mois == 1) $ferie=true; // Día Reyes + if($jour == 1 && $mois == 5) $ferie=true; // 1 Mayo + if($jour == 15 && $mois == 8) $ferie=true; // 15 Agosto + if($jour == 12 && $mois == 10) $ferie=true; // Día Hispanidad + if($jour == 1 && $mois == 11) $ferie=true; // 1 noviembre + if($jour == 6 && $mois == 12) $ferie=true; // Constitución + if($jour == 8 && $mois == 12) $ferie=true; // Inmaculada + if($jour == 25 && $mois == 12) $ferie=true; // 25 diciembre + + // Calcul día de Pascua + $date_paques = easter_date($annee); + $jour_paques = date("d", $date_paques); + $mois_paques = date("m", $date_paques); + if($jour_paques == $jour && $mois_paques == $mois) $ferie=true; + // Paques + + // Viernes Santo + $date_viernes = mktime( + date("H", $date_paques), + date("i", $date_paques), + date("s", $date_paques), + date("m", $date_paques), + date("d", $date_paques) -2, + date("Y", $date_paques) + ); + $jour_viernes = date("d", $date_viernes); + $mois_viernes = date("m", $date_viernes); + if($jour_viernes == $jour && $mois_viernes == $mois) $ferie=true; + //Viernes Santo + + // Calul des samedis et dimanches + $jour_julien = unixtojd($timestampStart); + $jour_semaine = jddayofweek($jour_julien, 0); + if($jour_semaine == 0 || $jour_semaine == 6) $ferie=true; + //Samedi (6) et dimanche (0) + } // Cas pays non defini if (! $countryfound) diff --git a/htdocs/holiday/class/holiday.class.php b/htdocs/holiday/class/holiday.class.php index 8ff312202f3..0e39f591bdd 100644 --- a/htdocs/holiday/class/holiday.class.php +++ b/htdocs/holiday/class/holiday.class.php @@ -1670,12 +1670,12 @@ class Holiday extends CommonObject // Filtrage de séléction if(!empty($filter)) { - $sql.= $filter; + $sql.= " ".$filter; } // Ordre d'affichage if(!empty($order)) { - $sql.= $order; + $sql.= " ".$order; } dol_syslog(get_class($this)."::fetchLog", LOG_DEBUG); diff --git a/htdocs/holiday/fiche.php b/htdocs/holiday/fiche.php index d66d1c8cfbd..93b426b5ad3 100644 --- a/htdocs/holiday/fiche.php +++ b/htdocs/holiday/fiche.php @@ -3,6 +3,7 @@ * Copyright (C) 2012-2013 Laurent Destailleur * Copyright (C) 2012 Regis Houssin * Copyright (C) 2013 Juanjo Menent + * Copyright (C) 2014 Ferran Marcet * * 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 @@ -111,7 +112,7 @@ if ($action == 'create') // Si aucun jours ouvrés dans la demande $nbopenedday=num_open_day($date_debut_gmt, $date_fin_gmt, 0, 1, $halfday); - if($nbopenedday < 1) + if($nbopenedday < 0.5) { header('Location: fiche.php?action=request&error=DureeHoliday'); exit; @@ -208,7 +209,7 @@ if ($action == 'update') // Si pas de jours ouvrés dans la demande $nbopenedday=num_open_day($date_debut_gmt, $date_fin_gmt, 0, 1, $halfday); - if ($nbopenedday < 1) + if ($nbopenedday < 0.5) { header('Location: fiche.php?id='.$_POST['holiday_id'].'&action=edit&error=DureeHoliday'); exit; @@ -398,7 +399,7 @@ if($action == 'confirm_valid') if ($verif > 0) { // Calculcate number of days consummed - $nbopenedday=num_open_day($cp->date_debut_gmt,$cp->date_fin_gmt,0,1); + $nbopenedday=num_open_day($cp->date_debut_gmt,$cp->date_fin_gmt,0,1,$cp->halfday); $soldeActuel = $cp->getCpforUser($cp->fk_user); $newSolde = $soldeActuel - ($nbopenedday * $cp->getConfCP('nbHolidayDeducted')); From d476ca4a682cdecc469a380f0d676cc2527ee987 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Doursenaud?= Date: Thu, 10 Jul 2014 15:01:37 +0200 Subject: [PATCH 140/258] Support gigaoctets of session memory --- htdocs/install/check.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/install/check.php b/htdocs/install/check.php index a3d58458d43..063fefd62e0 100644 --- a/htdocs/install/check.php +++ b/htdocs/install/check.php @@ -152,6 +152,7 @@ if ($memmaxorig != '') preg_match('/([0-9]+)([a-zA-Z]*)/i',$memmax,$reg); if ($reg[2]) { + if (strtoupper($reg[2]) == 'G') $memmax=$reg[1]*1024*1024*1024; if (strtoupper($reg[2]) == 'M') $memmax=$reg[1]*1024*1024; if (strtoupper($reg[2]) == 'K') $memmax=$reg[1]*1024; } From 4a57a2adcd37660c079e768751b0d6e6ae6d07d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Doursenaud?= Date: Thu, 10 Jul 2014 16:34:19 +0200 Subject: [PATCH 141/258] Added HTML5 autofocus attribute to login form --- htdocs/core/tpl/login.tpl.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/tpl/login.tpl.php b/htdocs/core/tpl/login.tpl.php index bb67e863667..f77669a2726 100644 --- a/htdocs/core/tpl/login.tpl.php +++ b/htdocs/core/tpl/login.tpl.php @@ -77,7 +77,7 @@ $(document).ready(function () { From b206ceea9e101205fed673eab4132a99c7fcc4a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Doursenaud?= Date: Thu, 10 Jul 2014 16:46:10 +0200 Subject: [PATCH 142/258] Added label for captcha --- htdocs/core/tpl/login.tpl.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/htdocs/core/tpl/login.tpl.php b/htdocs/core/tpl/login.tpl.php index f77669a2726..efd0b46d6b4 100644 --- a/htdocs/core/tpl/login.tpl.php +++ b/htdocs/core/tpl/login.tpl.php @@ -96,9 +96,12 @@ if (! empty($hookmanager->resArray['options'])) { } } ?> - + - + '; print ''; - print ''; + print ':'; + print ''; print ''; print "
'; From 742bdcb7155d46110b55155fb227e0646726c851 Mon Sep 17 00:00:00 2001 From: frederic34 Date: Wed, 9 Jul 2014 18:44:20 +0200 Subject: [PATCH 138/258] Set bank account for supplier invoices --- htdocs/compta/bank/treso.php | 3 +- .../fourn/class/fournisseur.facture.class.php | 7 ++++- htdocs/fourn/facture/fiche.php | 31 ++++++++++++++++++- 3 files changed, 38 insertions(+), 3 deletions(-) diff --git a/htdocs/compta/bank/treso.php b/htdocs/compta/bank/treso.php index 223e5e9d534..8ae2974b33f 100644 --- a/htdocs/compta/bank/treso.php +++ b/htdocs/compta/bank/treso.php @@ -171,7 +171,8 @@ if ($_REQUEST["account"] || $_REQUEST["ref"]) $sql2.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON ff.fk_soc = s.rowid"; $sql2.= " WHERE ff.entity = ".$conf->entity; $sql2.= " AND ff.paye = 0 AND fk_statut = 1"; // Not paid - $sql2.= " ORDER BY dlr ASC"; + $sql2.= " AND (ff.fk_account IN (0, ".$acct->id.") OR ff.fk_account IS NULL)"; // Id bank account of supplier invoice + $sql2.= " ORDER BY dlr ASC"; // Social contributions $sql3= " SELECT 'social_contribution' as family, cs.rowid as objid, cs.libelle as ref, (-1*cs.amount) as total_ttc, ccs.libelle as type, cs.date_ech as dlr"; diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php index cb0a0abd17a..b01e3ee7891 100644 --- a/htdocs/fourn/class/fournisseur.facture.class.php +++ b/htdocs/fourn/class/fournisseur.facture.class.php @@ -79,6 +79,7 @@ class FactureFournisseur extends CommonInvoice var $propalid; var $cond_reglement_id; var $cond_reglement_code; + var $fk_account; var $mode_reglement_id; var $mode_reglement_code; @@ -174,6 +175,7 @@ class FactureFournisseur extends CommonInvoice $sql.= ", fk_projet"; $sql.= ", fk_cond_reglement"; $sql.= ", fk_mode_reglement"; + $sql.= ", fk_account"; $sql.= ", note_private"; $sql.= ", note_public"; $sql.= ", fk_user_author"; @@ -190,6 +192,7 @@ class FactureFournisseur extends CommonInvoice $sql.= ", ".(isset($this->fk_project)?$this->fk_project:"null"); $sql.= ", ".(isset($this->cond_reglement_id)?$this->cond_reglement_id:"null"); $sql.= ", ".(isset($this->mode_reglement_id)?$this->mode_reglement_id:"null"); + $sql.= ", ".($this->fk_account>0?$this->fk_account:'NULL'); $sql.= ", '".$this->db->escape($this->note_private)."'"; $sql.= ", '".$this->db->escape($this->note_public)."'"; $sql.= ", ".$user->id.","; @@ -333,7 +336,8 @@ class FactureFournisseur extends CommonInvoice $sql.= " t.fk_facture_source,"; $sql.= " t.fk_projet,"; $sql.= " t.fk_cond_reglement,"; - $sql.= " t.fk_mode_reglement,"; + $sql.= " t.fk_account,"; + $sql.= " t.fk_mode_reglement,"; $sql.= " t.date_lim_reglement,"; $sql.= " t.note_private,"; $sql.= " t.note_public,"; @@ -394,6 +398,7 @@ class FactureFournisseur extends CommonInvoice $this->cond_reglement_code = $obj->cond_reglement_code; $this->cond_reglement = $obj->cond_reglement_libelle; $this->cond_reglement_doc = $obj->cond_reglement_libelle; + $this->fk_account = $obj->fk_account; $this->mode_reglement_id = $obj->fk_mode_reglement; $this->mode_reglement_code = $obj->mode_reglement_code; $this->mode_reglement = $obj->mode_reglement_libelle; diff --git a/htdocs/fourn/facture/fiche.php b/htdocs/fourn/facture/fiche.php index 9cd11bd58bf..4e1c3246eff 100644 --- a/htdocs/fourn/facture/fiche.php +++ b/htdocs/fourn/facture/fiche.php @@ -215,6 +215,10 @@ else if ($action == 'setmode' && $user->rights->fournisseur->commande->creer) $result = $object->setPaymentMethods(GETPOST('mode_reglement_id','int')); } +// bank account +else if ($action == 'setbankaccount' && $user->rights->fournisseur->facture->creer) { + $result=$object->setBankAccount(GETPOST('fk_account', 'int')); +} // Set label elseif ($action == 'setlabel' && $user->rights->fournisseur->facture->creer) @@ -305,6 +309,7 @@ elseif ($action == 'add' && $user->rights->fournisseur->facture->creer) $object->note_private = GETPOST('note_private'); $object->cond_reglement_id = GETPOST('cond_reglement_id'); $object->mode_reglement_id = GETPOST('mode_reglement_id'); + $object->fk_account = GETPOST('fk_account', 'int'); $object->fk_project = ($tmpproject > 0) ? $tmpproject : null; // Auto calculation of date due if not filled by user @@ -1164,6 +1169,7 @@ if ($action == 'create') $soc = $objectsrc->thirdparty; $cond_reglement_id = (!empty($objectsrc->cond_reglement_id)?$objectsrc->cond_reglement_id:(!empty($soc->cond_reglement_supplier_id)?$soc->cond_reglement_supplier_id:1)); $mode_reglement_id = (!empty($objectsrc->mode_reglement_id)?$objectsrc->mode_reglement_id:(!empty($soc->mode_reglement_supplier_id)?$soc->mode_reglement_supplier_id:0)); + $fk_account = (! empty($objectsrc->fk_account)?$objectsrc->fk_account:(! empty($soc->fk_account)?$soc->fk_account:0)); $remise_percent = (!empty($objectsrc->remise_percent)?$objectsrc->remise_percent:(!empty($soc->remise_percent)?$soc->remise_percent:0)); $remise_absolue = (!empty($objectsrc->remise_absolue)?$objectsrc->remise_absolue:(!empty($soc->remise_absolue)?$soc->remise_absolue:0)); $dateinvoice = empty($conf->global->MAIN_AUTOFILL_DATE)?-1:''; @@ -1178,6 +1184,7 @@ if ($action == 'create') { $cond_reglement_id = $societe->cond_reglement_supplier_id; $mode_reglement_id = $societe->mode_reglement_supplier_id; + $fk_account = $societe->fk_account; $datetmp=dol_mktime(12,0,0,$_POST['remonth'],$_POST['reday'],$_POST['reyear']); $dateinvoice=($datetmp==''?(empty($conf->global->MAIN_AUTOFILL_DATE)?-1:''):$datetmp); $datetmp=dol_mktime(12,0,0,$_POST['echmonth'],$_POST['echday'],$_POST['echyear']); @@ -1320,6 +1327,11 @@ if ($action == 'create') $form->select_types_paiements(isset($_POST['mode_reglement_id'])?$_POST['mode_reglement_id']:$mode_reglement_id,'mode_reglement_id'); print '
'.$langs->trans('BankAccount').''; + $form->select_comptes($fk_account, 'fk_account', 0, '', 1); + print '
'; + print ''; + print '
'; + print $langs->trans('BankAccount'); + print ''; + if ($action != 'editbankaccount' && $user->rights->fournisseur->facture->creer) + print 'id.'">'.img_edit($langs->trans('SetBankAccount'),1).'
'; + print '
'; + if ($action == 'editbankaccount') { + $form->formSelectAccount($_SERVER['PHP_SELF'].'?id='.$object->id, $object->fk_account, 'fk_account', 1); + } else { + $form->formSelectAccount($_SERVER['PHP_SELF'].'?id='.$object->id, $object->fk_account, 'none'); + } + print "
'.$langs->trans('Status').''.$object->getLibStatut(4,$alreadypaid).'
- +
trans('SecurityCode'); ?>
From fb3392a7b2def4c514ac94a3cf7f01bc704e7c56 Mon Sep 17 00:00:00 2001 From: juanjo Date: Thu, 10 Jul 2014 19:49:20 +0200 Subject: [PATCH 143/258] Trad: Update from Transifex --- htdocs/langs/es_ES/agenda.lang | 2 ++ htdocs/langs/es_ES/languages.lang | 1 + htdocs/langs/es_ES/main.lang | 3 ++- htdocs/langs/es_ES/shop.lang | 2 +- 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/htdocs/langs/es_ES/agenda.lang b/htdocs/langs/es_ES/agenda.lang index fda74dd03d9..fff5641864c 100644 --- a/htdocs/langs/es_ES/agenda.lang +++ b/htdocs/langs/es_ES/agenda.lang @@ -25,6 +25,8 @@ ListOfEvents= Listado de eventos Dolibarr ActionsAskedBy=Eventos registrados por ActionsToDoBy=Eventos asignados a ActionsDoneBy=Eventos realizados por +ActionsForUser=Eventos del usuario +ActionsForUsersGroup=Eventos de todos los usuarios del grupo AllMyActions= Todos mis eventos/tareas AllActions= Todos los eventos/tareas ViewList=Vista listado diff --git a/htdocs/langs/es_ES/languages.lang b/htdocs/langs/es_ES/languages.lang index 124d8ae8cd3..88fba3e586f 100644 --- a/htdocs/langs/es_ES/languages.lang +++ b/htdocs/langs/es_ES/languages.lang @@ -10,6 +10,7 @@ Language_da_DA=Danés Language_da_DK=Danés Language_de_DE=Alemán Language_de_AT=Alemán (Austria) +Language_de_CH=Alemán (Suiza) Language_el_GR=Griego Language_en_AU=Inglés (Australia) Language_en_GB=Inglés (Reino Unido) diff --git a/htdocs/langs/es_ES/main.lang b/htdocs/langs/es_ES/main.lang index 4d743557b16..20ceb3814cb 100644 --- a/htdocs/langs/es_ES/main.lang +++ b/htdocs/langs/es_ES/main.lang @@ -356,6 +356,7 @@ ActionNotApplicable=No aplicable ActionRunningNotStarted=No empezado ActionRunningShort=Empezado ActionDoneShort=Terminado +ActionUncomplete=Incompleto CompanyFoundation=Empresa o institución ContactsForCompany=Contactos de este tercero ContactsAddressesForCompany=Contactos/direcciones de este tercero @@ -507,7 +508,7 @@ NbOfCustomers=Numero de clientes NbOfLines=Números de líneas NbOfObjects=Número de objetos NbOfReferers=Consumición -Referers=Referencias +Referers=Objetos vinculados TotalQuantity=Cantidad total DateFromTo=De %s a %s DateFrom=A partir de %s diff --git a/htdocs/langs/es_ES/shop.lang b/htdocs/langs/es_ES/shop.lang index f6ed51eb407..67bf61fb702 100644 --- a/htdocs/langs/es_ES/shop.lang +++ b/htdocs/langs/es_ES/shop.lang @@ -1,5 +1,5 @@ # Dolibarr language file - Source file is en_US - shop -FailedConnectDBCheckModuleSetup=Failed to connect to oscommerce database. Check your module setup +FailedConnectDBCheckModuleSetup=No se pudo conectar con la base de datos oscommerce. Compruebe la configuración del módulo Shop=Tienda ShopWeb=Tienda web LastOrders=Últimos pedidos From c7d31f45703a14e2f773ad9d42e1aa04df9cf4ab Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Fri, 11 Jul 2014 11:26:54 +0200 Subject: [PATCH 144/258] [ task #1204 ] Add ref_int contract field --- ChangeLog | 1 + htdocs/contrat/class/contrat.class.php | 102 +++++++++++++++++- htdocs/contrat/fiche.php | 28 +++++ htdocs/contrat/liste.php | 11 ++ .../install/mysql/migration/3.6.0-3.7.0.sql | 1 + htdocs/install/mysql/tables/llx_contrat.sql | 11 +- 6 files changed, 148 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 32bb738eba6..e09d9adbceb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -26,6 +26,7 @@ For users: - Fix: [ bug #1494 ] CATEGORY_CREATE and CATEGORY_MODIFY triggers do not intercept trigger action - Fix: [ bug #1502 ] DON_CREATE trigger does not intercept trigger action - Fix: [ bug #1505, #1504] Project trigger problem +- New: [ task #1204 ] add a ref_int contract field For translators: - Update language files. diff --git a/htdocs/contrat/class/contrat.class.php b/htdocs/contrat/class/contrat.class.php index d07aebfebc7..51e56cd2f7d 100644 --- a/htdocs/contrat/class/contrat.class.php +++ b/htdocs/contrat/class/contrat.class.php @@ -44,6 +44,7 @@ class Contrat extends CommonObject var $id; var $ref; + var $ref_int; var $socid; var $societe; // Objet societe var $statut=0; // 0=Draft, @@ -399,6 +400,7 @@ class Contrat extends CommonObject $sql.= " fk_projet,"; $sql.= " fk_commercial_signature, fk_commercial_suivi,"; $sql.= " note_private, note_public, extraparams"; + $sql.= " ,ref_int"; $sql.= " FROM ".MAIN_DB_PREFIX."contrat"; if ($ref) { @@ -417,6 +419,7 @@ class Contrat extends CommonObject { $this->id = $result["rowid"]; $this->ref = (!isset($result["ref"]) || !$result["ref"]) ? $result["rowid"] : $result["ref"]; + $this->ref_int = $result["ref_int"]; $this->statut = $result["statut"]; $this->mise_en_service = $this->db->jdate($result["datemise"]); $this->date_contrat = $this->db->jdate($result["datecontrat"]); @@ -717,7 +720,7 @@ class Contrat extends CommonObject // Insert contract $sql = "INSERT INTO ".MAIN_DB_PREFIX."contrat (datec, fk_soc, fk_user_author, date_contrat,"; $sql.= " fk_commercial_signature, fk_commercial_suivi, fk_projet,"; - $sql.= " ref, entity, note_private, note_public)"; + $sql.= " ref, entity, note_private, note_public, ref_int)"; $sql.= " VALUES ('".$this->db->idate($now)."',".$this->socid.",".$user->id; $sql.= ",".$this->db->idate($this->date_contrat); $sql.= ",".($this->commercial_signature_id>0?$this->commercial_signature_id:"NULL"); @@ -727,6 +730,7 @@ class Contrat extends CommonObject $sql.= ", ".$conf->entity; $sql.= ", ".(!empty($this->note_private)?("'".$this->db->escape($this->note_private)."'"):"NULL"); $sql.= ", ".(!empty($this->note_public)?("'".$this->db->escape($this->note_public)."'"):"NULL"); + $sql.= ", ".(!empty($this->ref_int)?("'".$this->db->escape($this->ref_int)."'"):"NULL"); $sql.= ")"; $resql=$this->db->query($sql); if ($resql) @@ -948,6 +952,102 @@ class Contrat extends CommonObject return -1; } } + + /** + * Update object into database + * + * @param User $user User that modifies + * @param int $notrigger 0=launch triggers after, 1=disable triggers + * @return int <0 if KO, >0 if OK + */ + function update($user=0, $notrigger=0) + { + global $conf, $langs; + $error=0; + + // Clean parameters + + if (isset($this->ref)) $this->ref=trim($this->ref); + if (isset($this->ref_int)) $this->ref_int=trim($this->ref_int); + if (isset($this->entity)) $this->entity=trim($this->entity); + if (isset($this->statut)) $this->statut=trim($this->statut); + if (isset($this->fk_soc)) $this->fk_soc=trim($this->fk_soc); + if (isset($this->fk_projet)) $this->fk_projet=trim($this->fk_projet); + if (isset($this->fk_commercial_signature)) $this->fk_commercial_signature=trim($this->fk_commercial_signature); + if (isset($this->fk_commercial_suivi)) $this->fk_commercial_suivi=trim($this->fk_commercial_suivi); + if (isset($this->fk_user_mise_en_service)) $this->fk_user_mise_en_service=trim($this->fk_user_mise_en_service); + if (isset($this->fk_user_cloture)) $this->fk_user_cloture=trim($this->fk_user_cloture); + if (isset($this->note_private)) $this->note_private=trim($this->note_private); + if (isset($this->note_public)) $this->note_public=trim($this->note_public); + if (isset($this->import_key)) $this->import_key=trim($this->import_key); + if (isset($this->extraparams)) $this->extraparams=trim($this->extraparams); + + + + // Check parameters + // Put here code to add a control on parameters values + + // Update request + $sql = "UPDATE ".MAIN_DB_PREFIX."contrat SET"; + + $sql.= " ref=".(isset($this->ref)?"'".$this->db->escape($this->ref)."'":"null").","; + $sql.= " ref_int=".(isset($this->ref_int)?"'".$this->db->escape($this->ref_int)."'":"null").","; + $sql.= " entity=".$conf->entity.","; + $sql.= " date_contrat=".(dol_strlen($this->date_contrat)!=0 ? "'".$this->db->idate($this->date_contrat)."'" : 'null').","; + $sql.= " statut=".(isset($this->statut)?$this->statut:"null").","; + $sql.= " mise_en_service=".(dol_strlen($this->mise_en_service)!=0 ? "'".$this->db->idate($this->mise_en_service)."'" : 'null').","; + $sql.= " fin_validite=".(dol_strlen($this->fin_validite)!=0 ? "'".$this->db->idate($this->fin_validite)."'" : 'null').","; + $sql.= " date_cloture=".(dol_strlen($this->date_cloture)!=0 ? "'".$this->db->idate($this->date_cloture)."'" : 'null').","; + $sql.= " fk_soc=".(isset($this->fk_soc)?$this->fk_soc:"null").","; + $sql.= " fk_projet=".(isset($this->fk_projet)?$this->fk_projet:"null").","; + $sql.= " fk_commercial_signature=".(isset($this->fk_commercial_signature)?$this->fk_commercial_signature:"null").","; + $sql.= " fk_commercial_suivi=".(isset($this->fk_commercial_suivi)?$this->fk_commercial_suivi:"null").","; + $sql.= " fk_user_mise_en_service=".(isset($this->fk_user_mise_en_service)?$this->fk_user_mise_en_service:"null").","; + $sql.= " fk_user_cloture=".(isset($this->fk_user_cloture)?$this->fk_user_cloture:"null").","; + $sql.= " note_private=".(isset($this->note_private)?"'".$this->db->escape($this->note_private)."'":"null").","; + $sql.= " note_public=".(isset($this->note_public)?"'".$this->db->escape($this->note_public)."'":"null").","; + $sql.= " import_key=".(isset($this->import_key)?"'".$this->db->escape($this->import_key)."'":"null").","; + $sql.= " extraparams=".(isset($this->extraparams)?"'".$this->db->escape($this->extraparams)."'":"null").""; + + + $sql.= " WHERE rowid=".$this->id; + + $this->db->begin(); + + $resql = $this->db->query($sql); + if (! $resql) { $error++; $this->errors[]="Error ".$this->db->lasterror(); } + + if (! $error) + { + if (! $notrigger) + { + // Uncomment this and change MYOBJECT to your own tag if you + // want this action calls a trigger. + + //// Call triggers + //$result=$this->call_trigger('MYOBJECT_MODIFY',$user); + //if ($result < 0) { $error++; //Do also what you must do to rollback action if trigger fail} + //// End call triggers + } + } + + // Commit or rollback + if ($error) + { + foreach($this->errors as $errmsg) + { + dol_syslog(get_class($this)."::update ".$errmsg, LOG_ERR); + $this->error.=($this->error?', '.$errmsg:$errmsg); + } + $this->db->rollback(); + return -1*$error; + } + else + { + $this->db->commit(); + return 1; + } + } /** diff --git a/htdocs/contrat/fiche.php b/htdocs/contrat/fiche.php index 4c842e25f55..8002a13dea1 100644 --- a/htdocs/contrat/fiche.php +++ b/htdocs/contrat/fiche.php @@ -205,6 +205,7 @@ if ($action == 'add' && $user->rights->contrat->creer) $object->fk_project = GETPOST('projectid','int'); $object->remise_percent = GETPOST('remise_percent','alpha'); $object->ref = GETPOST('ref','alpha'); + $object->ref_int = GETPOST('ref_int','alpha'); // If creation from another object of another module (Example: origin=propal, originid=1) if ($_POST['origin'] && $_POST['originid']) @@ -711,6 +712,21 @@ else if ($action == 'confirm_move' && $confirm == 'yes' && $user->rights->contra $action = 'edit_extras'; setEventMessage($object->error,'errors'); } +} elseif ($action=='setref_int') { + $result = $object->fetch($id); + if ($result < 0) { + setEventMessage($object->errors,'errors'); + } + $object->ref_int=GETPOST('ref_int','alpha'); + + $result = $object->update($user); + if ($result < 0) { + setEventMessage($object->errors,'errors'); + $action='editref_int'; + } else { + header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); + exit; + } } if (! empty($conf->global->MAIN_DISABLE_CONTACTS_TAB) && $user->rights->contrat->creer) @@ -858,6 +874,10 @@ if ($action == 'create') // Ref print ''; + + // Ref Int + print ''; + print ''; // Customer print ''; @@ -1046,6 +1066,14 @@ else print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', ''); print ""; + print ''; + print ''; + print ''; + // Customer print ""; print ''; diff --git a/htdocs/contrat/liste.php b/htdocs/contrat/liste.php index e1e49a5d7fd..68408e05954 100644 --- a/htdocs/contrat/liste.php +++ b/htdocs/contrat/liste.php @@ -40,6 +40,7 @@ $offset = $limit * $page ; $search_nom=GETPOST('search_nom'); $search_contract=GETPOST('search_contract'); +$search_ref_int=GETPOST('search_ref_int','alpha'); $sall=GETPOST('sall'); $statut=GETPOST('statut')?GETPOST('statut'):1; $socid=GETPOST('socid'); @@ -72,6 +73,7 @@ $sql.= ' SUM('.$db->ifsql("cd.statut=4 AND (cd.date_fin_validite IS NOT NULL AND $sql.= ' SUM('.$db->ifsql("cd.statut=5",1,0).') as nb_closed,'; $sql.= " c.rowid as cid, c.ref, c.datec, c.date_contrat, c.statut,"; $sql.= " s.nom, s.rowid as socid"; +$sql.= " ,c.ref_int"; $sql.= " FROM ".MAIN_DB_PREFIX."societe as s"; if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; $sql.= ", ".MAIN_DB_PREFIX."contrat as c"; @@ -86,6 +88,9 @@ if ($search_nom) { if ($search_contract) { $sql .= natural_search(array('c.rowid', 'c.ref'), $search_contract); } +if (!empty($search_ref_int)) { + $sql .= natural_search(array('c.ref_int'), $search_ref_int); +} if ($sall) { $sql .= natural_search(array('s.nom', 'cd.label', 'cd.description'), $sall); } @@ -107,7 +112,9 @@ if ($resql) print ''; $param='&search_contract='.$search_contract; $param.='&search_nom='.$search_nom; + $param.='&search_ref_int='.$search_ref_int; print_liste_field_titre($langs->trans("Ref"), $_SERVER["PHP_SELF"], "c.rowid","","$param",'',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("InternalRef"), $_SERVER["PHP_SELF"], "c.ref_int","","$param",'',$sortfield,$sortorder); print_liste_field_titre($langs->trans("Company"), $_SERVER["PHP_SELF"], "s.nom","","$param",'',$sortfield,$sortorder); //print_liste_field_titre($langs->trans("DateCreation"), $_SERVER["PHP_SELF"], "c.datec","","$param",'align="center"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("DateContract"), $_SERVER["PHP_SELF"], "c.date_contrat","","$param",'align="center"',$sortfield,$sortorder); @@ -125,6 +132,9 @@ if ($resql) print ''; print ''; print ''; + print ''; print ''; @@ -144,6 +154,7 @@ if ($resql) print img_object($langs->trans("ShowContract"),"contract").' '.(isset($obj->ref) ? $obj->ref : $obj->cid) .''; if ($obj->nb_late) print img_warning($langs->trans("Late")); print ''; + print ''; print ''; //print ''; print ''; 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 19b820d964c..956f034a695 100644 --- a/htdocs/install/mysql/migration/3.6.0-3.7.0.sql +++ b/htdocs/install/mysql/migration/3.6.0-3.7.0.sql @@ -113,3 +113,4 @@ create table llx_accounting_fiscalyear fk_user_modif integer NULL )ENGINE=innodb; +ALTER TABLE llx_contrat ADD COLUMN ref_int varchar(30) after ref; \ No newline at end of file diff --git a/htdocs/install/mysql/tables/llx_contrat.sql b/htdocs/install/mysql/tables/llx_contrat.sql index 7521eb0aa1b..3af6d5928dc 100644 --- a/htdocs/install/mysql/tables/llx_contrat.sql +++ b/htdocs/install/mysql/tables/llx_contrat.sql @@ -20,11 +20,12 @@ create table llx_contrat ( - rowid integer AUTO_INCREMENT PRIMARY KEY, - ref varchar(30), -- reference de contrat + rowid integer AUTO_INCREMENT PRIMARY KEY, + ref varchar(30), -- contrat reference + ref_int varchar(30), -- internal contract ref entity integer DEFAULT 1 NOT NULL, -- multi company id tms timestamp, - datec datetime, -- date de creation de l enregistrement + datec datetime, -- creation date date_contrat datetime, statut smallint DEFAULT 0, mise_en_service datetime, @@ -40,7 +41,7 @@ create table llx_contrat note_private text, note_public text, import_key varchar(14), - extraparams varchar(255) -- for stock other parameters with json format - + extraparams varchar(255) + )ENGINE=innodb; From 14e3aa8a02095a28cc91dcefcd9dae23b64424a4 Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Fri, 11 Jul 2014 11:32:27 +0200 Subject: [PATCH 145/258] Allow trigger call on update line (class ContratLine must extends CommonObject to have method call_trigger) --- htdocs/contrat/class/contrat.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/contrat/class/contrat.class.php b/htdocs/contrat/class/contrat.class.php index 51e56cd2f7d..f471ca649fa 100644 --- a/htdocs/contrat/class/contrat.class.php +++ b/htdocs/contrat/class/contrat.class.php @@ -1834,7 +1834,7 @@ class Contrat extends CommonObject /** * Classe permettant la gestion des lignes de contrats */ -class ContratLigne +class ContratLigne extends CommonObject { var $db; //!< To store db handler var $error; //!< To return error code (or message) From 3f23b116c6a5f58d4fad3b9b1f0acb8408066382 Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Fri, 11 Jul 2014 11:44:54 +0200 Subject: [PATCH 146/258] =?UTF-8?q?[=20bug=20#1522=20]=20Liste=20des=20pro?= =?UTF-8?q?positions=20commerciales=20non=20filt=C3=A9e=20depuis=20un=20pr?= =?UTF-8?q?ojet?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/core/class/html.formprojet.class.php | 7 ++++--- htdocs/projet/element.php | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/htdocs/core/class/html.formprojet.class.php b/htdocs/core/class/html.formprojet.class.php index b3228278261..7b8eefdbbae 100644 --- a/htdocs/core/class/html.formprojet.class.php +++ b/htdocs/core/class/html.formprojet.class.php @@ -164,9 +164,10 @@ class FormProjets * Build Select List of element associable to a project * * @param string $table_element Table of the element to update + * @param int $socid socid to filter * @return string The HTML select list of element */ - function select_element($table_element) + function select_element($table_element,$socid=0) { global $conf; @@ -193,8 +194,8 @@ class FormProjets $sql.= " FROM ".MAIN_DB_PREFIX.$table_element; $sql.= " WHERE ".$projectkey." is null"; - if (!empty($this->societe->id)) { - $sql.= " AND fk_soc=".$this->societe->id; + if (!empty($socid)) { + $sql.= " AND fk_soc=".$socid; } $sql.= ' AND entity='.getEntity('project'); $sql.= " ORDER BY ref DESC"; diff --git a/htdocs/projet/element.php b/htdocs/projet/element.php index 88330819349..4075113d625 100644 --- a/htdocs/projet/element.php +++ b/htdocs/projet/element.php @@ -216,7 +216,7 @@ foreach ($listofreferent as $key => $value) print_titre($langs->trans($title)); - $selectList=$formproject->select_element($tablename); + $selectList=$formproject->select_element($tablename,$project->societe->id); if ($selectList<0) { setEventMessage($formproject->error,'errors'); } From 7d77772820307ada5407807da695f63514b00b71 Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Fri, 11 Jul 2014 11:45:59 +0200 Subject: [PATCH 147/258] changelog --- ChangeLog | 1 + 1 file changed, 1 insertion(+) diff --git a/ChangeLog b/ChangeLog index cfe4950e2f1..502cbc40536 100644 --- a/ChangeLog +++ b/ChangeLog @@ -44,6 +44,7 @@ Fix: [ bug #1461 ] LINEORDER_SUPPLIER_CREATE does not intercept supplier order l Fix: [ bug #1484 ] BILL_SUPPLIER_PAYED trigger action does not intercept failure under some circumstances Fix: [ bug #1482 ] Several supplier invoice triggers do not show trigger error messages Fix: [ bug #1486 ] LINEBILL_SUPPLIER_CREATE and LINEBILL_SUPPLIER_UPDATE triggers do not intercept trigger action +Fix: [ bug #1522 ] Element list into associate object into project are no more filterd by project thirdparty ***** ChangeLog for 3.5.3 compared to 3.5.2 ***** Fix: Error on field accountancy code for export profile of invoices. From ff5ea31452e1796ba2022cf73915e42f417d2139 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 11 Jul 2014 12:40:30 +0200 Subject: [PATCH 148/258] Fix: Date error --- build/rpm/dolibarr_fedora.spec | 2 +- build/rpm/dolibarr_generic.spec | 2 +- build/rpm/dolibarr_mandriva.spec | 2 +- build/rpm/dolibarr_opensuse.spec | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build/rpm/dolibarr_fedora.spec b/build/rpm/dolibarr_fedora.spec index 9bcb450bb44..fb1deb610c5 100755 --- a/build/rpm/dolibarr_fedora.spec +++ b/build/rpm/dolibarr_fedora.spec @@ -331,7 +331,7 @@ fi # version x.y.z-0.1.a for alpha, x.y.z-0.2.b for beta, x.y.z-0.3 for release %changelog -* Tue July 1 2014 Laurent Destailleur 3.5.4-0.3 +* Tue Jul 1 2014 Laurent Destailleur 3.5.4-0.3 - Upstream release * Fri May 2 2014 Laurent Destailleur 3.5.3-0.3 diff --git a/build/rpm/dolibarr_generic.spec b/build/rpm/dolibarr_generic.spec index bf844b8c766..f5532934b35 100755 --- a/build/rpm/dolibarr_generic.spec +++ b/build/rpm/dolibarr_generic.spec @@ -567,7 +567,7 @@ fi # version x.y.z-0.1.a for alpha, x.y.z-0.2.b for beta, x.y.z-0.3 for release %changelog -* Tue July 1 2014 Laurent Destailleur 3.5.4-0.3 +* Tue Jul 1 2014 Laurent Destailleur 3.5.4-0.3 - Upstream release * Fri May 2 2014 Laurent Destailleur 3.5.3-0.3 diff --git a/build/rpm/dolibarr_mandriva.spec b/build/rpm/dolibarr_mandriva.spec index 68c6c505b65..da1aa858535 100755 --- a/build/rpm/dolibarr_mandriva.spec +++ b/build/rpm/dolibarr_mandriva.spec @@ -336,7 +336,7 @@ fi # version x.y.z-0.1.a for alpha, x.y.z-0.2.b for beta, x.y.z-0.3 for release %changelog -* Tue July 1 2014 Laurent Destailleur 3.5.4-0.3 +* Tue Jul 1 2014 Laurent Destailleur 3.5.4-0.3 - Upstream release * Fri May 2 2014 Laurent Destailleur 3.5.3-0.3 diff --git a/build/rpm/dolibarr_opensuse.spec b/build/rpm/dolibarr_opensuse.spec index 3da1b2003ec..9ae11b015f8 100755 --- a/build/rpm/dolibarr_opensuse.spec +++ b/build/rpm/dolibarr_opensuse.spec @@ -347,7 +347,7 @@ fi # version x.y.z-0.1.a for alpha, x.y.z-0.2.b for beta, x.y.z-0.3 for release %changelog -* Tue July 1 2014 Laurent Destailleur 3.5.4-0.3 +* Tue Jul 1 2014 Laurent Destailleur 3.5.4-0.3 - Upstream release * Fri May 2 2014 Laurent Destailleur 3.5.3-0.3 From a6c1cfca7e972f2e87e6e41ad9892b4246fecfa0 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 11 Jul 2014 12:42:47 +0200 Subject: [PATCH 149/258] Fix: bad translation --- htdocs/langs/en_US/admin.lang | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index fd3f8979532..00d2521c309 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -296,7 +296,7 @@ CurrentVersion=Dolibarr current version CallUpdatePage=Go to the page that updates the database structure and datas: %s. LastStableVersion=Last stable version GenericMaskCodes=You may enter any numbering mask. In this mask, the following tags could be used:
{000000} corresponds to a number which will be incremented on each %s. Enter as many zeros as the desired length of the counter. The counter will be completed by zeros from the left in order to have as many zeros as the mask.
{000000+000} same as previous but an offset corresponding to the number to the right of the + sign is applied starting on first %s.
{000000@x} same as previous but the counter is reset to zero when month x is reached (x between 1 and 12, or 0 to use the early months of fiscal year defined in your configuration, or 99 to reset to zero every month). If this option is used and x is 2 or higher, then sequence {yy}{mm} or {yyyy}{mm} is also required.
{dd} day (01 to 31).
{mm} month (01 to 12).
{yy}, {yyyy} or {y} year over 2, 4 or 1 numbers.
-GenericMaskCodes2={cccc} the client code on n characters
{cccc000} the client code on n characters is followed by a counter dedicated for customer. This counter dedicated to customer is reset at same time than global counter.
{tttt} The code of company type on n characters (see dictionary-company types).
+GenericMaskCodes2={cccc} the client code on n characters
{cccc000} the client code on n characters is followed by a counter dedicated for customer. This counter dedicated to customer is reset at same time than global counter.
{tttt} The code of thirdparty type on n characters (see dictionary-thirdparty types).
GenericMaskCodes3=All other characters in the mask will remain intact.
Spaces are not allowed.
GenericMaskCodes4a=Example on the 99th %s of the third party TheCompany done 2007-01-31:
GenericMaskCodes4b=Example on third party created on 2007-03-01:
From 55d062784dd0313016c10ced980f8b0f9d55076e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Doursenaud?= Date: Thu, 10 Jul 2014 17:36:39 +0200 Subject: [PATCH 150/258] Added labels on objectline form elements --- htdocs/core/class/commonobject.class.php | 10 +++++----- htdocs/core/tpl/objectline_create.tpl.php | 22 ++++++++++++++-------- htdocs/core/tpl/objectline_edit.tpl.php | 4 ++-- 3 files changed, 21 insertions(+), 15 deletions(-) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 54ad75515f7..34891fb7045 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -2714,21 +2714,21 @@ abstract class CommonObject if (! empty($conf->global->MAIN_VIEW_LINE_NUMBER)) print '
'; // Description - print ''; + print ''; // VAT - print ''; + print ''; // Price HT - print ''; + print ''; if ($conf->global->MAIN_FEATURES_LEVEL > 1) print ''; // Qty - print ''; + print ''; // Reduction short - print ''; + print ''; if (! empty($conf->margin->enabled) && empty($user->societe_id)) { diff --git a/htdocs/core/tpl/objectline_create.tpl.php b/htdocs/core/tpl/objectline_create.tpl.php index 170cc1e0fc7..719d6c1794c 100644 --- a/htdocs/core/tpl/objectline_create.tpl.php +++ b/htdocs/core/tpl/objectline_create.tpl.php @@ -50,23 +50,25 @@ if (in_array($object->element,array('propal','facture','invoice','commande','ord global->MAIN_VIEW_LINE_NUMBER) ? ' colspan="2"' : ''); ?>>
trans('AddNewLine'); ?>trans("FreeZone"); ?> -
- + + - + - - + + element) && $object->element == 'contrat')?'1':'0').'">'; } else {*/ + echo ''; /* if (empty($conf->product->enabled) && empty($conf->service->enabled)) echo $langs->trans("Type"); else if (! empty($forceall) || (! empty($conf->product->enabled) && ! empty($conf->service->enabled))) echo $langs->trans("FreeLineOfType"); @@ -124,6 +128,7 @@ else { echo '
'; echo ' '; + echo ''; echo ' '; $filtertype=''; @@ -184,7 +190,7 @@ else { - - + qty > $line->stock) print img_picto($langs->trans("StockTooLow"),"warning", 'style="vertical-align: bottom;"')." "; ?> - +   @@ -115,7 +115,7 @@ $coldisplay=-1; // We remove first td \n"; $var=false; print ""; print ''; print ""; print ''; print ""; print ''; print ""; diff --git a/htdocs/comm/index.php b/htdocs/comm/index.php index 98653992025..eada82f7f6a 100644 --- a/htdocs/comm/index.php +++ b/htdocs/comm/index.php @@ -78,9 +78,9 @@ if (! empty($conf->propal->enabled) && $user->rights->propal->lire) print ''; print ''; print ''; - print ''; + print ''; print ''; - print ''; + print ''; print ''; print "
'.$langs->trans("SearchAProposal").'
'.$langs->trans("Ref").'::
'.$langs->trans("Other").':
:
\n"; print "
\n"; @@ -95,8 +95,8 @@ if (! empty($conf->commande->enabled) && $user->rights->commande->lire) print ''; print '
'.$langs->trans("SearchACustomerOrder").'
'; - print $langs->trans("Ref").':
'.$langs->trans("Other").':
:

\n"; } @@ -110,9 +110,9 @@ if (! empty($conf->contrat->enabled) && $user->rights->contrat->lire) print ''; print ''; print ''; - print ''; + print ''; print ''; - print ''; + print ''; print ''; print "
'.$langs->trans("SearchAContract").'
'.$langs->trans("Ref").'::
'.$langs->trans("Other").':
:
\n"; print "
"; diff --git a/htdocs/compta/hrm.php b/htdocs/compta/hrm.php index a8ce6a45714..cd2d2b60f7e 100644 --- a/htdocs/compta/hrm.php +++ b/htdocs/compta/hrm.php @@ -96,9 +96,9 @@ if (! empty($conf->deplacement->enabled) && $user->rights->deplacement->lire) print ''; print ''; print ""; - print "'; + print "'; print ''; - //print "'; + //print "'; print ''; print "
'.$langs->trans("SearchATripAndExpense").'
".$langs->trans("Ref").'::
".$langs->trans("Other").':
:

"; } diff --git a/htdocs/compta/index.php b/htdocs/compta/index.php index 205aba9a778..442016f38fd 100644 --- a/htdocs/compta/index.php +++ b/htdocs/compta/index.php @@ -97,9 +97,9 @@ if (! empty($conf->facture->enabled) && $user->rights->facture->lire) print ''; print ""; print ''; - print "'; + print "'; print ''; - print "'; + print "'; print ''; print "
'.$langs->trans("SearchACustomerInvoice").'
".$langs->trans("Ref").':
:
".$langs->trans("Other").':
:

"; } @@ -114,9 +114,9 @@ if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->lire) print ''; print ''; print ""; - print "'; + print "'; print ''; - print "'; + print "'; print ''; print "
'.$langs->trans("SearchASupplierInvoice").'
".$langs->trans("Ref").'::
".$langs->trans("RefSupplier").':
:

"; } @@ -132,9 +132,9 @@ if (! empty($conf->don->enabled) && $user->rights->don->lire) print ''; print ''; print ""; - print "'; + print "'; print ''; - //print "'; + //print "'; print ''; print "
'.$langs->trans("SearchADonation").'
".$langs->trans("Ref").'::
".$langs->trans("Other").':
:

"; } diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index bdaaffdafe3..f35d493a485 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -1800,18 +1800,21 @@ function printSearchForm($urlaction,$urlobject,$title,$htmlmodesearch,$htmlinput global $conf,$langs; $ret=''; - $ret.=''; $ret.='
'; + $ret.=''; $ret.=''; $ret.=''; $ret.=''; $ret.='global->MAIN_HTML5_PLACEHOLDER)) $ret.=' placeholder="'.$langs->trans("SearchOf").''.strip_tags($title).'"'; else $ret.=' title="'.$langs->trans("SearchOf").''.strip_tags($title).'"'; - $ret.=' name="'.$htmlinputname.'" size="10" />'; + $ret.=' name="'.$htmlinputname.'" id="'.$htmlinputname.'" size="10" />'; $ret.=''; $ret.="
\n"; return $ret; diff --git a/htdocs/product/index.php b/htdocs/product/index.php index b3af35d5b3c..1770e046ed3 100644 --- a/htdocs/product/index.php +++ b/htdocs/product/index.php @@ -83,17 +83,17 @@ print ''; print ""; print ''; print "'; +print ':'; print ''; if (! empty($conf->barcode->enabled)) { print "'; + print ':'; //print ''; print ''; } print "'; +print ':'; //print ''; print ''; print "
'.$langs->trans("Search").'
"; -print $langs->trans("Ref").':
"; - print $langs->trans("BarCode").':
"; -print $langs->trans("Other").':

"; diff --git a/htdocs/societe/index.php b/htdocs/societe/index.php index 3cf38a58b90..766e44cf9a7 100644 --- a/htdocs/societe/index.php +++ b/htdocs/societe/index.php @@ -66,17 +66,17 @@ print ''; print ''; print ''; print "'; +print ':'; print ''; if (! empty($conf->barcode->enabled)) { print "'; + print ':'; //print ''; print ''; } print "'; +print ':'; //print ''; print ''; From d167fb4fcd4a47aa6fe7994e474ec42b566aa270 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 11 Jul 2014 13:55:15 +0200 Subject: [PATCH 152/258] Wok on page to show events per users. --- htdocs/comm/action/index.php | 4 +- htdocs/comm/action/peruser.php | 480 +++++++++++++++++++++++++++++++++ 2 files changed, 482 insertions(+), 2 deletions(-) create mode 100644 htdocs/comm/action/peruser.php diff --git a/htdocs/comm/action/index.php b/htdocs/comm/action/index.php index 0fd1a57f5ef..b3c66fb6a3c 100644 --- a/htdocs/comm/action/index.php +++ b/htdocs/comm/action/index.php @@ -1023,8 +1023,6 @@ else // View by day } -$db->close(); - /* TODO Export print ' @@ -1041,6 +1039,8 @@ $("#actionagenda_vcal_link").attr("href","/public/agenda/agendaexport.php?format llxFooter(); +$db->close(); + /** * Show event of a particular day diff --git a/htdocs/comm/action/peruser.php b/htdocs/comm/action/peruser.php new file mode 100644 index 00000000000..7bd0edafe69 --- /dev/null +++ b/htdocs/comm/action/peruser.php @@ -0,0 +1,480 @@ + + * Copyright (C) 2003 Eric Seigne + * Copyright (C) 2004-2014 Laurent Destailleur + * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2011 Juanjo Menent + * + * 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 + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + + +/** + * \file htdocs/comm/action/peruser.php + * \ingroup agenda + * \brief Tab of calendar events per user + */ + +require '../../main.inc.php'; +require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; +require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; +require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/agenda.lib.php'; +if (! empty($conf->projet->enabled)) { + require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php'; +} + +if (! isset($conf->global->AGENDA_MAX_EVENTS_DAY_VIEW)) $conf->global->AGENDA_MAX_EVENTS_DAY_VIEW=3; + +$filter=GETPOST("filter",'',3); +$filtera = GETPOST("userasked","int",3)?GETPOST("userasked","int",3):GETPOST("filtera","int",3); +$filtert = GETPOST("usertodo","int",3)?GETPOST("usertodo","int",3):GETPOST("filtert","int",3); +$filterd = GETPOST("userdone","int",3)?GETPOST("userdone","int",3):GETPOST("filterd","int",3); +$usergroup = GETPOST("usergroup","int",3); +$showbirthday = empty($conf->use_javascript_ajax)?GETPOST("showbirthday","int"):1; + + +$sortfield = GETPOST("sortfield",'alpha'); +$sortorder = GETPOST("sortorder",'alpha'); +$page = GETPOST("page","int"); +if ($page == -1) { $page = 0; } +$limit = $conf->liste_limit; +$offset = $limit * $page; +if (! $sortorder) $sortorder="ASC"; +if (! $sortfield) $sortfield="a.datec"; + +// Security check +$socid = GETPOST("socid","int"); +if ($user->societe_id) $socid=$user->societe_id; +$result = restrictedArea($user, 'agenda', 0, '', 'myactions'); +if ($socid < 0) $socid=''; + +$canedit=1; +if (! $user->rights->agenda->myactions->read) accessforbidden(); +if (! $user->rights->agenda->allactions->read) $canedit=0; +if (! $user->rights->agenda->allactions->read || $filter =='mine') // If no permission to see all, we show only affected to me +{ + $filtera=$user->id; + $filtert=$user->id; + $filterd=$user->id; +} + +$action=GETPOST('action','alpha'); +//$year=GETPOST("year"); +$year=GETPOST("year","int")?GETPOST("year","int"):date("Y"); +$month=GETPOST("month","int")?GETPOST("month","int"):date("m"); +$week=GETPOST("week","int")?GETPOST("week","int"):date("W"); +$day=GETPOST("day","int")?GETPOST("day","int"):0; +$pid=GETPOST("projectid","int",3); +$status=GETPOST("status"); +$type=GETPOST("type"); +$maxprint=(isset($_GET["maxprint"])?GETPOST("maxprint"):$conf->global->AGENDA_MAX_EVENTS_DAY_VIEW); +$actioncode=GETPOST("actioncode","alpha",3)?GETPOST("actioncode","alpha",3):(GETPOST("actioncode")=='0'?'0':''); + +if ($actioncode == '') $actioncode=(empty($conf->global->AGENDA_DEFAULT_FILTER_TYPE)?'':$conf->global->AGENDA_DEFAULT_FILTER_TYPE); +if ($status == '') $status=(empty($conf->global->AGENDA_DEFAULT_FILTER_STATUS)?'':$conf->global->AGENDA_DEFAULT_FILTER_STATUS); +if (empty($action)) $action=(empty($conf->global->AGENDA_DEFAULT_VIEW)?'show_month':$conf->global->AGENDA_DEFAULT_VIEW); + +if (GETPOST('viewcal') && $action != 'show_day' && $action != 'show_week') { + $action='show_month'; $day=''; +} // View by month +if (GETPOST('viewweek') || $action == 'show_week') { + $action='show_week'; $week=($week?$week:date("W")); $day=($day?$day:date("d")); +} // View by week +if (GETPOST('viewday') || $action == 'show_day') { + $action='show_day'; $day=($day?$day:date("d")); +} // View by day + + +$langs->load("agenda"); +$langs->load("other"); +$langs->load("commercial"); + +// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array +$hookmanager->initHooks(array('agenda')); + + +/* + * Actions + */ + +// None + + +/* + * View + */ + +$help_url='EN:Module_Agenda_En|FR:Module_Agenda|ES:Módulo_Agenda'; +llxHeader('',$langs->trans("Agenda"),$help_url); + +$form=new Form($db); +$companystatic=new Societe($db); +$contactstatic=new Contact($db); + +$now=dol_now(); +$nowarray=dol_getdate($now); +$nowyear=$nowarray['year']; +$nowmonth=$nowarray['mon']; +$nowday=$nowarray['mday']; + +// Define list of all external calendars +$listofextcals=array(); +if (empty($conf->global->AGENDA_DISABLE_EXT) && $conf->global->AGENDA_EXT_NB > 0) +{ + $i=0; + while($i < $conf->global->AGENDA_EXT_NB) + { + $i++; + $source='AGENDA_EXT_SRC'.$i; + $name='AGENDA_EXT_NAME'.$i; + $color='AGENDA_EXT_COLOR'.$i; + $buggedfile='AGENDA_EXT_BUGGEDFILE'.$i; + if (! empty($conf->global->$source) && ! empty($conf->global->$name)) + { + // Note: $conf->global->buggedfile can be empty or 'uselocalandtznodaylight' or 'uselocalandtzdaylight' + $listofextcals[]=array('src'=>$conf->global->$source,'name'=>$conf->global->$name,'color'=>$conf->global->$color,'buggedfile'=>(isset($conf->global->buggedfile)?$conf->global->buggedfile:0)); + } + } +} + + +if (empty($action) || $action=='show_month') +{ + $prev = dol_get_prev_month($month, $year); + $prev_year = $prev['year']; + $prev_month = $prev['month']; + $next = dol_get_next_month($month, $year); + $next_year = $next['year']; + $next_month = $next['month']; + + $max_day_in_prev_month = date("t",dol_mktime(0,0,0,$prev_month,1,$prev_year)); // Nb of days in previous month + $max_day_in_month = date("t",dol_mktime(0,0,0,$month,1,$year)); // Nb of days in next month + // tmpday is a negative or null cursor to know how many days before the 1 to show on month view (if tmpday=0 we start on monday) + $tmpday = -date("w",dol_mktime(0,0,0,$month,1,$year))+2; + $tmpday+=((isset($conf->global->MAIN_START_WEEK)?$conf->global->MAIN_START_WEEK:1)-1); + if ($tmpday >= 1) $tmpday -= 7; + // Define firstdaytoshow and lastdaytoshow + $firstdaytoshow=dol_mktime(0,0,0,$prev_month,$max_day_in_prev_month+$tmpday,$prev_year); + $next_day=7-($max_day_in_month+1-$tmpday)%7; + if ($next_day < 6) $next_day+=7; + $lastdaytoshow=dol_mktime(0,0,0,$next_month,$next_day,$next_year); +} +if ($action=='show_week') +{ + $prev = dol_get_first_day_week($day, $month, $year); + $prev_year = $prev['prev_year']; + $prev_month = $prev['prev_month']; + $prev_day = $prev['prev_day']; + $first_day = $prev['first_day']; + + $week = $prev['week']; + + $day = (int) $day; + $next = dol_get_next_week($day, $week, $month, $year); + $next_year = $next['year']; + $next_month = $next['month']; + $next_day = $next['day']; + + // Define firstdaytoshow and lastdaytoshow + $firstdaytoshow=dol_mktime(0,0,0,$prev_month,$first_day,$prev_year); + $lastdaytoshow=dol_mktime(0,0,0,$next_month,$next_day,$next_year); + + $max_day_in_month = date("t",dol_mktime(0,0,0,$month,1,$year)); + + $tmpday = $first_day; +} +if ($action == 'show_day') +{ + $prev = dol_get_prev_day($day, $month, $year); + $prev_year = $prev['year']; + $prev_month = $prev['month']; + $prev_day = $prev['day']; + $next = dol_get_next_day($day, $month, $year); + $next_year = $next['year']; + $next_month = $next['month']; + $next_day = $next['day']; + + // Define firstdaytoshow and lastdaytoshow + $firstdaytoshow=dol_mktime(0,0,0,$prev_month,$prev_day,$prev_year); + $lastdaytoshow=dol_mktime(0,0,0,$next_month,$next_day,$next_year); +} +//print 'xx'.$prev_year.'-'.$prev_month.'-'.$prev_day; +//print 'xx'.$next_year.'-'.$next_month.'-'.$next_day; +//print dol_print_date($firstdaytoshow,'day'); +//print dol_print_date($lastdaytoshow,'day'); + +$title=$langs->trans("DoneAndToDoActions"); +if ($status == 'done') $title=$langs->trans("DoneActions"); +if ($status == 'todo') $title=$langs->trans("ToDoActions"); + +$param=''; +if ($status) $param="&status=".$status; +if ($filter) $param.="&filter=".$filter; +if ($filtera) $param.="&filtera=".$filtera; +if ($filtert) $param.="&filtert=".$filtert; +if ($filterd) $param.="&filterd=".$filterd; +if ($socid) $param.="&socid=".$socid; +if ($showbirthday) $param.="&showbirthday=1"; +if ($pid) $param.="&projectid=".$pid; +if ($actioncode != '') $param.="&actioncode=".$actioncode; +if ($type) $param.="&type=".$type; +if ($action == 'show_day' || $action == 'show_week') $param.='&action='.$action; +$param.="&maxprint=".$maxprint; + +// Show navigation bar +if (empty($action) || $action=='show_month') +{ + $nav ="".img_previous($langs->trans("Previous"))."\n"; + $nav.=" ".dol_print_date(dol_mktime(0,0,0,$month,1,$year),"%b %Y"); + $nav.=" \n"; + $nav.="".img_next($langs->trans("Next"))."\n"; + $nav.="   (".$langs->trans("Today").")"; + $picto='calendar'; +} +if ($action=='show_week') +{ + $nav ="".img_previous($langs->trans("Previous"))."\n"; + $nav.=" ".dol_print_date(dol_mktime(0,0,0,$month,1,$year),"%Y").", ".$langs->trans("Week")." ".$week; + $nav.=" \n"; + $nav.="".img_next($langs->trans("Next"))."\n"; + $nav.="   (".$langs->trans("Today").")"; + $picto='calendarweek'; +} +if ($action=='show_day') +{ + $nav ="".img_previous($langs->trans("Previous"))."\n"; + $nav.=" ".dol_print_date(dol_mktime(0,0,0,$month,$day,$year),"daytextshort"); + $nav.=" \n"; + $nav.="".img_next($langs->trans("Next"))."\n"; + $nav.="   (".$langs->trans("Today").")"; + $picto='calendarday'; +} + +// Must be after the nav definition +$param.='&year='.$year.'&month='.$month.($day?'&day='.$day:''); +//print 'x'.$param; + + + + +$tabactive='cardperuser'; + +$paramnoaction=preg_replace('/action=[a-z_]+/','',$param); + +$head = calendars_prepare_head($paramnoaction); + +dol_fiche_head($head, $tabactive, $langs->trans('Agenda'), 0, 'action'); +print_actions_filter($form,$canedit,$status,$year,$month,$day,$showbirthday,$filtera,$filtert,$filterd,$pid,$socid,$listofextcals,$actioncode,$usergroup); +dol_fiche_end(); + +print_fiche_titre($s,$link.'     '.$nav, ''); + + +// Get event in an array +$eventarray=array(); + +$sql = 'SELECT a.id,a.label,'; +$sql.= ' a.datep,'; +$sql.= ' a.datep2,'; +$sql.= ' a.datea,'; +$sql.= ' a.datea2,'; +$sql.= ' a.percent,'; +$sql.= ' a.fk_user_author,a.fk_user_action,a.fk_user_done,'; +$sql.= ' a.transparency, a.priority, a.fulldayevent, a.location,'; +$sql.= ' a.fk_soc, a.fk_contact,'; +$sql.= ' ca.code'; +$sql.= ' FROM '.MAIN_DB_PREFIX.'c_actioncomm as ca, '.MAIN_DB_PREFIX."actioncomm as a"; +if (! $user->rights->societe->client->voir && ! $socid) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON a.fk_soc = sc.fk_soc"; +if ($usergroup > 0) $sql.= ", ".MAIN_DB_PREFIX."usergroup_user as ugu"; +$sql.= ' WHERE a.fk_action = ca.id'; +$sql.= ' AND a.entity IN ('.getEntity('agenda', 1).')'; +if ($actioncode) $sql.=" AND ca.code='".$db->escape($actioncode)."'"; +if ($pid) $sql.=" AND a.fk_project=".$db->escape($pid); +if (! $user->rights->societe->client->voir && ! $socid) $sql.= " AND (a.fk_soc IS NULL OR sc.fk_user = " .$user->id . ")"; +if ($socid > 0) $sql.= ' AND a.fk_soc = '.$socid; +if ($usergroup > 0) $sql.= " AND ugu.fk_user = a.fk_user_action"; +if ($action == 'show_day') +{ + $sql.= " AND ("; + $sql.= " (a.datep BETWEEN '".$db->idate(dol_mktime(0,0,0,$month,$day,$year))."'"; + $sql.= " AND '".$db->idate(dol_mktime(23,59,59,$month,$day,$year))."')"; + $sql.= " OR "; + $sql.= " (a.datep2 BETWEEN '".$db->idate(dol_mktime(0,0,0,$month,$day,$year))."'"; + $sql.= " AND '".$db->idate(dol_mktime(23,59,59,$month,$day,$year))."')"; + $sql.= " OR "; + $sql.= " (a.datep < '".$db->idate(dol_mktime(0,0,0,$month,$day,$year))."'"; + $sql.= " AND a.datep2 > '".$db->idate(dol_mktime(23,59,59,$month,$day,$year))."')"; + $sql.= ')'; +} +else +{ + // To limit array + $sql.= " AND ("; + $sql.= " (a.datep BETWEEN '".$db->idate(dol_mktime(0,0,0,$month,1,$year)-(60*60*24*7))."'"; // Start 7 days before + $sql.= " AND '".$db->idate(dol_mktime(23,59,59,$month,28,$year)+(60*60*24*10))."')"; // End 7 days after + 3 to go from 28 to 31 + $sql.= " OR "; + $sql.= " (a.datep2 BETWEEN '".$db->idate(dol_mktime(0,0,0,$month,1,$year)-(60*60*24*7))."'"; + $sql.= " AND '".$db->idate(dol_mktime(23,59,59,$month,28,$year)+(60*60*24*10))."')"; + $sql.= " OR "; + $sql.= " (a.datep < '".$db->idate(dol_mktime(0,0,0,$month,1,$year)-(60*60*24*7))."'"; + $sql.= " AND a.datep2 > '".$db->idate(dol_mktime(23,59,59,$month,28,$year)+(60*60*24*10))."')"; + $sql.= ')'; +} +if ($type) $sql.= " AND ca.id = ".$type; +if ($status == '0') { $sql.= " AND a.percent = 0"; } +if ($status == '-1') { $sql.= " AND a.percent = -1"; } // Not applicable +if ($status == '50') { $sql.= " AND (a.percent >= 0 AND a.percent < 100)"; } // Running +if ($status == 'done' || $status == '100') { $sql.= " AND (a.percent = 100 OR (a.percent = -1 AND a.datep2 <= '".$db->idate($now)."'))"; } +if ($status == 'todo') { $sql.= " AND ((a.percent >= 0 AND a.percent < 100) OR (a.percent = -1 AND a.datep2 > '".$db->idate($now)."'))"; } +if ($filtera > 0 || $filtert > 0 || $filterd > 0 || $usergroup > 0) +{ + $sql.= " AND ("; + if ($filtera > 0) $sql.= " a.fk_user_author = ".$filtera; + if ($filtert > 0) $sql.= ($filtera>0?" OR ":"")." a.fk_user_action = ".$filtert; + if ($filterd > 0) $sql.= ($filtera>0||$filtert>0?" OR ":"")." a.fk_user_done = ".$filterd; + if ($usergroup > 0) $sql.= ($filtera>0||$filtert>0||$filterd>0?" OR ":"")." ugu.fk_usergroup = ".$usergroup; + $sql.= ")"; +} +// Sort on date +$sql.= ' ORDER BY datep'; +//print $sql; + +dol_syslog("comm/action/index.php", LOG_DEBUG); +$resql=$db->query($sql); +if ($resql) +{ + $num = $db->num_rows($resql); + $i=0; + while ($i < $num) + { + $obj = $db->fetch_object($resql); + + // Create a new object action + $event=new ActionComm($db); + $event->id=$obj->id; + $event->datep=$db->jdate($obj->datep); // datep and datef are GMT date + $event->datef=$db->jdate($obj->datep2); + $event->type_code=$obj->code; + $event->libelle=$obj->label; + $event->percentage=$obj->percent; + $event->author->id=$obj->fk_user_author; // user id of creator + $event->usertodo->id=$obj->fk_user_action; // user id of owner + $event->userdone->id=$obj->fk_user_done; // deprecated + // $event->userstodo=... with s after user, in future version, will be an array with all id of user assigned to event + $event->priority=$obj->priority; + $event->fulldayevent=$obj->fulldayevent; + $event->location=$obj->location; + $event->transparency=$obj->transparency; + + $event->societe->id=$obj->fk_soc; + $event->contact->id=$obj->fk_contact; + + // Defined date_start_in_calendar and date_end_in_calendar property + // They are date start and end of action but modified to not be outside calendar view. + if ($event->percentage <= 0) + { + $event->date_start_in_calendar=$event->datep; + if ($event->datef != '' && $event->datef >= $event->datep) $event->date_end_in_calendar=$event->datef; + else $event->date_end_in_calendar=$event->datep; + } + else + { + $event->date_start_in_calendar=$event->datep; + if ($event->datef != '' && $event->datef >= $event->datep) $event->date_end_in_calendar=$event->datef; + else $event->date_end_in_calendar=$event->datep; + } + // Define ponctual property + if ($event->date_start_in_calendar == $event->date_end_in_calendar) + { + $event->ponctuel=1; + } + + // Check values + if ($event->date_end_in_calendar < $firstdaytoshow || + $event->date_start_in_calendar > $lastdaytoshow) + { + // This record is out of visible range + } + else + { + if ($event->date_start_in_calendar < $firstdaytoshow) $event->date_start_in_calendar=$firstdaytoshow; + if ($event->date_end_in_calendar > $lastdaytoshow) $event->date_end_in_calendar=$lastdaytoshow; + + // Add an entry in actionarray for each day + $daycursor=$event->date_start_in_calendar; + $annee = date('Y',$daycursor); + $mois = date('m',$daycursor); + $jour = date('d',$daycursor); + + // Loop on each day covered by action to prepare an index to show on calendar + $loop=true; $j=0; + $daykey=dol_mktime(0,0,0,$mois,$jour,$annee); + do + { + //if ($event->id==408) print 'daykey='.$daykey.' '.$event->datep.' '.$event->datef.'
'; + + $eventarray[$daykey][]=$event; + $j++; + + $daykey+=60*60*24; + if ($daykey > $event->date_end_in_calendar) $loop=false; + } + while ($loop); + + //print 'Event '.$i.' id='.$event->id.' (start='.dol_print_date($event->datep).'-end='.dol_print_date($event->datef); + //print ' startincalendar='.dol_print_date($event->date_start_in_calendar).'-endincalendar='.dol_print_date($event->date_end_in_calendar).') was added in '.$j.' different index key of array
'; + } + $i++; + + } +} +else +{ + dol_print_error($db); +} + +$maxnbofchar=18; +$cachethirdparties=array(); +$cachecontacts=array(); + +// Define theme_datacolor array +$color_file = DOL_DOCUMENT_ROOT."/theme/".$conf->theme."/graph-color.php"; +if (is_readable($color_file)) +{ + include_once $color_file; +} +if (! is_array($theme_datacolor)) $theme_datacolor=array(array(120,130,150), array(200,160,180), array(190,190,220)); + + + + +/* TODO Export + print ' + + + + + +'; +*/ + +llxFooter(); + +$db->close(); From 32b015e661fcb50e85847bf277f978053f6e64d8 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 11 Jul 2014 13:56:35 +0200 Subject: [PATCH 153/258] New: Type of thirdparties can accept a country (to show list of types specific for a country). --- ChangeLog | 10 ++++-- htdocs/admin/dict.php | 33 ++++++++++++------- htdocs/core/class/ctypent.class.php | 6 ++-- htdocs/core/class/html.formcompany.class.php | 4 +-- htdocs/install/mysql/data/llx_c_typent.sql | 24 +++++++------- .../install/mysql/migration/3.6.0-3.7.0.sql | 9 +++-- htdocs/install/mysql/tables/llx_c_typent.sql | 11 ++++--- 7 files changed, 60 insertions(+), 37 deletions(-) diff --git a/ChangeLog b/ChangeLog index 32bb738eba6..0164ca14788 100644 --- a/ChangeLog +++ b/ChangeLog @@ -8,15 +8,19 @@ For users: - New: [ task #867 ] Remove ESAEB external module code from core. - New: Can create proposal from an intervention. - New: Can filter events on a group of users. -- New: Add thirdparty to filter on events. +- New: Can filter events of a thirdparty. +- New: Split Agenda view (month, week, day) into different tabs. - New: Form to add a photo is immediatly available on photo page if permissions are ok (save one click per photo to add). - New: Add option PRODUCT_MAX_VISIBLE_PHOTO to limit number of photos shown on main product card. - New: Add event FICHINTER_CLASSIFY_BILLED into list of possible events to create an automatic event into agenda. -- New: Add new type of event (when type of events are used, not by - default) +- New: Add new type of event (when type of events are used, not by default) +- New: Add country into table of thirdparties type. This will allow to provide + a list of thirdparty types specific to a country (like argentina that + need type A or B). +- New: Can force a specific bank account onto an invoice/order... - Fix: [ bug #1487 ] PAYMENT_DELETE trigger does not intercept trigger action - Fix: [ bug #1470, #1472, #1473] User trigger problem - Fix: [ bug #1489, #1491 ] Intervention trigger problem diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php index 656158a19cd..788483196e4 100644 --- a/htdocs/admin/dict.php +++ b/htdocs/admin/dict.php @@ -130,16 +130,16 @@ $tablib[24]= "DictionaryAccountancysystem"; $tablib[25]= "DictionaryRevenueStamp"; $tablib[26]= "DictionaryResourceType"; -// Requete pour extraction des donnees des dictionnaires +// Requests to extract data $tabsql=array(); $tabsql[1] = "SELECT f.rowid as rowid, f.code, f.libelle, p.code as country_code, p.libelle as country, f.active FROM ".MAIN_DB_PREFIX."c_forme_juridique as f, ".MAIN_DB_PREFIX."c_pays as p WHERE f.fk_pays=p.rowid"; $tabsql[2] = "SELECT d.rowid as rowid, d.code_departement as code, d.nom as libelle, d.fk_region as region_id, r.nom as region, p.code as country_code, p.libelle as country, d.active FROM ".MAIN_DB_PREFIX."c_departements as d, ".MAIN_DB_PREFIX."c_regions as r, ".MAIN_DB_PREFIX."c_pays as p WHERE d.fk_region=r.code_region and r.fk_pays=p.rowid and r.active=1 and p.active=1"; -$tabsql[3] = "SELECT r.rowid as rowid, code_region as code, nom as libelle, r.fk_pays as country_id, p.code as country_code, p.libelle as country, r.active FROM ".MAIN_DB_PREFIX."c_regions as r, ".MAIN_DB_PREFIX."c_pays as p WHERE r.fk_pays=p.rowid and p.active=1"; +$tabsql[3] = "SELECT r.rowid as rowid, r.code_region as code, r.nom as libelle, r.fk_pays as country_id, p.code as country_code, p.libelle as country, r.active FROM ".MAIN_DB_PREFIX."c_regions as r, ".MAIN_DB_PREFIX."c_pays as p WHERE r.fk_pays=p.rowid and p.active=1"; $tabsql[4] = "SELECT rowid as rowid, code, libelle, active FROM ".MAIN_DB_PREFIX."c_pays"; $tabsql[5] = "SELECT c.rowid as rowid, c.code as code, c.civilite AS libelle, c.active FROM ".MAIN_DB_PREFIX."c_civilite AS c"; $tabsql[6] = "SELECT a.id as rowid, a.code as code, a.libelle AS libelle, a.type, a.active, a.module, a.position FROM ".MAIN_DB_PREFIX."c_actioncomm AS a"; $tabsql[7] = "SELECT a.id as rowid, a.code as code, a.libelle AS libelle, a.accountancy_code as accountancy_code, a.deductible, p.code as country_code, p.libelle as country, a.fk_pays as country_id, a.active FROM ".MAIN_DB_PREFIX."c_chargesociales AS a, ".MAIN_DB_PREFIX."c_pays as p WHERE a.fk_pays=p.rowid and p.active=1"; -$tabsql[8] = "SELECT id as rowid, code, libelle, active FROM ".MAIN_DB_PREFIX."c_typent"; +$tabsql[8] = "SELECT t.id as rowid, t.code as code, t.libelle, t.fk_country as country_id, p.code as country_code, p.libelle as country, t.active FROM ".MAIN_DB_PREFIX."c_typent as t LEFT JOIN ".MAIN_DB_PREFIX."c_pays as p ON t.fk_country=p.rowid"; $tabsql[9] = "SELECT code_iso as code, label, unicode, active FROM ".MAIN_DB_PREFIX."c_currencies"; $tabsql[10]= "SELECT t.rowid, t.taux, t.localtax1_type, t.localtax1, t.localtax2_type, t.localtax2, p.libelle as country, p.code as country_code, t.fk_pays as country_id, t.recuperableonly, t.note, t.active, t.accountancy_code_sell, t.accountancy_code_buy FROM ".MAIN_DB_PREFIX."c_tva as t, ".MAIN_DB_PREFIX."c_pays as p WHERE t.fk_pays=p.rowid"; $tabsql[11]= "SELECT t.rowid as rowid, element, source, code, libelle, active FROM ".MAIN_DB_PREFIX."c_type_contact AS t"; @@ -159,7 +159,7 @@ $tabsql[24]= "SELECT s.rowid as rowid, pcg_version, s.fk_pays as country_id, p.c $tabsql[25]= "SELECT t.rowid, t.taux, p.libelle as country, p.code as country_code, t.fk_pays as country_id, t.note, t.active, t.accountancy_code_sell, t.accountancy_code_buy FROM ".MAIN_DB_PREFIX."c_revenuestamp as t, ".MAIN_DB_PREFIX."c_pays as p WHERE t.fk_pays=p.rowid"; $tabsql[26]= "SELECT rowid as rowid, code, label, active FROM ".MAIN_DB_PREFIX."c_type_resource"; -// Critere de tri du dictionnaire +// Criteria to sort dictionaries $tabsqlsort=array(); $tabsqlsort[1] ="country ASC, code ASC"; $tabsqlsort[2] ="country ASC, code ASC"; @@ -168,7 +168,7 @@ $tabsqlsort[4] ="code ASC"; $tabsqlsort[5] ="libelle ASC"; $tabsqlsort[6] ="a.type ASC, a.module ASC, a.position ASC, a.code ASC"; $tabsqlsort[7] ="country ASC, code ASC, a.libelle ASC"; -$tabsqlsort[8] ="libelle ASC"; +$tabsqlsort[8] ="country DESC, libelle ASC"; $tabsqlsort[9] ="label ASC"; $tabsqlsort[10]="country ASC, taux ASC, recuperableonly ASC, localtax1 ASC, localtax2 ASC"; $tabsqlsort[11]="element ASC, source ASC, code ASC"; @@ -197,7 +197,7 @@ $tabfield[4] = "code,libelle"; $tabfield[5] = "code,libelle"; $tabfield[6] = "code,libelle,type,position"; $tabfield[7] = "code,libelle,country_id,country,accountancy_code,deductible"; -$tabfield[8] = "code,libelle"; +$tabfield[8] = "code,libelle,country_id,country"; $tabfield[9] = "code,label,unicode"; $tabfield[10]= "country_id,country,taux,recuperableonly,localtax1_type,localtax1,localtax2_type,localtax2,accountancy_code_sell,accountancy_code_buy,note"; $tabfield[11]= "element,source,code,libelle"; @@ -226,7 +226,7 @@ $tabfieldvalue[4] = "code,libelle"; $tabfieldvalue[5] = "code,libelle"; $tabfieldvalue[6] = "code,libelle,type,position"; $tabfieldvalue[7] = "code,libelle,country,accountancy_code,deductible"; -$tabfieldvalue[8] = "code,libelle"; +$tabfieldvalue[8] = "code,libelle,country"; $tabfieldvalue[9] = "code,label,unicode"; $tabfieldvalue[10]= "country,taux,recuperableonly,localtax1_type,localtax1,localtax2_type,localtax2,accountancy_code_sell,accountancy_code_buy,note"; $tabfieldvalue[11]= "element,source,code,libelle"; @@ -255,7 +255,7 @@ $tabfieldinsert[4] = "code,libelle"; $tabfieldinsert[5] = "code,civilite"; $tabfieldinsert[6] = "code,libelle,type,position"; $tabfieldinsert[7] = "code,libelle,fk_pays,accountancy_code,deductible"; -$tabfieldinsert[8] = "code,libelle"; +$tabfieldinsert[8] = "code,libelle,fk_country"; $tabfieldinsert[9] = "code_iso,label,unicode"; $tabfieldinsert[10]= "fk_pays,taux,recuperableonly,localtax1_type,localtax1,localtax2_type,localtax2,accountancy_code_sell,accountancy_code_buy,note"; $tabfieldinsert[11]= "element,source,code,libelle"; @@ -428,7 +428,8 @@ if (GETPOST('actionadd') || GETPOST('actionmodify')) $ok=1; foreach ($listfield as $f => $value) { - if ($value == 'country' && in_array('region_id',$listfield)) continue; // For region page, we do not require the country input + if ($value == 'country' && in_array($tablib[$id],array('DictionaryRegion','DictionaryCompanyType'))) continue; // For some pages, country is not mandatory + if ($value == 'country_id' && in_array($tablib[$id],array('DictionaryRegion','DictionaryCompanyType'))) continue; // For some pages, country is not mandatory if ($value == 'localtax1' && empty($_POST['localtax1_type'])) continue; if ($value == 'localtax2' && empty($_POST['localtax2_type'])) continue; if ((! isset($_POST[$value]) || $_POST[$value]=='') @@ -473,9 +474,17 @@ if (GETPOST('actionadd') || GETPOST('actionmodify')) $msg .= $langs->transnoentities('ErrorFieldFormat', $langs->transnoentities('Code')).'
'; }*/ } - if (isset($_POST["country"]) && $_POST["country"]=='0') { - $ok=0; - setEventMessage($langs->transnoentities("ErrorFieldRequired",$langs->transnoentities("Country")),'errors'); + if (isset($_POST["country"]) && $_POST["country"]=='0') + { + if (in_array($tablib[$id],array('DictionaryCompanyType'))) + { + $_POST["country"]=''; + } + else + { + $ok=0; + setEventMessage($langs->transnoentities("ErrorFieldRequired",$langs->transnoentities("Country")),'errors'); + } } // Clean some parameters diff --git a/htdocs/core/class/ctypent.class.php b/htdocs/core/class/ctypent.class.php index dd039b71015..eea64ed10ac 100644 --- a/htdocs/core/class/ctypent.class.php +++ b/htdocs/core/class/ctypent.class.php @@ -156,7 +156,8 @@ class Ctypent // extends CommonObject $sql = "SELECT"; $sql.= " t.id,"; $sql.= " t.code,"; - $sql.= " t.libelle,"; + $sql.= " t.libelle as label,"; + $sql.= " t.fk_country as country_id,"; $sql.= " t.active,"; $sql.= " t.module"; $sql.= " FROM ".MAIN_DB_PREFIX."c_typent as t"; @@ -173,7 +174,8 @@ class Ctypent // extends CommonObject $this->id = $obj->id; $this->code = $obj->code; - $this->libelle = $obj->libelle; + $this->libelle = $obj->label; + $this->country_id = $obj->country_id; $this->active = $obj->active; $this->module = $obj->module; } diff --git a/htdocs/core/class/html.formcompany.class.php b/htdocs/core/class/html.formcompany.class.php index d71c26af29c..7728080c01b 100644 --- a/htdocs/core/class/html.formcompany.class.php +++ b/htdocs/core/class/html.formcompany.class.php @@ -57,13 +57,13 @@ class FormCompany */ function typent_array($mode=0, $filter='') { - global $langs; + global $langs,$mysoc; $effs = array(); $sql = "SELECT id, code, libelle"; $sql.= " FROM ".MAIN_DB_PREFIX."c_typent"; - $sql.= " WHERE active = 1"; + $sql.= " WHERE active = 1 AND (fk_country IS NULL OR fk_country = ".(empty($mysoc->country_id)?'0':$mysoc->country_id).")"; if ($filter) $sql.=" ".$filter; $sql.= " ORDER by id"; dol_syslog(get_class($this).'::typent_array', LOG_DEBUG); diff --git a/htdocs/install/mysql/data/llx_c_typent.sql b/htdocs/install/mysql/data/llx_c_typent.sql index 154798cdd4f..8349cd13a5a 100644 --- a/htdocs/install/mysql/data/llx_c_typent.sql +++ b/htdocs/install/mysql/data/llx_c_typent.sql @@ -27,17 +27,19 @@ -- -- --- Types entreprises +-- Types of thirdparties -- delete from llx_c_typent; -insert into llx_c_typent (id,code,libelle,active) values ( 0, 'TE_UNKNOWN', '-', 1); -insert into llx_c_typent (id,code,libelle,active) values ( 1, 'TE_STARTUP', 'Start-up', 0); -insert into llx_c_typent (id,code,libelle,active) values ( 2, 'TE_GROUP', 'Grand groupe', 1); -insert into llx_c_typent (id,code,libelle,active) values ( 3, 'TE_MEDIUM', 'PME/PMI', 1); -insert into llx_c_typent (id,code,libelle,active) values ( 4, 'TE_SMALL', 'TPE', 1); -insert into llx_c_typent (id,code,libelle,active) values ( 5, 'TE_ADMIN', 'Administration',1); -insert into llx_c_typent (id,code,libelle,active) values ( 6, 'TE_WHOLE', 'Grossiste', 0); -insert into llx_c_typent (id,code,libelle,active) values ( 7, 'TE_RETAIL', 'Revendeur', 0); -insert into llx_c_typent (id,code,libelle,active) values ( 8, 'TE_PRIVATE', 'Particulier', 1); -insert into llx_c_typent (id,code,libelle,active) values (100, 'TE_OTHER', 'Autres', 1); +insert into llx_c_typent (id,code,libelle,fk_country,active) values ( 0, 'TE_UNKNOWN', '-', NULL, 1); +insert into llx_c_typent (id,code,libelle,fk_country,active) values ( 1, 'TE_STARTUP', 'Start-up', NULL, 0); +insert into llx_c_typent (id,code,libelle,fk_country,active) values ( 2, 'TE_GROUP', 'Grand groupe', NULL, 1); +insert into llx_c_typent (id,code,libelle,fk_country,active) values ( 3, 'TE_MEDIUM', 'PME/PMI', NULL, 1); +insert into llx_c_typent (id,code,libelle,fk_country,active) values ( 4, 'TE_SMALL', 'TPE', NULL, 1); +insert into llx_c_typent (id,code,libelle,fk_country,active) values ( 5, 'TE_ADMIN', 'Administration',NULL, 1); +insert into llx_c_typent (id,code,libelle,fk_country,active) values ( 6, 'TE_WHOLE', 'Grossiste', NULL, 0); +insert into llx_c_typent (id,code,libelle,fk_country,active) values ( 7, 'TE_RETAIL', 'Revendeur', NULL, 0); +insert into llx_c_typent (id,code,libelle,fk_country,active) values ( 8, 'TE_PRIVATE', 'Particulier', NULL, 1); +insert into llx_c_typent (id,code,libelle,fk_country,active) values (100, 'TE_OTHER', 'Autres', NULL, 1); +insert into llx_c_typent (id,code,libelle,fk_country,active) values (231, 'TE_A1', 'Type A', 23, 1); +insert into llx_c_typent (id,code,libelle,fk_country,active) values (232, 'TE_B2', 'Type B', 23, 1); 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 19b820d964c..f6de3ef3b03 100644 --- a/htdocs/install/mysql/migration/3.6.0-3.7.0.sql +++ b/htdocs/install/mysql/migration/3.6.0-3.7.0.sql @@ -21,10 +21,15 @@ ALTER TABLE llx_c_paiement ADD COLUMN accountancy_code varchar(32) DEFAULT NULL AFTER active; -insert into llx_c_action_trigger (rowid,code,label,description,elementtype,rang) values (29,'FICHINTER_CLASSIFY_BILLED','Classify intervention as billed','Executed when a intervention is classified as billed (when option FICHINTER_DISABLE_DETAILS is set)','ficheinter',19); +-- Defined only to have specific list for countries that can't use generic list (like argentina that need type A or B) +ALTER TABLE llx_c_typent ADD COLUMN fk_country integer NULL AFTER libelle; + +INSERT INTO llx_c_action_trigger (rowid,code,label,description,elementtype,rang) values (29,'FICHINTER_CLASSIFY_BILLED','Classify intervention as billed','Executed when a intervention is classified as billed (when option FICHINTER_DISABLE_DETAILS is set)','ficheinter',19); -insert into llx_c_actioncomm (id, code, type, libelle, module, active, position) values (11,'AC_INT','system','Intervention on site',NULL, 1, 4); +INSERT INTO llx_c_actioncomm (id, code, type, libelle, module, active, position) values (11,'AC_INT','system','Intervention on site',NULL, 1, 4); + + ALTER TABLE llx_accountingaccount add column entity integer DEFAULT 1 NOT NULL AFTER rowid; ALTER TABLE llx_accountingaccount add column datec datetime NOT NULL AFTER entity; ALTER TABLE llx_accountingaccount add column tms timestamp AFTER datec; diff --git a/htdocs/install/mysql/tables/llx_c_typent.sql b/htdocs/install/mysql/tables/llx_c_typent.sql index 62d39cea8ad..06a41727b69 100644 --- a/htdocs/install/mysql/tables/llx_c_typent.sql +++ b/htdocs/install/mysql/tables/llx_c_typent.sql @@ -19,9 +19,10 @@ create table llx_c_typent ( - id integer PRIMARY KEY, - code varchar(12) NOT NULL, - libelle varchar(30), - active tinyint DEFAULT 1 NOT NULL, - module varchar(32) NULL + id integer PRIMARY KEY, + code varchar(12) NOT NULL, + libelle varchar(30), + fk_country integer NULL, -- Defined only to have specific list for countries that can't use generic list (like argentina that need type A or B) + active tinyint DEFAULT 1 NOT NULL, + module varchar(32) NULL )ENGINE=innodb; From 8e64ea274d0d258157d50cd50e282b4678ad44f8 Mon Sep 17 00:00:00 2001 From: KreizIT Date: Fri, 11 Jul 2014 14:02:21 +0200 Subject: [PATCH 154/258] Refactor: ORDER_* and LINEORDER_* trigger --- htdocs/commande/class/commande.class.php | 140 ++++++++++------------- 1 file changed, 59 insertions(+), 81 deletions(-) diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index b6d06abf368..6c1b5eeed90 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -238,6 +238,7 @@ class Commande extends CommonOrder if (! $resql) { dol_print_error($this->db); + $this->error=$this->db->lasterror(); $error++; } @@ -259,8 +260,13 @@ class Commande extends CommonOrder $mouvP->origin = &$this; // We decrement stock of product (and sub-products) $result=$mouvP->livraison($user, $this->lines[$i]->fk_product, $idwarehouse, $this->lines[$i]->qty, $this->lines[$i]->subprice, $langs->trans("OrderValidatedInDolibarr",$num)); - if ($result < 0) { $error++; } + if ($result < 0) + { + $error++; + $this->error=$mouvP->error; + } } + if ($error) break; } } } @@ -296,12 +302,10 @@ class Commande extends CommonOrder if (! $error) { - // Appel des triggers - include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $interface=new Interfaces($this->db); - $result=$interface->run_triggers('ORDER_VALIDATE',$this,$user,$langs,$conf); - if ($result < 0) { $error++; $this->errors=$interface->errors; } - // Fin appel triggers + // Call trigger + $result=$this->call_trigger('ORDER_VALIDATE',$user); + if ($result < 0) $error++; + // End call triggers } // Set new ref and current status @@ -319,7 +323,6 @@ class Commande extends CommonOrder else { $this->db->rollback(); - $this->error=$this->db->lasterror(); return -1; } } @@ -430,12 +433,10 @@ class Commande extends CommonOrder $resql = $this->db->query($sql); if ($resql) { - // Appel des triggers - include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $interface=new Interfaces($this->db); - $result=$interface->run_triggers('ORDER_REOPEN',$this,$user,$langs,$conf); - if ($result < 0) { $error++; $this->errors=$interface->errors; } - // Fin appel triggers + // Call trigger + $result=$this->call_trigger('ORDER_REOPEN',$user); + if ($result < 0) $error++; + // End call triggers } else { @@ -491,13 +492,11 @@ class Commande extends CommonOrder if ($this->db->query($sql)) { - // Appel des triggers - include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $interface=new Interfaces($this->db); - $result=$interface->run_triggers('ORDER_CLOSE',$this,$user,$langs,$conf); - if ($result < 0) { $error++; $this->errors=$interface->errors; } - // Fin appel triggers - + // Call trigger + $result=$this->call_trigger('ORDER_CLOSE',$user); + if ($result < 0) $error++; + // End call triggers + if (! $error) { $this->statut=3; @@ -558,8 +557,11 @@ class Commande extends CommonOrder $mouvP = new MouvementStock($this->db); // We increment stock of product (and sub-products) $result=$mouvP->reception($user, $this->lines[$i]->fk_product, $idwarehouse, $this->lines[$i]->qty, $this->lines[$i]->subprice, $langs->trans("OrderCanceledInDolibarr",$this->ref)); - if ($result < 0) { + if ($result < 0) + { $error++; + $this->error=$mouvP->error; + break; } } } @@ -567,14 +569,10 @@ class Commande extends CommonOrder if (! $error) { - // Appel des triggers - include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $interface=new Interfaces($this->db); - $result=$interface->run_triggers('ORDER_CANCEL',$this,$user,$langs,$conf); - if ($result < 0) { - $error++; $this->errors=$interface->errors; - } - // Fin appel triggers + // Call trigger + $result=$this->call_trigger('ORDER_CANCEL',$user); + if ($result < 0) $error++; + // End call triggers } if (! $error) @@ -585,8 +583,6 @@ class Commande extends CommonOrder } else { - $this->error=$mouvP->error; - foreach($this->errors as $errmsg) { dol_syslog(get_class($this)."::cancel ".$errmsg, LOG_ERR); @@ -812,12 +808,10 @@ class Commande extends CommonOrder if (! $notrigger) { - // Appel des triggers - include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $interface=new Interfaces($this->db); - $result=$interface->run_triggers('ORDER_CREATE',$this,$user,$langs,$conf); - if ($result < 0) { $error++; $this->errors=$interface->errors; } - // Fin appel triggers + // Call trigger + $result=$this->call_trigger('ORDER_CREATE',$user); + if ($result < 0) $error++; + // End call triggers } if (!$error) { @@ -909,12 +903,10 @@ class Commande extends CommonOrder if ($reshook < 0) $error++; } - // Appel des triggers - include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $interface=new Interfaces($this->db); - $result=$interface->run_triggers('ORDER_CLONE',$this,$user,$langs,$conf); - if ($result < 0) { $error++; $this->errors=$interface->errors; } - // Fin appel triggers + // Call trigger + $result=$this->call_trigger('ORDER_CLONE',$user); + if ($result < 0) $error++; + // End call triggers } // End @@ -2228,14 +2220,10 @@ class Commande extends CommonOrder dol_syslog(get_class($this)."::classifyBilled", LOG_DEBUG); if ($this->db->query($sql)) { - // Appel des triggers - include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $interface=new Interfaces($this->db); - $result=$interface->run_triggers('ORDER_CLASSIFY_BILLED',$this,$user,$langs,$conf); - if ($result < 0) { - $error++; $this->errors=$interface->errors; - } - // Fin appel triggers + // Call trigger + $result=$this->call_trigger('ORDER_CLASSIFY_BILLED',$user); + if ($result < 0) $error++; + // End call triggers if (! $error) { @@ -2247,8 +2235,6 @@ class Commande extends CommonOrder } else { - $this->error=$this->db->error(); - foreach($this->errors as $errmsg) { dol_syslog(get_class($this)."::classifyBilled ".$errmsg, LOG_ERR); @@ -2453,16 +2439,13 @@ class Commande extends CommonOrder if (! $error && ! $notrigger) { - // Appel des triggers - include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $interface=new Interfaces($this->db); - $result=$interface->run_triggers('ORDER_DELETE',$this,$user,$langs,$conf); - if ($result < 0) { - $error++; $this->errors=$interface->errors; - } - // Fin appel triggers + // Call trigger + $result=$this->call_trigger('ORDER_DELETE',$user); + if ($result < 0) $error++; + // End call triggers } + //TODO: Check for error after each action. If one failed we rollback, don't waste time to do action if previous fail if (! $error) { // Delete order details @@ -2471,6 +2454,7 @@ class Commande extends CommonOrder if (! $this->db->query($sql) ) { $error++; + $this->errors[]=$this->db->lasterror(); } // Delete order @@ -2479,6 +2463,7 @@ class Commande extends CommonOrder if (! $this->db->query($sql) ) { $error++; + $this->errors[]=$this->db->lasterror(); } // Delete linked object @@ -2538,7 +2523,6 @@ class Commande extends CommonOrder } else { - $this->error=$this->db->lasterror(); foreach($this->errors as $errmsg) { dol_syslog(get_class($this)."::delete ".$errmsg, LOG_ERR); @@ -3197,12 +3181,10 @@ class OrderLine extends CommonOrderLine } } - // Appel des triggers - include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $interface=new Interfaces($this->db); - $result=$interface->run_triggers('LINEORDER_DELETE',$this,$user,$langs,$conf); - if ($result < 0) { $error++; $this->errors=$interface->errors; } - // Fin appel triggers + // Call trigger + $result=$this->call_trigger('LINEORDER_DELETE',$user); + if ($result < 0) $error++; + // End call triggers if (!$error) { $this->db->commit(); @@ -3322,12 +3304,10 @@ class OrderLine extends CommonOrderLine if (! $notrigger) { - // Appel des triggers - include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $interface=new Interfaces($this->db); - $result=$interface->run_triggers('LINEORDER_INSERT',$this,$user,$langs,$conf); - if ($result < 0) { $error++; $this->errors=$interface->errors; } - // Fin appel triggers + // Call trigger + $result=$this->call_trigger('LINEORDER_INSERT',$user); + if ($result < 0) $error++; + // End call triggers } if (!$error) { @@ -3439,12 +3419,10 @@ class OrderLine extends CommonOrderLine if (! $notrigger) { - // Appel des triggers - include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $interface=new Interfaces($this->db); - $result = $interface->run_triggers('LINEORDER_UPDATE',$this,$user,$langs,$conf); - if ($result < 0) { $error++; $this->errors=$interface->errors; } - // Fin appel triggers + // Call trigger + $result=$this->call_trigger('LINEORDER_UPDATE',$user); + if ($result < 0) $error++; + // End call triggers } if (!$error) { From bbe400e01f13c7c7a93bcf2bebd8b65e859e0311 Mon Sep 17 00:00:00 2001 From: BENKE Charles Date: Fri, 11 Jul 2014 14:21:36 +0200 Subject: [PATCH 155/258] Update box_actions.php Add popup action feature on homepage --- htdocs/core/boxes/box_actions.php | 64 +++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) diff --git a/htdocs/core/boxes/box_actions.php b/htdocs/core/boxes/box_actions.php index 9dcfc76016a..ae138ae1422 100644 --- a/htdocs/core/boxes/box_actions.php +++ b/htdocs/core/boxes/box_actions.php @@ -2,6 +2,7 @@ /* Copyright (C) 2003-2007 Rodolphe Quiedeville * Copyright (C) 2004-2011 Laurent Destailleur * Copyright (C) 2005-2011 Regis Houssin + * Copyright (C) 2014 Charles-Fr BENKE * * 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 @@ -151,7 +152,70 @@ class box_actions extends ModeleBoxes */ function showBox($head = null, $contents = null) { + global $langs, $conf; parent::showBox($this->info_box_head, $this->info_box_contents); + if ($conf->global->SHOW_DIALOG_HOMEPAGE) + { + $actioncejour=false; + $contents=$this->info_box_contents; + $nblines=count($contents); + $bcx[0] = 'class="box_pair"'; + $bcx[1] = 'class="box_impair"'; + if ($contents[0][0]['text'] != $langs->trans("NoActionsToDo")) + { + print '
trans("ActionsToDo").'">'; + print '
'.$langs->trans("Search").'
"; -print $langs->trans("Name").':
"; - print $langs->trans("BarCode").':
"; -print $langs->trans("Other").':
'; + for ($i=0, $n=$nblines; $i < $n; $i++) + { + if (isset($contents[$i])) + { + // on affiche que les évènement du jours ou passé + // qui ne sont pas à 100% + $actioncejour=true; + $var=!$var; + // TR + $logo=$contents[$i][0]['logo']; + $label=$contents[$i][1]['text']; + $urlevent=$contents[$i][1]['url']; + $logosoc=$contents[$i][2]['logo']; + $nomsoc=$contents[$i][3]['text']; + $urlsoc=$contents[$i][3]['url']; + $dateligne=$contents[$i][4]['text']; + $percentage=$contents[$i][5]['text']; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + } + } + print '
'; + print img_object("",$logo); + print ''.$label.''.img_object("",$logosoc)." ".$nomsoc.''.$dateligne.''.$percentage.'
'; + + } + print '
'; + if ($actioncejour) + { + print ''; + } + else + { + print ''; + } + } } } From fc61cc9bfa7905dca483accf0508001c1c698dca Mon Sep 17 00:00:00 2001 From: KreizIT Date: Fri, 11 Jul 2014 14:36:13 +0200 Subject: [PATCH 156/258] Refactor: BILL_* and LINEBILL_* trigger --- ChangeLog | 3 +- htdocs/compta/facture/class/facture.class.php | 164 +++++++----------- 2 files changed, 61 insertions(+), 106 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1a853809489..6b9acc71682 100644 --- a/ChangeLog +++ b/ChangeLog @@ -42,7 +42,8 @@ For developers: - New: Add hook "searchAgendaFrom". - New: Add trigger DON_UPDATE, DON_DELETE - New: Add country iso code on 3 chars into table of countries. -- Qual: Removed hard coded rowid into data init of table llx_c_action_trigger. +- Qual: Removed hard coded rowid into data init of table llx_c_action_trigger. +- LINEBILL_DELETE trigger called before SQL delete in facturedet WARNING: Following change may create regression for some external modules, but was necessary to make Dolibarr better: diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index 1cfb5fe3725..7e5af441280 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -482,14 +482,10 @@ class Facture extends CommonInvoice } else if ($reshook < 0) $error++; - // Appel des triggers - include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $interface=new Interfaces($this->db); - $result=$interface->run_triggers('BILL_CREATE',$this,$user,$langs,$conf); - if ($result < 0) { - $error++; $this->errors=$interface->errors; - } - // Fin appel triggers + // Call trigger + $result=$this->call_trigger('BILL_CREATE',$user); + if ($result < 0) $error++; + // End call triggers if (! $error) { @@ -655,14 +651,10 @@ class Facture extends CommonInvoice if ($reshook < 0) $error++; } - // Appel des triggers - include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $interface=new Interfaces($this->db); - $result=$interface->run_triggers('BILL_CLONE',$this,$user,$langs,$conf); - if ($result < 0) { - $error++; $this->errors=$interface->errors; - } - // Fin appel triggers + // Call trigger + $result=$this->call_trigger('BILL_CLONE',$user); + if ($result < 0) $error++; + // End call triggers } // End @@ -1100,14 +1092,10 @@ class Facture extends CommonInvoice { if (! $notrigger) { - // Call triggers - include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $interface=new Interfaces($this->db); - $result=$interface->run_triggers('BILL_MODIFY',$this,$user,$langs,$conf); - if ($result < 0) { - $error++; $this->errors=$interface->errors; - } - // End call triggers + // Call trigger + $result=$this->call_trigger('BILL_MODIFY',$user); + if ($result < 0) $error++; + // End call triggers } } @@ -1262,14 +1250,10 @@ class Facture extends CommonInvoice if (! $error && ! $notrigger) { - // Appel des triggers - include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $interface=new Interfaces($this->db); - $result=$interface->run_triggers('BILL_DELETE',$this,$user,$langs,$conf); - if ($result < 0) { - $error++; $this->errors=$interface->errors; - } - // Fin appel triggers + // Call trigger + $result=$this->call_trigger('BILL_DELETE',$user); + if ($result < 0) $error++; + // End call triggers } // Removed extrafields @@ -1403,7 +1387,6 @@ class Facture extends CommonInvoice } else { - $this->error=$this->db->lasterror(); $this->db->rollback(); return -2; } @@ -1439,14 +1422,10 @@ class Facture extends CommonInvoice $resql = $this->db->query($sql); if ($resql) { - // Appel des triggers - include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $interface=new Interfaces($this->db); - $result=$interface->run_triggers('BILL_PAYED',$this,$user,$langs,$conf); - if ($result < 0) { - $error++; $this->errors=$interface->errors; - } - // Fin appel triggers + // Call trigger + $result=$this->call_trigger('BILL_PAYED',$user); + if ($result < 0) $error++; + // End call triggers } else { @@ -1495,14 +1474,10 @@ class Facture extends CommonInvoice $resql = $this->db->query($sql); if ($resql) { - // Appel des triggers - include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $interface=new Interfaces($this->db); - $result=$interface->run_triggers('BILL_UNPAYED',$this,$user,$langs,$conf); - if ($result < 0) { - $error++; $this->errors=$interface->errors; - } - // Fin appel triggers + // Call trigger + $result=$this->call_trigger('BILL_UNPAYED',$user); + if ($result < 0) $error++; + // End call triggers } else { @@ -1562,18 +1537,14 @@ class Facture extends CommonInvoice $resql=$this->db->query($sql); if ($resql) { - // Appel des triggers - include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $interface=new Interfaces($this->db); - $result=$interface->run_triggers('BILL_CANCEL',$this,$user,$langs,$conf); - if ($result < 0) { - $error++; - $this->errors=$interface->errors; + // Call trigger + $result=$this->call_trigger('BILL_CANCEL',$user); + if ($result < 0) + { $this->db->rollback(); return -1; - } - // Fin appel triggers + // End call triggers $this->db->commit(); return 1; @@ -1791,14 +1762,11 @@ class Facture extends CommonInvoice // Trigger calls if (! $error) { - // Appel des triggers - include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $interface=new Interfaces($this->db); - $result=$interface->run_triggers('BILL_VALIDATE',$this,$user,$langs,$conf); - if ($result < 0) { - $error++; $this->errors=$interface->errors; - } - // Fin appel triggers + // Call trigger + $result=$this->call_trigger('BILL_VALIDATE',$user); + if ($result < 0) $error++; + //TODO: Restoring ref, facnumber, statut, brouillon to previous value if trigger fail + // End call triggers } } else @@ -1872,17 +1840,15 @@ class Facture extends CommonInvoice $old_statut=$this->statut; $this->brouillon = 1; $this->statut = 0; - // Appel des triggers - include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $interface=new Interfaces($this->db); - $result=$interface->run_triggers('BILL_UNVALIDATE',$this,$user,$langs,$conf); - if ($result < 0) { + // Call trigger + $result=$this->call_trigger('BILL_UNVALIDATE',$user); + if ($result < 0) + { $error++; - $this->errors=$interface->errors; $this->statut=$old_statut; $this->brouillon=0; } - // Fin appel triggers + // End call triggers } else { $this->db->rollback(); return -1; @@ -3567,18 +3533,14 @@ class FactureLigne extends CommonInvoiceLine if (! $notrigger) { - // Appel des triggers - include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $interface=new Interfaces($this->db); - $result = $interface->run_triggers('LINEBILL_INSERT',$this,$user,$langs,$conf); - if ($result < 0) - { - $error++; - $this->errors=$interface->errors; + // Call trigger + $result=$this->call_trigger('LINEBILL_INSERT',$user); + if ($result < 0) + { $this->db->rollback(); return -2; } - // Fin appel triggers + // End call triggers } $this->db->commit(); @@ -3683,18 +3645,14 @@ class FactureLigne extends CommonInvoiceLine if (! $notrigger) { - // Appel des triggers - include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $interface=new Interfaces($this->db); - $result = $interface->run_triggers('LINEBILL_UPDATE',$this,$user,$langs,$conf); - if ($result < 0) - { - $error++; - $this->errors=$interface->errors; + // Call trigger + $result=$this->call_trigger('LINEBILL_UPDATE',$user); + if ($result < 0) + { $this->db->rollback(); return -2; } - // Fin appel triggers + // End call triggers } $this->db->commit(); return 1; @@ -3719,26 +3677,22 @@ class FactureLigne extends CommonInvoiceLine $error=0; $this->db->begin(); + + // Call trigger + $result=$this->call_trigger('LINEBILL_DELETE',$user); + if ($result < 0) + { + $this->db->rollback(); + return -1; + } + // End call triggers + $sql = "DELETE FROM ".MAIN_DB_PREFIX."facturedet WHERE rowid = ".$this->rowid; dol_syslog(get_class($this)."::delete", LOG_DEBUG); if ($this->db->query($sql) ) { - // Appel des triggers - include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $interface=new Interfaces($this->db); - $result = $interface->run_triggers('LINEBILL_DELETE',$this,$user,$langs,$conf); - if ($result < 0) - { - $error++; - $this->errors=$interface->errors; - $this->db->rollback(); - return -1; - } - // Fin appel triggers - $this->db->commit(); - return 1; } else From c1a004106deb74317d06da53079a3fa077b6b915 Mon Sep 17 00:00:00 2001 From: KreizIT Date: Fri, 11 Jul 2014 14:47:44 +0200 Subject: [PATCH 157/258] Refactor: LOCALTAXE_* trigger --- .../compta/localtax/class/localtax.class.php | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/htdocs/compta/localtax/class/localtax.class.php b/htdocs/compta/localtax/class/localtax.class.php index c8766387cd0..72ce346abad 100644 --- a/htdocs/compta/localtax/class/localtax.class.php +++ b/htdocs/compta/localtax/class/localtax.class.php @@ -104,13 +104,13 @@ class Localtax extends CommonObject { $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."localtax"); - // Appel des triggers - include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $interface=new Interfaces($this->db); - $result=$interface->run_triggers('LOCALTAX_CREATE',$this,$user,$langs,$conf); - if ($result < 0) { $error++; $this->errors=$interface->errors; } - // Fin appel triggers + // Call trigger + $result=$this->call_trigger('LOCALTAX_CREATE',$user); + if ($result < 0) $error++; + // End call triggers + //FIXME: Add rollback if trigger fail + return $this->id; } else @@ -165,12 +165,12 @@ class Localtax extends CommonObject if (! $notrigger) { - // Appel des triggers - include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $interface=new Interfaces($this->db); - $result=$interface->run_triggers('LOCALTAX_MODIFY',$this,$user,$langs,$conf); - if ($result < 0) { $error++; $this->errors=$interface->errors; } - // Fin appel triggers + // Call trigger + $result=$this->call_trigger('LOCALTAX_MODIFY',$user); + if ($result < 0) $error++; + // End call triggers + + //FIXME: Add rollback if trigger fail } return 1; @@ -253,6 +253,12 @@ class Localtax extends CommonObject $error=0; + // Call trigger + $result=$this->call_trigger('LOCALTAX_DELETE',$user); + if ($result < 0) return -1; + // End call triggers + + $sql = "DELETE FROM ".MAIN_DB_PREFIX."localtax"; $sql.= " WHERE rowid=".$this->id; @@ -264,12 +270,6 @@ class Localtax extends CommonObject return -1; } - // Appel des triggers - include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $interface=new Interfaces($this->db); - $result=$interface->run_triggers('LOCALTAX_DELETE',$this,$user,$langs,$conf); - if ($result < 0) { $error++; $this->errors=$interface->errors; } - // Fin appel triggers return 1; } From a7afb5bdae384d62f735754b081c8af742809e99 Mon Sep 17 00:00:00 2001 From: KreizIT Date: Fri, 11 Jul 2014 14:54:32 +0200 Subject: [PATCH 158/258] Refactor: PAIEMENT_SALARY_* trigger --- .../salaries/class/paymentsalary.class.php | 56 +++++++------------ 1 file changed, 19 insertions(+), 37 deletions(-) diff --git a/htdocs/compta/salaries/class/paymentsalary.class.php b/htdocs/compta/salaries/class/paymentsalary.class.php index c2fc0c9c23a..234b70d84b9 100644 --- a/htdocs/compta/salaries/class/paymentsalary.class.php +++ b/htdocs/compta/salaries/class/paymentsalary.class.php @@ -124,14 +124,12 @@ class PaymentSalary extends CommonObject if (! $notrigger) { - // Start triggers - include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $interface=new Interfaces($this->db); - $result=$interface->run_triggers('PAYMENT_SALARY_MODIFY',$this,$user,$langs,$conf); - if ($result < 0) { - $error++; $this->errors=$interface->errors; - } - // End triggers + // Call trigger + $result=$this->call_trigger('PAYMENT_SALARY_MODIFY',$user); + if ($result < 0) $error++; + // End call triggers + + //FIXME: Add rollback if trigger fail } return 1; @@ -224,6 +222,12 @@ class PaymentSalary extends CommonObject global $conf, $langs; $error=0; + + // Call trigger + $result=$this->call_trigger('PAYMENT_SALARY_DELETE',$user); + if ($result < 0) return -1; + // End call triggers + $sql = "DELETE FROM ".MAIN_DB_PREFIX."payment_salary"; $sql.= " WHERE rowid=".$this->id; @@ -236,15 +240,6 @@ class PaymentSalary extends CommonObject return -1; } - // Start triggers - include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $interface=new Interfaces($this->db); - $result=$interface->run_triggers('PAYMENT_SALARY_DELETE',$this,$user,$langs,$conf); - if ($result < 0) { - $error++; $this->errors=$interface->errors; - } - // End triggers - return 1; } @@ -428,34 +423,21 @@ class PaymentSalary extends CommonObject } } - // Start triggers - include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $interface=new Interfaces($this->db); - $result=$interface->run_triggers('PAYMENT_SALARY_CREATE',$this,$user,$langs,$conf); - if ($result < 0) { - $error++; $this->errors=$interface->errors; - } - // End triggers - + // Call trigger + $result=$this->call_trigger('PAYMENT_SALARY_CREATE',$user); + if ($result < 0) $ok=0; + // End call triggers + } else $ok=0; if ($ok) { - if ($ok) - { - $this->db->commit(); - return $this->id; - } - else - { - $this->db->rollback(); - return -3; - } + $this->db->commit(); + return $this->id; } else { - $this->error=$this->db->error(); $this->db->rollback(); return -2; } From 971ae8ae599f67b1f3fc2610ae69cc37fc9865cd Mon Sep 17 00:00:00 2001 From: KreizIT Date: Fri, 11 Jul 2014 15:01:51 +0200 Subject: [PATCH 159/258] Refactor: TVA_* trigger --- htdocs/compta/tva/class/tva.class.php | 54 +++++++++++++-------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/htdocs/compta/tva/class/tva.class.php b/htdocs/compta/tva/class/tva.class.php index b19c1cf627d..312da55f138 100644 --- a/htdocs/compta/tva/class/tva.class.php +++ b/htdocs/compta/tva/class/tva.class.php @@ -121,13 +121,12 @@ class Tva extends CommonObject { $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."tva"); - // Start triggers - include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $interface=new Interfaces($this->db); - $result=$interface->run_triggers('TVA_CREATE',$this,$user,$langs,$conf); - if ($result < 0) { $error++; $this->errors=$interface->errors; } - // End triggers + // Call trigger + $result=$this->call_trigger('TVA_CREATE',$user); + if ($result < 0) $error++; + // End call triggers + //FIXME: Add rollback if trigger fail return $this->id; } else @@ -187,12 +186,12 @@ class Tva extends CommonObject if (! $notrigger) { - // Start triggers - include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $interface=new Interfaces($this->db); - $result=$interface->run_triggers('TVA_MODIFY',$this,$user,$langs,$conf); - if ($result < 0) { $error++; $this->errors=$interface->errors; } - // End triggers + // Call trigger + $result=$this->call_trigger('TVA_MODIFY',$user); + if ($result < 0) $error++; + // End call triggers + + //FIXME: Add rollback if trigger fail } return 1; @@ -279,7 +278,12 @@ class Tva extends CommonObject global $conf, $langs; $error=0; - + + // Call trigger + $result=$this->call_trigger('TVA_DELETE',$user); + if ($result < 0) return -1; + // End call triggers + $sql = "DELETE FROM ".MAIN_DB_PREFIX."tva"; $sql.= " WHERE rowid=".$this->id; @@ -291,12 +295,6 @@ class Tva extends CommonObject return -1; } - // Start triggers - include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $interface=new Interfaces($this->db); - $result=$interface->run_triggers('TVA_DELETE',$this,$user,$langs,$conf); - if ($result < 0) { $error++; $this->errors=$interface->errors; } - // End triggers return 1; } @@ -541,13 +539,16 @@ class Tva extends CommonObject { $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."tva"); // TODO should be called paiementtva - // Start triggers - include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $interface=new Interfaces($this->db); - $result=$interface->run_triggers('TVA_ADDPAYMENT',$this,$user,$langs,$conf); - if ($result < 0) { $error++; $this->errors=$interface->errors; } - // End triggers - + // Call trigger + //XXX: Should be done just befor commit no ? + $result=$this->call_trigger('TVA_ADDPAYMENT',$user); + if ($result < 0) + { + $this->id = 0; + $ok = 0; + } + // End call triggers + if ($this->id > 0) { $ok=1; @@ -595,7 +596,6 @@ class Tva extends CommonObject } else { - $this->error=$this->db->error(); $this->db->rollback(); return -2; } From b8499a80ecd0c57da2e33b2bdc9447918e6b6321 Mon Sep 17 00:00:00 2001 From: KreizIT Date: Fri, 11 Jul 2014 15:08:01 +0200 Subject: [PATCH 160/258] Refactor: LINK_* trigger --- ChangeLog | 3 ++- htdocs/core/class/link.class.php | 43 ++++++++++---------------------- 2 files changed, 15 insertions(+), 31 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6b9acc71682..cf42b44558b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -43,7 +43,8 @@ For developers: - New: Add trigger DON_UPDATE, DON_DELETE - New: Add country iso code on 3 chars into table of countries. - Qual: Removed hard coded rowid into data init of table llx_c_action_trigger. -- LINEBILL_DELETE trigger called before SQL delete in facturedet +- LINEBILL_DELETE trigger called before SQL delete in facturedet +- LINK_DELETE trigger called before SQL delete WARNING: Following change may create regression for some external modules, but was necessary to make Dolibarr better: diff --git a/htdocs/core/class/link.class.php b/htdocs/core/class/link.class.php index 4316d56f4fe..0c7d52f9569 100644 --- a/htdocs/core/class/link.class.php +++ b/htdocs/core/class/link.class.php @@ -99,15 +99,10 @@ class Link extends CommonObject $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX . "links"); if ($this->id > 0) { - // Appel des triggers - include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $interface=new Interfaces($this->db); - $result=$interface->run_triggers('LINK_CREATE', $this, $user, $langs, $conf); - if ($result < 0) { - $error++; - $this->errors = $interface->errors; - } - // Fin appel triggers + // Call trigger + $result=$this->call_trigger('LINK_CREATE',$user); + if ($result < 0) $error++; + // End call triggers } else { $error++; } @@ -190,15 +185,10 @@ class Link extends CommonObject { if ($call_trigger) { - // Appel des triggers - include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $interface = new Interfaces($this->db); - $result = $interface->run_triggers('LINK_MODIFY', $this, $user, $langs, $conf); - if ($result < 0) { - $error++; - $this->errors = $interface->errors; - } - // Fin appel triggers + // Call trigger + $result=$this->call_trigger('LINK_MODIFY',$user); + if ($result < 0) $error++; + // End call triggers } if (! $error) @@ -339,6 +329,11 @@ class Link extends CommonObject dol_syslog(get_class($this)."::delete", LOG_DEBUG); $error = 0; + // Call trigger + $result=$this->call_trigger('LINK_DELETE',$user); + if ($result < 0) return -1; + // End call triggers + $this->db->begin(); // Remove link @@ -353,18 +348,6 @@ class Link extends CommonObject } - if (! $error) { - // Appel des triggers - include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $interface=new Interfaces($this->db); - $result = $interface->run_triggers('LINK_DELETE', $this, $user, $langs, $conf); - if ($result < 0) { - $error++; - $this->errors = $interface->errors; - } - // Fin appel triggers - } - if (! $error) { $this->db->commit(); From bbdaa5992119a1a1fe1bcf784b44d5a51393f7fe Mon Sep 17 00:00:00 2001 From: KreizIT Date: Fri, 11 Jul 2014 15:32:23 +0200 Subject: [PATCH 161/258] Refactor: ORDER_SUPPLIER_* and LINEORDER_SUPPLIER_* trigger --- ChangeLog | 3 +- .../class/fournisseur.commande.class.php | 138 +++++++----------- 2 files changed, 53 insertions(+), 88 deletions(-) diff --git a/ChangeLog b/ChangeLog index cf42b44558b..bf5b4e23044 100644 --- a/ChangeLog +++ b/ChangeLog @@ -43,8 +43,7 @@ For developers: - New: Add trigger DON_UPDATE, DON_DELETE - New: Add country iso code on 3 chars into table of countries. - Qual: Removed hard coded rowid into data init of table llx_c_action_trigger. -- LINEBILL_DELETE trigger called before SQL delete in facturedet -- LINK_DELETE trigger called before SQL delete +- LINEBILL_DELETE, LINK_DELETE, ORDER_SUPPLIER_DELETE trigger called before SQL delete WARNING: Following change may create regression for some external modules, but was necessary to make Dolibarr better: diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index 19432c09b78..147cf2c39e2 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -388,18 +388,14 @@ class CommandeFournisseur extends CommonOrder if (! $error) { - // Appel des triggers - include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $interface=new Interfaces($this->db); - $result=$interface->run_triggers('ORDER_SUPPLIER_VALIDATE',$this,$user,$langs,$conf); - if ($result < 0) + // Call trigger + $result=$this->call_trigger('ORDER_SUPPLIER_VALIDATE',$user); + if ($result < 0) { - $error++; - $this->errors=$interface->errors; $this->db->rollback(); return -1; } - // Fin appel triggers + // End call triggers } if (! $error) @@ -653,12 +649,10 @@ class CommandeFournisseur extends CommonOrder if (! $error) { - // Appel des triggers - include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $interface=new Interfaces($this->db); - $result=$interface->run_triggers('ORDER_SUPPLIER_APPROVE',$this,$user,$langs,$conf); - if ($result < 0) { $error++; $this->errors=$interface->errors; } - // Fin appel triggers + // Call trigger + $result=$this->call_trigger('ORDER_SUPPLIER_APPROVE',$user); + if ($result < 0) $error++; + // End call triggers } if (! $error) @@ -714,17 +708,16 @@ class CommandeFournisseur extends CommonOrder if ($error == 0) { - // Appel des triggers - include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $interface=new Interfaces($this->db); - $result=$interface->run_triggers('ORDER_SUPPLIER_REFUSE',$this,$user,$langs,$conf); - if ($result < 0) + // Call trigger + $result=$this->call_trigger('ORDER_SUPPLIER_REFUSE',$user); + if ($result < 0) { $error++; - $this->errors=$interface->errors; $this->db->rollback(); } - // Fin appel triggers + else + $this->db->commit(); + // End call triggers } } else @@ -772,12 +765,10 @@ class CommandeFournisseur extends CommonOrder $result = 0; $this->log($user, $statut, time()); - // Appel des triggers - include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $interface=new Interfaces($this->db); - $result=$interface->run_triggers('ORDER_SUPPLIER_CANCEL',$this,$user,$langs,$conf); - if ($result < 0) { $error++; $this->errors=$interface->errors; } - // Fin appel triggers + // Call trigger + $result=$this->call_trigger('ORDER_SUPPLIER_CANCEL',$user); + if ($result < 0) $error++; + // End call triggers if ($error == 0) { @@ -967,18 +958,14 @@ class CommandeFournisseur extends CommonOrder if (! $notrigger) { - // Appel des triggers - include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $interface=new Interfaces($this->db); - $result=$interface->run_triggers('ORDER_SUPPLIER_CREATE',$this,$user,$langs,$conf); - if ($result < 0) + // Call trigger + $result=$this->call_trigger('ORDER_SUPPLIER_CREATE',$user); + if ($result < 0) { - $error++; - $this->errors=$interface->errors; $this->db->rollback(); return -1; } - // Fin appel triggers + // End call triggers } $this->db->commit(); @@ -1041,12 +1028,10 @@ class CommandeFournisseur extends CommonOrder if ($reshook < 0) $error++; } - // Appel des triggers - include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $interface=new Interfaces($this->db); - $result=$interface->run_triggers('ORDER_SUPPLIER_CLONE',$this,$user,$langs,$conf); - if ($result < 0) { $error++; $this->errors=$interface->errors; } - // Fin appel triggers + // Call trigger + $result=$this->call_trigger('ORDER_SUPPLIER_CLONE',$user); + if ($result < 0) $error++; + // End call triggers } // End @@ -1222,18 +1207,14 @@ class CommandeFournisseur extends CommonOrder if (! $notrigger) { global $conf, $langs, $user; - // Appel des triggers - include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $interface=new Interfaces($this->db); - $result=$interface->run_triggers('LINEORDER_SUPPLIER_CREATE',$this,$user,$langs,$conf); - if ($result < 0) + // Call trigger + $result=$this->call_trigger('LINEORDER_SUPPLIER_CREATE',$user); + if ($result < 0) { - $error++; - $this->errors=$interface->errors; $this->db->rollback(); return -1; } - // Fin appel triggers + // End call triggers } $this->update_price('','auto'); @@ -1295,18 +1276,14 @@ class CommandeFournisseur extends CommonOrder if (! $notrigger) { global $conf, $langs, $user; - // Appel des triggers - include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $interface=new Interfaces($this->db); - $result=$interface->run_triggers('LINEORDER_SUPPLIER_DISPATCH',$this,$user,$langs,$conf); - if ($result < 0) + // Call trigger + $result=$this->call_trigger('LINEORDER_SUPPLIER_DISPATCH',$user); + if ($result < 0) { - $error++; - $this->errors=$interface->errors; $this->db->rollback(); return -1; } - // Fin appel triggers + // End call triggers } $this->db->commit(); @@ -1369,15 +1346,10 @@ class CommandeFournisseur extends CommonOrder if (! $notrigger) { - // Appel des triggers - include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $result = 0; - $interface=new Interfaces($this->db); - $result = $interface->run_triggers('LINEORDER_SUPPLIER_DELETE',$this,$user,$langs,$conf); - if ($result < 0) { - $error++; $this->errors=$interface->errors; - } - // Fin appel triggers + // Call trigger + $result=$this->call_trigger('LINEORDER_SUPPLIER_DELETE',$user); + if ($result < 0) $error++; + // End call triggers } if (! $error) @@ -1424,6 +1396,16 @@ class CommandeFournisseur extends CommonOrder require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; $error = 0; + + // Call trigger + $result=$this->call_trigger('ORDER_SUPPLIER_DELETE',$user); + if ($result < 0) + { + dol_syslog(get_class($this)."::delete ".$this->error, LOG_ERR); + return -1; + } + // End call triggers + $this->db->begin(); @@ -1461,18 +1443,6 @@ class CommandeFournisseur extends CommonOrder } } - if (! $error) - { - // Appel des triggers - include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $interface=new Interfaces($this->db); - $result=$interface->run_triggers('ORDER_SUPPLIER_DELETE',$this,$user,$langs,$conf); - if ($result < 0) { - $error++; $this->errors=$interface->errors; - } - // Fin appel triggers - } - if (! $error) { // We remove directory @@ -1828,18 +1798,14 @@ class CommandeFournisseur extends CommonOrder if (! $notrigger) { global $conf, $langs, $user; - // Appel des triggers - include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $interface=new Interfaces($this->db); - $result=$interface->run_triggers('LINEORDER_SUPPLIER_UPDATE',$this,$user,$langs,$conf); - if ($result < 0) + // Call trigger + $result=$this->call_trigger('LINEORDER_SUPPLIER_UPDATE',$user); + if ($result < 0) { - $error++; - $this->errors=$interface->errors; $this->db->rollback(); return -1; } - // Fin appel triggers + // End call triggers } // Mise a jour info denormalisees au niveau facture From 42ef7149fd2465586a0ef8b6b0667f17b5dda80b Mon Sep 17 00:00:00 2001 From: KreizIT Date: Fri, 11 Jul 2014 15:48:25 +0200 Subject: [PATCH 162/258] Refactor: BILL_SUPPLIER_* and LINEBILL_SUPPLIER_* trigger --- .../fourn/class/fournisseur.facture.class.php | 97 +++++++------------ 1 file changed, 36 insertions(+), 61 deletions(-) diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php index b01e3ee7891..9feb52a5417 100644 --- a/htdocs/fourn/class/fournisseur.facture.class.php +++ b/htdocs/fourn/class/fournisseur.facture.class.php @@ -254,12 +254,10 @@ class FactureFournisseur extends CommonInvoice $result=$this->update_price(); if ($result > 0) { - // Appel des triggers - include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $interface=new Interfaces($this->db); - $result=$interface->run_triggers('BILL_SUPPLIER_CREATE',$this,$user,$langs,$conf); - if ($result < 0) { $error++; $this->errors=$interface->errors; } - // Fin appel triggers + // Call trigger + $result=$this->call_trigger('BILL_SUPPLIER_CREATE',$user); + if ($result < 0) $error++; + // End call triggers if (! $error) { @@ -601,11 +599,9 @@ class FactureFournisseur extends CommonInvoice { if (! $notrigger) { - // Call triggers - //include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - //$interface=new Interfaces($this->db); - //$result=$interface->run_triggers('BILL_SUPPLIER_MODIFY',$this,$user,$langs,$conf); - //if ($result < 0) { $error++; $this->errors=$interface->errors; } + // Call trigger + //$result=$this->call_trigger('BILL_SUPPLIER_MODIFY',$user); + //if ($result < 0) $error++; // End call triggers } } @@ -673,13 +669,10 @@ class FactureFournisseur extends CommonInvoice if (! $error) { - // Appel des triggers - include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $interface=new Interfaces($this->db); - $result=$interface->run_triggers('BILL_SUPPLIER_DELETE',$this,$user,$langs,$conf); - if ($result < 0) { - $error++; - $this->errors=$interface->errors; + // Call trigger + $result=$this->call_trigger('BILL_SUPPLIER_DELETE',$user); + if ($result < 0) + { $this->db->rollback(); return -1; } @@ -771,12 +764,10 @@ class FactureFournisseur extends CommonInvoice $resql = $this->db->query($sql); if ($resql) { - // Appel des triggers - include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $interface=new Interfaces($this->db); - $result=$interface->run_triggers('BILL_SUPPLIER_PAYED',$this,$user,$langs,$conf); - if ($result < 0) { $error++; $this->errors=$interface->errors; } - // Fin appel triggers + // Call trigger + $result=$this->call_trigger('BILL_SUPPLIER_PAYED',$user); + if ($result < 0) $error++; + // End call triggers } else { @@ -821,12 +812,10 @@ class FactureFournisseur extends CommonInvoice $resql = $this->db->query($sql); if ($resql) { - // Appel des triggers - include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $interface=new Interfaces($this->db); - $result=$interface->run_triggers('BILL_SUPPLIER_UNPAYED',$this,$user,$langs,$conf); - if ($result < 0) { $error++; $this->errors=$interface->errors; } - // Fin appel triggers + // Call trigger + $result=$this->call_trigger('BILL_SUPPLIER_UNPAYED',$user); + if ($result < 0) $error++; + // End call triggers } else { @@ -962,12 +951,10 @@ class FactureFournisseur extends CommonInvoice // Triggers call if (! $error) { - // Appel des triggers - include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $interface=new Interfaces($this->db); - $result=$interface->run_triggers('BILL_SUPPLIER_VALIDATE',$this,$user,$langs,$conf); - if ($result < 0) { $error++; $this->errors=$interface->errors; } - // Fin appel triggers + // Call trigger + $result=$this->call_trigger('BILL_SUPPLIER_VALIDATE',$user); + if ($result < 0) $error++; + // End call triggers } if (! $error) @@ -1129,18 +1116,14 @@ class FactureFournisseur extends CommonInvoice if (! $notrigger) { global $conf, $langs, $user; - // Appel des triggers - include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $interface=new Interfaces($this->db); - $result=$interface->run_triggers('LINEBILL_SUPPLIER_CREATE',$this,$user,$langs,$conf); - if ($result < 0) + // Call trigger + $result=$this->call_trigger('LINEBILL_SUPPLIER_CREATE',$user); + if ($result < 0) { - $error++; - $this->errors=$interface->errors; $this->db->rollback(); return -1; } - // Fin appel triggers + // End call triggers } $this->db->commit(); @@ -1263,18 +1246,14 @@ class FactureFournisseur extends CommonInvoice if (! $notrigger) { global $conf, $langs, $user; - // Appel des triggers - include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $interface=new Interfaces($this->db); - $result=$interface->run_triggers('LINEBILL_SUPPLIER_UPDATE',$this,$user,$langs,$conf); - if ($result < 0) - { - $error++; - $this->errors=$interface->errors; + // Call trigger + $result=$this->call_trigger('LINEBILL_SUPPLIER_UPDATE',$user); + if ($result < 0) + { $this->db->rollback(); return -1; } - // Fin appel triggers + // End call triggers } // Update total price into invoice record @@ -1312,14 +1291,10 @@ class FactureFournisseur extends CommonInvoice if (! $error && ! $notrigger) { - // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/core/class/interfaces.class.php"); - $interface=new Interfaces($this->db); - $result=$interface->run_triggers('LINEBILL_SUPPLIER_DELETE',$this,$user,$langs,$conf); - if ($result < 0) { - $error++; $this->errors=$interface->errors; - } - // Fin appel triggers + // Call trigger + $result=$this->call_trigger('LINEBILL_SUPPLIER_DELETE',$user); + if ($result < 0) $error++; + // End call triggers } if (! $error) From 5093fecc6045cf6458c023347be975f55ec46899 Mon Sep 17 00:00:00 2001 From: KreizIT Date: Fri, 11 Jul 2014 15:50:40 +0200 Subject: [PATCH 163/258] Refactor: SUPPLIER_PRODUCT_BUYPRICE_ * trigger --- .../fourn/class/fournisseur.product.class.php | 24 +++++++------------ 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/htdocs/fourn/class/fournisseur.product.class.php b/htdocs/fourn/class/fournisseur.product.class.php index a384f6ea219..b9cd7f40163 100644 --- a/htdocs/fourn/class/fournisseur.product.class.php +++ b/htdocs/fourn/class/fournisseur.product.class.php @@ -203,14 +203,10 @@ class ProductFournisseur extends Product $resql = $this->db->query($sql); if ($resql) { - // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/core/class/interfaces.class.php"); - $interface=new Interfaces($this->db); - $result=$interface->run_triggers('SUPPLIER_PRODUCT_BUYPRICE_UPDATE',$this,$user,$langs,$conf); - if ($result < 0) - { - $error++; $this->error=$interface->errors; - } + // Call trigger + $result=$this->call_trigger('SUPPLIER_PRODUCT_BUYPRICE_UPDATE',$user); + if ($result < 0) $error++; + // End call triggers if (empty($error)) { @@ -289,14 +285,10 @@ class ProductFournisseur extends Product if (! $error) { - // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/core/class/interfaces.class.php"); - $interface=new Interfaces($this->db); - $result=$interface->run_triggers('SUPPLIER_PRODUCT_BUYPRICE_CREATE',$this,$user,$langs,$conf); - if ($result < 0) - { - $error++; $this->error=$interface->errors; - } + // Call trigger + $result=$this->call_trigger('SUPPLIER_PRODUCT_BUYPRICE_CREATE',$user); + if ($result < 0) $error++; + // End call triggers if (empty($error)) { From b9df48d48c72558aff58d826158e42fc6cb774c3 Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Fri, 11 Jul 2014 15:53:31 +0200 Subject: [PATCH 164/258] Fix http://www.dolibarr.fr/forum/527-bugs-sur-la-version-stable-courante/50854-multi-societe-options-cookies --- htdocs/core/class/cookie.class.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/htdocs/core/class/cookie.class.php b/htdocs/core/class/cookie.class.php index a45aaeb2423..39d27d9a332 100644 --- a/htdocs/core/class/cookie.class.php +++ b/htdocs/core/class/cookie.class.php @@ -91,7 +91,9 @@ class DolCookie $num = (count($this->cookiearray) - 2); for ($f = 0; $f <= $num; $f++) { - $this->myValue .= strval(chr($this->cookiearray[$f]/$this->myKey)); + if (!empty($this->myKey)) { + $this->myValue .= strval(chr($this->cookiearray[$f]/$this->myKey)); + } } return(base64_decode($this->myValue)); From 5e7c0639b0aa00d0d0c4cda3283819c94517103e Mon Sep 17 00:00:00 2001 From: KreizIT Date: Fri, 11 Jul 2014 16:02:27 +0200 Subject: [PATCH 165/258] Refactor: various trigger --- htdocs/fourn/class/paiementfourn.class.php | 10 ++++------ htdocs/fourn/commande/dispatch.php | 9 +++------ htdocs/imports/class/import.class.php | 10 ++++------ .../class/opensurveysondage.class.php | 20 ++++++++----------- .../stock/class/mouvementstock.class.php | 12 +++++------ 5 files changed, 25 insertions(+), 36 deletions(-) diff --git a/htdocs/fourn/class/paiementfourn.class.php b/htdocs/fourn/class/paiementfourn.class.php index 6fff76e2ca0..02010d1e2e8 100644 --- a/htdocs/fourn/class/paiementfourn.class.php +++ b/htdocs/fourn/class/paiementfourn.class.php @@ -201,12 +201,10 @@ class PaiementFourn extends Paiement if (! $error) { - // Appel des triggers - include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $interface=new Interfaces($this->db); - $result=$interface->run_triggers('PAYMENT_SUPPLIER_CREATE',$this,$user,$langs,$conf); - if ($result < 0) { $error++; $this->errors=$interface->errors; } - // Fin appel triggers + // Call trigger + $result=$this->call_trigger('PAYMENT_SUPPLIER_CREATE',$user); + if ($result < 0) $error++; + // End call triggers } } else diff --git a/htdocs/fourn/commande/dispatch.php b/htdocs/fourn/commande/dispatch.php index 02666e1c855..bea467340e6 100644 --- a/htdocs/fourn/commande/dispatch.php +++ b/htdocs/fourn/commande/dispatch.php @@ -120,12 +120,9 @@ if ($_POST["action"] == 'dispatch' && $user->rights->fournisseur->commande->rece if (! $notrigger) { global $conf, $langs, $user; - // Appel des triggers - include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $interface=new Interfaces($db); - $result_trigger=$interface->run_triggers('ORDER_SUPPLIER_DISPATCH',$commande,$user,$langs,$conf); - if ($result_trigger < 0) { $error++; $commande->errors=$interface->errors; } - // Fin appel triggers + // Call trigger + $result=$commande->call_trigger('ORDER_SUPPLIER_DISPATCH',$user); + // End call triggers } if ($result > 0) diff --git a/htdocs/imports/class/import.class.php b/htdocs/imports/class/import.class.php index e4acc733a85..58a1bf3e931 100644 --- a/htdocs/imports/class/import.class.php +++ b/htdocs/imports/class/import.class.php @@ -313,12 +313,10 @@ class Import { if (! $notrigger) { - // Call triggers - include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $interface=new Interfaces($this->db); - $result=$interface->run_triggers('IMPORT_DELETE',$this,$user,$langs,$conf); - if ($result < 0) { $error++; $this->errors=$interface->errors; } - // End call triggers + // Call trigger + $result=$this->call_trigger('IMPORT_DELETE',$user); + if ($result < 0) $error++; + // End call triggers } } diff --git a/htdocs/opensurvey/class/opensurveysondage.class.php b/htdocs/opensurvey/class/opensurveysondage.class.php index 8f3f3fccff8..58351527e6e 100644 --- a/htdocs/opensurvey/class/opensurveysondage.class.php +++ b/htdocs/opensurvey/class/opensurveysondage.class.php @@ -142,12 +142,10 @@ class Opensurveysondage extends CommonObject { global $langs, $conf; - //// Call triggers - include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $interface=new Interfaces($this->db); - $result=$interface->run_triggers('OPENSURVEY_CREATE',$this,$user,$langs,$conf); - if ($result < 0) { $error++; $this->errors=$interface->errors; } - //// End call triggers + // Call trigger + $result=$this->call_trigger('OPENSURVEY_CREATE',$user); + if ($result < 0) $error++; + // End call triggers } } @@ -338,12 +336,10 @@ class Opensurveysondage extends CommonObject { if (! $notrigger) { - //// Call triggers - include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $interface=new Interfaces($this->db); - $result=$interface->run_triggers('OPENSURVEY_DELETE',$this,$user,$langs,$conf); - if ($result < 0) { $error++; $this->errors=$interface->errors; } - //// End call triggers + // Call trigger + $result=$this->call_trigger('OPENSURVEY_DELETE',$user); + if ($result < 0) $error++; + // End call triggers } } diff --git a/htdocs/product/stock/class/mouvementstock.class.php b/htdocs/product/stock/class/mouvementstock.class.php index 747a737f389..8219da2b814 100644 --- a/htdocs/product/stock/class/mouvementstock.class.php +++ b/htdocs/product/stock/class/mouvementstock.class.php @@ -245,17 +245,17 @@ class MouvementStock if ($movestock && ! $error) { - // Appel des triggers - include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $interface=new Interfaces($this->db); $this->product_id = $fk_product; $this->entrepot_id = $entrepot_id; $this->qty = $qty; - $result=$interface->run_triggers('STOCK_MOVEMENT',$this,$user,$langs,$conf); - if ($result < 0) { $error++; $this->errors=$interface->errors; } - // Fin appel triggers + // Call trigger + $result=$this->call_trigger('STOCK_MOVEMENT',$user); + if ($result < 0) $error++; + // End call triggers + + //FIXME: Restore previous value of product_id, entrepot_id, qty if trigger fail } if (! $error) From ca97c0bef3f271896c5cd7418fead986854bed75 Mon Sep 17 00:00:00 2001 From: KreizIT Date: Fri, 11 Jul 2014 16:06:06 +0200 Subject: [PATCH 166/258] Refactor: RESOURCE_* trigger --- ChangeLog | 2 +- htdocs/resource/class/resource.class.php | 35 +++++++++--------------- 2 files changed, 14 insertions(+), 23 deletions(-) diff --git a/ChangeLog b/ChangeLog index bf5b4e23044..4a745ca0e9f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -43,7 +43,7 @@ For developers: - New: Add trigger DON_UPDATE, DON_DELETE - New: Add country iso code on 3 chars into table of countries. - Qual: Removed hard coded rowid into data init of table llx_c_action_trigger. -- LINEBILL_DELETE, LINK_DELETE, ORDER_SUPPLIER_DELETE trigger called before SQL delete +- LINEBILL_DELETE, LINK_DELETE, ORDER_SUPPLIER_DELETE, RESOURCE_DELETE trigger called before SQL delete WARNING: Following change may create regression for some external modules, but was necessary to make Dolibarr better: diff --git a/htdocs/resource/class/resource.class.php b/htdocs/resource/class/resource.class.php index 22ae2f36bde..f9eacda124a 100644 --- a/htdocs/resource/class/resource.class.php +++ b/htdocs/resource/class/resource.class.php @@ -331,7 +331,15 @@ class Resource extends CommonObject global $user,$langs,$conf; $error=0; - + + if (! $notrigger) + { + // Call trigger + $result=$this->call_trigger('RESOURCE_DELETE',$user); + if ($result < 0) return -1; + // End call triggers + } + $sql = "DELETE FROM ".MAIN_DB_PREFIX."resource"; $sql.= " WHERE rowid =".$rowid; @@ -343,18 +351,6 @@ class Resource extends CommonObject dol_syslog(get_class($this)."::delete", LOG_DEBUG); if ($this->db->query($sql)) { - if (! $notrigger) - { - // Call triggers - include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $interface=new Interfaces($this->db); - $result=$interface->run_triggers('RESOURCE_DELETE',$this,$user,$langs,$conf); - if ($result < 0) { - $error++; $this->errors=$interface->errors; - } - // End call triggers - } - return 1; } else { @@ -734,15 +730,10 @@ class Resource extends CommonObject { if (! $notrigger) { - // Uncomment this and change MYOBJECT to your own tag if you - // want this action calls a trigger. - - // Call triggers - include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $interface=new Interfaces($this->db); - $result=$interface->run_triggers('RESOURCE_MODIFY',$this,$user,$langs,$conf); - if ($result < 0) { $error++; $this->errors=$interface->errors; } - // End call triggers + // Call trigger + $result=$this->call_trigger('RESOURCE_MODIFY',$user); + if ($result < 0) $error++; + // End call triggers } } From 2d8fee8adb3819b3710fe1fbde664a818dbc7121 Mon Sep 17 00:00:00 2001 From: KreizIT Date: Fri, 11 Jul 2014 16:09:07 +0200 Subject: [PATCH 167/258] Refactor: COMPANY_* trigger --- htdocs/societe/class/societe.class.php | 33 ++++++++++---------------- 1 file changed, 12 insertions(+), 21 deletions(-) diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index 2b519a686cd..814ed4832b3 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -441,12 +441,10 @@ class Societe extends CommonObject if ($ret >= 0) { - // Appel des triggers - include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $interface=new Interfaces($this->db); - $result=$interface->run_triggers('COMPANY_CREATE',$this,$user,$langs,$conf); - if ($result < 0) { $error++; $this->errors=$interface->errors; } - // Fin appel triggers + // Call trigger + $result=$this->call_trigger('COMPANY_CREATE',$user); + if ($result < 0) $error++; + // End call triggers } else $error++; @@ -879,12 +877,10 @@ class Societe extends CommonObject if (! $error && $call_trigger) { - // Appel des triggers - include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $interface=new Interfaces($this->db); - $result=$interface->run_triggers('COMPANY_MODIFY',$this,$user,$langs,$conf); - if ($result < 0) { $error++; $this->errors=$interface->errors; } - // Fin appel triggers + // Call trigger + $result=$this->call_trigger('COMPANY_MODIFY',$user); + if ($result < 0) $error++; + // End call triggers } if (! $error) @@ -1247,15 +1243,10 @@ class Societe extends CommonObject { $this->db->begin(); - if (! $error) - { - // Appel des triggers - include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - $interface=new Interfaces($this->db); - $result=$interface->run_triggers('COMPANY_DELETE',$this,$user,$langs,$conf); - if ($result < 0) { $error++; $this->errors=$interface->errors; } - // Fin appel triggers - } + // Call trigger + $result=$this->call_trigger('COMPANY_DELETE',$user); + if ($result < 0) $error++; + // End call triggers if (! $error) { From 33f293ae195e482e148eec67b67b8bde6443926c Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Fri, 11 Jul 2014 16:12:31 +0200 Subject: [PATCH 168/258] Use good translation --- htdocs/contrat/fiche.php | 7 ++++--- htdocs/contrat/liste.php | 3 ++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/htdocs/contrat/fiche.php b/htdocs/contrat/fiche.php index 51c1202318d..4110f700855 100644 --- a/htdocs/contrat/fiche.php +++ b/htdocs/contrat/fiche.php @@ -47,6 +47,7 @@ $langs->load("orders"); $langs->load("companies"); $langs->load("bills"); $langs->load("products"); +$langs->load('compta'); $action=GETPOST('action','alpha'); $confirm=GETPOST('confirm','alpha'); @@ -876,7 +877,7 @@ if ($action == 'create') print ''.$langs->trans('Ref').''.$langs->trans("Draft").''; // Ref Int - print ''.$langs->trans('ExternalRef').''; + print ''.$langs->trans('RefExt').''; print ''; // Customer @@ -1068,9 +1069,9 @@ else print ''; print ''; - print $form->editfieldkey("ExternalRef",'ref_ext',$object->ref_ext,$object,$user->rights->contrat->creer); + print $form->editfieldkey("RefExt",'ref_ext',$object->ref_ext,$object,$user->rights->contrat->creer); print ''; - print $form->editfieldval("ExternalRef",'ref_ext',$object->ref_ext,$object,$user->rights->contrat->creer); + print $form->editfieldval("RefExt",'ref_ext',$object->ref_ext,$object,$user->rights->contrat->creer); print ''; print ''; diff --git a/htdocs/contrat/liste.php b/htdocs/contrat/liste.php index a13cfc8652a..58701a49d2e 100644 --- a/htdocs/contrat/liste.php +++ b/htdocs/contrat/liste.php @@ -30,6 +30,7 @@ require_once (DOL_DOCUMENT_ROOT."/contrat/class/contrat.class.php"); $langs->load("contracts"); $langs->load("products"); $langs->load("companies"); +$langs->load("compta"); $sortfield=GETPOST('sortfield','alpha'); $sortorder=GETPOST('sortorder','alpha'); @@ -114,7 +115,7 @@ if ($resql) $param.='&search_nom='.$search_nom; $param.='&search_ref_ext='.$search_ref_ext; print_liste_field_titre($langs->trans("Ref"), $_SERVER["PHP_SELF"], "c.rowid","","$param",'',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("ExternalRef"), $_SERVER["PHP_SELF"], "c.ref_ext","","$param",'',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("RefExt"), $_SERVER["PHP_SELF"], "c.ref_ext","","$param",'',$sortfield,$sortorder); print_liste_field_titre($langs->trans("Company"), $_SERVER["PHP_SELF"], "s.nom","","$param",'',$sortfield,$sortorder); //print_liste_field_titre($langs->trans("DateCreation"), $_SERVER["PHP_SELF"], "c.datec","","$param",'align="center"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("DateContract"), $_SERVER["PHP_SELF"], "c.date_contrat","","$param",'align="center"',$sortfield,$sortorder); From f1ef8b8faadc9224eac08d44fe89b598f5e3c139 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 11 Jul 2014 17:34:01 +0200 Subject: [PATCH 169/258] Comment entries --- htdocs/install/mysql/data/llx_c_typent.sql | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/htdocs/install/mysql/data/llx_c_typent.sql b/htdocs/install/mysql/data/llx_c_typent.sql index 8349cd13a5a..7912f1fdab2 100644 --- a/htdocs/install/mysql/data/llx_c_typent.sql +++ b/htdocs/install/mysql/data/llx_c_typent.sql @@ -41,5 +41,6 @@ insert into llx_c_typent (id,code,libelle,fk_country,active) values ( 6, 'TE_WH insert into llx_c_typent (id,code,libelle,fk_country,active) values ( 7, 'TE_RETAIL', 'Revendeur', NULL, 0); insert into llx_c_typent (id,code,libelle,fk_country,active) values ( 8, 'TE_PRIVATE', 'Particulier', NULL, 1); insert into llx_c_typent (id,code,libelle,fk_country,active) values (100, 'TE_OTHER', 'Autres', NULL, 1); -insert into llx_c_typent (id,code,libelle,fk_country,active) values (231, 'TE_A1', 'Type A', 23, 1); -insert into llx_c_typent (id,code,libelle,fk_country,active) values (232, 'TE_B2', 'Type B', 23, 1); +--insert into llx_c_typent (id,code,libelle,fk_country,active) values (231, 'TE_A_RI', 'Responsable Inscripto', 23, 1); +--insert into llx_c_typent (id,code,libelle,fk_country,active) values (232, 'TE_B_RNI', 'Responsable No Inscripto', 23, 1); +--insert into llx_c_typent (id,code,libelle,fk_country,active) values (233, 'TE_C_FE', 'Consumidor Final/Exento', 23, 1); From 2766b1d8f153f20425ac22a12e65301577641ce1 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 11 Jul 2014 17:43:57 +0200 Subject: [PATCH 170/258] Add record for argentina but disabled by default. --- htdocs/install/mysql/data/llx_c_typent.sql | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/install/mysql/data/llx_c_typent.sql b/htdocs/install/mysql/data/llx_c_typent.sql index 7912f1fdab2..918230cc5a3 100644 --- a/htdocs/install/mysql/data/llx_c_typent.sql +++ b/htdocs/install/mysql/data/llx_c_typent.sql @@ -41,6 +41,6 @@ insert into llx_c_typent (id,code,libelle,fk_country,active) values ( 6, 'TE_WH insert into llx_c_typent (id,code,libelle,fk_country,active) values ( 7, 'TE_RETAIL', 'Revendeur', NULL, 0); insert into llx_c_typent (id,code,libelle,fk_country,active) values ( 8, 'TE_PRIVATE', 'Particulier', NULL, 1); insert into llx_c_typent (id,code,libelle,fk_country,active) values (100, 'TE_OTHER', 'Autres', NULL, 1); ---insert into llx_c_typent (id,code,libelle,fk_country,active) values (231, 'TE_A_RI', 'Responsable Inscripto', 23, 1); ---insert into llx_c_typent (id,code,libelle,fk_country,active) values (232, 'TE_B_RNI', 'Responsable No Inscripto', 23, 1); ---insert into llx_c_typent (id,code,libelle,fk_country,active) values (233, 'TE_C_FE', 'Consumidor Final/Exento', 23, 1); +insert into llx_c_typent (id,code,libelle,fk_country,active) values (231, 'TE_A_RI', 'Responsable Inscripto', 23, 0); +insert into llx_c_typent (id,code,libelle,fk_country,active) values (232, 'TE_B_RNI', 'Responsable No Inscripto', 23, 0); +insert into llx_c_typent (id,code,libelle,fk_country,active) values (233, 'TE_C_FE', 'Consumidor Final/Exento', 23, 0); From 78ce6c0b1cf25fe75f8920e951dbe56d79960eb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Doursenaud?= Date: Fri, 11 Jul 2014 19:57:51 +0200 Subject: [PATCH 171/258] Added labels on form elements for company creation --- htdocs/core/class/html.formcompany.class.php | 2 +- htdocs/societe/soc.php | 137 +++++++++++-------- 2 files changed, 82 insertions(+), 57 deletions(-) diff --git a/htdocs/core/class/html.formcompany.class.php b/htdocs/core/class/html.formcompany.class.php index 7728080c01b..6f868dd81c8 100644 --- a/htdocs/core/class/html.formcompany.class.php +++ b/htdocs/core/class/html.formcompany.class.php @@ -453,7 +453,7 @@ class FormCompany if ($resql) { $out.= '
'; - $out.= ''; if ($country_codeid) $out.= ''; $num = $this->db->num_rows($resql); diff --git a/htdocs/societe/soc.php b/htdocs/societe/soc.php index a0eec6ffbc8..1308ba24f52 100644 --- a/htdocs/societe/soc.php +++ b/htdocs/societe/soc.php @@ -772,11 +772,15 @@ else print '
'; print $langs->trans("ThirdPartyType").':     '; print '
'; - print ' '.$langs->trans("Company/Fundation"); + print ''; + print ''; print '     '; - print ' '.$langs->trans("Individual"); + print ''; + print ' '; + print $langs->trans("Individual"); print ' ('.$langs->trans("ToCreateContactWithSameName").')'; print '
'; print "
\n"; @@ -800,7 +804,10 @@ else // Name, firstname if ($object->particulier || $private) { - print ''.$langs->trans('LastName').'global->SOCIETE_USEPREFIX)?' colspan="3"':'').'>'; + print ''; + print ''; + print 'global->SOCIETE_USEPREFIX)?' colspan="3"':'').'>'; + print ''; if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field { print ''.$langs->trans('Prefix').''; @@ -809,8 +816,11 @@ else } else { - print ''.$langs->trans('ThirdPartyName').'global->SOCIETE_USEPREFIX)?' colspan="3"':'').'>'; - if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field + print ''; + print ''; + print 'global->SOCIETE_USEPREFIX)?' colspan="3"':'').'>'; + print ''; + if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field1 { print ''.$langs->trans('Prefix').''; } @@ -819,9 +829,10 @@ else // If javascript on, we show option individual if ($conf->use_javascript_ajax) { - print ''.$langs->trans('FirstName').''; + print ''; + print ''; print ' '; - print ''.$langs->trans("UserTitle").''; + print ''; print $formcompany->select_civility($object->civility_id).''; print ' '; } @@ -835,11 +846,11 @@ else print ''; print ''; - print ''.$langs->trans('CustomerCode').''; + print ''; print ''; - print '
'; $tmpcode=$object->code_client; if (empty($tmpcode) && ! empty($modCodeClient->code_auto)) $tmpcode=$modCodeClient->getNextValue($object,0); - print ''; + print ''; print ''; $s=$modCodeClient->getToolTip($langs,$object,0); print $form->textwithpicto('',$s,1); @@ -853,11 +864,11 @@ else print ''.$langs->trans('Supplier').''; print $form->selectyesno("fournisseur",(isset($_POST['fournisseur'])?GETPOST('fournisseur'):$object->fournisseur),1); print ''.$langs->trans('SupplierCode').''; + print ''; print ''; + print ''; } @@ -883,40 +895,44 @@ else print ''; // Zip / Town - print ''; // Country - print ''; // State if (empty($conf->global->SOCIETE_DISABLE_STATE)) { - print ''; } // Email web - print ''; + print ''; + print ''; print ''; // Skype if (! empty($conf->skype->enabled)) { - print ''; + print ''; + print ''; } // Phone / Fax - print ''; - print ''; + print ''; + print ''; + print ''; + print ''; // Prof ids $i=1; $j=0; @@ -948,9 +964,9 @@ else print ''; - print ''; + print ''; print ''; // Legal Form - print ''; + print ''; print ''; // Capital - print ''; + print ''; // Local Taxes @@ -1037,7 +1054,7 @@ else */ if (! empty($conf->global->MAIN_MULTILANGS)) { - print ''; print ''; @@ -1047,7 +1064,7 @@ else { // Assign a Name print ''; - print ''; + print ''; print ''; @@ -1063,7 +1080,7 @@ else // Ajout du logo print ''; - print ''; + print ''; print ''; @@ -1257,12 +1274,13 @@ else print '
'; $tmpcode=$object->code_fournisseur; if (empty($tmpcode) && ! empty($modCodeFournisseur->code_auto)) $tmpcode=$modCodeFournisseur->getNextValue($object,1); - print ''; + print ''; print ''; $s=$modCodeFournisseur->getToolTip($langs,$object,1); print $form->textwithpicto('',$s,1); @@ -873,7 +884,8 @@ else // Barcode if (! empty($conf->barcode->enabled)) { - print '
'.$langs->trans('Gencod').''; + print '
'; print '
'.$langs->trans('Zip').''; + print '
'; print $formcompany->select_ziptown($object->zip,'zipcode',array('town','selectcountry_id','state_id'),6); - print ''.$langs->trans('Town').''; + print ''; print $formcompany->select_ziptown($object->town,'town',array('zipcode','selectcountry_id','state_id')); print '
'.$langs->trans('Country').''; - print $form->select_country((GETPOST('country_id')!=''?GETPOST('country_id'):$object->country_id),'country_id'); + print '
'; + print $form->select_country((GETPOST('country_id')!=''?GETPOST('country_id'):$object->country_id)); if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1); print '
'.$langs->trans('State').''; - if ($object->country_id) print $formcompany->select_state($object->state_id,$object->country_code,'state_id'); + print '
'; + if ($object->country_id) print $formcompany->select_state($object->state_id,$object->country_code); else print $countrynotdefined; print '
'.$langs->trans('EMail').(! empty($conf->global->SOCIETE_MAIL_REQUIRED)?'*':'').'
'.$langs->trans('Web').'
'.$langs->trans('Skype').'
'.$langs->trans('Phone').''.$langs->trans('Fax').'
'; print $form->selectyesno('assujtva_value',1,1); // Assujeti par defaut en creation print ''.$langs->trans('VATIntra').''; - $s = ''; + $s = ''; if (empty($conf->global->MAIN_DISABLEVATCHECK)) { @@ -988,7 +1004,7 @@ else print '
'.$langs->trans('JuridicalStatus').'
'; if ($object->country_id) { @@ -1001,7 +1017,8 @@ else print '
'.$langs->trans('Capital').' '; + print '
'; print ''.$langs->trans("Currency".$conf->currency).'
'.$langs->trans("DefaultLang").''."\n"; + print '
'."\n"; print $formadmin->select_language(($object->default_lang?$object->default_lang:$conf->global->MAIN_LANG_DEFAULT),'default_lang',0,0,1); print '
'.$langs->trans("AllocateCommercial").''; $form->select_users((! empty($object->commercial_id)?$object->commercial_id:$user->id),'commercial_id',1); // Add current user by default print '
'.$langs->trans("Logo").''; print ''; print '
'; // Name - print ''; + print ''; + print ''; // Prefix if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field { - print ''; } @@ -1283,18 +1301,18 @@ else if (empty($conf->global->SOCIETE_DISABLE_CUSTOMERS)) print ''; print ''; print ''; - print '
'.$langs->trans('ThirdPartyName').'
'.$langs->trans("Prefix").''; + print '
'; // It does not change the prefix mode using the auto numbering prefix if (($prefixCustomerIsUsed || $prefixSupplierIsUsed) && $object->prefix_comm) { @@ -1271,7 +1289,7 @@ else } else { - print ''; + print ''; } print ''.$langs->trans('CustomerCode').''; + print ''; print ''; - print '"; + print ""; print '\n"; $var=!$var; - print ""; + print ""; print '\n"; @@ -589,20 +589,20 @@ if ($action == 'edit' || $action == 'updateedit') $var=true; $var=!$var; // Note: When option is not set, it must not appears as set on on, because there is no default value for this option - print ""; + print ""; print '
'; if ((!$object->code_client || $object->code_client == -1) && $modCodeClient->code_auto) { $tmpcode=$object->code_client; if (empty($tmpcode) && ! empty($modCodeClient->code_auto)) $tmpcode=$modCodeClient->getNextValue($object,0); - print ''; + print ''; } else if ($object->codeclient_modifiable()) { - print ''; + print ''; } else { @@ -1315,18 +1333,18 @@ else print ''.$langs->trans('Supplier').''; print $form->selectyesno("fournisseur",$object->fournisseur,1); print ''.$langs->trans('SupplierCode').''; + print ''; print ''; + print ''; } @@ -1359,14 +1378,14 @@ else print ''; // Zip / Town - print ''; // Country - print ''; @@ -1374,24 +1393,29 @@ else // State if (empty($conf->global->SOCIETE_DISABLE_STATE)) { - print ''; } // EMail / Web - print ''; - print ''; + print ''; + print ''; + print ''; + print ''; // Skype if (! empty($conf->skype->enabled)) { - print ''; + print ''; + print ''; } // Phone / Fax - print ''; - print ''; + print ''; + print ''; + print ''; + print ''; // Prof ids $i=1; $j=0; @@ -1424,9 +1448,9 @@ else print ''; // VAT Code - print ''; + print ''; print ''; - print ''; // Capital - print ''; + print ''; + print ''; // Default language if (! empty($conf->global->MAIN_MULTILANGS)) { - print ''; print ''; @@ -1539,7 +1564,7 @@ else // Logo print ''; - print ''; + print ''; print ''; print "
'; if ((!$object->code_fournisseur || $object->code_fournisseur == -1) && $modCodeFournisseur->code_auto) { $tmpcode=$object->code_fournisseur; if (empty($tmpcode) && ! empty($modCodeFournisseur->code_auto)) $tmpcode=$modCodeFournisseur->getNextValue($object,1); - print ''; + print ''; } else if ($object->codefournisseur_modifiable()) { - print ''; + print ''; } else { @@ -1344,7 +1362,8 @@ else // Barcode if (! empty($conf->barcode->enabled)) { - print '
'.$langs->trans('Gencod').''; + print '
'; print '
'.$langs->trans('Zip').''; + print '
'; print $formcompany->select_ziptown($object->zip,'zipcode',array('town','selectcountry_id','state_id'),6); - print ''.$langs->trans('Town').''; + print ''; print $formcompany->select_ziptown($object->town,'town',array('zipcode','selectcountry_id','state_id')); print '
'.$langs->trans('Country').''; + print '
'; print $form->select_country((GETPOST('country_id')!=''?GETPOST('country_id'):$object->country_id),'country_id'); if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1); print '
'.$langs->trans('State').''; + print '
'; print $formcompany->select_state($object->state_id,$object->country_code); print '
'.$langs->trans('EMail').(! empty($conf->global->SOCIETE_MAIL_REQUIRED)?'*':'').'
'.$langs->trans('Web').'
'.$langs->trans('Skype').'
'.$langs->trans('Phone').''.$langs->trans('Fax').'
'.$langs->trans('VATIntra').''; - $s =''; + $s =''; if (empty($conf->global->MAIN_DISABLEVATCHECK)) { @@ -1513,17 +1537,18 @@ else if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1); print '
'.$langs->trans('JuridicalStatus').''; + print '
'; print $formcompany->select_juridicalstatus($object->forme_juridique_code,$object->country_code); print '
'.$langs->trans("Capital").' '.$langs->trans("Currency".$conf->currency).'
'.$langs->trans("Currency".$conf->currency).'
'.$langs->trans("DefaultLang").''."\n"; + print '
'."\n"; print $formadmin->select_language($object->default_lang,'default_lang',0,0,1); print '
'.$langs->trans("Logo").''; if ($object->logo) print $form->showphoto('societe',$object,50); $caneditfield=1; From 8a3fbf953316eb0604d74074bd21a41c6c322427 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Doursenaud?= Date: Fri, 11 Jul 2014 20:04:18 +0200 Subject: [PATCH 172/258] Mutualized common code --- htdocs/societe/soc.php | 25 +++++++++---------------- 1 file changed, 9 insertions(+), 16 deletions(-) diff --git a/htdocs/societe/soc.php b/htdocs/societe/soc.php index 1308ba24f52..aad647ec649 100644 --- a/htdocs/societe/soc.php +++ b/htdocs/societe/soc.php @@ -802,30 +802,23 @@ else print ''; // Name, firstname + print 'global->SOCIETE_USEPREFIX)?' colspan="3"':'').'>'; - print ''; - if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field - { - print ''; - } - print ''; } else { - print 'global->SOCIETE_USEPREFIX)?' colspan="3"':'').'>'; - print ''; - if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field1 - { - print ''; - } - print ''; } + print 'global->SOCIETE_USEPREFIX)?' colspan="3"':'').'>'; + print ''; + if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field + { + print ''; + } + print ''; + // If javascript on, we show option individual if ($conf->use_javascript_ajax) { From 1ab938895b3b52cbbb4f4dfe0a9f488cf7d57b65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Doursenaud?= Date: Fri, 11 Jul 2014 20:05:45 +0200 Subject: [PATCH 173/258] Added autofocus to name on company creation --- htdocs/societe/soc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/societe/soc.php b/htdocs/societe/soc.php index aad647ec649..f5c1237ef05 100644 --- a/htdocs/societe/soc.php +++ b/htdocs/societe/soc.php @@ -812,7 +812,7 @@ else print ''; } print 'global->SOCIETE_USEPREFIX)?' colspan="3"':'').'>'; - print ''; + print ''; if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field { print ''; From c1bfe0f6c5f3bf2a9f24ce245ddc5f27d121e768 Mon Sep 17 00:00:00 2001 From: juanjo Date: Fri, 11 Jul 2014 22:00:41 +0200 Subject: [PATCH 174/258] Update ChangeLog: Remove add_photo_web() --- ChangeLog | 1 + 1 file changed, 1 insertion(+) diff --git a/ChangeLog b/ChangeLog index ccf88d47270..b7fff144efe 100644 --- a/ChangeLog +++ b/ChangeLog @@ -108,6 +108,7 @@ removed. You must now use the 6 parameters way. See file modMyModule.class.php f So check that return value is 0 to keep default standard behaviour after hook or 1 to disable default standard behaviour. - Properties "civilite_id" were renamed into "civility_id". +- Remove add_photo_web() that is ot used anymore by core code. From d27ec6306caac651f0f58a7f230cba7f85514211 Mon Sep 17 00:00:00 2001 From: juanjo Date: Fri, 11 Jul 2014 22:00:41 +0200 Subject: [PATCH 175/258] Update ChangeLog: Remove add_photo_web() --- ChangeLog | 1 + 1 file changed, 1 insertion(+) diff --git a/ChangeLog b/ChangeLog index 7c999a2dcd7..ee9b1c94490 100644 --- a/ChangeLog +++ b/ChangeLog @@ -162,6 +162,7 @@ removed. You must now use the 6 parameters way. See file modMyModule.class.php f So check that return value is 0 to keep default standard behaviour after hook, or 1 to disable default standard behaviour. - Properties "civilite_id" were renamed into "civility_id". +- Remove add_photo_web() that is ot used anymore by core code. From ff19a8794164278e5e57ffbb5c511cb73c27ff9e Mon Sep 17 00:00:00 2001 From: KreizIT Date: Fri, 11 Jul 2014 23:40:17 +0200 Subject: [PATCH 176/258] [Task #1481] Enable BILL_SUPPLIER_MODIFY trigger --- ChangeLog | 1 + htdocs/fourn/class/fournisseur.facture.class.php | 8 +++----- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index ee9b1c94490..3abb0d53fb4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -47,6 +47,7 @@ For developers: - New: Add trigger DON_UPDATE, DON_DELETE - New: Add country iso code on 3 chars into table of countries. - Qual: Removed hard coded rowid into data init of table llx_c_action_trigger. +- New: [ Task #1481 ] Add trigger BILL_SUPPLIER_MODIFY. WARNING: Following change may create regression for some external modules, but was necessary to make Dolibarr better: diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php index b01e3ee7891..323d8cb9c47 100644 --- a/htdocs/fourn/class/fournisseur.facture.class.php +++ b/htdocs/fourn/class/fournisseur.facture.class.php @@ -601,11 +601,9 @@ class FactureFournisseur extends CommonInvoice { if (! $notrigger) { - // Call triggers - //include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; - //$interface=new Interfaces($this->db); - //$result=$interface->run_triggers('BILL_SUPPLIER_MODIFY',$this,$user,$langs,$conf); - //if ($result < 0) { $error++; $this->errors=$interface->errors; } + // Call trigger + $result=$this->call_trigger('BILL_SUPPLIER_MODIFY',$user); + if ($result < 0) $error++; // End call triggers } } From 9c2aaf7d235453afbc01e8f5658d81d1b529ca2e Mon Sep 17 00:00:00 2001 From: KreizIT Date: Sat, 12 Jul 2014 00:27:33 +0200 Subject: [PATCH 177/258] [ Task #1495 ] Add trigger LINECONTRACT_CREATE --- ChangeLog | 3 +- htdocs/contrat/class/contrat.class.php | 48 +++++++++++-------- .../interface_90_all_Demo.class.php-NORUN | 8 ++++ .../fourn/class/fournisseur.facture.class.php | 2 +- 4 files changed, 40 insertions(+), 21 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3abb0d53fb4..c0f3852d20c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -47,7 +47,8 @@ For developers: - New: Add trigger DON_UPDATE, DON_DELETE - New: Add country iso code on 3 chars into table of countries. - Qual: Removed hard coded rowid into data init of table llx_c_action_trigger. -- New: [ Task #1481 ] Add trigger BILL_SUPPLIER_MODIFY. +- New: [ Task #1481 ] Add trigger BILL_SUPPLIER_UPDATE. +- New: [ Task #1495 ] Add trigger LINECONTRACT_CREATE. WARNING: Following change may create regression for some external modules, but was necessary to make Dolibarr better: diff --git a/htdocs/contrat/class/contrat.class.php b/htdocs/contrat/class/contrat.class.php index d07aebfebc7..7bf3ac6bc02 100644 --- a/htdocs/contrat/class/contrat.class.php +++ b/htdocs/contrat/class/contrat.class.php @@ -824,6 +824,11 @@ class Contrat extends CommonObject $error=0; $this->db->begin(); + + // Call trigger + $result=$this->call_trigger('CONTRACT_DELETE',$user); + if ($result < 0) { $error++; } + // End call triggers if (! $error) { @@ -909,14 +914,6 @@ class Contrat extends CommonObject } } - if (! $error) - { - // Call trigger - $result=$this->call_trigger('CONTRACT_DELETE',$user); - if ($result < 0) { $error++; } - // End call triggers - } - if (! $error) { // We remove directory @@ -1078,6 +1075,15 @@ class Contrat extends CommonObject $result=$this->update_statut($user); if ($result > 0) { + // Call trigger + $result=$this->call_trigger('LINECONTRACT_CREATE',$user); + if ($result < 0) + { + $this->db->rollback(); + return -1; + } + // End call triggers + $this->db->commit(); return 1; } @@ -1222,6 +1228,15 @@ class Contrat extends CommonObject $result=$this->update_statut($user); if ($result >= 0) { + // Call trigger + $result=$this->call_trigger('LINECONTRACT_UPDATE',$user); + if ($result < 0) + { + $this->db->rollback(); + return -3; + } + // End call triggers + $this->db->commit(); return 1; } @@ -1257,6 +1272,11 @@ class Contrat extends CommonObject if ($this->statut >= 0) { + // Call trigger + $result=$this->call_trigger('LINECONTRACT_DELETE',$user); + if ($result < 0) return -1; + // End call triggers + $this->db->begin(); $sql = "DELETE FROM ".MAIN_DB_PREFIX."contratdet"; @@ -1271,11 +1291,6 @@ class Contrat extends CommonObject return -1; } - // Call trigger - $result=$this->call_trigger('LINECONTRACT_DELETE',$user); - if ($result < 0) { $error++; $this->db->rollback(); return -1; } - // End call triggers - $this->db->commit(); return 1; } @@ -1734,13 +1749,8 @@ class Contrat extends CommonObject /** * Classe permettant la gestion des lignes de contrats */ -class ContratLigne +class ContratLigne extends CommonObject { - var $db; //!< To store db handler - var $error; //!< To return error code (or message) - var $errors=array(); //!< To return several error codes (or messages) - //var $element='contratdet'; //!< Id that identify managed objects - //var $table_element='contratdet'; //!< Name of table without prefix where object is stored var $id; var $ref; diff --git a/htdocs/core/triggers/interface_90_all_Demo.class.php-NORUN b/htdocs/core/triggers/interface_90_all_Demo.class.php-NORUN index 8bc4e42ed3f..4b9d923de03 100644 --- a/htdocs/core/triggers/interface_90_all_Demo.class.php-NORUN +++ b/htdocs/core/triggers/interface_90_all_Demo.class.php-NORUN @@ -417,6 +417,10 @@ class InterfaceDemo { dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); } + elseif ($action == 'LINECONTRACT_CREATE') + { + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + } elseif ($action == 'LINECONTRACT_UPDATE') { dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); @@ -484,6 +488,10 @@ class InterfaceDemo elseif ($action == 'BILL_SUPPLIER_CREATE') { dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + } + elseif ($action == 'BILL_SUPPLIER_UPDATE') + { + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); } elseif ($action == 'BILL_SUPPLIER_DELETE') { diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php index 323d8cb9c47..fe2c4230dd6 100644 --- a/htdocs/fourn/class/fournisseur.facture.class.php +++ b/htdocs/fourn/class/fournisseur.facture.class.php @@ -602,7 +602,7 @@ class FactureFournisseur extends CommonInvoice if (! $notrigger) { // Call trigger - $result=$this->call_trigger('BILL_SUPPLIER_MODIFY',$user); + $result=$this->call_trigger('BILL_SUPPLIER_UPDATE',$user); if ($result < 0) $error++; // End call triggers } From 893240ce213272dd06bb891514ed43a8c4416970 Mon Sep 17 00:00:00 2001 From: Juanjo Menent Date: Sat, 12 Jul 2014 09:48:10 +0200 Subject: [PATCH 178/258] Qual: Uniformize code. Errors --- .../salaries/class/paymentsalary.class.php | 44 ++++++++++--------- 1 file changed, 23 insertions(+), 21 deletions(-) diff --git a/htdocs/compta/salaries/class/paymentsalary.class.php b/htdocs/compta/salaries/class/paymentsalary.class.php index 234b70d84b9..5e728b0cc64 100644 --- a/htdocs/compta/salaries/class/paymentsalary.class.php +++ b/htdocs/compta/salaries/class/paymentsalary.class.php @@ -1,19 +1,20 @@ + * Copyright (C) 2014 Juanjo Menent * -* 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 -* the Free Software Foundation; either version 3 of the License, or -* (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . -*/ + * 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 + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ /** * \file htdocs/compta/salaries/class/paymentsalary.class.php @@ -278,6 +279,8 @@ class PaymentSalary extends CommonObject function create($user) { global $conf,$langs; + + $error=0; // Clean parameters $this->amount=price2num(trim($this->amount)); @@ -351,7 +354,6 @@ class PaymentSalary extends CommonObject $result = $this->db->query($sql); if ($result) { - $ok=1; $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."payment_salary"); @@ -387,10 +389,10 @@ class PaymentSalary extends CommonObject else { $this->error=$acc->error; - $ok=0; + $error++; } - if ($ok) + if (! $error) { // Add link 'payment_salary' in bank_url between payment and bank transaction $url=DOL_URL_ROOT.'/compta/salaries/fiche.php?id='; @@ -399,7 +401,7 @@ class PaymentSalary extends CommonObject if ($result <= 0) { $this->error=$acc->error; - $ok=0; + $error++; } } @@ -419,19 +421,19 @@ class PaymentSalary extends CommonObject if ($result <= 0) { $this->error=$acc->error; - $ok=0; + $error++; } } // Call trigger $result=$this->call_trigger('PAYMENT_SALARY_CREATE',$user); - if ($result < 0) $ok=0; + if ($result < 0) $error++; // End call triggers } - else $ok=0; + else $error++; - if ($ok) + if (! $error) { $this->db->commit(); return $this->id; From 494e5b20a5bd5c8ad2068c500049260580c9a921 Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Sat, 12 Jul 2014 10:17:04 +0200 Subject: [PATCH 179/258] chnagelog --- ChangeLog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 54737e4edd2..0621064fb3c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -37,7 +37,7 @@ For users: - Fix: [ bug #1501 ] DEPLACEMENT_CREATE trigger do not intercept trigger action - Fix: [ bug #1506, #1507 ] ECM trigger error problem - Fix: [ bug #1469 ] Triggers CONTACT_MODIFY and CONTACT_DELETE duplicates error message -- New: [ task #1204 ] add a ref_int contract field +- New: [ task #1204 ] add a External reference to contract For translators: - Update language files. From d02814192f16ecc70b0486b63f01905e3825eba5 Mon Sep 17 00:00:00 2001 From: Juanjo Menent Date: Sat, 12 Jul 2014 10:56:13 +0200 Subject: [PATCH 180/258] Qual: More intuitive if contract ref_ext we say ref. customer Visu: ref. customer is not required --- htdocs/contrat/fiche.php | 8 ++++---- htdocs/contrat/liste.php | 3 ++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/htdocs/contrat/fiche.php b/htdocs/contrat/fiche.php index 4110f700855..e073566c55f 100644 --- a/htdocs/contrat/fiche.php +++ b/htdocs/contrat/fiche.php @@ -3,7 +3,7 @@ * Copyright (C) 2004-2012 Laurent Destailleur * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2006 Andre Cianfarani - * Copyright (C) 2010-2013 Juanjo Menent + * Copyright (C) 2010-2014 Juanjo Menent * Copyright (C) 2013 Christophe Battarel * Copyright (C) 2013-2014 Florian Henry * @@ -877,7 +877,7 @@ if ($action == 'create') print ''; // Ref Int - print ''; + print ''; print ''; // Customer @@ -1069,9 +1069,9 @@ else print ''; print ''; print ''; diff --git a/htdocs/contrat/liste.php b/htdocs/contrat/liste.php index 58701a49d2e..16586b9dd4c 100644 --- a/htdocs/contrat/liste.php +++ b/htdocs/contrat/liste.php @@ -3,6 +3,7 @@ * Copyright (C) 2004-2010 Laurent Destailleur * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2013 Cédric Salvador + * Copyright (C) 2014 Juanjo Menent * * 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 @@ -115,7 +116,7 @@ if ($resql) $param.='&search_nom='.$search_nom; $param.='&search_ref_ext='.$search_ref_ext; print_liste_field_titre($langs->trans("Ref"), $_SERVER["PHP_SELF"], "c.rowid","","$param",'',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("RefExt"), $_SERVER["PHP_SELF"], "c.ref_ext","","$param",'',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("RefCustomer"), $_SERVER["PHP_SELF"], "c.ref_ext","","$param",'',$sortfield,$sortorder); print_liste_field_titre($langs->trans("Company"), $_SERVER["PHP_SELF"], "s.nom","","$param",'',$sortfield,$sortorder); //print_liste_field_titre($langs->trans("DateCreation"), $_SERVER["PHP_SELF"], "c.datec","","$param",'align="center"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("DateContract"), $_SERVER["PHP_SELF"], "c.date_contrat","","$param",'align="center"',$sortfield,$sortorder); From f1853c435b99da33b54794dc293449acefff94ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Doursenaud?= Date: Sat, 12 Jul 2014 12:04:39 +0200 Subject: [PATCH 181/258] More labels and autofocus for thirdparty and contact forms --- htdocs/contact/fiche.php | 114 +++++++++++-------- htdocs/core/class/html.formcompany.class.php | 4 +- htdocs/societe/soc.php | 77 +++++++------ 3 files changed, 112 insertions(+), 83 deletions(-) diff --git a/htdocs/contact/fiche.php b/htdocs/contact/fiche.php index 0d8a26cf81f..4f793fe8538 100644 --- a/htdocs/contact/fiche.php +++ b/htdocs/contact/fiche.php @@ -439,42 +439,45 @@ else print '
'; if ($object->particulier || $private) { - print '
'; print ''; - print ''.$langs->trans('Prefix').'
'; print ''; - print ''.$langs->trans('Prefix').'
'.$langs->trans('Prefix').'
'.$langs->trans('Prefix').'
'.$langs->trans('Ref').''.$langs->trans("Draft").'
'.$langs->trans('RefExt').'
'.$langs->trans('RefCustomer').'
'; - print $form->editfieldkey("RefExt",'ref_ext',$object->ref_ext,$object,$user->rights->contrat->creer); + print $form->editfieldkey("RefCustomer",'ref_ext',$object->ref_ext,$object,$user->rights->contrat->creer); print ''; - print $form->editfieldval("RefExt",'ref_ext',$object->ref_ext,$object,$user->rights->contrat->creer); + print $form->editfieldval("RefCustomer",'ref_ext',$object->ref_ext,$object,$user->rights->contrat->creer); print '
'; // Name - print ''; - print ''; + print ''; + print ''; + print ''; + print ''; // Company if (empty($conf->global->SOCIETE_DISABLE_CONTACTS)) { if ($socid > 0) { - print ''; + print ''; print ''; - print ''; + print ''; print ''; } else { - print ''; } } // Civility - print ''; - print ''; + print ''; + print ''; $colspan=3; if ($conf->use_javascript_ajax && $socid > 0) $colspan=2; // Address if (($objsoc->typent_code == 'TE_PRIVATE' || ! empty($conf->global->CONTACT_USE_COMPANY_ADDRESS)) && dol_strlen(trim($object->address)) == 0) $object->address = $objsoc->address; // Predefined with third party - print ''; + print ''; + print ''; if ($conf->use_javascript_ajax && $socid > 0) { @@ -490,13 +493,13 @@ else // Zip / Town if (($objsoc->typent_code == 'TE_PRIVATE' || ! empty($conf->global->CONTACT_USE_COMPANY_ADDRESS)) && dol_strlen(trim($object->zip)) == 0) $object->zip = $objsoc->zip; // Predefined with third party if (($objsoc->typent_code == 'TE_PRIVATE' || ! empty($conf->global->CONTACT_USE_COMPANY_ADDRESS)) && dol_strlen(trim($object->town)) == 0) $object->town = $objsoc->town; // Predefined with third party - print ''; // Country - print ''; @@ -504,7 +507,7 @@ else // State if (empty($conf->global->SOCIETE_DISABLE_STATE)) { - print ''; - print ''; + print ''; + print ''; + print ''; + print ''; if (($objsoc->typent_code == 'TE_PRIVATE' || ! empty($conf->global->CONTACT_USE_COMPANY_ADDRESS)) && dol_strlen(trim($object->fax)) == 0) $object->fax = $objsoc->fax; // Predefined with third party - print ''; - print ''; + print ''; + print ''; + print ''; + print ''; // EMail if (($objsoc->typent_code == 'TE_PRIVATE' || ! empty($conf->global->CONTACT_USE_COMPANY_ADDRESS)) && dol_strlen(trim($object->email)) == 0) $object->email = $objsoc->email; // Predefined with third party - print ''; + print ''; + print ''; if (! empty($conf->mailing->enabled)) { - print ''; + print ''; + print ''; } else { @@ -539,16 +548,18 @@ else print ''; // Instant message and no email - print ''; + print ''; + print ''; // Skype if (! empty($conf->skype->enabled)) { - print ''; + print ''; + print ''; } // Visibility - print ''; @@ -570,7 +581,7 @@ else print '
'.$langs->trans("Lastname").' / '.$langs->trans("Label").'lastname).'">'.$langs->trans("Firstname").'firstname).'">
lastname).'" autofocus="autofocus">firstname).'">
'.$langs->trans("Company").'
'; print $objsoc->getNomUrl(1); print '
'.$langs->trans("Company").''; + print '
'; print $form->select_company($socid,'socid','',1); print '
'.$langs->trans("UserTitle").''; + print '
'; print $formcompany->select_civility(GETPOST("civility_id",'alpha')?GETPOST("civility_id",'alpha'):$object->civility_id); print '
'.$langs->trans("PostOrFunction").'poste).'">
poste).'">
'.$langs->trans("Address"); - print '
'.$langs->trans("Zip").' / '.$langs->trans("Town").''; + print '
/ '; print $formcompany->select_ziptown((GETPOST("zipcode")?GETPOST("zipcode"):$object->zip),'zipcode',array('town','selectcountry_id','state_id'),6).' '; print $formcompany->select_ziptown((GETPOST("town")?GETPOST("town"):$object->town),'town',array('zipcode','selectcountry_id','state_id')); print '
'.$langs->trans("Country").''; + print '
'; print $form->select_country((GETPOST("country_id",'alpha')?GETPOST("country_id",'alpha'):$object->country_id),'country_id'); if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1); print '
'.$langs->trans('State').''; + print '
'; if ($object->country_id) { print $formcompany->select_state(GETPOST("state_id",'alpha')?GETPOST("state_id",'alpha'):$object->state_id,$object->country_code,'state_id'); @@ -518,19 +521,25 @@ else // Phone / Fax if (($objsoc->typent_code == 'TE_PRIVATE' || ! empty($conf->global->CONTACT_USE_COMPANY_ADDRESS)) && dol_strlen(trim($object->phone_pro)) == 0) $object->phone_pro = $objsoc->phone; // Predefined with third party - print '
'.$langs->trans("PhonePro").'phone_pro).'">'.$langs->trans("PhonePerso").'phone_perso).'">
phone_pro).'">phone_perso).'">
'.$langs->trans("PhoneMobile").'phone_mobile).'">'.$langs->trans("Fax").'fax).'">
phone_mobile).'">fax).'">
'.$langs->trans("Email").'email).'">
email).'">'.$langs->trans("No_Email").''.$form->selectyesno('no_email',(GETPOST("no_email",'alpha')?GETPOST("no_email",'alpha'):$object->no_email), 1).''.$form->selectyesno('no_email',(GETPOST("no_email",'alpha')?GETPOST("no_email",'alpha'):$object->no_email), 1).'
'.$langs->trans("IM").'jabberid).'">
jabberid).'">
'.$langs->trans("Skype").'skype).'">
skype).'">
'.$langs->trans("ContactVisibility").''; + print '
'; $selectarray=array('0'=>$langs->trans("ContactPublic"),'1'=>$langs->trans("ContactPrivate")); print $form->selectarray('priv',$selectarray,(GETPOST("priv",'alpha')?GETPOST("priv",'alpha'):$object->priv),0); print '
'; // Date To Birth - print ''; - print ''; + print ''; } else { - print ''; + print ''; } print ''; @@ -664,13 +675,15 @@ else print ''; // Lastname - print ''; - print ''; + print ''; + print ''; + print ''; + print ''; // Company if (empty($conf->global->SOCIETE_DISABLE_CONTACTS)) { - print ''; + print ''; print ''; @@ -678,15 +691,16 @@ else } // Civility - print ''; - print ''; + print ''; + print ''; // Address - print ''; + print ''; + print ''; $rowspan=3; if (empty($conf->global->SOCIETE_DISABLE_STATE)) $rowspan++; @@ -696,13 +710,13 @@ else print ''; // Zip / Town - print ''; // Country - print ''; @@ -710,20 +724,25 @@ else // State if (empty($conf->global->SOCIETE_DISABLE_STATE)) { - print ''; } // Phone - print ''; - print ''; + print ''; + print ''; + print ''; + print ''; - print ''; - print ''; + print ''; + print ''; + print ''; + print ''; // EMail - print ''; + print ''; + print ''; if (! empty($conf->mailing->enabled)) { $langs->load("mails"); @@ -737,10 +756,12 @@ else print ''; // Jabberid - print ''; + print ''; + print ''; if (! empty($conf->mailing->enabled)) { - print ''; + print ''; + print ''; } else { @@ -751,23 +772,24 @@ else // Skype if (! empty($conf->skype->enabled)) { - print ''; + print ''; + print ''; } // Visibility - print ''; // Note Public - print ''; // Note Private - print ''; diff --git a/htdocs/core/class/html.formcompany.class.php b/htdocs/core/class/html.formcompany.class.php index 6f868dd81c8..183f713aa96 100644 --- a/htdocs/core/class/html.formcompany.class.php +++ b/htdocs/core/class/html.formcompany.class.php @@ -374,7 +374,7 @@ class FormCompany $resql=$this->db->query($sql); if ($resql) { - $out.= ''; $out.= ''; $num = $this->db->num_rows($resql); $i = 0; @@ -772,7 +772,7 @@ class FormCompany $maxlength=$formlength; if (empty($formlength)) { $formlength=24; $maxlength=128; } - $out = ''; + $out = ''; return $out; } diff --git a/htdocs/societe/soc.php b/htdocs/societe/soc.php index f5c1237ef05..7ca032cf422 100644 --- a/htdocs/societe/soc.php +++ b/htdocs/societe/soc.php @@ -805,14 +805,14 @@ else print 'global->SOCIETE_USEPREFIX)?' colspan="3"':'').'>'; - print ''; + print ''; if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field { print ''; @@ -831,7 +831,8 @@ else } // Prospect/Customer - print ''; + print ''; - print ''; print ''; @@ -883,7 +884,8 @@ else } // Address - print ''; @@ -912,7 +914,8 @@ else // Email web print ''; print ''; - print ''; + print ''; + print ''; // Skype if (! empty($conf->skype->enabled)) @@ -934,16 +937,17 @@ else $idprof=$langs->transcountry('ProfId'.$i,$object->country_code); if ($idprof!='-') { + $key='idprof'.$i; + if (($j % 2) == 0) print ''; $idprof_mandatory ='SOCIETE_IDPROF'.($i).'_MANDATORY'; if(empty($conf->global->$idprof_mandatory)) - print ''; if (($j % 2) == 1) print ''; $j++; @@ -953,7 +957,7 @@ else if ($j % 2 == 1) print ''; // Assujeti TVA - print ''; + print ''; print ''; @@ -987,11 +991,11 @@ else print ''; // Type - Size - print ''; - print ''; @@ -1268,7 +1272,7 @@ else // Name print ''; - print ''; + print ''; // Prefix if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field @@ -1288,7 +1292,8 @@ else } // Prospect/Customer - print ''; + print ''; - print ''; print ''; // Address - print ''; @@ -1417,16 +1423,17 @@ else $idprof=$langs->transcountry('ProfId'.$i,$object->country_code); if ($idprof!='-') { - if (($j % 2) == 0) print ''; + $key='idprof'.$i; - $idprof_mandatory ='SOCIETE_IDPROF'.($i).'_MANDATORY'; - if(empty($conf->global->$idprof_mandatory)) - print ''; - $key='idprof'.$i; - print $formcompany->get_input_id_prof($i,'idprof'.$i,$object->$key,$object->country_code); + $idprof_mandatory ='SOCIETE_IDPROF'.($i).'_MANDATORY'; + if(empty($conf->global->$idprof_mandatory)) + print ''; if (($j % 2) == 1) print ''; $j++; @@ -1436,7 +1443,7 @@ else if ($j % 2 == 1) print ''; // VAT payers - print ''; @@ -1474,7 +1481,7 @@ else //TODO: Place into a function to control showing by country or study better option if($mysoc->localtax1_assuj=="1" && $mysoc->localtax2_assuj=="1") { - print ''; - print ''; From 94bcb0dc40bcbf8ec2be111be4b586bec24b2be2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Doursenaud?= Date: Sat, 12 Jul 2014 14:45:09 +0200 Subject: [PATCH 182/258] Labels and autofocus for company card forms --- htdocs/admin/company.php | 146 +++++++++---------- htdocs/core/class/html.form.class.php | 2 +- htdocs/core/class/html.formcompany.class.php | 4 +- htdocs/core/class/html.formother.class.php | 2 +- 4 files changed, 77 insertions(+), 77 deletions(-) diff --git a/htdocs/admin/company.php b/htdocs/admin/company.php index f136c1200cf..c69f269f301 100644 --- a/htdocs/admin/company.php +++ b/htdocs/admin/company.php @@ -300,74 +300,74 @@ if ($action == 'edit' || $action == 'updateedit') print ''."\n"; $var=!$var; - print ''."\n"; + print ''."\n"; $var=!$var; - print ''."\n"; + print ''."\n"; $var=!$var; - print ''."\n"; + print ''."\n"; $var=!$var; - print ''."\n"; + print ''."\n"; // Country $var=!$var; - print ''."\n"; $var=!$var; - print ''."\n"; $var=!$var; - print ''."\n"; $var=!$var; - print ''; + print ''; print ''."\n"; $var=!$var; - print ''; + print ''; print ''."\n"; $var=!$var; - print ''; + print ''; print ''."\n"; // Web $var=!$var; - print ''; + print ''; print ''."\n"; // Barcode if (! empty($conf->barcode->enabled)) { $var=!$var; - print ''; + print ''; print ''; } // Logo $var=!$var; - print ''; + print ''; // Capital $var=!$var; - print ''; + print ''; // Forme juridique $var=!$var; - print ''; print '
'.$langs->trans("DateToBirth").''; + print '
'; $form=new Form($db); if ($object->birthday) { @@ -582,14 +593,14 @@ else } print ''.$langs->trans("Alert").': '; + print ': '; if ($object->birthday_alert) { - print '
'.$langs->trans("Lastname").' / '.$langs->trans("Label").'lastname).'">'.$langs->trans("Firstname").'firstname).'">
lastname).'" autofocus="autofocus">firstname).'">
'.$langs->trans("Company").'
'; print $form->select_company(GETPOST('socid','int')?GETPOST('socid','int'):($object->socid?$object->socid:-1),'socid','',1); print '
'.$langs->trans("UserTitle").''; + print '
'; print $formcompany->select_civility(isset($_POST["civility_id"])?$_POST["civility_id"]:$object->civility_id); print '
'.$langs->trans("PostOrFunction").'poste).'">
poste).'">
'.$langs->trans("Address"); - print '
'.$langs->trans("Zip").' / '.$langs->trans("Town").''; + print '
/ '; print $formcompany->select_ziptown((isset($_POST["zipcode"])?$_POST["zipcode"]:$object->zip),'zipcode',array('town','selectcountry_id','state_id'),6).' '; print $formcompany->select_ziptown((isset($_POST["town"])?$_POST["town"]:$object->town),'town',array('zipcode','selectcountry_id','state_id')); print '
'.$langs->trans("Country").''; + print '
'; print $form->select_country(isset($_POST["country_id"])?$_POST["country_id"]:$object->country_id,'country_id'); if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1); print '
'.$langs->trans('State').''; + print '
'; print $formcompany->select_state($object->state_id,isset($_POST["country_id"])?$_POST["country_id"]:$object->country_id,'state_id'); print '
'.$langs->trans("PhonePro").'phone_pro).'">'.$langs->trans("PhonePerso").'phone_perso).'">
phone_pro).'">phone_perso).'">
'.$langs->trans("PhoneMobile").'phone_mobile).'">'.$langs->trans("Fax").'fax).'">
phone_mobile).'">fax).'">
'.$langs->trans("EMail").'email).'">
email).'">
'.$langs->trans("Jabberid").'jabberid).'">
jabberid).'">'.$langs->trans("No_Email").''.$form->selectyesno('no_email',(isset($_POST["no_email"])?$_POST["no_email"]:$object->no_email), 1).''.$form->selectyesno('no_email',(isset($_POST["no_email"])?$_POST["no_email"]:$object->no_email), 1).'
'.$langs->trans("Skype").'skype).'">
skype).'">
'.$langs->trans("ContactVisibility").''; + print '
'; $selectarray=array('0'=>$langs->trans("ContactPublic"),'1'=>$langs->trans("ContactPrivate")); print $form->selectarray('priv',$selectarray,$object->priv,0); print '
'.$langs->trans("NotePublic").''; + print '
'; $doleditor = new DolEditor('note_public', $object->note_public, '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, 70); print $doleditor->Create(1); print '
'.$langs->trans("NotePrivate").''; + print '
'; $doleditor = new DolEditor('note_private', $object->note_private, '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, 70); print $doleditor->Create(1); print '
'; if ($object->particulier || $private) { - print ''; + print ''; } else { - print ''; + print ''; } print ''.$langs->trans('Prefix').'
'.$langs->trans('ProspectCustomer').'
'.$langs->trans('Supplier').''; + print ''; print $form->selectyesno("fournisseur",(isset($_POST['fournisseur'])?GETPOST('fournisseur'):$object->fournisseur),1); print ''; @@ -870,7 +871,7 @@ else } // Status - print '
'.$langs->trans('Status').''; + print '
'; print $form->selectarray('status', array('0'=>$langs->trans('ActivityCeased'),'1'=>$langs->trans('InActivity')),1); print '
'.$langs->trans('Address').'
'.$langs->trans('Web').'
'.$idprof.''; + print ''; else - print ''.$idprof.''; + print ''; - $key='idprof'.$i; - print $formcompany->get_input_id_prof($i,'idprof'.$i,$object->$key,$object->country_code); + print $formcompany->get_input_id_prof($i,$key,$object->$key,$object->country_code); print '
'.$langs->trans('VATIsUsed').'
'; print $form->selectyesno('assujtva_value',1,1); // Assujeti par defaut en creation print '
'.$langs->trans("ThirdPartyType").''."\n"; + print '
'."\n"; print $form->selectarray("typent_id", $formcompany->typent_array(0), $object->typent_id, 0, 0, 0, '', 0, 0, 0, (empty($conf->global->SOCIETE_SORT_ON_TYPEENT)?'ASC':$conf->global->SOCIETE_SORT_ON_TYPEENT)); if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1); print ''.$langs->trans("Staff").''; + print ''; print $form->selectarray("effectif_id", $formcompany->effectif_array(0), $object->effectif_id); if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1); print '
'.$langs->trans('ProspectCustomer').'
'.$langs->trans('Supplier').''; + print ''; print $form->selectyesno("fournisseur",$object->fournisseur,1); print ''; @@ -1361,12 +1366,13 @@ else } // Status - print '
'.$langs->trans("Status").''; + print '
'; print $form->selectarray('status', array('0'=>$langs->trans('ActivityCeased'),'1'=>$langs->trans('InActivity')),$object->status); print '
'.$langs->trans('Address').'
'.$idprof.''; - else - print ''.$idprof.''; + if (($j % 2) == 0) print '
'; + else + print ''; + + print $formcompany->get_input_id_prof($i,$key,$object->$key,$object->country_code); print '
'.$langs->trans('VATIsUsed').''; + print '
'; print $form->selectyesno('assujtva_value',$object->tva_assuj,1); print '
'.$langs->transcountry("LocalTax1IsUsed",$mysoc->country_code).''; + print '
'; print $form->selectyesno('localtax1assuj_value',$object->localtax1_assuj,1); if(! isOnlyOneLocalTax(1)) { @@ -1483,7 +1490,7 @@ else print ''; } - print ''.$langs->transcountry("LocalTax2IsUsed",$mysoc->country_code).''; + print ''; print $form->selectyesno('localtax2assuj_value',$object->localtax2_assuj,1); if (! isOnlyOneLocalTax(2)) { @@ -1496,7 +1503,7 @@ else } elseif($mysoc->localtax1_assuj=="1" && $mysoc->localtax2_assuj!="1") { - print '
'.$langs->transcountry("LocalTax1IsUsed",$mysoc->country_code).''; + print '
'; print $form->selectyesno('localtax1assuj_value',$object->localtax1_assuj,1); if(! isOnlyOneLocalTax(1)) { @@ -1509,7 +1516,7 @@ else } elseif($mysoc->localtax2_assuj=="1" && $mysoc->localtax1_assuj!="1") { - print '
'.$langs->transcountry("LocalTax2IsUsed",$mysoc->country_code).''; + print '
'; print $form->selectyesno('localtax2assuj_value',$object->localtax2_assuj,1); if(! isOnlyOneLocalTax(2)) { @@ -1521,11 +1528,11 @@ else } // Type - Size - print '
'.$langs->trans("ThirdPartyType").''; + print '
'; print $form->selectarray("typent_id",$formcompany->typent_array(0), $object->typent_id, 0, 0, 0, '', 0, 0, 0, (empty($conf->global->SOCIETE_SORT_ON_TYPEENT)?'ASC':$conf->global->SOCIETE_SORT_ON_TYPEENT)); if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1); print ''.$langs->trans("Staff").''; + print ''; print $form->selectarray("effectif_id",$formcompany->effectif_array(0), $object->effectif_id); if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1); print '
'.$langs->trans("CompanyInfo").''.$langs->trans("Value").'
'.$langs->trans("CompanyName").''; - print '
'; + print '
'.$langs->trans("CompanyAddress").''; - print '
'; + print '
'.$langs->trans("CompanyZip").''; - print '
'; + print '
'.$langs->trans("CompanyTown").''; - print '
'; + print '
'.$langs->trans("Country").''; + print '
'; //if (empty($country_selected)) $country_selected=substr($langs->defaultlang,-2); // Par defaut, pays de la localisation print $form->select_country($mysoc->country_id,'country_id'); if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1); print '
'.$langs->trans("State").''; + print '
'; $formcompany->select_departement($conf->global->MAIN_INFO_SOCIETE_STATE,$mysoc->country_code,'state_id'); print '
'.$langs->trans("CompanyCurrency").''; + print '
'; print $form->selectCurrency($conf->currency,"currency"); print '
'.$langs->trans("Phone").''; - print '
'; + print '
'.$langs->trans("Fax").''; - print '
'; + print '
'.$langs->trans("EMail").''; - print '
'; + print '
'.$langs->trans("Web").''; - print '
'; + print '
'.$langs->trans("Gencod").''; - print '
'; + print '
'.$langs->trans("Logo").' (png,jpg)'; + print ''; print ''; + print ''; print ''; print '
'; - print ''; + print ''; print ''; if (! empty($mysoc->logo_mini)) { @@ -387,8 +387,8 @@ if ($action == 'edit' || $action == 'updateedit') // Note $var=!$var; - print '
'.$langs->trans("Note").''; - print '
'; + print '
'; @@ -404,17 +404,17 @@ if ($action == 'edit' || $action == 'updateedit') // Managing Director(s) $var=!$var; - print '
'.$langs->trans("ManagingDirectors").''; - print '
'; + print '
'.$langs->trans("Capital").''; - print '
'; + print '
'.$langs->trans("JuridicalStatus").''; + print '
'; if ($mysoc->country_code) { print $formcompany->select_juridicalstatus($conf->global->MAIN_INFO_SOCIETE_FORME_JURIDIQUE,$mysoc->country_code); @@ -429,10 +429,10 @@ if ($action == 'edit' || $action == 'updateedit') if ($langs->transcountry("ProfId1",$mysoc->country_code) != '-') { $var=!$var; - print '
'.$langs->transcountry("ProfId1",$mysoc->country_code).''; + print '
'; if (! empty($mysoc->country_code)) { - print ''; + print ''; } else { @@ -445,10 +445,10 @@ if ($action == 'edit' || $action == 'updateedit') if ($langs->transcountry("ProfId2",$mysoc->country_code) != '-') { $var=!$var; - print '
'.$langs->transcountry("ProfId2",$mysoc->country_code).''; + print '
'; if (! empty($mysoc->country_code)) { - print ''; + print ''; } else { @@ -461,10 +461,10 @@ if ($action == 'edit' || $action == 'updateedit') if ($langs->transcountry("ProfId3",$mysoc->country_code) != '-') { $var=!$var; - print '
'.$langs->transcountry("ProfId3",$mysoc->country_code).''; + print '
'; if (! empty($mysoc->country_code)) { - print ''; + print ''; } else { @@ -477,10 +477,10 @@ if ($action == 'edit' || $action == 'updateedit') if ($langs->transcountry("ProfId4",$mysoc->country_code) != '-') { $var=!$var; - print '
'.$langs->transcountry("ProfId4",$mysoc->country_code).''; + print '
'; if (! empty($mysoc->country_code)) { - print ''; + print ''; } else { @@ -493,10 +493,10 @@ if ($action == 'edit' || $action == 'updateedit') if ($langs->transcountry("ProfId5",$mysoc->country_code) != '-') { $var=!$var; - print '
'.$langs->transcountry("ProfId5",$mysoc->country_code).''; + print '
'; if (! empty($mysoc->country_code)) { - print ''; + print ''; } else { @@ -509,10 +509,10 @@ if ($action == 'edit' || $action == 'updateedit') if ($langs->transcountry("ProfId6",$mysoc->country_code) != '-') { $var=!$var; - print '
'.$langs->transcountry("ProfId6",$mysoc->country_code).''; + print '
'; if (! empty($mysoc->country_code)) { - print ''; + print ''; } else { @@ -523,8 +523,8 @@ if ($action == 'edit' || $action == 'updateedit') // TVA Intra $var=!$var; - print '
'.$langs->trans("VATIntra").''; - print ''; + print '
'; + print ''; print '
'; @@ -539,7 +539,7 @@ if ($action == 'edit' || $action == 'updateedit') $var=true; $var=!$var; - print '
'.$langs->trans("FiscalMonthStart").''; + print '
'; print $formother->select_month($conf->global->SOCIETE_FISCAL_MONTH_START,'fiscalmonthstart',1) . '
"; @@ -555,19 +555,19 @@ if ($action == 'edit' || $action == 'updateedit') $var=true; $var=!$var; - print "
'; print ""; - print ""; + print ""; print "\n"; print "
".$langs->trans("VATIsUsedDesc")."
".$langs->trans("Example").': '.$langs->trans("VATIsUsedExampleFR")."
"; print "
'; print ""; - print ""; + print ""; print "\n"; print "
".$langs->trans("VATIsNotUsedDesc")."
".$langs->trans("Example").': '.$langs->trans("VATIsNotUsedExampleFR")."
"; print "
global->FACTURE_LOCAL_TAX1_OPTION == '1' || $conf->global->FACTURE_LOCAL_TAX1_OPTION == "localtax1on")?" checked":"")."> ".$langs->transcountry("LocalTax1IsUsed",$mysoc->country_code)."'; print ""; - print ""; + print ""; $example=$langs->transcountry("LocalTax1IsUsedExample",$mysoc->country_code); print ($example!="LocalTax1IsUsedExample"?"\n":""); if(! isOnlyOneLocalTax(1)) { - print ''; - print ''; @@ -610,10 +610,10 @@ if ($action == 'edit' || $action == 'updateedit') print "\n"; $var=!$var; - print ""; + print ""; print '"; + print ""; print '
".$langs->transcountry("LocalTax1IsUsedDesc",$mysoc->country_code)."
".$langs->trans("Example").': '.$langs->transcountry("LocalTax1IsUsedExample",$mysoc->country_code)."
'.$langs->trans("LTRate").': '; + print '
: '; $formcompany->select_localtax(1,$conf->global->MAIN_INFO_VALUE_LOCALTAX1, "lt1"); } print '
'.$langs->trans("CalcLocaltax").': '; + print '
'.$langs->trans("CalcLocaltax").': '; $opcions=array($langs->transcountry("CalcLocaltax1",$mysoc->country_code),$langs->transcountry("CalcLocaltax2",$mysoc->country_code),$langs->transcountry("CalcLocaltax3",$mysoc->country_code)); print $form->selectarray("clt1", $opcions, $conf->global->MAIN_INFO_LOCALTAX_CALC1); print '
global->FACTURE_LOCAL_TAX1_OPTION == "localtax1off"?" checked":"")."> ".$langs->transcountry("LocalTax1IsNotUsed",$mysoc->country_code)."'; print ""; - print ""; + print ""; $example=$langs->transcountry("LocalTax1IsNotUsedExample",$mysoc->country_code); print ($example!="LocalTax1IsNotUsedExample"?"\n":""); print "
".$langs->transcountry("LocalTax1IsNotUsedDesc",$mysoc->country_code)."
".$langs->trans("Example").': '.$langs->transcountry("LocalTax1IsNotUsedExample",$mysoc->country_code)."
"; @@ -633,19 +633,19 @@ if ($action == 'edit' || $action == 'updateedit') $var=!$var; // Note: When option is not set, it must not appears as set on on, because there is no default value for this option - print "
global->FACTURE_LOCAL_TAX2_OPTION == '1' || $conf->global->FACTURE_LOCAL_TAX2_OPTION == "localtax2on")?" checked":"")."> ".$langs->transcountry("LocalTax2IsUsed",$mysoc->country_code)."'; print ""; - print ""; + print ""; $example=$langs->transcountry("LocalTax2IsUsedExample",$mysoc->country_code); print ($example!="LocalTax2IsUsedExample"?"\n":""); - print ''; } - print ''; @@ -653,10 +653,10 @@ if ($action == 'edit' || $action == 'updateedit') print "\n"; $var=!$var; - print ""; + print ""; print '"; + print ""; print '\n"; $var=!$var; - print ""; + print ""; print '\n"; @@ -994,10 +994,10 @@ else $var=true; $var=!$var; - print ""; + print ""; print '
".$langs->transcountry("LocalTax2IsUsedDesc",$mysoc->country_code)."
".$langs->trans("Example").': '.$langs->transcountry("LocalTax2IsUsedExample",$mysoc->country_code)."
'.$langs->transcountry("LTRate").': '; + print '
: '; if(! isOnlyOneLocalTax(2)) { $formcompany->select_localtax(2,$conf->global->MAIN_INFO_VALUE_LOCALTAX2, "lt2"); print '
'.$langs->trans("CalcLocaltax").': '; + print '
: '; $opcions=array($langs->transcountry("CalcLocaltax1",$mysoc->country_code),$langs->transcountry("CalcLocaltax2",$mysoc->country_code),$langs->transcountry("CalcLocaltax3",$mysoc->country_code)); print $form->selectarray("clt2", $opcions, $conf->global->MAIN_INFO_LOCALTAX_CALC2); print '
global->FACTURE_LOCAL_TAX2_OPTION == "localtax2off"?" checked":"")."> ".$langs->transcountry("LocalTax2IsNotUsed",$mysoc->country_code)."'; print ""; - print ""; + print ""; $example=$langs->transcountry("LocalTax2IsNotUsedExample",$mysoc->country_code); print ($example!="LocalTax2IsNotUsedExample"?"\n":""); print "
".$langs->transcountry("LocalTax2IsNotUsedDesc",$mysoc->country_code)."
".$langs->trans("Example").': '.$langs->transcountry("LocalTax2IsNotUsedExample",$mysoc->country_code)."
"; @@ -959,19 +959,19 @@ else $var=true; $var=!$var; - print "
global->FACTURE_TVAOPTION)?"":" checked")."> ".$langs->trans("VATIsUsed")."'; print ""; - print ""; + print ""; print "\n"; print "
".$langs->trans("VATIsUsedDesc")."
".$langs->trans("Example").': '.$langs->trans("VATIsUsedExampleFR")."
"; print "
global->FACTURE_TVAOPTION)?" checked":"")."> ".$langs->trans("VATIsNotUsed")."'; print ""; - print ""; + print ""; print "\n"; print "
".$langs->trans("VATIsNotUsedDesc")."
".$langs->trans("VATIsNotUsedDesc")."
".$langs->trans("Example").': '.$langs->trans("VATIsNotUsedExampleFR")."
"; print "
global->FACTURE_LOCAL_TAX1_OPTION == '1' || $conf->global->FACTURE_LOCAL_TAX1_OPTION == "localtax1on")?" checked":"")."> ".$langs->transcountry("LocalTax1IsUsed",$mysoc->country_code)."'; print ""; - print ""; + print ""; $example=$langs->transcountry("LocalTax1IsUsedExample",$mysoc->country_code); print ($example!="LocalTax1IsUsedExample"?"\n":""); if($conf->global->MAIN_INFO_VALUE_LOCALTAX1!=0) @@ -1022,10 +1022,10 @@ else print "\n"; $var=!$var; - print ""; + print ""; print '"; + print ""; print '
".$langs->transcountry("LocalTax1IsUsedDesc",$mysoc->country_code)."
".$langs->transcountry("LocalTax1IsUsedDesc",$mysoc->country_code)."
".$langs->trans("Example").': '.$langs->transcountry("LocalTax1IsUsedExample",$mysoc->country_code)."
global->FACTURE_LOCAL_TAX1_OPTION == "localtax1off"?" checked":"")."> ".$langs->transcountry("LocalTax1IsNotUsed",$mysoc->country_code)."'; print ""; - print ""; + print ""; $example=$langs->transcountry("LocalTax1IsNotUsedExample",$mysoc->country_code); print ($example!="LocalTax1IsNotUsedExample"?"\n":""); print "
".$langs->transcountry("LocalTax1IsNotUsedDesc",$mysoc->country_code)."
".$langs->trans("Example").': '.$langs->transcountry("LocalTax1IsNotUsedExample",$mysoc->country_code)."
"; @@ -1045,10 +1045,10 @@ else $var=true; $var=!$var; - print "
global->FACTURE_LOCAL_TAX2_OPTION == '1' || $conf->global->FACTURE_LOCAL_TAX2_OPTION == "localtax2on")?" checked":"")."> ".$langs->transcountry("LocalTax2IsUsed",$mysoc->country_code)."'; print ""; - print ""; + print ""; $example=$langs->transcountry("LocalTax2IsUsedExample",$mysoc->country_code); print ($example!="LocalTax2IsUsedExample"?"\n":""); if($conf->global->MAIN_INFO_VALUE_LOCALTAX2!=0) @@ -1074,10 +1074,10 @@ else print "\n"; $var=!$var; - print ""; + print ""; print '
".$langs->transcountry("LocalTax2IsUsedDesc",$mysoc->country_code)."
".$langs->trans("Example").': '.$langs->transcountry("LocalTax2IsUsedExample",$mysoc->country_code)."
global->FACTURE_LOCAL_TAX2_OPTION == "localtax2off"?" checked":"")."> ".$langs->transcountry("LocalTax2IsNotUsed",$mysoc->country_code)."'; print ""; - print ""; + print ""; $example=$langs->transcountry("LocalTax2IsNotUsedExample",$mysoc->country_code); print ($example!="LocalTax2IsNotUsedExample"?"\n":""); print "
".$langs->transcountry("LocalTax2IsNotUsedDesc",$mysoc->country_code)."
".$langs->trans("Example").': '.$langs->transcountry("LocalTax2IsNotUsedExample",$mysoc->country_code)."
"; diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index d1b338176a4..8dfe80368e9 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -3306,7 +3306,7 @@ class Form if ($selected=='euro' || $selected=='euros') $selected='EUR'; // Pour compatibilite - $out.= ''; foreach ($langs->cache_currencies as $code_iso => $currency) { if ($selected && $selected == $code_iso) diff --git a/htdocs/core/class/html.formcompany.class.php b/htdocs/core/class/html.formcompany.class.php index 183f713aa96..fd7db5fa94f 100644 --- a/htdocs/core/class/html.formcompany.class.php +++ b/htdocs/core/class/html.formcompany.class.php @@ -782,7 +782,7 @@ class FormCompany * * @param int $local LocalTax * @param int $selected Preselected value - * @param varchar $htmlname HTML select name + * @param string $htmlname HTML select name * @return void */ function select_localtax($local, $selected, $htmlname) @@ -798,7 +798,7 @@ class FormCompany if (count($valors) > 1) { //montar select - print ''; while ($i <= (count($valors))-1) { if ($selected == $valors[$i]) diff --git a/htdocs/core/class/html.formother.class.php b/htdocs/core/class/html.formother.class.php index f51cf060af8..ab924d482a7 100644 --- a/htdocs/core/class/html.formother.class.php +++ b/htdocs/core/class/html.formother.class.php @@ -760,7 +760,7 @@ class FormOther $montharray = monthArray($langs); // Get array - $select_month = ''; if ($useempty) { $select_month .= ''; From 0c8765bfe3f58fac55f3a5a73b9f8b6fcdf91c9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sat, 12 Jul 2014 14:56:22 +0200 Subject: [PATCH 183/258] Updated vagrant box --- dev/vagrant/README.md | 21 +- dev/vagrant/dolibarrdev/Vagrantfile | 25 +- dev/vagrant/dolibarrdev/puphpet/config.yaml | 20 +- .../dolibarrdev/puphpet/files/dot/.gitignore | 5 +- .../puphpet/files/startup-always/empty | 0 .../puphpet/files/startup-once/empty | 0 .../dolibarrdev/puphpet/puppet/manifest.pp | 45 ++-- .../puppet/parser/functions/hash_key_true.rb | 42 ++++ .../puppet/modules/puphpet/manifests/hhvm.pp | 26 +- .../modules/puphpet/manifests/python/pip.pp | 22 ++ .../puppet/modules/supervisord/.fixtures.yml | 8 +- .../puppet/modules/supervisord/.travis.yml | 23 +- .../puppet/modules/supervisord/Changelog | 63 +++++ .../puppet/modules/supervisord/Gemfile | 28 ++- .../puppet/modules/supervisord/Modulefile | 2 +- .../puppet/modules/supervisord/README.md | 54 ++++- .../puppet/modules/supervisord/Rakefile | 25 +- .../lib/puppet/parser/functions/array2csv.rb | 2 - .../lib/puppet/parser/functions/hash2csv.rb | 2 - .../modules/supervisord/manifests/config.pp | 26 +- .../supervisord/manifests/eventlistener.pp | 70 +++++- .../supervisord/manifests/fcgi_program.pp | 69 +++++- .../modules/supervisord/manifests/group.pp | 14 +- .../modules/supervisord/manifests/init.pp | 74 +++++- .../modules/supervisord/manifests/install.pp | 6 +- .../modules/supervisord/manifests/params.pp | 22 +- .../modules/supervisord/manifests/pip.pp | 8 +- .../modules/supervisord/manifests/program.pp | 68 +++++- .../modules/supervisord/manifests/reload.pp | 21 ++ .../modules/supervisord/manifests/service.pp | 6 +- .../supervisord/manifests/supervisorctl.pp | 29 +++ .../acceptance/nodesets/centos-65-i386.yml | 10 + .../acceptance/nodesets/centos-65-x64.yml | 10 + .../acceptance/nodesets/debian-73-i386.yml | 10 + .../acceptance/nodesets/debian-73-x64.yml | 10 + .../spec/acceptance/nodesets/default.yml | 10 + .../spec/acceptance/supervisord_spec.rb | 114 +++++++++ .../spec/classes/supervisord_spec.rb | 227 +++++++++++++++++- .../spec/defines/eventlistener_spec.rb | 85 ++++++- .../spec/defines/fcgi_program_spec.rb | 94 ++++++-- .../supervisord/spec/defines/program_spec.rb | 90 ++++++- .../supervisord/spec/defines/supervisorctl.rb | 13 + .../modules/supervisord/spec/spec_helper.rb | 1 + .../spec/spec_helper_acceptance.rb | 24 ++ .../supervisord/spec/spec_helper_system.rb | 25 -- .../supervisord/spec/system/basic_spec.rb | 120 --------- .../templates/conf/eventlistener.erb | 8 +- .../templates/conf/fcgi_program.erb | 8 +- .../supervisord/templates/conf/program.erb | 8 +- .../{debian_extra.erb => Debian/defaults.erb} | 0 .../init/{debian_init.erb => Debian/init.erb} | 6 +- .../{redhat_extra.erb => RedHat/defaults.erb} | 2 +- .../init/{redhat_init.erb => RedHat/init.erb} | 5 +- .../templates/supervisord_main.erb | 10 +- .../templates/supervisord_unix.erb | 4 +- .../modules/supervisord/tests/program.pp | 34 ++- .../puphpet/shell/execute-files.sh | 31 ++- .../dolibarrdev/puphpet/shell/ssh-keygen.sh | 81 +++++-- 58 files changed, 1491 insertions(+), 375 deletions(-) create mode 100644 dev/vagrant/dolibarrdev/puphpet/files/startup-always/empty create mode 100644 dev/vagrant/dolibarrdev/puphpet/files/startup-once/empty create mode 100644 dev/vagrant/dolibarrdev/puphpet/puppet/modules/puphpet/lib/puppet/parser/functions/hash_key_true.rb create mode 100644 dev/vagrant/dolibarrdev/puphpet/puppet/modules/puphpet/manifests/python/pip.pp create mode 100644 dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/reload.pp create mode 100644 dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/supervisorctl.pp create mode 100644 dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/acceptance/nodesets/centos-65-i386.yml create mode 100644 dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/acceptance/nodesets/centos-65-x64.yml create mode 100644 dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/acceptance/nodesets/debian-73-i386.yml create mode 100644 dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/acceptance/nodesets/debian-73-x64.yml create mode 100644 dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/acceptance/nodesets/default.yml create mode 100644 dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/acceptance/supervisord_spec.rb create mode 100644 dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/defines/supervisorctl.rb create mode 100644 dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/spec_helper_acceptance.rb delete mode 100644 dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/spec_helper_system.rb delete mode 100644 dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/system/basic_spec.rb rename dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/templates/init/{debian_extra.erb => Debian/defaults.erb} (100%) rename dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/templates/init/{debian_init.erb => Debian/init.erb} (96%) rename dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/templates/init/{redhat_extra.erb => RedHat/defaults.erb} (81%) rename dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/templates/init/{redhat_init.erb => RedHat/init.erb} (94%) diff --git a/dev/vagrant/README.md b/dev/vagrant/README.md index 8056643520e..dc0bc4234e2 100644 --- a/dev/vagrant/README.md +++ b/dev/vagrant/README.md @@ -23,7 +23,7 @@ Usage `cd` into the vagrant box directory and simply type `vagrant up`. -That's all you need to do. It will build a brand new VirtalBox machine for you with everything you need to develop on Dolibarr. +That's all you need to do. It will build a brand new VirtualBox machine for you with everything you need to develop on Dolibarr. ### Name resolution For easy access to the VM you need to setup name resolution to the machines IP. @@ -45,9 +45,16 @@ Somewhat bleeding edge vagrant box for develop branch related work. - IP: 192.168.42.101 - Vhost: dev.dolibarr.org -- OS: Debian Wheezy 7.5 +- OS: Debian Wheezy 7.5 x64 - Webserver: Apache 2.2.22 -- PHP: mod_php 5.5.13-1~dotdeb.1 +- PHP: mod_php 5.5.14-1~dotdeb.1 + Installed modules: + - cli + - curl + - gd + - imagick + - intl + - mcrypt - Database: MySQL 5.5 - Root user: root - Root password: root @@ -55,7 +62,13 @@ Somewhat bleeding edge vagrant box for develop branch related work. - Database user: user - Database password: user - Initial data: dev/initdata/mysqldump_dolibarr-3.5.0.sql +- Database: PostgreSQL 9.3 +- Adminer: lightweight database management. Access through http://192.168.42.101/adminer - Debugger: XDebug -- Profiler: Xhprof +- Profiler: Xhprof. Access through http://192.168.42.101/xhprof/xhprof_html You can access MailCatcher to read all outgoing emails at http://192.168.42.101:1080 + +To access the machine you must use the following private keys: +- User root: located at puphpet/files/dot/ssh/root_rsa +- User vagrant: located at puphpet/files/dot/ssh/id_rsa diff --git a/dev/vagrant/dolibarrdev/Vagrantfile b/dev/vagrant/dolibarrdev/Vagrantfile index f73476207d0..89c2c75a5b7 100644 --- a/dev/vagrant/dolibarrdev/Vagrantfile +++ b/dev/vagrant/dolibarrdev/Vagrantfile @@ -25,11 +25,19 @@ Vagrant.configure("2") do |config| data['vm']['synced_folder'].each do |i, folder| if folder['source'] != '' && folder['target'] != '' - nfs = (folder['nfs'] == "true") ? "nfs" : nil - if nfs == "nfs" - config.vm.synced_folder "#{folder['source']}", "#{folder['target']}", id: "#{i}", type: nfs + if folder['sync_type'] == 'nfs' + config.vm.synced_folder "#{folder['source']}", "#{folder['target']}", id: "#{i}", type: "nfs" + elsif folder['sync_type'] == 'smb' + config.vm.synced_folder "#{folder['source']}", "#{folder['target']}", id: "#{i}", type: "smb" + elsif folder['sync_type'] == 'rsync' + rsync_args = !folder['rsync']['args'].nil? ? folder['rsync']['args'] : ["--verbose", "--archive", "--delete", "-z"] + rsync_auto = !folder['rsync']['auto'].nil? ? folder['rsync']['auto'] : true + rsync_exclude = !folder['rsync']['exclude'].nil? ? folder['rsync']['exclude'] : [".vagrant/"] + + config.vm.synced_folder "#{folder['source']}", "#{folder['target']}", id: "#{i}", + rsync__args: rsync_args, rsync__exclude: rsync_exclude, rsync__auto: rsync_auto, type: "rsync" else - config.vm.synced_folder "#{folder['source']}", "#{folder['target']}", id: "#{i}", type: nfs, + config.vm.synced_folder "#{folder['source']}", "#{folder['target']}", id: "#{i}", group: 'www-data', owner: 'www-data', mount_options: ["dmode=775", "fmode=764"] end end @@ -128,7 +136,14 @@ Vagrant.configure("2") do |config| end end - config.vm.provision :shell, :path => "puphpet/shell/execute-files.sh" + config.vm.provision :shell do |s| + s.path = "puphpet/shell/execute-files.sh" + s.args = ["exec-once", "exec-always"] + end + config.vm.provision :shell, run: "always" do |s| + s.path = "puphpet/shell/execute-files.sh" + s.args = ["startup-once", "startup-always"] + end config.vm.provision :shell, :path => "puphpet/shell/important-notices.sh" if File.file?("#{dir}/puphpet/files/dot/ssh/id_rsa") diff --git a/dev/vagrant/dolibarrdev/puphpet/config.yaml b/dev/vagrant/dolibarrdev/puphpet/config.yaml index 5cfb2601f21..96c01695cec 100644 --- a/dev/vagrant/dolibarrdev/puphpet/config.yaml +++ b/dev/vagrant/dolibarrdev/puphpet/config.yaml @@ -29,10 +29,12 @@ vagrantfile-local: - '--hiera_config /vagrant/puphpet/puppet/hiera.yaml' - '--parser future' synced_folder: - PL1BkioqqvGY: + jopH6005bn96: source: ../../../ target: /var/www - nfs: 'false' + sync_type: default + rsync: + auto: 'false' usable_port_range: 2200..2250 ssh: host: null @@ -71,7 +73,7 @@ apache: settings: user: www-data group: www-data - default_vhost: false + default_vhost: true manage_user: false manage_group: false sendfile: 0 @@ -79,7 +81,7 @@ apache: - php - rewrite vhosts: - CGyWQB0fx4x0: + b2tOrs1TMtoF: servername: dev.dolibarr.org docroot: /var/www/htdocs port: '80' @@ -97,7 +99,7 @@ apache: nginx: install: 0 vhosts: - jeF1sybIJ3V2: + 0dU5luf5AnIe: server_name: awesome.dev server_aliases: - www.awesome.dev @@ -152,7 +154,7 @@ mysql: root_password: root adminer: 0 databases: - 2OfuuapoIqsl: + V6H3W2FVB7Yq: grant: - ALTER - CREATE @@ -168,14 +170,14 @@ mysql: password: user sql_file: /var/www/dev/initdata/mysqldump_dolibarr_3.5.0.sql postgresql: - install: 0 + install: '1' settings: - root_password: '123' + root_password: root user_group: postgres encoding: UTF8 version: '9.3' databases: { } - adminer: 0 + adminer: '1' mariadb: install: 0 root_password: '123' diff --git a/dev/vagrant/dolibarrdev/puphpet/files/dot/.gitignore b/dev/vagrant/dolibarrdev/puphpet/files/dot/.gitignore index dcf60545594..e9b023ea6a6 100644 --- a/dev/vagrant/dolibarrdev/puphpet/files/dot/.gitignore +++ b/dev/vagrant/dolibarrdev/puphpet/files/dot/.gitignore @@ -1,4 +1 @@ -ssh/id_rsa -ssh/id_rsa.pub -ssh/insecure_private_key -ssh/id_rsa.ppk \ No newline at end of file +ssh/* \ No newline at end of file diff --git a/dev/vagrant/dolibarrdev/puphpet/files/startup-always/empty b/dev/vagrant/dolibarrdev/puphpet/files/startup-always/empty new file mode 100644 index 00000000000..e69de29bb2d diff --git a/dev/vagrant/dolibarrdev/puphpet/files/startup-once/empty b/dev/vagrant/dolibarrdev/puphpet/files/startup-once/empty new file mode 100644 index 00000000000..e69de29bb2d diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/manifest.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/manifest.pp index 57f759e5531..6f560f8735f 100644 --- a/dev/vagrant/dolibarrdev/puphpet/puppet/manifest.pp +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/manifest.pp @@ -279,8 +279,14 @@ if hash_key_equals($mailcatcher_values, 'install', 1) { } if ! defined(Class['supervisord']) { + class{ 'puphpet::python::pip': } + class { 'supervisord': - install_pip => true, + install_pip => false, + require => [ + Class['my_fw::post'], + Class['Puphpet::Python::Pip'], + ], } } @@ -467,15 +473,16 @@ if hash_key_equals($apache_values, 'install', 1) { $apache_vhosts = merge($apache_values['vhosts'], { 'default_vhost_80' => { 'servername' => 'default', - 'serveraliases' => ['*'], 'docroot' => '/var/www/default', 'port' => 80, + 'default_vhost' => true, }, 'default_vhost_443' => { 'servername' => 'default', - 'serveraliases' => ['*'], 'docroot' => '/var/www/default', 'port' => 443, + 'default_vhost' => true, + 'ssl' => 1, }, }) } else { @@ -515,11 +522,11 @@ if hash_key_equals($apache_values, 'install', 1) { create_resources(apache::vhost, { "${key}" => merge($vhost, { 'custom_fragment' => template('puphpet/apache/custom_fragment.erb'), - 'ssl' => 'ssl' in $vhost and str2bool($vhost['ssl']) ? { true => true, default => false }, - 'ssl_cert' => 'ssl_cert' in $vhost and $vhost['ssl_cert'] ? { undef => undef, '' => undef, default => $vhost['ssl_cert'] }, - 'ssl_key' => 'ssl_key' in $vhost and $vhost['ssl_key'] ? { undef => undef, '' => undef, default => $vhost['ssl_key'] }, - 'ssl_chain' => 'ssl_chain' in $vhost and $vhost['ssl_chain'] ? { undef => undef, '' => undef, default => $vhost['ssl_chain'] }, - 'ssl_certs_dir' => 'ssl_certs_dir' in $vhost and $vhost['ssl_certs_dir'] ? { undef => undef, '' => undef, default => $vhost['ssl_certs_dir'] } + 'ssl' => 'ssl' in $vhost and str2bool($vhost['ssl']) ? { true => true, default => false }, + 'ssl_cert' => hash_key_true($vhost, 'ssl_cert') ? { true => $vhost['ssl_cert'], default => undef }, + 'ssl_key' => hash_key_true($vhost, 'ssl_cert') ? { true => $vhost['ssl_key'], default => undef }, + 'ssl_chain' => hash_key_true($vhost, 'ssl_cert') ? { true => $vhost['ssl_chain'], default => undef }, + 'ssl_certs_dir' => hash_key_true($vhost, 'ssl_cert') ? { true => $vhost['ssl_certs_dir'], default => undef } }) }) @@ -662,10 +669,6 @@ if hash_key_equals($nginx_values, 'install', 1) { } } elsif hash_key_equals($hhvm_values, 'install', 1) { $fastcgi_pass = '127.0.0.1:9000' - - set_php5_fpm_sock_group_and_user { 'hhvm': - require => Package['nginx'], - } } else { $fastcgi_pass = '' } @@ -1096,7 +1099,7 @@ if hash_key_equals($xhprof_values, 'install', 1) } if hash_key_equals($apache_values, 'install', 1) { - $xhprof_webroot_location = $puphpet::params::apache_webroot_location + $xhprof_webroot_location = '/var/www/default' $xhprof_webserver_service = 'httpd' } elsif hash_key_equals($nginx_values, 'install', 1) { $xhprof_webroot_location = $puphpet::params::nginx_webroot_location @@ -1216,11 +1219,11 @@ if hash_key_equals($mysql_values, 'install', 1) { if hash_key_equals($mysql_values, 'adminer', 1) and $mysql_php_installed { if hash_key_equals($apache_values, 'install', 1) { - $mysql_adminer_webroot_location = $puphpet::params::apache_webroot_location + $mysql_adminer_webroot_location = '/var/www/default' } elsif hash_key_equals($nginx_values, 'install', 1) { $mysql_adminer_webroot_location = $puphpet::params::nginx_webroot_location } else { - $mysql_adminer_webroot_location = $puphpet::params::apache_webroot_location + $mysql_adminer_webroot_location = '/var/www/default' } class { 'puphpet::adminer': @@ -1329,11 +1332,11 @@ if hash_key_equals($postgresql_values, 'install', 1) { if hash_key_equals($postgresql_values, 'adminer', 1) and $postgresql_php_installed { if hash_key_equals($apache_values, 'install', 1) { - $postgresql_adminer_webroot_location = $puphpet::params::apache_webroot_location + $postgresql_adminer_webroot_location = '/var/www/default' } elsif hash_key_equals($nginx_values, 'install', 1) { $postgresql_adminer_webroot_location = $puphpet::params::nginx_webroot_location } else { - $postgresql_adminer_webroot_location = $puphpet::params::apache_webroot_location + $postgresql_adminer_webroot_location = '/var/www/default' } class { 'puphpet::adminer': @@ -1364,7 +1367,7 @@ define postgresql_db ( $table = "${name}.*" exec{ "${name}-import": - command => "psql ${name} < ${sql_file}", + command => "sudo -u postgres psql ${name} < ${sql_file}", logoutput => true, refreshonly => $refresh, require => Postgresql::Server::Db[$name], @@ -1491,11 +1494,11 @@ if hash_key_equals($mariadb_values, 'install', 1) { if hash_key_equals($mariadb_values, 'adminer', 1) and $mariadb_php_installed { if hash_key_equals($apache_values, 'install', 1) { - $mariadb_adminer_webroot_location = $puphpet::params::apache_webroot_location + $mariadb_adminer_webroot_location = '/var/www/default' } elsif hash_key_equals($nginx_values, 'install', 1) { $mariadb_adminer_webroot_location = $puphpet::params::nginx_webroot_location } else { - $mariadb_adminer_webroot_location = $puphpet::params::apache_webroot_location + $mariadb_adminer_webroot_location = '/var/www/default' } class { 'puphpet::adminer': @@ -1662,7 +1665,7 @@ if $beanstalkd_values == undef { } if hash_key_equals($apache_values, 'install', 1) { - $beanstalk_console_webroot_location = "${puphpet::params::apache_webroot_location}/beanstalk_console" + $beanstalk_console_webroot_location = '/var/www/default/beanstalk_console' } elsif hash_key_equals($nginx_values, 'install', 1) { $beanstalk_console_webroot_location = "${puphpet::params::nginx_webroot_location}/beanstalk_console" } else { diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puphpet/lib/puppet/parser/functions/hash_key_true.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puphpet/lib/puppet/parser/functions/hash_key_true.rb new file mode 100644 index 00000000000..fd495f8f143 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puphpet/lib/puppet/parser/functions/hash_key_true.rb @@ -0,0 +1,42 @@ +# +# hash_key_true.rb +# + +module Puppet::Parser::Functions + + newfunction(:hash_key_true, :type => :rvalue, :doc => <<-'ENDHEREDOC') do |args| + + Returns true if the key within hash is truthy + ENDHEREDOC + + unless args.length == 2 + raise Puppet::ParseError, ("hash_key_true(): wrong number of arguments (#{args.length}; must be 2)") + end + + arr = args[0] + key = args[1] + + unless arr.is_a?(Hash) + return false + end + + unless arr.has_key?(key) + return false + end + + if arr[key].nil? + return false + end + + if arr[key].empty? + return false + end + + if arr[key] == 'false' + return false + end + + return true + + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puphpet/manifests/hhvm.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puphpet/manifests/hhvm.pp index 90083232cdc..3b27ab90af6 100644 --- a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puphpet/manifests/hhvm.pp +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puphpet/manifests/hhvm.pp @@ -69,17 +69,39 @@ class puphpet::hhvm( } } 'centos': { + $jemalloc_url = 'http://files.puphpet.com/centos6/jemalloc-3.6.0-1.el6.x86_64.rpm' + $jemalloc_download_location = '/.puphpet-stuff/jemalloc-3.6.0-1.el6.x86_64.rpm' + + $require = defined(Class['my_fw::post']) ? { + true => Class['my_fw::post'], + default => [], + } + + exec { "download jemalloc to ${download_location}": + creates => $download_location, + command => "wget --quiet --tries=5 --connect-timeout=10 -O '${jemalloc_download_location}' '${jemalloc_url}'", + timeout => 30, + path => '/usr/bin', + require => $require + } + + package { 'jemalloc': + ensure => latest, + provider => yum, + source => $download_location, + require => Exec["download jemalloc to ${download_location}"], + } + yum::managed_yumrepo { 'hop5': descr => 'hop5 repository', baseurl => 'http://www.hop5.in/yum/el6/', gpgkey => 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-HOP5', enabled => 1, gpgcheck => 0, - priority => 1 + priority => 1, } } } - if $real_webserver == 'apache2' { if ! defined(Class['apache::mod::mime']) { class { 'apache::mod::mime': } diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puphpet/manifests/python/pip.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puphpet/manifests/python/pip.pp new file mode 100644 index 00000000000..14b13fe08c6 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/puphpet/manifests/python/pip.pp @@ -0,0 +1,22 @@ +class puphpet::python::pip { + + Exec { path => [ '/usr/bin/', '/usr/local/bin', '/bin', '/usr/local/sbin', '/usr/sbin', '/sbin' ] } + + if ! defined(Package['python-setuptools']) { + package { 'python-setuptools': } + } + + exec { 'easy_install pip': + unless => 'which pip', + require => Package['python-setuptools'], + } + + if $::osfamily == 'RedHat' { + exec { 'rhel pip_provider_name_fix': + command => 'alternatives --install /usr/bin/pip-python pip-python /usr/bin/pip 1', + subscribe => Exec['easy_install pip'], + unless => 'which pip-python', + } + } + +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/.fixtures.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/.fixtures.yml index 15f96922e01..3f18ef2fca2 100644 --- a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/.fixtures.yml +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/.fixtures.yml @@ -1,6 +1,10 @@ fixtures: repositories: - stdlib: "git://github.com/puppetlabs/puppetlabs-stdlib" - concat: "git://github.com/puppetlabs/puppetlabs-concat" + 'stdlib': + repo: 'git://github.com/puppetlabs/puppetlabs-stdlib' + ref: '4.1.0' + 'concat': + repo: 'git://github.com/puppetlabs/puppetlabs-concat' + ref: '1.0.1' symlinks: supervisord: "#{source_dir}" \ No newline at end of file diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/.travis.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/.travis.yml index 6e544518c19..bc96a165e59 100644 --- a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/.travis.yml +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/.travis.yml @@ -1,21 +1,28 @@ language: ruby bundler_args: --without development -script: "bundle exec rake spec lint" +script: "bundle exec rake test" rvm: - 1.8.7 - 1.9.3 - 2.0.0 env: - matrix: - - PUPPET_GEM_VERSION="~> 2.7.0" - - PUPPET_GEM_VERSION="~> 3.3.0" - - PUPPET_GEM_VERSION="~> 3.4.0" + - PUPPET_VERSION="~> 2.7.0" + - PUPPET_VERSION="~> 3.1.0" + - PUPPET_VERSION="~> 3.2.0" + - PUPPET_VERSION="~> 3.3.0" + - PUPPET_VERSION="~> 3.4.0" + - PUPPET_VERSION="~> 3.5.0" + - PUPPET_VERSION="~> 3.6.0" matrix: exclude: - - rvm: 1.9.3 - env: PUPPET_GEM_VERSION="~> 2.7.0" - rvm: 2.0.0 - env: PUPPET_GEM_VERSION="~> 2.7.0" + env: PUPPET_VERSION="~> 2.7.0" + - rvm: 1.9.3 + env: PUPPET_VERSION="~> 2.7.0" + - rvm: 2.0.0 + env: PUPPET_VERSION="~> 3.1.0" + - rvm: 1.8.7 + env: PUPPET_VERSION="~> 3.2.0" notifications: email: false diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/Changelog b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/Changelog index ab4faa445ff..b1e3228ff02 100644 --- a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/Changelog +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/Changelog @@ -1,3 +1,66 @@ +2014-06-20 - v0.4.0 + +Fixes: + +- Removed root as group and replaced with uid 0 to enhance system +compatibility + +Enhancements: + +- Made package provider a user definable param see supervisord::package_provider and README for details of how to change this. +- All define types can now be automatically pulled in from hiera see example https://github.com/ajcrowe/puppet-supervisord#configure-a-program +- You can now override the default include path of $config_include/*.conf with your own array using $config_dirs. Bear in mind this would need to include whatever you set $config_include to be, with *.conf on the end. + +Many thanks for the PRs from @jasperla, @mvantellingen for the bug report on the service name and @hasc for the enhancement ideas. + +2014-06-06 - v0.3.3 + +Fixes: + +- Fixed typo in stopwaitsec param, should have been stopwaitsecs, thanks to @rchrd2 + +2014-05-03 - v0.3.2 + +Changes: + +- Added supervisord::executable_ctl variable for supervisorctl binary path, thanks to @bpgoldsb + +2014-04-22 - v0.3.1 + +Fixes: + +- Fixed typo in unix_socket_group param, thanks to @dig412 + +2014-03-11 - v0.3.0 + +Fixes: + +- Fixed typo in fcgi config +- Fixed typo in supervisord config with minfds and minprocs, thanks to @peefourtee +- Typo in README fixed thanks to @hopkinsth +- Removed refreshonly from pip_install exec resource +- Number of syntax fixes thanks to `puppet lint` + +Important Changes: + +- Lots of input validation has been added **PLEASE** check your config works before upgrading! +- Changed init_extras naming to defaults and cleaned things up. +- Starting and stopping apps is now done with supervisorctl commands to avoid service restarts + +Other Changes: + +- CSV functions now order things consistently +- Included description for classes and functions +- Expanded spec testing built with Travis CI +- Added beaker acceptance tests +- Added greater validation of various parameters +- Added coverage reporting for resources + +To-Do: + +- Add support for additional OS families such as Solaris. + + 2013-10-31 - v0.2.3 Fixes: diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/Gemfile b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/Gemfile index 8612255f5b8..ba9a19d533a 100644 --- a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/Gemfile +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/Gemfile @@ -1,14 +1,26 @@ source 'https://rubygems.org' -group :development, :test do +group :test do gem 'rake' - gem 'puppetlabs_spec_helper', :require => false - gem 'rspec-system-puppet', '~> 2.0' - gem 'puppet-lint', '~> 0.3.2' + gem 'puppet-lint' + gem 'puppet-syntax' + gem 'puppetlabs_spec_helper' + gem 'rspec-puppet', :git => 'https://github.com/rodjek/rspec-puppet.git' , :ref => 'c44381a240ec420d4ffda7bffc55ee4d9c08d682' + gem 'rspec', '2.14.1' end -if puppetversion = ENV['PUPPET_GEM_VERSION'] - gem 'puppet', puppetversion, :require => false -else - gem 'puppet', :require => false +group :development do + gem 'travis' + gem 'travis-lint' + gem 'beaker' + gem 'beaker-rspec' + gem 'pry' + gem 'guard-rake' +end + + +if puppetversion = ENV['PUPPET_VERSION'] + gem 'puppet', puppetversion +else + gem 'puppet', '~> 3.4.0' end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/Modulefile b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/Modulefile index 4a0552115da..0c99b04baf2 100644 --- a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/Modulefile +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/Modulefile @@ -1,5 +1,5 @@ name 'ajcrowe-supervisord' -version '0.2.3' +version '0.4.0' source 'git@github.com/ajcrowe/puppet-supervisord.git' author 'Alex Crowe' license 'Apache License, Version 2.0' diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/README.md b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/README.md index a8419a09082..b454cd9307a 100644 --- a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/README.md +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/README.md @@ -4,7 +4,7 @@ Puppet module to manage the [supervisord](http://supervisord.org/) process control system. -Functions available to configure +Functions available to configure * [programs](http://supervisord.org/configuration.html#program-x-section-settings) * [groups](http://supervisord.org/configuration.html#group-x-section-settings) @@ -31,10 +31,16 @@ class supervisord { } ``` -This will download [setuptool](https://bitbucket.org/pypa/setuptools) and install pip with easy_install. +This will download [setuptool](https://bitbucket.org/pypa/setuptools) and install pip with easy_install. You can pass a specific url with `$setuptools_url = 'url'` +### Install without pip + +If you want to use your system package manager you can specify that with `supervisord::package_provider`. + +You'll also likely need to adjust the `supervisord::service_name` to match that installed by the system package. If you're using Debian or Redhat OS families you'll also want to disable the init scripts with `supervisord::install_init = false`. + Note: Only Debian and RedHat families have an init script currently. ### Configure a program @@ -61,23 +67,61 @@ supervisord::program { 'myprogram': } ``` +Or you can fully define your programs in hiera: + +```yaml +supervisord::programs: + 'myprogram': + command: 'command --args' + autostart: yes + autorestart: 'true' + environment: + HOME: '/home/myuser' + PATH: '/bin:/sbin:/usr/bin:/usr/sbin' + SECRET: 'mysecret' +``` + ### Configure a group ```ruby supervisord::group { 'mygroup': priority => 100, - program => ['program1', 'program2', 'program3'] + programs => ['program1', 'program2', 'program3'] } ``` +### Configure an eventlistener + +```ruby +supervisord::eventlistener { 'mylistener': + command => 'command --args', + events => ['PROCESS_STATE', 'PROCESS_STATE_START'] + priority => '100', + env_var => 'my_common_envs' +} +``` + +### Run supervisorctl Commands + +Should you need to run a sequence of command with `supervisorctl` you can use the define type `supervisord::supervisorctl` + +```ruby +supervisord::supervisorctl { 'restart_myapp': + command => 'restart', + process => 'myapp' +} +``` + +You can also issue a command without specifying a process. + ### Development If you have suggestions or improvements please file an issue or pull request, i'll try and sort them as quickly as possble. -If you submit a pull please try and include tests for the new functionality. The module is tested with [Travis-CI](https://travis-ci.org/ajcrowe/puppet-supervisord). +If you submit a pull please try and include tests for the new functionality/fix. The module is tested with [Travis-CI](https://travis-ci.org/ajcrowe/puppet-supervisord). ### Credits * Debian init script sourced from the system package. -* RedHat/Centos init script sourced from https://github.com/Supervisor/initscripts +* RedHat/Centos init script sourced from https://github.com/Supervisor/initscripts diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/Rakefile b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/Rakefile index e00f7d11877..cd592af48f4 100644 --- a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/Rakefile +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/Rakefile @@ -1,7 +1,28 @@ require 'puppetlabs_spec_helper/rake_tasks' require 'puppet-lint/tasks/puppet-lint' -require 'rspec-system/rake_task' +require 'puppet-syntax/tasks/puppet-syntax' PuppetLint.configuration.send('disable_80chars') PuppetLint.configuration.send('disable_class_inherits_from_params_class') -PuppetLint.configuration.send('disable_documentation') +PuppetLint.configuration.send('disable_quoted_booleans') +PuppetLint.configuration.send('disable_autoloader_layout') + +exclude_paths = [ + "pkg/**/*", + "vendor/**/*", + "spec/**/*", +] +PuppetLint.configuration.ignore_paths = exclude_paths +PuppetSyntax.exclude_paths = exclude_paths + +desc "Acceptance Tests" +RSpec::Core::RakeTask.new(:acceptance) do |t| + t.pattern = 'spec/acceptance' +end + +desc "Test Suite" +task :test => [ + :lint, + :syntax, + :spec +] \ No newline at end of file diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/lib/puppet/parser/functions/array2csv.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/lib/puppet/parser/functions/array2csv.rb index cfa52b2bbf2..6d34d5d5474 100644 --- a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/lib/puppet/parser/functions/array2csv.rb +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/lib/puppet/parser/functions/array2csv.rb @@ -1,14 +1,12 @@ # # Converts the array to a csv string # -# # $array = [ 'string1', 'string2', 'string3' ] # # becomes: # # $string = "string1,string2,string3" # - module Puppet::Parser::Functions newfunction(:array2csv, :type => :rvalue, :doc => <<-'EOS' Returns a sorted csv formatted string from an array in the form diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/lib/puppet/parser/functions/hash2csv.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/lib/puppet/parser/functions/hash2csv.rb index 6098b67367d..5371328f2ff 100644 --- a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/lib/puppet/parser/functions/hash2csv.rb +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/lib/puppet/parser/functions/hash2csv.rb @@ -1,7 +1,6 @@ # # Converts the hash to a csv string # -# # $hash = { # HOME => '/home/user', # ENV1 => 'env1', @@ -12,7 +11,6 @@ # # $string = "HOME='/home/user',ENV1='env1',SECRET='secret'" # - module Puppet::Parser::Functions newfunction(:hash2csv, :type => :rvalue, :doc => <<-'EOS' Returns a csv formatted string from an hash in the form diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/config.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/config.pp index cc8b1ee49d0..93713729e8b 100644 --- a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/config.pp +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/config.pp @@ -1,6 +1,16 @@ +# Class: supervisord::config +# +# Configuration class for supervisor init and conf directories +# class supervisord::config inherits supervisord { - file { [ "${supervisord::config_include}", "${supervisord::log_path}"]: + file { $supervisord::config_include: + ensure => directory, + owner => 'root', + mode => '0755' + } + + file { $supervisord::log_path: ensure => directory, owner => 'root', mode => '0755' @@ -15,30 +25,26 @@ class supervisord::config inherits supervisord { } if $supervisord::install_init { - - $osname = downcase($::osfamily) - file { '/etc/init.d/supervisord': ensure => present, owner => 'root', mode => '0755', - content => template("supervisord/init/${osname}_init.erb") + content => template("supervisord/init/${::osfamily}/init.erb") } - if $supervisord::init_extras { - file { $supervisord::init_extras: + if $supervisord::init_defaults { + file { $supervisord::init_defaults: ensure => present, owner => 'root', mode => '0755', - content => template("supervisord/init/${osname}_extra.erb") + content => template("supervisord/init/${::osfamily}/defaults.erb") } } - } concat { $supervisord::config_file: owner => 'root', - group => 'root', + group => '0', mode => '0755' } diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/eventlistener.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/eventlistener.pp index 41b7cf6c730..fd52d6e4da4 100644 --- a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/eventlistener.pp +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/eventlistener.pp @@ -1,8 +1,16 @@ +# Define: supervisord::eventlistener +# +# This define creates an eventlistener configuration file +# +# Documentation on parameters available at: +# http://supervisord.org/configuration.html#eventlistener-x-section-settings +# define supervisord::eventlistener( $command, $ensure = present, + $ensure_process = 'running', + $buffer_size = 10, $events = undef, - $buffer_size = undef, $result_handler = undef, $env_var = undef, $process_name = undef, @@ -15,16 +23,16 @@ define supervisord::eventlistener( $startretries = undef, $exitcodes = undef, $stopsignal = undef, - $stopwaitsec = undef, + $stopwaitsecs = undef, $stopasgroup = undef, $killasgroup = undef, $user = undef, $redirect_stderr = undef, - $stdout_logfile = "${supervisord::log_path}/eventlistener_${name}.log", + $stdout_logfile = "eventlistener_${name}.log", $stdout_logfile_maxbytes = undef, $stdout_logfile_backups = undef, $stdout_events_enabled = undef, - $stderr_logfile = "${supervisord::log_path}/eventlistener_${name}.error", + $stderr_logfile = "eventlistener_${name}.error", $stderr_logfile_maxbytes = undef, $stderr_logfile_backups = undef, $stderr_events_enabled = undef, @@ -36,11 +44,45 @@ define supervisord::eventlistener( include supervisord + # parameter validation + validate_string($command) + validate_re($ensure_process, ['running', 'stopped', 'removed']) + validate_re($buffer_size, '^\d+') + if $events { validate_array($events) } + if $result_handler { validate_string($result_handler) } + if $numprocs { validate_re($numprocs, '^\d+')} + if $numprocs_start { validate_re($numprocs_start, '^\d+')} + if $priority { validate_re($priority, '^\d+') } + if $autostart { validate_bool($autostart) } + if $autorestart { validate_re($autorestart, ['true', 'false', 'unexpected']) } + if $startsecs { validate_re($startsecs, '^\d+')} + if $startretries { validate_re($startretries, '^\d+')} + if $exitcodes { validate_string($exitcodes)} + if $stopsignal { validate_re($stopsignal, ['TERM', 'HUP', 'INT', 'QUIT', 'KILL', 'USR1', 'USR2']) } + if $stopwaitsecs { validate_re($stopwaitsecs, '^\d+')} + if $stopasgroup { validate_bool($stopasgroup) } + if $killasgroup { validate_bool($killasgroup) } + if $user { validate_string($user) } + if $redirect_stderr { validate_bool($redirect_stderr) } + validate_string($stdout_logfile) + if $stdout_logfile_maxbytes { validate_string($stdout_logfile_maxbytes) } + if $stdout_logfile_backups { validate_re($stdout_logfile_backups, '^\d+')} + if $stdout_events_enabled { validate_bool($stdout_events_enabled) } + validate_string($stderr_logfile) + if $stderr_logfile_maxbytes { validate_string($stderr_logfile_maxbytes) } + if $stderr_logfile_backups { validate_re($stderr_logfile_backups, '^\d+')} + if $stderr_events_enabled { validate_bool($stderr_events_enabled) } + if $directory { validate_absolute_path($directory) } + if $umask { validate_re($umask, '^[0-7][0-7][0-7]$') } + + # convert environment data into a csv if $env_var { - $env_hash = hiera($env_var) + $env_hash = hiera_hash($env_var) + validate_hash($env_hash) $env_string = hash2csv($env_hash) } elsif $environment { + validate_hash($environment) $env_string = hash2csv($environment) } @@ -55,6 +97,22 @@ define supervisord::eventlistener( owner => 'root', mode => '0755', content => template('supervisord/conf/eventlistener.erb'), - notify => Class['supervisord::service'] + notify => Class['supervisord::reload'] + } + + case $ensure_process { + 'stopped': { + supervisord::supervisorctl { "stop_${name}": + command => 'stop', + process => $name + } + } + 'removed': { + supervisord::supervisorctl { "remove_${name}": + command => 'remove', + process => $name + } + } + default: { } } } diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/fcgi_program.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/fcgi_program.pp index 923b1798bff..633b024917e 100644 --- a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/fcgi_program.pp +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/fcgi_program.pp @@ -1,7 +1,15 @@ +# Define: supervisord::fcgi_program +# +# This define creates an eventlistener configuration file +# +# Documentation on parameters available at: +# http://supervisord.org/configuration.html#fcgi-program-x-section-settings +# define supervisord::fcgi_program( $command, $socket, $ensure = present, + $ensure_process = 'running', $socket_owner = undef, $socket_mode = undef, $env_var = undef, @@ -15,17 +23,17 @@ define supervisord::fcgi_program( $startretries = undef, $exitcodes = undef, $stopsignal = undef, - $stopwaitsec = undef, + $stopwaitsecs = undef, $stopasgroup = undef, $killasgroup = undef, $user = undef, $redirect_stderr = undef, - $stdout_logfile = "${supervisord::log_path}/fcgi-program_${name}.log", + $stdout_logfile = "fcgi-program_${name}.log", $stdout_logfile_maxbytes = undef, $stdout_logfile_backups = undef, $stdout_capture_maxbytes = undef, $stdout_events_enabled = undef, - $stderr_logfile = "${supervisord::log_path}/fcgi-program_${name}.error", + $stderr_logfile = "fcgi-program_${name}.error", $stderr_logfile_maxbytes = undef, $stderr_logfile_backups = undef, $stderr_capture_maxbytes = undef, @@ -38,11 +46,46 @@ define supervisord::fcgi_program( include supervisord + # parameter validation + validate_string($command) + validate_re($ensure_process, ['running', 'stopped', 'removed']) + validate_re($socket, ['^tcp:\/\/.*:\d+$', '^unix:\/\/\/']) + if $process_name { validate_string($process_name) } + if $numprocs { validate_re($numprocs, '^\d+')} + if $numprocs_start { validate_re($numprocs_start, '^\d+')} + if $priority { validate_re($priority, '^\d+') } + if $autostart { validate_bool($autostart) } + if $autorestart { validate_re($autorestart, ['true', 'false', 'unexpected']) } + if $startsecs { validate_re($startsecs, '^\d+')} + if $startretries { validate_re($startretries, '^\d+')} + if $exitcodes { validate_string($exitcodes)} + if $stopsignal { validate_re($stopsignal, ['TERM', 'HUP', 'INT', 'QUIT', 'KILL', 'USR1', 'USR2']) } + if $stopwaitsecs { validate_re($stopwaitsecs, '^\d+')} + if $stopasgroup { validate_bool($stopasgroup) } + if $killasgroup { validate_bool($killasgroup) } + if $user { validate_string($user) } + if $redirect_stderr { validate_bool($redirect_stderr) } + validate_string($stdout_logfile) + if $stdout_logfile_maxbytes { validate_string($stdout_logfile_maxbytes) } + if $stdout_logfile_backups { validate_re($stdout_logfile_backups, '^\d+')} + if $stdout_capture_maxbytes { validate_string($stdout_capture_maxbytes) } + if $stdout_events_enabled { validate_bool($stdout_events_enabled) } + validate_string($stderr_logfile) + if $stderr_logfile_maxbytes { validate_string($stderr_logfile_maxbytes) } + if $stderr_logfile_backups { validate_re($stderr_logfile_backups, '^\d+')} + if $stderr_capture_maxbytes { validate_string($stderr_capture_maxbytes) } + if $stderr_events_enabled { validate_bool($stderr_events_enabled) } + if $directory { validate_absolute_path($directory) } + if $umask { validate_re($umask, '^[0-7][0-7][0-7]$') } + + # convert environment data into a csv if $env_var { - $env_hash = hiera($env_var) + $env_hash = hiera_hash($env_var) + validate_hash($env_hash) $env_string = hash2csv($env_hash) } elsif $environment { + validate_hash($environment) $env_string = hash2csv($environment) } @@ -53,6 +96,22 @@ define supervisord::fcgi_program( owner => 'root', mode => '0755', content => template('supervisord/conf/fcgi_program.erb'), - notify => Class['supervisord::service'] + notify => Class['supervisord::reload'] + } + + case $ensure_process { + 'stopped': { + supervisord::supervisorctl { "stop_${name}": + command => 'stop', + process => $name + } + } + 'removed': { + supervisord::supervisorctl { "remove_${name}": + command => 'remove', + process => $name + } + } + default: { } } } diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/group.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/group.pp index 0f6b1ca2adc..45cb29cf290 100644 --- a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/group.pp +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/group.pp @@ -1,3 +1,10 @@ +# Define: supervisord::group +# +# This define creates an group configuration file +# +# Documentation on parameters available at: +# http://supervisord.org/configuration.html#group-x-section-settings +# define supervisord::group ( $programs, $ensure = present, @@ -6,6 +13,10 @@ define supervisord::group ( include supervisord + # parameter validation + validate_array($programs) + if $priority { validate_re($priority, '^\d+', "invalid priority value of: ${priority}") } + $progstring = array2csv($programs) $conf = "${supervisord::config_include}/group_${name}.conf" @@ -13,6 +24,7 @@ define supervisord::group ( ensure => $ensure, owner => 'root', mode => '0755', - content => template('supervisord/conf/group.erb') + content => template('supervisord/conf/group.erb'), + notify => Class['supervisord::reload'] } } diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/init.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/init.pp index 801c46b3b36..1d2d55148d9 100644 --- a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/init.pp +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/init.pp @@ -1,12 +1,18 @@ -# This class installs supervisord and configured it to run on boot +# Class: supervisord +# +# This class installs supervisord via pip +# class supervisord( $package_ensure = $supervisord::params::package_ensure, + $package_provider = $supervisord::params::package_provider, $service_ensure = $supervisord::params::service_ensure, + $service_name = $supervisord::params::service_name, $install_init = $supervisord::params::install_init, $install_pip = false, - $init_extras = $supervisord::params::init_extras, + $init_defaults = $supervisord::params::init_defaults, $setuptools_url = $supervisord::params::setuptools_url, $executable = $supervisord::params::executable, + $executable_ctl = $supervisord::params::executable_ctl, $log_path = $supervisord::params::log_path, $log_file = $supervisord::params::log_file, @@ -19,20 +25,20 @@ class supervisord( $nodaemon = $supervisord::params::nodaemon, $minfds = $supervisord::params::minfds, $minprocs = $supervisord::params::minprocs, - $config_path = $supervisord::params::config_path, $config_include = $supervisord::params::config_include, $config_file = $supervisord::params::config_file, + $config_dirs = undef, $umask = $supervisord::params::umask, $unix_socket = $supervisord::params::unix_socket, $unix_socket_file = $supervisord::params::unix_socket_file, $unix_socket_mode = $supervisord::params::unix_socket_mode, $unix_socket_owner = $supervisord::params::unix_socket_owner, - $unix_scoket_group = $supervisord::params::unix_socket_group, + $unix_socket_group = $supervisord::params::unix_socket_group, $inet_server = $supervisord::params::inet_server, - $inet_server_hostname = $supervisord::params::inet_hostname, - $inet_server_port = $supervisord::params::inet_port, + $inet_server_hostname = $supervisord::params::inet_server_hostname, + $inet_server_port = $supervisord::params::inet_server_port, $unix_auth = false, $unix_username = undef, @@ -47,26 +53,76 @@ class supervisord( $childlogdir = undef, $environment = undef, $env_var = undef, + $directory = undef, $strip_ansi = false, - $nocleanup = false + $nocleanup = false, + + $eventlisteners = {}, + $fcgi_programs = {}, + $groups = {}, + $programs = {} ) inherits supervisord::params { + validate_bool($install_pip) + validate_bool($install_init) + validate_bool($nodaemon) + validate_bool($unix_auth) + validate_bool($inet_auth) + validate_bool($strip_ansi) + validate_bool($nocleanup) + + validate_hash($eventlisteners) + validate_hash($fcgi_programs) + validate_hash($groups) + validate_hash($programs) + + validate_absolute_path($config_include) + validate_absolute_path($log_path) + validate_absolute_path($run_path) + if $childlogdir { validate_absolute_path($childlogdir) } + if $directory { validate_absolute_path($directory) } + + $log_levels = ['^critical$', '^error$', '^warn$', '^info$', '^debug$', '^trace$', '^blather$'] + validate_re($log_level, $log_levels, "invalid log_level: ${log_level}") + validate_re($umask, '^0[0-7][0-7]$', "invalid umask: ${umask}.") + validate_re($unix_socket_mode, '^[0-7][0-7][0-7][0-7]$', "invalid unix_socket_mode: ${unix_socket_mode}") + + if ! is_integer($logfile_backups) { fail("invalid logfile_backups: ${logfile_backups}.")} + if ! is_integer($minfds) { fail("invalid minfds: ${minfds}.")} + if ! is_integer($minprocs) { fail("invalid minprocs: ${minprocs}.")} + if ! is_integer($inet_server_port) { fail("invalid inet_server_port: ${inet_server_port}.")} + if $env_var { + validate_hash($env_var) $env_hash = hiera($env_var) $env_string = hash2csv($env_hash) } elsif $environment { + validate_hash($environment) $env_string = hash2csv($environment) } + if $config_dirs { + validate_array($config_dirs) + $config_include_string = join($config_dirs, " ") + } + else { + $config_include_string = "${config_include}/*.conf" + } + + create_resources('supervisord::eventlistener', $eventlisteners) + create_resources('supervisord::fcgi_program', $fcgi_programs) + create_resources('supervisord::group', $groups) + create_resources('supervisord::program', $programs) + if $install_pip { include supervisord::pip Class['supervisord::pip'] -> Class['supervisord::install'] } - include supervisord::install, supervisord::config, supervisord::service + include supervisord::install, supervisord::config, supervisord::service, supervisord::reload Class['supervisord::install'] -> Class['supervisord::config'] ~> Class['supervisord::service'] - + Class['supervisord::reload'] -> Supervisord::Supervisorctl <| |> } diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/install.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/install.pp index 1d36ec68334..31a63f3b59e 100644 --- a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/install.pp +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/install.pp @@ -1,6 +1,10 @@ +# Class supervisord::install +# +# Installs supervisor package (defaults to using pip) +# class supervisord::install inherits supervisord { package { 'supervisor': ensure => $supervisord::package_ensure, - provider => 'pip' + provider => $supervisord::package_provider } } diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/params.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/params.pp index 87d17d16179..f9d82e5804b 100644 --- a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/params.pp +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/params.pp @@ -1,13 +1,21 @@ +# Class: supervisord::params +# +# Default parameters for supervisord +# class supervisord::params { + # default supervisord params $package_ensure = 'installed' + $package_provider = 'pip' $service_ensure = 'running' + $service_name = 'supervisord' $package_name = 'supervisor' - $executable = '/usr/local/bin/supervisord' + $executable = 'supervisord' + $executable_ctl = 'supervisorctl' $run_path = '/var/run' - $pid_file = "${run_path}/supervisord.pid" + $pid_file = 'supervisord.pid' $log_path = '/var/log/supervisor' - $log_file = "${log_path}/supervisord.log" + $log_file = 'supervisord.log' $logfile_maxbytes = '50MB' $logfile_backups = '10' $log_level = 'info' @@ -20,7 +28,7 @@ class supervisord::params { $setuptools_url = 'https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py' $unix_socket = true - $unix_socket_file = "${run_path}/supervisor.sock" + $unix_socket_file = 'supervisor.sock' $unix_socket_mode = '0700' $unix_socket_owner = 'nobody' @@ -31,17 +39,17 @@ class supervisord::params { case $::osfamily { 'RedHat': { - $init_extras = '/etc/sysconfig/supervisord' + $init_defaults = '/etc/sysconfig/supervisord' $unix_socket_group = 'nobody' $install_init = true } 'Debian': { - $init_extras = '/etc/default/supervisor' + $init_defaults = '/etc/default/supervisor' $unix_socket_group = 'nogroup' $install_init = true } default: { - $init_extras = false + $init_defaults = false $unix_socket_group = 'nogroup' $install_init = false } diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/pip.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/pip.pp index c05f2d7f64b..71dd3653da3 100644 --- a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/pip.pp +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/pip.pp @@ -1,8 +1,10 @@ +# Class: supervisord::pip +# +# Optional class to install setuptool and pip +# class supervisord::pip inherits supervisord { - Exec { - path => '/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin' - } + Exec { path => [ '/usr/bin/', '/usr/local/bin', '/bin', '/usr/local/sbin', '/usr/sbin', '/sbin' ] } exec { 'install_setuptools': command => "curl ${supervisord::setuptools_url} | python", diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/program.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/program.pp index 8a00d41c77c..617a68ab208 100644 --- a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/program.pp +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/program.pp @@ -1,6 +1,14 @@ +# Define: supervisord::program +# +# This define creates an program configuration file +# +# Documentation on parameters available at: +# http://supervisord.org/configuration.html#program-x-section-settings +# define supervisord::program( $command, $ensure = present, + $ensure_process = 'running', $env_var = undef, $process_name = undef, $numprocs = undef, @@ -12,17 +20,17 @@ define supervisord::program( $startretries = undef, $exitcodes = undef, $stopsignal = undef, - $stopwaitsec = undef, + $stopwaitsecs = undef, $stopasgroup = undef, $killasgroup = undef, $user = undef, $redirect_stderr = undef, - $stdout_logfile = "${supervisord::log_path}/program_${name}.log", + $stdout_logfile = "program_${name}.log", $stdout_logfile_maxbytes = undef, $stdout_logfile_backups = undef, $stdout_capture_maxbytes = undef, $stdout_events_enabled = undef, - $stderr_logfile = "${supervisord::log_path}/program_${name}.error", + $stderr_logfile = "program_${name}.error", $stderr_logfile_maxbytes = undef, $stderr_logfile_backups = undef, $stderr_capture_maxbytes = undef, @@ -35,11 +43,45 @@ define supervisord::program( include supervisord + # parameter validation + validate_string($command) + validate_re($ensure_process, ['running', 'stopped', 'removed']) + if $process_name { validate_string($process_name) } + if $numprocs { validate_re($numprocs, '^\d+')} + if $numprocs_start { validate_re($numprocs_start, '^\d+')} + if $priority { validate_re($priority, '^\d+') } + if $autostart { validate_bool($autostart) } + if $autorestart { validate_re($autorestart, ['true', 'false', 'unexpected']) } + if $startsecs { validate_re($startsecs, '^\d+')} + if $startretries { validate_re($startretries, '^\d+')} + if $exitcodes { validate_string($exitcodes)} + if $stopsignal { validate_re($stopsignal, ['TERM', 'HUP', 'INT', 'QUIT', 'KILL', 'USR1', 'USR2']) } + if $stopwaitsecs { validate_re($stopwaitsecs, '^\d+')} + if $stopasgroup { validate_bool($stopasgroup) } + if $killasgroup { validate_bool($killasgroup) } + if $user { validate_string($user) } + if $redirect_stderr { validate_bool($redirect_stderr) } + validate_string($stdout_logfile) + if $stdout_logfile_maxbytes { validate_string($stdout_logfile_maxbytes) } + if $stdout_logfile_backups { validate_re($stdout_logfile_backups, '^\d+')} + if $stdout_capture_maxbytes { validate_string($stdout_capture_maxbytes) } + if $stdout_events_enabled { validate_bool($stdout_events_enabled) } + validate_string($stderr_logfile) + if $stderr_logfile_maxbytes { validate_string($stderr_logfile_maxbytes) } + if $stderr_logfile_backups { validate_re($stderr_logfile_backups, '^\d+')} + if $stderr_capture_maxbytes { validate_string($stderr_capture_maxbytes) } + if $stderr_events_enabled { validate_bool($stderr_events_enabled) } + if $directory { validate_absolute_path($directory) } + if $umask { validate_re($umask, '^[0-7][0-7][0-7]$') } + + # convert environment data into a csv if $env_var { - $env_hash = hiera($env_var) + $env_hash = hiera_hash($env_var) + validate_hash($env_hash) $env_string = hash2csv($env_hash) } elsif $environment { + validate_hash($environment) $env_string = hash2csv($environment) } @@ -50,6 +92,22 @@ define supervisord::program( owner => 'root', mode => '0755', content => template('supervisord/conf/program.erb'), - notify => Class['supervisord::service'] + notify => Class['supervisord::reload'] + } + + case $ensure_process { + 'stopped': { + supervisord::supervisorctl { "stop_${name}": + command => 'stop', + process => $name + } + } + 'removed': { + supervisord::supervisorctl { "remove_${name}": + command => 'remove', + process => $name + } + } + default: { } } } diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/reload.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/reload.pp new file mode 100644 index 00000000000..e5a4637e430 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/reload.pp @@ -0,0 +1,21 @@ +# Class: supervisord::reload +# +# Class to reread and update supervisord with supervisorctl +# +class supervisord::reload { + + Exec { path => [ '/usr/bin/', '/usr/local/bin' ] } + + $supervisorctl = $::supervisord::executable_ctl + + exec { 'supervisorctl_reread': + command => "${supervisorctl} reread", + refreshonly => true, + returns => [0, 2], + } + exec { 'supervisorctl_update': + command => "${supervisorctl} update", + refreshonly => true, + returns => [0, 2], + } +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/service.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/service.pp index 6e17976165d..f02a0d0a081 100644 --- a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/service.pp +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/service.pp @@ -1,5 +1,9 @@ +# Class: supervisord::service +# +# Class for the supervisord service +# class supervisord::service inherits supervisord { - service { 'supervisord': + service { $supervisord::service_name: ensure => $supervisord::service_ensure, enable => true, hasrestart => true, diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/supervisorctl.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/supervisorctl.pp new file mode 100644 index 00000000000..ec4dbed9337 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/manifests/supervisorctl.pp @@ -0,0 +1,29 @@ +# Define: supervisord:supervisorctl +# +# This define executes command with the supervisorctl tool +# +define supervisord::supervisorctl( + $command, + $process = undef, + $refreshonly = false +) { + + Exec { path => [ '/usr/bin/', '/usr/local/bin' ] } + + validate_string($command) + validate_string($process) + + $supervisorctl = $::supervisord::executable_ctl + + if $process { + $cmd = join([$supervisorctl, $command, $process], ' ') + } + else { + $cmd = join([$supervisorctl, $command]) + } + + exec { "supervisorctl_command_${name}": + command => $cmd, + refreshonly => $refreshonly + } +} diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/acceptance/nodesets/centos-65-i386.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/acceptance/nodesets/centos-65-i386.yml new file mode 100644 index 00000000000..f8d4013a31b --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/acceptance/nodesets/centos-65-i386.yml @@ -0,0 +1,10 @@ +HOSTS: + centos-65-i386: + roles: + - master + platform: el-6-i386 + box : centos-65-i386-virtualbox-nocm + box_url : http://puppet-vagrant-boxes.puppetlabs.com/centos-65-i386-virtualbox-nocm.box + hypervisor : vagrant +CONFIG: + type: foss diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/acceptance/nodesets/centos-65-x64.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/acceptance/nodesets/centos-65-x64.yml new file mode 100644 index 00000000000..7535c104afb --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/acceptance/nodesets/centos-65-x64.yml @@ -0,0 +1,10 @@ +HOSTS: + centos-65-x64: + roles: + - master + platform: el-6-x86_64 + box : centos-65-x64-virtualbox-nocm + box_url : http://puppet-vagrant-boxes.puppetlabs.com/centos-65-x64-virtualbox-nocm.box + hypervisor : vagrant +CONFIG: + type: foss diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/acceptance/nodesets/debian-73-i386.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/acceptance/nodesets/debian-73-i386.yml new file mode 100644 index 00000000000..d1233aa83d1 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/acceptance/nodesets/debian-73-i386.yml @@ -0,0 +1,10 @@ +HOSTS: + debian-73-i386: + roles: + - master + platform: debian-7-i386 + box : debian-73-i386-virtualbox-nocm + box_url : http://puppet-vagrant-boxes.puppetlabs.com/debian-73-i386-virtualbox-nocm.box + hypervisor : vagrant +CONFIG: + type: foss diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/acceptance/nodesets/debian-73-x64.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/acceptance/nodesets/debian-73-x64.yml new file mode 100644 index 00000000000..5b87870a909 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/acceptance/nodesets/debian-73-x64.yml @@ -0,0 +1,10 @@ +HOSTS: + debian-73-x64: + roles: + - master + platform: debian-7-amd64 + box : debian-73-x64-virtualbox-nocm + box_url : http://puppet-vagrant-boxes.puppetlabs.com/debian-73-x64-virtualbox-nocm.box + hypervisor : vagrant +CONFIG: + type: foss diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/acceptance/nodesets/default.yml b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/acceptance/nodesets/default.yml new file mode 100644 index 00000000000..5b87870a909 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/acceptance/nodesets/default.yml @@ -0,0 +1,10 @@ +HOSTS: + debian-73-x64: + roles: + - master + platform: debian-7-amd64 + box : debian-73-x64-virtualbox-nocm + box_url : http://puppet-vagrant-boxes.puppetlabs.com/debian-73-x64-virtualbox-nocm.box + hypervisor : vagrant +CONFIG: + type: foss diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/acceptance/supervisord_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/acceptance/supervisord_spec.rb new file mode 100644 index 00000000000..47d052a4eec --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/acceptance/supervisord_spec.rb @@ -0,0 +1,114 @@ +require 'spec_helper_acceptance' + +describe 'supervisord install' do + + context 'default parameters with pip and init install' do + it 'should work with no errors' do + pp = <<-EOS + class { 'supervisord': install_pip => true, install_init => true} + EOS + + expect(apply_manifest(pp).exit_code).to_not eq(1) + expect(apply_manifest(pp).exit_code).to eq(0) + end + + describe service('supervisord') do + it { should be_enabled } + it { should be_running } + it 'should restart successfully' do + cmd="service supervisord restart" + expect(shell(cmd).exit_code).to_not eq(1) + end + end + end +end + +describe 'supervisord::program' do + context 'create a program config' do + it 'should install a program file' do + + pp = <<-EOS + include supervisord + supervisord::program { 'test': + command => 'echo', + priority => '100', + environment => { + 'HOME' => '/root', + 'PATH' => '/bin', + } + } + EOS + + expect(apply_manifest(pp).exit_code).to_not eq(1) + expect(apply_manifest(pp).exit_code).to eq(0) + end + + it 'should contain the correct values' do + cmd='grep command=echo /etc/supervisor.d/program_test.conf' + expect(shell(cmd).exit_code).to eq(0) + cmd='grep priority=100 /etc/supervisor.d/program_test.conf' + expect(shell(cmd).exit_code).to eq(0) + cmd='grep "environment=" /etc/supervisor.d/program_test.conf' + expect(shell(cmd).exit_code).to eq(0) + end + end +end + +describe 'supervisord::fcgi-program' do + context 'create fcgi-program config' do + it 'should install a fcgi-program file' do + + pp = <<-EOS + include supervisord + supervisord::fcgi_program { 'test': + socket => 'tcp://localhost:1000', + command => 'echo', + priority => '100', + environment => { + 'HOME' => '/root', + 'PATH' => '/bin', + } + } + EOS + + expect(apply_manifest(pp).exit_code).to_not eq(1) + expect(apply_manifest(pp).exit_code).to eq(0) + end + + it 'should contain the correct values' do + cmd='grep socket=tcp://localhost:1000 /etc/supervisor.d/fcgi-program_test.conf' + expect(shell(cmd).exit_code).to eq(0) + cmd="grep command=echo /etc/supervisor.d/fcgi-program_test.conf" + expect(shell(cmd).exit_code).to eq(0) + cmd="grep priority=100 /etc/supervisor.d/fcgi-program_test.conf" + expect(shell(cmd).exit_code).to eq(0) + cmd='grep "environment=" /etc/supervisor.d/fcgi-program_test.conf' + expect(shell(cmd).exit_code).to eq(0) + end + end +end + +describe 'supervisord::group' do + context 'create group config' do + it 'should install a group config' do + + pp = <<-EOS + include supervisord + supervisord::group { 'test': + programs => ['test'], + priority => '100', + } + EOS + + expect(apply_manifest(pp).exit_code).to_not eq(1) + expect(apply_manifest(pp).exit_code).to eq(0) + end + + it 'should contain the correct values' do + cmd='grep "programs=test" /etc/supervisor.d/group_test.conf' + expect(shell(cmd).exit_code).to eq(0) + cmd="grep priority=100 /etc/supervisor.d/group_test.conf" + expect(shell(cmd).exit_code).to eq(0) + end + end +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/classes/supervisord_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/classes/supervisord_spec.rb index 238876c7dcd..b845920f6fe 100644 --- a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/classes/supervisord_spec.rb +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/classes/supervisord_spec.rb @@ -3,14 +3,26 @@ require 'spec_helper' describe 'supervisord' do concatdir = '/var/lib/puppet/concat' - configfile = '/etc/supervisord.conf' let(:facts) {{ :concat_basedir => concatdir }} it { should contain_class('supervisord') } it { should contain_class('supervisord::install') } it { should contain_class('supervisord::config') } it { should contain_class('supervisord::service') } - it { should contain_concat__fragment('supervisord_main').with_content(/logfile/) } + it { should contain_class('supervisord::params') } + it { should contain_class('supervisord::reload') } + it { should contain_package('supervisor') } + + describe '#service_name' do + context 'default' do + it { should contain_service('supervisord') } + end + + context 'specified' do + let(:params) {{ :service_name => 'myservicename' }} + it { should contain_service('myservicename') } + end + end describe '#install_pip' do context 'default' do @@ -18,8 +30,16 @@ describe 'supervisord' do end context 'true' do - let (:params) {{ :install_pip => true }} + let(:params) {{ :install_pip => true }} it { should contain_class('supervisord::pip') } + it { should contain_exec('install_setuptools') } + it { should contain_exec('install_pip') } + end + + context 'true and RedHat' do + let(:params) {{ :install_pip => true }} + let(:facts) {{ :osfamily => 'RedHat', :concat_basedir => concatdir }} + it { should contain_exec('pip_provider_name_fix') } end end @@ -28,11 +48,6 @@ describe 'supervisord' do it { should contain_class('supervisord').without_env_hash } it { should contain_class('supervisord').without_env_string } end - #context 'is specified' do - # let(:params) {{ :env_var => 'foovars' }} - # let(:hiera_data) {{ :foovars => { 'key1' => 'value1', 'key2' => 'value2' } }} - # it { should contain_concat__fragment('supervisord_main').with_content(/environment=key1='value1',key2='value2'/) } - #end end describe '#environment' do @@ -41,7 +56,8 @@ describe 'supervisord' do end context 'is specified' do let(:params) {{ :environment => { 'key1' => 'value1', 'key2' => 'value2' } }} - it { should contain_concat__fragment('supervisord_main').with_content(/environment=key1='value1',key2='value2'/) } + it { should contain_concat__fragment('supervisord_main')\ + .with_content(/environment=key1='value1',key2='value2'/) } end end @@ -54,17 +70,20 @@ describe 'supervisord' do it { should_not contain_file('/etc/init.d/supervisord') } end - describe 'on supported OS' + describe 'on supported OS' do context 'with Debian' do let(:facts) {{ :osfamily => 'Debian', :concat_basedir => concatdir }} it { should contain_file('/etc/init.d/supervisord') } + it { should contain_file('/etc/default/supervisor') } end context 'with RedHat' do let(:facts) {{ :osfamily => 'RedHat', :concat_basedir => concatdir }} it { should contain_file('/etc/init.d/supervisord') } + it { should contain_file('/etc/sysconfig/supervisord') } end end + end describe '#unix_socket' do context 'default' do @@ -89,10 +108,192 @@ describe 'supervisord' do describe '#run_path' do context 'default' do it { should_not contain_file('/var/run') } + it { should contain_concat__fragment('supervisord_main') \ + .with_content(/pidfile=\/var\/run\/supervisord.pid$/) } end - context 'custom setting' do - let(:params) {{ :run_path => '/var/run/supervisord'}} - it { should contain_file('/var/run/supervisord') } + context 'is specified' do + let(:params) {{ :run_path => '/opt/supervisord/run' }} + it { should contain_file('/opt/supervisord/run') } + it { should contain_concat__fragment('supervisord_main') \ + .with_content(/pidfile=\/opt\/supervisord\/run\/supervisord.pid$/) } + end + end + + describe '#log_path' do + context 'default' do + it { should contain_file('/var/log/supervisor') } + it { should contain_concat__fragment('supervisord_main') \ + .with_content(/logfile=\/var\/log\/supervisor\/supervisord.log$/) } + end + context 'is specified' do + let(:params) {{ :log_path => '/opt/supervisord/logs' }} + it { should contain_file('/opt/supervisord/logs')} + it { should contain_concat__fragment('supervisord_main') \ + .with_content(/logfile=\/opt\/supervisord\/logs\/supervisord.log$/) } + end + end + + describe '#config_include' do + context 'default' do + it { should contain_file('/etc/supervisor.d') } + it { should contain_concat__fragment('supervisord_main') \ + .with_content(/files=\/etc\/supervisor.d\/\*.conf$/) } + end + context 'is specified' do + let(:params) {{ :config_include => '/opt/supervisord/conf.d' }} + it { should contain_file('/opt/supervisord/conf.d') } + it { should contain_concat__fragment('supervisord_main') \ + .with_content(/files=\/opt\/supervisord\/conf.d\/\*.conf$/) } + end + end + + describe '#config_dirs' do + context 'is specified' do + let(:params) {{ :config_dirs => ['/etc/supervisor.d/*.conf', '/opt/supervisor.d/*', '/usr/share/supervisor.d/*.config'] }} + it { should contain_concat__fragment('supervisord_main') \ + .with_content(/files=\/etc\/supervisor.d\/\*.conf \/opt\/supervisor.d\/\* \/usr\/share\/supervisor.d\/\*.config$/) } + end + end + + describe '#config_file' do + context 'default' do + it { should contain_file('/etc/supervisord.conf') } + end + context 'is specified' do + let(:params) {{ :config_file => '/opt/supervisord/supervisor.conf' }} + it { should contain_file('/opt/supervisord/supervisor.conf') } + end + end + + describe '#nodaemon' do + context 'default' do + it { should contain_concat__fragment('supervisord_main') \ + .with_content(/nodaemon=false$/) } + end + context 'true' do + let(:params) {{ :nodaemon => true }} + it { should contain_concat__fragment('supervisord_main') \ + .with_content(/nodaemon=true$/) } + end + context 'invalid' do + let(:params) {{ :nodaemon => 'invalid' }} + it { expect { raise_error(Puppet::Error, /is not a boolean/) }} + end + end + + describe '#minfds' do + context 'default' do + it { should contain_concat__fragment('supervisord_main') \ + .with_content(/minfds=1024$/) } + end + context 'specified' do + let(:params) {{ :minfds => 2048 }} + it { should contain_concat__fragment('supervisord_main') \ + .with_content(/minfds=2048$/) } + end + context 'invalid' do + let(:params) {{ :minfds => 'string' }} + it { expect { raise_error(Puppet::Error, /invalid minfds/) }} + end + end + + describe '#minprocs' do + context 'default' do + it { should contain_concat__fragment('supervisord_main') \ + .with_content(/minprocs=200$/) } + end + context 'specified' do + let(:params) {{ :minprocs => 300 }} + it { should contain_concat__fragment('supervisord_main') \ + .with_content(/minprocs=300$/) } + end + context 'invalid' do + let(:params) {{ :minfds => 'string' }} + it { expect { raise_error(Puppet::Error, /invalid minprocs/) }} + end + end + + describe '#strip_ansi' do + context 'default' do + it { should_not contain_concat__fragment('supervisord_main') \ + .with_content(/strip_ansi$/) } + end + context 'true' do + let(:params) {{ :strip_ansi => true }} + it { should contain_concat__fragment('supervisord_main') \ + .with_content(/strip_ansi=true$/) } + end + context 'invalid' do + let(:params) {{ :strip_ansi => 'string' }} + it { expect { raise_error(Puppet::Error, /is not a boolean/) }} + end + end + + describe '#user' do + context 'default' do + it { should_not contain_concat__fragment('supervisord_main') \ + .with_content(/user$/) } + end + context 'specified' do + let(:params) {{ :user => 'myuser' }} + it { should contain_concat__fragment('supervisord_main') \ + .with_content(/user=myuser$/) } + end + end + + describe '#identifier' do + context 'default' do + it { should_not contain_concat__fragment('supervisord_main') \ + .with_content(/identifier$/) } + end + context 'specified' do + let(:params) {{ :identifier => 'myidentifier' }} + it { should contain_concat__fragment('supervisord_main') \ + .with_content(/identifier=myidentifier$/) } + end + end + + describe '#directory' do + context 'default' do + it { should_not contain_concat__fragment('supervisord_main') \ + .with_content(/directory$/) } + end + context 'specified' do + let(:params) {{ :directory => '/opt/supervisord' }} + it { should contain_concat__fragment('supervisord_main') \ + .with_content(/directory=\/opt\/supervisord$/) } + end + end + + describe '#nocleanup' do + context 'default' do + it { should_not contain_concat__fragment('supervisord_main') \ + .with_content(/nocleanup$/) } + end + context 'true' do + let(:params) {{ :nocleanup => true }} + it { should contain_concat__fragment('supervisord_main') \ + .with_content(/nocleanup=true$/) } + end + context 'invalid' do + let(:params) {{ :nocleanup => 'string' }} + it { expect { raise_error(Puppet::Error, /is not a boolean/) }} + end + end + + describe '#childlogdir' do + context 'default' do + it { should_not contain_concat__fragment('supervisord_main') \ + .with_content(/childlogdir$/) } + end + context 'specified' do + let(:params) {{ :childlogdir => '/opt/supervisord/logdir' }} + it { should contain_concat__fragment('supervisord_main') \ + .with_content(/childlogdir=\/opt\/supervisord\/logdir$/) } + end + context 'invalid' do + let(:params) {{ :childlogdir => 'not_a_path' }} + it { expect { raise_error(Puppet::Error, /is not an absolute path/) }} end end end \ No newline at end of file diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/defines/eventlistener_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/defines/eventlistener_spec.rb index 6e04f44f97b..1083b8a3230 100644 --- a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/defines/eventlistener_spec.rb +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/defines/eventlistener_spec.rb @@ -2,14 +2,85 @@ require 'spec_helper' describe 'supervisord::eventlistener', :type => :define do let(:title) {'foo'} - let(:default_params) {{ :command => 'bar', - :stdout_logfile => '/var/log/supervisor/eventlistener_foo.log', - :stderr_logfile => '/var/log/supervisor/eventlistener_foo.error', - }} - let(:params) { default_params } let(:facts) {{ :concat_basedir => '/var/lib/puppet/concat' }} + let(:default_params) do + { + :command => 'bar', + :process_name => '%(process_num)s', + :events => ['PROCESS_STATE', 'PROCESS_STATE_STARTING'], + :buffer_size => 10, + :numprocs => '1', + :numprocs_start => '0', + :priority => '999', + :autostart => true, + :autorestart => 'unexpected', + :startsecs => '1', + :startretries => '3', + :exitcodes => '0,2', + :stopsignal => 'TERM', + :stopwaitsecs => '10', + :stopasgroup => true, + :killasgroup => true, + :user => 'baz', + :redirect_stderr => true, + :stdout_logfile => 'eventlistener_foo.log', + :stdout_logfile_maxbytes => '50MB', + :stdout_logfile_backups => '10', + :stdout_events_enabled => true, + :stderr_logfile => 'eventlistener_foo.error', + :stderr_logfile_maxbytes => '50MB', + :stderr_logfile_backups => '10', + :stderr_events_enabled => true, + :environment => { 'env1' => 'value1', 'env2' => 'value2' }, + :directory => '/opt/supervisord/chroot', + :umask => '022', + :serverurl => 'AUTO' + } + end - it { should contain_supervisord__eventlistener('foo') } - it { should contain_file('/etc/supervisor.d/eventlistener_foo.conf').with_content(/command=bar/) } + context 'default' do + let(:params) { default_params } + it { should contain_supervisord__eventlistener('foo') } + it { should contain_file('/etc/supervisor.d/eventlistener_foo.conf').with_content(/\[eventlistener:foo\]/) } + it { should contain_file('/etc/supervisor.d/eventlistener_foo.conf').with_content(/command=bar/) } + it { should contain_file('/etc/supervisor.d/eventlistener_foo.conf').with_content(/process_name=\%\(process_num\)s/) } + it { should contain_file('/etc/supervisor.d/eventlistener_foo.conf').with_content(/events=PROCESS_STATE,PROCESS_STATE_STARTING/) } + it { should contain_file('/etc/supervisor.d/eventlistener_foo.conf').with_content(/buffer_size=10/) } + it { should contain_file('/etc/supervisor.d/eventlistener_foo.conf').with_content(/numprocs=1/) } + it { should contain_file('/etc/supervisor.d/eventlistener_foo.conf').with_content(/numprocs_start=0/) } + it { should contain_file('/etc/supervisor.d/eventlistener_foo.conf').with_content(/priority=999/) } + it { should contain_file('/etc/supervisor.d/eventlistener_foo.conf').with_content(/autostart=true/) } + it { should contain_file('/etc/supervisor.d/eventlistener_foo.conf').with_content(/startsecs=1/) } + it { should contain_file('/etc/supervisor.d/eventlistener_foo.conf').with_content(/startretries=3/) } + it { should contain_file('/etc/supervisor.d/eventlistener_foo.conf').with_content(/exitcodes=0,2/) } + it { should contain_file('/etc/supervisor.d/eventlistener_foo.conf').with_content(/stopsignal=TERM/) } + it { should contain_file('/etc/supervisor.d/eventlistener_foo.conf').with_content(/stopwaitsecs=10/) } + it { should contain_file('/etc/supervisor.d/eventlistener_foo.conf').with_content(/stopasgroup=true/) } + it { should contain_file('/etc/supervisor.d/eventlistener_foo.conf').with_content(/killasgroup=true/) } + it { should contain_file('/etc/supervisor.d/eventlistener_foo.conf').with_content(/user=baz/) } + it { should contain_file('/etc/supervisor.d/eventlistener_foo.conf').with_content(/redirect_stderr=true/) } + it { should contain_file('/etc/supervisor.d/eventlistener_foo.conf').with_content(/stdout_logfile=\/var\/log\/supervisor\/eventlistener_foo.log/) } + it { should contain_file('/etc/supervisor.d/eventlistener_foo.conf').with_content(/stdout_logfile_maxbytes=50MB/) } + it { should contain_file('/etc/supervisor.d/eventlistener_foo.conf').with_content(/stdout_logfile_backups=10/) } + it { should contain_file('/etc/supervisor.d/eventlistener_foo.conf').with_content(/stdout_events_enabled=true/) } + it { should contain_file('/etc/supervisor.d/eventlistener_foo.conf').with_content(/stderr_logfile=\/var\/log\/supervisor\/eventlistener_foo.error/) } + it { should contain_file('/etc/supervisor.d/eventlistener_foo.conf').with_content(/stderr_logfile_maxbytes=50MB/) } + it { should contain_file('/etc/supervisor.d/eventlistener_foo.conf').with_content(/stderr_logfile_backups=10/) } + it { should contain_file('/etc/supervisor.d/eventlistener_foo.conf').with_content(/stderr_events_enabled=true/) } + it { should contain_file('/etc/supervisor.d/eventlistener_foo.conf').with_content(/environment=env1='value1',env2='value2'/) } + it { should contain_file('/etc/supervisor.d/eventlistener_foo.conf').with_content(/directory=\/opt\/supervisord\/chroot/) } + it { should contain_file('/etc/supervisor.d/eventlistener_foo.conf').with_content(/umask=022/) } + it { should contain_file('/etc/supervisor.d/eventlistener_foo.conf').with_content(/serverurl=AUTO/) } + end + + context 'ensure_process_stopped' do + let(:params) { default_params.merge({ :ensure_process => 'stopped' }) } + it { should contain_supervisord__supervisorctl('stop_foo') } + end + + context 'ensure_process_removed' do + let(:params) { default_params.merge({ :ensure_process => 'removed' }) } + it { should contain_supervisord__supervisorctl('remove_foo') } + end end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/defines/fcgi_program_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/defines/fcgi_program_spec.rb index 7fd8ab07b86..e01311be70d 100644 --- a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/defines/fcgi_program_spec.rb +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/defines/fcgi_program_spec.rb @@ -2,21 +2,87 @@ require 'spec_helper' describe 'supervisord::fcgi_program', :type => :define do let(:title) {'foo'} - let(:default_params) {{ :command => 'bar', - :socket => 'tcp://localhost:1000', - :stdout_logfile => '/var/log/supervisor/fcgi-program_foo.log', - :stderr_logfile => '/var/log/supervisor/fcgi-program_foo.error', - :user => 'baz' - }} - let(:params) { default_params } let(:facts) {{ :concat_basedir => '/var/lib/puppet/concat' }} + let(:default_params) do + { + :command => 'bar', + :socket => 'tcp://localhost:1000', + :process_name => '%(process_num)s', + :numprocs => '1', + :numprocs_start => '0', + :priority => '999', + :autostart => true, + :autorestart => 'unexpected', + :startsecs => '1', + :startretries => '3', + :exitcodes => '0,2', + :stopsignal => 'TERM', + :stopwaitsecs => '10', + :stopasgroup => true, + :killasgroup => true, + :user => 'baz', + :redirect_stderr => true, + :stdout_logfile => 'fcgi-program_foo.log', + :stdout_logfile_maxbytes => '50MB', + :stdout_logfile_backups => '10', + :stdout_capture_maxbytes => '0', + :stdout_events_enabled => true, + :stderr_logfile => 'fcgi-program_foo.error', + :stderr_logfile_maxbytes => '50MB', + :stderr_logfile_backups => '10', + :stderr_capture_maxbytes => '0', + :stderr_events_enabled => true, + :environment => { 'env1' => 'value1', 'env2' => 'value2' }, + :directory => '/opt/supervisord/chroot', + :umask => '022', + :serverurl => 'AUTO' + } + end - it { should contain_supervisord__fcgi_program('foo') } - it { should contain_file('/etc/supervisor.d/fcgi-program_foo.conf').with_content(/\[fcgi-program:foo\]/) } - it { should contain_file('/etc/supervisor.d/fcgi-program_foo.conf').with_content(/socket=tcp:\/\/localhost:1000/) } - it { should contain_file('/etc/supervisor.d/fcgi-program_foo.conf').with_content(/command=bar/) } - it { should contain_file('/etc/supervisor.d/fcgi-program_foo.conf').with_content(/user=baz/) } - it { should contain_file('/etc/supervisor.d/fcgi-program_foo.conf').with_content(/stdout_logfile=\/var\/log\/supervisor\/fcgi-program_foo.log/) } - it { should contain_file('/etc/supervisor.d/fcgi-program_foo.conf').with_content(/stderr_logfile=\/var\/log\/supervisor\/fcgi-program_foo.error/) } + context 'default' do + let(:params) { default_params } + it { should contain_supervisord__fcgi_program('foo') } + it { should contain_file('/etc/supervisor.d/fcgi-program_foo.conf').with_content(/\[fcgi-program:foo\]/) } + it { should contain_file('/etc/supervisor.d/fcgi-program_foo.conf').with_content(/socket=tcp:\/\/localhost:1000/) } + it { should contain_file('/etc/supervisor.d/fcgi-program_foo.conf').with_content(/command=bar/) } + it { should contain_file('/etc/supervisor.d/fcgi-program_foo.conf').with_content(/process_name=\%\(process_num\)s/) } + it { should contain_file('/etc/supervisor.d/fcgi-program_foo.conf').with_content(/numprocs=1/) } + it { should contain_file('/etc/supervisor.d/fcgi-program_foo.conf').with_content(/numprocs_start=0/) } + it { should contain_file('/etc/supervisor.d/fcgi-program_foo.conf').with_content(/priority=999/) } + it { should contain_file('/etc/supervisor.d/fcgi-program_foo.conf').with_content(/autostart=true/) } + it { should contain_file('/etc/supervisor.d/fcgi-program_foo.conf').with_content(/startsecs=1/) } + it { should contain_file('/etc/supervisor.d/fcgi-program_foo.conf').with_content(/startretries=3/) } + it { should contain_file('/etc/supervisor.d/fcgi-program_foo.conf').with_content(/exitcodes=0,2/) } + it { should contain_file('/etc/supervisor.d/fcgi-program_foo.conf').with_content(/stopsignal=TERM/) } + it { should contain_file('/etc/supervisor.d/fcgi-program_foo.conf').with_content(/stopwaitsecs=10/) } + it { should contain_file('/etc/supervisor.d/fcgi-program_foo.conf').with_content(/stopasgroup=true/) } + it { should contain_file('/etc/supervisor.d/fcgi-program_foo.conf').with_content(/killasgroup=true/) } + it { should contain_file('/etc/supervisor.d/fcgi-program_foo.conf').with_content(/user=baz/) } + it { should contain_file('/etc/supervisor.d/fcgi-program_foo.conf').with_content(/redirect_stderr=true/) } + it { should contain_file('/etc/supervisor.d/fcgi-program_foo.conf').with_content(/stdout_logfile=\/var\/log\/supervisor\/fcgi-program_foo.log/) } + it { should contain_file('/etc/supervisor.d/fcgi-program_foo.conf').with_content(/stdout_logfile_maxbytes=50MB/) } + it { should contain_file('/etc/supervisor.d/fcgi-program_foo.conf').with_content(/stdout_logfile_backups=10/) } + it { should contain_file('/etc/supervisor.d/fcgi-program_foo.conf').with_content(/stdout_capture_maxbytes=0/) } + it { should contain_file('/etc/supervisor.d/fcgi-program_foo.conf').with_content(/stdout_events_enabled=true/) } + it { should contain_file('/etc/supervisor.d/fcgi-program_foo.conf').with_content(/stderr_logfile=\/var\/log\/supervisor\/fcgi-program_foo.error/) } + it { should contain_file('/etc/supervisor.d/fcgi-program_foo.conf').with_content(/stderr_logfile_maxbytes=50MB/) } + it { should contain_file('/etc/supervisor.d/fcgi-program_foo.conf').with_content(/stderr_logfile_backups=10/) } + it { should contain_file('/etc/supervisor.d/fcgi-program_foo.conf').with_content(/stderr_capture_maxbytes=0/) } + it { should contain_file('/etc/supervisor.d/fcgi-program_foo.conf').with_content(/stderr_events_enabled=true/) } + it { should contain_file('/etc/supervisor.d/fcgi-program_foo.conf').with_content(/environment=env1='value1',env2='value2'/) } + it { should contain_file('/etc/supervisor.d/fcgi-program_foo.conf').with_content(/directory=\/opt\/supervisord\/chroot/) } + it { should contain_file('/etc/supervisor.d/fcgi-program_foo.conf').with_content(/umask=022/) } + it { should contain_file('/etc/supervisor.d/fcgi-program_foo.conf').with_content(/serverurl=AUTO/) } + end + + context 'ensure_process_stopped' do + let(:params) { default_params.merge({ :ensure_process => 'stopped' }) } + it { should contain_supervisord__supervisorctl('stop_foo') } + end + + context 'ensure_process_removed' do + let(:params) { default_params.merge({ :ensure_process => 'removed' }) } + it { should contain_supervisord__supervisorctl('remove_foo') } + end end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/defines/program_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/defines/program_spec.rb index 077828bdfcf..e32c24ab2d5 100644 --- a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/defines/program_spec.rb +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/defines/program_spec.rb @@ -2,19 +2,85 @@ require 'spec_helper' describe 'supervisord::program', :type => :define do let(:title) {'foo'} - let(:default_params) {{ :command => 'bar', - :stdout_logfile => '/var/log/supervisor/program_foo.log', - :stderr_logfile => '/var/log/supervisor/program_foo.error', - :user => 'baz' - }} - let(:params) { default_params } let(:facts) {{ :concat_basedir => '/var/lib/puppet/concat' }} + let(:default_params) do + { + :command => 'bar', + :process_name => '%(process_num)s', + :numprocs => '1', + :numprocs_start => '0', + :priority => '999', + :autostart => true, + :autorestart => 'unexpected', + :startsecs => '1', + :startretries => '3', + :exitcodes => '0,2', + :stopsignal => 'TERM', + :stopwaitsecs => '10', + :stopasgroup => true, + :killasgroup => true, + :user => 'baz', + :redirect_stderr => true, + :stdout_logfile => 'program_foo.log', + :stdout_logfile_maxbytes => '50MB', + :stdout_logfile_backups => '10', + :stdout_capture_maxbytes => '0', + :stdout_events_enabled => true, + :stderr_logfile => 'program_foo.error', + :stderr_logfile_maxbytes => '50MB', + :stderr_logfile_backups => '10', + :stderr_capture_maxbytes => '0', + :stderr_events_enabled => true, + :environment => { 'env1' => 'value1', 'env2' => 'value2' }, + :directory => '/opt/supervisord/chroot', + :umask => '022', + :serverurl => 'AUTO' + } + end - it { should contain_supervisord__program('foo') } - it { should contain_file('/etc/supervisor.d/program_foo.conf').with_content(/\[program:foo\]/) } - it { should contain_file('/etc/supervisor.d/program_foo.conf').with_content(/command=bar/) } - it { should contain_file('/etc/supervisor.d/program_foo.conf').with_content(/user=baz/) } - it { should contain_file('/etc/supervisor.d/program_foo.conf').with_content(/stdout_logfile=\/var\/log\/supervisor\/program_foo.log/) } - it { should contain_file('/etc/supervisor.d/program_foo.conf').with_content(/stderr_logfile=\/var\/log\/supervisor\/program_foo.error/) } + context 'default' do + let(:params) { default_params } + it { should contain_supervisord__program('foo') } + it { should contain_file('/etc/supervisor.d/program_foo.conf').with_content(/\[program:foo\]/) } + it { should contain_file('/etc/supervisor.d/program_foo.conf').with_content(/command=bar/) } + it { should contain_file('/etc/supervisor.d/program_foo.conf').with_content(/process_name=\%\(process_num\)s/) } + it { should contain_file('/etc/supervisor.d/program_foo.conf').with_content(/numprocs=1/) } + it { should contain_file('/etc/supervisor.d/program_foo.conf').with_content(/numprocs_start=0/) } + it { should contain_file('/etc/supervisor.d/program_foo.conf').with_content(/priority=999/) } + it { should contain_file('/etc/supervisor.d/program_foo.conf').with_content(/autostart=true/) } + it { should contain_file('/etc/supervisor.d/program_foo.conf').with_content(/startsecs=1/) } + it { should contain_file('/etc/supervisor.d/program_foo.conf').with_content(/startretries=3/) } + it { should contain_file('/etc/supervisor.d/program_foo.conf').with_content(/exitcodes=0,2/) } + it { should contain_file('/etc/supervisor.d/program_foo.conf').with_content(/stopsignal=TERM/) } + it { should contain_file('/etc/supervisor.d/program_foo.conf').with_content(/stopwaitsecs=10/) } + it { should contain_file('/etc/supervisor.d/program_foo.conf').with_content(/stopasgroup=true/) } + it { should contain_file('/etc/supervisor.d/program_foo.conf').with_content(/killasgroup=true/) } + it { should contain_file('/etc/supervisor.d/program_foo.conf').with_content(/user=baz/) } + it { should contain_file('/etc/supervisor.d/program_foo.conf').with_content(/redirect_stderr=true/) } + it { should contain_file('/etc/supervisor.d/program_foo.conf').with_content(/stdout_logfile=\/var\/log\/supervisor\/program_foo.log/) } + it { should contain_file('/etc/supervisor.d/program_foo.conf').with_content(/stdout_logfile_maxbytes=50MB/) } + it { should contain_file('/etc/supervisor.d/program_foo.conf').with_content(/stdout_logfile_backups=10/) } + it { should contain_file('/etc/supervisor.d/program_foo.conf').with_content(/stdout_capture_maxbytes=0/) } + it { should contain_file('/etc/supervisor.d/program_foo.conf').with_content(/stdout_events_enabled=true/) } + it { should contain_file('/etc/supervisor.d/program_foo.conf').with_content(/stderr_logfile=\/var\/log\/supervisor\/program_foo.error/) } + it { should contain_file('/etc/supervisor.d/program_foo.conf').with_content(/stderr_logfile_maxbytes=50MB/) } + it { should contain_file('/etc/supervisor.d/program_foo.conf').with_content(/stderr_logfile_backups=10/) } + it { should contain_file('/etc/supervisor.d/program_foo.conf').with_content(/stderr_capture_maxbytes=0/) } + it { should contain_file('/etc/supervisor.d/program_foo.conf').with_content(/stderr_events_enabled=true/) } + it { should contain_file('/etc/supervisor.d/program_foo.conf').with_content(/environment=env1='value1',env2='value2'/) } + it { should contain_file('/etc/supervisor.d/program_foo.conf').with_content(/directory=\/opt\/supervisord\/chroot/) } + it { should contain_file('/etc/supervisor.d/program_foo.conf').with_content(/umask=022/) } + it { should contain_file('/etc/supervisor.d/program_foo.conf').with_content(/serverurl=AUTO/) } + end + + context 'ensure_process_stopped' do + let(:params) { default_params.merge({ :ensure_process => 'stopped' }) } + it { should contain_supervisord__supervisorctl('stop_foo') } + end + + context 'ensure_process_removed' do + let(:params) { default_params.merge({ :ensure_process => 'removed' }) } + it { should contain_supervisord__supervisorctl('remove_foo') } + end end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/defines/supervisorctl.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/defines/supervisorctl.rb new file mode 100644 index 00000000000..33cfd75efe9 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/defines/supervisorctl.rb @@ -0,0 +1,13 @@ +require 'spec_helper' + +describe 'supervisord::supervisorctl', :type => :define do + let(:title) {'command_foo'} + let(:default_params) {{ + :command => 'command', + :process => 'foo' + }} + let(:params) { default_params } + let(:facts) {{ :concat_basedir => '/var/lib/puppet/concat' }} + + it { should contain_supervisord__supervisorctl('command_foo') } +end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/spec_helper.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/spec_helper.rb index 644f7c33ac0..745ad4a5493 100644 --- a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/spec_helper.rb +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/spec_helper.rb @@ -7,3 +7,4 @@ RSpec.configure do |c| c.manifest_dir = File.join(fixture_path, 'manifests') end +at_exit { RSpec::Puppet::Coverage.report! } diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/spec_helper_acceptance.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/spec_helper_acceptance.rb new file mode 100644 index 00000000000..dcae2850d27 --- /dev/null +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/spec_helper_acceptance.rb @@ -0,0 +1,24 @@ +require 'beaker-rspec' + +hosts.each do |host| + # Install Puppet + install_puppet +end + +RSpec.configure do |c| + # Project root + proj_root = File.expand_path(File.join(File.dirname(__FILE__), '..')) + + # Readable test descriptions + c.formatter = :documentation + + # Configure all nodes in nodeset + c.before :suite do + # Install module + puppet_module_install(:source => proj_root, :module_name => 'supervisord') + hosts.each do |host| + on host, puppet('module','install','puppetlabs-stdlib'), { :acceptable_exit_codes => [0,1] } + on host, puppet('module','install','puppetlabs-concat'), { :acceptable_exit_codes => [0,1] } + end + end +end \ No newline at end of file diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/spec_helper_system.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/spec_helper_system.rb deleted file mode 100644 index a790d7d526c..00000000000 --- a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/spec_helper_system.rb +++ /dev/null @@ -1,25 +0,0 @@ -require 'rspec-system/spec_helper' -require 'rspec-system-puppet/helpers' - -include RSpecSystemPuppet::Helpers - -RSpec.configure do |c| - # Project root - proj_root = File.expand_path(File.join(File.dirname(__FILE__), '..')) - - # Enable colour - c.tty = true - - # This is where we 'setup' the nodes before running our tests - c.before :suite do - # Install puppet - puppet_install - puppet_master_install - - # Replace mymodule with your module name - puppet_module_install(:source => proj_root, :module_name => 'supervisord') - shell('puppet module install puppetlabs/stdlib') - shell('puppet module install puppetlabs/concat') - - end -end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/system/basic_spec.rb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/system/basic_spec.rb deleted file mode 100644 index 62cf7dd8c2e..00000000000 --- a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/spec/system/basic_spec.rb +++ /dev/null @@ -1,120 +0,0 @@ -require 'spec_helper_system' - -describe 'basic install' do - - it 'class should work with no errors' do - pp = <<-EOS - class { 'supervisord': install_pip => true, install_init => true} - EOS - - puppet_apply(pp) do |r| - r.exit_code.should_not == 1 - r.refresh - r.exit_code.should be_zero - end - - shell("pgrep supervisord") do |r| - r.exit_code.should be_zero - end - - end -end - -describe 'add a program config' do - - it 'supervisord::program should install a program config' do - - pp = <<-EOS - include supervisord - supervisord::program { 'test': - command => 'echo', - priority => '100', - environment => { - 'HOME' => '/root', - 'PATH' => '/bin', - } - } - EOS - - puppet_apply(pp) do |r| - r.exit_code.should_not == 1 - r.refresh - r.exit_code.should be_zero - end - - shell("grep command=echo /etc/supervisor.d/program_test.conf") do |r| - r.exit_code.should be_zero - end - shell("grep priority=100 /etc/supervisor.d/program_test.conf") do |r| - r.exit_code.should be_zero - end - shell('grep "environment=" /etc/supervisor.d/program_test.conf') do |r| - r.exit_code.should be_zero - end - end -end - -describe 'add a fcgi-program config' do - - it 'supervisord::fcgi_program should install a program config' do - - pp = <<-EOS - include supervisord - supervisord::fcgi_program { 'test': - socket => 'tcp://localhost:1000', - command => 'echo', - priority => '100', - environment => { - 'HOME' => '/root', - 'PATH' => '/bin', - } - } - EOS - - puppet_apply(pp) do |r| - r.exit_code.should_not == 1 - r.refresh - r.exit_code.should be_zero - end - - shell("grep socket=tcp://localhost:1000 /etc/supervisor.d/fcgi-program_test.conf") do |r| - r.exit_code.should be_zero - end - shell("grep command=echo /etc/supervisor.d/fcgi-program_test.conf") do |r| - r.exit_code.should be_zero - end - shell("grep priority=100 /etc/supervisor.d/fcgi-program_test.conf") do |r| - r.exit_code.should be_zero - end - shell('grep "environment=" /etc/supervisor.d/fcgi-program_test.conf') do |r| - r.exit_code.should be_zero - end - end -end - -describe 'add a group config' do - - it 'supervisord::group should install a program config' do - - pp = <<-EOS - include supervisord - supervisord::group { 'test': - programs => ['program1', 'program2'], - priority => '100', - } - EOS - - puppet_apply(pp) do |r| - r.exit_code.should_not == 1 - r.refresh - r.exit_code.should be_zero - end - - shell('grep "programs=program1,program2" /etc/supervisor.d/group_test.conf') do |r| - r.exit_code.should be_zero - end - shell("grep priority=100 /etc/supervisor.d/fcgi-program_test.conf") do |r| - r.exit_code.should be_zero - end - end -end diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/templates/conf/eventlistener.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/templates/conf/eventlistener.erb index 4ee2b893419..9875c8ef5b2 100644 --- a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/templates/conf/eventlistener.erb +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/templates/conf/eventlistener.erb @@ -39,8 +39,8 @@ exitcodes=<%= @exitcodes %> <% if @stopsignal -%> stopsignal=<%= @stopsignal %> <% end -%> -<% if @stopwaitsec -%> -stopwaitsec=<%= @stopwaitsec %> +<% if @stopwaitsecs -%> +stopwaitsecs=<%= @stopwaitsecs %> <% end -%> <% if @stopasgroup -%> stopasgroup=<%= @stopasgroup %> @@ -54,7 +54,7 @@ user=<%= @user %> <% if @redirect_stderr -%> redirect_stderr=<%= @redirect_stderr %> <% end -%> -stdout_logfile=<%= @stdout_logfile %> +stdout_logfile=<%= scope.lookupvar('supervisord::log_path') %>/<%= @stdout_logfile %> <% if @stdout_logfile_maxbytes -%> stdout_logfile_maxbytes=<%= @stdout_logfile_maxbytes %> <% end -%> @@ -64,7 +64,7 @@ stdout_logfile_backups=<%= @stdout_logfile_backups %> <% if @stdout_events_enabled -%> stdout_events_enabled=<%= @stdout_events_enabled %> <% end -%> -stderr_logfile=<%= @stderr_logfile %> +stderr_logfile=<%= scope.lookupvar('supervisord::log_path') %>/<%= @stderr_logfile %> <% if @stderr_logfile_maxbytes -%> stderr_logfile_maxbytes=<%= @stderr_logfile_maxbytes %> <% end -%> diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/templates/conf/fcgi_program.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/templates/conf/fcgi_program.erb index a1478bce536..98a7fb1cb32 100644 --- a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/templates/conf/fcgi_program.erb +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/templates/conf/fcgi_program.erb @@ -37,8 +37,8 @@ exitcodes=<%= @exitcodes %> <% if @stopsignal -%> stopsignal=<%= @stopsignal %> <% end -%> -<% if @stopwaitsec -%> -stopwaitsec=<%= @stopwaitsec %> +<% if @stopwaitsecs -%> +stopwaitsecs=<%= @stopwaitsecs %> <% end -%> <% if @stopasgroup -%> stopasgroup=<%= @stopasgroup %> @@ -53,7 +53,7 @@ user=<%= @user %> redirect_stderr=<%= @redirect_stderr %> <% end -%> <% if @stdout_logfile -%> -stdout_logfile=<%= @stdout_logfile %> +stdout_logfile=<%= scope.lookupvar('supervisord::log_path') %>/<%= @stdout_logfile %> <% end -%> <% if @stdout_logfile_maxbytes -%> stdout_logfile_maxbytes=<%= @stdout_logfile_maxbytes %> @@ -68,7 +68,7 @@ stdout_capture_maxbytes=<%= @stdout_capture_maxbytes %> stdout_events_enabled=<%= @stdout_events_enabled %> <% end -%> <% if @stderr_logfile -%> -stderr_logfile=<%= @stderr_logfile %> +stderr_logfile=<%= scope.lookupvar('supervisord::log_path') %>/<%= @stderr_logfile %> <% end -%> <% if @stderr_logfile_maxbytes -%> stderr_logfile_maxbytes=<%= @stderr_logfile_maxbytes %> diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/templates/conf/program.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/templates/conf/program.erb index ca96d34d6ad..78002c87ca6 100644 --- a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/templates/conf/program.erb +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/templates/conf/program.erb @@ -30,8 +30,8 @@ exitcodes=<%= @exitcodes %> <% if @stopsignal -%> stopsignal=<%= @stopsignal %> <% end -%> -<% if @stopwaitsec -%> -stopwaitsec=<%= @stopwaitsec %> +<% if @stopwaitsecs -%> +stopwaitsecs=<%= @stopwaitsecs %> <% end -%> <% if @stopasgroup -%> stopasgroup=<%= @stopasgroup %> @@ -46,7 +46,7 @@ user=<%= @user %> redirect_stderr=<%= @redirect_stderr %> <% end -%> <% if @stdout_logfile -%> -stdout_logfile=<%= @stdout_logfile %> +stdout_logfile=<%= scope.lookupvar('supervisord::log_path') %>/<%= @stdout_logfile %> <% end -%> <% if @stdout_logfile_maxbytes -%> stdout_logfile_maxbytes=<%= @stdout_logfile_maxbytes %> @@ -61,7 +61,7 @@ stdout_capture_maxbytes=<%= @stdout_capture_maxbytes %> stdout_events_enabled=<%= @stdout_events_enabled %> <% end -%> <% if @stderr_logfile -%> -stderr_logfile=<%= @stderr_logfile %> +stderr_logfile=<%= scope.lookupvar('supervisord::log_path') %>/<%= @stderr_logfile %> <% end -%> <% if @stderr_logfile_maxbytes -%> stderr_logfile_maxbytes=<%= @stderr_logfile_maxbytes %> diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/templates/init/debian_extra.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/templates/init/Debian/defaults.erb similarity index 100% rename from dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/templates/init/debian_extra.erb rename to dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/templates/init/Debian/defaults.erb diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/templates/init/debian_init.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/templates/init/Debian/init.erb similarity index 96% rename from dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/templates/init/debian_init.erb rename to dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/templates/init/Debian/init.erb index b94f9337f59..bff9857257a 100644 --- a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/templates/init/debian_init.erb +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/templates/init/Debian/init.erb @@ -19,15 +19,15 @@ DESC=supervisor test -x $DAEMON || exit 0 LOGDIR=<%= @log_path %> -PIDFILE=<%= @pid_file %> +PIDFILE=<%= @run_path %>/<%= @pid_file %> DODTIME=5 # Time to wait for the server to die, in seconds # If this value is set too low you might not # let some servers to die gracefully and # 'restart' will not work # Include supervisor defaults if available -if [ -f /etc/default/supervisor ] ; then - . /etc/default/supervisor +if [ -f <%= @init_defaults %> ] ; then + . <%= @init_defaults %> fi set -e diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/templates/init/redhat_extra.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/templates/init/RedHat/defaults.erb similarity index 81% rename from dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/templates/init/redhat_extra.erb rename to dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/templates/init/RedHat/defaults.erb index b892c2d6203..0d7862d0233 100644 --- a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/templates/init/redhat_extra.erb +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/templates/init/RedHat/defaults.erb @@ -5,4 +5,4 @@ set -a # should probably put both of these options as runtime arguments OPTIONS="-c <%= @config_file %>" -PIDFILE=<%= @pid_file %> +PIDFILE=<%= @run_path %><%= @pid_file %> diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/templates/init/redhat_init.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/templates/init/RedHat/init.erb similarity index 94% rename from dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/templates/init/redhat_init.erb rename to dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/templates/init/RedHat/init.erb index 1dc2da2aff1..dabb2784510 100644 --- a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/templates/init/redhat_init.erb +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/templates/init/RedHat/init.erb @@ -13,18 +13,19 @@ # xmlrpc interface as well as a few other nifty features. # processname: supervisord # config: <%= @config_file %> -# pidfile: <%= @pid_file %> +# pidfile: <%= @run_path %>/<%= @pid_file %> # # source function library . /etc/rc.d/init.d/functions # source system settings -[ -e <%= @init_extras %> ] && . <%= @init_extras %> +[ -e <%= @init_defaults %> ] && . <%= @init_defaults %> RETVAL=0 DAEMON=/usr/bin/supervisord DESC=supervisord +PIDFILE=<%= @run_path %>/<%= @pid_file %> running_pid() { diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/templates/supervisord_main.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/templates/supervisord_main.erb index 1baf5607a2f..8ab8fee51df 100644 --- a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/templates/supervisord_main.erb +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/templates/supervisord_main.erb @@ -1,9 +1,9 @@ [supervisord] -logfile=<%= @log_file %> -pidfile=<%= @pid_file %> +logfile=<%= @log_path %>/<%= @log_file %> +pidfile=<%= @run_path %>/<%= @pid_file %> nodaemon=<%= @nodaemon %> minfds=<%= @minfds %> -minfds=<%= @minprocs %> +minprocs=<%= @minprocs %> umask=<%= @umask %> <% if @strip_ansi -%> strip_ansi=<%= @strip_ansi %> @@ -12,7 +12,7 @@ strip_ansi=<%= @strip_ansi %> user=<%= @user %> <% end -%> <% if @identifier -%> -indentifier=<%= @identifier %> +identifier=<%= @identifier %> <% end -%> <% if @directory -%> directory=<%= @directory %> @@ -31,4 +31,4 @@ environment=<%= @env_string %> supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface [include] -files=<%= @config_include %>/*.conf +files=<%= @config_include_string %> diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/templates/supervisord_unix.erb b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/templates/supervisord_unix.erb index 414e75198ba..39e85199916 100644 --- a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/templates/supervisord_unix.erb +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/templates/supervisord_unix.erb @@ -1,5 +1,5 @@ [unix_http_server] -file=<%= @unix_socket_file %> +file=<%= @run_path %>/<%= @unix_socket_file %> chmod=<%= @unix_socket_mode %> chown=<%= @unix_socket_owner %>:<%= @unix_socket_group %> <% if @unix_auth -%> @@ -8,7 +8,7 @@ password=<%= @unix_socket_password %> <% end -%> [supervisorctl] -serverurl=unix://<%= @unix_socket_file %> +serverurl=unix://<%= @run_path %>/<%= @unix_socket_file %> <% if @unix_auth -%> username=<%= @unix_username %> password=<%= @unix_password %> diff --git a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/tests/program.pp b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/tests/program.pp index 6c789c96dc1..0d45ebe1b3d 100644 --- a/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/tests/program.pp +++ b/dev/vagrant/dolibarrdev/puphpet/puppet/modules/supervisord/tests/program.pp @@ -1,9 +1,35 @@ supervisord::program { 'myprogram': - command => 'command --args', - priority => '100', - environment => { + command => 'command --args', + process_name => '%(process_num)s', + numprocs => '1', + numprocs_start => '0', + priority => '999', + autostart => true, + autorestart => 'unexpected', + startsecs => '1', + startretries => '3', + exitcodes => '0,2', + stopsignal => 'TERM', + stopwaitsecs => '10', + stopasgroup => false, + killasgroup => false, + redirect_stderr => false, + stdout_logfile => 'program_foo.log', + stdout_logfile_maxbytes => '50MB', + stdout_logfile_backups => '10', + stdout_capture_maxbytes => '0', + stdout_events_enabled => false, + stderr_logfile => 'program_foo.error', + stderr_logfile_maxbytes => '50MB', + stderr_logfile_backups => '10', + stderr_capture_maxbytes => '0', + stderr_events_enabled => false, + environment => { 'HOME' => '/home/myuser', 'PATH' => '/bin:/sbin:/usr/bin:/usr/sbin', 'SECRET' => 'mysecret' - } + }, + directory => undef, + umask => '022', + serverurl => 'AUTO' } \ No newline at end of file diff --git a/dev/vagrant/dolibarrdev/puphpet/shell/execute-files.sh b/dev/vagrant/dolibarrdev/puphpet/shell/execute-files.sh index 06713c2ee99..c6c08a7b04c 100644 --- a/dev/vagrant/dolibarrdev/puphpet/shell/execute-files.sh +++ b/dev/vagrant/dolibarrdev/puphpet/shell/execute-files.sh @@ -4,17 +4,26 @@ export DEBIAN_FRONTEND=noninteractive VAGRANT_CORE_FOLDER=$(cat '/.puphpet-stuff/vagrant-core-folder.txt') -shopt -s nullglob -files=("${VAGRANT_CORE_FOLDER}"/files/exec-once/*) +EXEC_ONCE_DIR="$1" +EXEC_ALWAYS_DIR="$2" -if [[ ! -f '/.puphpet-stuff/exec-once-ran' && (${#files[@]} -gt 0) ]]; then - echo 'Running files in files/exec-once' - find "${VAGRANT_CORE_FOLDER}/files/exec-once" -maxdepth 1 -not -path '*/\.*' -type f \( ! -iname "empty" \) -exec chmod +x '{}' \; -exec {} \; - echo 'Finished running files in files/exec-once' - echo 'To run again, delete file /.puphpet-stuff/exec-once-ran' - touch /.puphpet-stuff/exec-once-ran +shopt -s nullglob +files=("${VAGRANT_CORE_FOLDER}"/files/"${EXEC_ONCE_DIR}"/*) + +if [[ (${#files[@]} -gt 0) ]]; then + echo "Running files in files/${EXEC_ONCE_DIR}" + + if [ ! -d "/.puphpet-stuff/${EXEC_ONCE_DIR}-ran" ]; then + mkdir "/.puphpet-stuff/${EXEC_ONCE_DIR}-ran" + echo "Created directory /.puphpet-stuff/${EXEC_ONCE_DIR}-ran" + fi + + find "${VAGRANT_CORE_FOLDER}/files/${EXEC_ONCE_DIR}" -maxdepth 1 -not -path '*/\.*' -type f \( ! -iname "empty" \) -exec cp -n '{}' "/.puphpet-stuff/${EXEC_ONCE_DIR}-ran" \; + find "/.puphpet-stuff/${EXEC_ONCE_DIR}-ran" -maxdepth 1 -type f -exec chmod +x '{}' \; -exec {} \; -exec sh -c '>{}' \; + echo "Finished running files in files/${EXEC_ONCE_DIR}" + echo "To run again, delete file(s) you want rerun in /.puphpet-stuff/${EXEC_ONCE_DIR}-ran or the whole folder to rerun all" fi -echo 'Running files in files/exec-always' -find "${VAGRANT_CORE_FOLDER}/files/exec-always" -maxdepth 1 -not -path '*/\.*' -type f \( ! -iname "empty" \) -exec chmod +x '{}' \; -exec {} \; -echo 'Finished running files in files/exec-always' +echo "Running files in files/${EXEC_ALWAYS_DIR}" +find "${VAGRANT_CORE_FOLDER}/files/${EXEC_ALWAYS_DIR}" -maxdepth 1 -not -path '*/\.*' -type f \( ! -iname "empty" \) -exec chmod +x '{}' \; -exec {} \; +echo "Finished running files in files/${EXEC_ALWAYS_DIR}" diff --git a/dev/vagrant/dolibarrdev/puphpet/shell/ssh-keygen.sh b/dev/vagrant/dolibarrdev/puphpet/shell/ssh-keygen.sh index 6bb7614f9c6..ef00495b2b6 100644 --- a/dev/vagrant/dolibarrdev/puphpet/shell/ssh-keygen.sh +++ b/dev/vagrant/dolibarrdev/puphpet/shell/ssh-keygen.sh @@ -5,37 +5,76 @@ VAGRANT_CORE_FOLDER=$(cat '/.puphpet-stuff/vagrant-core-folder.txt') OS=$(/bin/bash "${VAGRANT_CORE_FOLDER}/shell/os-detect.sh" ID) VAGRANT_SSH_USERNAME=$(echo "$1") -if [[ ! -f "${VAGRANT_CORE_FOLDER}/files/dot/ssh/id_rsa" ]]; then - ssh-keygen -f "${VAGRANT_CORE_FOLDER}/files/dot/ssh/id_rsa" -P "" +function create_key() +{ + BASE_KEY_NAME=$(echo "$1") - if [[ ! -f "${VAGRANT_CORE_FOLDER}/files/dot/ssh/id_rsa.ppk" ]]; then - if [ "${OS}" == 'debian' ] || [ "${OS}" == 'ubuntu' ]; then - apt-get install -y putty-tools >/dev/null - elif [ "${OS}" == 'centos' ]; then - yum -y install putty >/dev/null + if [[ ! -f "${VAGRANT_CORE_FOLDER}/files/dot/ssh/${BASE_KEY_NAME}" ]]; then + ssh-keygen -f "${VAGRANT_CORE_FOLDER}/files/dot/ssh/${BASE_KEY_NAME}" -P "" + + if [[ ! -f "${VAGRANT_CORE_FOLDER}/files/dot/ssh/${BASE_KEY_NAME}.ppk" ]]; then + if [ "${OS}" == 'debian' ] || [ "${OS}" == 'ubuntu' ]; then + apt-get install -y putty-tools >/dev/null + elif [ "${OS}" == 'centos' ]; then + yum -y install putty >/dev/null + fi + + puttygen "${VAGRANT_CORE_FOLDER}/files/dot/ssh/${BASE_KEY_NAME}" -O private -o "${VAGRANT_CORE_FOLDER}/files/dot/ssh/${BASE_KEY_NAME}.ppk" fi - puttygen "${VAGRANT_CORE_FOLDER}/files/dot/ssh/id_rsa" -O private -o "${VAGRANT_CORE_FOLDER}/files/dot/ssh/id_rsa.ppk" + echo "Your private key for SSH-based authentication has been saved to 'puphpet/files/dot/ssh/${BASE_KEY_NAME}'!" + else + echo "Pre-existing private key found at 'puphpet/files/dot/ssh/${BASE_KEY_NAME}'" fi +} - echo 'Your private key for SSH-based authentication have been saved to "puphpet/files/dot/ssh/"!' -else - echo 'Using pre-existing private key at "puphpet/files/dot/ssh/id_rsa"' +create_key 'root_id_rsa' +create_key 'id_rsa' + +PUBLIC_SSH_KEY=$(cat "${VAGRANT_CORE_FOLDER}/files/dot/ssh/id_rsa.pub") + +echo 'Adding generated key to /root/.ssh/id_rsa' +echo 'Adding generated key to /root/.ssh/id_rsa.pub' +echo 'Adding generated key to /root/.ssh/authorized_keys' + +mkdir -p /root/.ssh + +cp "${VAGRANT_CORE_FOLDER}/files/dot/ssh/id_rsa" '/root/.ssh/' +cp "${VAGRANT_CORE_FOLDER}/files/dot/ssh/id_rsa.pub" '/root/.ssh/' + +if [[ ! -f '/root/.ssh/authorized_keys' ]] || ! grep -q "${PUBLIC_SSH_KEY}" '/root/.ssh/authorized_keys'; then + cat "${VAGRANT_CORE_FOLDER}/files/dot/ssh/id_rsa.pub" >> '/root/.ssh/authorized_keys' fi -echo 'Adding generated key to /root/.ssh/authorized_keys' -mkdir -p /root/.ssh -cat "${VAGRANT_CORE_FOLDER}/files/dot/ssh/id_rsa.pub" > '/root/.ssh/authorized_keys' +chown -R root '/root/.ssh' +chgrp -R root '/root/.ssh' +chmod 700 '/root/.ssh' +chmod 644 '/root/.ssh/id_rsa.pub' +chmod 600 '/root/.ssh/id_rsa' chmod 600 '/root/.ssh/authorized_keys' if [ "${VAGRANT_SSH_USERNAME}" != 'root' ]; then VAGRANT_SSH_FOLDER="/home/${VAGRANT_SSH_USERNAME}/.ssh"; - echo "Adding generated key to ${VAGRANT_SSH_FOLDER}/authorized_keys" - cat "${VAGRANT_CORE_FOLDER}/files/dot/ssh/id_rsa.pub" > "${VAGRANT_SSH_FOLDER}/authorized_keys" - chown "${VAGRANT_SSH_USERNAME}" "${VAGRANT_SSH_FOLDER}/authorized_keys" - chgrp "${VAGRANT_SSH_USERNAME}" "${VAGRANT_SSH_FOLDER}/authorized_keys" - chmod 600 "${VAGRANT_SSH_FOLDER}/authorized_keys" -fi + mkdir -p "${VAGRANT_SSH_FOLDER}" -passwd -d vagrant >/dev/null + echo "Adding generated key to ${VAGRANT_SSH_FOLDER}/id_rsa" + echo "Adding generated key to ${VAGRANT_SSH_FOLDER}/id_rsa.pub" + echo "Adding generated key to ${VAGRANT_SSH_FOLDER}/authorized_keys" + + cp "${VAGRANT_CORE_FOLDER}/files/dot/ssh/id_rsa" "${VAGRANT_SSH_FOLDER}/id_rsa" + cp "${VAGRANT_CORE_FOLDER}/files/dot/ssh/id_rsa.pub" "${VAGRANT_SSH_FOLDER}/id_rsa.pub" + + if [[ ! -f "${VAGRANT_SSH_FOLDER}/authorized_keys" ]] || ! grep -q "${PUBLIC_SSH_KEY}" "${VAGRANT_SSH_FOLDER}/authorized_keys"; then + cat "${VAGRANT_CORE_FOLDER}/files/dot/ssh/id_rsa.pub" >> "${VAGRANT_SSH_FOLDER}/authorized_keys" + fi + + chown -R "${VAGRANT_SSH_USERNAME}" "${VAGRANT_SSH_FOLDER}" + chgrp -R "${VAGRANT_SSH_USERNAME}" "${VAGRANT_SSH_FOLDER}" + chmod 700 "${VAGRANT_SSH_FOLDER}" + chmod 644 "${VAGRANT_SSH_FOLDER}/id_rsa.pub" + chmod 600 "${VAGRANT_SSH_FOLDER}/id_rsa" + chmod 600 "${VAGRANT_SSH_FOLDER}/authorized_keys" + + passwd -d "${VAGRANT_SSH_USERNAME}" >/dev/null +fi From 43f6d3deafe8a185b1e696acbdd4777d5571dd11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sat, 12 Jul 2014 15:51:39 +0200 Subject: [PATCH 184/258] Moved dolibarr source to another folder of /var/www so that external libraries get separated from dolibarr core --- dev/vagrant/dolibarrdev/puphpet/config.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dev/vagrant/dolibarrdev/puphpet/config.yaml b/dev/vagrant/dolibarrdev/puphpet/config.yaml index 96c01695cec..c9c8440c87d 100644 --- a/dev/vagrant/dolibarrdev/puphpet/config.yaml +++ b/dev/vagrant/dolibarrdev/puphpet/config.yaml @@ -31,7 +31,7 @@ vagrantfile-local: synced_folder: jopH6005bn96: source: ../../../ - target: /var/www + target: /var/www/dolibarr sync_type: default rsync: auto: 'false' @@ -83,7 +83,7 @@ apache: vhosts: b2tOrs1TMtoF: servername: dev.dolibarr.org - docroot: /var/www/htdocs + docroot: /var/www/dolibarr/htdocs port: '80' setenv: - 'APP_ENV dev' @@ -168,7 +168,7 @@ mysql: host: localhost user: user password: user - sql_file: /var/www/dev/initdata/mysqldump_dolibarr_3.5.0.sql + sql_file: /var/www/dolibarr/dev/initdata/mysqldump_dolibarr_3.5.0.sql postgresql: install: '1' settings: From d289306fa4cea7a0fd8d09b33e9b422671c00dc6 Mon Sep 17 00:00:00 2001 From: Cedric Date: Sat, 12 Jul 2014 16:22:49 +0200 Subject: [PATCH 185/258] Security fix --- htdocs/product/stock/fiche.php | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/htdocs/product/stock/fiche.php b/htdocs/product/stock/fiche.php index 4a365e3e50b..8b7aa43b431 100644 --- a/htdocs/product/stock/fiche.php +++ b/htdocs/product/stock/fiche.php @@ -39,6 +39,7 @@ $action=GETPOST('action'); $sortfield = GETPOST("sortfield",'alpha'); $sortorder = GETPOST("sortorder",'alpha'); +$id = GETPOST("id",'int'); if (! $sortfield) $sortfield="p.ref"; if (! $sortorder) $sortorder="DESC"; @@ -109,7 +110,7 @@ if ($action == 'confirm_delete' && $_REQUEST["confirm"] == 'yes' && $user->right if ($action == 'update' && $_POST["cancel"] <> $langs->trans("Cancel")) { $object = new Entrepot($db); - if ($object->fetch($_POST["id"])) + if ($object->fetch($id)) { $object->libelle = $_POST["libelle"]; $object->description = $_POST["desc"]; @@ -120,23 +121,20 @@ if ($action == 'update' && $_POST["cancel"] <> $langs->trans("Cancel")) $object->town = $_POST["town"]; $object->country_id = $_POST["country_id"]; - if ( $object->update($_POST["id"], $user) > 0) + if ( $object->update($id, $user) > 0) { $action = ''; - $_GET["id"] = $_POST["id"]; //$mesg = '
Fiche mise a jour
'; } else { $action = 'edit'; - $_GET["id"] = $_POST["id"]; $mesg = '
'.$object->error.'
'; } } else { $action = 'edit'; - $_GET["id"] = $_POST["id"]; $mesg = '
'.$object->error.'
'; } } @@ -144,7 +142,6 @@ if ($action == 'update' && $_POST["cancel"] <> $langs->trans("Cancel")) if ($_POST["cancel"] == $langs->trans("Cancel")) { $action = ''; - $_GET["id"] = $_POST["id"]; } @@ -219,12 +216,13 @@ if ($action == 'create') } else { - if ($_GET["id"]) + $id=GETPOST("id",'int'); + if ($id) { dol_htmloutput_mesg($mesg); $object = new Entrepot($db); - $result = $object->fetch($_GET["id"]); + $result = $object->fetch($id); if ($result < 0) { dol_print_error($db); @@ -368,13 +366,13 @@ else print ''; print ""; - print_liste_field_titre($langs->trans("Product"),"", "p.ref","&id=".$_GET['id'],"","",$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Label"),"", "p.label","&id=".$_GET['id'],"","",$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Units"),"", "ps.reel","&id=".$_GET['id'],"",'align="right"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("AverageUnitPricePMPShort"),"", "ps.pmp","&id=".$_GET['id'],"",'align="right"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("EstimatedStockValueShort"),"", "","&id=".$_GET['id'],"",'align="right"',$sortfield,$sortorder); - if (empty($conf->global->PRODUIT_MULTIPRICES)) print_liste_field_titre($langs->trans("SellPriceMin"),"", "p.price","&id=".$_GET['id'],"",'align="right"',$sortfield,$sortorder); - if (empty($conf->global->PRODUIT_MULTIPRICES)) print_liste_field_titre($langs->trans("EstimatedStockValueSellShort"),"", "","&id=".$_GET['id'],"",'align="right"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Product"),"", "p.ref","&id=".$id,"","",$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Label"),"", "p.label","&id=".$id,"","",$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Units"),"", "ps.reel","&id=".$id,"",'align="right"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("AverageUnitPricePMPShort"),"", "ps.pmp","&id=".$id,"",'align="right"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("EstimatedStockValueShort"),"", "","&id=".$id,"",'align="right"',$sortfield,$sortorder); + if (empty($conf->global->PRODUIT_MULTIPRICES)) print_liste_field_titre($langs->trans("SellPriceMin"),"", "p.price","&id=".$id,"",'align="right"',$sortfield,$sortorder); + if (empty($conf->global->PRODUIT_MULTIPRICES)) print_liste_field_titre($langs->trans("EstimatedStockValueSellShort"),"", "","&id=".$id,"",'align="right"',$sortfield,$sortorder); if ($user->rights->stock->mouvement->creer) print ''; if ($user->rights->stock->creer) print ''; print ""; From ec661d0c6ca9af7fb3f3ef29e4d17379f0644890 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sat, 12 Jul 2014 23:18:57 +0200 Subject: [PATCH 186/258] Removed index.php and replaced them with blank index.html as it is more appropriate --- htdocs/accountancy/class/index.html | 0 htdocs/accountancy/index.html | 0 htdocs/accountancy/index.php | 1 - htdocs/adherents/canvas/default/index.php | 1 - htdocs/adherents/canvas/default/tpl/index.html | 0 htdocs/adherents/canvas/default/tpl/index.php | 1 - htdocs/adherents/canvas/index.html | 0 htdocs/adherents/canvas/index.php | 1 - htdocs/adherents/cartes/index.html | 0 htdocs/adherents/cartes/index.php | 1 - htdocs/adherents/class/index.html | 0 htdocs/asterisk/index.html | 0 htdocs/asterisk/index.php | 1 - htdocs/barcode/index.html | 0 htdocs/bookmarks/admin/index.html | 0 htdocs/bookmarks/class/index.html | 0 htdocs/bookmarks/index.html | 0 htdocs/bookmarks/index.php | 1 - htdocs/boutique/admin/index.html | 0 htdocs/boutique/client/class/index.html | 0 htdocs/boutique/commande/class/index.html | 0 htdocs/boutique/critiques/class/index.html | 0 htdocs/boutique/promotion/class/index.html | 0 htdocs/cashdesk/admin/index.html | 0 htdocs/cashdesk/class/index.html | 0 htdocs/cashdesk/class/index.php | 1 - htdocs/cashdesk/css/index.html | 0 htdocs/cashdesk/img/index.html | 0 htdocs/cashdesk/img/index.php | 1 - htdocs/cashdesk/include/index.html | 0 htdocs/cashdesk/include/index.php | 1 - htdocs/cashdesk/javascript/index.html | 0 htdocs/cashdesk/javascript/index.php | 1 - htdocs/cashdesk/tpl/index.html | 0 htdocs/cashdesk/tpl/index.php | 1 - htdocs/categories/admin/index.html | 0 htdocs/categories/class/index.html | 0 htdocs/comm/action/class/index.html | 0 htdocs/comm/admin/index.html | 0 htdocs/comm/mailing/class/index.html | 0 htdocs/comm/propal/class/index.html | 0 htdocs/comm/propal/tpl/index.html | 0 htdocs/comm/prospect/class/index.html | 0 htdocs/commande/class/index.html | 0 htdocs/commande/tpl/index.html | 0 htdocs/compta/bank/class/index.html | 0 htdocs/compta/deplacement/class/index.html | 0 htdocs/compta/dons/class/index.html | 0 htdocs/compta/facture/admin/index.html | 0 htdocs/compta/facture/class/index.html | 0 htdocs/compta/facture/index.html | 0 htdocs/compta/facture/index.php | 1 - htdocs/compta/facture/tpl/index.html | 0 htdocs/compta/journal/index.html | 0 htdocs/compta/localtax/class/index.html | 0 htdocs/compta/paiement/cheque/class/index.html | 0 htdocs/compta/paiement/class/index.html | 0 htdocs/compta/payment_sc/index.html | 0 htdocs/compta/prelevement/class/index.html | 0 htdocs/compta/salaries/class/index.html | 0 htdocs/compta/sociales/class/index.html | 0 htdocs/compta/tva/class/index.html | 0 htdocs/conf/index.html | 0 htdocs/contact/canvas/default/index.html | 0 htdocs/contact/canvas/default/index.php | 1 - htdocs/contact/canvas/default/tpl/index.html | 0 htdocs/contact/canvas/default/tpl/index.php | 1 - htdocs/contact/canvas/index.html | 0 htdocs/contact/canvas/index.php | 1 - htdocs/contact/class/index.html | 0 htdocs/contact/index.html | 0 htdocs/contact/index.php | 1 - htdocs/contrat/admin/index.html | 0 htdocs/contrat/class/index.html | 0 htdocs/contrat/tpl/index.html | 0 htdocs/core/ajax/index.html | 0 htdocs/core/ajax/index.php | 1 - htdocs/core/boxes/index.html | 0 htdocs/core/boxes/index.php | 1 - htdocs/core/class/index.html | 0 htdocs/core/class/index.php | 1 - htdocs/core/db/index.html | 0 htdocs/core/db/index.php | 1 - .../filemanagerdol/browser/default/images/icons/32/index.html | 0 .../core/filemanagerdol/browser/default/images/icons/index.html | 0 htdocs/core/filemanagerdol/browser/default/images/index.html | 0 htdocs/core/filemanagerdol/browser/default/index.html | 0 htdocs/core/filemanagerdol/browser/default/js/index.html | 0 htdocs/core/filemanagerdol/browser/index.html | 0 htdocs/core/filemanagerdol/connectors/index.html | 0 htdocs/core/filemanagerdol/connectors/php/index.html | 0 htdocs/core/filemanagerdol/index.html | 0 htdocs/core/filemanagerdol/index.php | 1 - htdocs/core/index.html | 0 htdocs/core/index.php | 1 - htdocs/core/js/index.html | 0 htdocs/core/js/index.php | 1 - htdocs/core/lib/index.html | 0 htdocs/core/lib/index.php | 1 - htdocs/core/login/index.html | 0 htdocs/core/login/index.php | 1 - htdocs/core/menus/index.html | 0 htdocs/core/menus/index.php | 1 - htdocs/core/menus/standard/index.html | 0 htdocs/core/menus/standard/index.php | 1 - htdocs/core/modules/action/index.html | 0 htdocs/core/modules/barcode/doc/index.html | 0 htdocs/core/modules/barcode/index.html | 0 htdocs/core/modules/cheque/index.html | 0 htdocs/core/modules/cheque/pdf/index.html | 0 htdocs/core/modules/commande/doc/index.html | 0 htdocs/core/modules/commande/index.html | 0 htdocs/core/modules/contract/doc/index.html | 0 htdocs/core/modules/contract/index.html | 0 htdocs/core/modules/dons/index.html | 0 htdocs/core/modules/expedition/doc/index.html | 0 htdocs/core/modules/expedition/index.html | 0 htdocs/core/modules/export/index.html | 0 htdocs/core/modules/facture/doc/index.html | 0 htdocs/core/modules/facture/index.html | 0 htdocs/core/modules/fichinter/doc/index.html | 0 htdocs/core/modules/fichinter/index.html | 0 htdocs/core/modules/import/index.html | 0 htdocs/core/modules/index.html | 0 htdocs/core/modules/index.php | 1 - htdocs/core/modules/livraison/index.html | 0 htdocs/core/modules/livraison/pdf/index.html | 0 htdocs/core/modules/mailings/index.html | 0 htdocs/core/modules/member/doc/index.html | 0 htdocs/core/modules/member/index.html | 0 htdocs/core/modules/printsheet/doc/index.html | 0 htdocs/core/modules/printsheet/index.html | 0 htdocs/core/modules/product/index.html | 0 htdocs/core/modules/project/index.html | 0 htdocs/core/modules/project/pdf/index.html | 0 htdocs/core/modules/project/task/index.html | 0 htdocs/core/modules/project/task/pdf/index.html | 0 htdocs/core/modules/propale/doc/index.html | 0 htdocs/core/modules/propale/index.html | 0 htdocs/core/modules/rapport/index.html | 0 htdocs/core/modules/security/generate/index.html | 0 htdocs/core/modules/security/index.html | 0 htdocs/core/modules/societe/doc/index.html | 0 htdocs/core/modules/societe/index.html | 0 htdocs/core/modules/supplier_invoice/index.html | 0 htdocs/core/modules/supplier_invoice/pdf/index.html | 0 htdocs/core/modules/supplier_order/index.html | 0 htdocs/core/modules/supplier_order/pdf/index.html | 0 htdocs/core/modules/syslog/index.html | 0 htdocs/core/tpl/ajax/index.html | 0 htdocs/core/tpl/index.html | 0 htdocs/core/tpl/index.php | 1 - htdocs/core/triggers/index.html | 0 htdocs/core/triggers/index.php | 1 - htdocs/cron/admin/index.html | 0 htdocs/cron/class/index.html | 0 htdocs/cron/index.html | 0 htdocs/ecm/ajax/index.html | 0 htdocs/ecm/class/index.html | 0 htdocs/ecm/tpl/index.html | 0 htdocs/expedition/class/index.html | 0 htdocs/expedition/tpl/index.html | 0 htdocs/exports/class/index.html | 0 htdocs/externalsite/admin/index.html | 0 htdocs/externalsite/index.html | 0 htdocs/externalsite/index.php | 1 - htdocs/fichinter/admin/index.html | 0 htdocs/fichinter/class/index.html | 0 htdocs/fichinter/index.html | 0 htdocs/fichinter/index.php | 1 - htdocs/fichinter/tpl/index.html | 0 htdocs/fourn/ajax/index.html | 0 htdocs/fourn/class/index.html | 0 htdocs/fourn/commande/tpl/index.html | 0 htdocs/fourn/facture/index.html | 0 htdocs/fourn/facture/index.php | 1 - htdocs/fourn/facture/tpl/index.html | 0 htdocs/fourn/paiement/index.html | 0 htdocs/fourn/paiement/index.php | 1 - htdocs/ftp/admin/index.html | 0 htdocs/holiday/admin/index.html | 0 htdocs/holiday/class/index.html | 0 htdocs/holiday/img/index.html | 0 htdocs/imports/class/index.html | 0 htdocs/includes/adodbtime/index.html | 0 htdocs/includes/adodbtime/index.php | 1 - htdocs/includes/index.html | 0 htdocs/includes/index.php | 1 - htdocs/install/doctemplates/index.html | 0 htdocs/install/doctemplates/invoices/index.html | 0 htdocs/install/doctemplates/orders/index.html | 0 htdocs/install/doctemplates/projects/index.html | 0 htdocs/install/doctemplates/proposals/index.html | 0 htdocs/install/doctemplates/shipment/index.html | 0 htdocs/install/doctemplates/tasks/index.html | 0 htdocs/install/doctemplates/thirdparties/index.html | 0 htdocs/install/lib/index.html | 0 htdocs/install/mssql/functions/index.html | 0 htdocs/install/mssql/index.html | 0 htdocs/install/mysql/data/index.html | 0 htdocs/install/mysql/functions/index.html | 0 htdocs/install/mysql/index.html | 0 htdocs/install/mysql/migration/index.html | 0 htdocs/install/mysql/tables/index.html | 0 htdocs/install/pgsql/functions/index.html | 0 htdocs/install/pgsql/index.html | 0 htdocs/livraison/class/index.html | 0 htdocs/livraison/index.html | 0 htdocs/livraison/index.php | 1 - htdocs/mailmanspip/class/index.html | 0 htdocs/mailmanspip/index.html | 0 htdocs/margin/admin/index.html | 0 htdocs/margin/lib/index.html | 0 htdocs/margin/tabs/index.html | 0 htdocs/opensurvey/class/index.html | 0 htdocs/opensurvey/css/index.html | 0 htdocs/opensurvey/img/index.html | 0 htdocs/opensurvey/public/index.html | 0 htdocs/paybox/admin/index.html | 0 htdocs/paybox/img/index.html | 0 htdocs/paybox/index.html | 0 htdocs/paybox/index.php | 1 - htdocs/paybox/lib/index.html | 0 htdocs/paypal/admin/index.html | 0 htdocs/paypal/img/index.html | 0 htdocs/paypal/index.html | 0 htdocs/paypal/index.php | 1 - htdocs/paypal/lib/index.html | 0 htdocs/printipp/admin/index.html | 0 htdocs/printipp/lib/index.html | 0 htdocs/product/admin/index.html | 0 htdocs/product/ajax/index.html | 0 htdocs/product/canvas/index.html | 0 htdocs/product/canvas/index.php | 1 - htdocs/product/canvas/product/index.html | 0 htdocs/product/canvas/product/index.php | 1 - htdocs/product/canvas/product/tpl/index.html | 0 htdocs/product/canvas/product/tpl/index.php | 1 - htdocs/product/canvas/service/index.html | 0 htdocs/product/canvas/service/index.php | 1 - htdocs/product/canvas/service/tpl/index.html | 0 htdocs/product/canvas/service/tpl/index.php | 1 - htdocs/product/class/index.html | 0 htdocs/product/composition/index.html | 0 htdocs/product/composition/index.php | 1 - htdocs/product/stats/index.html | 0 htdocs/product/stats/index.php | 1 - htdocs/product/stock/class/index.html | 0 htdocs/product/stock/img/index.html | 0 htdocs/product/stock/lib/index.html | 0 htdocs/projet/admin/index.html | 0 htdocs/projet/class/index.html | 0 htdocs/public/cron/index.html | 0 htdocs/public/emailing/index.html | 0 htdocs/resource/class/index.html | 0 htdocs/resource/img/index.html | 0 htdocs/resource/index.html | 0 htdocs/societe/ajax/index.html | 0 htdocs/societe/canvas/company/index.html | 0 htdocs/societe/canvas/company/index.php | 1 - htdocs/societe/canvas/company/tpl/index.html | 0 htdocs/societe/canvas/company/tpl/index.php | 1 - htdocs/societe/canvas/index.html | 0 htdocs/societe/canvas/individual/index.html | 0 htdocs/societe/canvas/individual/index.php | 1 - htdocs/societe/canvas/individual/tpl/index.html | 0 htdocs/societe/canvas/individual/tpl/index.php | 1 - htdocs/societe/checkvat/index.html | 0 htdocs/societe/checkvat/index.php | 1 - htdocs/societe/class/index.html | 0 htdocs/societe/tpl/index.html | 0 htdocs/theme/amarok/ckeditor/index.html | 0 htdocs/theme/amarok/img/index.html | 0 htdocs/theme/amarok/index.html | 0 htdocs/theme/amarok/index.php | 1 - htdocs/theme/amarok/tpl/index.html | 0 htdocs/theme/amarok/tpl/index.php | 1 - htdocs/theme/auguria/ckeditor/index.html | 0 htdocs/theme/auguria/img/index.html | 0 htdocs/theme/auguria/img/menus/index.html | 0 htdocs/theme/auguria/index.html | 0 htdocs/theme/auguria/index.php | 1 - htdocs/theme/auguria/tpl/index.html | 0 htdocs/theme/auguria/tpl/index.php | 1 - htdocs/theme/bureau2crea/ckeditor/index.html | 0 htdocs/theme/bureau2crea/img/bouton/index.html | 0 htdocs/theme/bureau2crea/img/index.html | 0 htdocs/theme/bureau2crea/img/menus/index.html | 0 htdocs/theme/bureau2crea/index.html | 0 htdocs/theme/bureau2crea/index.php | 1 - htdocs/theme/bureau2crea/tpl/index.html | 0 htdocs/theme/bureau2crea/tpl/index.php | 1 - htdocs/theme/cameleo/ckeditor/index.html | 0 htdocs/theme/cameleo/img/bouton/index.html | 0 htdocs/theme/cameleo/img/index.html | 0 htdocs/theme/cameleo/img/menus/index.html | 0 htdocs/theme/cameleo/index.html | 0 htdocs/theme/cameleo/index.php | 1 - htdocs/theme/cameleo/tpl/index.html | 0 htdocs/theme/cameleo/tpl/index.php | 1 - htdocs/theme/common/devices/index.html | 0 htdocs/theme/common/emotes/index.html | 0 htdocs/theme/common/flags/index.html | 0 htdocs/theme/common/index.html | 0 htdocs/theme/common/mime/index.html | 0 htdocs/theme/common/treemenu/index.html | 0 htdocs/theme/common/weather/index.html | 0 htdocs/theme/eldy/ckeditor/index.html | 0 htdocs/theme/eldy/img/index.html | 0 htdocs/theme/eldy/img/menus/index.html | 0 htdocs/theme/eldy/index.html | 0 htdocs/theme/eldy/index.php | 1 - htdocs/theme/eldy/tpl/index.html | 0 htdocs/theme/eldy/tpl/index.php | 1 - htdocs/theme/index.html | 0 htdocs/theme/index.php | 1 - htdocs/user/admin/index.html | 0 htdocs/user/class/index.html | 0 htdocs/webservices/admin/index.html | 0 319 files changed, 63 deletions(-) create mode 100644 htdocs/accountancy/class/index.html create mode 100644 htdocs/accountancy/index.html delete mode 100644 htdocs/accountancy/index.php delete mode 100644 htdocs/adherents/canvas/default/index.php create mode 100644 htdocs/adherents/canvas/default/tpl/index.html delete mode 100644 htdocs/adherents/canvas/default/tpl/index.php create mode 100644 htdocs/adherents/canvas/index.html delete mode 100644 htdocs/adherents/canvas/index.php create mode 100644 htdocs/adherents/cartes/index.html delete mode 100644 htdocs/adherents/cartes/index.php create mode 100644 htdocs/adherents/class/index.html create mode 100644 htdocs/asterisk/index.html delete mode 100644 htdocs/asterisk/index.php create mode 100644 htdocs/barcode/index.html create mode 100644 htdocs/bookmarks/admin/index.html create mode 100644 htdocs/bookmarks/class/index.html create mode 100644 htdocs/bookmarks/index.html delete mode 100644 htdocs/bookmarks/index.php create mode 100644 htdocs/boutique/admin/index.html create mode 100644 htdocs/boutique/client/class/index.html create mode 100644 htdocs/boutique/commande/class/index.html create mode 100644 htdocs/boutique/critiques/class/index.html create mode 100644 htdocs/boutique/promotion/class/index.html create mode 100644 htdocs/cashdesk/admin/index.html create mode 100644 htdocs/cashdesk/class/index.html delete mode 100644 htdocs/cashdesk/class/index.php create mode 100644 htdocs/cashdesk/css/index.html create mode 100644 htdocs/cashdesk/img/index.html delete mode 100644 htdocs/cashdesk/img/index.php create mode 100644 htdocs/cashdesk/include/index.html delete mode 100644 htdocs/cashdesk/include/index.php create mode 100644 htdocs/cashdesk/javascript/index.html delete mode 100644 htdocs/cashdesk/javascript/index.php create mode 100644 htdocs/cashdesk/tpl/index.html delete mode 100644 htdocs/cashdesk/tpl/index.php create mode 100644 htdocs/categories/admin/index.html create mode 100644 htdocs/categories/class/index.html create mode 100644 htdocs/comm/action/class/index.html create mode 100644 htdocs/comm/admin/index.html create mode 100644 htdocs/comm/mailing/class/index.html create mode 100644 htdocs/comm/propal/class/index.html create mode 100644 htdocs/comm/propal/tpl/index.html create mode 100644 htdocs/comm/prospect/class/index.html create mode 100644 htdocs/commande/class/index.html create mode 100644 htdocs/commande/tpl/index.html create mode 100644 htdocs/compta/bank/class/index.html create mode 100644 htdocs/compta/deplacement/class/index.html create mode 100644 htdocs/compta/dons/class/index.html create mode 100644 htdocs/compta/facture/admin/index.html create mode 100644 htdocs/compta/facture/class/index.html create mode 100644 htdocs/compta/facture/index.html delete mode 100644 htdocs/compta/facture/index.php create mode 100644 htdocs/compta/facture/tpl/index.html create mode 100644 htdocs/compta/journal/index.html create mode 100644 htdocs/compta/localtax/class/index.html create mode 100644 htdocs/compta/paiement/cheque/class/index.html create mode 100644 htdocs/compta/paiement/class/index.html create mode 100644 htdocs/compta/payment_sc/index.html create mode 100644 htdocs/compta/prelevement/class/index.html create mode 100644 htdocs/compta/salaries/class/index.html create mode 100644 htdocs/compta/sociales/class/index.html create mode 100644 htdocs/compta/tva/class/index.html create mode 100644 htdocs/conf/index.html create mode 100644 htdocs/contact/canvas/default/index.html delete mode 100644 htdocs/contact/canvas/default/index.php create mode 100644 htdocs/contact/canvas/default/tpl/index.html delete mode 100644 htdocs/contact/canvas/default/tpl/index.php create mode 100644 htdocs/contact/canvas/index.html delete mode 100644 htdocs/contact/canvas/index.php create mode 100644 htdocs/contact/class/index.html create mode 100644 htdocs/contact/index.html delete mode 100644 htdocs/contact/index.php create mode 100644 htdocs/contrat/admin/index.html create mode 100644 htdocs/contrat/class/index.html create mode 100644 htdocs/contrat/tpl/index.html create mode 100644 htdocs/core/ajax/index.html delete mode 100644 htdocs/core/ajax/index.php create mode 100644 htdocs/core/boxes/index.html delete mode 100644 htdocs/core/boxes/index.php create mode 100644 htdocs/core/class/index.html delete mode 100644 htdocs/core/class/index.php create mode 100644 htdocs/core/db/index.html delete mode 100644 htdocs/core/db/index.php create mode 100644 htdocs/core/filemanagerdol/browser/default/images/icons/32/index.html create mode 100644 htdocs/core/filemanagerdol/browser/default/images/icons/index.html create mode 100644 htdocs/core/filemanagerdol/browser/default/images/index.html create mode 100644 htdocs/core/filemanagerdol/browser/default/index.html create mode 100644 htdocs/core/filemanagerdol/browser/default/js/index.html create mode 100644 htdocs/core/filemanagerdol/browser/index.html create mode 100644 htdocs/core/filemanagerdol/connectors/index.html create mode 100644 htdocs/core/filemanagerdol/connectors/php/index.html create mode 100644 htdocs/core/filemanagerdol/index.html delete mode 100644 htdocs/core/filemanagerdol/index.php create mode 100644 htdocs/core/index.html delete mode 100644 htdocs/core/index.php create mode 100644 htdocs/core/js/index.html delete mode 100644 htdocs/core/js/index.php create mode 100644 htdocs/core/lib/index.html delete mode 100644 htdocs/core/lib/index.php create mode 100644 htdocs/core/login/index.html delete mode 100644 htdocs/core/login/index.php create mode 100644 htdocs/core/menus/index.html delete mode 100644 htdocs/core/menus/index.php create mode 100644 htdocs/core/menus/standard/index.html delete mode 100644 htdocs/core/menus/standard/index.php create mode 100644 htdocs/core/modules/action/index.html create mode 100644 htdocs/core/modules/barcode/doc/index.html create mode 100644 htdocs/core/modules/barcode/index.html create mode 100644 htdocs/core/modules/cheque/index.html create mode 100644 htdocs/core/modules/cheque/pdf/index.html create mode 100644 htdocs/core/modules/commande/doc/index.html create mode 100644 htdocs/core/modules/commande/index.html create mode 100644 htdocs/core/modules/contract/doc/index.html create mode 100644 htdocs/core/modules/contract/index.html create mode 100644 htdocs/core/modules/dons/index.html create mode 100644 htdocs/core/modules/expedition/doc/index.html create mode 100644 htdocs/core/modules/expedition/index.html create mode 100644 htdocs/core/modules/export/index.html create mode 100644 htdocs/core/modules/facture/doc/index.html create mode 100644 htdocs/core/modules/facture/index.html create mode 100644 htdocs/core/modules/fichinter/doc/index.html create mode 100644 htdocs/core/modules/fichinter/index.html create mode 100644 htdocs/core/modules/import/index.html create mode 100644 htdocs/core/modules/index.html delete mode 100644 htdocs/core/modules/index.php create mode 100644 htdocs/core/modules/livraison/index.html create mode 100644 htdocs/core/modules/livraison/pdf/index.html create mode 100644 htdocs/core/modules/mailings/index.html create mode 100644 htdocs/core/modules/member/doc/index.html create mode 100644 htdocs/core/modules/member/index.html create mode 100644 htdocs/core/modules/printsheet/doc/index.html create mode 100644 htdocs/core/modules/printsheet/index.html create mode 100644 htdocs/core/modules/product/index.html create mode 100644 htdocs/core/modules/project/index.html create mode 100644 htdocs/core/modules/project/pdf/index.html create mode 100644 htdocs/core/modules/project/task/index.html create mode 100644 htdocs/core/modules/project/task/pdf/index.html create mode 100644 htdocs/core/modules/propale/doc/index.html create mode 100644 htdocs/core/modules/propale/index.html create mode 100644 htdocs/core/modules/rapport/index.html create mode 100644 htdocs/core/modules/security/generate/index.html create mode 100644 htdocs/core/modules/security/index.html create mode 100644 htdocs/core/modules/societe/doc/index.html create mode 100644 htdocs/core/modules/societe/index.html create mode 100644 htdocs/core/modules/supplier_invoice/index.html create mode 100644 htdocs/core/modules/supplier_invoice/pdf/index.html create mode 100644 htdocs/core/modules/supplier_order/index.html create mode 100644 htdocs/core/modules/supplier_order/pdf/index.html create mode 100644 htdocs/core/modules/syslog/index.html create mode 100644 htdocs/core/tpl/ajax/index.html create mode 100644 htdocs/core/tpl/index.html delete mode 100644 htdocs/core/tpl/index.php create mode 100644 htdocs/core/triggers/index.html delete mode 100644 htdocs/core/triggers/index.php create mode 100644 htdocs/cron/admin/index.html create mode 100644 htdocs/cron/class/index.html create mode 100644 htdocs/cron/index.html create mode 100644 htdocs/ecm/ajax/index.html create mode 100644 htdocs/ecm/class/index.html create mode 100644 htdocs/ecm/tpl/index.html create mode 100644 htdocs/expedition/class/index.html create mode 100644 htdocs/expedition/tpl/index.html create mode 100644 htdocs/exports/class/index.html create mode 100644 htdocs/externalsite/admin/index.html create mode 100644 htdocs/externalsite/index.html delete mode 100644 htdocs/externalsite/index.php create mode 100644 htdocs/fichinter/admin/index.html create mode 100644 htdocs/fichinter/class/index.html create mode 100644 htdocs/fichinter/index.html delete mode 100644 htdocs/fichinter/index.php create mode 100644 htdocs/fichinter/tpl/index.html create mode 100644 htdocs/fourn/ajax/index.html create mode 100644 htdocs/fourn/class/index.html create mode 100644 htdocs/fourn/commande/tpl/index.html create mode 100644 htdocs/fourn/facture/index.html delete mode 100644 htdocs/fourn/facture/index.php create mode 100644 htdocs/fourn/facture/tpl/index.html create mode 100644 htdocs/fourn/paiement/index.html delete mode 100644 htdocs/fourn/paiement/index.php create mode 100644 htdocs/ftp/admin/index.html create mode 100644 htdocs/holiday/admin/index.html create mode 100644 htdocs/holiday/class/index.html create mode 100644 htdocs/holiday/img/index.html create mode 100644 htdocs/imports/class/index.html create mode 100644 htdocs/includes/adodbtime/index.html delete mode 100644 htdocs/includes/adodbtime/index.php create mode 100644 htdocs/includes/index.html delete mode 100644 htdocs/includes/index.php create mode 100644 htdocs/install/doctemplates/index.html create mode 100644 htdocs/install/doctemplates/invoices/index.html create mode 100644 htdocs/install/doctemplates/orders/index.html create mode 100644 htdocs/install/doctemplates/projects/index.html create mode 100644 htdocs/install/doctemplates/proposals/index.html create mode 100644 htdocs/install/doctemplates/shipment/index.html create mode 100644 htdocs/install/doctemplates/tasks/index.html create mode 100644 htdocs/install/doctemplates/thirdparties/index.html create mode 100644 htdocs/install/lib/index.html create mode 100644 htdocs/install/mssql/functions/index.html create mode 100644 htdocs/install/mssql/index.html create mode 100644 htdocs/install/mysql/data/index.html create mode 100644 htdocs/install/mysql/functions/index.html create mode 100644 htdocs/install/mysql/index.html create mode 100644 htdocs/install/mysql/migration/index.html create mode 100644 htdocs/install/mysql/tables/index.html create mode 100644 htdocs/install/pgsql/functions/index.html create mode 100644 htdocs/install/pgsql/index.html create mode 100644 htdocs/livraison/class/index.html create mode 100644 htdocs/livraison/index.html delete mode 100644 htdocs/livraison/index.php create mode 100644 htdocs/mailmanspip/class/index.html create mode 100644 htdocs/mailmanspip/index.html create mode 100644 htdocs/margin/admin/index.html create mode 100644 htdocs/margin/lib/index.html create mode 100644 htdocs/margin/tabs/index.html create mode 100644 htdocs/opensurvey/class/index.html create mode 100644 htdocs/opensurvey/css/index.html create mode 100644 htdocs/opensurvey/img/index.html create mode 100644 htdocs/opensurvey/public/index.html create mode 100644 htdocs/paybox/admin/index.html create mode 100644 htdocs/paybox/img/index.html create mode 100644 htdocs/paybox/index.html delete mode 100644 htdocs/paybox/index.php create mode 100644 htdocs/paybox/lib/index.html create mode 100644 htdocs/paypal/admin/index.html create mode 100644 htdocs/paypal/img/index.html create mode 100644 htdocs/paypal/index.html delete mode 100644 htdocs/paypal/index.php create mode 100644 htdocs/paypal/lib/index.html create mode 100644 htdocs/printipp/admin/index.html create mode 100644 htdocs/printipp/lib/index.html create mode 100644 htdocs/product/admin/index.html create mode 100644 htdocs/product/ajax/index.html create mode 100644 htdocs/product/canvas/index.html delete mode 100644 htdocs/product/canvas/index.php create mode 100644 htdocs/product/canvas/product/index.html delete mode 100644 htdocs/product/canvas/product/index.php create mode 100644 htdocs/product/canvas/product/tpl/index.html delete mode 100644 htdocs/product/canvas/product/tpl/index.php create mode 100644 htdocs/product/canvas/service/index.html delete mode 100644 htdocs/product/canvas/service/index.php create mode 100644 htdocs/product/canvas/service/tpl/index.html delete mode 100644 htdocs/product/canvas/service/tpl/index.php create mode 100644 htdocs/product/class/index.html create mode 100644 htdocs/product/composition/index.html delete mode 100644 htdocs/product/composition/index.php create mode 100644 htdocs/product/stats/index.html delete mode 100644 htdocs/product/stats/index.php create mode 100644 htdocs/product/stock/class/index.html create mode 100644 htdocs/product/stock/img/index.html create mode 100644 htdocs/product/stock/lib/index.html create mode 100644 htdocs/projet/admin/index.html create mode 100644 htdocs/projet/class/index.html create mode 100644 htdocs/public/cron/index.html create mode 100644 htdocs/public/emailing/index.html create mode 100644 htdocs/resource/class/index.html create mode 100644 htdocs/resource/img/index.html create mode 100644 htdocs/resource/index.html create mode 100644 htdocs/societe/ajax/index.html create mode 100644 htdocs/societe/canvas/company/index.html delete mode 100644 htdocs/societe/canvas/company/index.php create mode 100644 htdocs/societe/canvas/company/tpl/index.html delete mode 100644 htdocs/societe/canvas/company/tpl/index.php create mode 100644 htdocs/societe/canvas/index.html create mode 100644 htdocs/societe/canvas/individual/index.html delete mode 100644 htdocs/societe/canvas/individual/index.php create mode 100644 htdocs/societe/canvas/individual/tpl/index.html delete mode 100644 htdocs/societe/canvas/individual/tpl/index.php create mode 100644 htdocs/societe/checkvat/index.html delete mode 100644 htdocs/societe/checkvat/index.php create mode 100644 htdocs/societe/class/index.html create mode 100644 htdocs/societe/tpl/index.html create mode 100644 htdocs/theme/amarok/ckeditor/index.html create mode 100644 htdocs/theme/amarok/img/index.html create mode 100644 htdocs/theme/amarok/index.html delete mode 100644 htdocs/theme/amarok/index.php create mode 100644 htdocs/theme/amarok/tpl/index.html delete mode 100644 htdocs/theme/amarok/tpl/index.php create mode 100644 htdocs/theme/auguria/ckeditor/index.html create mode 100644 htdocs/theme/auguria/img/index.html create mode 100644 htdocs/theme/auguria/img/menus/index.html create mode 100644 htdocs/theme/auguria/index.html delete mode 100644 htdocs/theme/auguria/index.php create mode 100644 htdocs/theme/auguria/tpl/index.html delete mode 100644 htdocs/theme/auguria/tpl/index.php create mode 100644 htdocs/theme/bureau2crea/ckeditor/index.html create mode 100644 htdocs/theme/bureau2crea/img/bouton/index.html create mode 100644 htdocs/theme/bureau2crea/img/index.html create mode 100644 htdocs/theme/bureau2crea/img/menus/index.html create mode 100644 htdocs/theme/bureau2crea/index.html delete mode 100644 htdocs/theme/bureau2crea/index.php create mode 100644 htdocs/theme/bureau2crea/tpl/index.html delete mode 100644 htdocs/theme/bureau2crea/tpl/index.php create mode 100644 htdocs/theme/cameleo/ckeditor/index.html create mode 100644 htdocs/theme/cameleo/img/bouton/index.html create mode 100644 htdocs/theme/cameleo/img/index.html create mode 100644 htdocs/theme/cameleo/img/menus/index.html create mode 100644 htdocs/theme/cameleo/index.html delete mode 100644 htdocs/theme/cameleo/index.php create mode 100644 htdocs/theme/cameleo/tpl/index.html delete mode 100644 htdocs/theme/cameleo/tpl/index.php create mode 100644 htdocs/theme/common/devices/index.html create mode 100644 htdocs/theme/common/emotes/index.html create mode 100644 htdocs/theme/common/flags/index.html create mode 100644 htdocs/theme/common/index.html create mode 100644 htdocs/theme/common/mime/index.html create mode 100644 htdocs/theme/common/treemenu/index.html create mode 100644 htdocs/theme/common/weather/index.html create mode 100644 htdocs/theme/eldy/ckeditor/index.html create mode 100644 htdocs/theme/eldy/img/index.html create mode 100644 htdocs/theme/eldy/img/menus/index.html create mode 100644 htdocs/theme/eldy/index.html delete mode 100644 htdocs/theme/eldy/index.php create mode 100644 htdocs/theme/eldy/tpl/index.html delete mode 100644 htdocs/theme/eldy/tpl/index.php create mode 100644 htdocs/theme/index.html delete mode 100644 htdocs/theme/index.php create mode 100644 htdocs/user/admin/index.html create mode 100644 htdocs/user/class/index.html create mode 100644 htdocs/webservices/admin/index.html diff --git a/htdocs/accountancy/class/index.html b/htdocs/accountancy/class/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/accountancy/index.html b/htdocs/accountancy/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/accountancy/index.php b/htdocs/accountancy/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/accountancy/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/adherents/canvas/default/index.php b/htdocs/adherents/canvas/default/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/adherents/canvas/default/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/adherents/canvas/default/tpl/index.html b/htdocs/adherents/canvas/default/tpl/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/adherents/canvas/default/tpl/index.php b/htdocs/adherents/canvas/default/tpl/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/adherents/canvas/default/tpl/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/adherents/canvas/index.html b/htdocs/adherents/canvas/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/adherents/canvas/index.php b/htdocs/adherents/canvas/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/adherents/canvas/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/adherents/cartes/index.html b/htdocs/adherents/cartes/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/adherents/cartes/index.php b/htdocs/adherents/cartes/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/adherents/cartes/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/adherents/class/index.html b/htdocs/adherents/class/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/asterisk/index.html b/htdocs/asterisk/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/asterisk/index.php b/htdocs/asterisk/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/asterisk/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/barcode/index.html b/htdocs/barcode/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/bookmarks/admin/index.html b/htdocs/bookmarks/admin/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/bookmarks/class/index.html b/htdocs/bookmarks/class/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/bookmarks/index.html b/htdocs/bookmarks/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/bookmarks/index.php b/htdocs/bookmarks/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/bookmarks/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/boutique/admin/index.html b/htdocs/boutique/admin/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/boutique/client/class/index.html b/htdocs/boutique/client/class/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/boutique/commande/class/index.html b/htdocs/boutique/commande/class/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/boutique/critiques/class/index.html b/htdocs/boutique/critiques/class/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/boutique/promotion/class/index.html b/htdocs/boutique/promotion/class/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/cashdesk/admin/index.html b/htdocs/cashdesk/admin/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/cashdesk/class/index.html b/htdocs/cashdesk/class/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/cashdesk/class/index.php b/htdocs/cashdesk/class/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/cashdesk/class/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/cashdesk/css/index.html b/htdocs/cashdesk/css/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/cashdesk/img/index.html b/htdocs/cashdesk/img/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/cashdesk/img/index.php b/htdocs/cashdesk/img/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/cashdesk/img/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/cashdesk/include/index.html b/htdocs/cashdesk/include/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/cashdesk/include/index.php b/htdocs/cashdesk/include/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/cashdesk/include/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/cashdesk/javascript/index.html b/htdocs/cashdesk/javascript/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/cashdesk/javascript/index.php b/htdocs/cashdesk/javascript/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/cashdesk/javascript/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/cashdesk/tpl/index.html b/htdocs/cashdesk/tpl/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/cashdesk/tpl/index.php b/htdocs/cashdesk/tpl/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/cashdesk/tpl/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/categories/admin/index.html b/htdocs/categories/admin/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/categories/class/index.html b/htdocs/categories/class/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/comm/action/class/index.html b/htdocs/comm/action/class/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/comm/admin/index.html b/htdocs/comm/admin/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/comm/mailing/class/index.html b/htdocs/comm/mailing/class/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/comm/propal/class/index.html b/htdocs/comm/propal/class/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/comm/propal/tpl/index.html b/htdocs/comm/propal/tpl/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/comm/prospect/class/index.html b/htdocs/comm/prospect/class/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/commande/class/index.html b/htdocs/commande/class/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/commande/tpl/index.html b/htdocs/commande/tpl/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/compta/bank/class/index.html b/htdocs/compta/bank/class/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/compta/deplacement/class/index.html b/htdocs/compta/deplacement/class/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/compta/dons/class/index.html b/htdocs/compta/dons/class/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/compta/facture/admin/index.html b/htdocs/compta/facture/admin/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/compta/facture/class/index.html b/htdocs/compta/facture/class/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/compta/facture/index.html b/htdocs/compta/facture/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/compta/facture/index.php b/htdocs/compta/facture/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/compta/facture/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/compta/facture/tpl/index.html b/htdocs/compta/facture/tpl/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/compta/journal/index.html b/htdocs/compta/journal/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/compta/localtax/class/index.html b/htdocs/compta/localtax/class/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/compta/paiement/cheque/class/index.html b/htdocs/compta/paiement/cheque/class/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/compta/paiement/class/index.html b/htdocs/compta/paiement/class/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/compta/payment_sc/index.html b/htdocs/compta/payment_sc/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/compta/prelevement/class/index.html b/htdocs/compta/prelevement/class/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/compta/salaries/class/index.html b/htdocs/compta/salaries/class/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/compta/sociales/class/index.html b/htdocs/compta/sociales/class/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/compta/tva/class/index.html b/htdocs/compta/tva/class/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/conf/index.html b/htdocs/conf/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/contact/canvas/default/index.html b/htdocs/contact/canvas/default/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/contact/canvas/default/index.php b/htdocs/contact/canvas/default/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/contact/canvas/default/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/contact/canvas/default/tpl/index.html b/htdocs/contact/canvas/default/tpl/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/contact/canvas/default/tpl/index.php b/htdocs/contact/canvas/default/tpl/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/contact/canvas/default/tpl/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/contact/canvas/index.html b/htdocs/contact/canvas/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/contact/canvas/index.php b/htdocs/contact/canvas/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/contact/canvas/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/contact/class/index.html b/htdocs/contact/class/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/contact/index.html b/htdocs/contact/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/contact/index.php b/htdocs/contact/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/contact/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/contrat/admin/index.html b/htdocs/contrat/admin/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/contrat/class/index.html b/htdocs/contrat/class/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/contrat/tpl/index.html b/htdocs/contrat/tpl/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/ajax/index.html b/htdocs/core/ajax/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/ajax/index.php b/htdocs/core/ajax/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/core/ajax/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/core/boxes/index.html b/htdocs/core/boxes/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/boxes/index.php b/htdocs/core/boxes/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/core/boxes/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/core/class/index.html b/htdocs/core/class/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/class/index.php b/htdocs/core/class/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/core/class/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/core/db/index.html b/htdocs/core/db/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/db/index.php b/htdocs/core/db/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/core/db/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/core/filemanagerdol/browser/default/images/icons/32/index.html b/htdocs/core/filemanagerdol/browser/default/images/icons/32/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/filemanagerdol/browser/default/images/icons/index.html b/htdocs/core/filemanagerdol/browser/default/images/icons/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/filemanagerdol/browser/default/images/index.html b/htdocs/core/filemanagerdol/browser/default/images/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/filemanagerdol/browser/default/index.html b/htdocs/core/filemanagerdol/browser/default/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/filemanagerdol/browser/default/js/index.html b/htdocs/core/filemanagerdol/browser/default/js/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/filemanagerdol/browser/index.html b/htdocs/core/filemanagerdol/browser/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/filemanagerdol/connectors/index.html b/htdocs/core/filemanagerdol/connectors/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/filemanagerdol/connectors/php/index.html b/htdocs/core/filemanagerdol/connectors/php/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/filemanagerdol/index.html b/htdocs/core/filemanagerdol/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/filemanagerdol/index.php b/htdocs/core/filemanagerdol/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/core/filemanagerdol/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/core/index.html b/htdocs/core/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/index.php b/htdocs/core/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/core/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/core/js/index.html b/htdocs/core/js/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/js/index.php b/htdocs/core/js/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/core/js/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/core/lib/index.html b/htdocs/core/lib/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/lib/index.php b/htdocs/core/lib/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/core/lib/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/core/login/index.html b/htdocs/core/login/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/login/index.php b/htdocs/core/login/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/core/login/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/core/menus/index.html b/htdocs/core/menus/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/menus/index.php b/htdocs/core/menus/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/core/menus/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/core/menus/standard/index.html b/htdocs/core/menus/standard/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/menus/standard/index.php b/htdocs/core/menus/standard/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/core/menus/standard/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/core/modules/action/index.html b/htdocs/core/modules/action/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/modules/barcode/doc/index.html b/htdocs/core/modules/barcode/doc/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/modules/barcode/index.html b/htdocs/core/modules/barcode/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/modules/cheque/index.html b/htdocs/core/modules/cheque/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/modules/cheque/pdf/index.html b/htdocs/core/modules/cheque/pdf/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/modules/commande/doc/index.html b/htdocs/core/modules/commande/doc/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/modules/commande/index.html b/htdocs/core/modules/commande/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/modules/contract/doc/index.html b/htdocs/core/modules/contract/doc/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/modules/contract/index.html b/htdocs/core/modules/contract/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/modules/dons/index.html b/htdocs/core/modules/dons/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/modules/expedition/doc/index.html b/htdocs/core/modules/expedition/doc/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/modules/expedition/index.html b/htdocs/core/modules/expedition/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/modules/export/index.html b/htdocs/core/modules/export/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/modules/facture/doc/index.html b/htdocs/core/modules/facture/doc/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/modules/facture/index.html b/htdocs/core/modules/facture/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/modules/fichinter/doc/index.html b/htdocs/core/modules/fichinter/doc/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/modules/fichinter/index.html b/htdocs/core/modules/fichinter/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/modules/import/index.html b/htdocs/core/modules/import/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/modules/index.html b/htdocs/core/modules/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/modules/index.php b/htdocs/core/modules/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/core/modules/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/core/modules/livraison/index.html b/htdocs/core/modules/livraison/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/modules/livraison/pdf/index.html b/htdocs/core/modules/livraison/pdf/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/modules/mailings/index.html b/htdocs/core/modules/mailings/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/modules/member/doc/index.html b/htdocs/core/modules/member/doc/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/modules/member/index.html b/htdocs/core/modules/member/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/modules/printsheet/doc/index.html b/htdocs/core/modules/printsheet/doc/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/modules/printsheet/index.html b/htdocs/core/modules/printsheet/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/modules/product/index.html b/htdocs/core/modules/product/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/modules/project/index.html b/htdocs/core/modules/project/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/modules/project/pdf/index.html b/htdocs/core/modules/project/pdf/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/modules/project/task/index.html b/htdocs/core/modules/project/task/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/modules/project/task/pdf/index.html b/htdocs/core/modules/project/task/pdf/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/modules/propale/doc/index.html b/htdocs/core/modules/propale/doc/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/modules/propale/index.html b/htdocs/core/modules/propale/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/modules/rapport/index.html b/htdocs/core/modules/rapport/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/modules/security/generate/index.html b/htdocs/core/modules/security/generate/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/modules/security/index.html b/htdocs/core/modules/security/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/modules/societe/doc/index.html b/htdocs/core/modules/societe/doc/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/modules/societe/index.html b/htdocs/core/modules/societe/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/modules/supplier_invoice/index.html b/htdocs/core/modules/supplier_invoice/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/modules/supplier_invoice/pdf/index.html b/htdocs/core/modules/supplier_invoice/pdf/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/modules/supplier_order/index.html b/htdocs/core/modules/supplier_order/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/modules/supplier_order/pdf/index.html b/htdocs/core/modules/supplier_order/pdf/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/modules/syslog/index.html b/htdocs/core/modules/syslog/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/tpl/ajax/index.html b/htdocs/core/tpl/ajax/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/tpl/index.html b/htdocs/core/tpl/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/tpl/index.php b/htdocs/core/tpl/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/core/tpl/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/core/triggers/index.html b/htdocs/core/triggers/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/core/triggers/index.php b/htdocs/core/triggers/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/core/triggers/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/cron/admin/index.html b/htdocs/cron/admin/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/cron/class/index.html b/htdocs/cron/class/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/cron/index.html b/htdocs/cron/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/ecm/ajax/index.html b/htdocs/ecm/ajax/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/ecm/class/index.html b/htdocs/ecm/class/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/ecm/tpl/index.html b/htdocs/ecm/tpl/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/expedition/class/index.html b/htdocs/expedition/class/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/expedition/tpl/index.html b/htdocs/expedition/tpl/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/exports/class/index.html b/htdocs/exports/class/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/externalsite/admin/index.html b/htdocs/externalsite/admin/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/externalsite/index.html b/htdocs/externalsite/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/externalsite/index.php b/htdocs/externalsite/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/externalsite/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/fichinter/admin/index.html b/htdocs/fichinter/admin/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/fichinter/class/index.html b/htdocs/fichinter/class/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/fichinter/index.html b/htdocs/fichinter/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/fichinter/index.php b/htdocs/fichinter/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/fichinter/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/fichinter/tpl/index.html b/htdocs/fichinter/tpl/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/fourn/ajax/index.html b/htdocs/fourn/ajax/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/fourn/class/index.html b/htdocs/fourn/class/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/fourn/commande/tpl/index.html b/htdocs/fourn/commande/tpl/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/fourn/facture/index.html b/htdocs/fourn/facture/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/fourn/facture/index.php b/htdocs/fourn/facture/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/fourn/facture/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/fourn/facture/tpl/index.html b/htdocs/fourn/facture/tpl/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/fourn/paiement/index.html b/htdocs/fourn/paiement/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/fourn/paiement/index.php b/htdocs/fourn/paiement/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/fourn/paiement/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/ftp/admin/index.html b/htdocs/ftp/admin/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/holiday/admin/index.html b/htdocs/holiday/admin/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/holiday/class/index.html b/htdocs/holiday/class/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/holiday/img/index.html b/htdocs/holiday/img/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/imports/class/index.html b/htdocs/imports/class/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/includes/adodbtime/index.html b/htdocs/includes/adodbtime/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/includes/adodbtime/index.php b/htdocs/includes/adodbtime/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/includes/adodbtime/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/includes/index.html b/htdocs/includes/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/includes/index.php b/htdocs/includes/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/includes/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/install/doctemplates/index.html b/htdocs/install/doctemplates/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/install/doctemplates/invoices/index.html b/htdocs/install/doctemplates/invoices/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/install/doctemplates/orders/index.html b/htdocs/install/doctemplates/orders/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/install/doctemplates/projects/index.html b/htdocs/install/doctemplates/projects/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/install/doctemplates/proposals/index.html b/htdocs/install/doctemplates/proposals/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/install/doctemplates/shipment/index.html b/htdocs/install/doctemplates/shipment/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/install/doctemplates/tasks/index.html b/htdocs/install/doctemplates/tasks/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/install/doctemplates/thirdparties/index.html b/htdocs/install/doctemplates/thirdparties/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/install/lib/index.html b/htdocs/install/lib/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/install/mssql/functions/index.html b/htdocs/install/mssql/functions/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/install/mssql/index.html b/htdocs/install/mssql/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/install/mysql/data/index.html b/htdocs/install/mysql/data/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/install/mysql/functions/index.html b/htdocs/install/mysql/functions/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/install/mysql/index.html b/htdocs/install/mysql/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/install/mysql/migration/index.html b/htdocs/install/mysql/migration/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/install/mysql/tables/index.html b/htdocs/install/mysql/tables/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/install/pgsql/functions/index.html b/htdocs/install/pgsql/functions/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/install/pgsql/index.html b/htdocs/install/pgsql/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/livraison/class/index.html b/htdocs/livraison/class/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/livraison/index.html b/htdocs/livraison/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/livraison/index.php b/htdocs/livraison/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/livraison/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/mailmanspip/class/index.html b/htdocs/mailmanspip/class/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/mailmanspip/index.html b/htdocs/mailmanspip/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/margin/admin/index.html b/htdocs/margin/admin/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/margin/lib/index.html b/htdocs/margin/lib/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/margin/tabs/index.html b/htdocs/margin/tabs/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/opensurvey/class/index.html b/htdocs/opensurvey/class/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/opensurvey/css/index.html b/htdocs/opensurvey/css/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/opensurvey/img/index.html b/htdocs/opensurvey/img/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/opensurvey/public/index.html b/htdocs/opensurvey/public/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/paybox/admin/index.html b/htdocs/paybox/admin/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/paybox/img/index.html b/htdocs/paybox/img/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/paybox/index.html b/htdocs/paybox/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/paybox/index.php b/htdocs/paybox/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/paybox/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/paybox/lib/index.html b/htdocs/paybox/lib/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/paypal/admin/index.html b/htdocs/paypal/admin/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/paypal/img/index.html b/htdocs/paypal/img/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/paypal/index.html b/htdocs/paypal/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/paypal/index.php b/htdocs/paypal/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/paypal/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/paypal/lib/index.html b/htdocs/paypal/lib/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/printipp/admin/index.html b/htdocs/printipp/admin/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/printipp/lib/index.html b/htdocs/printipp/lib/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/product/admin/index.html b/htdocs/product/admin/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/product/ajax/index.html b/htdocs/product/ajax/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/product/canvas/index.html b/htdocs/product/canvas/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/product/canvas/index.php b/htdocs/product/canvas/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/product/canvas/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/product/canvas/product/index.html b/htdocs/product/canvas/product/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/product/canvas/product/index.php b/htdocs/product/canvas/product/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/product/canvas/product/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/product/canvas/product/tpl/index.html b/htdocs/product/canvas/product/tpl/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/product/canvas/product/tpl/index.php b/htdocs/product/canvas/product/tpl/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/product/canvas/product/tpl/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/product/canvas/service/index.html b/htdocs/product/canvas/service/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/product/canvas/service/index.php b/htdocs/product/canvas/service/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/product/canvas/service/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/product/canvas/service/tpl/index.html b/htdocs/product/canvas/service/tpl/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/product/canvas/service/tpl/index.php b/htdocs/product/canvas/service/tpl/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/product/canvas/service/tpl/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/product/class/index.html b/htdocs/product/class/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/product/composition/index.html b/htdocs/product/composition/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/product/composition/index.php b/htdocs/product/composition/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/product/composition/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/product/stats/index.html b/htdocs/product/stats/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/product/stats/index.php b/htdocs/product/stats/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/product/stats/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/product/stock/class/index.html b/htdocs/product/stock/class/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/product/stock/img/index.html b/htdocs/product/stock/img/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/product/stock/lib/index.html b/htdocs/product/stock/lib/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/projet/admin/index.html b/htdocs/projet/admin/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/projet/class/index.html b/htdocs/projet/class/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/public/cron/index.html b/htdocs/public/cron/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/public/emailing/index.html b/htdocs/public/emailing/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/resource/class/index.html b/htdocs/resource/class/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/resource/img/index.html b/htdocs/resource/img/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/resource/index.html b/htdocs/resource/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/societe/ajax/index.html b/htdocs/societe/ajax/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/societe/canvas/company/index.html b/htdocs/societe/canvas/company/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/societe/canvas/company/index.php b/htdocs/societe/canvas/company/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/societe/canvas/company/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/societe/canvas/company/tpl/index.html b/htdocs/societe/canvas/company/tpl/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/societe/canvas/company/tpl/index.php b/htdocs/societe/canvas/company/tpl/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/societe/canvas/company/tpl/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/societe/canvas/index.html b/htdocs/societe/canvas/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/societe/canvas/individual/index.html b/htdocs/societe/canvas/individual/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/societe/canvas/individual/index.php b/htdocs/societe/canvas/individual/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/societe/canvas/individual/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/societe/canvas/individual/tpl/index.html b/htdocs/societe/canvas/individual/tpl/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/societe/canvas/individual/tpl/index.php b/htdocs/societe/canvas/individual/tpl/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/societe/canvas/individual/tpl/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/societe/checkvat/index.html b/htdocs/societe/checkvat/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/societe/checkvat/index.php b/htdocs/societe/checkvat/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/societe/checkvat/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/societe/class/index.html b/htdocs/societe/class/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/societe/tpl/index.html b/htdocs/societe/tpl/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/theme/amarok/ckeditor/index.html b/htdocs/theme/amarok/ckeditor/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/theme/amarok/img/index.html b/htdocs/theme/amarok/img/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/theme/amarok/index.html b/htdocs/theme/amarok/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/theme/amarok/index.php b/htdocs/theme/amarok/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/theme/amarok/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/theme/amarok/tpl/index.html b/htdocs/theme/amarok/tpl/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/theme/amarok/tpl/index.php b/htdocs/theme/amarok/tpl/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/theme/amarok/tpl/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/theme/auguria/ckeditor/index.html b/htdocs/theme/auguria/ckeditor/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/theme/auguria/img/index.html b/htdocs/theme/auguria/img/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/theme/auguria/img/menus/index.html b/htdocs/theme/auguria/img/menus/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/theme/auguria/index.html b/htdocs/theme/auguria/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/theme/auguria/index.php b/htdocs/theme/auguria/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/theme/auguria/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/theme/auguria/tpl/index.html b/htdocs/theme/auguria/tpl/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/theme/auguria/tpl/index.php b/htdocs/theme/auguria/tpl/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/theme/auguria/tpl/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/theme/bureau2crea/ckeditor/index.html b/htdocs/theme/bureau2crea/ckeditor/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/theme/bureau2crea/img/bouton/index.html b/htdocs/theme/bureau2crea/img/bouton/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/theme/bureau2crea/img/index.html b/htdocs/theme/bureau2crea/img/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/theme/bureau2crea/img/menus/index.html b/htdocs/theme/bureau2crea/img/menus/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/theme/bureau2crea/index.html b/htdocs/theme/bureau2crea/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/theme/bureau2crea/index.php b/htdocs/theme/bureau2crea/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/theme/bureau2crea/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/theme/bureau2crea/tpl/index.html b/htdocs/theme/bureau2crea/tpl/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/theme/bureau2crea/tpl/index.php b/htdocs/theme/bureau2crea/tpl/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/theme/bureau2crea/tpl/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/theme/cameleo/ckeditor/index.html b/htdocs/theme/cameleo/ckeditor/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/theme/cameleo/img/bouton/index.html b/htdocs/theme/cameleo/img/bouton/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/theme/cameleo/img/index.html b/htdocs/theme/cameleo/img/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/theme/cameleo/img/menus/index.html b/htdocs/theme/cameleo/img/menus/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/theme/cameleo/index.html b/htdocs/theme/cameleo/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/theme/cameleo/index.php b/htdocs/theme/cameleo/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/theme/cameleo/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/theme/cameleo/tpl/index.html b/htdocs/theme/cameleo/tpl/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/theme/cameleo/tpl/index.php b/htdocs/theme/cameleo/tpl/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/theme/cameleo/tpl/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/theme/common/devices/index.html b/htdocs/theme/common/devices/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/theme/common/emotes/index.html b/htdocs/theme/common/emotes/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/theme/common/flags/index.html b/htdocs/theme/common/flags/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/theme/common/index.html b/htdocs/theme/common/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/theme/common/mime/index.html b/htdocs/theme/common/mime/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/theme/common/treemenu/index.html b/htdocs/theme/common/treemenu/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/theme/common/weather/index.html b/htdocs/theme/common/weather/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/theme/eldy/ckeditor/index.html b/htdocs/theme/eldy/ckeditor/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/theme/eldy/img/index.html b/htdocs/theme/eldy/img/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/theme/eldy/img/menus/index.html b/htdocs/theme/eldy/img/menus/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/theme/eldy/index.html b/htdocs/theme/eldy/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/theme/eldy/index.php b/htdocs/theme/eldy/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/theme/eldy/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/theme/eldy/tpl/index.html b/htdocs/theme/eldy/tpl/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/theme/eldy/tpl/index.php b/htdocs/theme/eldy/tpl/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/theme/eldy/tpl/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/theme/index.html b/htdocs/theme/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/theme/index.php b/htdocs/theme/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/theme/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/user/admin/index.html b/htdocs/user/admin/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/user/class/index.html b/htdocs/user/class/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/webservices/admin/index.html b/htdocs/webservices/admin/index.html new file mode 100644 index 00000000000..e69de29bb2d From 2dd3bacd4f31dfba28f37ef7b3626148e3e8c623 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sat, 12 Jul 2014 23:30:01 +0200 Subject: [PATCH 187/258] Removed no longer needed files --- .gitignore | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index d0f4a919cde..9b639ce64a6 100755 --- a/.gitignore +++ b/.gitignore @@ -17,7 +17,4 @@ doxygen_warnings.log *.iml Thumbs.db # Vagrant generated files -.vagrant -/index.html -/phpmyadmin -/xhprof +.vagrant \ No newline at end of file From 4bc8e026b69b58becd91bc924d1cf4a0755824c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 13 Jul 2014 19:51:44 +0200 Subject: [PATCH 188/258] [ bug #1526 ] Thumbs of files uploaded with dots in their names do not load correctly --- ChangeLog | 1 + htdocs/core/class/html.formfile.class.php | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 502cbc40536..d9c0706eb54 100644 --- a/ChangeLog +++ b/ChangeLog @@ -45,6 +45,7 @@ Fix: [ bug #1484 ] BILL_SUPPLIER_PAYED trigger action does not intercept failure Fix: [ bug #1482 ] Several supplier invoice triggers do not show trigger error messages Fix: [ bug #1486 ] LINEBILL_SUPPLIER_CREATE and LINEBILL_SUPPLIER_UPDATE triggers do not intercept trigger action Fix: [ bug #1522 ] Element list into associate object into project are no more filterd by project thirdparty +Fix: [ bug #1526 ] Thumbs of files uploaded with dots in their names do not load correctly ***** ChangeLog for 3.5.3 compared to 3.5.2 ***** Fix: Error on field accountancy code for export profile of invoices. diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index 9ce484e5d43..d2cba220bcf 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -4,6 +4,7 @@ * Copyright (c) 2010 Juanjo Menent * Copyright (c) 2013 Charles-Fr BENKE * Copyright (C) 2013 Cédric Salvador + * Copyright (c) 2014 Marcos García * * 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 @@ -800,9 +801,10 @@ class FormFile // Preview if (empty($useinecm)) { + $fileinfo = pathinfo($file['name']); + print ''; From b0ae2fe2aaf069a4a9893d09ae3d588742862318 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Mon, 14 Jul 2014 01:32:57 +0200 Subject: [PATCH 189/258] Fixed a bug introduced in commit 0916d2cf3b --- htdocs/projet/element.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/htdocs/projet/element.php b/htdocs/projet/element.php index 4075113d625..edc633a7fc8 100644 --- a/htdocs/projet/element.php +++ b/htdocs/projet/element.php @@ -217,12 +217,10 @@ foreach ($listofreferent as $key => $value) print_titre($langs->trans($title)); $selectList=$formproject->select_element($tablename,$project->societe->id); - if ($selectList<0) { + + if (!$selectList || ($selectList<0)) { setEventMessage($formproject->error,'errors'); - } - - if ($selectList) - { + } else { print '
'; print ''; print ''; From 1ae4341d57d24d878e4dbd26376762d0f9182c10 Mon Sep 17 00:00:00 2001 From: Drosis Nikos Date: Mon, 14 Jul 2014 16:53:12 +0300 Subject: [PATCH 190/258] Fix Link product --- htdocs/margin/productMargins.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/margin/productMargins.php b/htdocs/margin/productMargins.php index 3a53c9570f2..cf03ab5b7e2 100644 --- a/htdocs/margin/productMargins.php +++ b/htdocs/margin/productMargins.php @@ -260,7 +260,7 @@ if ($result) } else { $product_static->type=$objp->fk_product_type; - $product_static->id=$objp->fk_product; + $product_static->id=$objp->rowid; $product_static->ref=$objp->ref; $product_static->libelle=$objp->label; $text=$product_static->getNomUrl(1); From fcc0632beb0918c44e259c82c51ec5aeb4bf6bc7 Mon Sep 17 00:00:00 2001 From: Drosis Nikos Date: Mon, 14 Jul 2014 17:18:31 +0300 Subject: [PATCH 191/258] In list view and label product --- htdocs/margin/productMargins.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/htdocs/margin/productMargins.php b/htdocs/margin/productMargins.php index cf03ab5b7e2..a8830f777ec 100644 --- a/htdocs/margin/productMargins.php +++ b/htdocs/margin/productMargins.php @@ -259,13 +259,15 @@ if ($result) print dol_print_date($db->jdate($objp->datef),'day').""; } else { + print '
\n"; + print $text.= ' - '.$objp->label; + print "\n"; + //print "\n"; } print "\n"; print "\n"; From 8eced58ba0eeb8c7ab48a3deb0f480d4dd20d8df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garc=C3=ADa?= Date: Mon, 14 Jul 2014 19:16:28 +0200 Subject: [PATCH 192/258] Removed @ operator from dol_include_once Adding @ operator to include_once makes include errors untraceable, it shouldn't be there. Errors must be thrown so that we notice them. It is PHP configuration's choice to decide wether to log them or print them. --- htdocs/core/lib/functions.lib.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index b1f11590bdc..78326ee3bb7 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -243,9 +243,9 @@ function dol_include_once($relpath, $classname='') global $conf,$langs,$user,$mysoc; // Other global var must be retreived with $GLOBALS['var'] if (! empty($classname) && ! class_exists($classname)) { - return @include dol_buildpath($relpath); // Remove @ to find error into php log file if you have problems + return include dol_buildpath($relpath); } else { - return @include_once dol_buildpath($relpath); // Remove @ to find error into php log file if you have problems + return include_once dol_buildpath($relpath); } } From 3930c8829ef5a8cb6e305ca2d828e4f4a019525c Mon Sep 17 00:00:00 2001 From: Juanjo Menent Date: Mon, 14 Jul 2014 19:38:00 +0200 Subject: [PATCH 193/258] Fix: Import ProfId1 to siren and ProfId2 to siret --- htdocs/core/modules/modSociete.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/modules/modSociete.class.php b/htdocs/core/modules/modSociete.class.php index 753e1a0892b..ab80004b0c7 100644 --- a/htdocs/core/modules/modSociete.class.php +++ b/htdocs/core/modules/modSociete.class.php @@ -4,7 +4,7 @@ * Copyright (C) 2004 Sebastien Di Cintio * Copyright (C) 2004 Benoit Mortier * Copyright (C) 2005-2013 Regis Houssin - * Copyright (C) 2012-2013 Juanjo Menent + * Copyright (C) 2012-2014 Juanjo Menent * * 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 @@ -382,7 +382,7 @@ class modSociete extends DolibarrModules $this->import_icon[$r]='company'; $this->import_entities_array[$r]=array(); // We define here only fields that use another icon that the one defined into import_icon $this->import_tables_array[$r]=array('s'=>MAIN_DB_PREFIX.'societe','extra'=>MAIN_DB_PREFIX.'societe_extrafields'); // List of tables to insert into (insert done in same order) - $this->import_fields_array[$r]=array('s.nom'=>"Name*",'s.status'=>"Status",'s.client'=>"Customer*",'s.fournisseur'=>"Supplier*",'s.code_client'=>"CustomerCode",'s.code_fournisseur'=>"SupplierCode",'s.code_compta'=>"CustomerAccountancyCode",'s.code_compta_fournisseur'=>"SupplierAccountancyCode",'s.address'=>"Address",'s.zip'=>"Zip",'s.town'=>"Town",'s.fk_departement'=>"StateId",'s.fk_pays'=>"CountryCode",'s.phone'=>"Phone",'s.fax'=>"Fax",'s.url'=>"Url",'s.email'=>"Email",'s.siret'=>"ProfId1",'s.siren'=>"ProfId2",'s.ape'=>"ProfId3",'s.idprof4'=>"ProfId4",'s.tva_intra'=>"VATIntraShort",'s.capital'=>"Capital",'s.note_private'=>"NotePrivate",'s.note_public'=>"NotePublic",'s.fk_typent'=>"ThirdPartyType",'s.fk_effectif'=>"Staff","s.fk_forme_juridique"=>"JuridicalStatus",'s.fk_prospectlevel'=>'ProspectLevel','s.fk_stcomm'=>'ProspectStatus','s.default_lang'=>'DefaultLanguage','s.barcode'=>'BarCode','s.datec'=>"DateCreation"); + $this->import_fields_array[$r]=array('s.nom'=>"Name*",'s.status'=>"Status",'s.client'=>"Customer*",'s.fournisseur'=>"Supplier*",'s.code_client'=>"CustomerCode",'s.code_fournisseur'=>"SupplierCode",'s.code_compta'=>"CustomerAccountancyCode",'s.code_compta_fournisseur'=>"SupplierAccountancyCode",'s.address'=>"Address",'s.zip'=>"Zip",'s.town'=>"Town",'s.fk_departement'=>"StateId",'s.fk_pays'=>"CountryCode",'s.phone'=>"Phone",'s.fax'=>"Fax",'s.url'=>"Url",'s.email'=>"Email",'s.siren'=>"ProfId1",'s.siret'=>"ProfId2",'s.ape'=>"ProfId3",'s.idprof4'=>"ProfId4",'s.tva_intra'=>"VATIntraShort",'s.capital'=>"Capital",'s.note_private'=>"NotePrivate",'s.note_public'=>"NotePublic",'s.fk_typent'=>"ThirdPartyType",'s.fk_effectif'=>"Staff","s.fk_forme_juridique"=>"JuridicalStatus",'s.fk_prospectlevel'=>'ProspectLevel','s.fk_stcomm'=>'ProspectStatus','s.default_lang'=>'DefaultLanguage','s.barcode'=>'BarCode','s.datec'=>"DateCreation"); // Add extra fields $sql="SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'societe' AND entity = ".$conf->entity; $resql=$this->db->query($sql); From 3816e0fe1485bdbe73cdf29b340a5c40ebf0e749 Mon Sep 17 00:00:00 2001 From: Juanjo Menent Date: Mon, 14 Jul 2014 19:39:08 +0200 Subject: [PATCH 194/258] Fix: Import ProfId1 to siren and ProfId2 to siret --- ChangeLog | 1 + 1 file changed, 1 insertion(+) diff --git a/ChangeLog b/ChangeLog index 502cbc40536..666a9ffd68a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -45,6 +45,7 @@ Fix: [ bug #1484 ] BILL_SUPPLIER_PAYED trigger action does not intercept failure Fix: [ bug #1482 ] Several supplier invoice triggers do not show trigger error messages Fix: [ bug #1486 ] LINEBILL_SUPPLIER_CREATE and LINEBILL_SUPPLIER_UPDATE triggers do not intercept trigger action Fix: [ bug #1522 ] Element list into associate object into project are no more filterd by project thirdparty +Fix: Import ProfId1 to siren and ProfId2 to siret ***** ChangeLog for 3.5.3 compared to 3.5.2 ***** Fix: Error on field accountancy code for export profile of invoices. From f8b5bac05c4e632e7e37be2e75c551cd93155c8b Mon Sep 17 00:00:00 2001 From: Juanjo Menent Date: Mon, 14 Jul 2014 19:38:00 +0200 Subject: [PATCH 195/258] Fix: Import ProfId1 to siren and ProfId2 to siret --- htdocs/core/modules/modSociete.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/modules/modSociete.class.php b/htdocs/core/modules/modSociete.class.php index 5284f5ef55b..4367aae3789 100644 --- a/htdocs/core/modules/modSociete.class.php +++ b/htdocs/core/modules/modSociete.class.php @@ -4,7 +4,7 @@ * Copyright (C) 2004 Sebastien Di Cintio * Copyright (C) 2004 Benoit Mortier * Copyright (C) 2005-2013 Regis Houssin - * Copyright (C) 2012-2013 Juanjo Menent + * Copyright (C) 2012-2014 Juanjo Menent * * 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 @@ -382,7 +382,7 @@ class modSociete extends DolibarrModules $this->import_icon[$r]='company'; $this->import_entities_array[$r]=array(); // We define here only fields that use another icon that the one defined into import_icon $this->import_tables_array[$r]=array('s'=>MAIN_DB_PREFIX.'societe','extra'=>MAIN_DB_PREFIX.'societe_extrafields'); // List of tables to insert into (insert done in same order) - $this->import_fields_array[$r]=array('s.nom'=>"Name*",'s.status'=>"Status",'s.client'=>"Customer*",'s.fournisseur'=>"Supplier*",'s.code_client'=>"CustomerCode",'s.code_fournisseur'=>"SupplierCode",'s.code_compta'=>"CustomerAccountancyCode",'s.code_compta_fournisseur'=>"SupplierAccountancyCode",'s.address'=>"Address",'s.zip'=>"Zip",'s.town'=>"Town",'s.fk_departement'=>"StateId",'s.fk_pays'=>"CountryCode",'s.phone'=>"Phone",'s.fax'=>"Fax",'s.url'=>"Url",'s.email'=>"Email",'s.siret'=>"ProfId1",'s.siren'=>"ProfId2",'s.ape'=>"ProfId3",'s.idprof4'=>"ProfId4",'s.tva_intra'=>"VATIntraShort",'s.capital'=>"Capital",'s.note_private'=>"NotePrivate",'s.note_public'=>"NotePublic",'s.fk_typent'=>"ThirdPartyType",'s.fk_effectif'=>"Staff","s.fk_forme_juridique"=>"JuridicalStatus",'s.fk_prospectlevel'=>'ProspectLevel','s.fk_stcomm'=>'ProspectStatus','s.default_lang'=>'DefaultLanguage','s.barcode'=>'BarCode','s.datec'=>"DateCreation"); + $this->import_fields_array[$r]=array('s.nom'=>"Name*",'s.status'=>"Status",'s.client'=>"Customer*",'s.fournisseur'=>"Supplier*",'s.code_client'=>"CustomerCode",'s.code_fournisseur'=>"SupplierCode",'s.code_compta'=>"CustomerAccountancyCode",'s.code_compta_fournisseur'=>"SupplierAccountancyCode",'s.address'=>"Address",'s.zip'=>"Zip",'s.town'=>"Town",'s.fk_departement'=>"StateId",'s.fk_pays'=>"CountryCode",'s.phone'=>"Phone",'s.fax'=>"Fax",'s.url'=>"Url",'s.email'=>"Email",'s.siren'=>"ProfId1",'s.siret'=>"ProfId2",'s.ape'=>"ProfId3",'s.idprof4'=>"ProfId4",'s.tva_intra'=>"VATIntraShort",'s.capital'=>"Capital",'s.note_private'=>"NotePrivate",'s.note_public'=>"NotePublic",'s.fk_typent'=>"ThirdPartyType",'s.fk_effectif'=>"Staff","s.fk_forme_juridique"=>"JuridicalStatus",'s.fk_prospectlevel'=>'ProspectLevel','s.fk_stcomm'=>'ProspectStatus','s.default_lang'=>'DefaultLanguage','s.barcode'=>'BarCode','s.datec'=>"DateCreation"); // Add extra fields $sql="SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'societe' AND entity = ".$conf->entity; $resql=$this->db->query($sql); From 3a8835892e9bf212d7bacbe939f47e26842b0019 Mon Sep 17 00:00:00 2001 From: Juanjo Menent Date: Mon, 14 Jul 2014 19:42:54 +0200 Subject: [PATCH 196/258] Fix: Import ProfId1 to siren and ProfId2 to siret Conflicts: ChangeLog --- ChangeLog | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ChangeLog b/ChangeLog index b7fff144efe..9631016c06d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -154,6 +154,8 @@ Fix: [ bug #1461 ] LINEORDER_SUPPLIER_CREATE does not intercept supplier order l Fix: [ bug #1484 ] BILL_SUPPLIER_PAYED trigger action does not intercept failure under some circumstances Fix: [ bug #1482 ] Several supplier invoice triggers do not show trigger error messages Fix: [ bug #1486 ] LINEBILL_SUPPLIER_CREATE and LINEBILL_SUPPLIER_UPDATE triggers do not intercept trigger action +Fix: [ bug #1522 ] Element list into associate object into project are no more filterd by project thirdparty +Fix: Import ProfId1 to siren and ProfId2 to siret ***** ChangeLog for 3.5.3 compared to 3.5.2 ***** Fix: Error on field accountancy code for export profile of invoices. From 9410b1847367074db6a4df309b34a1d0234374bf Mon Sep 17 00:00:00 2001 From: Juanjo Menent Date: Mon, 14 Jul 2014 19:38:00 +0200 Subject: [PATCH 197/258] Fix: Import ProfId1 to siren and ProfId2 to siret --- htdocs/core/modules/modSociete.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/modules/modSociete.class.php b/htdocs/core/modules/modSociete.class.php index ee48e4d7ff7..746046cb3da 100644 --- a/htdocs/core/modules/modSociete.class.php +++ b/htdocs/core/modules/modSociete.class.php @@ -4,7 +4,7 @@ * Copyright (C) 2004 Sebastien Di Cintio * Copyright (C) 2004 Benoit Mortier * Copyright (C) 2005-2013 Regis Houssin - * Copyright (C) 2012-2013 Juanjo Menent + * Copyright (C) 2012-2014 Juanjo Menent * * 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 @@ -382,7 +382,7 @@ class modSociete extends DolibarrModules $this->import_icon[$r]='company'; $this->import_entities_array[$r]=array(); // We define here only fields that use another icon that the one defined into import_icon $this->import_tables_array[$r]=array('s'=>MAIN_DB_PREFIX.'societe','extra'=>MAIN_DB_PREFIX.'societe_extrafields'); // List of tables to insert into (insert done in same order) - $this->import_fields_array[$r]=array('s.nom'=>"Name*",'s.status'=>"Status",'s.client'=>"Customer*",'s.fournisseur'=>"Supplier*",'s.code_client'=>"CustomerCode",'s.code_fournisseur'=>"SupplierCode",'s.code_compta'=>"CustomerAccountancyCode",'s.code_compta_fournisseur'=>"SupplierAccountancyCode",'s.address'=>"Address",'s.zip'=>"Zip",'s.town'=>"Town",'s.fk_departement'=>"StateId",'s.fk_pays'=>"CountryCode",'s.phone'=>"Phone",'s.fax'=>"Fax",'s.url'=>"Url",'s.email'=>"Email",'s.siret'=>"ProfId1",'s.siren'=>"ProfId2",'s.ape'=>"ProfId3",'s.idprof4'=>"ProfId4",'s.tva_intra'=>"VATIntraShort",'s.capital'=>"Capital",'s.note_private'=>"NotePrivate",'s.note_public'=>"NotePublic",'s.fk_typent'=>"ThirdPartyType",'s.fk_effectif'=>"Staff","s.fk_forme_juridique"=>"JuridicalStatus",'s.fk_prospectlevel'=>'ProspectLevel','s.fk_stcomm'=>'ProspectStatus','s.default_lang'=>'DefaultLanguage','s.barcode'=>'BarCode','s.datec'=>"DateCreation"); + $this->import_fields_array[$r]=array('s.nom'=>"Name*",'s.status'=>"Status",'s.client'=>"Customer*",'s.fournisseur'=>"Supplier*",'s.code_client'=>"CustomerCode",'s.code_fournisseur'=>"SupplierCode",'s.code_compta'=>"CustomerAccountancyCode",'s.code_compta_fournisseur'=>"SupplierAccountancyCode",'s.address'=>"Address",'s.zip'=>"Zip",'s.town'=>"Town",'s.fk_departement'=>"StateId",'s.fk_pays'=>"CountryCode",'s.phone'=>"Phone",'s.fax'=>"Fax",'s.url'=>"Url",'s.email'=>"Email",'s.siren'=>"ProfId1",'s.siret'=>"ProfId2",'s.ape'=>"ProfId3",'s.idprof4'=>"ProfId4",'s.tva_intra'=>"VATIntraShort",'s.capital'=>"Capital",'s.note_private'=>"NotePrivate",'s.note_public'=>"NotePublic",'s.fk_typent'=>"ThirdPartyType",'s.fk_effectif'=>"Staff","s.fk_forme_juridique"=>"JuridicalStatus",'s.fk_prospectlevel'=>'ProspectLevel','s.fk_stcomm'=>'ProspectStatus','s.default_lang'=>'DefaultLanguage','s.barcode'=>'BarCode','s.datec'=>"DateCreation"); // Add extra fields $sql="SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'societe' AND entity = ".$conf->entity; $resql=$this->db->query($sql); From ccf32636f8cb7cc57a2322616a3abf659605afff Mon Sep 17 00:00:00 2001 From: Juanjo Menent Date: Mon, 14 Jul 2014 19:42:54 +0200 Subject: [PATCH 198/258] Fix: Import ProfId1 to siren and ProfId2 to siret Conflicts: ChangeLog --- ChangeLog | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ChangeLog b/ChangeLog index 0621064fb3c..40ad4d41945 100644 --- a/ChangeLog +++ b/ChangeLog @@ -211,6 +211,8 @@ Fix: [ bug #1461 ] LINEORDER_SUPPLIER_CREATE does not intercept supplier order l Fix: [ bug #1484 ] BILL_SUPPLIER_PAYED trigger action does not intercept failure under some circumstances Fix: [ bug #1482 ] Several supplier invoice triggers do not show trigger error messages Fix: [ bug #1486 ] LINEBILL_SUPPLIER_CREATE and LINEBILL_SUPPLIER_UPDATE triggers do not intercept trigger action +Fix: [ bug #1522 ] Element list into associate object into project are no more filterd by project thirdparty +Fix: Import ProfId1 to siren and ProfId2 to siret ***** ChangeLog for 3.5.3 compared to 3.5.2 ***** Fix: Error on field accountancy code for export profile of invoices. From dda17f4082784fcbc8a277a65bb34a14685613d1 Mon Sep 17 00:00:00 2001 From: Cedric Date: Sat, 12 Jul 2014 16:22:49 +0200 Subject: [PATCH 199/258] Security fix --- htdocs/product/stock/fiche.php | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/htdocs/product/stock/fiche.php b/htdocs/product/stock/fiche.php index ecc29a55927..874b082ceae 100644 --- a/htdocs/product/stock/fiche.php +++ b/htdocs/product/stock/fiche.php @@ -39,6 +39,7 @@ $action=GETPOST('action'); $sortfield = GETPOST("sortfield",'alpha'); $sortorder = GETPOST("sortorder",'alpha'); +$id = GETPOST("id",'int'); if (! $sortfield) $sortfield="p.ref"; if (! $sortorder) $sortorder="DESC"; @@ -109,7 +110,7 @@ if ($action == 'confirm_delete' && $_REQUEST["confirm"] == 'yes' && $user->right if ($action == 'update' && $_POST["cancel"] <> $langs->trans("Cancel")) { $object = new Entrepot($db); - if ($object->fetch($_POST["id"])) + if ($object->fetch($id)) { $object->libelle = $_POST["libelle"]; $object->description = $_POST["desc"]; @@ -120,23 +121,20 @@ if ($action == 'update' && $_POST["cancel"] <> $langs->trans("Cancel")) $object->town = $_POST["town"]; $object->country_id = $_POST["country_id"]; - if ( $object->update($_POST["id"], $user) > 0) + if ( $object->update($id, $user) > 0) { $action = ''; - $_GET["id"] = $_POST["id"]; //$mesg = '
Fiche mise a jour
'; } else { $action = 'edit'; - $_GET["id"] = $_POST["id"]; $mesg = '
'.$object->error.'
'; } } else { $action = 'edit'; - $_GET["id"] = $_POST["id"]; $mesg = '
'.$object->error.'
'; } } @@ -144,7 +142,6 @@ if ($action == 'update' && $_POST["cancel"] <> $langs->trans("Cancel")) if ($_POST["cancel"] == $langs->trans("Cancel")) { $action = ''; - $_GET["id"] = $_POST["id"]; } @@ -219,12 +216,13 @@ if ($action == 'create') } else { - if ($_GET["id"]) + $id=GETPOST("id",'int'); + if ($id) { dol_htmloutput_mesg($mesg); $object = new Entrepot($db); - $result = $object->fetch($_GET["id"]); + $result = $object->fetch($id); if ($result < 0) { dol_print_error($db); @@ -368,13 +366,13 @@ else print '
  
'; - $tmp=explode('.',$file['name']); - $minifile=$tmp[0].'_mini.'.strtolower($tmp[1]); // Thumbs are created with filename in lower case + $minifile=$fileinfo['filename'].'_mini.'.$fileinfo['extension']; // Thumbs are created with filename in lower case if (image_format_supported($file['name']) > 0) print ''; else print ' '; print ''; $product_static->type=$objp->fk_product_type; $product_static->id=$objp->rowid; $product_static->ref=$objp->ref; $product_static->libelle=$objp->label; $text=$product_static->getNomUrl(1); - $text.= ' - '.$objp->label; - print "".$product_static->getNomUrl(1)."".$product_static->getNomUrl(1)."".price($pv, null, null, null, null, $rounding)."".price($pa, null, null, null, null, $rounding)."
'; print ""; - print_liste_field_titre($langs->trans("Product"),"", "p.ref","&id=".$_GET['id'],"","",$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Label"),"", "p.label","&id=".$_GET['id'],"","",$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Units"),"", "ps.reel","&id=".$_GET['id'],"",'align="right"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("AverageUnitPricePMPShort"),"", "ps.pmp","&id=".$_GET['id'],"",'align="right"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("EstimatedStockValueShort"),"", "","&id=".$_GET['id'],"",'align="right"',$sortfield,$sortorder); - if (empty($conf->global->PRODUIT_MULTIPRICES)) print_liste_field_titre($langs->trans("SellPriceMin"),"", "p.price","&id=".$_GET['id'],"",'align="right"',$sortfield,$sortorder); - if (empty($conf->global->PRODUIT_MULTIPRICES)) print_liste_field_titre($langs->trans("EstimatedStockValueSellShort"),"", "","&id=".$_GET['id'],"",'align="right"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Product"),"", "p.ref","&id=".$id,"","",$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Label"),"", "p.label","&id=".$id,"","",$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Units"),"", "ps.reel","&id=".$id,"",'align="right"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("AverageUnitPricePMPShort"),"", "ps.pmp","&id=".$id,"",'align="right"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("EstimatedStockValueShort"),"", "","&id=".$id,"",'align="right"',$sortfield,$sortorder); + if (empty($conf->global->PRODUIT_MULTIPRICES)) print_liste_field_titre($langs->trans("SellPriceMin"),"", "p.price","&id=".$id,"",'align="right"',$sortfield,$sortorder); + if (empty($conf->global->PRODUIT_MULTIPRICES)) print_liste_field_titre($langs->trans("EstimatedStockValueSellShort"),"", "","&id=".$id,"",'align="right"',$sortfield,$sortorder); if ($user->rights->stock->mouvement->creer) print ''; if ($user->rights->stock->creer) print ''; print ""; From 769c9a9b66f6643716b96888ef625a9f16ee039e Mon Sep 17 00:00:00 2001 From: Cedric Date: Tue, 15 Jul 2014 11:22:16 +0200 Subject: [PATCH 200/258] FIX stock inconsistency when activating batch management on product which already have stock --- htdocs/langs/en_US/productbatch.lang | 1 + htdocs/langs/fr_FR/productbatch.lang | 4 ++- htdocs/product/class/product.class.php | 34 ++++++++++++++++++++++++++ 3 files changed, 38 insertions(+), 1 deletion(-) diff --git a/htdocs/langs/en_US/productbatch.lang b/htdocs/langs/en_US/productbatch.lang index 8b93ba92fb8..07fb45985d5 100644 --- a/htdocs/langs/en_US/productbatch.lang +++ b/htdocs/langs/en_US/productbatch.lang @@ -16,3 +16,4 @@ printEatby= Eat-by: %s printSellby= Sell-by: %s printQty= Qty: %d AddDispatchBatchLine=Add a line for Shelf Life dispatching +BatchDefaultNumber= Undefined \ No newline at end of file diff --git a/htdocs/langs/fr_FR/productbatch.lang b/htdocs/langs/fr_FR/productbatch.lang index 488e1f2fbb9..68e76dca46b 100644 --- a/htdocs/langs/fr_FR/productbatch.lang +++ b/htdocs/langs/fr_FR/productbatch.lang @@ -14,4 +14,6 @@ DetailBatchFormat= C:%s UO: %s LOT: %s (Qté : %d) printBatch= Lot: %s printEatby= DLC: %s printSellby= DLUO: %s -printQty= Qté: %d \ No newline at end of file +printQty= Qté: %d +AddDispatchBatchLine=Ajouter une ligne de dispatch +BatchDefaultNumber= Indéfini \ No newline at end of file diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index 32d96ec60fc..cc824bce3c6 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -589,6 +589,39 @@ class Product extends CommonObject if ($result >= 0) { + if (empty($this->oldcopy)) + { + $org=new self($db); + $org->fetch($this->id); + $this->oldcopy=$org; + } + // test if batch management is activated on existing product + if ($this->hasbatch() && !$this->oldcopy->hasbatch()) + { + $this->load_stock(); + foreach ($this->stock_warehouse as $idW => $ObjW) + { + $qty_batch = 0; + foreach ($ObjW->detail_batch as $detail) + { + $qty_batch += $detail->qty; + } + // Quantities in batch details are not same same as stock quantity + // So we add a default batch record + if ($ObjW->real <> $qty_batch) + { + $ObjBatch = new Productbatch($this->db); + $ObjBatch->batch = $langs->trans('BatchDefaultNumber'); + $ObjBatch->qty = $ObjW->real - $qty_batch; + $ObjBatch->fk_product_stock = $ObjW->id; + if ($ObjBatch->create($user,1) < 0) + { + $error++; + $this->errors=$ObjBatch->errors; + } + } + } + } // For automatic creation if ($this->barcode == -1) $this->barcode = $this->get_barcode($this,$this->barcode_type_code); @@ -2918,6 +2951,7 @@ class Product extends CommonObject $this->stock_warehouse[$row->fk_entrepot] = new stdClass(); $this->stock_warehouse[$row->fk_entrepot]->real = $row->reel; $this->stock_warehouse[$row->fk_entrepot]->pmp = $row->pmp; + $this->stock_warehouse[$row->fk_entrepot]->id = $row->rowid; if ($this->hasbatch()) $this->stock_warehouse[$row->fk_entrepot]->detail_batch=Productbatch::findAll($this->db,$row->rowid,1); $this->stock_reel+=$row->reel; $i++; From ad4512cb24de7df7625f43896225c8aa8f63b0bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Tue, 15 Jul 2014 17:18:41 +0200 Subject: [PATCH 201/258] Avoiding include in case of unexisting file --- htdocs/core/lib/functions.lib.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 78326ee3bb7..eb2cc15de15 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -236,11 +236,15 @@ function dol_getprefix() * * @param string $relpath Relative path to file (Ie: mydir/myfile, ../myfile, ...) * @param string $classname Class name - * @return int false if include fails. + * @return bool */ function dol_include_once($relpath, $classname='') { - global $conf,$langs,$user,$mysoc; // Other global var must be retreived with $GLOBALS['var'] + + if (!file_exists($relpath)) { + dol_syslog('functions::dol_include_once Tried to load unexisting file: '.$relpath, LOG_ERR); + return false; + } if (! empty($classname) && ! class_exists($classname)) { return include dol_buildpath($relpath); From f38ab469289f4b58255f23c020f54a591c65bf6a Mon Sep 17 00:00:00 2001 From: Cedric Date: Tue, 15 Jul 2014 19:02:43 +0200 Subject: [PATCH 202/258] correction typo --- htdocs/product/class/product.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index cc824bce3c6..7a77f308509 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -591,7 +591,7 @@ class Product extends CommonObject { if (empty($this->oldcopy)) { - $org=new self($db); + $org=new self($this->db); $org->fetch($this->id); $this->oldcopy=$org; } From 0cb11a537d35a336956e94536f6d011f70512014 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 15 Jul 2014 23:27:11 +0200 Subject: [PATCH 203/258] Fix: IP address of user was lost into paypal confirm email --- htdocs/paybox/lib/paybox.lib.php | 23 ----------------------- htdocs/paypal/lib/paypal.lib.php | 2 +- 2 files changed, 1 insertion(+), 24 deletions(-) diff --git a/htdocs/paybox/lib/paybox.lib.php b/htdocs/paybox/lib/paybox.lib.php index f56367c9a36..09bacc3764f 100644 --- a/htdocs/paybox/lib/paybox.lib.php +++ b/htdocs/paybox/lib/paybox.lib.php @@ -183,27 +183,6 @@ function print_paybox_redirect($PRICE,$CURRENCY,$EMAIL,$urlok,$urlko,$TAG) // Formulaire pour module Paybox print ''."\n"; - // For Paybox V1 (IBS_xxx) - /* - print ''."\n"; - print ''."\n"; - print ''."\n"; - print ''."\n"; - print ''."\n"; - print ''."\n"; - print ''."\n"; - print ''."\n"; - print ''."\n"; - print ''."\n"; - print ''."\n"; - print ''."\n"; - print ''."\n"; - print ''."\n"; - print ''."\n"; - print ''."\n"; - print ''."\n"; - */ - // For Paybox V2 (PBX_xxx) print ''."\n"; print ''."\n"; @@ -228,8 +207,6 @@ function print_paybox_redirect($PRICE,$CURRENCY,$EMAIL,$urlok,$urlko,$TAG) print ''."\n"; - // Formulaire pour module Paybox v2 (PBX_xxx) - print "\n"; print ''."\n"; } - - if ($mesg) print $mesg; - /* * Barre d'action */ @@ -1438,8 +1431,6 @@ if ($step == 5 && $datatoimport) } print ''; } - - if ($mesg) print $mesg; } @@ -1679,8 +1670,6 @@ if ($step == 6 && $datatoimport) print $langs->trans("FileWasImported",$importid).'
'; print $langs->trans("YouCanUseImportIdToFindRecord",$importid).'
'; print ''; - - if ($mesg) print $mesg; } diff --git a/htdocs/paybox/admin/paybox.php b/htdocs/paybox/admin/paybox.php index 7eefafb9c8c..30e02591190 100644 --- a/htdocs/paybox/admin/paybox.php +++ b/htdocs/paybox/admin/paybox.php @@ -67,7 +67,7 @@ if ($action == 'setvalue' && $user->admin) if (! $error) { $db->commit(); - $mesg='
'.$langs->trans("SetupSaved").'
'; + setEventMessage($langs->trans("SetupSaved")); } else { @@ -227,8 +227,6 @@ if (! empty($conf->adherent->enabled)) print "
"; print info_admin($langs->trans("YouCanAddTagOnUrl")); -dol_htmloutput_mesg($mesg); - $db->close(); dol_fiche_end(); llxFooter(); diff --git a/htdocs/product/fournisseurs.php b/htdocs/product/fournisseurs.php index 527615cc7c4..037bb2b1f8b 100644 --- a/htdocs/product/fournisseurs.php +++ b/htdocs/product/fournisseurs.php @@ -43,7 +43,7 @@ $rowid=GETPOST('rowid','int'); $action=GETPOST('action', 'alpha'); $socid=GETPOST('socid', 'int'); $backtopage=GETPOST('backtopage','alpha'); -$error=0; $mesg = ''; +$error=0; // If socid provided by ajax company selector if (! empty($_REQUEST['search_fourn_id'])) @@ -92,7 +92,7 @@ if ($action == 'remove_pf') { $result=$product->remove_product_fournisseur_price($rowid); $action = ''; - $mesg = '
'.$langs->trans("PriceRemoved").'.
'; + setEventMessage($langs->trans("PriceRemoved")); } } } @@ -112,27 +112,27 @@ if ($action == 'updateprice' && GETPOST('cancel') <> $langs->trans("Cancel")) if ($tva_tx == '') { $error++; - $mesg='
'.$langs->trans("ErrorFieldRequired",$langs->transnoentities("VATRateForSupplierProduct")).'
'; + setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentities("VATRateForSupplierProduct")), 'errors'); } if (empty($quantity)) { $error++; - $mesg='
'.$langs->trans("ErrorFieldRequired",$langs->transnoentities("Qty")).'
'; + setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentities("Qty")), 'errors'); } if (empty($ref_fourn)) { $error++; - $mesg='
'.$langs->trans("ErrorFieldRequired",$langs->transnoentities("RefSupplier")).'
'; + setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentities("RefSupplier")), 'errors'); } if ($id_fourn <= 0) { $error++; - $mesg='
'.$langs->trans("ErrorFieldRequired",$langs->transnoentities("Supplier")).'
'; + setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentities("Supplier")), 'errors'); } if ($_POST["price"] < 0 || $_POST["price"] == '') { $error++; - $mesg='
'.$langs->trans("ErrorFieldRequired",$langs->transnoentities("Price")).'
'; + setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentities("Price")), 'errors'); } $product = new ProductFournisseur($db); @@ -140,7 +140,7 @@ if ($action == 'updateprice' && GETPOST('cancel') <> $langs->trans("Cancel")) if ($result <= 0) { $error++; - $mesg=$product->error; + setEventMessage($product->error, 'errors'); } if (! $error) @@ -157,12 +157,12 @@ if ($action == 'updateprice' && GETPOST('cancel') <> $langs->trans("Cancel")) $product->fetch($product->product_id_already_linked); $productLink = $product->getNomUrl(1,'supplier'); - $mesg='
'.$langs->trans("ReferenceSupplierIsAlreadyAssociatedWithAProduct",$productLink).'
'; + setEventMessage($langs->trans("ReferenceSupplierIsAlreadyAssociatedWithAProduct",$productLink), 'errors'); } else if ($ret < 0) { $error++; - $mesg='
'.$product->error.'
'; + setEventMessage($product->error, 'errors'); } } @@ -177,7 +177,7 @@ if ($action == 'updateprice' && GETPOST('cancel') <> $langs->trans("Cancel")) if ($ret < 0) { $error++; - $mesg='
'.$product->error.'
'; + setEventMessage($product->error, 'errors'); } } @@ -264,10 +264,6 @@ if ($id || $ref) print "\n"; - - dol_htmloutput_mesg($mesg); - - // Form to add or update a price if (($action == 'add_price' || $action == 'updateprice' ) && ($user->rights->produit->creer || $user->rights->service->creer)) { diff --git a/htdocs/product/price.php b/htdocs/product/price.php index f5db524ed27..9c0597ec0f6 100644 --- a/htdocs/product/price.php +++ b/htdocs/product/price.php @@ -94,15 +94,16 @@ if ($action == 'update_price' && ! $_POST ["cancel"] && ($user->rights->produit- if ($object->updatePrice($newprice, $newpricebase, $user, $newvat, $newprice_min, $level, $newnpr, $newpsq) > 0) { $action = ''; - $mesg = '
' . $langs->trans("RecordSaved") . '
'; + setEventMessage($langs->trans("RecordSaved")); } else { $action = 'edit_price'; - $mesg = '
' . $object->error . '
'; + setEventMessage($object->error, 'errors'); } } else if ($action == 'delete' && $user->rights->produit->supprimer) { $result = $object->log_price_delete($user, $_GET ["lineid"]); - if ($result < 0) - $mesg = '
' . $object->error . '
'; + if ($result < 0) { + setEventMessage($object->error, 'errors'); + } } /** @@ -136,11 +137,11 @@ if ($action == 'update_price_by_qty') { // Ajout / Mise à jour d'un prix par qu if (empty($quantity)) { $error ++; - $mesg = '
' . $langs->trans("ErrorFieldRequired", $langs->transnoentities("Qty")) . '
'; + setEventMessage($langs->trans("ErrorFieldRequired", $langs->transnoentities("Qty")), 'errors'); } if (empty($newprice)) { $error ++; - $mesg = '
' . $langs->trans("ErrorFieldRequired", $langs->transnoentities("Price")) . '
'; + setEventMessage($langs->trans("ErrorFieldRequired", $langs->transnoentities("Price")), 'errors'); } if (! $error) { // Calcul du prix HT et du prix unitaire @@ -547,10 +548,6 @@ print "
  
\n"; print "\n"; -if (! empty($mesg)) { - dol_htmloutput_mesg($mesg); -} - /* ************************************************************************** */ /* */ /* Barre d'action */ diff --git a/htdocs/product/stock/fiche.php b/htdocs/product/stock/fiche.php index 874b082ceae..86e930d8cf1 100644 --- a/htdocs/product/stock/fiche.php +++ b/htdocs/product/stock/fiche.php @@ -43,8 +43,6 @@ $id = GETPOST("id",'int'); if (! $sortfield) $sortfield="p.ref"; if (! $sortorder) $sortorder="DESC"; -$mesg = ''; - // Security check $result=restrictedArea($user,'stock'); @@ -80,10 +78,10 @@ if ($action == 'add' && $user->rights->stock->creer) } $action = 'create'; - $mesg='
'.$object->error.'
'; + setEventMessage($object->error, 'errors'); } else { - $mesg='
'.$langs->trans("ErrorWarehouseRefRequired").'
'; + setEventMessage($langs->trans("ErrorWarehouseRefRequired"), 'errors'); $action="create"; // Force retour sur page creation } } @@ -101,7 +99,7 @@ if ($action == 'confirm_delete' && $_REQUEST["confirm"] == 'yes' && $user->right } else { - $mesg='
'.$object->error.'
'; + setEventMessage($object->error, 'errors'); $action=''; } } @@ -124,18 +122,17 @@ if ($action == 'update' && $_POST["cancel"] <> $langs->trans("Cancel")) if ( $object->update($id, $user) > 0) { $action = ''; - //$mesg = '
Fiche mise a jour
'; } else { $action = 'edit'; - $mesg = '
'.$object->error.'
'; + setEventMessage($object->error, 'errors'); } } else { $action = 'edit'; - $mesg = '
'.$object->error.'
'; + setEventMessage($object->error, 'errors'); } } @@ -167,8 +164,6 @@ if ($action == 'create') print ''; print ''."\n"; - dol_htmloutput_mesg($mesg); - print ''; // Ref @@ -219,8 +214,6 @@ else $id=GETPOST("id",'int'); if ($id) { - dol_htmloutput_mesg($mesg); - $object = new Entrepot($db); $result = $object->fetch($id); if ($result < 0) @@ -496,7 +489,7 @@ else */ if (($action == 'edit' || $action == 're-edit') && 1) { - print_fiche_titre($langs->trans("WarehouseEdit"), $mesg); + $langs->trans("WarehouseEdit"); print ''; print ''; diff --git a/htdocs/user/fiche.php b/htdocs/user/fiche.php index 3a5827904f2..5251f6bc750 100644 --- a/htdocs/user/fiche.php +++ b/htdocs/user/fiche.php @@ -45,7 +45,6 @@ $action = GETPOST('action','alpha'); $confirm = GETPOST('confirm','alpha'); $subaction = GETPOST('subaction','alpha'); $group = GETPOST("group","int",3); -$message=''; // Define value to know what current user can do on users $canadduser=(! empty($user->admin) || $user->rights->user->user->creer); @@ -110,6 +109,8 @@ if ($action == 'confirm_disable' && $confirm == "yes" && $candisableuser) } if ($action == 'confirm_enable' && $confirm == "yes" && $candisableuser) { + $error = 0; + if ($id <> $user->id) { $object->fetch($id); @@ -119,11 +120,12 @@ if ($action == 'confirm_enable' && $confirm == "yes" && $candisableuser) $nb = $object->getNbOfUsers("active"); if ($nb >= $conf->file->main_limit_users) { - $message='
'.$langs->trans("YourQuotaOfUsersIsReached").'
'; + $error++; + setEventMessage($langs->trans("YourQuotaOfUsersIsReached"), 'errors'); } } - if (! $message) + if (! $error) { $object->setstatus(1); header("Location: ".$_SERVER['PHP_SELF'].'?id='.$id); @@ -142,7 +144,7 @@ if ($action == 'confirm_delete' && $confirm == "yes" && $candisableuser) if ($result < 0) { $langs->load("errors"); - $message='
'.$langs->trans("ErrorUserCannotBeDelete").'
'; + setEventMessage($langs->trans("ErrorUserCannotBeDelete"), 'errors'); } else { @@ -155,14 +157,18 @@ if ($action == 'confirm_delete' && $confirm == "yes" && $candisableuser) // Action ajout user if ($action == 'add' && $canadduser) { + $error = 0; + if (! $_POST["lastname"]) { - $message='
'.$langs->trans("NameNotDefined").'
'; + $error++; + setEventMessage($langs->trans("NameNotDefined"), 'errors'); $action="create"; // Go back to create page } if (! $_POST["login"]) { - $message='
'.$langs->trans("LoginNotDefined").'
'; + $error++; + setEventMessage($langs->trans("LoginNotDefined"), 'errors'); $action="create"; // Go back to create page } @@ -171,13 +177,13 @@ if ($action == 'add' && $canadduser) $nb = $object->getNbOfUsers("active"); if ($nb >= $conf->file->main_limit_users) { - $message='
'.$langs->trans("YourQuotaOfUsersIsReached").'
'; + $error++; + setEventMessage($langs->trans("YourQuotaOfUsersIsReached"), 'errors'); $action="create"; // Go back to create page } } - if (! $message) - { + if (!$error) { $object->lastname = GETPOST("lastname",'alpha'); $object->firstname = GETPOST("firstname",'alpha'); $object->login = GETPOST("login",'alpha'); @@ -266,7 +272,7 @@ if (($action == 'addgroup' || $action == 'removegroup') && $caneditfield) } else { - $message.=$object->error; + setEventMessage($object->error, 'errors'); } } } @@ -281,13 +287,13 @@ if ($action == 'update' && ! $_POST["cancel"]) if (! $_POST["lastname"]) { - $message='
'.$langs->trans("NameNotDefined").'
'; + setEventMessage($langs->trans("NameNotDefined"), 'errors'); $action="edit"; // Go back to create page $error++; } if (! $_POST["login"]) { - $message='
'.$langs->trans("LoginNotDefined").'
'; + setEventMessage($langs->trans("LoginNotDefined"), 'errors'); $action="edit"; // Go back to create page $error++; } @@ -304,7 +310,7 @@ if ($action == 'update' && ! $_POST["cancel"]) $result=$tmpuser->fetch(0, GETPOST("login")); if ($result > 0) { - $message='
'.$langs->trans("ErrorLoginAlreadyExists").'
'; + setEventMessage($langs->trans("ErrorLoginAlreadyExists"), 'errors'); $action="edit"; // Go back to create page $error++; } @@ -367,11 +373,11 @@ if ($action == 'update' && ! $_POST["cancel"]) if ($db->errno() == 'DB_ERROR_RECORD_ALREADY_EXISTS') { $langs->load("errors"); - $message.='
'.$langs->trans("ErrorLoginAlreadyExists",$object->login).'
'; + setEventMessage($langs->trans("ErrorLoginAlreadyExists",$object->login), 'errors'); } else { - $message.='
'.$object->error.'
'; + setEventMessage($object->error, 'errors'); } } @@ -395,12 +401,12 @@ if ($action == 'update' && ! $_POST["cancel"]) $sql.= " SET fk_socpeople=NULL, fk_societe=NULL"; $sql.= " WHERE rowid=".$object->id; } + dol_syslog("fiche::update", LOG_DEBUG); $resql=$db->query($sql); - dol_syslog("fiche::update", LOG_DEBUG); if (! $resql) { $error++; - $message.='
'.$db->lasterror().'
'; + setEventMessage($db->lasterror(), 'errors'); } } @@ -427,7 +433,7 @@ if ($action == 'update' && ! $_POST["cancel"]) if (! $result > 0) { - $message .= '
'.$langs->trans("ErrorFailedToSaveFile").'
'; + setEventMessage($langs->trans("ErrorFailedToSaveFile"), 'errors'); } else { @@ -445,7 +451,7 @@ if ($action == 'update' && ! $_POST["cancel"]) if (! $error && ! count($object->errors)) { - $message.='
'.$langs->trans("UserModified").'
'; + setEventMessage($langs->trans("UserModified")); $db->commit(); $login=$_SESSION["dol_login"]; @@ -469,7 +475,7 @@ if ($action == 'update' && ! $_POST["cancel"]) $ret=$object->setPassword($user,$_POST["password"]); if ($ret < 0) { - $message.='
'.$object->error.'
'; + setEventMessage($object->error, 'errors'); } } } @@ -484,7 +490,7 @@ if ((($action == 'confirm_password' && $confirm == 'yes') if ($newpassword < 0) { // Echec - $message = '
'.$langs->trans("ErrorFailedToSetNewPassword").'
'; + setEventMessage($langs->trans("ErrorFailedToSetNewPassword"), 'errors'); } else { @@ -493,18 +499,16 @@ if ((($action == 'confirm_password' && $confirm == 'yes') { if ($object->send_password($user,$newpassword) > 0) { - $message = '
'.$langs->trans("PasswordChangedAndSentTo",$object->email).'
'; - //$message.=$newpassword; + setEventMessage($langs->trans("PasswordChangedAndSentTo",$object->email)); } else { - $message = '
'.$langs->trans("PasswordChangedTo",$newpassword).'
'; - $message.= '
'.$object->error.'
'; + setEventMessage($object->error, 'errors'); } } else { - $message = '
'.$langs->trans("PasswordChangedTo",$newpassword).'
'; + setEventMessage($langs->trans("PasswordChangedTo",$newpassword), 'errors'); } } } @@ -562,7 +566,7 @@ if ($action == 'adduserldap') } else { - $message='
'.$ldap->error.'
'; + setEventMessage($ldap->error, 'errors'); } } @@ -590,8 +594,6 @@ if (($action == 'create') || ($action == 'adduserldap')) print "
"; print "
"; - dol_htmloutput_mesg($message); - if (! empty($conf->ldap->enabled) && (isset($conf->global->LDAP_SYNCHRO_ACTIVE) && $conf->global->LDAP_SYNCHRO_ACTIVE == 'ldap2dolibarr')) { /* @@ -648,12 +650,12 @@ if (($action == 'create') || ($action == 'adduserldap')) } else { - $message='
'.$ldap->error.'
'; + setEventMessage($ldap->error, 'errors'); } } else { - $message='
'.$ldap->error.'
'; + setEventMessage($ldap->error, 'errors'); } // Si la liste des users est rempli, on affiche la liste deroulante @@ -977,7 +979,7 @@ else $entries = $ldap->fetch($object->login,$userSearchFilter); if (! $entries) { - $message .= $ldap->error; + setEventMessage($ldap->error, 'errors'); } $passDoNotExpire = 0; @@ -1056,8 +1058,6 @@ else print $form->formconfirm("fiche.php?id=$object->id",$langs->trans("DeleteAUser"),$langs->trans("ConfirmDeleteUser",$object->login),"confirm_delete", '', 0, 1); } - dol_htmloutput_mesg($message); - /* * Fiche en mode visu */ diff --git a/htdocs/user/group/fiche.php b/htdocs/user/group/fiche.php index 625195bfa68..f97ef35ae6e 100644 --- a/htdocs/user/group/fiche.php +++ b/htdocs/user/group/fiche.php @@ -48,7 +48,6 @@ $id=GETPOST('id', 'int'); $action=GETPOST('action', 'alpha'); $confirm=GETPOST('confirm', 'alpha'); $userid=GETPOST('user', 'int'); -$message=''; // Security check $result = restrictedArea($user, 'user', $id, 'usergroup&usergroup', 'user'); @@ -76,7 +75,7 @@ if ($action == 'confirm_delete' && $confirm == "yes") else { $langs->load("errors"); - $message = '
'.$langs->trans('ErrorForbidden').'
'; + setEventMessage($langs->trans('ErrorForbidden'), 'errors'); } } @@ -87,14 +86,10 @@ if ($action == 'add') { if ($caneditperms) { - if (! $_POST["nom"]) - { - $message='
'.$langs->trans("NameNotDefined").'
'; + if (! $_POST["nom"]) { + setEventMessage($langs->trans("NameNotDefined"), 'errors'); $action="create"; // Go back to create page - } - - if (! $message) - { + } else { $object->nom = trim($_POST["nom"]); $object->note = trim($_POST["note"]); @@ -117,7 +112,7 @@ if ($action == 'add') $db->rollback(); $langs->load("errors"); - $message='
'.$langs->trans("ErrorGroupAlreadyExists",$object->nom).'
'; + setEventMessage($langs->trans("ErrorGroupAlreadyExists",$object->nom), 'errors'); $action="create"; // Go back to create page } } @@ -125,7 +120,7 @@ if ($action == 'add') else { $langs->load("errors"); - $message = '
'.$langs->trans('ErrorForbidden').'
'; + setEventMessage($langs->trans('ErrorForbidden'), 'errors'); } } @@ -151,14 +146,14 @@ if ($action == 'adduser' || $action =='removeuser') } else { - $message.=$edituser->error; + setEventMessage($edituser->error, 'errors'); } } } else { $langs->load("errors"); - $message = '
'.$langs->trans('ErrorForbidden').'
'; + setEventMessage($langs->trans('ErrorForbidden'), 'errors'); } } @@ -183,19 +178,19 @@ if ($action == 'update') if ($ret >= 0 && ! count($object->errors)) { - $message.='
'.$langs->trans("GroupModified").'
'; + setEventMessage($langs->trans("GroupModified")); $db->commit(); } else { - $message.='
'.$object->error.'
'; + setEventMessage($object->error); $db->rollback(); } } else { $langs->load("errors"); - $message = '
'.$langs->trans('ErrorForbidden').'
'; + setEventMessage($langs->trans('ErrorForbidden')); } } @@ -214,8 +209,6 @@ if ($action == 'create') { print_fiche_titre($langs->trans("NewGroup")); - if ($message) { print $message."
"; } - print dol_set_focus('#nom'); print ''; @@ -340,9 +333,6 @@ else print "\n"; print "
\n"; - - dol_htmloutput_mesg($message); - /* * Liste des utilisateurs dans le groupe */ diff --git a/htdocs/user/group/ldap.php b/htdocs/user/group/ldap.php index cde5e764af5..c3e147620c2 100644 --- a/htdocs/user/group/ldap.php +++ b/htdocs/user/group/ldap.php @@ -56,8 +56,6 @@ $fgroup->getrights(); if ($action == 'dolibarr2ldap') { - $message=""; - $db->begin(); $ldap=new Ldap(); @@ -71,12 +69,12 @@ if ($action == 'dolibarr2ldap') if ($result >= 0) { - $message.='
'.$langs->trans("GroupSynchronized").'
'; + setEventMessage($langs->trans("GroupSynchronized")); $db->commit(); } else { - $message.='
'.$ldap->error.'
'; + setEventMessage($ldap->error); $db->rollback(); } } @@ -135,10 +133,6 @@ print "
\n"; print ''; - -dol_htmloutput_mesg($message); - - /* * Barre d'actions */ diff --git a/htdocs/user/ldap.php b/htdocs/user/ldap.php index ebf776e64aa..87a0dec31e2 100644 --- a/htdocs/user/ldap.php +++ b/htdocs/user/ldap.php @@ -52,8 +52,6 @@ $fuser->getrights(); if ($_GET["action"] == 'dolibarr2ldap') { - $message=""; - $db->begin(); $ldap=new Ldap(); @@ -67,12 +65,12 @@ if ($_GET["action"] == 'dolibarr2ldap') if ($result >= 0) { - $message.='
'.$langs->trans("UserSynchronized").'
'; + setEventMessage($langs->trans("UserSynchronized")); $db->commit(); } else { - $message.='
'.$ldap->error.'
'; + setEventMessage($ldap->error, 'errors'); $db->rollback(); } } @@ -152,10 +150,6 @@ print '
'; print ''; - -dol_htmloutput_mesg($message); - - /* * Barre d'actions */ From ac824728bc8e172d062c7afacb838e190a4a4d27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 20 Jul 2014 01:09:43 +0200 Subject: [PATCH 232/258] Migrated old error notifications to the """new""" system --- htdocs/adherents/card_subscriptions.php | 4 +- htdocs/adherents/fiche.php | 95 +++++++++++++------------ htdocs/adherents/fiche_subscription.php | 2 - htdocs/adherents/type.php | 2 - htdocs/admin/fiscalyear_card.php | 16 ++--- htdocs/admin/ldap_users.php | 2 +- htdocs/admin/limits.php | 8 +-- htdocs/admin/mails.php | 10 ++- htdocs/admin/menus/index.php | 2 +- htdocs/admin/system/index.php | 9 ++- htdocs/admin/tools/update.php | 6 +- htdocs/bookmarks/fiche.php | 26 ++++--- htdocs/bookmarks/liste.php | 4 +- htdocs/categories/traduction.php | 8 +-- htdocs/categories/viewcat.php | 5 +- htdocs/comm/action/fiche.php | 17 ++--- htdocs/comm/remx.php | 16 ++--- htdocs/commande/contact.php | 5 +- htdocs/commande/fiche.php | 50 ++++++------- htdocs/commande/orderstoinvoice.php | 22 +++--- htdocs/compta/bank/annuel.php | 2 +- htdocs/compta/bank/bankid_fr.php | 4 +- htdocs/compta/bank/fiche.php | 6 +- htdocs/compta/bank/graph.php | 5 +- htdocs/compta/bank/ligne.php | 10 ++- htdocs/compta/bank/rappro.php | 6 +- htdocs/compta/bank/treso.php | 8 --- htdocs/compta/facture.php | 50 +++++++------ 28 files changed, 178 insertions(+), 222 deletions(-) diff --git a/htdocs/adherents/card_subscriptions.php b/htdocs/adherents/card_subscriptions.php index e436fd5f694..fa7d59f040e 100644 --- a/htdocs/adherents/card_subscriptions.php +++ b/htdocs/adherents/card_subscriptions.php @@ -129,7 +129,7 @@ if ($action == 'setuserid' && ($user->rights->user->self->creer || $user->rights if ($_POST["userid"] != $user->id && $_POST["userid"] != $object->user_id) { $error++; - $mesg='
'.$langs->trans("ErrorUserPermissionAllowsToLinksToItselfOnly").'
'; + setEventMessage($langs->trans("ErrorUserPermissionAllowsToLinksToItselfOnly"), 'errors'); } } @@ -165,7 +165,7 @@ if ($action == 'setsocid') $thirdparty=new Societe($db); $thirdparty->fetch(GETPOST('socid','int')); $error++; - $mesg='
'.$langs->trans("ErrorMemberIsAlreadyLinkedToThisThirdParty",$othermember->getFullName($langs),$othermember->login,$thirdparty->name).'
'; + setEventMessage($langs->trans("ErrorMemberIsAlreadyLinkedToThisThirdParty",$othermember->getFullName($langs),$othermember->login,$thirdparty->name), 'errors'); } } diff --git a/htdocs/adherents/fiche.php b/htdocs/adherents/fiche.php index e57e2b9eb1c..49eabe52d43 100644 --- a/htdocs/adherents/fiche.php +++ b/htdocs/adherents/fiche.php @@ -81,8 +81,6 @@ if (! empty($canvas)) // Security check $result=restrictedArea($user,'adherent',$rowid,'','','fk_soc', 'rowid', $objcanvas); -$errmsg=''; $errmsgs=array(); - if ($rowid > 0) { // Load member @@ -128,7 +126,7 @@ if ($action == 'setuserid' && ($user->rights->user->self->creer || $user->rights if ($userid != $user->id && $userid != $object->user_id) { $error++; - $mesg='
'.$langs->trans("ErrorUserPermissionAllowsToLinksToItselfOnly").'
'; + setEventMessage($langs->trans("ErrorUserPermissionAllowsToLinksToItselfOnly"), 'errors'); } } @@ -164,7 +162,7 @@ if ($action == 'setsocid') $thirdparty=new Societe($db); $thirdparty->fetch($socid); $error++; - $errmsg='
'.$langs->trans("ErrorMemberIsAlreadyLinkedToThisThirdParty",$othermember->getFullName($langs),$othermember->login,$thirdparty->name).'
'; + setEventMessage($langs->trans("ErrorMemberIsAlreadyLinkedToThisThirdParty",$othermember->getFullName($langs),$othermember->login,$thirdparty->name), 'errors'); } } @@ -190,12 +188,12 @@ if ($action == 'confirm_create_user' && $confirm == 'yes' && $user->rights->user if ($result < 0) { $langs->load("errors"); - $errmsg=$langs->trans($nuser->error); + setEventMessage($langs->trans($nuser->error), 'errors'); } } else { - $errmsg=$object->error; + setEventMessage($object->error, 'errors'); } } @@ -211,13 +209,13 @@ if ($action == 'confirm_create_thirdparty' && $confirm == 'yes' && $user->rights if ($result < 0) { $langs->load("errors"); - $errmsg=$langs->trans($company->error); - $errmsgs=$company->errors; + setEventMessage($langs->trans($company->error), 'errors'); + setEventMessage($company->errors, 'errors'); } } else { - $errmsg=$object->error; + setEventMessage($object->error, 'errors'); } } @@ -231,7 +229,7 @@ if ($action == 'confirm_sendinfo' && $confirm == 'yes') $result=$object->send_an_email($langs->transnoentitiesnoconv("ThisIsContentOfYourCard")."\n\n%INFOS%\n\n",$langs->transnoentitiesnoconv("CardContent")); $langs->load("mails"); - $mesg=$langs->trans("MailSuccessfulySent", $from, $object->email); + setEventMessage($langs->trans("MailSuccessfulySent", $from, $object->email)); } } @@ -252,12 +250,12 @@ if ($action == 'update' && ! $_POST["cancel"] && $user->rights->adherent->creer) if ($morphy != 'mor' && empty($lastname)) { $error++; $langs->load("errors"); - $errmsg .= $langs->trans("ErrorFieldRequired",$langs->transnoentities("Lastname"))."
\n"; + setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentities("Lastname")), 'errors'); } if ($morphy != 'mor' && (!isset($firstname) || $firstname=='')) { $error++; $langs->load("errors"); - $errmsg .= $langs->trans("ErrorFieldRequired",$langs->transnoentities("Firstname"))."
\n"; + setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentities("Firstname")), 'errors'); } // Create new object @@ -343,7 +341,7 @@ if ($action == 'update' && ! $_POST["cancel"] && $user->rights->adherent->creer) $newfile=$dir.'/'.dol_sanitizeFileName($_FILES['photo']['name']); if (! dol_move_uploaded_file($_FILES['photo']['tmp_name'],$newfile,1,0,$_FILES['photo']['error']) > 0) { - $message .= '
'.$langs->trans("ErrorFailedToSaveFile").'
'; + setEventMessage($langs->trans("ErrorFailedToSaveFile"), 'errors'); } else { @@ -359,7 +357,7 @@ if ($action == 'update' && ! $_POST["cancel"] && $user->rights->adherent->creer) } else { - $errmsgs[] = "ErrorBadImageFormat"; + setEventMessage("ErrorBadImageFormat", 'errors'); } } else @@ -387,8 +385,11 @@ if ($action == 'update' && ! $_POST["cancel"] && $user->rights->adherent->creer) } else { - if ($object->error) $errmsg=$object->error; - else $errmsgs=$object->errors; + if ($object->error) { + setEventMessage($object->error, 'errors'); + } else { + setEventMessage($object->errors, 'errors'); + } $action=''; } } @@ -472,14 +473,14 @@ if ($action == 'add' && $user->rights->adherent->creer) // Check parameters if (empty($morphy) || $morphy == "-1") { $error++; - $errmsg .= $langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Nature"))."
\n"; + setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Nature")), 'errors'); } // Test si le login existe deja if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED)) { if (empty($login)) { $error++; - $errmsg .= $langs->trans("ErrorFieldRequired",$langs->trans("Login"))."
\n"; + setEventMessage($langs->trans("ErrorFieldRequired",$langs->trans("Login")), 'errors'); } else { $sql = "SELECT login FROM ".MAIN_DB_PREFIX."adherent WHERE login='".$db->escape($login)."'"; @@ -490,32 +491,32 @@ if ($action == 'add' && $user->rights->adherent->creer) if ($num) { $error++; $langs->load("errors"); - $errmsg .= $langs->trans("ErrorLoginAlreadyExists",$login)."
\n"; + setEventMessage($langs->trans("ErrorLoginAlreadyExists",$login), 'errors'); } } if (empty($pass)) { $error++; - $errmsg .= $langs->trans("ErrorFieldRequired",$langs->transnoentities("Password"))."
\n"; + setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentities("Password")), 'errors'); } } if ($morphy != 'mor' && empty($lastname)) { $error++; $langs->load("errors"); - $errmsg .= $langs->trans("ErrorFieldRequired",$langs->transnoentities("Lastname"))."
\n"; + setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentities("Lastname")), 'errors'); } if ($morphy != 'mor' && (!isset($firstname) || $firstname=='')) { $error++; $langs->load("errors"); - $errmsg .= $langs->trans("ErrorFieldRequired",$langs->transnoentities("Firstname"))."
\n"; + setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentities("Firstname")), 'errors'); } if (! ($typeid > 0)) { // Keep () before ! $error++; - $errmsg .= $langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Type"))."
\n"; + setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Type")), 'errors'); } if ($conf->global->ADHERENT_MAIL_REQUIRED && ! isValidEMail($email)) { $error++; $langs->load("errors"); - $errmsg .= $langs->trans("ErrorBadEMail",$email)."
\n"; + setEventMessage($langs->trans("ErrorBadEMail",$email), 'errors'); } $public=0; if (isset($public)) $public=1; @@ -536,8 +537,11 @@ if ($action == 'add' && $user->rights->adherent->creer) { $db->rollback(); - if ($object->error) $errmsg=$object->error; - else $errmsgs=$object->errors; + if ($object->error) { + setEventMessage($object->error, 'errors'); + } else { + setEventMessage($object->errors, 'errors'); + } $action = 'create'; } @@ -589,15 +593,18 @@ if ($user->rights->adherent->creer && $action == 'confirm_valid' && $confirm == if ($result < 0) { $error++; - $errmsg.=$object->error; + setEventMessage($object->error, 'errors'); } } } else { $error++; - if ($object->error) $errmsg=$object->error; - else $errmsgs=$object->errors; + if ($object->error) { + setEventMessage($object->error, 'errors'); + } else { + setEventMessage($object->errors, 'errors'); + } } if (! $error) @@ -613,6 +620,8 @@ if ($user->rights->adherent->creer && $action == 'confirm_valid' && $confirm == if ($user->rights->adherent->supprimer && $action == 'confirm_resign') { + $error = 0; + if ($confirm == 'yes') { $adht = new AdherentType($db); @@ -628,17 +637,23 @@ if ($user->rights->adherent->supprimer && $action == 'confirm_resign') } if ($result < 0) { - $errmsg.=$object->error; + $error++; + setEventMessage($object->error, 'errors'); } } else { - if ($object->error) $errmsg=$object->error; - else $errmsgs=$object->errors; + $error++; + + if ($object->error) { + setEventMessage($object->error, 'errors'); + } else { + setEventMessage($object->errors, 'errors'); + } $action=''; } } - if (! empty($backtopage) && ! $errmsg) + if (! empty($backtopage) && ! $error) { header("Location: ".$backtopage); exit; @@ -652,7 +667,7 @@ if ($user->rights->adherent->supprimer && $action == 'confirm_del_spip' && $conf { if (!$mailmanspip->del_to_spip($object)) { - $errmsg.= $langs->trans('DeleteIntoSpipError').': '.$mailmanspip->error."
\n"; + setEventMessage($langs->trans('DeleteIntoSpipError').': '.$mailmanspip->error, 'errors'); } } } @@ -663,7 +678,7 @@ if ($user->rights->adherent->creer && $action == 'confirm_add_spip' && $confirm { if (!$mailmanspip->add_to_spip($object)) { - $errmsg.= $langs->trans('AddIntoSpipError').': '.$mailmanspip->error."
\n"; + setEventMessage($langs->trans('AddIntoSpipError').': '.$mailmanspip->error, 'errors'); } } } @@ -725,9 +740,6 @@ else print_fiche_titre($langs->trans("NewMember")); - dol_htmloutput_mesg($errmsg,$errmsgs,'error'); - dol_htmloutput_mesg($mesg,$mesgs); - if ($conf->use_javascript_ajax) { print "\n".'