Merge branch 'develop' of ssh://git@github.com/Dolibarr/dolibarr.git
into develop Conflicts: htdocs/core/class/commonobject.class.php
This commit is contained in:
commit
824db25a74
@ -334,10 +334,6 @@ if ($nboftargetok) {
|
|||||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/fckeditor`;
|
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/fckeditor`;
|
||||||
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/geoip/sample*.*`;
|
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/geoip/sample*.*`;
|
||||||
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/jquery/plugins/flot/LICENSE.txt`;
|
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/jquery/plugins/flot/LICENSE.txt`;
|
||||||
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/jquery/plugins/flot/jquery.js`;
|
|
||||||
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/jquery/plugins/flot/jquery.min.js`;
|
|
||||||
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/jquery/plugins/jcrop/js/jquery.min.js`;
|
|
||||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/jquery/plugins/datatables`;
|
|
||||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/nusoap/samples`;
|
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/nusoap/samples`;
|
||||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/nusoap/lib/Mail`;
|
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/nusoap/lib/Mail`;
|
||||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpexcel/license.txt`;
|
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpexcel/license.txt`;
|
||||||
|
|||||||
@ -31,6 +31,15 @@ htdocs/conf/conf.php.mysql
|
|||||||
htdocs/conf/conf.php.old
|
htdocs/conf/conf.php.old
|
||||||
htdocs/conf/conf.php.postgres
|
htdocs/conf/conf.php.postgres
|
||||||
htdocs/avoir
|
htdocs/avoir
|
||||||
|
htdocs/core/modules/modBookmark4u.class.php
|
||||||
|
htdocs/core/modules/modDocument.class.php
|
||||||
|
htdocs/core/modules/modDroitPret.class.php
|
||||||
|
htdocs/core/modules/modEditeur.class.php
|
||||||
|
htdocs/core/modules/modPostnuke.class.php
|
||||||
|
htdocs/core/modules/modTelephonie.class.php
|
||||||
|
htdocs/core/triggers/interface_user.class.php
|
||||||
|
htdocs/core/triggers/interface_contractfrombill.class.php-NORUN
|
||||||
|
htdocs/core/triggers/interface_modEditeur_Editeur.class.php-NORUN
|
||||||
htdocs/custom
|
htdocs/custom
|
||||||
htdocs/custom2
|
htdocs/custom2
|
||||||
htdocs/document
|
htdocs/document
|
||||||
@ -45,15 +54,6 @@ htdocs/includes/treemenu/docs
|
|||||||
htdocs/includes/treemenu/images
|
htdocs/includes/treemenu/images
|
||||||
htdocs/includes/treemenu/imagesAlt
|
htdocs/includes/treemenu/imagesAlt
|
||||||
htdocs/includes/treemenu/imagesAlt2
|
htdocs/includes/treemenu/imagesAlt2
|
||||||
htdocs/core/modules/modBookmark4u.class.php
|
|
||||||
htdocs/core/modules/modDocument.class.php
|
|
||||||
htdocs/core/modules/modDroitPret.class.php
|
|
||||||
htdocs/core/modules/modEditeur.class.php
|
|
||||||
htdocs/core/modules/modPostnuke.class.php
|
|
||||||
htdocs/core/modules/modTelephonie.class.php
|
|
||||||
htdocs/core/triggers/interface_user.class.php
|
|
||||||
htdocs/core/triggers/interface_contractfrombill.class.php-NORUN
|
|
||||||
htdocs/core/triggers/interface_modEditeur_Editeur.class.php-NORUN
|
|
||||||
htdocs/includes/tcpdf/fonts/utils
|
htdocs/includes/tcpdf/fonts/utils
|
||||||
htdocs/includes/tcpdf/fonts/free*.ctg.z
|
htdocs/includes/tcpdf/fonts/free*.ctg.z
|
||||||
htdocs/includes/tcpdf/fonts/free*.z
|
htdocs/includes/tcpdf/fonts/free*.z
|
||||||
|
|||||||
@ -22,11 +22,21 @@
|
|||||||
*/doc/wiki/*
|
*/doc/wiki/*
|
||||||
*/document/*
|
*/document/*
|
||||||
*/documents/*
|
*/documents/*
|
||||||
|
*/htdocs/avoir/*
|
||||||
*/htdocs/conf/conf.php
|
*/htdocs/conf/conf.php
|
||||||
*/htdocs/conf/conf.php.mysql
|
*/htdocs/conf/conf.php.mysql
|
||||||
*/htdocs/conf/conf.php.old
|
*/htdocs/conf/conf.php.old
|
||||||
*/htdocs/conf/conf.php.postgres
|
*/htdocs/conf/conf.php.postgres
|
||||||
*/htdocs/avoir/*
|
*/htdocs/core/modules/modBarcode.class.php
|
||||||
|
*/htdocs/core/modules/modBookmark4u.class.php
|
||||||
|
*/htdocs/core/modules/modClickToDial.class.php
|
||||||
|
*/htdocs/core/modules/modDocument.class.php
|
||||||
|
*/htdocs/core/modules/modDomain.class.php
|
||||||
|
*/htdocs/core/modules/modDroitPret.class.php
|
||||||
|
*/htdocs/core/modules/modEditeur.class.php
|
||||||
|
*/htdocs/core/modules/modPostnuke.class.php
|
||||||
|
*/htdocs/core/triggers/interface_user.class.php
|
||||||
|
*/htdocs/core/triggers/interface_contractfrombill.class.php-NORUN
|
||||||
*/htdocs/custom/*
|
*/htdocs/custom/*
|
||||||
*/htdocs/custom2/*
|
*/htdocs/custom2/*
|
||||||
*/htdocs/document/*
|
*/htdocs/document/*
|
||||||
@ -46,16 +56,6 @@
|
|||||||
*/htdocs/includes/treemenu/images/*
|
*/htdocs/includes/treemenu/images/*
|
||||||
*/htdocs/includes/treemenu/imagesAlt/*
|
*/htdocs/includes/treemenu/imagesAlt/*
|
||||||
*/htdocs/includes/treemenu/imagesAlt2/*
|
*/htdocs/includes/treemenu/imagesAlt2/*
|
||||||
*/htdocs/core/modules/modBarcode.class.php
|
|
||||||
*/htdocs/core/modules/modBookmark4u.class.php
|
|
||||||
*/htdocs/core/modules/modClickToDial.class.php
|
|
||||||
*/htdocs/core/modules/modDocument.class.php
|
|
||||||
*/htdocs/core/modules/modDomain.class.php
|
|
||||||
*/htdocs/core/modules/modDroitPret.class.php
|
|
||||||
*/htdocs/core/modules/modEditeur.class.php
|
|
||||||
*/htdocs/core/modules/modPostnuke.class.php
|
|
||||||
*/htdocs/core/triggers/interface_user.class.php
|
|
||||||
*/htdocs/core/triggers/interface_contractfrombill.class.php-NORUN
|
|
||||||
*/htdocs/includes/tcpdf/fonts/utils/*
|
*/htdocs/includes/tcpdf/fonts/utils/*
|
||||||
*/htdocs/includes/tcpdf/fonts/free*.ctg.z
|
*/htdocs/includes/tcpdf/fonts/free*.ctg.z
|
||||||
*/htdocs/includes/tcpdf/fonts/free*.z
|
*/htdocs/includes/tcpdf/fonts/free*.z
|
||||||
|
|||||||
@ -63,6 +63,8 @@ $contact = new Contact($db);
|
|||||||
*/
|
*/
|
||||||
if ($action == 'add_action')
|
if ($action == 'add_action')
|
||||||
{
|
{
|
||||||
|
$error=0;
|
||||||
|
|
||||||
$backtopage='';
|
$backtopage='';
|
||||||
if (! empty($_POST["backtopage"])) $backtopage=$_POST["backtopage"];
|
if (! empty($_POST["backtopage"])) $backtopage=$_POST["backtopage"];
|
||||||
if (! $backtopage)
|
if (! $backtopage)
|
||||||
@ -104,7 +106,7 @@ if ($action == 'add_action')
|
|||||||
// Check parameters
|
// Check parameters
|
||||||
if (! $datef && $_POST["percentage"] == 100)
|
if (! $datef && $_POST["percentage"] == 100)
|
||||||
{
|
{
|
||||||
$error=1;
|
$error++;
|
||||||
$action = 'create';
|
$action = 'create';
|
||||||
$mesg='<div class="error">'.$langs->trans("ErrorFieldRequired",$langs->trans("DateEnd")).'</div>';
|
$mesg='<div class="error">'.$langs->trans("ErrorFieldRequired",$langs->trans("DateEnd")).'</div>';
|
||||||
}
|
}
|
||||||
@ -112,7 +114,7 @@ if ($action == 'add_action')
|
|||||||
// Initialisation objet cactioncomm
|
// Initialisation objet cactioncomm
|
||||||
if (! $_POST["actioncode"])
|
if (! $_POST["actioncode"])
|
||||||
{
|
{
|
||||||
$error=1;
|
$error++;
|
||||||
$action = 'create';
|
$action = 'create';
|
||||||
$mesg='<div class="error">'.$langs->trans("ErrorFieldRequired",$langs->trans("Type")).'</div>';
|
$mesg='<div class="error">'.$langs->trans("ErrorFieldRequired",$langs->trans("Type")).'</div>';
|
||||||
}
|
}
|
||||||
@ -178,20 +180,20 @@ if ($action == 'add_action')
|
|||||||
// Check parameters
|
// Check parameters
|
||||||
if ($actioncomm->type_code == 'AC_RDV' && ($datep == '' || $datef == ''))
|
if ($actioncomm->type_code == 'AC_RDV' && ($datep == '' || $datef == ''))
|
||||||
{
|
{
|
||||||
$error=1;
|
$error++;
|
||||||
$action = 'create';
|
$action = 'create';
|
||||||
$mesg='<div class="error">'.$langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("DateEnd")).'</div>';
|
$mesg='<div class="error">'.$langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("DateEnd")).'</div>';
|
||||||
}
|
}
|
||||||
if ($datea && $_POST["percentage"] == 0)
|
if ($datea && $_POST["percentage"] == 0)
|
||||||
{
|
{
|
||||||
$error=1;
|
$error++;
|
||||||
$action = 'create';
|
$action = 'create';
|
||||||
$mesg='<div class="error">'.$langs->trans("ErrorStatusCantBeZeroIfStarted").'</div>';
|
$mesg='<div class="error">'.$langs->trans("ErrorStatusCantBeZeroIfStarted").'</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! $_POST["apyear"] && ! $_POST["adyear"])
|
if (! $_POST["apyear"] && ! $_POST["adyear"])
|
||||||
{
|
{
|
||||||
$error=1;
|
$error++;
|
||||||
$action = 'create';
|
$action = 'create';
|
||||||
$mesg='<div class="error">'.$langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Date")).'</div>';
|
$mesg='<div class="error">'.$langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Date")).'</div>';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -64,6 +64,7 @@ llxHeader('',$langs->trans("ListOfFees"),$help_url);
|
|||||||
$totalnb=0;
|
$totalnb=0;
|
||||||
$sql = "SELECT count(d.rowid) as nb, sum(d.km) as km, d.type";
|
$sql = "SELECT count(d.rowid) as nb, sum(d.km) as km, d.type";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."deplacement as d";
|
$sql.= " FROM ".MAIN_DB_PREFIX."deplacement as d";
|
||||||
|
$sql.= " WHERE d.entity = ".$conf->entity;
|
||||||
$sql.= " GROUP BY d.type";
|
$sql.= " GROUP BY d.type";
|
||||||
$sql.= " ORDER BY d.type";
|
$sql.= " ORDER BY d.type";
|
||||||
|
|
||||||
|
|||||||
@ -1941,20 +1941,23 @@ class Facture extends CommonObject
|
|||||||
{
|
{
|
||||||
include_once(DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php');
|
include_once(DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php');
|
||||||
|
|
||||||
dol_syslog("Facture::UpdateLine $rowid, $desc, $pu, $qty, $remise_percent, $date_start, $date_end, $txtva, $txlocaltax1, $txlocaltax2, $price_base_type, $info_bits, $type", LOG_DEBUG);
|
dol_syslog("Facture::UpdateLine $rowid, $desc, $pu, $qty, $remise_percent, $date_start, $date_end, $txtva, $txlocaltax1, $txlocaltax2, $price_base_type, $info_bits, $type, $fk_parent_line", LOG_DEBUG);
|
||||||
|
|
||||||
if ($this->brouillon)
|
if ($this->brouillon)
|
||||||
{
|
{
|
||||||
$this->db->begin();
|
$this->db->begin();
|
||||||
|
|
||||||
// Clean parameters
|
// Clean parameters
|
||||||
$remise_percent=price2num($remise_percent);
|
if (empty($qty)) $qty=0;
|
||||||
$qty=price2num($qty);
|
if (empty($fk_parent_line) || $fk_parent_line < 0) $fk_parent_line=0;
|
||||||
if (! $qty) $qty=0;
|
|
||||||
$pu = price2num($pu);
|
$remise_percent = price2num($remise_percent);
|
||||||
$txtva=price2num($txtva);
|
$qty = price2num($qty);
|
||||||
$txlocaltax1=price2num($txlocaltax1);
|
$pu = price2num($pu);
|
||||||
$txlocaltax2=price2num($txlocaltax2);
|
$txtva = price2num($txtva);
|
||||||
|
$txlocaltax1 = price2num($txlocaltax1);
|
||||||
|
$txlocaltax2 = price2num($txlocaltax2);
|
||||||
|
|
||||||
// Check parameters
|
// Check parameters
|
||||||
if ($type < 0) return -1;
|
if ($type < 0) return -1;
|
||||||
|
|
||||||
@ -3593,7 +3596,6 @@ class FactureLigne
|
|||||||
if ($this->date_end) { $sql.= ",date_end='".$this->db->idate($this->date_end)."'"; }
|
if ($this->date_end) { $sql.= ",date_end='".$this->db->idate($this->date_end)."'"; }
|
||||||
else { $sql.=',date_end=null'; }
|
else { $sql.=',date_end=null'; }
|
||||||
$sql.= ",product_type=".$this->product_type;
|
$sql.= ",product_type=".$this->product_type;
|
||||||
$sql.= ",rang='".$this->rang."'";
|
|
||||||
$sql.= ",info_bits='".$this->info_bits."'";
|
$sql.= ",info_bits='".$this->info_bits."'";
|
||||||
if (empty($this->skip_update_total))
|
if (empty($this->skip_update_total))
|
||||||
{
|
{
|
||||||
|
|||||||
@ -839,35 +839,39 @@ abstract class CommonObject
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql = 'SELECT count(rowid) FROM '.MAIN_DB_PREFIX.$this->table_element_line;
|
$sql = 'SELECT count(rowid) FROM '.MAIN_DB_PREFIX.$this->table_element_line;
|
||||||
$sql.= ' WHERE '.$this->fk_element.'='.$this->id;
|
$sql.= ' WHERE '.$this->fk_element.'='.$this->id;
|
||||||
if (! $renum) $sql.= ' AND rang = 0';
|
if (! $renum) $sql.= ' AND rang = 0';
|
||||||
if ($renum) $sql.= ' AND rang <> 0';
|
if ($renum) $sql.= ' AND rang <> 0';
|
||||||
$resql = $this->db->query($sql);
|
|
||||||
if ($resql)
|
dol_syslog(get_class($this)."::line_order sql=".$sql, LOG_DEBUG);
|
||||||
{
|
$resql = $this->db->query($sql);
|
||||||
$row = $this->db->fetch_row($resql);
|
if ($resql)
|
||||||
$nl = $row[0];
|
{
|
||||||
}
|
$row = $this->db->fetch_row($resql);
|
||||||
if ($nl > 0)
|
$nl = $row[0];
|
||||||
{
|
}
|
||||||
$sql = 'SELECT rowid FROM '.MAIN_DB_PREFIX.$this->table_element_line;
|
if ($nl > 0)
|
||||||
$sql.= ' WHERE '.$this->fk_element.' = '.$this->id;
|
{
|
||||||
$sql.= ' ORDER BY rang ASC, rowid '.$rowidorder;
|
$sql = 'SELECT rowid FROM '.MAIN_DB_PREFIX.$this->table_element_line;
|
||||||
$resql = $this->db->query($sql);
|
$sql.= ' WHERE '.$this->fk_element.' = '.$this->id;
|
||||||
if ($resql)
|
$sql.= ' ORDER BY rang ASC, rowid '.$rowidorder;
|
||||||
{
|
|
||||||
$num = $this->db->num_rows($resql);
|
dol_syslog(get_class($this)."::line_order sql=".$sql, LOG_DEBUG);
|
||||||
$i = 0;
|
$resql = $this->db->query($sql);
|
||||||
while ($i < $num)
|
if ($resql)
|
||||||
{
|
{
|
||||||
$row = $this->db->fetch_row($resql);
|
$num = $this->db->num_rows($resql);
|
||||||
$this->updateRangOfLine($row[0], ($i+1));
|
$i = 0;
|
||||||
$i++;
|
while ($i < $num)
|
||||||
}
|
{
|
||||||
}
|
$row = $this->db->fetch_row($resql);
|
||||||
}
|
$this->updateRangOfLine($row[0], ($i+1));
|
||||||
}
|
$i++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Update a line to have a lower rank
|
* Update a line to have a lower rank
|
||||||
@ -904,21 +908,23 @@ abstract class CommonObject
|
|||||||
$this->updateLineDown($rowid, $rang, $max);
|
$this->updateLineDown($rowid, $rang, $max);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Update position of line (rang)
|
* Update position of line (rang)
|
||||||
*
|
*
|
||||||
* @param int $rowid
|
* @param int $rowid
|
||||||
* @param int $rang
|
* @param int $rang
|
||||||
*/
|
*/
|
||||||
function updateRangOfLine($rowid,$rang)
|
function updateRangOfLine($rowid,$rang)
|
||||||
{
|
{
|
||||||
$sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element_line.' SET rang = '.$rang;
|
$sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element_line.' SET rang = '.$rang;
|
||||||
$sql.= ' WHERE rowid = '.$rowid;
|
$sql.= ' WHERE rowid = '.$rowid;
|
||||||
if (! $this->db->query($sql) )
|
|
||||||
{
|
dol_syslog(get_class($this)."::updateRangOfLine sql=".$sql, LOG_DEBUG);
|
||||||
dol_print_error($this->db);
|
if (! $this->db->query($sql))
|
||||||
}
|
{
|
||||||
}
|
dol_print_error($this->db);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Update position of line with ajax (rang)
|
* Update position of line with ajax (rang)
|
||||||
|
|||||||
@ -97,7 +97,7 @@ class Notify
|
|||||||
$sql.= " AND n.fk_soc = s.rowid";
|
$sql.= " AND n.fk_soc = s.rowid";
|
||||||
if (is_numeric($action)) $sql.= " AND n.fk_action = ".$action; // Old usage
|
if (is_numeric($action)) $sql.= " AND n.fk_action = ".$action; // Old usage
|
||||||
else $sql.= " AND a.code = '".$action."'"; // New usage
|
else $sql.= " AND a.code = '".$action."'"; // New usage
|
||||||
//$sql.= " AND n.entity = ".$conf->entity;
|
$sql.= " AND s.entity = ".$conf->entity;
|
||||||
$sql.= " AND s.rowid = ".$socid;
|
$sql.= " AND s.rowid = ".$socid;
|
||||||
|
|
||||||
dol_syslog("Notify.class::countDefinedNotifications ".$action.", ".$socid." sql=".$sql);
|
dol_syslog("Notify.class::countDefinedNotifications ".$action.", ".$socid." sql=".$sql);
|
||||||
|
|||||||
8316
htdocs/includes/jquery/plugins/flot/jquery.js
vendored
8316
htdocs/includes/jquery/plugins/flot/jquery.js
vendored
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user