mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-06 09:38:23 +01:00
Fix: Fix GNU address
Doxygen
This commit is contained in:
@@ -116,8 +116,9 @@ class Adherent extends CommonObject
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adherent
|
* Constructor
|
||||||
* @param DB base de donnees
|
*
|
||||||
|
* @param DoliDB $DB Database handler
|
||||||
*/
|
*/
|
||||||
function Adherent($DB)
|
function Adherent($DB)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -49,8 +49,9 @@ class AdherentType extends CommonObject
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief AdherentType
|
* Constructor
|
||||||
* \param DB handler acces base de donnees
|
*
|
||||||
|
* @param DoliDB $DB Database handler
|
||||||
*/
|
*/
|
||||||
function AdherentType($DB)
|
function AdherentType($DB)
|
||||||
{
|
{
|
||||||
@@ -194,6 +195,7 @@ class AdherentType extends CommonObject
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Return list of members' type
|
* Return list of members' type
|
||||||
|
*
|
||||||
* @return array List of types of members
|
* @return array List of types of members
|
||||||
*/
|
*/
|
||||||
function liste_array()
|
function liste_array()
|
||||||
@@ -233,11 +235,12 @@ class AdherentType extends CommonObject
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Renvoie nom clicable (avec eventuellement le picto)
|
* Renvoie nom clicable (avec eventuellement le picto)
|
||||||
* \param withpicto 0=Pas de picto, 1=Inclut le picto dans le lien, 2=Picto seul
|
*
|
||||||
* \param maxlen length max libelle
|
* @param withpicto 0=Pas de picto, 1=Inclut le picto dans le lien, 2=Picto seul
|
||||||
* \param option Page lien
|
* @param maxlen length max libelle
|
||||||
* \return string Chaine avec URL
|
* @param option Page lien
|
||||||
|
* @return string Chaine avec URL
|
||||||
*/
|
*/
|
||||||
function getNomUrl($withpicto=0,$maxlen=0)
|
function getNomUrl($withpicto=0,$maxlen=0)
|
||||||
{
|
{
|
||||||
@@ -260,6 +263,7 @@ class AdherentType extends CommonObject
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* getMailOnValid
|
* getMailOnValid
|
||||||
|
*
|
||||||
* @return Return mail model
|
* @return Return mail model
|
||||||
*/
|
*/
|
||||||
function getMailOnValid()
|
function getMailOnValid()
|
||||||
@@ -278,6 +282,7 @@ class AdherentType extends CommonObject
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* getMailOnSubscription
|
* getMailOnSubscription
|
||||||
|
*
|
||||||
* @return Return mail model
|
* @return Return mail model
|
||||||
*/
|
*/
|
||||||
function getMailOnSubscription()
|
function getMailOnSubscription()
|
||||||
@@ -296,6 +301,7 @@ class AdherentType extends CommonObject
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* getMailOnResiliate
|
* getMailOnResiliate
|
||||||
|
*
|
||||||
* @return Return mail model
|
* @return Return mail model
|
||||||
*/
|
*/
|
||||||
function getMailOnResiliate()
|
function getMailOnResiliate()
|
||||||
|
|||||||
@@ -45,12 +45,12 @@ class AdherentStats extends Stats
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
*
|
*
|
||||||
* @param $DB Database handler
|
* @param DoliDB $DB Database handler
|
||||||
* @param $socid Id third party
|
* @param int $socid Id third party
|
||||||
* @param $userid Id user for filter
|
* @param int $userid Id user for filter
|
||||||
* @return AdherentStats
|
* @return AdherentStats
|
||||||
*/
|
*/
|
||||||
function AdherentStats($DB, $socid=0, $userid=0)
|
function AdherentStats($DB, $socid=0, $userid=0)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -49,8 +49,9 @@ class Cotisation extends CommonObject
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Constructor
|
* Constructor
|
||||||
* \param DB Handler base de donnees
|
*
|
||||||
|
* @param DoliDB $DB Database handler
|
||||||
*/
|
*/
|
||||||
function Cotisation($DB)
|
function Cotisation($DB)
|
||||||
{
|
{
|
||||||
@@ -59,9 +60,10 @@ class Cotisation extends CommonObject
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Fonction qui permet de creer la cotisation
|
* Fonction qui permet de creer la cotisation
|
||||||
* \param userid userid de celui qui insere
|
*
|
||||||
* \return int <0 si KO, Id cotisation cree si OK
|
* @param userid userid de celui qui insere
|
||||||
|
* @return int <0 si KO, Id cotisation cree si OK
|
||||||
*/
|
*/
|
||||||
function create($userid)
|
function create($userid)
|
||||||
{
|
{
|
||||||
@@ -95,9 +97,10 @@ class Cotisation extends CommonObject
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Fonction qui permet de recuperer une cotisation
|
* Fonction qui permet de recuperer une cotisation
|
||||||
* \param rowid Id cotisation
|
*
|
||||||
* \return int <0 si KO, =0 si OK mais non trouve, >0 si OK
|
* @param rowid Id cotisation
|
||||||
|
* @return int <0 si KO, =0 si OK mais non trouve, >0 si OK
|
||||||
*/
|
*/
|
||||||
function fetch($rowid)
|
function fetch($rowid)
|
||||||
{
|
{
|
||||||
@@ -144,10 +147,11 @@ class Cotisation extends CommonObject
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Met a jour en base la cotisation
|
* Met a jour en base la cotisation
|
||||||
* \param user Objet user qui met a jour
|
*
|
||||||
* \param notrigger 0=Desactive les triggers
|
* @param user Objet user qui met a jour
|
||||||
* \param int <0 if KO, >0 if OK
|
* @param notrigger 0=Desactive les triggers
|
||||||
|
* @param int <0 if KO, >0 if OK
|
||||||
*/
|
*/
|
||||||
function update($user,$notrigger=0)
|
function update($user,$notrigger=0)
|
||||||
{
|
{
|
||||||
@@ -184,9 +188,10 @@ class Cotisation extends CommonObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Delete a subscription
|
* Delete a subscription
|
||||||
* \param rowid Id cotisation
|
*
|
||||||
* \return int <0 si KO, 0 si OK mais non trouve, >0 si OK
|
* @param rowid Id cotisation
|
||||||
|
* @return int <0 si KO, 0 si OK mais non trouve, >0 si OK
|
||||||
*/
|
*/
|
||||||
function delete($user)
|
function delete($user)
|
||||||
{
|
{
|
||||||
@@ -250,9 +255,10 @@ class Cotisation extends CommonObject
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Renvoie nom clicable (avec eventuellement le picto)
|
* Renvoie nom clicable (avec eventuellement le picto)
|
||||||
* \param withpicto 0=Pas de picto, 1=Inclut le picto dans le lien, 2=Picto seul
|
*
|
||||||
* \return string Chaine avec URL
|
* @param withpicto 0=Pas de picto, 1=Inclut le picto dans le lien, 2=Picto seul
|
||||||
|
* @return string Chaine avec URL
|
||||||
*/
|
*/
|
||||||
function getNomUrl($withpicto=0)
|
function getNomUrl($withpicto=0)
|
||||||
{
|
{
|
||||||
@@ -274,8 +280,9 @@ class Cotisation extends CommonObject
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Charge les informations d'ordre info dans l'objet cotisation
|
* Charge les informations d'ordre info dans l'objet cotisation
|
||||||
* \param id Id adhesion a charger
|
*
|
||||||
|
* @param id Id adhesion a charger
|
||||||
*/
|
*/
|
||||||
function info($id)
|
function info($id)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -168,7 +168,7 @@ dol_fiche_head($head, $tab, $langs->trans("Statistics"), 0, 'user');
|
|||||||
|
|
||||||
|
|
||||||
// Print title
|
// Print title
|
||||||
if ($mode && ! sizeof($data))
|
if ($mode && ! count($data))
|
||||||
{
|
{
|
||||||
print $langs->trans("NoValidatedMemberYet").'<br>';
|
print $langs->trans("NoValidatedMemberYet").'<br>';
|
||||||
print '<br>';
|
print '<br>';
|
||||||
@@ -202,7 +202,7 @@ if ($mode == 'memberbycountry')
|
|||||||
print "function drawMap() {\n\tvar data = new google.visualization.DataTable();\n";
|
print "function drawMap() {\n\tvar data = new google.visualization.DataTable();\n";
|
||||||
|
|
||||||
// Get the total number of rows
|
// Get the total number of rows
|
||||||
print "\tdata.addRows(".sizeof($data).");\n";
|
print "\tdata.addRows(".count($data).");\n";
|
||||||
print "\tdata.addColumn('string', 'Country');\n";
|
print "\tdata.addColumn('string', 'Country');\n";
|
||||||
print "\tdata.addColumn('number', 'Number');\n";
|
print "\tdata.addColumn('number', 'Number');\n";
|
||||||
|
|
||||||
|
|||||||
@@ -79,12 +79,9 @@ if ($action == "save" && empty($_POST["cancel"]))
|
|||||||
//print "param=".$param." - ".$_POST[$param];
|
//print "param=".$param." - ".$_POST[$param];
|
||||||
if (! empty($_POST[$param])) $res = dolibarr_set_const($db,$param,$_POST[$param],'chaine',0,'',$conf->entity);
|
if (! empty($_POST[$param])) $res = dolibarr_set_const($db,$param,$_POST[$param],'chaine',0,'',$conf->entity);
|
||||||
else $res = dolibarr_del_const($db,$param,$conf->entity);
|
else $res = dolibarr_del_const($db,$param,$conf->entity);
|
||||||
|
if (! $res > 0) $error++;
|
||||||
}
|
}
|
||||||
|
|
||||||
$db->commit();
|
|
||||||
|
|
||||||
if (! $res > 0) $error++;
|
|
||||||
|
|
||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
$db->commit();
|
$db->commit();
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2003-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2003-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
|
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@@ -18,9 +18,9 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \file htdocs/includes/modules/barcode/admin/barcode.php
|
* \file htdocs/admin/barcode.php
|
||||||
* \ingroup barcode
|
* \ingroup barcode
|
||||||
* \brief Page d'administration/configuration du module Code barre
|
* \brief Page to setup barcode module
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require("../main.inc.php");
|
require("../main.inc.php");
|
||||||
|
|||||||
@@ -261,7 +261,7 @@ if ($action == 'create')
|
|||||||
if ($res)
|
if ($res)
|
||||||
{
|
{
|
||||||
|
|
||||||
while ($menu = $db->fetch_array ($res))
|
while ($menu = $db->fetch_array($res))
|
||||||
{
|
{
|
||||||
$parent_rowid = $menu['rowid'];
|
$parent_rowid = $menu['rowid'];
|
||||||
$parent_mainmenu = $menu['mainmenu'];
|
$parent_mainmenu = $menu['mainmenu'];
|
||||||
|
|||||||
@@ -300,7 +300,7 @@ if ($conf->use_javascript_ajax)
|
|||||||
$num = $db->num_rows($res);
|
$num = $db->num_rows($res);
|
||||||
|
|
||||||
$i = 1;
|
$i = 1;
|
||||||
while ($menu = $db->fetch_array ($res))
|
while ($menu = $db->fetch_array($res))
|
||||||
{
|
{
|
||||||
if (! empty($menu['langs'])) $langs->load($menu['langs']);
|
if (! empty($menu['langs'])) $langs->load($menu['langs']);
|
||||||
$titre = $langs->trans($menu['titre']);
|
$titre = $langs->trans($menu['titre']);
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU',1);
|
|||||||
if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML',1);
|
if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML',1);
|
||||||
if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1');
|
if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1');
|
||||||
|
|
||||||
session_cache_limiter( FALSE );
|
session_cache_limiter(FALSE);
|
||||||
|
|
||||||
require_once("../../master.inc.php");
|
require_once("../../master.inc.php");
|
||||||
require_once(DOL_DOCUMENT_ROOT."/lib/functions.lib.php");
|
require_once(DOL_DOCUMENT_ROOT."/lib/functions.lib.php");
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ require_once(DOL_DOCUMENT_ROOT."/lib/admin.lib.php");
|
|||||||
require_once(DOL_DOCUMENT_ROOT."/includes/triggers/interface_modNotification_Notification.class.php");
|
require_once(DOL_DOCUMENT_ROOT."/includes/triggers/interface_modNotification_Notification.class.php");
|
||||||
|
|
||||||
$langs->load("admin");
|
$langs->load("admin");
|
||||||
|
$langs->load("mails");
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
if (!$user->admin)
|
if (!$user->admin)
|
||||||
@@ -63,7 +64,7 @@ print_fiche_titre($langs->trans("NotificationSetup"),$linkback,'setup');
|
|||||||
|
|
||||||
print $langs->trans("NotificationsDesc").'<br><br>';
|
print $langs->trans("NotificationsDesc").'<br><br>';
|
||||||
|
|
||||||
if ($mesg) print $mesg.'<br>';
|
dol_htmloutput_mesg($mesg);
|
||||||
|
|
||||||
print '<form method="post" action="'.$_SERVER["PHP_SELF"].'">';
|
print '<form method="post" action="'.$_SERVER["PHP_SELF"].'">';
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
@@ -80,6 +81,7 @@ $var=!$var;
|
|||||||
print '<tr '.$bc[$var].'><td>';
|
print '<tr '.$bc[$var].'><td>';
|
||||||
print $langs->trans("NotificationEMailFrom").'</td><td>';
|
print $langs->trans("NotificationEMailFrom").'</td><td>';
|
||||||
print '<input size="32" type="text" name="email_from" value="'.$conf->global->NOTIFICATION_EMAIL_FROM.'">';
|
print '<input size="32" type="text" name="email_from" value="'.$conf->global->NOTIFICATION_EMAIL_FROM.'">';
|
||||||
|
if (! empty($conf->global->NOTIFICATION_EMAIL_FROM) && ! isValidEmail($conf->global->NOTIFICATION_EMAIL_FROM)) print ' '.img_warning($langs->trans("BadEMail"));
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
@@ -121,5 +123,4 @@ $db->close();
|
|||||||
|
|
||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -40,9 +40,11 @@ $action = GETPOST("action");
|
|||||||
|
|
||||||
if ($action == "set")
|
if ($action == "set")
|
||||||
{
|
{
|
||||||
|
$db->begin();
|
||||||
for ($i = 0 ; $i < 2 ; $i++)
|
for ($i = 0 ; $i < 2 ; $i++)
|
||||||
{
|
{
|
||||||
$res = dolibarr_set_const($db, $_POST["nom$i"], $_POST["value$i"],'chaine',0,'',$conf->entity);
|
$res = dolibarr_set_const($db, $_POST["nom$i"], $_POST["value$i"],'chaine',0,'',$conf->entity);
|
||||||
|
if (! $res > 0) $error++;
|
||||||
}
|
}
|
||||||
|
|
||||||
$id=$_POST["PRELEVEMENT_ID_BANKACCOUNT"];
|
$id=$_POST["PRELEVEMENT_ID_BANKACCOUNT"];
|
||||||
@@ -51,23 +53,32 @@ if ($action == "set")
|
|||||||
if($account->fetch($id)>0)
|
if($account->fetch($id)>0)
|
||||||
{
|
{
|
||||||
$res = dolibarr_set_const($db, "PRELEVEMENT_ID_BANKACCOUNT", $id,'chaine',0,'',$conf->entity);
|
$res = dolibarr_set_const($db, "PRELEVEMENT_ID_BANKACCOUNT", $id,'chaine',0,'',$conf->entity);
|
||||||
|
if (! $res > 0) $error++;
|
||||||
$res = dolibarr_set_const($db, "PRELEVEMENT_CODE_BANQUE", $account->code_banque,'chaine',0,'',$conf->entity);
|
$res = dolibarr_set_const($db, "PRELEVEMENT_CODE_BANQUE", $account->code_banque,'chaine',0,'',$conf->entity);
|
||||||
|
if (! $res > 0) $error++;
|
||||||
$res = dolibarr_set_const($db, "PRELEVEMENT_CODE_GUICHET", $account->code_guichet,'chaine',0,'',$conf->entity);
|
$res = dolibarr_set_const($db, "PRELEVEMENT_CODE_GUICHET", $account->code_guichet,'chaine',0,'',$conf->entity);
|
||||||
|
if (! $res > 0) $error++;
|
||||||
$res = dolibarr_set_const($db, "PRELEVEMENT_NUMERO_COMPTE", $account->number,'chaine',0,'',$conf->entity);
|
$res = dolibarr_set_const($db, "PRELEVEMENT_NUMERO_COMPTE", $account->number,'chaine',0,'',$conf->entity);
|
||||||
|
if (! $res > 0) $error++;
|
||||||
$res = dolibarr_set_const($db, "PRELEVEMENT_NUMBER_KEY", $account->cle_rib,'chaine',0,'',$conf->entity);
|
$res = dolibarr_set_const($db, "PRELEVEMENT_NUMBER_KEY", $account->cle_rib,'chaine',0,'',$conf->entity);
|
||||||
|
if (! $res > 0) $error++;
|
||||||
$res = dolibarr_set_const($db, "PRELEVEMENT_IBAN", $account->iban,'chaine',0,'',$conf->entity);
|
$res = dolibarr_set_const($db, "PRELEVEMENT_IBAN", $account->iban,'chaine',0,'',$conf->entity);
|
||||||
|
if (! $res > 0) $error++;
|
||||||
$res = dolibarr_set_const($db, "PRELEVEMENT_BIC", $account->bic,'chaine',0,'',$conf->entity);
|
$res = dolibarr_set_const($db, "PRELEVEMENT_BIC", $account->bic,'chaine',0,'',$conf->entity);
|
||||||
|
if (! $res > 0) $error++;
|
||||||
$res = dolibarr_set_const($db, "PRELEVEMENT_RAISON_SOCIALE", $account->proprio,'chaine',0,'',$conf->entity);
|
$res = dolibarr_set_const($db, "PRELEVEMENT_RAISON_SOCIALE", $account->proprio,'chaine',0,'',$conf->entity);
|
||||||
|
if (! $res > 0) $error++;
|
||||||
}
|
}
|
||||||
|
else $error++;
|
||||||
|
|
||||||
if (! $res > 0) $error++;
|
|
||||||
|
|
||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
|
$db->commit();
|
||||||
$mesg = "<font class=\"ok\">".$langs->trans("SetupSaved")."</font>";
|
$mesg = "<font class=\"ok\">".$langs->trans("SetupSaved")."</font>";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
$db->rollback();
|
||||||
$mesg = "<font class=\"error\">".$langs->trans("Error")."</font>";
|
$mesg = "<font class=\"error\">".$langs->trans("Error")."</font>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2010 Regis Houssin <regis@dolibarr.fr>
|
/* Copyright (C) 2010 Regis Houssin <regis@dolibarr.fr>
|
||||||
* Copyright (C) 2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
|
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
|
||||||
*
|
*
|
||||||
* 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
|
||||||
@@ -42,16 +43,27 @@ $action=GETPOST('action');
|
|||||||
* Actions
|
* Actions
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if ($_POST["action"] == 'updateMask')
|
if ($action == 'updateMask')
|
||||||
{
|
{
|
||||||
$maskconstproject=$_POST['maskconstproject'];
|
$maskconstproject=GETPOST("maskconstproject");
|
||||||
$maskproject=$_POST['maskproject'];
|
$maskproject=GETPOST("maskproject");
|
||||||
if ($maskconstproject) dolibarr_set_const($db,$maskconstproject,$maskproject,'chaine',0,'',$conf->entity);
|
if ($maskconstproject) $res = dolibarr_set_const($db,$maskconstproject,$maskproject,'chaine',0,'',$conf->entity);
|
||||||
|
|
||||||
|
if (! $res > 0) $error++;
|
||||||
|
|
||||||
|
if (! $error)
|
||||||
|
{
|
||||||
|
$mesg = "<font class=\"ok\">".$langs->trans("SetupSaved")."</font>";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$mesg = "<font class=\"error\">".$langs->trans("Error")."</font>";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($_GET["action"] == 'specimen')
|
if ($action == 'specimen')
|
||||||
{
|
{
|
||||||
$modele=$_GET["module"];
|
$modele=GETPOST("module");
|
||||||
|
|
||||||
$project = new Project($db);
|
$project = new Project($db);
|
||||||
$project->initAsSpecimen();
|
$project->initAsSpecimen();
|
||||||
@@ -84,13 +96,16 @@ if ($_GET["action"] == 'specimen')
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($_GET["action"] == 'set')
|
if ($action == 'set')
|
||||||
{
|
{
|
||||||
|
$label = GETPOST("label");
|
||||||
|
$scandir = GETPOST("scandir");
|
||||||
|
|
||||||
$type='project';
|
$type='project';
|
||||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."document_model (nom, type, entity, libelle, description)";
|
$sql = "INSERT INTO ".MAIN_DB_PREFIX."document_model (nom, type, entity, libelle, description)";
|
||||||
$sql.= " VALUES ('".$db->escape($_GET["value"])."','".$type."',".$conf->entity.", ";
|
$sql.= " VALUES ('".$db->escape($value)."','".$type."',".$conf->entity.", ";
|
||||||
$sql.= ($_GET["label"]?"'".$db->escape($_GET["label"])."'":'null').", ";
|
$sql.= ($label?"'".$db->escape($label)."'":'null').", ";
|
||||||
$sql.= (! empty($_GET["scandir"])?"'".$db->escape($_GET["scandir"])."'":"null");
|
$sql.= (! empty($scandir)?"'".$db->escape($scandir)."'":"null");
|
||||||
$sql.= ")";
|
$sql.= ")";
|
||||||
if ($db->query($sql))
|
if ($db->query($sql))
|
||||||
{
|
{
|
||||||
@@ -98,7 +113,7 @@ if ($_GET["action"] == 'set')
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($_GET["action"] == 'del')
|
if ($action == 'del')
|
||||||
{
|
{
|
||||||
$type='project';
|
$type='project';
|
||||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."document_model";
|
$sql = "DELETE FROM ".MAIN_DB_PREFIX."document_model";
|
||||||
@@ -111,27 +126,30 @@ if ($_GET["action"] == 'del')
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($_GET["action"] == 'setdoc')
|
if ($action == 'setdoc')
|
||||||
{
|
{
|
||||||
|
$label = GETPOST("label");
|
||||||
|
$scandir = GETPOST("scandir");
|
||||||
|
|
||||||
$db->begin();
|
$db->begin();
|
||||||
|
|
||||||
if (dolibarr_set_const($db, "PROJECT_ADDON_PDF",$_GET["value"],'chaine',0,'',$conf->entity))
|
if (dolibarr_set_const($db, "PROJECT_ADDON_PDF",$value,'chaine',0,'',$conf->entity))
|
||||||
{
|
{
|
||||||
$conf->global->PROJECT_ADDON_PDF = $_GET["value"];
|
$conf->global->PROJECT_ADDON_PDF = $value;
|
||||||
}
|
}
|
||||||
|
|
||||||
// On active le modele
|
// On active le modele
|
||||||
$type='project';
|
$type='project';
|
||||||
$sql_del = "DELETE FROM ".MAIN_DB_PREFIX."document_model";
|
$sql_del = "DELETE FROM ".MAIN_DB_PREFIX."document_model";
|
||||||
$sql_del.= " WHERE nom = '".$db->escape($_GET["value"])."'";
|
$sql_del.= " WHERE nom = '".$db->escape($value)."'";
|
||||||
$sql_del.= " AND type = '".$type."'";
|
$sql_del.= " AND type = '".$type."'";
|
||||||
$sql_del.= " AND entity = ".$conf->entity;
|
$sql_del.= " AND entity = ".$conf->entity;
|
||||||
$result1=$db->query($sql_del);
|
$result1=$db->query($sql_del);
|
||||||
|
|
||||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."document_model (nom, type, entity, libelle, description)";
|
$sql = "INSERT INTO ".MAIN_DB_PREFIX."document_model (nom, type, entity, libelle, description)";
|
||||||
$sql.= " VALUES ('".$db->escape($_GET["value"])."', '".$type."', ".$conf->entity.", ";
|
$sql.= " VALUES ('".$db->escape($value)."', '".$type."', ".$conf->entity.", ";
|
||||||
$sql.= ($_GET["label"]?"'".$db->escape($_GET["label"])."'":'null').", ";
|
$sql.= ($label?"'".$db->escape($label)."'":'null').", ";
|
||||||
$sql.= (! empty($_GET["scandir"])?"'".$db->escape($_GET["scandir"])."'":"null");
|
$sql.= (! empty($scandir)?"'".$db->escape($scandir)."'":"null");
|
||||||
$sql.= ")";
|
$sql.= ")";
|
||||||
$result2=$db->query($sql);
|
$result2=$db->query($sql);
|
||||||
if ($result1 && $result2)
|
if ($result1 && $result2)
|
||||||
@@ -144,7 +162,7 @@ if ($_GET["action"] == 'setdoc')
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($_GET["action"] == 'setmod')
|
if ($action == 'setmod')
|
||||||
{
|
{
|
||||||
// TODO Verifier si module numerotation choisi peut etre active
|
// TODO Verifier si module numerotation choisi peut etre active
|
||||||
// par appel methode canBeActivated
|
// par appel methode canBeActivated
|
||||||
@@ -380,5 +398,9 @@ if (is_resource($handle))
|
|||||||
|
|
||||||
print '</table><br/>';
|
print '</table><br/>';
|
||||||
|
|
||||||
|
dol_htmloutput_mesg($mesg);
|
||||||
|
|
||||||
|
$db->close();
|
||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -88,9 +88,9 @@ if ($action == 'COMPANY_USE_SEARCH_TO_SELECT')
|
|||||||
if ($action == 'setModuleOptions')
|
if ($action == 'setModuleOptions')
|
||||||
{
|
{
|
||||||
$post_size=count($_POST);
|
$post_size=count($_POST);
|
||||||
|
|
||||||
$db->begin();
|
$db->begin();
|
||||||
|
|
||||||
for($i=0;$i < $post_size;$i++)
|
for($i=0;$i < $post_size;$i++)
|
||||||
{
|
{
|
||||||
if (array_key_exists('param'.$i,$_POST))
|
if (array_key_exists('param'.$i,$_POST))
|
||||||
@@ -118,7 +118,7 @@ if ($action == 'set')
|
|||||||
{
|
{
|
||||||
$label = GETPOST("label");
|
$label = GETPOST("label");
|
||||||
$scandir = GETPOST("scandir");
|
$scandir = GETPOST("scandir");
|
||||||
|
|
||||||
$type='company';
|
$type='company';
|
||||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."document_model (nom, type, entity, libelle, description)";
|
$sql = "INSERT INTO ".MAIN_DB_PREFIX."document_model (nom, type, entity, libelle, description)";
|
||||||
$sql.= " VALUES ('".$db->escape($value)."','".$type."',".$conf->entity.", ";
|
$sql.= " VALUES ('".$db->escape($value)."','".$type."',".$conf->entity.", ";
|
||||||
@@ -150,7 +150,7 @@ if ($action == 'setdoc')
|
|||||||
{
|
{
|
||||||
$label = GETPOST("label");
|
$label = GETPOST("label");
|
||||||
$scandir = GETPOST("scandir");
|
$scandir = GETPOST("scandir");
|
||||||
|
|
||||||
$db->begin();
|
$db->begin();
|
||||||
|
|
||||||
if (dolibarr_set_const($db, "COMPANY_ADDON_PDF",$value,'chaine',0,'',$conf->entity))
|
if (dolibarr_set_const($db, "COMPANY_ADDON_PDF",$value,'chaine',0,'',$conf->entity))
|
||||||
@@ -189,7 +189,7 @@ if ($action == 'setdoc')
|
|||||||
if ($action == 'setprofid')
|
if ($action == 'setprofid')
|
||||||
{
|
{
|
||||||
$status = GETPOST("status");
|
$status = GETPOST("status");
|
||||||
|
|
||||||
$idprof="SOCIETE_IDPROF".$value."_UNIQUE";
|
$idprof="SOCIETE_IDPROF".$value."_UNIQUE";
|
||||||
if (dolibarr_set_const($db, $idprof,$status,'chaine',0,'',$conf->entity) > 0)
|
if (dolibarr_set_const($db, $idprof,$status,'chaine',0,'',$conf->entity) > 0)
|
||||||
{
|
{
|
||||||
@@ -518,7 +518,8 @@ $profid[3][1]=$langs->transcountry('ProfId4' ,$mysoc->pays_code);
|
|||||||
$var = true;
|
$var = true;
|
||||||
$i=0;
|
$i=0;
|
||||||
|
|
||||||
while ($i < sizeof($profid))
|
$nbofloop=count($profid);
|
||||||
|
while ($i < $nbofloop)
|
||||||
{
|
{
|
||||||
$var = !$var;
|
$var = !$var;
|
||||||
|
|
||||||
|
|||||||
@@ -1804,7 +1804,7 @@ else
|
|||||||
print_liste_field_titre($langs->trans('Price'),$_SERVER["PHP_SELF"],'p.total_ht','',$param, 'align="right"',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans('Price'),$_SERVER["PHP_SELF"],'p.total_ht','',$param, 'align="right"',$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans('Author'),$_SERVER["PHP_SELF"],'u.login','',$param,'align="right"',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans('Author'),$_SERVER["PHP_SELF"],'u.login','',$param,'align="right"',$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans('Status'),$_SERVER["PHP_SELF"],'p.fk_statut','',$param,'align="right"',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans('Status'),$_SERVER["PHP_SELF"],'p.fk_statut','',$param,'align="right"',$sortfield,$sortorder);
|
||||||
print '<td class="liste_titre"> </td>';
|
print_liste_field_titre('');
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
// Lignes des champs de filtre
|
// Lignes des champs de filtre
|
||||||
print '<form method="get" action="'.$_SERVER["PHP_SELF"].'">';
|
print '<form method="get" action="'.$_SERVER["PHP_SELF"].'">';
|
||||||
|
|||||||
@@ -2094,7 +2094,7 @@ class Propal extends CommonObject
|
|||||||
$this->nbtodolate++;
|
$this->nbtodolate++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// \todo Definir regle des propales a facturer en retard
|
// TODO Definir regle des propales a facturer en retard
|
||||||
// if ($mode == 'signed' && ! sizeof($this->FactureListeArray($obj->rowid))) $this->nbtodolate++;
|
// if ($mode == 'signed' && ! sizeof($this->FactureListeArray($obj->rowid))) $this->nbtodolate++;
|
||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ if ($action == 'set_BANK_CHEQUERECEIPT_FREE_TEXT')
|
|||||||
{
|
{
|
||||||
$free = GETPOST("BANK_CHEQUERECEIPT_FREE_TEXT");
|
$free = GETPOST("BANK_CHEQUERECEIPT_FREE_TEXT");
|
||||||
$res = dolibarr_set_const($db, "BANK_CHEQUERECEIPT_FREE_TEXT",$free,'chaine',0,'',$conf->entity);
|
$res = dolibarr_set_const($db, "BANK_CHEQUERECEIPT_FREE_TEXT",$free,'chaine',0,'',$conf->entity);
|
||||||
|
|
||||||
if (! $res > 0) $error++;
|
if (! $res > 0) $error++;
|
||||||
|
|
||||||
if (! $error)
|
if (! $error)
|
||||||
@@ -78,7 +78,7 @@ if ($action == 'setbankorder')
|
|||||||
* view
|
* view
|
||||||
*/
|
*/
|
||||||
|
|
||||||
llxHeader("","");
|
llxHeader("",$langs->trans("BankSetupModule"));
|
||||||
|
|
||||||
$html=new Form($db);
|
$html=new Form($db);
|
||||||
|
|
||||||
@@ -144,7 +144,8 @@ $bankorder[1][2]='BankCode DeskCode BankAccountNumberKey AccountNumber';
|
|||||||
$var = true;
|
$var = true;
|
||||||
$i=0;
|
$i=0;
|
||||||
|
|
||||||
while ($i < sizeof($bankorder))
|
$nbofbank=count($bankorder);
|
||||||
|
while ($i < $nbofbank)
|
||||||
{
|
{
|
||||||
$var = !$var;
|
$var = !$var;
|
||||||
|
|
||||||
@@ -174,11 +175,11 @@ while ($i < sizeof($bankorder))
|
|||||||
print '</a></td>';
|
print '</a></td>';
|
||||||
}
|
}
|
||||||
print '<td> </td>';
|
print '<td> </td>';
|
||||||
print "</tr>\n";
|
print '</tr>'."\n";
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
print "</table>\n";
|
print '</table>'."\n";
|
||||||
|
|
||||||
dol_htmloutput_mesg($mesg);
|
dol_htmloutput_mesg($mesg);
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2007-2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2007-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
|
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
|
||||||
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
|
||||||
*
|
*
|
||||||
@@ -44,9 +44,9 @@ class RemiseCheque extends CommonObject
|
|||||||
var $errno;
|
var $errno;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Constructeur de la classe
|
* Constructor
|
||||||
* \param DB handler acces base de donnees
|
*
|
||||||
* \param id id compte (0 par defaut)
|
* @param DoliDB $DB Database handler
|
||||||
*/
|
*/
|
||||||
function RemiseCheque($DB)
|
function RemiseCheque($DB)
|
||||||
{
|
{
|
||||||
@@ -56,10 +56,11 @@ class RemiseCheque extends CommonObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Load record
|
* Load record
|
||||||
* \param id Id record
|
*
|
||||||
* \param ref Ref record
|
* @param id Id record
|
||||||
* \return int <0 if KO, > 0 if OK
|
* @param ref Ref record
|
||||||
|
* @return int <0 if KO, > 0 if OK
|
||||||
*/
|
*/
|
||||||
function fetch($id,$ref='')
|
function fetch($id,$ref='')
|
||||||
{
|
{
|
||||||
@@ -113,6 +114,7 @@ class RemiseCheque extends CommonObject
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a receipt to send cheques
|
* Create a receipt to send cheques
|
||||||
|
*
|
||||||
* @param user User making creation
|
* @param user User making creation
|
||||||
* @param account_id Bank account for cheque receipt
|
* @param account_id Bank account for cheque receipt
|
||||||
* @param limit Limit number of cheque to this
|
* @param limit Limit number of cheque to this
|
||||||
@@ -270,6 +272,7 @@ class RemiseCheque extends CommonObject
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Supprime la remise en base
|
* Supprime la remise en base
|
||||||
|
*
|
||||||
* @param user utilisateur qui effectue l'operation
|
* @param user utilisateur qui effectue l'operation
|
||||||
*/
|
*/
|
||||||
function delete($user='')
|
function delete($user='')
|
||||||
@@ -324,6 +327,7 @@ class RemiseCheque extends CommonObject
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Validate a receipt
|
* Validate a receipt
|
||||||
|
*
|
||||||
* @param user User
|
* @param user User
|
||||||
* @return int <0 if KO, >0 if OK
|
* @return int <0 if KO, >0 if OK
|
||||||
*/
|
*/
|
||||||
@@ -387,7 +391,7 @@ class RemiseCheque extends CommonObject
|
|||||||
/**
|
/**
|
||||||
* Old module for cheque receipt numbering
|
* Old module for cheque receipt numbering
|
||||||
*
|
*
|
||||||
* @return string
|
* @return int Next number of cheque
|
||||||
*/
|
*/
|
||||||
function getNextNumber()
|
function getNextNumber()
|
||||||
{
|
{
|
||||||
@@ -421,6 +425,7 @@ class RemiseCheque extends CommonObject
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Load indicators for dashboard (this->nbtodo and this->nbtodolate)
|
* Load indicators for dashboard (this->nbtodo and this->nbtodolate)
|
||||||
|
*
|
||||||
* @param user Objet user
|
* @param user Objet user
|
||||||
* @param filteraccountid To get info for a particular account id
|
* @param filteraccountid To get info for a particular account id
|
||||||
* @return int <0 if KO, >0 if OK
|
* @return int <0 if KO, >0 if OK
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \file htdocs/compta/prelevement/ligne-prelevement.class.php
|
* \file htdocs/compta/prelevement/class/ligne-prelevement.class.php
|
||||||
* \ingroup prelevement
|
* \ingroup prelevement
|
||||||
* \brief Fichier de la classe des lignes de prelevements
|
* \brief Fichier de la classe des lignes de prelevements
|
||||||
*/
|
*/
|
||||||
@@ -46,12 +46,12 @@ class LignePrelevement
|
|||||||
function LignePrelevement($DB, $user)
|
function LignePrelevement($DB, $user)
|
||||||
{
|
{
|
||||||
global $conf,$langs;
|
global $conf,$langs;
|
||||||
|
|
||||||
$this->db = $DB ;
|
$this->db = $DB ;
|
||||||
$this->user = $user;
|
$this->user = $user;
|
||||||
|
|
||||||
// List of language codes for status
|
// List of language codes for status
|
||||||
|
|
||||||
$langs->load("withdrawals");
|
$langs->load("withdrawals");
|
||||||
$this->statuts[0]=$langs->trans("StatusWaiting");
|
$this->statuts[0]=$langs->trans("StatusWaiting");
|
||||||
$this->statuts[2]=$langs->trans("StatusCredited");
|
$this->statuts[2]=$langs->trans("StatusCredited");
|
||||||
@@ -107,7 +107,7 @@ class LignePrelevement
|
|||||||
|
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return status label of object
|
* Return status label of object
|
||||||
* @param mode 0=Label, 1=Picto + label, 2=Picto, 3=Label + Picto
|
* @param mode 0=Label, 1=Picto + label, 2=Picto, 3=Label + Picto
|
||||||
@@ -132,7 +132,7 @@ class LignePrelevement
|
|||||||
{
|
{
|
||||||
return $langs->trans($this->statuts[$statut]);
|
return $langs->trans($this->statuts[$statut]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($mode == 1)
|
if ($mode == 1)
|
||||||
{
|
{
|
||||||
if ($statut==0) return img_picto($langs->trans($this->statuts[$statut]),'statut0').' '.$langs->trans($this->statuts[$statut]);
|
if ($statut==0) return img_picto($langs->trans($this->statuts[$statut]),'statut0').' '.$langs->trans($this->statuts[$statut]);
|
||||||
@@ -145,7 +145,7 @@ class LignePrelevement
|
|||||||
if ($statut==2) return img_picto($langs->trans($this->statuts[$statut]),'statut4');
|
if ($statut==2) return img_picto($langs->trans($this->statuts[$statut]),'statut4');
|
||||||
if ($statut==3) return img_picto($langs->trans($this->statuts[$statut]),'statut8');
|
if ($statut==3) return img_picto($langs->trans($this->statuts[$statut]),'statut8');
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($mode == 3)
|
if ($mode == 3)
|
||||||
{
|
{
|
||||||
if ($statut==0) return $langs->trans($this->statuts[$statut]).' '.img_picto($langs->trans($this->statuts[$statut]),'statut0');
|
if ($statut==0) return $langs->trans($this->statuts[$statut]).' '.img_picto($langs->trans($this->statuts[$statut]),'statut0');
|
||||||
|
|||||||
@@ -401,7 +401,7 @@ print "</table>";
|
|||||||
print '<br><table width="100%" class="noborder">';
|
print '<br><table width="100%" class="noborder">';
|
||||||
|
|
||||||
// Factures non reglees
|
// Factures non reglees
|
||||||
// \todo Y a bug ici. Il faut prendre le reste a payer et non le total des factures non reglees !
|
// Y a bug ici. Il faut prendre le reste a payer et non le total des factures non reglees !
|
||||||
|
|
||||||
$sql = "SELECT f.facnumber, f.rowid, s.nom, s.rowid as socid, f.total_ttc, sum(pf.amount) as am";
|
$sql = "SELECT f.facnumber, f.rowid, s.nom, s.rowid as socid, f.total_ttc, sum(pf.amount) as am";
|
||||||
$sql .= " FROM ".MAIN_DB_PREFIX."societe as s,".MAIN_DB_PREFIX."facture as f left join ".MAIN_DB_PREFIX."paiement_facture as pf on f.rowid=pf.fk_facture";
|
$sql .= " FROM ".MAIN_DB_PREFIX."societe as s,".MAIN_DB_PREFIX."facture as f left join ".MAIN_DB_PREFIX."paiement_facture as pf on f.rowid=pf.fk_facture";
|
||||||
|
|||||||
@@ -511,7 +511,7 @@ class Tva extends CommonObject
|
|||||||
$result = $this->db->query($sql);
|
$result = $this->db->query($sql);
|
||||||
if ($result)
|
if ($result)
|
||||||
{
|
{
|
||||||
$this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."tva"); // \todo devrait s'appeler paiementtva
|
$this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."tva"); // TODO devrait s'appeler paiementtva
|
||||||
if ($this->id > 0)
|
if ($this->id > 0)
|
||||||
{
|
{
|
||||||
$ok=1;
|
$ok=1;
|
||||||
|
|||||||
@@ -114,10 +114,11 @@ function tva_coll($db,$y,$q)
|
|||||||
/**
|
/**
|
||||||
* Gets VAT to pay for the given month of the given year
|
* Gets VAT to pay for the given month of the given year
|
||||||
* The function gets the VAT in split results, as the VAT declaration asks
|
* The function gets the VAT in split results, as the VAT declaration asks
|
||||||
* to report the amounts for different VAT rates as different lines.
|
* to report the amounts for different VAT rates as different lines
|
||||||
* @param object Database handler object
|
*
|
||||||
* @param y Year
|
* @param DoliDB $db Database handler object
|
||||||
* @param q Year quarter (1-4)
|
* @param int $y Year
|
||||||
|
* @param int $q Year quarter (1-4)
|
||||||
*/
|
*/
|
||||||
function tva_paye($db, $y,$q)
|
function tva_paye($db, $y,$q)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -380,7 +380,7 @@ class FormMail
|
|||||||
$liste=array();
|
$liste=array();
|
||||||
$soc=new Societe($this->db);
|
$soc=new Societe($this->db);
|
||||||
$soc->fetch($this->withtosocid);
|
$soc->fetch($this->withtosocid);
|
||||||
foreach ($soc->thirdparty_and_contact_email_array() as $key=>$value)
|
foreach ($soc->thirdparty_and_contact_email_array(1) as $key=>$value)
|
||||||
{
|
{
|
||||||
$liste[$key]=$value;
|
$liste[$key]=$value;
|
||||||
}
|
}
|
||||||
@@ -414,7 +414,7 @@ class FormMail
|
|||||||
$liste=array();
|
$liste=array();
|
||||||
$soc=new Societe($this->db);
|
$soc=new Societe($this->db);
|
||||||
$soc->fetch($this->withtoccsocid);
|
$soc->fetch($this->withtoccsocid);
|
||||||
foreach ($soc->thirdparty_and_contact_email_array() as $key=>$value)
|
foreach ($soc->thirdparty_and_contact_email_array(1) as $key=>$value)
|
||||||
{
|
{
|
||||||
$liste[$key]=$value;
|
$liste[$key]=$value;
|
||||||
}
|
}
|
||||||
@@ -448,7 +448,7 @@ class FormMail
|
|||||||
$liste=array();
|
$liste=array();
|
||||||
$soc=new Societe($this->db);
|
$soc=new Societe($this->db);
|
||||||
$soc->fetch($this->withtosocid);
|
$soc->fetch($this->withtosocid);
|
||||||
foreach ($soc->thirdparty_and_contact_email_array() as $key=>$value)
|
foreach ($soc->thirdparty_and_contact_email_array(1) as $key=>$value)
|
||||||
{
|
{
|
||||||
$liste[$key]=$value;
|
$liste[$key]=$value;
|
||||||
}
|
}
|
||||||
@@ -630,58 +630,6 @@ class FormMail
|
|||||||
|
|
||||||
return $out;
|
return $out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* \brief Affiche la partie de formulaire pour saisie d'un mail
|
|
||||||
* \param withtopic 1 pour proposer a la saisie le sujet
|
|
||||||
* \param withbody 1 pour proposer a la saisie le corps du message
|
|
||||||
* \param withfile 1 pour proposer a la saisie l'ajout d'un fichier joint
|
|
||||||
* \todo Fonction a virer quand fichier /comm/mailing.php vire (= quand ecran dans /comm/mailing prets)
|
|
||||||
*/
|
|
||||||
function mail_topicmessagefile($withtopic=1,$withbody=1,$withfile=1,$defaultbody)
|
|
||||||
{
|
|
||||||
global $langs;
|
|
||||||
|
|
||||||
$langs->load("other");
|
|
||||||
|
|
||||||
print "<table class=\"border\" width=\"100%\">";
|
|
||||||
|
|
||||||
// Topic
|
|
||||||
if ($withtopic)
|
|
||||||
{
|
|
||||||
print "<tr>";
|
|
||||||
print "<td width=\"180\">".$langs->trans("MailTopic")."</td>";
|
|
||||||
print "<td>";
|
|
||||||
print "<input type=\"text\" size=\"60\" name=\"subject\" value=\"\">";
|
|
||||||
print "</td></tr>";
|
|
||||||
}
|
|
||||||
|
|
||||||
// Message
|
|
||||||
if ($withbody)
|
|
||||||
{
|
|
||||||
print "<tr>";
|
|
||||||
print "<td width=\"180\" valign=\"top\">".$langs->trans("MailText")."</td>";
|
|
||||||
print "<td>";
|
|
||||||
print "<textarea rows=\"8\" cols=\"72\" name=\"message\">";
|
|
||||||
print $defaultbody;
|
|
||||||
print "</textarea>";
|
|
||||||
print "</td></tr>";
|
|
||||||
}
|
|
||||||
|
|
||||||
// Si fichier joint
|
|
||||||
if ($withfile)
|
|
||||||
{
|
|
||||||
print "<tr>";
|
|
||||||
print "<td width=\"180\">".$langs->trans("MailFile")."</td>";
|
|
||||||
print "<td>";
|
|
||||||
print "<input type=\"file\" name=\"addedfile\" value=\"".$langs->trans("Upload")."\"/>";
|
|
||||||
print "</td></tr>";
|
|
||||||
}
|
|
||||||
|
|
||||||
print "</table>";
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2003-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2003-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004-2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
*
|
*
|
||||||
* 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
|
||||||
@@ -42,13 +42,11 @@ class Notify
|
|||||||
var $fk_project;
|
var $fk_project;
|
||||||
|
|
||||||
// Les codes actions sont definis dans la table llx_notify_def
|
// Les codes actions sont definis dans la table llx_notify_def
|
||||||
// \todo utiliser des codes texte plutot que numerique
|
|
||||||
// 1 = Validation fiche inter
|
|
||||||
// 2 = Validation facture
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Constructeur
|
* Constructor
|
||||||
* \param DB Handler acces base
|
*
|
||||||
|
* @param DoliDB $DB Database handler
|
||||||
*/
|
*/
|
||||||
function Notify($DB)
|
function Notify($DB)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -448,10 +448,10 @@ class RssParser
|
|||||||
* Triggered when CDATA is found
|
* Triggered when CDATA is found
|
||||||
*
|
*
|
||||||
* @param $p
|
* @param $p
|
||||||
* @param $element Tag
|
* @param $text Tag
|
||||||
* @param $attrs Attributes of tags
|
|
||||||
*/
|
*/
|
||||||
function feed_cdata ($p, $text) {
|
function feed_cdata($p, $text)
|
||||||
|
{
|
||||||
if ($this->_format == 'atom' and $this->incontent)
|
if ($this->_format == 'atom' and $this->incontent)
|
||||||
{
|
{
|
||||||
$this->append_content( $text );
|
$this->append_content( $text );
|
||||||
@@ -466,9 +466,10 @@ class RssParser
|
|||||||
* Triggered when closed tag is found
|
* Triggered when closed tag is found
|
||||||
*
|
*
|
||||||
* @param $p
|
* @param $p
|
||||||
* @param $element Tag
|
* @param $el Tag
|
||||||
*/
|
*/
|
||||||
function feed_end_element ($p, $el) {
|
function feed_end_element($p, $el)
|
||||||
|
{
|
||||||
$el = strtolower($el);
|
$el = strtolower($el);
|
||||||
|
|
||||||
if ( $el == 'item' or $el == 'entry' )
|
if ( $el == 'item' or $el == 'entry' )
|
||||||
@@ -520,7 +521,8 @@ class RssParser
|
|||||||
* @param $str1
|
* @param $str1
|
||||||
* @param $str2
|
* @param $str2
|
||||||
*/
|
*/
|
||||||
function concat (&$str1, $str2="") {
|
function concat(&$str1, $str2="")
|
||||||
|
{
|
||||||
if (!isset($str1) ) {
|
if (!isset($str1) ) {
|
||||||
$str1="";
|
$str1="";
|
||||||
}
|
}
|
||||||
@@ -529,7 +531,8 @@ class RssParser
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
function append_content($text) {
|
function append_content($text)
|
||||||
|
{
|
||||||
if ( $this->initem ) {
|
if ( $this->initem ) {
|
||||||
$this->concat( $this->current_item[ $this->incontent ], $text );
|
$this->concat( $this->current_item[ $this->incontent ], $text );
|
||||||
}
|
}
|
||||||
@@ -541,7 +544,8 @@ class RssParser
|
|||||||
/**
|
/**
|
||||||
* smart append - field and namespace aware
|
* smart append - field and namespace aware
|
||||||
*/
|
*/
|
||||||
function append($el, $text) {
|
function append($el, $text)
|
||||||
|
{
|
||||||
if (!$el) {
|
if (!$el) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2103,7 +2103,7 @@ class SMTPs
|
|||||||
* @return void
|
* @return void
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
function setAttachment ( $strContent, $strFileName = 'unknown', $strMimeType = 'unknown' )
|
function setAttachment($strContent, $strFileName = 'unknown', $strMimeType = 'unknown')
|
||||||
{
|
{
|
||||||
if ( $strContent )
|
if ( $strContent )
|
||||||
{
|
{
|
||||||
@@ -2120,21 +2120,23 @@ class SMTPs
|
|||||||
|
|
||||||
|
|
||||||
// DOL_CHANGE LDR
|
// DOL_CHANGE LDR
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Method public void setImageInline( string )
|
* Method public void setImageInline( string )
|
||||||
*
|
*
|
||||||
* Image attachments are added to the content array as sub-arrays,
|
* Image attachments are added to the content array as sub-arrays,
|
||||||
* allowing for multiple images for each outbound email
|
* allowing for multiple images for each outbound email
|
||||||
*
|
*
|
||||||
* @param string $strContent Image data to attach to message
|
* @param string $strContent Image data to attach to message
|
||||||
* @param string $strImageName Image Name to give to attachment
|
* @param string $strImageName Image Name to give to attachment
|
||||||
* @param string $strMimeType Image Mime Type of attachment
|
* @param string $strMimeType Image Mime Type of attachment
|
||||||
* @return void
|
* @param string $strImageCid CID
|
||||||
*
|
* @return void
|
||||||
*/
|
*
|
||||||
function setImageInline ( $strContent, $strImageName = 'unknown', $strMimeType = 'unknown', $strImageCid = 'unknown' )
|
*/
|
||||||
|
function setImageInline($strContent, $strImageName = 'unknown', $strMimeType = 'unknown', $strImageCid = 'unknown')
|
||||||
{
|
{
|
||||||
if ( $strContent )
|
if ($strContent)
|
||||||
{
|
{
|
||||||
$this->_msgContent['image'][$strImageName]['mimeType'] = $strMimeType;
|
$this->_msgContent['image'][$strImageName]['mimeType'] = $strMimeType;
|
||||||
$this->_msgContent['image'][$strImageName]['imageName'] = $strImageName;
|
$this->_msgContent['image'][$strImageName]['imageName'] = $strImageName;
|
||||||
@@ -2170,7 +2172,7 @@ class SMTPs
|
|||||||
* @return void
|
* @return void
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
function setSensitivity ( $_value = 0 )
|
function setSensitivity($_value = 0)
|
||||||
{
|
{
|
||||||
if ( ( is_numeric ($_value) ) &&
|
if ( ( is_numeric ($_value) ) &&
|
||||||
( ( $_value >= 0 ) && ( $_value <= 3 ) ) )
|
( ( $_value >= 0 ) && ( $_value <= 3 ) ) )
|
||||||
@@ -2516,7 +2518,10 @@ class SMTPs
|
|||||||
// ** CSV Version Control Info
|
// ** CSV Version Control Info
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* $Log: smtps.php,v $
|
* $Log: smtps.class.php,v $
|
||||||
|
* Revision 1.1 2011/09/03 00:14:27 eldy
|
||||||
|
* Doxygen
|
||||||
|
*
|
||||||
* Revision 1.4 2011/08/28 14:24:23 eldy
|
* Revision 1.4 2011/08/28 14:24:23 eldy
|
||||||
* Doxygen
|
* Doxygen
|
||||||
*
|
*
|
||||||
@@ -12,8 +12,7 @@
|
|||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
* or see http://www.gnu.org/
|
* or see http://www.gnu.org/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -31,183 +30,189 @@ require_once(DOL_DOCUMENT_ROOT ."/includes/modules/barcode/modules_barcode.php")
|
|||||||
*/
|
*/
|
||||||
class modBarcodeCoder extends ModeleBarCode
|
class modBarcodeCoder extends ModeleBarCode
|
||||||
{
|
{
|
||||||
var $version='dolibarr'; // 'development', 'experimental', 'dolibarr'
|
var $version='dolibarr'; // 'development', 'experimental', 'dolibarr'
|
||||||
var $error='';
|
var $error='';
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Return if a module can be used or not
|
|
||||||
* @return boolean true if module can be used
|
|
||||||
*/
|
|
||||||
function isEnabled()
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Return description
|
|
||||||
* @return string Texte descripif
|
|
||||||
*/
|
|
||||||
function info()
|
|
||||||
{
|
|
||||||
global $langs;
|
|
||||||
|
|
||||||
return 'Barcode Coder';
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Test si les numeros deja en vigueur dans la base ne provoquent pas de
|
|
||||||
* de conflits qui empechera cette numerotation de fonctionner.
|
|
||||||
* @return boolean false si conflit, true si ok
|
|
||||||
*/
|
|
||||||
function canBeActivated()
|
|
||||||
{
|
|
||||||
global $langs;
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Return true if encodinf is supported
|
|
||||||
* @return int >0 if supported, 0 if not
|
|
||||||
*/
|
|
||||||
function encodingIsSupported($encoding)
|
|
||||||
{
|
|
||||||
global $genbarcode_loc;
|
|
||||||
|
|
||||||
$supported=0;
|
|
||||||
if ($encoding == 'EAN13') $supported=1;
|
|
||||||
if ($encoding == 'ISBN') $supported=1;
|
|
||||||
if ($encoding == 'EAN8') $supported=1;
|
|
||||||
if ($encoding == 'UPC') $supported=1;
|
|
||||||
if ($encoding == 'C39') $supported=1;
|
|
||||||
if ($encoding == 'C128') $supported=1;
|
|
||||||
|
|
||||||
return $supported;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return an image file on the fly (no need to write on disk)
|
* Return if a module can be used or not
|
||||||
* @param $code Value to encode
|
*
|
||||||
* @param $encoding Mode of encoding
|
* @return boolean true if module can be used
|
||||||
* @param $readable Code can be read
|
|
||||||
*/
|
*/
|
||||||
function buildBarCode($code,$encoding,$readable='Y')
|
function isEnabled()
|
||||||
{
|
{
|
||||||
global $_GET,$_SERVER;
|
return true;
|
||||||
global $conf;
|
}
|
||||||
global $genbarcode_loc, $bar_color, $bg_color, $text_color, $font_loc;
|
|
||||||
|
|
||||||
if (! $this->encodingIsSupported($encoding)) return -1;
|
|
||||||
|
|
||||||
if ($encoding == 'EAN8' || $encoding == 'EAN13') $encoding = 'EAN';
|
/**
|
||||||
if ($encoding == 'C39' || $encoding == 'C128') $encoding = substr($encoding,1);
|
* Return description
|
||||||
|
*
|
||||||
|
* @return string Texte descripif
|
||||||
|
*/
|
||||||
|
function info()
|
||||||
|
{
|
||||||
|
global $langs;
|
||||||
|
|
||||||
$scale=1; $mode='png';
|
return 'Barcode Coder';
|
||||||
|
}
|
||||||
|
|
||||||
$_GET["code"]=$code;
|
/**
|
||||||
$_GET["encoding"]=$encoding;
|
* Test si les numeros deja en vigueur dans la base ne provoquent pas de
|
||||||
$_GET["scale"]=$scale;
|
* de conflits qui empechera cette numerotation de fonctionner
|
||||||
$_GET["mode"]=$mode;
|
*
|
||||||
|
* @return boolean false si conflit, true si ok
|
||||||
$font = DOL_DOCUMENT_ROOT.'/includes/barcode/barcode-coder/NOTTB___.TTF';
|
*/
|
||||||
|
function canBeActivated()
|
||||||
$fontSize = 10; // GD1 in px ; GD2 in point
|
{
|
||||||
$marge = 10; // between barcode and hri in pixel
|
global $langs;
|
||||||
$x = 125; // barcode center
|
|
||||||
$y = 125; // barcode center
|
|
||||||
$height = 50; // barcode height in 1D ; module size in 2D
|
|
||||||
$width = 2; // barcode height in 1D ; not use in 2D
|
|
||||||
$angle = 90; // rotation in degrees : nb : non horizontable barcode might not be usable because of pixelisation
|
|
||||||
$type = 'ean13';
|
|
||||||
|
|
||||||
$im = imagecreatetruecolor(300, 300);
|
return true;
|
||||||
$black = ImageColorAllocate($im,0x00,0x00,0x00);
|
}
|
||||||
$white = ImageColorAllocate($im,0xff,0xff,0xff);
|
|
||||||
$red = ImageColorAllocate($im,0xff,0x00,0x00);
|
|
||||||
$blue = ImageColorAllocate($im,0x00,0x00,0xff);
|
|
||||||
imagefilledrectangle($im, 0, 0, 300, 300, $white);
|
|
||||||
|
|
||||||
require_once(DOL_DOCUMENT_ROOT.'/includes/barcode/barcode-coder/php-barcode-latest.php');
|
|
||||||
dol_syslog("modBarcodeCoder::buildBarCode $code,$encoding,$scale,$mode");
|
|
||||||
|
|
||||||
|
|
||||||
if ($code) $data = Barcode::gd($im, $black, $x, $y, $angle, $type, array('code'=>$code), $width, $height);
|
|
||||||
if ( isset($font) ){
|
|
||||||
$box = imagettfbbox($fontSize, 0, $font, $data['hri']);
|
|
||||||
$len = $box[2] - $box[0];
|
|
||||||
Barcode::rotate(-$len / 2, ($data['height'] / 2) + $fontSize + $marge, $angle, $xt, $yt);
|
|
||||||
imagettftext($im, $fontSize, $angle, $x + $xt, $y + $yt, $blue, $font, $data['hri']);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
$rot = imagerotate($im, 45, $white);
|
|
||||||
//imagedestroy($im);
|
|
||||||
$im = imagecreatetruecolor(900, 300);
|
|
||||||
$black = ImageColorAllocate($im,0x00,0x00,0x00);
|
|
||||||
$white = ImageColorAllocate($im,0xff,0xff,0xff);
|
|
||||||
$red = ImageColorAllocate($im,0xff,0x00,0x00);
|
|
||||||
$blue = ImageColorAllocate($im,0x00,0x00,0xff);
|
|
||||||
imagefilledrectangle($im, 0, 0, 900, 300, $white);
|
|
||||||
|
|
||||||
// Barcode rotation : 90°
|
|
||||||
$angle = 90;
|
|
||||||
$data = Barcode::gd($im, $black, $x, $y, $angle, $type, array('code'=>$code), $width, $height);
|
|
||||||
Barcode::rotate(-$len / 2, ($data['height'] / 2) + $fontSize + $marge, $angle, $xt, $yt);
|
|
||||||
imagettftext($im, $fontSize, $angle, $x + $xt, $y + $yt, $blue, $font, $data['hri']);
|
|
||||||
imagettftext($im, 10, 0, 60, 290, $black, $font, 'BARCODE ROTATION : 90°');
|
|
||||||
|
|
||||||
// barcode rotation : 135
|
|
||||||
$angle = 135;
|
|
||||||
Barcode::gd($im, $black, $x+300, $y, $angle, $type, array('code'=>$code), $width, $height);
|
|
||||||
Barcode::rotate(-$len / 2, ($data['height'] / 2) + $fontSize + $marge, $angle, $xt, $yt);
|
|
||||||
imagettftext($im, $fontSize, $angle, $x + 300 + $xt, $y + $yt, $blue, $font, $data['hri']);
|
|
||||||
imagettftext($im, 10, 0, 360, 290, $black, $font, 'BARCODE ROTATION : 135°');
|
|
||||||
|
|
||||||
// last one : image rotation
|
|
||||||
imagecopy($im, $rot, 580, -50, 0, 0, 300, 300);
|
|
||||||
imagerectangle($im, 0, 0, 299, 299, $black);
|
|
||||||
imagerectangle($im, 299, 0, 599, 299, $black);
|
|
||||||
imagerectangle($im, 599, 0, 899, 299, $black);
|
|
||||||
imagettftext($im, 10, 0, 690, 290, $black, $font, 'IMAGE ROTATION');
|
|
||||||
|
|
||||||
/*
|
|
||||||
if (! is_array($result))
|
|
||||||
{
|
|
||||||
$this->error=$result;
|
|
||||||
print $this->error;exit;
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
imagepng($im);
|
|
||||||
imagedestroy($im);
|
|
||||||
|
|
||||||
return 1;
|
/**
|
||||||
}
|
* Return true if encodinf is supported
|
||||||
|
*
|
||||||
|
* @return int >0 if supported, 0 if not
|
||||||
|
*/
|
||||||
|
function encodingIsSupported($encoding)
|
||||||
|
{
|
||||||
|
global $genbarcode_loc;
|
||||||
|
|
||||||
/**
|
$supported=0;
|
||||||
* Save an image file on disk (with no output)
|
if ($encoding == 'EAN13') $supported=1;
|
||||||
* @param $code Value to encode
|
if ($encoding == 'ISBN') $supported=1;
|
||||||
* @param $encoding Mode of encoding
|
if ($encoding == 'EAN8') $supported=1;
|
||||||
* @param $readable Code can be read
|
if ($encoding == 'UPC') $supported=1;
|
||||||
*/
|
if ($encoding == 'C39') $supported=1;
|
||||||
function writeBarCode($code,$encoding,$readable='Y')
|
if ($encoding == 'C128') $supported=1;
|
||||||
{
|
|
||||||
global $conf,$filebarcode;
|
|
||||||
|
|
||||||
create_exdir($conf->barcode->dir_temp);
|
return $supported;
|
||||||
|
}
|
||||||
|
|
||||||
$file=$conf->barcode->dir_temp.'/barcode_'.$code.'_'.$encoding.'.png';
|
/**
|
||||||
|
* Return an image file on the fly (no need to write on disk)
|
||||||
|
*
|
||||||
|
* @param $code Value to encode
|
||||||
|
* @param $encoding Mode of encoding
|
||||||
|
* @param $readable Code can be read
|
||||||
|
*/
|
||||||
|
function buildBarCode($code,$encoding,$readable='Y')
|
||||||
|
{
|
||||||
|
global $_GET,$_SERVER;
|
||||||
|
global $conf;
|
||||||
|
global $genbarcode_loc, $bar_color, $bg_color, $text_color, $font_loc;
|
||||||
|
|
||||||
$filebarcode=$file; // global var to be used in barcode_outimage called by barcode_print in buildBarCode
|
if (! $this->encodingIsSupported($encoding)) return -1;
|
||||||
|
|
||||||
$result=$this->buildBarCode($code,$encoding,$readable);
|
if ($encoding == 'EAN8' || $encoding == 'EAN13') $encoding = 'EAN';
|
||||||
|
if ($encoding == 'C39' || $encoding == 'C128') $encoding = substr($encoding,1);
|
||||||
|
|
||||||
return $result;
|
$scale=1; $mode='png';
|
||||||
}
|
|
||||||
|
$_GET["code"]=$code;
|
||||||
|
$_GET["encoding"]=$encoding;
|
||||||
|
$_GET["scale"]=$scale;
|
||||||
|
$_GET["mode"]=$mode;
|
||||||
|
|
||||||
|
$font = DOL_DOCUMENT_ROOT.'/includes/barcode/barcode-coder/NOTTB___.TTF';
|
||||||
|
|
||||||
|
$fontSize = 10; // GD1 in px ; GD2 in point
|
||||||
|
$marge = 10; // between barcode and hri in pixel
|
||||||
|
$x = 125; // barcode center
|
||||||
|
$y = 125; // barcode center
|
||||||
|
$height = 50; // barcode height in 1D ; module size in 2D
|
||||||
|
$width = 2; // barcode height in 1D ; not use in 2D
|
||||||
|
$angle = 90; // rotation in degrees : nb : non horizontable barcode might not be usable because of pixelisation
|
||||||
|
$type = 'ean13';
|
||||||
|
|
||||||
|
$im = imagecreatetruecolor(300, 300);
|
||||||
|
$black = ImageColorAllocate($im,0x00,0x00,0x00);
|
||||||
|
$white = ImageColorAllocate($im,0xff,0xff,0xff);
|
||||||
|
$red = ImageColorAllocate($im,0xff,0x00,0x00);
|
||||||
|
$blue = ImageColorAllocate($im,0x00,0x00,0xff);
|
||||||
|
imagefilledrectangle($im, 0, 0, 300, 300, $white);
|
||||||
|
|
||||||
|
require_once(DOL_DOCUMENT_ROOT.'/includes/barcode/barcode-coder/php-barcode-latest.php');
|
||||||
|
dol_syslog("modBarcodeCoder::buildBarCode $code,$encoding,$scale,$mode");
|
||||||
|
|
||||||
|
|
||||||
|
if ($code) $data = Barcode::gd($im, $black, $x, $y, $angle, $type, array('code'=>$code), $width, $height);
|
||||||
|
if ( isset($font) ){
|
||||||
|
$box = imagettfbbox($fontSize, 0, $font, $data['hri']);
|
||||||
|
$len = $box[2] - $box[0];
|
||||||
|
Barcode::rotate(-$len / 2, ($data['height'] / 2) + $fontSize + $marge, $angle, $xt, $yt);
|
||||||
|
imagettftext($im, $fontSize, $angle, $x + $xt, $y + $yt, $blue, $font, $data['hri']);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$rot = imagerotate($im, 45, $white);
|
||||||
|
//imagedestroy($im);
|
||||||
|
$im = imagecreatetruecolor(900, 300);
|
||||||
|
$black = ImageColorAllocate($im,0x00,0x00,0x00);
|
||||||
|
$white = ImageColorAllocate($im,0xff,0xff,0xff);
|
||||||
|
$red = ImageColorAllocate($im,0xff,0x00,0x00);
|
||||||
|
$blue = ImageColorAllocate($im,0x00,0x00,0xff);
|
||||||
|
imagefilledrectangle($im, 0, 0, 900, 300, $white);
|
||||||
|
|
||||||
|
// Barcode rotation : 90°
|
||||||
|
$angle = 90;
|
||||||
|
$data = Barcode::gd($im, $black, $x, $y, $angle, $type, array('code'=>$code), $width, $height);
|
||||||
|
Barcode::rotate(-$len / 2, ($data['height'] / 2) + $fontSize + $marge, $angle, $xt, $yt);
|
||||||
|
imagettftext($im, $fontSize, $angle, $x + $xt, $y + $yt, $blue, $font, $data['hri']);
|
||||||
|
imagettftext($im, 10, 0, 60, 290, $black, $font, 'BARCODE ROTATION : 90°');
|
||||||
|
|
||||||
|
// barcode rotation : 135
|
||||||
|
$angle = 135;
|
||||||
|
Barcode::gd($im, $black, $x+300, $y, $angle, $type, array('code'=>$code), $width, $height);
|
||||||
|
Barcode::rotate(-$len / 2, ($data['height'] / 2) + $fontSize + $marge, $angle, $xt, $yt);
|
||||||
|
imagettftext($im, $fontSize, $angle, $x + 300 + $xt, $y + $yt, $blue, $font, $data['hri']);
|
||||||
|
imagettftext($im, 10, 0, 360, 290, $black, $font, 'BARCODE ROTATION : 135°');
|
||||||
|
|
||||||
|
// last one : image rotation
|
||||||
|
imagecopy($im, $rot, 580, -50, 0, 0, 300, 300);
|
||||||
|
imagerectangle($im, 0, 0, 299, 299, $black);
|
||||||
|
imagerectangle($im, 299, 0, 599, 299, $black);
|
||||||
|
imagerectangle($im, 599, 0, 899, 299, $black);
|
||||||
|
imagettftext($im, 10, 0, 690, 290, $black, $font, 'IMAGE ROTATION');
|
||||||
|
|
||||||
|
/*
|
||||||
|
if (! is_array($result))
|
||||||
|
{
|
||||||
|
$this->error=$result;
|
||||||
|
print $this->error;exit;
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
imagepng($im);
|
||||||
|
imagedestroy($im);
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Save an image file on disk (with no output)
|
||||||
|
*
|
||||||
|
* @param $code Value to encode
|
||||||
|
* @param $encoding Mode of encoding
|
||||||
|
* @param $readable Code can be read
|
||||||
|
*/
|
||||||
|
function writeBarCode($code,$encoding,$readable='Y')
|
||||||
|
{
|
||||||
|
global $conf,$filebarcode;
|
||||||
|
|
||||||
|
create_exdir($conf->barcode->dir_temp);
|
||||||
|
|
||||||
|
$file=$conf->barcode->dir_temp.'/barcode_'.$code.'_'.$encoding.'.png';
|
||||||
|
|
||||||
|
$filebarcode=$file; // global var to be used in barcode_outimage called by barcode_print in buildBarCode
|
||||||
|
|
||||||
|
$result=$this->buildBarCode($code,$encoding,$readable);
|
||||||
|
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -193,7 +193,7 @@ else
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
# If failed, we try to create an empty file
|
# If failed, we try to create an empty file
|
||||||
dolibarr_install_syslog("failed to copy file ".$conffile.".example into ".$conffile.". We try to create it.");
|
dolibarr_install_syslog("failed to copy file ".$conffile.".example into ".$conffile.". We try to create it.", LOG_WARNING);
|
||||||
|
|
||||||
$fp = @fopen($conffile, "w");
|
$fp = @fopen($conffile, "w");
|
||||||
if ($fp)
|
if ($fp)
|
||||||
@@ -203,6 +203,7 @@ else
|
|||||||
@fputs($fp,"?>");
|
@fputs($fp,"?>");
|
||||||
fclose($fp);
|
fclose($fp);
|
||||||
}
|
}
|
||||||
|
else dolibarr_install_syslog("failed to create a new file ".$conffile." into current dir ".getcwd().". Check permission.", LOG_ERR);
|
||||||
}
|
}
|
||||||
|
|
||||||
// First install, on ne peut pas upgrader
|
// First install, on ne peut pas upgrader
|
||||||
|
|||||||
@@ -234,7 +234,7 @@ class CMailFile
|
|||||||
// Use SMTPS library
|
// Use SMTPS library
|
||||||
// ------------------------------------------
|
// ------------------------------------------
|
||||||
|
|
||||||
require_once(DOL_DOCUMENT_ROOT."/core/class/smtps.php");
|
require_once(DOL_DOCUMENT_ROOT."/core/class/smtps.class.php");
|
||||||
$smtps = new SMTPs();
|
$smtps = new SMTPs();
|
||||||
$smtps->setCharSet($conf->file->character_set_client);
|
$smtps->setCharSet($conf->file->character_set_client);
|
||||||
|
|
||||||
|
|||||||
@@ -2572,78 +2572,70 @@ function print_liste_field_titre($name, $file="", $field="", $begin="", $morepar
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get title line of an array
|
* Get title line of an array
|
||||||
|
*
|
||||||
* @param name Label of field
|
* @param name Label of field
|
||||||
* @param thead For thead format
|
* @param thead For thead format
|
||||||
* @param file Url used when we click on sort picto
|
* @param file Url used when we click on sort picto
|
||||||
* @param field Field to use for new sorting
|
* @param field Field to use for new sorting
|
||||||
* @param begin ("" by defaut)
|
* @param begin ("" by defaut)
|
||||||
* @param moreparam Add more parameters on sort url links ("" by default)
|
* @param moreparam Add more parameters on sort url links ("" by default)
|
||||||
* @param td Options of attribute td ("" by defaut)
|
* @param moreattrib Add more attributes on th ("" by defaut)
|
||||||
* @param sortfield Current field used to sort
|
* @param sortfield Current field used to sort
|
||||||
* @param sortorder Current sort order
|
* @param sortorder Current sort order
|
||||||
*/
|
*/
|
||||||
function getTitleFieldOfList($name, $thead=0, $file="", $field="", $begin="", $moreparam="", $td="", $sortfield="", $sortorder="")
|
function getTitleFieldOfList($name, $thead=0, $file="", $field="", $begin="", $moreparam="", $moreattrib="", $sortfield="", $sortorder="")
|
||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
//print "$name, $file, $field, $begin, $options, $td, $sortfield, $sortorder<br>\n";
|
//print "$name, $file, $field, $begin, $options, $moreattrib, $sortfield, $sortorder<br>\n";
|
||||||
|
|
||||||
$out='';
|
$out='';
|
||||||
|
// If field is used as sort criteria we use a specific class
|
||||||
if ($thead)
|
// Example if (sortfield,field)=("nom","xxx.nom") or (sortfield,field)=("nom","nom")
|
||||||
|
if ($field && ($sortfield == $field || $sortfield == preg_replace("/^[^\.]+\./","",$field)))
|
||||||
{
|
{
|
||||||
$out.= '<th>'.$name.'</th>';
|
$out.= '<th class="liste_titre_sel" '. $moreattrib.'>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Le champ de tri est mis en evidence.
|
$out.= '<th class="liste_titre" '. $moreattrib.'>';
|
||||||
// Exemple si (sortfield,field)=("nom","xxx.nom") ou (sortfield,field)=("nom","nom")
|
|
||||||
if ($field && ($sortfield == $field || $sortfield == preg_replace("/^[^\.]+\./","",$field)))
|
|
||||||
{
|
|
||||||
$out.= '<td class="liste_titre_sel" '. $td.'>';
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$out.= '<td class="liste_titre" '. $td.'>';
|
|
||||||
}
|
|
||||||
$out.= $name;
|
|
||||||
|
|
||||||
// If this is a sort field
|
|
||||||
if ($field)
|
|
||||||
{
|
|
||||||
$options=preg_replace('/sortfield=([a-zA-Z0-9,\s\.]+)/i','',$moreparam);
|
|
||||||
$options=preg_replace('/sortorder=([a-zA-Z0-9,\s\.]+)/i','',$options);
|
|
||||||
$options=preg_replace('/&+/i','&',$options);
|
|
||||||
if (! preg_match('/^&/',$options)) $options='&'.$options;
|
|
||||||
|
|
||||||
//print " ";
|
|
||||||
$out.= '<img width="2" src="'.DOL_URL_ROOT.'/theme/common/transparent.png" alt="">';
|
|
||||||
if (! $sortorder)
|
|
||||||
{
|
|
||||||
$out.= '<a href="'.$file.'?sortfield='.$field.'&sortorder=asc&begin='.$begin.$options.'">'.img_down("A-Z",0).'</a>';
|
|
||||||
$out.= '<a href="'.$file.'?sortfield='.$field.'&sortorder=desc&begin='.$begin.$options.'">'.img_up("Z-A",0).'</a>';
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if ($field != $sortfield)
|
|
||||||
{
|
|
||||||
$out.= '<a href="'.$file.'?sortfield='.$field.'&sortorder=asc&begin='.$begin.$options.'">'.img_down("A-Z",0).'</a>';
|
|
||||||
$out.= '<a href="'.$file.'?sortfield='.$field.'&sortorder=desc&begin='.$begin.$options.'">'.img_up("Z-A",0).'</a>';
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$sortorder=strtoupper($sortorder);
|
|
||||||
if ($sortorder == 'DESC' ) {
|
|
||||||
$out.= '<a href="'.$file.'?sortfield='.$field.'&sortorder=asc&begin='.$begin.$options.'">'.img_down("A-Z",0).'</a>';
|
|
||||||
$out.= '<a href="'.$file.'?sortfield='.$field.'&sortorder=desc&begin='.$begin.$options.'">'.img_up("Z-A",1).'</a>';
|
|
||||||
}
|
|
||||||
if ($sortorder == 'ASC' ) {
|
|
||||||
$out.= '<a href="'.$file.'?sortfield='.$field.'&sortorder=asc&begin='.$begin.$options.'">'.img_down("A-Z",1).'</a>';
|
|
||||||
$out.= '<a href="'.$file.'?sortfield='.$field.'&sortorder=desc&begin='.$begin.$options.'">'.img_up("Z-A",0).'</a>';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$out.= "</td>";
|
|
||||||
}
|
}
|
||||||
|
$out.=$name;
|
||||||
|
|
||||||
|
if (empty($thead) && $field) // If this is a sort field
|
||||||
|
{
|
||||||
|
$options=preg_replace('/sortfield=([a-zA-Z0-9,\s\.]+)/i','',$moreparam);
|
||||||
|
$options=preg_replace('/sortorder=([a-zA-Z0-9,\s\.]+)/i','',$options);
|
||||||
|
$options=preg_replace('/&+/i','&',$options);
|
||||||
|
if (! preg_match('/^&/',$options)) $options='&'.$options;
|
||||||
|
|
||||||
|
//print " ";
|
||||||
|
$out.= '<img width="2" src="'.DOL_URL_ROOT.'/theme/common/transparent.png" alt="">';
|
||||||
|
if (! $sortorder)
|
||||||
|
{
|
||||||
|
$out.= '<a href="'.$file.'?sortfield='.$field.'&sortorder=asc&begin='.$begin.$options.'">'.img_down("A-Z",0).'</a>';
|
||||||
|
$out.= '<a href="'.$file.'?sortfield='.$field.'&sortorder=desc&begin='.$begin.$options.'">'.img_up("Z-A",0).'</a>';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if ($field != $sortfield)
|
||||||
|
{
|
||||||
|
$out.= '<a href="'.$file.'?sortfield='.$field.'&sortorder=asc&begin='.$begin.$options.'">'.img_down("A-Z",0).'</a>';
|
||||||
|
$out.= '<a href="'.$file.'?sortfield='.$field.'&sortorder=desc&begin='.$begin.$options.'">'.img_up("Z-A",0).'</a>';
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$sortorder=strtoupper($sortorder);
|
||||||
|
if ($sortorder == 'DESC' ) {
|
||||||
|
$out.= '<a href="'.$file.'?sortfield='.$field.'&sortorder=asc&begin='.$begin.$options.'">'.img_down("A-Z",0).'</a>';
|
||||||
|
$out.= '<a href="'.$file.'?sortfield='.$field.'&sortorder=desc&begin='.$begin.$options.'">'.img_up("Z-A",1).'</a>';
|
||||||
|
}
|
||||||
|
if ($sortorder == 'ASC' ) {
|
||||||
|
$out.= '<a href="'.$file.'?sortfield='.$field.'&sortorder=asc&begin='.$begin.$options.'">'.img_down("A-Z",1).'</a>';
|
||||||
|
$out.= '<a href="'.$file.'?sortfield='.$field.'&sortorder=desc&begin='.$begin.$options.'">'.img_up("Z-A",0).'</a>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$out.='</th>';
|
||||||
|
|
||||||
return $out;
|
return $out;
|
||||||
}
|
}
|
||||||
@@ -2672,6 +2664,7 @@ function print_fiche_titre($titre, $mesg='', $picto='title.png', $pictoisfullpat
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Load a title with picto
|
* Load a title with picto
|
||||||
|
*
|
||||||
* @param titre Title to show
|
* @param titre Title to show
|
||||||
* @param mesg Added message to show on right
|
* @param mesg Added message to show on right
|
||||||
* @param picto Icon to use before title (should be a 32x32 transparent png file)
|
* @param picto Icon to use before title (should be a 32x32 transparent png file)
|
||||||
@@ -2704,6 +2697,7 @@ function load_fiche_titre($titre, $mesg='', $picto='title.png', $pictoisfullpath
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Print a title with navigation controls for pagination
|
* Print a title with navigation controls for pagination
|
||||||
|
*
|
||||||
* @param titre Title to show (required)
|
* @param titre Title to show (required)
|
||||||
* @param page Numero of page (required)
|
* @param page Numero of page (required)
|
||||||
* @param file Url of page (required)
|
* @param file Url of page (required)
|
||||||
@@ -2813,6 +2807,7 @@ function print_barre_liste($titre, $page, $file, $options='', $sortfield='', $so
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Fonction servant a afficher les fleches de navigation dans les pages de listes
|
* Fonction servant a afficher les fleches de navigation dans les pages de listes
|
||||||
|
*
|
||||||
* @param page Numero of page
|
* @param page Numero of page
|
||||||
* @param file Lien
|
* @param file Lien
|
||||||
* @param options Autres parametres d'url a propager dans les liens ("" par defaut)
|
* @param options Autres parametres d'url a propager dans les liens ("" par defaut)
|
||||||
@@ -2837,6 +2832,7 @@ function print_fleche_navigation($page,$file,$options='',$nextpage,$betweenarrow
|
|||||||
/**
|
/**
|
||||||
* Fonction qui retourne un taux de tva formate pour visualisation
|
* Fonction qui retourne un taux de tva formate pour visualisation
|
||||||
* Utilisee dans les pdf et les pages html
|
* Utilisee dans les pdf et les pages html
|
||||||
|
*
|
||||||
* @param rate Rate value to format (19.6 19,6 19.6% 19,6%,...)
|
* @param rate Rate value to format (19.6 19,6 19.6% 19,6%,...)
|
||||||
* @param addpercent Add a percent % sign in output
|
* @param addpercent Add a percent % sign in output
|
||||||
* @param info_bits Miscellanous information on vat
|
* @param info_bits Miscellanous information on vat
|
||||||
@@ -2865,6 +2861,7 @@ function vatrate($rate,$addpercent=false,$info_bits=0)
|
|||||||
/**
|
/**
|
||||||
* Fonction qui formate un montant pour visualisation
|
* Fonction qui formate un montant pour visualisation
|
||||||
* Fonction utilisee dans les pdf et les pages html
|
* Fonction utilisee dans les pdf et les pages html
|
||||||
|
*
|
||||||
* @param amount Montant a formater
|
* @param amount Montant a formater
|
||||||
* @param html Type de formatage, html ou pas (par defaut)
|
* @param html Type de formatage, html ou pas (par defaut)
|
||||||
* @param outlangs Objet langs pour formatage text
|
* @param outlangs Objet langs pour formatage text
|
||||||
@@ -2937,7 +2934,8 @@ function price($amount, $html=0, $outlangs='', $trunc=1, $rounding=-1, $forcerou
|
|||||||
/**
|
/**
|
||||||
* Function that return a number with universal decimal format (decimal separator is '.') from
|
* Function that return a number with universal decimal format (decimal separator is '.') from
|
||||||
* an amount typed by a user.
|
* an amount typed by a user.
|
||||||
* Function to use on each input amount before any numeric test or database insert.
|
* Function to use on each input amount before any numeric test or database insert
|
||||||
|
*
|
||||||
* @param amount Amount to convert/clean
|
* @param amount Amount to convert/clean
|
||||||
* @param rounding ''=No rounding
|
* @param rounding ''=No rounding
|
||||||
* 'MU'=Round to Max unit price (MAIN_MAX_DECIMALS_UNIT)
|
* 'MU'=Round to Max unit price (MAIN_MAX_DECIMALS_UNIT)
|
||||||
@@ -3022,6 +3020,7 @@ function price2num($amount,$rounding='',$alreadysqlnb=0)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Return localtaxe rate for a particular tva
|
* Return localtaxe rate for a particular tva
|
||||||
|
*
|
||||||
* @param tva Vat taxe
|
* @param tva Vat taxe
|
||||||
* @param local Local taxe to search and return
|
* @param local Local taxe to search and return
|
||||||
* @param societe_acheteuse Object of buying third party
|
* @param societe_acheteuse Object of buying third party
|
||||||
@@ -3060,7 +3059,8 @@ function get_localtax($tva, $local, $societe_acheteuse="")
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Return vat rate of a product in a particular selling country or default country
|
* Return vat rate of a product in a particular selling country or default country
|
||||||
* vat if product is unknown.
|
* vat if product is unknown
|
||||||
|
*
|
||||||
* @param idprod Id of product or 0 if not a predefined product
|
* @param idprod Id of product or 0 if not a predefined product
|
||||||
* @param countrycode Country code (FR, US, IT, ...)
|
* @param countrycode Country code (FR, US, IT, ...)
|
||||||
* @return int <0 if KO, Vat rate if OK
|
* @return int <0 if KO, Vat rate if OK
|
||||||
@@ -3119,6 +3119,7 @@ function get_product_vat_for_country($idprod, $countrycode)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Return localtax rate of a product in a particular selling country
|
* Return localtax rate of a product in a particular selling country
|
||||||
|
*
|
||||||
* @param idprod Id of product
|
* @param idprod Id of product
|
||||||
* @package local 1 for localtax1, 2 for localtax 2
|
* @package local 1 for localtax1, 2 for localtax 2
|
||||||
* @param countrycode Country code (FR, US, IT, ...)
|
* @param countrycode Country code (FR, US, IT, ...)
|
||||||
@@ -3276,6 +3277,7 @@ function get_default_localtax($societe_vendeuse, $societe_acheteuse, $local, $id
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Return yes or no in current language
|
* Return yes or no in current language
|
||||||
|
*
|
||||||
* @param yesno Value to test (1, 'yes', 'true' or 0, 'no', 'false')
|
* @param yesno Value to test (1, 'yes', 'true' or 0, 'no', 'false')
|
||||||
* @param case 1=Yes/No, 0=yes/no
|
* @param case 1=Yes/No, 0=yes/no
|
||||||
* @param color 0=texte only, 1=Text is formated with a color font style ('ok' or 'error'), 2=Text is formated with 'ok' color.
|
* @param color 0=texte only, 1=Text is formated with a color font style ('ok' or 'error'), 2=Text is formated with 'ok' color.
|
||||||
@@ -3304,6 +3306,7 @@ function yn($yesno, $case=1, $color=0)
|
|||||||
* Return a path to have a directory according to an id
|
* Return a path to have a directory according to an id
|
||||||
* Examples: '001' with level 3->"0/0/1/", '015' with level 3->"0/1/5/"
|
* Examples: '001' with level 3->"0/0/1/", '015' with level 3->"0/1/5/"
|
||||||
* Examples: 'ABC-1' with level 3 ->"0/0/1/", '015' with level 1->"5/"
|
* Examples: 'ABC-1' with level 3 ->"0/0/1/", '015' with level 1->"5/"
|
||||||
|
*
|
||||||
* @param $num Id to develop
|
* @param $num Id to develop
|
||||||
* @param $level Level of development (1, 2 or 3 level)
|
* @param $level Level of development (1, 2 or 3 level)
|
||||||
* @param $alpha Use alpha ref
|
* @param $alpha Use alpha ref
|
||||||
@@ -3330,6 +3333,7 @@ function create_exdir($dir)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Creation of a directory (recursive)
|
* Creation of a directory (recursive)
|
||||||
|
*
|
||||||
* @param $dir Directory to create
|
* @param $dir Directory to create
|
||||||
* @return int < 0 if KO, 0 = already exists, > 0 if OK
|
* @return int < 0 if KO, 0 = already exists, > 0 if OK
|
||||||
*/
|
*/
|
||||||
@@ -3391,6 +3395,7 @@ function dol_mkdir($dir)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Return picto saying a field is required
|
* Return picto saying a field is required
|
||||||
|
*
|
||||||
* @return string Chaine avec picto obligatoire
|
* @return string Chaine avec picto obligatoire
|
||||||
*/
|
*/
|
||||||
function picto_required()
|
function picto_required()
|
||||||
@@ -3401,6 +3406,7 @@ function picto_required()
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Clean a string from all HTML tags and entities
|
* Clean a string from all HTML tags and entities
|
||||||
|
*
|
||||||
* @param StringHtml String to clean
|
* @param StringHtml String to clean
|
||||||
* @param removelinefeed Replace also all lines feeds by a space
|
* @param removelinefeed Replace also all lines feeds by a space
|
||||||
* @return string String cleaned
|
* @return string String cleaned
|
||||||
@@ -3425,7 +3431,8 @@ function dol_string_nohtmltag($StringHtml,$removelinefeed=1)
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Replace CRLF in string with a HTML BR tag.
|
* Replace CRLF in string with a HTML BR tag
|
||||||
|
*
|
||||||
* @param stringtoencode String to encode
|
* @param stringtoencode String to encode
|
||||||
* @param nl2brmode 0=Adding br before \n, 1=Replacing \n by br
|
* @param nl2brmode 0=Adding br before \n, 1=Replacing \n by br
|
||||||
* @param forxml false=Use <br>, true=Use <br />
|
* @param forxml false=Use <br>, true=Use <br />
|
||||||
@@ -3455,7 +3462,8 @@ function dol_nl2br($stringtoencode,$nl2brmode=0,$forxml=false)
|
|||||||
* - writeHTMLCell -> param must be encoded into HTML.
|
* - writeHTMLCell -> param must be encoded into HTML.
|
||||||
* - MultiCell -> param must not be encoded into HTML.
|
* - MultiCell -> param must not be encoded into HTML.
|
||||||
* Because writeHTMLCell convert also \n into <br>, if function
|
* Because writeHTMLCell convert also \n into <br>, if function
|
||||||
* is used to build PDF, nl2brmode must be 1.
|
* is used to build PDF, nl2brmode must be 1
|
||||||
|
*
|
||||||
* @param stringtoencode String to encode
|
* @param stringtoencode String to encode
|
||||||
* @param nl2brmode 0=Adding br before \n, 1=Replacing \n by br (for use with FPDF writeHTMLCell function for example)
|
* @param nl2brmode 0=Adding br before \n, 1=Replacing \n by br (for use with FPDF writeHTMLCell function for example)
|
||||||
* @param pagecodefrom Pagecode stringtoencode is encoded
|
* @param pagecodefrom Pagecode stringtoencode is encoded
|
||||||
@@ -3482,6 +3490,7 @@ function dol_htmlentitiesbr($stringtoencode,$nl2brmode=0,$pagecodefrom='UTF-8')
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* This function is called to decode a HTML string (it decodes entities and br tags)
|
* This function is called to decode a HTML string (it decodes entities and br tags)
|
||||||
|
*
|
||||||
* @param stringtodecode String to decode
|
* @param stringtodecode String to decode
|
||||||
* @param pagecodeto Page code for result
|
* @param pagecodeto Page code for result
|
||||||
*/
|
*/
|
||||||
@@ -3497,6 +3506,7 @@ function dol_htmlentitiesbr_decode($stringtodecode,$pagecodeto='UTF-8')
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* This function remove all ending \n and br at end
|
* This function remove all ending \n and br at end
|
||||||
|
*
|
||||||
* @param stringtodecode String to decode
|
* @param stringtodecode String to decode
|
||||||
*/
|
*/
|
||||||
function dol_htmlcleanlastbr($stringtodecode)
|
function dol_htmlcleanlastbr($stringtodecode)
|
||||||
@@ -3507,6 +3517,7 @@ function dol_htmlcleanlastbr($stringtodecode)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* This function is called to decode a string with HTML entities (it decodes entities tags)
|
* This function is called to decode a string with HTML entities (it decodes entities tags)
|
||||||
|
*
|
||||||
* @param stringhtml stringhtml
|
* @param stringhtml stringhtml
|
||||||
* @param pagecodeto Encoding of input string
|
* @param pagecodeto Encoding of input string
|
||||||
* @return string decodestring
|
* @return string decodestring
|
||||||
@@ -3519,6 +3530,7 @@ function dol_entity_decode($stringhtml,$pagecodeto='UTF-8')
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Replace html_entity_decode functions to manage errors
|
* Replace html_entity_decode functions to manage errors
|
||||||
|
*
|
||||||
* @param a
|
* @param a
|
||||||
* @param b
|
* @param b
|
||||||
* @param c
|
* @param c
|
||||||
@@ -3533,6 +3545,7 @@ function dol_html_entity_decode($a,$b,$c)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Replace htmlentities functions to manage errors
|
* Replace htmlentities functions to manage errors
|
||||||
|
*
|
||||||
* @param a
|
* @param a
|
||||||
* @param b
|
* @param b
|
||||||
* @param c
|
* @param c
|
||||||
@@ -3549,7 +3562,8 @@ function dol_htmlentities($a,$b,$c)
|
|||||||
/**
|
/**
|
||||||
* Check if a string is a correct iso string
|
* Check if a string is a correct iso string
|
||||||
* If not, it will we considered not HTML encoded even if it is by FPDF.
|
* If not, it will we considered not HTML encoded even if it is by FPDF.
|
||||||
* Example, if string contains euro symbol that has ascii code 128.
|
* Example, if string contains euro symbol that has ascii code 128
|
||||||
|
*
|
||||||
* @param s String to check
|
* @param s String to check
|
||||||
* @return int 0 if bad iso, 1 if good iso
|
* @return int 0 if bad iso, 1 if good iso
|
||||||
*/
|
*/
|
||||||
@@ -3570,6 +3584,7 @@ function dol_string_is_good_iso($s)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Return nb of lines of a clear text
|
* Return nb of lines of a clear text
|
||||||
|
*
|
||||||
* @param s String to check
|
* @param s String to check
|
||||||
* @param maxchar Not yet used
|
* @param maxchar Not yet used
|
||||||
* @return int Number of lines
|
* @return int Number of lines
|
||||||
@@ -3586,6 +3601,7 @@ function dol_nboflines($s,$maxchar=0)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Return nb of lines of a formated text with \n and <br>
|
* Return nb of lines of a formated text with \n and <br>
|
||||||
|
*
|
||||||
* @param text Text
|
* @param text Text
|
||||||
* @param maxlinesize Largeur de ligne en caracteres (ou 0 si pas de limite - defaut)
|
* @param maxlinesize Largeur de ligne en caracteres (ou 0 si pas de limite - defaut)
|
||||||
* @param charset Give the charset used to encode the $text variable in memory.
|
* @param charset Give the charset used to encode the $text variable in memory.
|
||||||
@@ -3622,6 +3638,7 @@ function dol_nboflines_bis($text,$maxlinesize=0,$charset='UTF-8')
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Same function than microtime in PHP 5 but compatible with PHP4
|
* Same function than microtime in PHP 5 but compatible with PHP4
|
||||||
|
*
|
||||||
* @return float Time (millisecondes) with microsecondes in decimal part
|
* @return float Time (millisecondes) with microsecondes in decimal part
|
||||||
*/
|
*/
|
||||||
function dol_microtime_float()
|
function dol_microtime_float()
|
||||||
@@ -3632,6 +3649,7 @@ function dol_microtime_float()
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Return if a text is a html content
|
* Return if a text is a html content
|
||||||
|
*
|
||||||
* @param msg Content to check
|
* @param msg Content to check
|
||||||
* @param option 0=Full detection, 1=Fast check
|
* @param option 0=Full detection, 1=Fast check
|
||||||
* @return boolean true/false
|
* @return boolean true/false
|
||||||
@@ -4094,7 +4112,8 @@ function verifCond($strRights)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Replace eval function to add more security.
|
* Replace eval function to add more security.
|
||||||
* This function is called by verifCond().
|
* This function is called by verifCond()
|
||||||
|
*
|
||||||
* @param string $s
|
* @param string $s
|
||||||
*/
|
*/
|
||||||
function dol_eval($s)
|
function dol_eval($s)
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ function vat_by_thirdparty($db, $y, $date_start, $date_end, $modetax, $direction
|
|||||||
// If vat paid on due invoices (non draft)
|
// If vat paid on due invoices (non draft)
|
||||||
if ($conf->global->MAIN_MODULE_ACCOUNTING)
|
if ($conf->global->MAIN_MODULE_ACCOUNTING)
|
||||||
{
|
{
|
||||||
// \todo a ce jour on se sait pas la compter car le montant tva d'un payment
|
// TODO a ce jour on se sait pas la compter car le montant tva d'un payment
|
||||||
// n'est pas stocke dans la table des payments.
|
// n'est pas stocke dans la table des payments.
|
||||||
// Seul le module compta expert peut resoudre ce probleme.
|
// Seul le module compta expert peut resoudre ce probleme.
|
||||||
// (Il faut quand un payment a lieu, stocker en plus du montant du paiement le
|
// (Il faut quand un payment a lieu, stocker en plus du montant du paiement le
|
||||||
@@ -102,7 +102,7 @@ function vat_by_thirdparty($db, $y, $date_start, $date_end, $modetax, $direction
|
|||||||
if ($conf->global->MAIN_MODULE_ACCOUNTING)
|
if ($conf->global->MAIN_MODULE_ACCOUNTING)
|
||||||
{
|
{
|
||||||
// If vat paid on payments
|
// If vat paid on payments
|
||||||
// \todo a ce jour on se sait pas la compter car le montant tva d'un payment
|
// TODO a ce jour on se sait pas la compter car le montant tva d'un payment
|
||||||
// n'est pas stocke dans la table des payments.
|
// n'est pas stocke dans la table des payments.
|
||||||
// Seul le module compta expert peut resoudre ce probleme.
|
// Seul le module compta expert peut resoudre ce probleme.
|
||||||
// (Il faut quand un payment a lieu, stocker en plus du montant du paiement le
|
// (Il faut quand un payment a lieu, stocker en plus du montant du paiement le
|
||||||
@@ -215,7 +215,7 @@ function vat_by_date($db, $y, $q, $date_start, $date_end, $modetax, $direction,
|
|||||||
{
|
{
|
||||||
if ($conf->global->MAIN_MODULE_ACCOUNTING)
|
if ($conf->global->MAIN_MODULE_ACCOUNTING)
|
||||||
{
|
{
|
||||||
// \todo a ce jour on se sait pas la compter car le montant tva d'un payment
|
// TODO a ce jour on se sait pas la compter car le montant tva d'un payment
|
||||||
// n'est pas stocke dans la table des payments.
|
// n'est pas stocke dans la table des payments.
|
||||||
// Seul le module compta expert peut resoudre ce probleme.
|
// Seul le module compta expert peut resoudre ce probleme.
|
||||||
// (Il faut quand un payment a lieu, stocker en plus du montant du paiement le
|
// (Il faut quand un payment a lieu, stocker en plus du montant du paiement le
|
||||||
@@ -261,7 +261,7 @@ function vat_by_date($db, $y, $q, $date_start, $date_end, $modetax, $direction,
|
|||||||
{
|
{
|
||||||
if ($conf->global->MAIN_MODULE_ACCOUNTING)
|
if ($conf->global->MAIN_MODULE_ACCOUNTING)
|
||||||
{
|
{
|
||||||
// \todo a ce jour on se sait pas la compter car le montant tva d'un payment
|
// TODO a ce jour on se sait pas la compter car le montant tva d'un payment
|
||||||
// n'est pas stocke dans la table des payments.
|
// n'est pas stocke dans la table des payments.
|
||||||
// Seul le module compta expert peut resoudre ce probleme.
|
// Seul le module compta expert peut resoudre ce probleme.
|
||||||
// (Il faut quand un payment a lieu, stocker en plus du montant du paiement le
|
// (Il faut quand un payment a lieu, stocker en plus du montant du paiement le
|
||||||
@@ -376,7 +376,7 @@ function vat_by_date($db, $y, $q, $date_start, $date_end, $modetax, $direction,
|
|||||||
if ($conf->global->MAIN_MODULE_ACCOUNTING)
|
if ($conf->global->MAIN_MODULE_ACCOUNTING)
|
||||||
{
|
{
|
||||||
// Count on invoice date
|
// Count on invoice date
|
||||||
// \todo a ce jour on se sait pas la compter car le montant tva d'un payment
|
// TODO a ce jour on se sait pas la compter car le montant tva d'un payment
|
||||||
// n'est pas stocke dans la table des payments.
|
// n'est pas stocke dans la table des payments.
|
||||||
// Seul le module compta expert peut resoudre ce probleme.
|
// Seul le module compta expert peut resoudre ce probleme.
|
||||||
// (Il faut quand un payment a lieu, stocker en plus du montant du paiement le
|
// (Il faut quand un payment a lieu, stocker en plus du montant du paiement le
|
||||||
@@ -423,7 +423,7 @@ function vat_by_date($db, $y, $q, $date_start, $date_end, $modetax, $direction,
|
|||||||
if ($conf->global->MAIN_MODULE_ACCOUNTING)
|
if ($conf->global->MAIN_MODULE_ACCOUNTING)
|
||||||
{
|
{
|
||||||
// Count on payments date
|
// Count on payments date
|
||||||
// \todo a ce jour on se sait pas la compter car le montant tva d'un payment
|
// TODO a ce jour on se sait pas la compter car le montant tva d'un payment
|
||||||
// n'est pas stocke dans la table des payments.
|
// n'est pas stocke dans la table des payments.
|
||||||
// Seul le module compta expert peut resoudre ce probleme.
|
// Seul le module compta expert peut resoudre ce probleme.
|
||||||
// (Il faut quand un paiement a lieu, stocker en plus du montant du paiement le
|
// (Il faut quand un paiement a lieu, stocker en plus du montant du paiement le
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \file htdocs/product/canvas/service/product.service.class.php
|
* \file htdocs/product/canvas/service/actions_card_service.class.php
|
||||||
* \ingroup service
|
* \ingroup service
|
||||||
* \brief Fichier de la classe des services par defaut
|
* \brief Fichier de la classe des services par defaut
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -2485,7 +2485,7 @@ class Product extends CommonObject
|
|||||||
if (file_exists($dir_osencoded))
|
if (file_exists($dir_osencoded))
|
||||||
{
|
{
|
||||||
// Cree fichier en taille vignette
|
// Cree fichier en taille vignette
|
||||||
// \todo A faire
|
// TODO A faire
|
||||||
|
|
||||||
// Cree fichier en taille origine
|
// Cree fichier en taille origine
|
||||||
$content = @file_get_contents($file);
|
$content = @file_get_contents($file);
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \files htdocs/societe/class/companybankaccount.class.php
|
* \file htdocs/societe/class/companybankaccount.class.php
|
||||||
* \ingroup societe
|
* \ingroup societe
|
||||||
* \brief File of class to manage bank accounts description of third parties
|
* \brief File of class to manage bank accounts description of third parties
|
||||||
*/
|
*/
|
||||||
@@ -26,159 +26,159 @@ require_once(DOL_DOCUMENT_ROOT ."/compta/bank/class/account.class.php");
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Class to manage bank accounts description of third parties
|
* \brief Class to manage bank accounts description of third parties
|
||||||
*/
|
*/
|
||||||
class CompanyBankAccount extends Account
|
class CompanyBankAccount extends Account
|
||||||
{
|
{
|
||||||
var $rowid;
|
var $rowid;
|
||||||
var $socid;
|
var $socid;
|
||||||
|
|
||||||
var $bank;
|
var $bank;
|
||||||
var $courant;
|
var $courant;
|
||||||
var $clos;
|
var $clos;
|
||||||
var $code_banque;
|
var $code_banque;
|
||||||
var $code_guichet;
|
var $code_guichet;
|
||||||
var $number;
|
var $number;
|
||||||
var $cle_rib;
|
var $cle_rib;
|
||||||
var $bic;
|
var $bic;
|
||||||
var $iban;
|
var $iban;
|
||||||
var $iban_prefix; // deprecated
|
var $iban_prefix; // deprecated
|
||||||
var $proprio;
|
var $proprio;
|
||||||
var $adresse_proprio;
|
var $adresse_proprio;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
*/
|
*/
|
||||||
function CompanyBankAccount($DB)
|
function CompanyBankAccount($DB)
|
||||||
{
|
{
|
||||||
$this->db = $DB;
|
$this->db = $DB;
|
||||||
|
|
||||||
$this->socid = 0;
|
$this->socid = 0;
|
||||||
$this->clos = 0;
|
$this->clos = 0;
|
||||||
$this->solde = 0;
|
$this->solde = 0;
|
||||||
$this->error_number = 0;
|
$this->error_number = 0;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create bank information record
|
* Create bank information record
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
function create()
|
function create()
|
||||||
{
|
{
|
||||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."societe_rib (fk_soc, datec) values ($this->socid, ".$this->db->idate(mktime()).")";
|
$sql = "INSERT INTO ".MAIN_DB_PREFIX."societe_rib (fk_soc, datec) values ($this->socid, ".$this->db->idate(mktime()).")";
|
||||||
$resql=$this->db->query($sql);
|
$resql=$this->db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
if ($this->db->affected_rows($resql))
|
if ($this->db->affected_rows($resql))
|
||||||
{
|
{
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print $this->db->error();
|
print $this->db->error();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
function update($user='')
|
function update($user='')
|
||||||
{
|
{
|
||||||
|
|
||||||
$sql = "SELECT fk_soc FROM ".MAIN_DB_PREFIX."societe_rib";
|
$sql = "SELECT fk_soc FROM ".MAIN_DB_PREFIX."societe_rib";
|
||||||
$sql .= " WHERE fk_soc = ".$this->socid;
|
$sql .= " WHERE fk_soc = ".$this->socid;
|
||||||
|
|
||||||
$result = $this->db->query($sql);
|
$result = $this->db->query($sql);
|
||||||
if ($result)
|
if ($result)
|
||||||
{
|
{
|
||||||
if ($this->db->num_rows($result) == 0)
|
if ($this->db->num_rows($result) == 0)
|
||||||
{
|
{
|
||||||
$this->create();
|
$this->create();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
dol_print_error($this->db);
|
dol_print_error($this->db);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql = "UPDATE ".MAIN_DB_PREFIX."societe_rib SET ";
|
$sql = "UPDATE ".MAIN_DB_PREFIX."societe_rib SET ";
|
||||||
$sql .= " bank = '" .$this->db->escape($this->bank)."'";
|
$sql .= " bank = '" .$this->db->escape($this->bank)."'";
|
||||||
$sql .= ",code_banque='".$this->code_banque."'";
|
$sql .= ",code_banque='".$this->code_banque."'";
|
||||||
$sql .= ",code_guichet='".$this->code_guichet."'";
|
$sql .= ",code_guichet='".$this->code_guichet."'";
|
||||||
$sql .= ",number='".$this->number."'";
|
$sql .= ",number='".$this->number."'";
|
||||||
$sql .= ",cle_rib='".$this->cle_rib."'";
|
$sql .= ",cle_rib='".$this->cle_rib."'";
|
||||||
$sql .= ",bic='".$this->bic."'";
|
$sql .= ",bic='".$this->bic."'";
|
||||||
$sql .= ",iban_prefix = '".$this->iban_prefix."'";
|
$sql .= ",iban_prefix = '".$this->iban_prefix."'";
|
||||||
$sql .= ",domiciliation='".$this->db->escape($this->domiciliation)."'";
|
$sql .= ",domiciliation='".$this->db->escape($this->domiciliation)."'";
|
||||||
$sql .= ",proprio = '".$this->db->escape($this->proprio)."'";
|
$sql .= ",proprio = '".$this->db->escape($this->proprio)."'";
|
||||||
$sql .= ",adresse_proprio = '".$this->db->escape($this->adresse_proprio)."'";
|
$sql .= ",adresse_proprio = '".$this->db->escape($this->adresse_proprio)."'";
|
||||||
$sql .= " WHERE fk_soc = ".$this->socid;
|
$sql .= " WHERE fk_soc = ".$this->socid;
|
||||||
|
|
||||||
$result = $this->db->query($sql);
|
$result = $this->db->query($sql);
|
||||||
if ($result)
|
if ($result)
|
||||||
{
|
{
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
dol_print_error($this->db);
|
dol_print_error($this->db);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Load record from database
|
* Load record from database
|
||||||
* @param id Id of record
|
* @param id Id of record
|
||||||
* @param socid Id of company
|
* @param socid Id of company
|
||||||
*/
|
*/
|
||||||
function fetch($id,$socid=0)
|
function fetch($id,$socid=0)
|
||||||
{
|
{
|
||||||
if (empty($id) && empty($socid)) return -1;
|
if (empty($id) && empty($socid)) return -1;
|
||||||
|
|
||||||
$sql = "SELECT rowid, fk_soc, bank, number, code_banque, code_guichet, cle_rib, bic, iban_prefix as iban, domiciliation, proprio, adresse_proprio";
|
$sql = "SELECT rowid, fk_soc, bank, number, code_banque, code_guichet, cle_rib, bic, iban_prefix as iban, domiciliation, proprio, adresse_proprio";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."societe_rib";
|
$sql.= " FROM ".MAIN_DB_PREFIX."societe_rib";
|
||||||
if ($id) $sql.= " WHERE rowid = ".$id;
|
if ($id) $sql.= " WHERE rowid = ".$id;
|
||||||
if ($socid) $sql.= " WHERE fk_soc = ".$socid;
|
if ($socid) $sql.= " WHERE fk_soc = ".$socid;
|
||||||
|
|
||||||
$resql = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
if ($this->db->num_rows($resql))
|
if ($this->db->num_rows($resql))
|
||||||
{
|
{
|
||||||
$obj = $this->db->fetch_object($resql);
|
$obj = $this->db->fetch_object($resql);
|
||||||
|
|
||||||
$this->id = $obj->rowid;
|
$this->id = $obj->rowid;
|
||||||
$this->socid = $obj->fk_soc;
|
$this->socid = $obj->fk_soc;
|
||||||
$this->bank = $obj->bank;
|
$this->bank = $obj->bank;
|
||||||
$this->courant = $obj->courant;
|
$this->courant = $obj->courant;
|
||||||
$this->clos = $obj->clos;
|
$this->clos = $obj->clos;
|
||||||
$this->code_banque = $obj->code_banque;
|
$this->code_banque = $obj->code_banque;
|
||||||
$this->code_guichet = $obj->code_guichet;
|
$this->code_guichet = $obj->code_guichet;
|
||||||
$this->number = $obj->number;
|
$this->number = $obj->number;
|
||||||
$this->cle_rib = $obj->cle_rib;
|
$this->cle_rib = $obj->cle_rib;
|
||||||
$this->bic = $obj->bic;
|
$this->bic = $obj->bic;
|
||||||
$this->iban = $obj->iban;
|
$this->iban = $obj->iban;
|
||||||
$this->iban_prefix = $obj->iban; // deprecated
|
$this->iban_prefix = $obj->iban; // deprecated
|
||||||
$this->domiciliation = $obj->domiciliation;
|
$this->domiciliation = $obj->domiciliation;
|
||||||
$this->proprio = $obj->proprio;
|
$this->proprio = $obj->proprio;
|
||||||
$this->adresse_proprio = $obj->adresse_proprio;
|
$this->adresse_proprio = $obj->adresse_proprio;
|
||||||
}
|
}
|
||||||
$this->db->free($resql);
|
$this->db->free($resql);
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
dol_print_error($this->db);
|
dol_print_error($this->db);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1545,14 +1545,16 @@ class Societe extends CommonObject
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Return list of contacts emails existing for third party
|
* Return list of contacts emails existing for third party
|
||||||
* @return array Array of contacts emails
|
*
|
||||||
|
* @param int $addthirdparty 1=Add also a record for thirdparty email
|
||||||
|
* @return array Array of contacts emails
|
||||||
*/
|
*/
|
||||||
function thirdparty_and_contact_email_array()
|
function thirdparty_and_contact_email_array($addthirdparty=0)
|
||||||
{
|
{
|
||||||
global $langs;
|
global $langs;
|
||||||
|
|
||||||
$contact_emails = $this->contact_property_array('email');
|
$contact_emails = $this->contact_property_array('email');
|
||||||
if ($this->email)
|
if ($this->email && $addthirdparty)
|
||||||
{
|
{
|
||||||
if (empty($this->name)) $this->name=$this->nom;
|
if (empty($this->name)) $this->name=$this->nom;
|
||||||
// TODO: Tester si email non deja present dans tableau contact
|
// TODO: Tester si email non deja present dans tableau contact
|
||||||
@@ -1563,6 +1565,7 @@ class Societe extends CommonObject
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Return list of contacts mobile phone existing for third party
|
* Return list of contacts mobile phone existing for third party
|
||||||
|
*
|
||||||
* @return array Array of contacts emails
|
* @return array Array of contacts emails
|
||||||
*/
|
*/
|
||||||
function thirdparty_and_contact_phone_array()
|
function thirdparty_and_contact_phone_array()
|
||||||
@@ -1581,6 +1584,7 @@ class Societe extends CommonObject
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Return list of contacts emails or mobile existing for third party
|
* Return list of contacts emails or mobile existing for third party
|
||||||
|
*
|
||||||
* @param mode 'email' or 'mobile'
|
* @param mode 'email' or 'mobile'
|
||||||
* @return array Array of contacts emails or mobile
|
* @return array Array of contacts emails or mobile
|
||||||
*/
|
*/
|
||||||
@@ -1591,6 +1595,7 @@ class Societe extends CommonObject
|
|||||||
$sql = "SELECT rowid, email, phone_mobile, name, firstname";
|
$sql = "SELECT rowid, email, phone_mobile, name, firstname";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."socpeople";
|
$sql.= " FROM ".MAIN_DB_PREFIX."socpeople";
|
||||||
$sql.= " WHERE fk_soc = '".$this->id."'";
|
$sql.= " WHERE fk_soc = '".$this->id."'";
|
||||||
|
|
||||||
$resql=$this->db->query($sql);
|
$resql=$this->db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
@@ -1617,8 +1622,9 @@ class Societe extends CommonObject
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Renvoie la liste des contacts de cette societe
|
* Renvoie la liste des contacts de cette societe
|
||||||
* \return array tableau des contacts
|
*
|
||||||
|
* @return array tableau des contacts
|
||||||
*/
|
*/
|
||||||
function contact_array()
|
function contact_array()
|
||||||
{
|
{
|
||||||
@@ -1649,6 +1655,7 @@ class Societe extends CommonObject
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Return property of contact from its id
|
* Return property of contact from its id
|
||||||
|
*
|
||||||
* @param rowid id of contact
|
* @param rowid id of contact
|
||||||
* @param mode 'email' or 'mobile'
|
* @param mode 'email' or 'mobile'
|
||||||
* @return string email of contact
|
* @return string email of contact
|
||||||
@@ -1684,7 +1691,9 @@ class Societe extends CommonObject
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Affiche le rib
|
* Return bank number property of thirdparty
|
||||||
|
*
|
||||||
|
* @return string Bank number
|
||||||
*/
|
*/
|
||||||
function display_rib()
|
function display_rib()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -33,8 +33,12 @@ $langs->load("mails");
|
|||||||
$langs->load("admin");
|
$langs->load("admin");
|
||||||
$langs->load("other");
|
$langs->load("other");
|
||||||
|
|
||||||
|
$socid = GETPOST("socid",'int');
|
||||||
|
$action = GETPOST('action');
|
||||||
|
$contactid=GETPOST('contactid'); // May be an int or 'thirdparty'
|
||||||
|
$actionid=GETPOST('actionid');
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
$socid = isset($_GET["socid"])?$_GET["socid"]:'';
|
|
||||||
if ($user->societe_id) $socid=$user->societe_id;
|
if ($user->societe_id) $socid=$user->societe_id;
|
||||||
$result = restrictedArea($user, 'societe','','');
|
$result = restrictedArea($user, 'societe','','');
|
||||||
|
|
||||||
@@ -48,41 +52,71 @@ $pagenext = $page + 1;
|
|||||||
if (! $sortorder) $sortorder="ASC";
|
if (! $sortorder) $sortorder="ASC";
|
||||||
if (! $sortfield) $sortfield="c.name";
|
if (! $sortfield) $sortfield="c.name";
|
||||||
|
|
||||||
|
$now=dol_now();
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Action
|
* Actions
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// Add a notification
|
// Add a notification
|
||||||
if ($_POST["action"] == 'add')
|
if ($action == 'add')
|
||||||
{
|
{
|
||||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."notify_def";
|
$error=0;
|
||||||
$sql .= " WHERE fk_soc=".$socid." AND fk_contact=".$_POST["contactid"]." AND fk_action=".$_POST["actionid"];
|
|
||||||
if ($db->query($sql))
|
|
||||||
{
|
|
||||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."notify_def (datec,fk_soc, fk_contact, fk_action)";
|
|
||||||
$sql .= " VALUES (".$db->idate(mktime()).",".$socid.",".$_POST["contactid"].",".$_POST["actionid"].")";
|
|
||||||
|
|
||||||
if ($db->query($sql))
|
if (empty($contactid))
|
||||||
{
|
{
|
||||||
|
$mesg='<div class="error">'.$langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Contact")).'</div>';
|
||||||
|
$error++;
|
||||||
|
}
|
||||||
|
if ($actionid <= 0)
|
||||||
|
{
|
||||||
|
$mesg='<div class="error">'.$langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Action")).'</div>';
|
||||||
|
$error++;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
if (! $error)
|
||||||
else
|
{
|
||||||
{
|
$db->begin();
|
||||||
dol_print_error($db);
|
|
||||||
}
|
$sql = "DELETE FROM ".MAIN_DB_PREFIX."notify_def";
|
||||||
}
|
$sql .= " WHERE fk_soc=".$socid." AND fk_contact=".$contactid." AND fk_action=".$actionid;
|
||||||
else
|
if ($db->query($sql))
|
||||||
{
|
{
|
||||||
dol_print_error($db);
|
$sql = "INSERT INTO ".MAIN_DB_PREFIX."notify_def (datec,fk_soc, fk_contact, fk_action)";
|
||||||
}
|
$sql .= " VALUES ('".$db->idate($now)."',".$socid.",".$contactid.",".$actionid.")";
|
||||||
|
|
||||||
|
if ($db->query($sql))
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$error++;
|
||||||
|
dol_print_error($db);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
dol_print_error($db);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (! $error)
|
||||||
|
{
|
||||||
|
$db->commit();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$db->rollback();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remove a notification
|
// Remove a notification
|
||||||
if ($_GET["action"] == 'delete')
|
if ($action == 'delete')
|
||||||
{
|
{
|
||||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."notify_def where rowid=".$_GET["actid"].";";
|
$sql = "DELETE FROM ".MAIN_DB_PREFIX."notify_def where rowid=".$_GET["actid"].";";
|
||||||
$db->query($sql);
|
$db->query($sql);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -95,79 +129,106 @@ $form = new Form($db);
|
|||||||
|
|
||||||
llxHeader();
|
llxHeader();
|
||||||
|
|
||||||
$soc = new Societe($db);
|
$object = new Societe($db);
|
||||||
$soc->id = $socid;
|
$result=$object->fetch($socid);
|
||||||
|
|
||||||
if ( $soc->fetch($soc->id) )
|
if ($result > 0)
|
||||||
{
|
{
|
||||||
$html = new Form($db);
|
$html = new Form($db);
|
||||||
$langs->load("other");
|
$langs->load("other");
|
||||||
|
|
||||||
|
|
||||||
$head = societe_prepare_head($soc);
|
$head = societe_prepare_head($object);
|
||||||
|
|
||||||
dol_fiche_head($head, 'notify', $langs->trans("ThirdParty"),0,'company');
|
dol_fiche_head($head, 'notify', $langs->trans("ThirdParty"),0,'company');
|
||||||
|
|
||||||
|
|
||||||
print '<table class="border"width="100%">';
|
print '<table class="border"width="100%">';
|
||||||
|
|
||||||
print '<tr><td width="20%">'.$langs->trans("ThirdPartyName").'</td><td colspan="3">';
|
print '<tr><td width="20%">'.$langs->trans("ThirdPartyName").'</td><td colspan="3">';
|
||||||
print $form->showrefnav($soc,'socid','',($user->societe_id?0:1),'rowid','nom');
|
print $form->showrefnav($object,'socid','',($user->societe_id?0:1),'rowid','nom');
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
print '<tr><td width="30%">'.$langs->trans("NbOfActiveNotifications").'</td>';
|
// Prefix
|
||||||
print '<td colspan="3">';
|
if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field
|
||||||
$sql = "SELECT COUNT(n.rowid) as nb";
|
{
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."notify_def as n";
|
print '<tr><td>'.$langs->trans('Prefix').'</td><td colspan="3">'.$object->prefix_comm.'</td></tr>';
|
||||||
$sql.= " WHERE fk_soc = ".$soc->id;
|
}
|
||||||
$resql=$db->query($sql);
|
|
||||||
if ($resql)
|
|
||||||
{
|
|
||||||
$num = $db->num_rows($resql);
|
|
||||||
$i = 0;
|
|
||||||
while ($i < $num)
|
|
||||||
{
|
|
||||||
$obj = $db->fetch_object($resql);
|
|
||||||
$nb=$obj->nb;
|
|
||||||
$i++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
dol_print_error($db);
|
|
||||||
}
|
|
||||||
print $nb;
|
|
||||||
print '</td></tr>';
|
|
||||||
print '</table>';
|
|
||||||
|
|
||||||
print '</div>';
|
if ($object->client)
|
||||||
|
{
|
||||||
|
print '<tr><td>';
|
||||||
|
print $langs->trans('CustomerCode').'</td><td colspan="3">';
|
||||||
|
print $object->code_client;
|
||||||
|
if ($object->check_codeclient() <> 0) print ' <font class="error">('.$langs->trans("WrongCustomerCode").')</font>';
|
||||||
|
print '</td></tr>';
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($object->fournisseur)
|
||||||
|
{
|
||||||
|
print '<tr><td>';
|
||||||
|
print $langs->trans('SupplierCode').'</td><td colspan="3">';
|
||||||
|
print $object->code_fournisseur;
|
||||||
|
if ($object->check_codefournisseur() <> 0) print ' <font class="error">('.$langs->trans("WrongSupplierCode").')</font>';
|
||||||
|
print '</td></tr>';
|
||||||
|
}
|
||||||
|
|
||||||
|
print '<tr><td width="30%">'.$langs->trans("NbOfActiveNotifications").'</td>';
|
||||||
|
print '<td colspan="3">';
|
||||||
|
$sql = "SELECT COUNT(n.rowid) as nb";
|
||||||
|
$sql.= " FROM ".MAIN_DB_PREFIX."notify_def as n";
|
||||||
|
$sql.= " WHERE fk_soc = ".$object->id;
|
||||||
|
$resql=$db->query($sql);
|
||||||
|
if ($resql)
|
||||||
|
{
|
||||||
|
$num = $db->num_rows($resql);
|
||||||
|
$i = 0;
|
||||||
|
while ($i < $num)
|
||||||
|
{
|
||||||
|
$obj = $db->fetch_object($resql);
|
||||||
|
$nb=$obj->nb;
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
dol_print_error($db);
|
||||||
|
}
|
||||||
|
print $nb;
|
||||||
|
print '</td></tr>';
|
||||||
|
print '</table>';
|
||||||
|
|
||||||
|
// Help
|
||||||
|
print '<br>'.$langs->trans("NotificationsDesc").'<br>';
|
||||||
|
|
||||||
|
|
||||||
// Help
|
dol_fiche_end();
|
||||||
print $langs->trans("NotificationsDesc").'<br><br>';
|
|
||||||
|
|
||||||
|
|
||||||
print "\n";
|
print "\n";
|
||||||
|
|
||||||
// Add notification form
|
// Add notification form
|
||||||
print_fiche_titre($langs->trans("AddNewNotification"),'','');
|
print_fiche_titre($langs->trans("AddNewNotification"),'','');
|
||||||
|
|
||||||
print '<form action="fiche.php?socid='.$socid.'" method="post">';
|
print '<form action="fiche.php?socid='.$socid.'" method="post">';
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
|
print '<input type="hidden" name="action" value="add">';
|
||||||
|
|
||||||
// Line with titles
|
$param="&socid=".$socid;
|
||||||
print '<table width="100%" class="noborder">';
|
|
||||||
print '<tr class="liste_titre">';
|
// Line with titles
|
||||||
$param="&socid=".$socid;
|
print '<table width="100%" class="noborder">';
|
||||||
print_liste_field_titre($langs->trans("Contact"),"fiche.php","c.name",'',$param,'"width="45%"',$sortfield,$sortorder);
|
print '<tr class="liste_titre">';
|
||||||
print_liste_field_titre($langs->trans("Action"),"fiche.php","a.titre",'',$param,'"width="35%"',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("Contact"),"fiche.php","c.name",'',$param,'"width="45%"',$sortfield,$sortorder);
|
||||||
|
print_liste_field_titre($langs->trans("Action"),"fiche.php","a.titre",'',$param,'"width="35%"',$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("Type"),"fiche.php","",'',$param,'"width="10%"',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("Type"),"fiche.php","",'',$param,'"width="10%"',$sortfield,$sortorder);
|
||||||
print '<td> </td>';
|
print_liste_field_titre('');
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
$var=false;
|
$var=false;
|
||||||
if (count($soc->thirdparty_and_contact_email_array()) > 0)
|
$listofemails=$object->thirdparty_and_contact_email_array();
|
||||||
{
|
if (count($listofemails) > 0)
|
||||||
$actions=array();
|
{
|
||||||
|
$actions=array();
|
||||||
|
|
||||||
// Load array of available notifications
|
// Load array of available notifications
|
||||||
$notificationtrigger=new InterfaceNotification($db);
|
$notificationtrigger=new InterfaceNotification($db);
|
||||||
@@ -178,173 +239,174 @@ if ( $soc->fetch($soc->id) )
|
|||||||
$label=$langs->trans("Notify_".$notifiedevent['code'])!=$langs->trans("Notify_".$notifiedevent['code'])?$langs->trans("Notify_".$notifiedevent['code']):$notifiedevent['label'];
|
$label=$langs->trans("Notify_".$notifiedevent['code'])!=$langs->trans("Notify_".$notifiedevent['code'])?$langs->trans("Notify_".$notifiedevent['code']):$notifiedevent['label'];
|
||||||
$actions[$notifiedevent['rowid']]=$label;
|
$actions[$notifiedevent['rowid']]=$label;
|
||||||
}
|
}
|
||||||
print '<input type="hidden" name="action" value="add">';
|
print '<tr '.$bc[$var].'><td>';
|
||||||
print '<tr '.$bc[$var].'><td>';
|
print $html->selectarray("contactid",$listofemails);
|
||||||
print $html->selectarray("contactid",$soc->thirdparty_and_contact_email_array());
|
print '</td>';
|
||||||
print '</td>';
|
print '<td>';
|
||||||
print '<td>';
|
print $html->selectarray("actionid",$actions,'',1);
|
||||||
print $html->selectarray("actionid",$actions,'',1);
|
print '</td>';
|
||||||
print '</td>';
|
|
||||||
print '<td>';
|
print '<td>';
|
||||||
$type=array('email'=>$langs->trans("EMail"));
|
$type=array('email'=>$langs->trans("EMail"));
|
||||||
print $html->selectarray("typeid",$type);
|
print $html->selectarray("typeid",$type);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td align="right"><input type="submit" class="button" value="'.$langs->trans("Add").'"></td>';
|
print '<td align="right"><input type="submit" class="button" value="'.$langs->trans("Add").'"></td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<tr '.$bc[$var].'><td colspan="4">';
|
print '<tr '.$bc[$var].'><td colspan="4">';
|
||||||
print $langs->trans("YouMustCreateContactFirst");
|
print $langs->trans("YouMustCreateContactFirst");
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
print '</form>';
|
print '</form>';
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
|
dol_htmloutput_mesg($mesg);
|
||||||
|
|
||||||
// List of active notifications
|
// List of active notifications
|
||||||
print_fiche_titre($langs->trans("ListOfActiveNotifications"),'','');
|
print_fiche_titre($langs->trans("ListOfActiveNotifications"),'','');
|
||||||
$var=true;
|
$var=true;
|
||||||
|
|
||||||
// Line with titles
|
// Line with titles
|
||||||
print '<table width="100%" class="noborder">';
|
print '<table width="100%" class="noborder">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print_liste_field_titre($langs->trans("Contact"),"fiche.php","c.name",'',$param,'"width="45%"',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("Contact"),"fiche.php","c.name",'',$param,'"width="45%"',$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("Action"),"fiche.php","a.titre",'',$param,'"width="35%"',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("Action"),"fiche.php","a.titre",'',$param,'"width="35%"',$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("Type"),"fiche.php","",'',$param,'"width="10%"',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("Type"),"fiche.php","",'',$param,'"width="10%"',$sortfield,$sortorder);
|
||||||
print_liste_field_titre('','','');
|
print_liste_field_titre('','','');
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// List of notifications for contacts
|
// List of notifications for contacts
|
||||||
$sql = "SELECT n.rowid, n.type,";
|
$sql = "SELECT n.rowid, n.type,";
|
||||||
$sql.= " a.code, a.label,";
|
$sql.= " a.code, a.label,";
|
||||||
$sql.= " c.rowid as contactid, c.name, c.firstname, c.email";
|
$sql.= " c.rowid as contactid, c.name, c.firstname, c.email";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."c_action_trigger as a,";
|
$sql.= " FROM ".MAIN_DB_PREFIX."c_action_trigger as a,";
|
||||||
$sql.= " ".MAIN_DB_PREFIX."notify_def as n,";
|
$sql.= " ".MAIN_DB_PREFIX."notify_def as n,";
|
||||||
$sql.= " ".MAIN_DB_PREFIX."socpeople c";
|
$sql.= " ".MAIN_DB_PREFIX."socpeople c";
|
||||||
$sql.= " WHERE a.rowid = n.fk_action";
|
$sql.= " WHERE a.rowid = n.fk_action";
|
||||||
$sql.= " AND c.rowid = n.fk_contact";
|
$sql.= " AND c.rowid = n.fk_contact";
|
||||||
$sql.= " AND c.fk_soc = ".$soc->id;
|
$sql.= " AND c.fk_soc = ".$object->id;
|
||||||
|
|
||||||
$resql=$db->query($sql);
|
$resql=$db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
$num = $db->num_rows($resql);
|
$num = $db->num_rows($resql);
|
||||||
$i = 0;
|
$i = 0;
|
||||||
|
|
||||||
$contactstatic=new Contact($db);
|
$contactstatic=new Contact($db);
|
||||||
|
|
||||||
while ($i < $num)
|
while ($i < $num)
|
||||||
{
|
{
|
||||||
$var = !$var;
|
$var = !$var;
|
||||||
|
|
||||||
$obj = $db->fetch_object($resql);
|
$obj = $db->fetch_object($resql);
|
||||||
|
|
||||||
$contactstatic->id=$obj->contactid;
|
$contactstatic->id=$obj->contactid;
|
||||||
$contactstatic->name=$obj->name;
|
$contactstatic->name=$obj->name;
|
||||||
$contactstatic->firstname=$obj->firstname;
|
$contactstatic->firstname=$obj->firstname;
|
||||||
print '<tr '.$bc[$var].'><td>'.$contactstatic->getNomUrl(1);
|
print '<tr '.$bc[$var].'><td>'.$contactstatic->getNomUrl(1);
|
||||||
if ($obj->type == 'email')
|
if ($obj->type == 'email')
|
||||||
{
|
{
|
||||||
if (isValidEmail($obj->email))
|
if (isValidEmail($obj->email))
|
||||||
{
|
{
|
||||||
print ' <'.$obj->email.'>';
|
print ' <'.$obj->email.'>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$langs->load("errors");
|
$langs->load("errors");
|
||||||
print ' '.img_warning().' '.$langs->trans("ErrorBadEMail",$obj->email);
|
print ' '.img_warning().' '.$langs->trans("ErrorBadEMail",$obj->email);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
$label=($langs->trans("Notify_".$obj->code)!="Notify_".$obj->code?$langs->trans("Notify_".$obj->code):$obj->label);
|
$label=($langs->trans("Notify_".$obj->code)!="Notify_".$obj->code?$langs->trans("Notify_".$obj->code):$obj->label);
|
||||||
print $label;
|
print $label;
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
if ($obj->type == 'email') print $langs->trans("Email");
|
if ($obj->type == 'email') print $langs->trans("Email");
|
||||||
if ($obj->type == 'sms') print $langs->trans("SMS");
|
if ($obj->type == 'sms') print $langs->trans("SMS");
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td align="right"><a href="fiche.php?socid='.$socid.'&action=delete&actid='.$obj->rowid.'">'.img_delete().'</a></td>';
|
print '<td align="right"><a href="fiche.php?socid='.$socid.'&action=delete&actid='.$obj->rowid.'">'.img_delete().'</a></td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
$db->free($resql);
|
$db->free($resql);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
dol_print_error($db);
|
dol_print_error($db);
|
||||||
}
|
}
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
|
|
||||||
// List of notifications done
|
// List of notifications done
|
||||||
print_fiche_titre($langs->trans("ListOfNotificationsDone"),'','');
|
print_fiche_titre($langs->trans("ListOfNotificationsDone"),'','');
|
||||||
$var=true;
|
$var=true;
|
||||||
|
|
||||||
// Line with titles
|
// Line with titles
|
||||||
print '<table width="100%" class="noborder">';
|
print '<table width="100%" class="noborder">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print_liste_field_titre($langs->trans("Contact"),"fiche.php","c.name",'',"&socid=$socid",'',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("Contact"),"fiche.php","c.name",'',$param,'',$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("Action"),"fiche.php","a.titre",'',"&socid=$socid",'',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("Action"),"fiche.php","a.titre",'',$param,'',$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("Date"),"fiche.php","a.titre",'',"&socid=$socid",'align="right"',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("Date"),"fiche.php","a.daten",'',$param,'align="right"',$sortfield,$sortorder);
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// List
|
// List
|
||||||
$sql = "SELECT n.rowid, n.daten, n.email, n.objet_type, n.objet_id,";
|
$sql = "SELECT n.rowid, n.daten, n.email, n.objet_type, n.objet_id,";
|
||||||
$sql.= " c.rowid as id, c.name, c.firstname, c.email,";
|
$sql.= " c.rowid as id, c.name, c.firstname, c.email,";
|
||||||
$sql.= " a.code, a.label";
|
$sql.= " a.code, a.label";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."c_action_trigger as a,";
|
$sql.= " FROM ".MAIN_DB_PREFIX."c_action_trigger as a,";
|
||||||
$sql.= " ".MAIN_DB_PREFIX."notify as n, ";
|
$sql.= " ".MAIN_DB_PREFIX."notify as n, ";
|
||||||
$sql.= " ".MAIN_DB_PREFIX."socpeople as c";
|
$sql.= " ".MAIN_DB_PREFIX."socpeople as c";
|
||||||
$sql.= " WHERE a.rowid = n.fk_action";
|
$sql.= " WHERE a.rowid = n.fk_action";
|
||||||
$sql.= " AND c.rowid = n.fk_contact";
|
$sql.= " AND c.rowid = n.fk_contact";
|
||||||
$sql.= " AND c.fk_soc = ".$soc->id;
|
$sql.= " AND c.fk_soc = ".$object->id;
|
||||||
|
|
||||||
$resql=$db->query($sql);
|
$resql=$db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
$num = $db->num_rows($resql);
|
$num = $db->num_rows($resql);
|
||||||
$i = 0;
|
$i = 0;
|
||||||
|
|
||||||
$contactstatic=new Contact($db);
|
$contactstatic=new Contact($db);
|
||||||
|
|
||||||
while ($i < $num)
|
while ($i < $num)
|
||||||
{
|
{
|
||||||
$var = !$var;
|
$var = !$var;
|
||||||
|
|
||||||
$obj = $db->fetch_object($resql);
|
$obj = $db->fetch_object($resql);
|
||||||
|
|
||||||
$contactstatic->id=$obj->id;
|
$contactstatic->id=$obj->id;
|
||||||
$contactstatic->name=$obj->name;
|
$contactstatic->name=$obj->name;
|
||||||
$contactstatic->firstname=$obj->firstname;
|
$contactstatic->firstname=$obj->firstname;
|
||||||
print '<tr '.$bc[$var].'><td>'.$contactstatic->getNomUrl(1);
|
print '<tr '.$bc[$var].'><td>'.$contactstatic->getNomUrl(1);
|
||||||
print $obj->email?' <'.$obj->email.'>':$langs->trans("NoMail");
|
print $obj->email?' <'.$obj->email.'>':$langs->trans("NoMail");
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
$label=($langs->trans("Notify_".$obj->code)!="Notify_".$obj->code?$langs->trans("Notify_".$obj->code):$obj->label);
|
$label=($langs->trans("Notify_".$obj->code)!="Notify_".$obj->code?$langs->trans("Notify_".$obj->code):$obj->label);
|
||||||
print $label;
|
print $label;
|
||||||
print '</td>';
|
print '</td>';
|
||||||
// TODO Add link to object here
|
// TODO Add link to object here
|
||||||
// print
|
// print
|
||||||
print'<td align="right">'.dol_print_date($db->jdate($obj->daten), 'dayhour').'</td>';
|
print'<td align="right">'.dol_print_date($db->jdate($obj->daten), 'dayhour').'</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
$db->free($resql);
|
$db->free($resql);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
dol_print_error($db);
|
dol_print_error($db);
|
||||||
}
|
}
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
}
|
}
|
||||||
|
else dol_print_error('','RecordNotFound');
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|
||||||
|
|||||||
@@ -1200,64 +1200,68 @@ padding: 0px 0px;
|
|||||||
/* For lists */
|
/* For lists */
|
||||||
|
|
||||||
table.liste {
|
table.liste {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
border-collapse: collapse;
|
border-collapse: collapse;
|
||||||
border-top-color: #FEFEFE;
|
border-top-color: #FEFEFE;
|
||||||
|
|
||||||
border-left-width: 1px;
|
border-left-width: 1px;
|
||||||
border-left-color: #BBBBBB;
|
border-left-color: #BBBBBB;
|
||||||
border-left-style: solid;
|
border-left-style: solid;
|
||||||
|
|
||||||
border-right-width: 1px;
|
border-right-width: 1px;
|
||||||
border-right-color: #BBBBBB;
|
border-right-color: #BBBBBB;
|
||||||
border-right-style: solid;
|
border-right-style: solid;
|
||||||
|
|
||||||
border-bottom-width: 1px;
|
border-bottom-width: 1px;
|
||||||
border-bottom-color: #BBBBBB;
|
border-bottom-color: #BBBBBB;
|
||||||
border-bottom-style: solid;
|
border-bottom-style: solid;
|
||||||
|
|
||||||
margin-bottom: 2px;
|
margin-bottom: 2px;
|
||||||
margin-top: 0px;
|
margin-top: 0px;
|
||||||
|
|
||||||
-moz-box-shadow: 4px 4px 4px #CCC;
|
-moz-box-shadow: 4px 4px 4px #CCC;
|
||||||
-webkit-box-shadow: 4px 4px 4px #CCC;
|
-webkit-box-shadow: 4px 4px 4px #CCC;
|
||||||
box-shadow: 4px 4px 4px #CCC;
|
box-shadow: 4px 4px 4px #CCC;
|
||||||
}
|
}
|
||||||
table.liste td {
|
table.liste td {
|
||||||
padding-right: 2px;
|
padding-right: 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
tr.liste_titre {
|
tr.liste_titre
|
||||||
height: 24px;
|
|
||||||
background: #7699A9;
|
|
||||||
background-image: url(<?php echo $img_liste_titre ?>);
|
|
||||||
background-repeat: repeat-x;
|
|
||||||
color: #FFFFFF;
|
|
||||||
font-family: <?php print $fontlist ?>;
|
|
||||||
/* border-bottom: 1px solid #FDFFFF; */
|
|
||||||
white-space: nowrap;
|
|
||||||
}
|
|
||||||
td.liste_titre {
|
|
||||||
background: #7699A9;
|
|
||||||
background-image: url(<?php echo $img_liste_titre ?>);
|
|
||||||
background-repeat: repeat-x;
|
|
||||||
color: #FFFFFF;
|
|
||||||
font-family: <?php print $fontlist ?>;
|
|
||||||
font-weight: normal;
|
|
||||||
/* border-bottom: 1px solid #FDFFFF; */
|
|
||||||
white-space: nowrap;
|
|
||||||
}
|
|
||||||
td.liste_titre_sel
|
|
||||||
{
|
{
|
||||||
background: #7699A9;
|
height: 24px;
|
||||||
background-image: url(<?php echo $img_liste_titre ?>);
|
background: #7699A9;
|
||||||
background-repeat: repeat-x;
|
background-image: url(<?php echo $img_liste_titre ?>);
|
||||||
color: #FFFFFF;
|
background-repeat: repeat-x;
|
||||||
font-family: <?php print $fontlist ?>;
|
color: #FFFFFF;
|
||||||
font-weight: normal;
|
font-family: <?php print $fontlist ?>;
|
||||||
/* text-decoration: underline; */
|
/* border-bottom: 1px solid #FDFFFF; */
|
||||||
/* border-bottom: 1px solid #FDFFFF; */
|
white-space: nowrap;
|
||||||
white-space: nowrap;
|
}
|
||||||
|
th.liste_titre, td.liste_titre
|
||||||
|
{
|
||||||
|
background: #7699A9;
|
||||||
|
background-image: url(<?php echo $img_liste_titre ?>);
|
||||||
|
background-repeat: repeat-x;
|
||||||
|
color: #FFFFFF;
|
||||||
|
font-family: <?php print $fontlist ?>;
|
||||||
|
font-weight: normal;
|
||||||
|
/* border-bottom: 1px solid #FDFFFF; */
|
||||||
|
white-space: nowrap;
|
||||||
|
text-align: <?php echo $left; ?>;
|
||||||
|
}
|
||||||
|
th.liste_titre_sel, td.liste_titre_sel
|
||||||
|
{
|
||||||
|
background: #7699A9;
|
||||||
|
background-image: url(<?php echo $img_liste_titre ?>);
|
||||||
|
background-repeat: repeat-x;
|
||||||
|
color: #FFFFFF;
|
||||||
|
font-family: <?php print $fontlist ?>;
|
||||||
|
font-weight: normal;
|
||||||
|
/* text-decoration: underline; */
|
||||||
|
/* border-bottom: 1px solid #FDFFFF; */
|
||||||
|
white-space: nowrap;
|
||||||
|
text-align: <?php echo $left; ?>;
|
||||||
}
|
}
|
||||||
input.liste_titre {
|
input.liste_titre {
|
||||||
background: transparent;
|
background: transparent;
|
||||||
@@ -1274,19 +1278,6 @@ font-weight: normal;
|
|||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
th {
|
|
||||||
/* background: #7699A9; */
|
|
||||||
background: #91ABB3;
|
|
||||||
color: #334444;
|
|
||||||
font-family: <?php print $fontlist ?>;
|
|
||||||
font-weight: bold;
|
|
||||||
border-left: 1px solid #FFFFFF;
|
|
||||||
border-right: 1px solid #FFFFFF;
|
|
||||||
border-top: 1px solid #FFFFFF;
|
|
||||||
border-bottom: 1px solid #FFFFFF;
|
|
||||||
white-space: nowrap;
|
|
||||||
}
|
|
||||||
|
|
||||||
.impair {
|
.impair {
|
||||||
/* background: #d0d4d7; */
|
/* background: #d0d4d7; */
|
||||||
background: #eaeaea;
|
background: #eaeaea;
|
||||||
|
|||||||
@@ -1402,8 +1402,8 @@ tr.liste_titre:first-child {
|
|||||||
background-position: top right;
|
background-position: top right;
|
||||||
}
|
}
|
||||||
|
|
||||||
td.liste_titre_sel,
|
th.liste_titre_sel, td.liste_titre_sel,
|
||||||
tr.liste_titre:first-child td {
|
tr.liste_titre:first-child td {
|
||||||
color: #FFFFFF !important;
|
color: #FFFFFF !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1430,7 +1430,8 @@ tr.liste_titre td {
|
|||||||
background: none !important;
|
background: none !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
td.liste_titre {
|
th.liste_titre, td.liste_titre
|
||||||
|
{
|
||||||
background-repeat: repeat-x;
|
background-repeat: repeat-x;
|
||||||
color: #333333;
|
color: #333333;
|
||||||
font-family: <?php print $fontlist ?>;
|
font-family: <?php print $fontlist ?>;
|
||||||
@@ -1438,6 +1439,7 @@ td.liste_titre {
|
|||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
background-image: none;
|
background-image: none;
|
||||||
background: none;
|
background: none;
|
||||||
|
text-align: <?php echo $left; ?>;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*tr.liste_titre select.flat {
|
/*tr.liste_titre select.flat {
|
||||||
@@ -1453,7 +1455,8 @@ tr.liste_titre input.button {
|
|||||||
/*margin: 30px 10px 10px 0px;*/
|
/*margin: 30px 10px 10px 0px;*/
|
||||||
}
|
}
|
||||||
|
|
||||||
td.liste_titre_sel {
|
th.liste_titre_sel, td.liste_titre_sel
|
||||||
|
{
|
||||||
background: #505050;
|
background: #505050;
|
||||||
background-repeat: repeat-x;
|
background-repeat: repeat-x;
|
||||||
color: #FFFFFF;
|
color: #FFFFFF;
|
||||||
@@ -1462,6 +1465,7 @@ td.liste_titre_sel {
|
|||||||
/* text-decoration: underline; */
|
/* text-decoration: underline; */
|
||||||
/* border-bottom: 1px solid #FDFFFF; */
|
/* border-bottom: 1px solid #FDFFFF; */
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
|
text-align: <?php echo $left; ?>;
|
||||||
}
|
}
|
||||||
|
|
||||||
input.liste_titre {
|
input.liste_titre {
|
||||||
@@ -1481,19 +1485,6 @@ white-space: nowrap;
|
|||||||
padding: 5px;
|
padding: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
th {
|
|
||||||
/* background: #7699A9; */
|
|
||||||
background: #91ABB3;
|
|
||||||
color: #334444;
|
|
||||||
font-family: <?php print $fontlist ?>;
|
|
||||||
font-weight: bold;
|
|
||||||
border-left: 1px solid #FFFFFF;
|
|
||||||
border-right: 1px solid #FFFFFF;
|
|
||||||
border-top: 1px solid #FFFFFF;
|
|
||||||
border-bottom: 1px solid #FFFFFF;
|
|
||||||
white-space: nowrap;
|
|
||||||
}
|
|
||||||
|
|
||||||
.impair {
|
.impair {
|
||||||
/* background: #d0d4d7; */
|
/* background: #d0d4d7; */
|
||||||
background: #eaeaea;
|
background: #eaeaea;
|
||||||
@@ -2221,7 +2212,7 @@ a.cke_dialog_ui_button
|
|||||||
margin-left: -240px;
|
margin-left: -240px;
|
||||||
margin-bottom: 30px;
|
margin-bottom: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
div#infoVersion {
|
div#infoVersion {
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@@ -2231,14 +2222,14 @@ div#infoVersion {
|
|||||||
font-size: 10px;
|
font-size: 10px;
|
||||||
background-color: #D6D6D6;
|
background-color: #D6D6D6;
|
||||||
}
|
}
|
||||||
|
|
||||||
div#logoBox {
|
div#logoBox {
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: auto;
|
height: auto;
|
||||||
margin-top: 30px;
|
margin-top: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
div#parameterBox {
|
div#parameterBox {
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@@ -2249,14 +2240,14 @@ div#parameterBox {
|
|||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
background-position: top center;
|
background-position: top center;
|
||||||
}
|
}
|
||||||
|
|
||||||
div#parameterBox div {
|
div#parameterBox div {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 20px;
|
height: 20px;
|
||||||
position: relative;
|
position: relative;
|
||||||
line-height: 20px;
|
line-height: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
div#parameterBox div label {
|
div#parameterBox div label {
|
||||||
width: 190px;
|
width: 190px;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
@@ -2264,7 +2255,7 @@ div#parameterBox div label {
|
|||||||
float: left;
|
float: left;
|
||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
div#parameterBox div input[type="text"],
|
div#parameterBox div input[type="text"],
|
||||||
div#parameterBox div input[type="password"] {
|
div#parameterBox div input[type="password"] {
|
||||||
width: 180px;
|
width: 180px;
|
||||||
@@ -2272,12 +2263,12 @@ div#parameterBox div input[type="password"] {
|
|||||||
font-size: 10px;
|
font-size: 10px;
|
||||||
margin-top: 2px;
|
margin-top: 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
div#connectionLine {
|
div#connectionLine {
|
||||||
margin: 10px 0px;
|
margin: 10px 0px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
div#logBox {
|
div#logBox {
|
||||||
margin-top: 25px;
|
margin-top: 25px;
|
||||||
}
|
}
|
||||||
@@ -2285,7 +2276,7 @@ margin-top: 25px;
|
|||||||
div.captchaBox {
|
div.captchaBox {
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
div.captchaImg {
|
div.captchaImg {
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
margin-top: 5px;
|
margin-top: 5px;
|
||||||
@@ -2295,7 +2286,7 @@ div.captchaImg {
|
|||||||
img#captcha {
|
img#captcha {
|
||||||
margin-left: 200px;
|
margin-left: 200px;
|
||||||
}
|
}
|
||||||
|
|
||||||
div#infoLogin {
|
div#infoLogin {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: auto;
|
height: auto;
|
||||||
@@ -2314,11 +2305,11 @@ div.other {
|
|||||||
left: 50%;
|
left: 50%;
|
||||||
margin-left: -240px;
|
margin-left: -240px;
|
||||||
}
|
}
|
||||||
|
|
||||||
form.listactionsfilter img {
|
form.listactionsfilter img {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
form.listactionsfilter input[type="submit"] {
|
form.listactionsfilter input[type="submit"] {
|
||||||
margin: 2px 0px;
|
margin: 2px 0px;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1339,30 +1339,31 @@ table.liste td {
|
|||||||
}
|
}
|
||||||
|
|
||||||
tr.liste_titre {
|
tr.liste_titre {
|
||||||
height: 20px;
|
height: 20px;
|
||||||
color: #842F00;
|
color: #842F00;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
font-family: "Trebuchet MS",Arial,Helvetica,sans-serif;
|
font-family: "Trebuchet MS",Arial,Helvetica,sans-serif;
|
||||||
/*border-bottom: 1px solid #FDFFFF;*/
|
/*border-bottom: 1px solid #FDFFFF;*/
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
line-height: 18px;
|
line-height: 18px;
|
||||||
padding-left: 10px;
|
padding-left: 10px;
|
||||||
padding-right: 10px;
|
padding-right: 10px;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
th.liste_titre, td.liste_titre
|
||||||
tr.liste_titre td {
|
|
||||||
padding-left: 6px;
|
|
||||||
padding-right: 6px;
|
|
||||||
/*vertical-align: text-top;*/
|
|
||||||
}
|
|
||||||
|
|
||||||
td.liste_titre_sel
|
|
||||||
{
|
{
|
||||||
background-position: top right;
|
padding-left: 6px;
|
||||||
color: #A51B00;
|
padding-right: 6px;
|
||||||
font-weight: bold;
|
/*vertical-align: text-top;*/
|
||||||
white-space: nowrap;
|
text-align: <?php echo $left; ?>;
|
||||||
|
}
|
||||||
|
th.liste_titre_sel, td.liste_titre_sel
|
||||||
|
{
|
||||||
|
background-position: top right;
|
||||||
|
color: #A51B00;
|
||||||
|
font-weight: bold;
|
||||||
|
white-space: nowrap;
|
||||||
|
text-align: <?php echo $left; ?>;
|
||||||
}
|
}
|
||||||
|
|
||||||
input.liste_titre {
|
input.liste_titre {
|
||||||
@@ -1383,19 +1384,6 @@ font-weight: normal;
|
|||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
th {
|
|
||||||
/* background: #7699A9; */
|
|
||||||
background: #91ABB3;
|
|
||||||
color: #334444;
|
|
||||||
font-family: <?php print $fontlist ?>;
|
|
||||||
font-weight: bold;
|
|
||||||
border-left: 1px solid #FFFFFF;
|
|
||||||
border-right: 1px solid #FFFFFF;
|
|
||||||
border-top: 1px solid #FFFFFF;
|
|
||||||
border-bottom: 1px solid #FFFFFF;
|
|
||||||
white-space: nowrap;
|
|
||||||
}
|
|
||||||
|
|
||||||
.impair {
|
.impair {
|
||||||
/* background: #d0d4d7; */
|
/* background: #d0d4d7; */
|
||||||
background: #eaeaea;
|
background: #eaeaea;
|
||||||
|
|||||||
@@ -228,12 +228,12 @@ div.fichecenter {
|
|||||||
div.fichethirdleft {
|
div.fichethirdleft {
|
||||||
<?php if (empty($conf->browser->phone)) { print "float: ".$left.";\n"; } ?>
|
<?php if (empty($conf->browser->phone)) { print "float: ".$left.";\n"; } ?>
|
||||||
<?php if (empty($conf->browser->phone)) { print "width: 35%;\n"; } ?>
|
<?php if (empty($conf->browser->phone)) { print "width: 35%;\n"; } ?>
|
||||||
<?php if (! empty($conf->browser->phone)) { print "padding-bottom: 6px;\n"; } ?>
|
<?php if (! empty($conf->browser->phone)) { print "padding-bottom: 6px;\n"; } ?>
|
||||||
}
|
}
|
||||||
div.fichetwothirdright {
|
div.fichetwothirdright {
|
||||||
<?php if (empty($conf->browser->phone)) { print "float: ".$left.";\n"; } ?>
|
<?php if (empty($conf->browser->phone)) { print "float: ".$left.";\n"; } ?>
|
||||||
<?php if (empty($conf->browser->phone)) { print "width: 65%;\n"; } ?>
|
<?php if (empty($conf->browser->phone)) { print "width: 65%;\n"; } ?>
|
||||||
<?php if (! empty($conf->browser->phone)) { print "padding-bottom: 6px\n"; } ?>
|
<?php if (! empty($conf->browser->phone)) { print "padding-bottom: 6px\n"; } ?>
|
||||||
}
|
}
|
||||||
div.fichehalfleft {
|
div.fichehalfleft {
|
||||||
<?php if (empty($conf->browser->phone)) { print "float: ".$left.";\n"; } ?>
|
<?php if (empty($conf->browser->phone)) { print "float: ".$left.";\n"; } ?>
|
||||||
@@ -1222,59 +1222,63 @@ padding: 0px 0px;
|
|||||||
/* For lists */
|
/* For lists */
|
||||||
|
|
||||||
table.liste {
|
table.liste {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
border-collapse: collapse;
|
border-collapse: collapse;
|
||||||
border-top-color: #FEFEFE;
|
border-top-color: #FEFEFE;
|
||||||
|
|
||||||
border-right-width: 1px;
|
border-right-width: 1px;
|
||||||
border-right-color: #BBBBBB;
|
border-right-color: #BBBBBB;
|
||||||
border-right-style: solid;
|
border-right-style: solid;
|
||||||
|
|
||||||
border-bottom-width: 1px;
|
border-bottom-width: 1px;
|
||||||
border-bottom-color: #BBBBBB;
|
border-bottom-color: #BBBBBB;
|
||||||
border-bottom-style: solid;
|
border-bottom-style: solid;
|
||||||
|
|
||||||
margin-bottom: 2px;
|
margin-bottom: 2px;
|
||||||
margin-top: 0px;
|
margin-top: 0px;
|
||||||
|
|
||||||
-moz-box-shadow: 4px 4px 4px #CCC;
|
-moz-box-shadow: 4px 4px 4px #CCC;
|
||||||
-webkit-box-shadow: 4px 4px 4px #CCC;
|
-webkit-box-shadow: 4px 4px 4px #CCC;
|
||||||
box-shadow: 4px 4px 4px #CCC;
|
box-shadow: 4px 4px 4px #CCC;
|
||||||
}
|
}
|
||||||
table.liste td {
|
table.liste td {
|
||||||
padding-right: 2px;
|
padding-right: 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
tr.liste_titre {
|
tr.liste_titre
|
||||||
height: 20px !important;
|
|
||||||
background: #7699A9;
|
|
||||||
background-image: url(<?php echo $img_liste_titre ?>);
|
|
||||||
background-repeat: repeat-x;
|
|
||||||
color: #334444;
|
|
||||||
font-family: <?php print $fontlist ?>;
|
|
||||||
border-bottom: 1px solid #FDFFFF;
|
|
||||||
white-space: nowrap;
|
|
||||||
}
|
|
||||||
td.liste_titre {
|
|
||||||
background: #7699A9;
|
|
||||||
background-image: url(<?php echo $img_liste_titre ?>);
|
|
||||||
background-repeat: repeat-x;
|
|
||||||
color: #334444;
|
|
||||||
font-family: <?php print $fontlist ?>;
|
|
||||||
font-weight: normal;
|
|
||||||
border-bottom: 1px solid #FDFFFF;
|
|
||||||
white-space: nowrap;
|
|
||||||
}
|
|
||||||
td.liste_titre_sel
|
|
||||||
{
|
{
|
||||||
background: #7699A9;
|
height: 20px !important;
|
||||||
background-image: url(<?php echo $img_liste_titre ?>);
|
background: #7699A9;
|
||||||
background-repeat: repeat-x;
|
background-image: url(<?php echo $img_liste_titre ?>);
|
||||||
color: #F5FFFF;
|
background-repeat: repeat-x;
|
||||||
font-family: <?php print $fontlist ?>;
|
color: #334444;
|
||||||
font-weight: normal;
|
font-family: <?php print $fontlist ?>;
|
||||||
border-bottom: 1px solid #FDFFFF;
|
border-bottom: 1px solid #FDFFFF;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
th.liste_titre, td.liste_titre
|
||||||
|
{
|
||||||
|
background: #7699A9;
|
||||||
|
background-image: url(<?php echo $img_liste_titre ?>);
|
||||||
|
background-repeat: repeat-x;
|
||||||
|
color: #334444;
|
||||||
|
font-family: <?php print $fontlist ?>;
|
||||||
|
font-weight: normal;
|
||||||
|
border-bottom: 1px solid #FDFFFF;
|
||||||
|
white-space: nowrap;
|
||||||
|
text-align: <?php echo $left; ?>;
|
||||||
|
}
|
||||||
|
th.liste_titre_sel, td.liste_titre_sel
|
||||||
|
{
|
||||||
|
background: #7699A9;
|
||||||
|
background-image: url(<?php echo $img_liste_titre ?>);
|
||||||
|
background-repeat: repeat-x;
|
||||||
|
color: #F5FFFF;
|
||||||
|
font-family: <?php print $fontlist ?>;
|
||||||
|
font-weight: normal;
|
||||||
|
border-bottom: 1px solid #FDFFFF;
|
||||||
|
white-space: nowrap;
|
||||||
|
text-align: <?php echo $left; ?>;
|
||||||
}
|
}
|
||||||
input.liste_titre {
|
input.liste_titre {
|
||||||
background: #7699A9;
|
background: #7699A9;
|
||||||
@@ -1292,18 +1296,6 @@ font-weight: normal;
|
|||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
th {
|
|
||||||
/* background: #7699A9; */
|
|
||||||
background: #91ABB3;
|
|
||||||
color: #334444;
|
|
||||||
font-family: <?php print $fontlist ?>;
|
|
||||||
font-weight: bold;
|
|
||||||
border-left: 1px solid #FFFFFF;
|
|
||||||
border-right: 1px solid #FFFFFF;
|
|
||||||
border-top: 1px solid #FFFFFF;
|
|
||||||
border-bottom: 1px solid #FFFFFF;
|
|
||||||
white-space: nowrap;
|
|
||||||
}
|
|
||||||
|
|
||||||
.impair {
|
.impair {
|
||||||
/* background: #d0d4d7; */
|
/* background: #d0d4d7; */
|
||||||
|
|||||||
@@ -127,8 +127,8 @@ input.ui-input-text, textarea.ui-input-text {
|
|||||||
/* ============================================================================== */
|
/* ============================================================================== */
|
||||||
|
|
||||||
div.fiche {
|
div.fiche {
|
||||||
margin-<?php print $left; ?>: <?php print empty($conf->browser->phone)?'10':'2'; ?>px;
|
margin-<?php print $left; ?>: <?php print (empty($conf->browser->phone)?'10':'2'); ?>px;
|
||||||
margin-<?php print $right; ?>: <?php print empty($conf->browser->phone)?'6':''; ?>px;
|
margin-<?php print $right; ?>: <?php print (empty($conf->browser->phone)?'6':''); ?>px;
|
||||||
}
|
}
|
||||||
|
|
||||||
div.fichecenter {
|
div.fichecenter {
|
||||||
@@ -316,33 +316,37 @@ padding: 0px 0px;
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
tr.liste_titre {
|
tr.liste_titre
|
||||||
height: 24px;
|
|
||||||
background: -moz-linear-gradient(center top , #81A8CE, #5E87B0) repeat scroll 0 0 #5E87B0;
|
|
||||||
border: 1px solid #456F9A;
|
|
||||||
color: #FFFFFF;
|
|
||||||
font-family: <?php print $fontlist ?>;
|
|
||||||
/* border-bottom: 1px solid #FDFFFF; */
|
|
||||||
white-space: nowrap;
|
|
||||||
}
|
|
||||||
td.liste_titre {
|
|
||||||
background: -moz-linear-gradient(center top , #81A8CE, #5E87B0) repeat scroll 0 0 #5E87B0;
|
|
||||||
border: 1px solid #456F9A;
|
|
||||||
color: #FFFFFF;
|
|
||||||
font-family: <?php print $fontlist ?>;
|
|
||||||
font-weight: normal;
|
|
||||||
/* border-bottom: 1px solid #FDFFFF; */
|
|
||||||
white-space: nowrap;
|
|
||||||
}
|
|
||||||
td.liste_titre_sel
|
|
||||||
{
|
{
|
||||||
background: -moz-linear-gradient(center top , #81A8CE, #5E87B0) repeat scroll 0 0 #5E87B0;
|
height: 24px;
|
||||||
color: #FFFFFF;
|
background: -moz-linear-gradient(center top , #81A8CE, #5E87B0) repeat scroll 0 0 #5E87B0;
|
||||||
font-family: <?php print $fontlist ?>;
|
border: 1px solid #456F9A;
|
||||||
font-weight: normal;
|
color: #FFFFFF;
|
||||||
/* text-decoration: underline; */
|
font-family: <?php print $fontlist ?>;
|
||||||
/* border-bottom: 1px solid #FDFFFF; */
|
/* border-bottom: 1px solid #FDFFFF; */
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
th.liste_titre, td.liste_titre
|
||||||
|
{
|
||||||
|
background: -moz-linear-gradient(center top , #81A8CE, #5E87B0) repeat scroll 0 0 #5E87B0;
|
||||||
|
border: 1px solid #456F9A;
|
||||||
|
color: #FFFFFF;
|
||||||
|
font-family: <?php print $fontlist ?>;
|
||||||
|
font-weight: normal;
|
||||||
|
/* border-bottom: 1px solid #FDFFFF; */
|
||||||
|
white-space: nowrap;
|
||||||
|
text-align: <?php echo $left; ?>;
|
||||||
|
}
|
||||||
|
th.liste_titre_sel, td.liste_titre_sel
|
||||||
|
{
|
||||||
|
background: -moz-linear-gradient(center top , #81A8CE, #5E87B0) repeat scroll 0 0 #5E87B0;
|
||||||
|
color: #FFFFFF;
|
||||||
|
font-family: <?php print $fontlist ?>;
|
||||||
|
font-weight: normal;
|
||||||
|
/* text-decoration: underline; */
|
||||||
|
/* border-bottom: 1px solid #FDFFFF; */
|
||||||
|
white-space: nowrap;
|
||||||
|
text-align: <?php echo $left; ?>;
|
||||||
}
|
}
|
||||||
input.liste_titre {
|
input.liste_titre {
|
||||||
background: transparent;
|
background: transparent;
|
||||||
|
|||||||
Reference in New Issue
Block a user