Merge branch 'develop' of github.com:Dolibarr/dolibarr into develop
This commit is contained in:
commit
aec0f01d08
@ -2,7 +2,15 @@
|
|||||||
#----------------------------------------------------------------------------
|
#----------------------------------------------------------------------------
|
||||||
# \file build/makepack-dolibarr.pl
|
# \file build/makepack-dolibarr.pl
|
||||||
# \brief Dolibarr package builder (tgz, zip, rpm, deb, exe, aps)
|
# \brief Dolibarr package builder (tgz, zip, rpm, deb, exe, aps)
|
||||||
# \author (c)2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
# \author (c)2004-2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
|
#
|
||||||
|
# This is list of constant you can set to have generated packages moved into a specific dir:
|
||||||
|
#DESTIBETARC='/media/HDDATA1_LD/Mes Sites/Web/Dolibarr/dolibarr.org/files/lastbuild'
|
||||||
|
#DESTISTABLE='/media/HDDATA1_LD/Mes Sites/Web/Dolibarr/dolibarr.org/files/stable'
|
||||||
|
#DESTIMODULES='/media/HDDATA1_LD/Mes Sites/Web/Admin1/wwwroot/files/modules'
|
||||||
|
#DESTIDOLIMEDBETARC='/media/HDDATA1_LD/Mes Sites/Web/DoliCloud/dolimed.com/htdocs/files/lastbuild'
|
||||||
|
#DESTIDOLIMEDMODULES='/media/HDDATA1_LD/Mes Sites/Web/DoliCloud/dolimed.com/htdocs/files/modules'
|
||||||
|
#DESTIDOLIMEDSTABLE='/media/HDDATA1_LD/Mes Sites/Web/DoliCloud/dolimed.com/htdocs/files/stable'
|
||||||
#----------------------------------------------------------------------------
|
#----------------------------------------------------------------------------
|
||||||
|
|
||||||
use Cwd;
|
use Cwd;
|
||||||
|
|||||||
@ -2,13 +2,15 @@
|
|||||||
#----------------------------------------------------------------------------
|
#----------------------------------------------------------------------------
|
||||||
# \file build/makepack-dolibarrmodule.pl
|
# \file build/makepack-dolibarrmodule.pl
|
||||||
# \brief Package builder (tgz, zip, rpm, deb, exe)
|
# \brief Package builder (tgz, zip, rpm, deb, exe)
|
||||||
# \author (c)2005-2006 Laurent Destailleur <eldy@users.sourceforge.net>
|
# \author (c)2005-2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
#----------------------------------------------------------------------------
|
#----------------------------------------------------------------------------
|
||||||
|
|
||||||
use Cwd;
|
use Cwd;
|
||||||
|
$OWNER="ldestailleur";
|
||||||
|
$GROUP="ldestailleur";
|
||||||
|
|
||||||
|
|
||||||
@LISTETARGET=("TGZ"); # Possible packages
|
@LISTETARGET=("ZIP"); # Possible packages
|
||||||
%REQUIREMENTTARGET=( # Tool requirement for each package
|
%REQUIREMENTTARGET=( # Tool requirement for each package
|
||||||
"TGZ"=>"tar",
|
"TGZ"=>"tar",
|
||||||
"ZIP"=>"7z"
|
"ZIP"=>"7z"
|
||||||
@ -272,7 +274,6 @@ foreach my $PROJECT (@PROJECTLIST) {
|
|||||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/conf/conf*sav*`;
|
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/conf/conf*sav*`;
|
||||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/custom`;
|
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/custom`;
|
||||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/custom2`;
|
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/custom2`;
|
||||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/theme/bureau2crea`;
|
|
||||||
$ret=`rm -fr $BUILDROOT/$PROJECT/test`;
|
$ret=`rm -fr $BUILDROOT/$PROJECT/test`;
|
||||||
$ret=`rm -fr $BUILDROOT/$PROJECT/Thumbs.db $BUILDROOT/$PROJECT/*/Thumbs.db $BUILDROOT/$PROJECT/*/*/Thumbs.db $BUILDROOT/$PROJECT/*/*/*/Thumbs.db $BUILDROOT/$PROJECT/*/*/*/*/Thumbs.db`;
|
$ret=`rm -fr $BUILDROOT/$PROJECT/Thumbs.db $BUILDROOT/$PROJECT/*/Thumbs.db $BUILDROOT/$PROJECT/*/*/Thumbs.db $BUILDROOT/$PROJECT/*/*/*/Thumbs.db $BUILDROOT/$PROJECT/*/*/*/*/Thumbs.db`;
|
||||||
$ret=`rm -fr $BUILDROOT/$PROJECT/CVS* $BUILDROOT/$PROJECT/*/CVS* $BUILDROOT/$PROJECT/*/*/CVS* $BUILDROOT/$PROJECT/*/*/*/CVS* $BUILDROOT/$PROJECT/*/*/*/*/CVS* $BUILDROOT/$PROJECT/*/*/*/*/*/CVS*`;
|
$ret=`rm -fr $BUILDROOT/$PROJECT/CVS* $BUILDROOT/$PROJECT/*/CVS* $BUILDROOT/$PROJECT/*/*/CVS* $BUILDROOT/$PROJECT/*/*/*/CVS* $BUILDROOT/$PROJECT/*/*/*/*/CVS* $BUILDROOT/$PROJECT/*/*/*/*/*/CVS*`;
|
||||||
@ -323,6 +324,7 @@ foreach my $PROJECT (@PROJECTLIST) {
|
|||||||
|
|
||||||
print "Move $FILENAMEZIP.zip to $NEWDESTI/$FILENAMEZIP.zip\n";
|
print "Move $FILENAMEZIP.zip to $NEWDESTI/$FILENAMEZIP.zip\n";
|
||||||
$ret=`mv "$BUILDROOT/$FILENAMEZIP.zip" "$NEWDESTI/$FILENAMEZIP.zip"`;
|
$ret=`mv "$BUILDROOT/$FILENAMEZIP.zip" "$NEWDESTI/$FILENAMEZIP.zip"`;
|
||||||
|
$ret=`chown $OWNER.$GROUP "$NEWDESTI/$FILENAMEZIP.zip"`;
|
||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -34,3 +34,12 @@ Enter the Remote URL that should looks like this: http://www.dolibarr.org/files/
|
|||||||
Then add into advanded - attributes
|
Then add into advanded - attributes
|
||||||
OBS:Screenshots http://www.dolibarr.org/images/dolibarr_screenshot1.png
|
OBS:Screenshots http://www.dolibarr.org/images/dolibarr_screenshot1.png
|
||||||
OBS:QualityCategory Testing
|
OBS:QualityCategory Testing
|
||||||
|
|
||||||
|
|
||||||
|
# Move project into official directory
|
||||||
|
- Enter a bug to ask to be a maintener of a category or to add a new one.
|
||||||
|
For example: https://bugzilla.novell.com/show_bug.cgi?id=848083 to be a maintener of category
|
||||||
|
https://build.opensuse.org/project/show/Application:ERP
|
||||||
|
- Once done, go into project, category, subproject and enter a subproject for your application.
|
||||||
|
Fo example: Dolibarr
|
||||||
|
- Then go onto project into your home and ask a publish to the category/you project your created.
|
||||||
|
|||||||
@ -3859,21 +3859,21 @@ else if ($id > 0 || ! empty($ref))
|
|||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* Affiche formulaire mail
|
* Affiche formulaire mail
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// By default if $action=='presend'
|
// By default if $action=='presend'
|
||||||
$titreform='SendBillByMail';
|
$titreform='SendBillByMail';
|
||||||
$topicmail='SendBillRef';
|
$topicmail='SendBillRef';
|
||||||
$action='send';
|
|
||||||
$modelmail='facture_send';
|
$modelmail='facture_send';
|
||||||
|
|
||||||
if ($action == 'prerelance') // For backward compatibility
|
if ($action == 'prerelance') // For backward compatibility
|
||||||
{
|
{
|
||||||
$titrefrom='SendReminderBillByMail';
|
$titrefrom='SendReminderBillByMail';
|
||||||
$topicmail='SendReminderBillRef';
|
$topicmail='SendReminderBillRef';
|
||||||
$action='relance';
|
|
||||||
$modelmail='facture_relance';
|
$modelmail='facture_relance';
|
||||||
|
$action='relance';
|
||||||
}
|
}
|
||||||
|
else $action='send';
|
||||||
|
|
||||||
$ref = dol_sanitizeFileName($object->ref);
|
$ref = dol_sanitizeFileName($object->ref);
|
||||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||||
|
|||||||
@ -124,6 +124,7 @@ class Contact extends CommonObject
|
|||||||
if (! empty($conf->global->MAIN_FIRST_TO_UPPER)) $this->firstname=ucwords($this->firstname);
|
if (! empty($conf->global->MAIN_FIRST_TO_UPPER)) $this->firstname=ucwords($this->firstname);
|
||||||
if (! $this->socid) $this->socid = 0;
|
if (! $this->socid) $this->socid = 0;
|
||||||
if (! $this->priv) $this->priv = 0;
|
if (! $this->priv) $this->priv = 0;
|
||||||
|
if (empty($this->statut)) $this->statut = 0;
|
||||||
|
|
||||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."socpeople (";
|
$sql = "INSERT INTO ".MAIN_DB_PREFIX."socpeople (";
|
||||||
$sql.= " datec";
|
$sql.= " datec";
|
||||||
|
|||||||
@ -935,6 +935,10 @@ class ExtraFields
|
|||||||
|
|
||||||
$sql = 'SELECT '.$keyList;
|
$sql = 'SELECT '.$keyList;
|
||||||
$sql.= ' FROM '.MAIN_DB_PREFIX .$InfoFieldList[0];
|
$sql.= ' FROM '.MAIN_DB_PREFIX .$InfoFieldList[0];
|
||||||
|
if (strpos($InfoFieldList[4], 'extra')!==false)
|
||||||
|
{
|
||||||
|
$sql.= ' as main';
|
||||||
|
}
|
||||||
$sql.= ' WHERE '.$selectkey.'=\''.$this->db->escape($value).'\'';
|
$sql.= ' WHERE '.$selectkey.'=\''.$this->db->escape($value).'\'';
|
||||||
//$sql.= ' AND entity = '.$conf->entity;
|
//$sql.= ' AND entity = '.$conf->entity;
|
||||||
dol_syslog(get_class($this).':showOutputField:$type=sellist sql='.$sql);
|
dol_syslog(get_class($this).':showOutputField:$type=sellist sql='.$sql);
|
||||||
|
|||||||
@ -529,7 +529,6 @@ class doc_generic_project_odt extends ModelePDFProjects
|
|||||||
else // Text
|
else // Text
|
||||||
{
|
{
|
||||||
$odfHandler->setVars($key, $value, true, 'UTF-8');
|
$odfHandler->setVars($key, $value, true, 'UTF-8');
|
||||||
$odfHandler->setVarsHeadFooter($key, $value, true, 'UTF-8');
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch(OdfException $e)
|
catch(OdfException $e)
|
||||||
@ -1037,4 +1036,4 @@ class doc_generic_project_odt extends ModelePDFProjects
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|||||||
@ -59,6 +59,8 @@ if ($user->societe_id > 0)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
|
||||||
|
$hookmanager->initHooks(array('paymentsupplier'));
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@ -128,33 +128,6 @@ class Odf
|
|||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Assing a template variable
|
|
||||||
*
|
|
||||||
* @param string $key name of the variable within the template
|
|
||||||
* @param string $value replacement value
|
|
||||||
* @param bool $encode if true, special XML characters are encoded
|
|
||||||
* @throws OdfException
|
|
||||||
* @return odf
|
|
||||||
*/
|
|
||||||
public function setVarsHeadFooter($key, $value, $encode = true, $charset = 'ISO-8859')
|
|
||||||
{
|
|
||||||
$tag = $this->config['DELIMITER_LEFT'] . $key . $this->config['DELIMITER_RIGHT'];
|
|
||||||
// TODO Warning string may be:
|
|
||||||
// <text:span text:style-name="T13">{</text:span><text:span text:style-name="T12">aaa</text:span><text:span text:style-name="T13">}</text:span>
|
|
||||||
// instead of {aaa} so we should enhance this function.
|
|
||||||
//print $key.'-'.$value.'-'.strpos($this->contentXml, $this->config['DELIMITER_LEFT'] . $key . $this->config['DELIMITER_RIGHT']).'<br>';
|
|
||||||
if (strpos($this->stylesXml, $tag) === false && strpos($this->stylesXml , $tag) === false) {
|
|
||||||
//if (strpos($this->contentXml, '">'. $key . '</text;span>') === false) {
|
|
||||||
throw new OdfException("var $key not found in the document");
|
|
||||||
//}
|
|
||||||
}
|
|
||||||
$value = $encode ? htmlspecialchars($value) : $value;
|
|
||||||
$value = ($charset == 'ISO-8859') ? utf8_encode($value) : $value;
|
|
||||||
$this->vars[$tag] = str_replace("\n", "<text:line-break/>", $value);
|
|
||||||
return $this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Evaluating php codes inside the ODT and output the buffer (print, echo) inplace of the code
|
* Evaluating php codes inside the ODT and output the buffer (print, echo) inplace of the code
|
||||||
*
|
*
|
||||||
|
|||||||
@ -698,7 +698,7 @@ else
|
|||||||
$tmpcode='';
|
$tmpcode='';
|
||||||
if (! empty($modCodeProduct->code_auto))
|
if (! empty($modCodeProduct->code_auto))
|
||||||
$tmpcode=$modCodeProduct->getNextValue($object,$type);
|
$tmpcode=$modCodeProduct->getNextValue($object,$type);
|
||||||
print '<td class="fieldrequired" width="20%">'.$langs->trans("Ref").'</td><td><input name="ref" size="40" maxlength="32" value="'.dol_escape_htmltag(GETPOST('ref')?GETPOST('ref'):$tmpcode).'">';
|
print '<td class="fieldrequired" width="20%">'.$langs->trans("Ref").'</td><td><input name="ref" size="40" maxlength="128" value="'.dol_escape_htmltag(GETPOST('ref')?GETPOST('ref'):$tmpcode).'">';
|
||||||
if ($_error)
|
if ($_error)
|
||||||
{
|
{
|
||||||
print $langs->trans("RefAlreadyExists");
|
print $langs->trans("RefAlreadyExists");
|
||||||
@ -881,7 +881,7 @@ else
|
|||||||
print '<table class="border allwidth">';
|
print '<table class="border allwidth">';
|
||||||
|
|
||||||
// Ref
|
// Ref
|
||||||
print '<tr><td width="15%" class="fieldrequired">'.$langs->trans("Ref").'</td><td colspan="2"><input name="ref" size="40" maxlength="32" value="'.$object->ref.'"></td></tr>';
|
print '<tr><td width="15%" class="fieldrequired">'.$langs->trans("Ref").'</td><td colspan="2"><input name="ref" size="40" maxlength="128" value="'.$object->ref.'"></td></tr>';
|
||||||
|
|
||||||
// Label
|
// Label
|
||||||
print '<tr><td class="fieldrequired">'.$langs->trans("Label").'</td><td colspan="2"><input name="libelle" size="40" maxlength="255" value="'.$object->libelle.'"></td></tr>';
|
print '<tr><td class="fieldrequired">'.$langs->trans("Label").'</td><td colspan="2"><input name="libelle" size="40" maxlength="255" value="'.$object->libelle.'"></td></tr>';
|
||||||
|
|||||||
@ -7,6 +7,7 @@
|
|||||||
* Copyright (C) 2013 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
* Copyright (C) 2013 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||||
* Copyright (C) 2013 Jean Heimburger <jean@tiaris.info>
|
* Copyright (C) 2013 Jean Heimburger <jean@tiaris.info>
|
||||||
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
|
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
|
||||||
|
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -175,8 +176,8 @@ else
|
|||||||
}
|
}
|
||||||
$sql .= natural_search($params, $snom);
|
$sql .= natural_search($params, $snom);
|
||||||
}
|
}
|
||||||
if (isset($tosell) && dol_strlen($tosell) > 0) $sql.= " AND p.tosell = ".$db->escape($tosell);
|
if (isset($tosell) && dol_strlen($tosell) > 0 && $tosell!=-1) $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 && $tobuy!=-1) $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)."'";
|
||||||
if ($catid > 0) $sql.= " AND cp.fk_categorie = ".$catid;
|
if ($catid > 0) $sql.= " AND cp.fk_categorie = ".$catid;
|
||||||
if ($catid == -2) $sql.= " AND cp.fk_categorie IS NULL";
|
if ($catid == -2) $sql.= " AND cp.fk_categorie IS NULL";
|
||||||
@ -297,8 +298,9 @@ else
|
|||||||
}
|
}
|
||||||
if (! empty($conf->stock->enabled) && $user->rights->stock->lire && $type != 1) print '<td class="liste_titre" align="right">'.$langs->trans("DesiredStock").'</td>';
|
if (! empty($conf->stock->enabled) && $user->rights->stock->lire && $type != 1) print '<td class="liste_titre" align="right">'.$langs->trans("DesiredStock").'</td>';
|
||||||
if (! empty($conf->stock->enabled) && $user->rights->stock->lire && $type != 1) print '<td class="liste_titre" align="right">'.$langs->trans("PhysicalStock").'</td>';
|
if (! empty($conf->stock->enabled) && $user->rights->stock->lire && $type != 1) print '<td class="liste_titre" align="right">'.$langs->trans("PhysicalStock").'</td>';
|
||||||
print_liste_field_titre($langs->trans("Sell"), $_SERVER["PHP_SELF"], "p.tosell",$param,"",'align="right"',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("Sell"), $_SERVER["PHP_SELF"], "p.tosell",$param,"",'align="center"',$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("Buy"), $_SERVER["PHP_SELF"], "p.tobuy",$param,"",'align="right"',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("Buy"), $_SERVER["PHP_SELF"], "p.tobuy",$param,"",'align="center"',$sortfield,$sortorder);
|
||||||
|
print '<td width="1%"> </td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
// Lignes des champs de filtre
|
// Lignes des champs de filtre
|
||||||
@ -354,8 +356,12 @@ else
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
|
|
||||||
print '<td class="liste_titre">';
|
print '<td align="center">';
|
||||||
print ' ';
|
print $form->selectarray('tosell', array('0'=>$langs->trans('ProductStatusNotOnSellShort'),'1'=>$langs->trans('ProductStatusOnSellShort')),$tosell,1);
|
||||||
|
print '</td >';
|
||||||
|
|
||||||
|
print '<td align="center">';
|
||||||
|
print $form->selectarray('tobuy', array('0'=>$langs->trans('ProductStatusNotOnBuyShort'),'1'=>$langs->trans('ProductStatusOnBuyShort')),$tobuy,1);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
print '<td class="liste_titre" align="right">';
|
print '<td class="liste_titre" align="right">';
|
||||||
@ -475,11 +481,13 @@ else
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Status (to buy)
|
// Status (to buy)
|
||||||
print '<td align="right" class="nowrap">'.$product_static->LibStatut($objp->tosell,5,0).'</td>';
|
print '<td align="center" class="nowrap">'.$product_static->LibStatut($objp->tosell,5,0).'</td>';
|
||||||
|
|
||||||
// Status (to sell)
|
// Status (to sell)
|
||||||
print '<td align="right" class="nowrap">'.$product_static->LibStatut($objp->tobuy,5,1).'</td>';
|
print '<td align="center" class="nowrap">'.$product_static->LibStatut($objp->tobuy,5,1).'</td>';
|
||||||
|
|
||||||
|
print '<td> </td>';
|
||||||
|
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -268,8 +268,11 @@ else
|
|||||||
|
|
||||||
// Country
|
// Country
|
||||||
print '<tr><td>'.$langs->trans('Country').'</td><td colspan="3">';
|
print '<tr><td>'.$langs->trans('Country').'</td><td colspan="3">';
|
||||||
$img=picto_from_langcode($object->country_code);
|
if (! empty($object->country_code))
|
||||||
print ($img?$img.' ':'');
|
{
|
||||||
|
$img=picto_from_langcode($object->country_code);
|
||||||
|
print ($img?$img.' ':'');
|
||||||
|
}
|
||||||
print $object->country;
|
print $object->country;
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
|
|||||||
@ -41,6 +41,8 @@ if ($user->societe_id > 0)
|
|||||||
|
|
||||||
$sall=GETPOST('sall','alpha');
|
$sall=GETPOST('sall','alpha');
|
||||||
$search_user=GETPOST('search_user','alpha');
|
$search_user=GETPOST('search_user','alpha');
|
||||||
|
$search_statut=GETPOST('search_statut','alpha');
|
||||||
|
if ($search_statut=='') $search_statut=1; // always display activ customer first
|
||||||
|
|
||||||
$sortfield = GETPOST('sortfield','alpha');
|
$sortfield = GETPOST('sortfield','alpha');
|
||||||
$sortorder = GETPOST('sortorder','alpha');
|
$sortorder = GETPOST('sortorder','alpha');
|
||||||
@ -55,6 +57,7 @@ if (! $sortorder) $sortorder="ASC";
|
|||||||
|
|
||||||
$userstatic=new User($db);
|
$userstatic=new User($db);
|
||||||
$companystatic = new Societe($db);
|
$companystatic = new Societe($db);
|
||||||
|
$form = new Form($db);
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -86,6 +89,10 @@ if (! empty($search_user))
|
|||||||
{
|
{
|
||||||
$sql.= " AND (u.login LIKE '%".$db->escape($search_user)."%' OR u.lastname LIKE '%".$db->escape($search_user)."%' OR u.firstname LIKE '%".$db->escape($search_user)."%')";
|
$sql.= " AND (u.login LIKE '%".$db->escape($search_user)."%' OR u.lastname LIKE '%".$db->escape($search_user)."%' OR u.firstname LIKE '%".$db->escape($search_user)."%')";
|
||||||
}
|
}
|
||||||
|
if ($search_statut!='')
|
||||||
|
{
|
||||||
|
$sql.= " AND (u.statut=".$search_statut.")";
|
||||||
|
}
|
||||||
if ($sall) $sql.= " AND (u.login LIKE '%".$db->escape($sall)."%' OR u.lastname LIKE '%".$db->escape($sall)."%' OR u.firstname LIKE '%".$db->escape($sall)."%' OR u.email LIKE '%".$db->escape($sall)."%' OR u.note LIKE '%".$db->escape($sall)."%')";
|
if ($sall) $sql.= " AND (u.login LIKE '%".$db->escape($sall)."%' OR u.lastname LIKE '%".$db->escape($sall)."%' OR u.firstname LIKE '%".$db->escape($sall)."%' OR u.email LIKE '%".$db->escape($sall)."%' OR u.note LIKE '%".$db->escape($sall)."%')";
|
||||||
$sql.=$db->order($sortfield,$sortorder);
|
$sql.=$db->order($sortfield,$sortorder);
|
||||||
|
|
||||||
@ -95,6 +102,8 @@ if ($result)
|
|||||||
$num = $db->num_rows($result);
|
$num = $db->num_rows($result);
|
||||||
$i = 0;
|
$i = 0;
|
||||||
|
|
||||||
|
print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">'."\n";
|
||||||
|
|
||||||
$param="search_user=$search_user&sall=$sall";
|
$param="search_user=$search_user&sall=$sall";
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
@ -104,7 +113,22 @@ if ($result)
|
|||||||
print_liste_field_titre($langs->trans("Company"),"index.php","u.fk_societe",$param,"","",$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("Company"),"index.php","u.fk_societe",$param,"","",$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("DateCreation"),"index.php","u.datec",$param,"",'align="center"',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("DateCreation"),"index.php","u.datec",$param,"",'align="center"',$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("LastConnexion"),"index.php","u.datelastlogin",$param,"",'align="center"',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("LastConnexion"),"index.php","u.datelastlogin",$param,"",'align="center"',$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("Status"),"index.php","u.statut",$param,"",'align="right"',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("Status"),"index.php","u.statut",$param,"",'align="center"',$sortfield,$sortorder);
|
||||||
|
print '<td width="1%"> </td>';
|
||||||
|
print "</tr>\n";
|
||||||
|
|
||||||
|
//SearchBar
|
||||||
|
print '<tr class="liste_titre">';
|
||||||
|
print '<td colspan="6"> </td>';
|
||||||
|
|
||||||
|
print '<td>';
|
||||||
|
print $form->selectarray('search_statut', array('0'=>$langs->trans('Disabled'),'1'=>$langs->trans('Enabled')),$search_statut);
|
||||||
|
print '</td>';
|
||||||
|
|
||||||
|
print '<td class="liste_titre" align="right">';
|
||||||
|
print '<input class="liste_titre" type="image" src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/search.png" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'">';
|
||||||
|
print '</td>';
|
||||||
|
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
$var=True;
|
$var=True;
|
||||||
while ($i < $num)
|
while ($i < $num)
|
||||||
@ -168,11 +192,13 @@ if ($result)
|
|||||||
|
|
||||||
// Statut
|
// Statut
|
||||||
$userstatic->statut=$obj->statut;
|
$userstatic->statut=$obj->statut;
|
||||||
print '<td width="100" align="right">'.$userstatic->getLibStatut(5).'</td>';
|
print '<td width="100" align="center">'.$userstatic->getLibStatut(5).'</td>';
|
||||||
|
print '<td> </td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
print "</table>";
|
print "</table>";
|
||||||
|
print "</form>\n";
|
||||||
$db->free($result);
|
$db->free($result);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@ -113,7 +113,8 @@ $contact_fields = array(
|
|||||||
'user_id' => array('name'=>'user_id','type'=>'xsd:string'),
|
'user_id' => array('name'=>'user_id','type'=>'xsd:string'),
|
||||||
'user_login' => array('name'=>'user_login','type'=>'xsd:string'),
|
'user_login' => array('name'=>'user_login','type'=>'xsd:string'),
|
||||||
'civility_id' => array('name'=>'civility_id','type'=>'xsd:string'),
|
'civility_id' => array('name'=>'civility_id','type'=>'xsd:string'),
|
||||||
'poste' => array('name'=>'poste','type'=>'xsd:string')
|
'poste' => array('name'=>'poste','type'=>'xsd:string'),
|
||||||
|
'statut' => array('name'=>'statut','type'=>'xsd:string')
|
||||||
//...
|
//...
|
||||||
);
|
);
|
||||||
//Retreive all extrafield for contact
|
//Retreive all extrafield for contact
|
||||||
@ -302,7 +303,8 @@ function getContact($authentication,$id,$ref='',$ref_ext='')
|
|||||||
'user_id' => $contact->user_id,
|
'user_id' => $contact->user_id,
|
||||||
'user_login' => $contact->user_login,
|
'user_login' => $contact->user_login,
|
||||||
'civilite_id' => $contact->civility_id,
|
'civilite_id' => $contact->civility_id,
|
||||||
'poste' => $contact->poste
|
'poste' => $contact->poste,
|
||||||
|
'statut' => $contact->statut
|
||||||
);
|
);
|
||||||
|
|
||||||
//Retreive all extrafield for thirdsparty
|
//Retreive all extrafield for thirdsparty
|
||||||
@ -412,6 +414,7 @@ function createContact($authentication,$contact)
|
|||||||
$newobject->user_id=$contact['user_id'];
|
$newobject->user_id=$contact['user_id'];
|
||||||
$newobject->user_login=$contact['user_login'];
|
$newobject->user_login=$contact['user_login'];
|
||||||
$newobject->poste=$contact['poste'];
|
$newobject->poste=$contact['poste'];
|
||||||
|
$newobject->statut=$contact['statut'];
|
||||||
|
|
||||||
//Retreive all extrafield for thirdsparty
|
//Retreive all extrafield for thirdsparty
|
||||||
// fetch optionals attributes and labels
|
// fetch optionals attributes and labels
|
||||||
@ -488,7 +491,7 @@ function getContactsForThirdParty($authentication,$idthirdparty)
|
|||||||
{
|
{
|
||||||
$linesinvoice=array();
|
$linesinvoice=array();
|
||||||
|
|
||||||
$sql = "SELECT c.rowid, c.fk_soc, c.civilite as civility_id, c.lastname, c.firstname,";
|
$sql = "SELECT c.rowid, c.fk_soc, c.civilite as civility_id, c.lastname, c.firstname, c.statut,";
|
||||||
$sql.= " c.address, c.zip, c.town,";
|
$sql.= " c.address, c.zip, c.town,";
|
||||||
$sql.= " c.fk_pays as country_id,";
|
$sql.= " c.fk_pays as country_id,";
|
||||||
$sql.= " c.fk_departement,";
|
$sql.= " c.fk_departement,";
|
||||||
@ -565,7 +568,8 @@ function getContactsForThirdParty($authentication,$idthirdparty)
|
|||||||
'ref_commande' => $contact->ref_commande?$contact->ref_commande:'',
|
'ref_commande' => $contact->ref_commande?$contact->ref_commande:'',
|
||||||
'ref_propal' => $contact->ref_propal?$contact->ref_propal:'',
|
'ref_propal' => $contact->ref_propal?$contact->ref_propal:'',
|
||||||
'user_id' => $contact->user_id?$contact->user_id:'',
|
'user_id' => $contact->user_id?$contact->user_id:'',
|
||||||
'user_login' => $contact->no_email?$contact->user_login:''
|
'user_login' => $contact->user_login?$contact->user_login:'',
|
||||||
|
'statut' => $contact->statut?$contact->statut:''
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -659,6 +663,8 @@ function updateContact($authentication,$contact)
|
|||||||
$object->civilite_id=$contact['civility_id'];
|
$object->civilite_id=$contact['civility_id'];
|
||||||
$object->poste=$contact['poste'];
|
$object->poste=$contact['poste'];
|
||||||
|
|
||||||
|
$object->statut=$contact['statut'];
|
||||||
|
|
||||||
|
|
||||||
//Retreive all extrafield for contact
|
//Retreive all extrafield for contact
|
||||||
// fetch optionals attributes and labels
|
// fetch optionals attributes and labels
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user