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 -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/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/lib/Mail`;
|
||||
$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.postgres
|
||||
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/custom2
|
||||
htdocs/document
|
||||
@ -45,15 +54,6 @@ htdocs/includes/treemenu/docs
|
||||
htdocs/includes/treemenu/images
|
||||
htdocs/includes/treemenu/imagesAlt
|
||||
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/free*.ctg.z
|
||||
htdocs/includes/tcpdf/fonts/free*.z
|
||||
|
||||
@ -22,11 +22,21 @@
|
||||
*/doc/wiki/*
|
||||
*/document/*
|
||||
*/documents/*
|
||||
*/htdocs/avoir/*
|
||||
*/htdocs/conf/conf.php
|
||||
*/htdocs/conf/conf.php.mysql
|
||||
*/htdocs/conf/conf.php.old
|
||||
*/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/custom2/*
|
||||
*/htdocs/document/*
|
||||
@ -46,16 +56,6 @@
|
||||
*/htdocs/includes/treemenu/images/*
|
||||
*/htdocs/includes/treemenu/imagesAlt/*
|
||||
*/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/free*.ctg.z
|
||||
*/htdocs/includes/tcpdf/fonts/free*.z
|
||||
|
||||
@ -63,6 +63,8 @@ $contact = new Contact($db);
|
||||
*/
|
||||
if ($action == 'add_action')
|
||||
{
|
||||
$error=0;
|
||||
|
||||
$backtopage='';
|
||||
if (! empty($_POST["backtopage"])) $backtopage=$_POST["backtopage"];
|
||||
if (! $backtopage)
|
||||
@ -104,7 +106,7 @@ if ($action == 'add_action')
|
||||
// Check parameters
|
||||
if (! $datef && $_POST["percentage"] == 100)
|
||||
{
|
||||
$error=1;
|
||||
$error++;
|
||||
$action = 'create';
|
||||
$mesg='<div class="error">'.$langs->trans("ErrorFieldRequired",$langs->trans("DateEnd")).'</div>';
|
||||
}
|
||||
@ -112,7 +114,7 @@ if ($action == 'add_action')
|
||||
// Initialisation objet cactioncomm
|
||||
if (! $_POST["actioncode"])
|
||||
{
|
||||
$error=1;
|
||||
$error++;
|
||||
$action = 'create';
|
||||
$mesg='<div class="error">'.$langs->trans("ErrorFieldRequired",$langs->trans("Type")).'</div>';
|
||||
}
|
||||
@ -178,20 +180,20 @@ if ($action == 'add_action')
|
||||
// Check parameters
|
||||
if ($actioncomm->type_code == 'AC_RDV' && ($datep == '' || $datef == ''))
|
||||
{
|
||||
$error=1;
|
||||
$error++;
|
||||
$action = 'create';
|
||||
$mesg='<div class="error">'.$langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("DateEnd")).'</div>';
|
||||
}
|
||||
if ($datea && $_POST["percentage"] == 0)
|
||||
{
|
||||
$error=1;
|
||||
$error++;
|
||||
$action = 'create';
|
||||
$mesg='<div class="error">'.$langs->trans("ErrorStatusCantBeZeroIfStarted").'</div>';
|
||||
}
|
||||
|
||||
if (! $_POST["apyear"] && ! $_POST["adyear"])
|
||||
{
|
||||
$error=1;
|
||||
$error++;
|
||||
$action = 'create';
|
||||
$mesg='<div class="error">'.$langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Date")).'</div>';
|
||||
}
|
||||
|
||||
@ -64,6 +64,7 @@ llxHeader('',$langs->trans("ListOfFees"),$help_url);
|
||||
$totalnb=0;
|
||||
$sql = "SELECT count(d.rowid) as nb, sum(d.km) as km, d.type";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."deplacement as d";
|
||||
$sql.= " WHERE d.entity = ".$conf->entity;
|
||||
$sql.= " GROUP 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');
|
||||
|
||||
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)
|
||||
{
|
||||
$this->db->begin();
|
||||
|
||||
// Clean parameters
|
||||
$remise_percent=price2num($remise_percent);
|
||||
$qty=price2num($qty);
|
||||
if (! $qty) $qty=0;
|
||||
$pu = price2num($pu);
|
||||
$txtva=price2num($txtva);
|
||||
$txlocaltax1=price2num($txlocaltax1);
|
||||
$txlocaltax2=price2num($txlocaltax2);
|
||||
if (empty($qty)) $qty=0;
|
||||
if (empty($fk_parent_line) || $fk_parent_line < 0) $fk_parent_line=0;
|
||||
|
||||
$remise_percent = price2num($remise_percent);
|
||||
$qty = price2num($qty);
|
||||
$pu = price2num($pu);
|
||||
$txtva = price2num($txtva);
|
||||
$txlocaltax1 = price2num($txlocaltax1);
|
||||
$txlocaltax2 = price2num($txlocaltax2);
|
||||
|
||||
// Check parameters
|
||||
if ($type < 0) return -1;
|
||||
|
||||
@ -3593,7 +3596,6 @@ class FactureLigne
|
||||
if ($this->date_end) { $sql.= ",date_end='".$this->db->idate($this->date_end)."'"; }
|
||||
else { $sql.=',date_end=null'; }
|
||||
$sql.= ",product_type=".$this->product_type;
|
||||
$sql.= ",rang='".$this->rang."'";
|
||||
$sql.= ",info_bits='".$this->info_bits."'";
|
||||
if (empty($this->skip_update_total))
|
||||
{
|
||||
|
||||
@ -839,35 +839,39 @@ abstract class CommonObject
|
||||
return -1;
|
||||
}
|
||||
|
||||
$sql = 'SELECT count(rowid) FROM '.MAIN_DB_PREFIX.$this->table_element_line;
|
||||
$sql.= ' WHERE '.$this->fk_element.'='.$this->id;
|
||||
if (! $renum) $sql.= ' AND rang = 0';
|
||||
if ($renum) $sql.= ' AND rang <> 0';
|
||||
$resql = $this->db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
$row = $this->db->fetch_row($resql);
|
||||
$nl = $row[0];
|
||||
}
|
||||
if ($nl > 0)
|
||||
{
|
||||
$sql = 'SELECT rowid FROM '.MAIN_DB_PREFIX.$this->table_element_line;
|
||||
$sql.= ' WHERE '.$this->fk_element.' = '.$this->id;
|
||||
$sql.= ' ORDER BY rang ASC, rowid '.$rowidorder;
|
||||
$resql = $this->db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
$num = $this->db->num_rows($resql);
|
||||
$i = 0;
|
||||
while ($i < $num)
|
||||
{
|
||||
$row = $this->db->fetch_row($resql);
|
||||
$this->updateRangOfLine($row[0], ($i+1));
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
$sql = 'SELECT count(rowid) FROM '.MAIN_DB_PREFIX.$this->table_element_line;
|
||||
$sql.= ' WHERE '.$this->fk_element.'='.$this->id;
|
||||
if (! $renum) $sql.= ' AND rang = 0';
|
||||
if ($renum) $sql.= ' AND rang <> 0';
|
||||
|
||||
dol_syslog(get_class($this)."::line_order sql=".$sql, LOG_DEBUG);
|
||||
$resql = $this->db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
$row = $this->db->fetch_row($resql);
|
||||
$nl = $row[0];
|
||||
}
|
||||
if ($nl > 0)
|
||||
{
|
||||
$sql = 'SELECT rowid FROM '.MAIN_DB_PREFIX.$this->table_element_line;
|
||||
$sql.= ' WHERE '.$this->fk_element.' = '.$this->id;
|
||||
$sql.= ' ORDER BY rang ASC, rowid '.$rowidorder;
|
||||
|
||||
dol_syslog(get_class($this)."::line_order sql=".$sql, LOG_DEBUG);
|
||||
$resql = $this->db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
$num = $this->db->num_rows($resql);
|
||||
$i = 0;
|
||||
while ($i < $num)
|
||||
{
|
||||
$row = $this->db->fetch_row($resql);
|
||||
$this->updateRangOfLine($row[0], ($i+1));
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Update a line to have a lower rank
|
||||
@ -904,21 +908,23 @@ abstract class CommonObject
|
||||
$this->updateLineDown($rowid, $rang, $max);
|
||||
}
|
||||
|
||||
/**
|
||||
* Update position of line (rang)
|
||||
*
|
||||
* @param int $rowid
|
||||
* @param int $rang
|
||||
*/
|
||||
function updateRangOfLine($rowid,$rang)
|
||||
{
|
||||
$sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element_line.' SET rang = '.$rang;
|
||||
$sql.= ' WHERE rowid = '.$rowid;
|
||||
if (! $this->db->query($sql) )
|
||||
{
|
||||
dol_print_error($this->db);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Update position of line (rang)
|
||||
*
|
||||
* @param int $rowid
|
||||
* @param int $rang
|
||||
*/
|
||||
function updateRangOfLine($rowid,$rang)
|
||||
{
|
||||
$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);
|
||||
if (! $this->db->query($sql))
|
||||
{
|
||||
dol_print_error($this->db);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Update position of line with ajax (rang)
|
||||
|
||||
@ -97,7 +97,7 @@ class Notify
|
||||
$sql.= " AND n.fk_soc = s.rowid";
|
||||
if (is_numeric($action)) $sql.= " AND n.fk_action = ".$action; // Old 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;
|
||||
|
||||
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