Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
6ddae270b9
@ -57,7 +57,7 @@ class ActionComm extends CommonObject
|
|||||||
var $datef; // Date action end (datep2)
|
var $datef; // Date action end (datep2)
|
||||||
var $durationp = -1; // -1=Unkown duration // deprecated
|
var $durationp = -1; // -1=Unkown duration // deprecated
|
||||||
var $fulldayevent = 0; // 1=Event on full day
|
var $fulldayevent = 0; // 1=Event on full day
|
||||||
var $punctual = 1; // Milestone // TODO Not sure we need this. Milestone is already event with end date = start date
|
var $punctual = 1; // Milestone // deprecated. Milestone is already event with end date = start date
|
||||||
var $percentage; // Percentage
|
var $percentage; // Percentage
|
||||||
var $location; // Location
|
var $location; // Location
|
||||||
|
|
||||||
|
|||||||
@ -180,7 +180,7 @@ $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."user as ut ON a.fk_user_action = ut.rowid";
|
|||||||
if ($usergroup > 0) $sql.= ", ".MAIN_DB_PREFIX."usergroup_user as ugu";
|
if ($usergroup > 0) $sql.= ", ".MAIN_DB_PREFIX."usergroup_user as ugu";
|
||||||
$sql.= " WHERE c.id = a.fk_action";
|
$sql.= " WHERE c.id = a.fk_action";
|
||||||
$sql.= ' AND a.fk_user_author = u.rowid';
|
$sql.= ' AND a.fk_user_author = u.rowid';
|
||||||
$sql.= ' AND a.entity IN ('.getEntity('agenda', 1).')'; // To limit to entity
|
$sql.= ' AND a.entity IN ('.getEntity('agenda', 1).')';
|
||||||
if ($actioncode) $sql.=" AND c.code='".$db->escape($actioncode)."'";
|
if ($actioncode) $sql.=" AND c.code='".$db->escape($actioncode)."'";
|
||||||
if ($pid) $sql.=" AND a.fk_project=".$db->escape($pid);
|
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 (! $user->rights->societe->client->voir && ! $socid) $sql.= " AND (a.fk_soc IS NULL OR sc.fk_user = " .$user->id . ")";
|
||||||
|
|||||||
@ -610,7 +610,7 @@ else
|
|||||||
$sql = "SELECT u.rowid, u.lastname as lastname, u.firstname, u.statut, u.login, u.admin, u.entity";
|
$sql = "SELECT u.rowid, u.lastname as lastname, u.firstname, u.statut, u.login, u.admin, u.entity";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."user as u";
|
$sql.= " FROM ".MAIN_DB_PREFIX."user as u";
|
||||||
if ($usergroup > 0) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."usergroup_user as ug ON u.rowid = ug.fk_user";
|
if ($usergroup > 0) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."usergroup_user as ug ON u.rowid = ug.fk_user";
|
||||||
$sql.= " WHERE u.entity IN (".getEntity('user').")";
|
$sql.= " WHERE u.entity IN (".getEntity('user',1).")";
|
||||||
if ($usergroup > 0) $sql.= " AND ug.fk_usergroup = ".$usergroup;
|
if ($usergroup > 0) $sql.= " AND ug.fk_usergroup = ".$usergroup;
|
||||||
if (GETPOST("usertodo","int",3) > 0) $sql.=" AND u.rowid = ".GETPOST("usertodo","int",3);
|
if (GETPOST("usertodo","int",3) > 0) $sql.=" AND u.rowid = ".GETPOST("usertodo","int",3);
|
||||||
//print $sql;
|
//print $sql;
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2001-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2001-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2003 Eric Seigne <erics@rycks.com>
|
* Copyright (C) 2003 Eric Seigne <erics@rycks.com>
|
||||||
* Copyright (C) 2004-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2014 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@ -55,6 +55,7 @@ $result = restrictedArea($user, 'agenda', $socid, '', 'myactions');
|
|||||||
/*
|
/*
|
||||||
* Actions
|
* Actions
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if ($action == 'builddoc')
|
if ($action == 'builddoc')
|
||||||
{
|
{
|
||||||
$cat = new CommActionRapport($db, $month, $year);
|
$cat = new CommActionRapport($db, $month, $year);
|
||||||
@ -79,7 +80,7 @@ $sql.= " date_format(a.datep, '%Y') as year";
|
|||||||
$sql.= " FROM ".MAIN_DB_PREFIX."actioncomm as a,";
|
$sql.= " FROM ".MAIN_DB_PREFIX."actioncomm as a,";
|
||||||
$sql.= " ".MAIN_DB_PREFIX."user as u";
|
$sql.= " ".MAIN_DB_PREFIX."user as u";
|
||||||
$sql.= " WHERE a.fk_user_author = u.rowid";
|
$sql.= " WHERE a.fk_user_author = u.rowid";
|
||||||
$sql.= " AND a.entity = ".$conf->entity;
|
$sql.= ' AND a.entity IN ('.getEntity('agenda', 1).')';
|
||||||
//$sql.= " AND percent = 100";
|
//$sql.= " AND percent = 100";
|
||||||
$sql.= " GROUP BY year, month, df";
|
$sql.= " GROUP BY year, month, df";
|
||||||
$sql.= " ORDER BY year DESC, month DESC, df DESC";
|
$sql.= " ORDER BY year DESC, month DESC, df DESC";
|
||||||
|
|||||||
@ -50,7 +50,7 @@ echo $this->control->tpl['ajax_selectcountry']; ?>
|
|||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php echo $langs->trans("Company"); ?></td>
|
<td><?php echo $langs->trans("ThirdParty"); ?></td>
|
||||||
<td colspan="3"><?php echo $this->control->tpl['company']; ?></td>
|
<td colspan="3"><?php echo $this->control->tpl['company']; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
|||||||
@ -59,7 +59,7 @@ echo $this->control->tpl['ajax_selectcountry'];
|
|||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php echo $langs->trans("Company"); ?></td>
|
<td><?php echo $langs->trans("ThirdParty"); ?></td>
|
||||||
<td colspan="3"><?php echo $this->control->tpl['company']; ?></td>
|
<td colspan="3"><?php echo $this->control->tpl['company']; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
|||||||
@ -44,7 +44,7 @@ dol_htmloutput_errors($this->control->tpl['error'],$this->control->tpl['errors']
|
|||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php echo $langs->trans("Company"); ?></td>
|
<td><?php echo $langs->trans("ThirdParty"); ?></td>
|
||||||
<td colspan="3"><?php echo $this->control->tpl['company']; ?></td>
|
<td colspan="3"><?php echo $this->control->tpl['company']; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
|||||||
@ -456,7 +456,7 @@ else
|
|||||||
{
|
{
|
||||||
if ($socid > 0)
|
if ($socid > 0)
|
||||||
{
|
{
|
||||||
print '<tr><td><label for="socid">'.$langs->trans("Company").'</label></td>';
|
print '<tr><td><label for="socid">'.$langs->trans("ThirdParty").'</label></td>';
|
||||||
print '<td colspan="3" class="maxwidthonsmartphone">';
|
print '<td colspan="3" class="maxwidthonsmartphone">';
|
||||||
print $objsoc->getNomUrl(1);
|
print $objsoc->getNomUrl(1);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
@ -464,7 +464,7 @@ else
|
|||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
print '<tr><td><label for="socid">'.$langs->trans("Company").'</label></td><td colspan="3" class="maxwidthonsmartphone">';
|
print '<tr><td><label for="socid">'.$langs->trans("ThirdParty").'</label></td><td colspan="3" class="maxwidthonsmartphone">';
|
||||||
print $form->select_company($socid,'socid','',1);
|
print $form->select_company($socid,'socid','',1);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
@ -690,7 +690,7 @@ else
|
|||||||
// Company
|
// Company
|
||||||
if (empty($conf->global->SOCIETE_DISABLE_CONTACTS))
|
if (empty($conf->global->SOCIETE_DISABLE_CONTACTS))
|
||||||
{
|
{
|
||||||
print '<tr><td><label for="socid">'.$langs->trans("Company").'</label></td>';
|
print '<tr><td><label for="socid">'.$langs->trans("ThirdParty").'</label></td>';
|
||||||
print '<td colspan="3" class="maxwidthonsmartphone">';
|
print '<td colspan="3" class="maxwidthonsmartphone">';
|
||||||
print $form->select_company(GETPOST('socid','int')?GETPOST('socid','int'):($object->socid?$object->socid:-1),'socid','',1);
|
print $form->select_company(GETPOST('socid','int')?GETPOST('socid','int'):($object->socid?$object->socid:-1),'socid','',1);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
@ -924,7 +924,7 @@ else
|
|||||||
// Company
|
// Company
|
||||||
if (empty($conf->global->SOCIETE_DISABLE_CONTACTS))
|
if (empty($conf->global->SOCIETE_DISABLE_CONTACTS))
|
||||||
{
|
{
|
||||||
print '<tr><td>'.$langs->trans("Company").'</td><td colspan="3">';
|
print '<tr><td>'.$langs->trans("ThirdParty").'</td><td colspan="3">';
|
||||||
if ($object->socid > 0)
|
if ($object->socid > 0)
|
||||||
{
|
{
|
||||||
$objsoc->fetch($object->socid);
|
$objsoc->fetch($object->socid);
|
||||||
|
|||||||
@ -77,11 +77,11 @@ if (empty($conf->global->SOCIETE_DISABLE_CONTACTS))
|
|||||||
$objsoc = new Societe($db);
|
$objsoc = new Societe($db);
|
||||||
$objsoc->fetch($contact->socid);
|
$objsoc->fetch($contact->socid);
|
||||||
|
|
||||||
print '<tr><td width="15%">'.$langs->trans("Company").'</td><td colspan="3">'.$objsoc->getNomUrl(1).'</td></tr>';
|
print '<tr><td width="15%">'.$langs->trans("ThirdParty").'</td><td colspan="3">'.$objsoc->getNomUrl(1).'</td></tr>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<tr><td width="15%">'.$langs->trans("Company").'</td><td colspan="3">';
|
print '<tr><td width="15%">'.$langs->trans("ThirdParty").'</td><td colspan="3">';
|
||||||
print $langs->trans("ContactNotLinkedToCompany");
|
print $langs->trans("ContactNotLinkedToCompany");
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -105,11 +105,11 @@ if ($contact->socid > 0)
|
|||||||
$objsoc = new Societe($db);
|
$objsoc = new Societe($db);
|
||||||
$objsoc->fetch($contact->socid);
|
$objsoc->fetch($contact->socid);
|
||||||
|
|
||||||
print '<tr><td width="20%">'.$langs->trans("Company").'</td><td colspan="3">'.$objsoc->getNomUrl(1).'</td></tr>';
|
print '<tr><td width="20%">'.$langs->trans("ThirdParty").'</td><td colspan="3">'.$objsoc->getNomUrl(1).'</td></tr>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<tr><td width="20%">'.$langs->trans("Company").'</td><td colspan="3">';
|
print '<tr><td width="20%">'.$langs->trans("ThirdParty").'</td><td colspan="3">';
|
||||||
print $langs->trans("ContactNotLinkedToCompany");
|
print $langs->trans("ContactNotLinkedToCompany");
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -300,7 +300,7 @@ if ($result)
|
|||||||
print_liste_field_titre($langs->trans("Lastname"),$_SERVER["PHP_SELF"],"p.lastname", $begin, $param, '', $sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("Lastname"),$_SERVER["PHP_SELF"],"p.lastname", $begin, $param, '', $sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("Firstname"),$_SERVER["PHP_SELF"],"p.firstname", $begin, $param, '', $sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("Firstname"),$_SERVER["PHP_SELF"],"p.firstname", $begin, $param, '', $sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("PostOrFunction"),$_SERVER["PHP_SELF"],"p.poste", $begin, $param, '', $sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("PostOrFunction"),$_SERVER["PHP_SELF"],"p.poste", $begin, $param, '', $sortfield,$sortorder);
|
||||||
if (empty($conf->global->SOCIETE_DISABLE_CONTACTS)) print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"s.nom", $begin, $param, '', $sortfield,$sortorder);
|
if (empty($conf->global->SOCIETE_DISABLE_CONTACTS)) print_liste_field_titre($langs->trans("ThirdParty"),$_SERVER["PHP_SELF"],"s.nom", $begin, $param, '', $sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("Phone"),$_SERVER["PHP_SELF"],"p.phone", $begin, $param, '', $sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("Phone"),$_SERVER["PHP_SELF"],"p.phone", $begin, $param, '', $sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("PhoneMobile"),$_SERVER["PHP_SELF"],"p.phone_mobile", $begin, $param, '', $sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("PhoneMobile"),$_SERVER["PHP_SELF"],"p.phone_mobile", $begin, $param, '', $sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("Fax"),$_SERVER["PHP_SELF"],"p.fax", $begin, $param, '', $sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("Fax"),$_SERVER["PHP_SELF"],"p.fax", $begin, $param, '', $sortfield,$sortorder);
|
||||||
|
|||||||
@ -98,12 +98,12 @@ if ($id > 0)
|
|||||||
$objsoc = new Societe($db);
|
$objsoc = new Societe($db);
|
||||||
$objsoc->fetch($object->socid);
|
$objsoc->fetch($object->socid);
|
||||||
|
|
||||||
print '<tr><td>'.$langs->trans("Company").'</td><td colspan="3">'.$objsoc->getNomUrl(1).'</td></tr>';
|
print '<tr><td>'.$langs->trans("ThirdParty").'</td><td colspan="3">'.$objsoc->getNomUrl(1).'</td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<tr><td>'.$langs->trans("Company").'</td><td colspan="3">';
|
print '<tr><td>'.$langs->trans("ThirdParty").'</td><td colspan="3">';
|
||||||
print $langs->trans("ContactNotLinkedToCompany");
|
print $langs->trans("ContactNotLinkedToCompany");
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -111,11 +111,11 @@ if ($action == 'edit')
|
|||||||
$objsoc = new Societe($db);
|
$objsoc = new Societe($db);
|
||||||
$objsoc->fetch($object->socid);
|
$objsoc->fetch($object->socid);
|
||||||
|
|
||||||
print '<tr><td>'.$langs->trans("Company").'</td><td colspan="3">'.$objsoc->getNomUrl(1).'</td>';
|
print '<tr><td>'.$langs->trans("ThirdParty").'</td><td colspan="3">'.$objsoc->getNomUrl(1).'</td>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<tr><td>'.$langs->trans("Company").'</td><td colspan="3">';
|
print '<tr><td>'.$langs->trans("ThirdParty").'</td><td colspan="3">';
|
||||||
print $langs->trans("ContactNotLinkedToCompany");
|
print $langs->trans("ContactNotLinkedToCompany");
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
@ -179,12 +179,12 @@ else
|
|||||||
$objsoc = new Societe($db);
|
$objsoc = new Societe($db);
|
||||||
$objsoc->fetch($object->socid);
|
$objsoc->fetch($object->socid);
|
||||||
|
|
||||||
print '<tr><td>'.$langs->trans("Company").'</td><td colspan="3">'.$objsoc->getNomUrl(1).'</td></tr>';
|
print '<tr><td>'.$langs->trans("ThirdParty").'</td><td colspan="3">'.$objsoc->getNomUrl(1).'</td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<tr><td>'.$langs->trans("Company").'</td><td colspan="3">';
|
print '<tr><td>'.$langs->trans("ThirdParty").'</td><td colspan="3">';
|
||||||
print $langs->trans("ContactNotLinkedToCompany");
|
print $langs->trans("ContactNotLinkedToCompany");
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -271,13 +271,13 @@ class FormFile
|
|||||||
if (! empty($iconPDF)) {
|
if (! empty($iconPDF)) {
|
||||||
return $this->getDocumentsLink($modulepart, $modulesubdir, $filedir);
|
return $this->getDocumentsLink($modulepart, $modulesubdir, $filedir);
|
||||||
}
|
}
|
||||||
|
|
||||||
$printer=0;
|
$printer=0;
|
||||||
if (in_array($modulepart,array('facture','propal','proposal','order','commande'))) // This feature is implemented only for such elements
|
if (in_array($modulepart,array('facture','propal','proposal','order','commande'))) // This feature is implemented only for such elements
|
||||||
{
|
{
|
||||||
$printer = (!empty($user->rights->printipp->read) && !empty($conf->printipp->enabled))?true:false;
|
$printer = (!empty($user->rights->printipp->read) && !empty($conf->printipp->enabled))?true:false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$hookmanager->initHooks(array('formfile'));
|
$hookmanager->initHooks(array('formfile'));
|
||||||
$forname='builddoc';
|
$forname='builddoc';
|
||||||
$out='';
|
$out='';
|
||||||
@ -1101,6 +1101,8 @@ class FormFile
|
|||||||
global $bc;
|
global $bc;
|
||||||
global $sortfield, $sortorder;
|
global $sortfield, $sortorder;
|
||||||
|
|
||||||
|
$langs->load("link");
|
||||||
|
|
||||||
require_once DOL_DOCUMENT_ROOT . '/core/class/link.class.php';
|
require_once DOL_DOCUMENT_ROOT . '/core/class/link.class.php';
|
||||||
$link = new Link($this->db);
|
$link = new Link($this->db);
|
||||||
$links = array();
|
$links = array();
|
||||||
@ -1162,7 +1164,7 @@ class FormFile
|
|||||||
$nboflinks = count($links);
|
$nboflinks = count($links);
|
||||||
if ($nboflinks > 0) include_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php';
|
if ($nboflinks > 0) include_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php';
|
||||||
|
|
||||||
$var = false;
|
$var = true;
|
||||||
foreach ($links as $link)
|
foreach ($links as $link)
|
||||||
{
|
{
|
||||||
$var =! $var;
|
$var =! $var;
|
||||||
|
|||||||
@ -71,12 +71,12 @@ if (! empty($useragent))
|
|||||||
|
|
||||||
|
|
||||||
// Check PHP version
|
// Check PHP version
|
||||||
if (versioncompare(versionphparray(),array(4,3,10)) < 0) // Minimum to use (error if lower)
|
if (versioncompare(versionphparray(),array(5,2,3)) < 0) // Minimum to use (error if lower)
|
||||||
{
|
{
|
||||||
print '<img src="../theme/eldy/img/error.png" alt="Error"> '.$langs->trans("ErrorPHPVersionTooLow",'4.3.10');
|
print '<img src="../theme/eldy/img/error.png" alt="Error"> '.$langs->trans("ErrorPHPVersionTooLow",'5.2.3');
|
||||||
$checksok=0; // 0=error, 1=warning
|
$checksok=0; // 0=error, 1=warning
|
||||||
}
|
}
|
||||||
else if (versioncompare(versionphparray(),array(5,3,0)) < 0) // Minimum supported (error if lower)
|
else if (versioncompare(versionphparray(),array(5,3,0)) < 0) // Minimum supported (warning if lower)
|
||||||
{
|
{
|
||||||
print '<img src="../theme/eldy/img/warning.png" alt="Error"> '.$langs->trans("ErrorPHPVersionTooLow",'5.3.0');
|
print '<img src="../theme/eldy/img/warning.png" alt="Error"> '.$langs->trans("ErrorPHPVersionTooLow",'5.3.0');
|
||||||
$checksok=0; // 0=error, 1=warning
|
$checksok=0; // 0=error, 1=warning
|
||||||
|
|||||||
@ -1140,6 +1140,8 @@ ALTER TABLE llx_facture_rec ADD COLUMN revenuestamp double(24,8) DEFAULT 0;
|
|||||||
ALTER TABLE llx_facturedet_rec MODIFY COLUMN tva_tx double(6,3);
|
ALTER TABLE llx_facturedet_rec MODIFY COLUMN tva_tx double(6,3);
|
||||||
ALTER TABLE llx_facturedet_rec ADD COLUMN fk_contract_line integer NULL;
|
ALTER TABLE llx_facturedet_rec ADD COLUMN fk_contract_line integer NULL;
|
||||||
|
|
||||||
|
ALTER TABLE llx_resource MODIFY COLUMN entity integer DEFAULT 1 NOT NULL;
|
||||||
|
|
||||||
-- This request make mysql drop (mysql bug, so we add it at end):
|
-- This request make mysql drop (mysql bug, so we add it at end):
|
||||||
--ALTER TABLE llx_product ADD CONSTRAINT fk_product_barcode_type FOREIGN KEY (fk_barcode_type) REFERENCES llx_c_barcode_type(rowid);
|
--ALTER TABLE llx_product ADD CONSTRAINT fk_product_barcode_type FOREIGN KEY (fk_barcode_type) REFERENCES llx_c_barcode_type(rowid);
|
||||||
|
|
||||||
|
|||||||
@ -51,10 +51,10 @@ create table llx_actioncomm
|
|||||||
|
|
||||||
priority smallint,
|
priority smallint,
|
||||||
fulldayevent smallint NOT NULL default 0,
|
fulldayevent smallint NOT NULL default 0,
|
||||||
punctual smallint NOT NULL default 1,
|
punctual smallint NOT NULL default 1, -- deprecated. milestone is event with date start = date end
|
||||||
percent smallint NOT NULL default 0,
|
percent smallint NOT NULL default 0,
|
||||||
location varchar(128),
|
location varchar(128),
|
||||||
durationp real, -- duree planifiee
|
durationp real, -- planed duration
|
||||||
durationa real, -- deprecated
|
durationa real, -- deprecated
|
||||||
note text,
|
note text,
|
||||||
|
|
||||||
|
|||||||
@ -17,7 +17,7 @@
|
|||||||
CREATE TABLE llx_resource
|
CREATE TABLE llx_resource
|
||||||
(
|
(
|
||||||
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||||
entity integer,
|
entity integer DEFAULT 1 NOT NULL,
|
||||||
ref varchar(255),
|
ref varchar(255),
|
||||||
description text,
|
description text,
|
||||||
fk_code_type_resource varchar(32),
|
fk_code_type_resource varchar(32),
|
||||||
|
|||||||
@ -785,6 +785,7 @@ DictionaryOrderMethods=Ordering methods
|
|||||||
DictionarySource=Origin of proposals/orders
|
DictionarySource=Origin of proposals/orders
|
||||||
DictionaryAccountancyplan=Chart of accounts
|
DictionaryAccountancyplan=Chart of accounts
|
||||||
DictionaryAccountancysystem=Models for chart of accounts
|
DictionaryAccountancysystem=Models for chart of accounts
|
||||||
|
DictionaryEMailTemplates=Emails templates
|
||||||
SetupSaved=Setup saved
|
SetupSaved=Setup saved
|
||||||
BackToModuleList=Back to modules list
|
BackToModuleList=Back to modules list
|
||||||
BackToDictionaryList=Back to dictionaries list
|
BackToDictionaryList=Back to dictionaries list
|
||||||
|
|||||||
@ -31,6 +31,4 @@ ConfirmDeleteResource=Confirm to delete this resource
|
|||||||
RessourceSuccessfullyDeleted=Resource successfully deleted
|
RessourceSuccessfullyDeleted=Resource successfully deleted
|
||||||
DictionaryResourceType=Type of resources
|
DictionaryResourceType=Type of resources
|
||||||
|
|
||||||
DictionaryEMailTemplates=Modèles d'Emails
|
|
||||||
|
|
||||||
SelectResource=Select resource
|
SelectResource=Select resource
|
||||||
|
|||||||
@ -123,7 +123,7 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
|
|||||||
$result = $db->query($sql);
|
$result = $db->query($sql);
|
||||||
$nbtotalofrecords = $db->num_rows($result);
|
$nbtotalofrecords = $db->num_rows($result);
|
||||||
}
|
}
|
||||||
$sql.= " WHERE p.entity = ".getEntity('survey');
|
$sql.= " WHERE p.entity = ".getEntity('survey',1);
|
||||||
if ($status == 'expired') $sql.=" AND date_fin < '".$db->idate($now)."'";
|
if ($status == 'expired') $sql.=" AND date_fin < '".$db->idate($now)."'";
|
||||||
if ($status == 'opened') $sql.=" AND date_fin >= '".$db->idate($now)."'";
|
if ($status == 'opened') $sql.=" AND date_fin >= '".$db->idate($now)."'";
|
||||||
if ($surveytitle) $sql.=" AND titre LIKE '%".$db->escape($surveytitle)."%'";
|
if ($surveytitle) $sql.=" AND titre LIKE '%".$db->escape($surveytitle)."%'";
|
||||||
|
|||||||
@ -298,7 +298,7 @@ class Project extends CommonObject
|
|||||||
else if (! empty($ref))
|
else if (! empty($ref))
|
||||||
{
|
{
|
||||||
$sql.= " WHERE ref='".$this->db->escape($ref)."'";
|
$sql.= " WHERE ref='".$this->db->escape($ref)."'";
|
||||||
$sql.= " AND entity IN (".getEntity('project').")";
|
$sql.= " AND entity IN (".getEntity('project',1).")";
|
||||||
}
|
}
|
||||||
|
|
||||||
dol_syslog(get_class($this)."::fetch", LOG_DEBUG);
|
dol_syslog(get_class($this)."::fetch", LOG_DEBUG);
|
||||||
@ -910,7 +910,7 @@ class Project extends CommonObject
|
|||||||
$sql.= ", " . MAIN_DB_PREFIX . "element_contact as ec";
|
$sql.= ", " . MAIN_DB_PREFIX . "element_contact as ec";
|
||||||
$sql.= ", " . MAIN_DB_PREFIX . "c_type_contact as ctc";
|
$sql.= ", " . MAIN_DB_PREFIX . "c_type_contact as ctc";
|
||||||
}
|
}
|
||||||
$sql.= " WHERE p.entity IN (".getEntity('project').")";
|
$sql.= " WHERE p.entity IN (".getEntity('project',1).")";
|
||||||
// Internal users must see project he is contact to even if project linked to a third party he can't see.
|
// Internal users must see project he is contact to even if project linked to a third party he can't see.
|
||||||
//if ($socid || ! $user->rights->societe->client->voir) $sql.= " AND (p.fk_soc IS NULL OR p.fk_soc = 0 OR p.fk_soc = ".$socid.")";
|
//if ($socid || ! $user->rights->societe->client->voir) $sql.= " AND (p.fk_soc IS NULL OR p.fk_soc = 0 OR p.fk_soc = ".$socid.")";
|
||||||
if ($socid > 0) $sql.= " AND (p.fk_soc IS NULL OR p.fk_soc = 0 OR p.fk_soc = " . $socid . ")";
|
if ($socid > 0) $sql.= " AND (p.fk_soc IS NULL OR p.fk_soc = 0 OR p.fk_soc = " . $socid . ")";
|
||||||
|
|||||||
@ -388,7 +388,7 @@ class Resource extends CommonObject
|
|||||||
$sql.= " ty.label as type_label";
|
$sql.= " ty.label as type_label";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."resource as t";
|
$sql.= " FROM ".MAIN_DB_PREFIX."resource as t";
|
||||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_type_resource as ty ON ty.code=t.fk_code_type_resource";
|
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_type_resource as ty ON ty.code=t.fk_code_type_resource";
|
||||||
//$sql.= " WHERE t.entity IN (".getEntity('resource').")";
|
$sql.= " WHERE t.entity IN (".getEntity('resource',1).")";
|
||||||
|
|
||||||
//Manage filter
|
//Manage filter
|
||||||
if (!empty($filter)){
|
if (!empty($filter)){
|
||||||
@ -402,7 +402,7 @@ class Resource extends CommonObject
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
$sql.= " GROUP BY t.rowid";
|
$sql.= " GROUP BY t.rowid";
|
||||||
$sql.= " ORDER BY $sortfield $sortorder ";
|
$sql.= $this->db->order($sortfield,$sortorder);
|
||||||
if ($limit) $sql.= $this->db->plimit($limit+1,$offset);
|
if ($limit) $sql.= $this->db->plimit($limit+1,$offset);
|
||||||
dol_syslog(get_class($this)."::fetch_all", LOG_DEBUG);
|
dol_syslog(get_class($this)."::fetch_all", LOG_DEBUG);
|
||||||
|
|
||||||
@ -462,7 +462,7 @@ class Resource extends CommonObject
|
|||||||
$sql.= " t.fk_user_create,";
|
$sql.= " t.fk_user_create,";
|
||||||
$sql.= " t.tms";
|
$sql.= " t.tms";
|
||||||
$sql.= ' FROM '.MAIN_DB_PREFIX .'element_resources as t ';
|
$sql.= ' FROM '.MAIN_DB_PREFIX .'element_resources as t ';
|
||||||
//$sql.= " WHERE t.entity IN (".getEntity('resource').")";
|
$sql.= " WHERE t.entity IN (".getEntity('resource',1).")";
|
||||||
|
|
||||||
//Manage filter
|
//Manage filter
|
||||||
if (!empty($filter)){
|
if (!empty($filter)){
|
||||||
@ -476,7 +476,8 @@ class Resource extends CommonObject
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
$sql.= " GROUP BY t.rowid";
|
$sql.= " GROUP BY t.rowid";
|
||||||
$sql.= " ORDER BY $sortfield $sortorder " . $this->db->plimit($limit+1,$offset);
|
$sql.= $this->db->order($sortfield,$sortorder);
|
||||||
|
if ($limit) $sql.= $this->db->plimit($limit+1,$offset);
|
||||||
dol_syslog(get_class($this)."::fetch_all", LOG_DEBUG);
|
dol_syslog(get_class($this)."::fetch_all", LOG_DEBUG);
|
||||||
|
|
||||||
$resql=$this->db->query($sql);
|
$resql=$this->db->query($sql);
|
||||||
@ -547,7 +548,7 @@ class Resource extends CommonObject
|
|||||||
$sql.= " t.fk_user_create,";
|
$sql.= " t.fk_user_create,";
|
||||||
$sql.= " t.tms";
|
$sql.= " t.tms";
|
||||||
$sql.= ' FROM '.MAIN_DB_PREFIX .'element_resources as t ';
|
$sql.= ' FROM '.MAIN_DB_PREFIX .'element_resources as t ';
|
||||||
//$sql.= " WHERE t.entity IN (".getEntity('resource').")";
|
$sql.= " WHERE t.entity IN (".getEntity('resource',1).")";
|
||||||
|
|
||||||
//Manage filter
|
//Manage filter
|
||||||
if (!empty($filter)){
|
if (!empty($filter)){
|
||||||
@ -561,7 +562,8 @@ class Resource extends CommonObject
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
$sql.= " GROUP BY t.resource_id";
|
$sql.= " GROUP BY t.resource_id";
|
||||||
$sql.= " ORDER BY " . $sortfield . " " . $sortorder . " " . $this->db->plimit($limit+1,$offset);
|
$sql.= $this->db->order($sortfield,$sortorder);
|
||||||
|
if ($limit) $sql.= $this->db->plimit($limit+1,$offset);
|
||||||
dol_syslog(get_class($this)."::fetch_all", LOG_DEBUG);
|
dol_syslog(get_class($this)."::fetch_all", LOG_DEBUG);
|
||||||
|
|
||||||
$resql=$this->db->query($sql);
|
$resql=$this->db->query($sql);
|
||||||
|
|||||||
@ -76,11 +76,18 @@ $langs->load("orders");
|
|||||||
$langs->load("suppliers");
|
$langs->load("suppliers");
|
||||||
$langs->load("propal");
|
$langs->load("propal");
|
||||||
|
|
||||||
|
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
|
||||||
|
$hookmanager->initHooks(array('consumptionthirdparty'));
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Actions
|
* Actions
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
$parameters=array('id'=>$socid);
|
||||||
|
$reshook=$hookmanager->executeHooks('doActions',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
|
||||||
|
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@ -147,7 +147,7 @@ if ($object->id)
|
|||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
print '</div>';
|
dol_fiche_end();
|
||||||
|
|
||||||
$modulepart = 'societe';
|
$modulepart = 'societe';
|
||||||
$permission = $user->rights->societe->creer;
|
$permission = $user->rights->societe->creer;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user