forked from Wavyzz/dolibarr
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()
|
||||||
|
|||||||
@@ -47,9 +47,9 @@ 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";
|
||||||
|
|
||||||
|
|||||||
@@ -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");
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
@@ -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);
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
@@ -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)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -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,6 +2120,7 @@ class SMTPs
|
|||||||
|
|
||||||
|
|
||||||
// DOL_CHANGE LDR
|
// DOL_CHANGE LDR
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Method public void setImageInline( string )
|
* Method public void setImageInline( string )
|
||||||
*
|
*
|
||||||
@@ -2129,12 +2130,13 @@ class SMTPs
|
|||||||
* @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
|
||||||
|
* @param string $strImageCid CID
|
||||||
* @return void
|
* @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
|
||||||
*
|
*
|
||||||
@@ -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);
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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);
|
||||||
|
|||||||
@@ -52,6 +52,8 @@ $pagenext = $page + 1;
|
|||||||
if (! $sortorder) $sortorder="ASC";
|
if (! $sortorder) $sortorder="ASC";
|
||||||
if (! $sortfield) $sortfield="c.name";
|
if (! $sortfield) $sortfield="c.name";
|
||||||
|
|
||||||
|
$now=dol_now();
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Actions
|
* Actions
|
||||||
@@ -60,12 +62,29 @@ if (! $sortfield) $sortfield="c.name";
|
|||||||
// Add a notification
|
// Add a notification
|
||||||
if ($action == 'add')
|
if ($action == 'add')
|
||||||
{
|
{
|
||||||
|
$error=0;
|
||||||
|
|
||||||
|
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)
|
||||||
|
{
|
||||||
|
$db->begin();
|
||||||
|
|
||||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."notify_def";
|
$sql = "DELETE FROM ".MAIN_DB_PREFIX."notify_def";
|
||||||
$sql .= " WHERE fk_soc=".$socid." AND fk_contact=".$_POST["contactid"]." AND fk_action=".$_POST["actionid"];
|
$sql .= " WHERE fk_soc=".$socid." AND fk_contact=".$contactid." AND fk_action=".$actionid;
|
||||||
if ($db->query($sql))
|
if ($db->query($sql))
|
||||||
{
|
{
|
||||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."notify_def (datec,fk_soc, fk_contact, fk_action)";
|
$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"].")";
|
$sql .= " VALUES ('".$db->idate($now)."',".$socid.",".$contactid.",".$actionid.")";
|
||||||
|
|
||||||
if ($db->query($sql))
|
if ($db->query($sql))
|
||||||
{
|
{
|
||||||
@@ -73,6 +92,7 @@ if ($action == 'add')
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
$error++;
|
||||||
dol_print_error($db);
|
dol_print_error($db);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -80,6 +100,16 @@ if ($action == 'add')
|
|||||||
{
|
{
|
||||||
dol_print_error($db);
|
dol_print_error($db);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (! $error)
|
||||||
|
{
|
||||||
|
$db->commit();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$db->rollback();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remove a notification
|
// Remove a notification
|
||||||
@@ -99,8 +129,8 @@ $form = new Form($db);
|
|||||||
|
|
||||||
llxHeader();
|
llxHeader();
|
||||||
|
|
||||||
$soc = new Societe($db);
|
$object = new Societe($db);
|
||||||
$result=$soc->fetch($socid);
|
$result=$object->fetch($socid);
|
||||||
|
|
||||||
if ($result > 0)
|
if ($result > 0)
|
||||||
{
|
{
|
||||||
@@ -108,7 +138,7 @@ if ($result > 0)
|
|||||||
$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');
|
||||||
|
|
||||||
@@ -116,14 +146,38 @@ if ($result > 0)
|
|||||||
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>';
|
||||||
|
|
||||||
|
// Prefix
|
||||||
|
if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field
|
||||||
|
{
|
||||||
|
print '<tr><td>'.$langs->trans('Prefix').'</td><td colspan="3">'.$object->prefix_comm.'</td></tr>';
|
||||||
|
}
|
||||||
|
|
||||||
|
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 '<tr><td width="30%">'.$langs->trans("NbOfActiveNotifications").'</td>';
|
||||||
print '<td colspan="3">';
|
print '<td colspan="3">';
|
||||||
$sql = "SELECT COUNT(n.rowid) as nb";
|
$sql = "SELECT COUNT(n.rowid) as nb";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."notify_def as n";
|
$sql.= " FROM ".MAIN_DB_PREFIX."notify_def as n";
|
||||||
$sql.= " WHERE fk_soc = ".$soc->id;
|
$sql.= " WHERE fk_soc = ".$object->id;
|
||||||
$resql=$db->query($sql);
|
$resql=$db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
@@ -143,11 +197,11 @@ if ($result > 0)
|
|||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
print '</div>';
|
|
||||||
|
|
||||||
|
|
||||||
// Help
|
// Help
|
||||||
print $langs->trans("NotificationsDesc").'<br><br>';
|
print '<br>'.$langs->trans("NotificationsDesc").'<br>';
|
||||||
|
|
||||||
|
|
||||||
|
dol_fiche_end();
|
||||||
|
|
||||||
|
|
||||||
print "\n";
|
print "\n";
|
||||||
@@ -157,11 +211,13 @@ if ($result > 0)
|
|||||||
|
|
||||||
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">';
|
||||||
|
|
||||||
|
$param="&socid=".$socid;
|
||||||
|
|
||||||
// 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">';
|
||||||
$param="&socid=".$socid;
|
|
||||||
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);
|
||||||
@@ -169,7 +225,7 @@ if ($result > 0)
|
|||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
$var=false;
|
$var=false;
|
||||||
$listofemails=$soc->thirdparty_and_contact_email_array();
|
$listofemails=$object->thirdparty_and_contact_email_array();
|
||||||
if (count($listofemails) > 0)
|
if (count($listofemails) > 0)
|
||||||
{
|
{
|
||||||
$actions=array();
|
$actions=array();
|
||||||
@@ -183,7 +239,6 @@ if ($result > 0)
|
|||||||
$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",$listofemails);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
@@ -209,6 +264,7 @@ if ($result > 0)
|
|||||||
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"),'','');
|
||||||
@@ -232,7 +288,7 @@ if ($result > 0)
|
|||||||
$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)
|
||||||
@@ -295,9 +351,9 @@ if ($result > 0)
|
|||||||
// 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
|
||||||
@@ -309,7 +365,7 @@ if ($result > 0)
|
|||||||
$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)
|
||||||
|
|||||||
Reference in New Issue
Block a user