2
0
forked from Wavyzz/dolibarr

Merge remote-tracking branch 'origin/3.3' into 3.4

Conflicts:
	htdocs/comm/action/listactions.php
	htdocs/core/class/commonobject.class.php
	htdocs/core/lib/agenda.lib.php
	htdocs/product/liste.php
This commit is contained in:
Laurent Destailleur
2013-05-29 01:30:36 +02:00
8 changed files with 16 additions and 19 deletions

View File

@@ -119,7 +119,7 @@ WARNING: If you used external modules, some of them may need to be upgraded due
- Fix: [ bug #866 ] Standing order from an invoice suggests invoice total amount instead of remaining to pay - Fix: [ bug #866 ] Standing order from an invoice suggests invoice total amount instead of remaining to pay
- Fix: [ bug #788 ] Date of linked interventions are not shown - Fix: [ bug #788 ] Date of linked interventions are not shown
- Fix: external users should not see costprice and margin infos - Fix: external users should not see costprice and margin infos
- Fix: [ bug #806 ] Tasks are ordered alphabetically instead of chronological order
***** ChangeLog for 3.3.1 compared to 3.3 ***** ***** ChangeLog for 3.3.1 compared to 3.3 *****
- Fix: [ bug #733 ] Mass emailing tools do not support <style HTML tag - Fix: [ bug #733 ] Mass emailing tools do not support <style HTML tag

View File

@@ -34,8 +34,8 @@
</Company_Info> </Company_Info>
<Program_Info> <Program_Info>
<Program_Name>Dolibarr</Program_Name> <Program_Name>Dolibarr</Program_Name>
<Program_Version>3.3.0</Program_Version> <Program_Version>3.3.2</Program_Version>
<Program_Release_Month>02</Program_Release_Month> <Program_Release_Month>05</Program_Release_Month>
<Program_Release_Day>17</Program_Release_Day> <Program_Release_Day>17</Program_Release_Day>
<Program_Release_Year>2013</Program_Release_Year> <Program_Release_Year>2013</Program_Release_Year>
<Program_Cost_Dollars /> <Program_Cost_Dollars />

View File

@@ -34,8 +34,8 @@
</Company_Info> </Company_Info>
<Program_Info> <Program_Info>
<Program_Name>DoliWamp</Program_Name> <Program_Name>DoliWamp</Program_Name>
<Program_Version>3.3.0</Program_Version> <Program_Version>3.3.2</Program_Version>
<Program_Release_Month>02</Program_Release_Month> <Program_Release_Month>05</Program_Release_Month>
<Program_Release_Day>17</Program_Release_Day> <Program_Release_Day>17</Program_Release_Day>
<Program_Release_Year>2013</Program_Release_Year> <Program_Release_Year>2013</Program_Release_Year>
<Program_Cost_Dollars /> <Program_Cost_Dollars />

View File

@@ -153,9 +153,9 @@ $sql.= " ua.login as loginauthor, ua.rowid as useridauthor,";
$sql.= " ut.login as logintodo, ut.rowid as useridtodo,"; $sql.= " ut.login as logintodo, ut.rowid as useridtodo,";
$sql.= " ud.login as logindone, ud.rowid as useriddone,"; $sql.= " ud.login as logindone, ud.rowid as useriddone,";
$sql.= " sp.lastname, sp.firstname"; $sql.= " sp.lastname, sp.firstname";
$sql.= " FROM (".MAIN_DB_PREFIX."c_actioncomm as c,"; $sql.= " FROM ".MAIN_DB_PREFIX."c_actioncomm as c,";
$sql.= " ".MAIN_DB_PREFIX.'user as u,'; $sql.= " ".MAIN_DB_PREFIX.'user as u,';
$sql.= " ".MAIN_DB_PREFIX."actioncomm as a)"; $sql.= " ".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 (! $user->rights->societe->client->voir && ! $socid) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON a.fk_soc = sc.fk_soc";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON a.fk_soc = s.rowid"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON a.fk_soc = s.rowid";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."socpeople as sp ON a.fk_contact = sp.rowid"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."socpeople as sp ON a.fk_contact = sp.rowid";

View File

@@ -1078,8 +1078,7 @@ abstract class CommonObject
// We first search all lines that are parent lines (for multilevel details lines) // We first search all lines that are parent lines (for multilevel details lines)
$sql = 'SELECT rowid FROM '.MAIN_DB_PREFIX.$this->table_element_line; $sql = 'SELECT rowid FROM '.MAIN_DB_PREFIX.$this->table_element_line;
$sql.= ' WHERE '.$this->fk_element.' = '.$this->id; $sql.= ' WHERE '.$this->fk_element.' = '.$this->id;
if ($fk_parent_line) if ($fk_parent_line) $sql.= ' AND fk_parent_line IS NULL';
$sql.= ' AND fk_parent_line IS NULL';
$sql.= ' ORDER BY rang ASC, rowid '.$rowidorder; $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 sql=".$sql, LOG_DEBUG);

View File

@@ -184,11 +184,10 @@ function show_array_actions_to_do($max=5)
$sql = "SELECT a.id, a.label, a.datep as dp, a.datep2 as dp2, a.fk_user_author, a.percent,"; $sql = "SELECT a.id, a.label, a.datep as dp, a.datep2 as dp2, a.fk_user_author, a.percent,";
$sql.= " c.code, c.libelle,"; $sql.= " c.code, c.libelle,";
$sql.= " s.nom as sname, s.rowid, s.client"; $sql.= " s.nom as sname, s.rowid, s.client";
$sql.= " FROM (".MAIN_DB_PREFIX."c_actioncomm as c LEFT JOIN "; $sql.= " FROM ".MAIN_DB_PREFIX."c_actioncomm as c LEFT JOIN ";
$sql.= " ".MAIN_DB_PREFIX."actioncomm as a ON c.id = a.fk_action"; $sql.= " ".MAIN_DB_PREFIX."actioncomm as a ON c.id = a.fk_action";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON a.fk_soc = s.rowid"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON a.fk_soc = s.rowid";
if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
$sql.= ")";
$sql.= " WHERE a.entity = ".$conf->entity; $sql.= " WHERE a.entity = ".$conf->entity;
$sql.= " AND ((a.percent >= 0 AND a.percent < 100) OR (a.percent = -1 AND a.datep2 > '".$db->idate($now)."'))"; $sql.= " AND ((a.percent >= 0 AND a.percent < 100) OR (a.percent = -1 AND a.datep2 > '".$db->idate($now)."'))";
if (!$user->rights->societe->client->voir && !$socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; if (!$user->rights->societe->client->voir && !$socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
@@ -282,11 +281,10 @@ function show_array_last_actions_done($max=5)
$sql = "SELECT a.id, a.percent, a.datep as da, a.datep2 as da2, a.fk_user_author, a.label,"; $sql = "SELECT a.id, a.percent, a.datep as da, a.datep2 as da2, a.fk_user_author, a.label,";
$sql.= " c.code, c.libelle,"; $sql.= " c.code, c.libelle,";
$sql.= " s.rowid, s.nom as sname, s.client"; $sql.= " s.rowid, s.nom as sname, s.client";
$sql.= " FROM (".MAIN_DB_PREFIX."c_actioncomm as c LEFT JOIN "; $sql.= " FROM ".MAIN_DB_PREFIX."c_actioncomm as c LEFT JOIN ";
$sql.= " ".MAIN_DB_PREFIX."actioncomm as a ON c.id = a.fk_action "; $sql.= " ".MAIN_DB_PREFIX."actioncomm as a ON c.id = a.fk_action ";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON a.fk_soc = s.rowid"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON a.fk_soc = s.rowid";
if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
$sql.=")";
$sql.= " WHERE a.entity = ".$conf->entity; $sql.= " WHERE a.entity = ".$conf->entity;
$sql.= " AND (a.percent >= 100 OR (a.percent = -1 AND a.datep2 <= '".$db->idate($now)."'))"; $sql.= " AND (a.percent >= 100 OR (a.percent = -1 AND a.datep2 <= '".$db->idate($now)."'))";
if (!$user->rights->societe->client->voir && !$socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; if (!$user->rights->societe->client->voir && !$socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;

View File

@@ -151,7 +151,7 @@ else
{ {
$sql.= " OR p.barcode LIKE '%".$db->escape($crit)."%'"; $sql.= " OR p.barcode LIKE '%".$db->escape($crit)."%'";
} }
$sql.= ')'; $sql.= ')';
} }
} }
else else
@@ -162,7 +162,7 @@ else
{ {
$sql.= " OR p.barcode LIKE '%".$db->escape($crit)."%'"; $sql.= " OR p.barcode LIKE '%".$db->escape($crit)."%'";
} }
$sql.= ')'; $sql.= ')';
} }
} }
} }
@@ -182,7 +182,7 @@ else
$sql.= " AND (p.label LIKE '%".$db->escape($snom)."%' OR (pl.label IS NOT null AND pl.label LIKE '%".$db->escape($snom)."%'))"; $sql.= " AND (p.label LIKE '%".$db->escape($snom)."%' OR (pl.label IS NOT null AND pl.label LIKE '%".$db->escape($snom)."%'))";
} }
else $sql.= " AND p.label LIKE '%".$db->escape($snom)."%'"; else $sql.= " AND p.label LIKE '%".$db->escape($snom)."%'";
} }
if (isset($tosell) && dol_strlen($tosell) > 0) $sql.= " AND p.tosell = ".$db->escape($tosell); if (isset($tosell) && dol_strlen($tosell) > 0) $sql.= " AND p.tosell = ".$db->escape($tosell);
if (isset($tobuy) && dol_strlen($tobuy) > 0) $sql.= " AND p.tobuy = ".$db->escape($tobuy); if (isset($tobuy) && dol_strlen($tobuy) > 0) $sql.= " AND p.tobuy = ".$db->escape($tobuy);
if (dol_strlen($canvas) > 0) $sql.= " AND p.canvas = '".$db->escape($canvas)."'"; if (dol_strlen($canvas) > 0) $sql.= " AND p.canvas = '".$db->escape($canvas)."'";
@@ -482,7 +482,7 @@ else
$param.=($search_categ?"&amp;search_categ=".$search_categ:""); $param.=($search_categ?"&amp;search_categ=".$search_categ:"");
$param.=isset($type)?"&amp;type=".$type:""; $param.=isset($type)?"&amp;type=".$type:"";
print_barre_liste('', $page, "liste.php", $param, $sortfield, $sortorder,'',$num); print_barre_liste('', $page, "liste.php", $param, $sortfield, $sortorder,'',$num);
$db->free($resql); $db->free($resql);
print "</table>"; print "</table>";

View File

@@ -503,7 +503,7 @@ class Task extends CommonObject
/** /**
* Return list of tasks for all projects or for one particular project * Return list of tasks for all projects or for one particular project
* Sort order is on project, then on position of task, and last on title of first level task * Sort order is on project, then on position of task, and last on start date of first level task
* *
* @param User $usert Object user to limit tasks affected to a particular user * @param User $usert Object user to limit tasks affected to a particular user
* @param User $userp Object user to limit projects of a particular user and public projects * @param User $userp Object user to limit projects of a particular user and public projects
@@ -543,7 +543,7 @@ class Task extends CommonObject
if ($projectid) $sql.= " AND p.rowid in (".$projectid.")"; if ($projectid) $sql.= " AND p.rowid in (".$projectid.")";
} }
if ($filteronprojref) $sql.= " AND p.ref LIKE '%".$filteronprojref."%'"; if ($filteronprojref) $sql.= " AND p.ref LIKE '%".$filteronprojref."%'";
$sql.= " ORDER BY p.ref, t.rang, t.label"; $sql.= " ORDER BY p.ref, t.rang, t.dateo";
//print $sql; //print $sql;
dol_syslog(get_class($this)."::getTasksArray sql=".$sql, LOG_DEBUG); dol_syslog(get_class($this)."::getTasksArray sql=".$sql, LOG_DEBUG);