Merge branch 'develop' of ssh://git@github.com/Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
88e0123a05
@ -61,12 +61,13 @@ class Mailing extends CommonObject
|
||||
|
||||
|
||||
/**
|
||||
* \brief Constructeur de la classe
|
||||
* \param DB handler acces base de donnees
|
||||
* Constructor
|
||||
*
|
||||
* @param DoliDb $db Database handler
|
||||
*/
|
||||
function Mailing($DB)
|
||||
function Mailing($db)
|
||||
{
|
||||
$this->db = $DB ;
|
||||
$this->db = $db;
|
||||
|
||||
// List of language codes for status
|
||||
$this->statuts[0] = 'MailingStatusDraft';
|
||||
|
||||
@ -240,6 +240,8 @@ print $form->select_users($userid,'userid',1);
|
||||
print '</td></tr>';
|
||||
// Year
|
||||
print '<tr><td>'.$langs->trans("Year").'</td><td>';
|
||||
if (! in_array($year,$arrayyears)) $arrayyears[$year]=$year;
|
||||
arsort($arrayyears);
|
||||
print $form->selectarray('year',$arrayyears,$year,0);
|
||||
print '</td></tr>';
|
||||
print '<tr><td align="center" colspan="2"><input type="submit" name="submit" class="button" value="'.$langs->trans("Refresh").'"></td></tr>';
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/* Copyright (C) 2003-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis@dolibarr.fr>
|
||||
*
|
||||
* 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
|
||||
@ -78,14 +78,14 @@ print "</form></table><br>\n";
|
||||
* Statistics
|
||||
*/
|
||||
|
||||
$sql = "SELECT count(cf.rowid), c.fk_statut, c.facture";
|
||||
$sql = "SELECT count(c.rowid), c.fk_statut, c.facture";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s";
|
||||
$sql.= ", ".MAIN_DB_PREFIX."commande as c";
|
||||
if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||
if (! $user->rights->societe->client->voir && ! $socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||
$sql.= " WHERE c.fk_soc = s.rowid";
|
||||
$sql.= " AND c.entity = ".$conf->entity;
|
||||
if ($user->societe_id) $sql.=' AND c.fk_soc = '.$user->societe_id;
|
||||
if (!$user->rights->societe->client->voir && !$socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
|
||||
if (! $user->rights->societe->client->voir && ! $socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
|
||||
$sql.= " GROUP BY c.fk_statut, c.facture";
|
||||
$resql = $db->query($sql);
|
||||
if ($resql)
|
||||
|
||||
@ -260,6 +260,8 @@ print $form->select_users($userid,'userid',1);
|
||||
print '</td></tr>';
|
||||
// Year
|
||||
print '<tr><td>'.$langs->trans("Year").'</td><td>';
|
||||
if (! in_array($year,$arrayyears)) $arrayyears[$year]=$year;
|
||||
arsort($arrayyears);
|
||||
print $form->selectarray('year',$arrayyears,$year,0);
|
||||
print '</td></tr>';
|
||||
print '<tr><td align="center" colspan="2"><input type="submit" name="submit" class="button" value="'.$langs->trans("Refresh").'"></td></tr>';
|
||||
|
||||
@ -224,6 +224,8 @@ print $form->select_users($userid,'userid',1);
|
||||
print '</td></tr>';
|
||||
// Year
|
||||
print '<tr><td>'.$langs->trans("Year").'</td><td>';
|
||||
if (! in_array($year,$arrayyears)) $arrayyears[$year]=$year;
|
||||
arsort($arrayyears);
|
||||
print $form->selectarray('year',$arrayyears,$year,0);
|
||||
print '</td></tr>';
|
||||
print '<tr><td align="center" colspan="2"><input type="submit" name="submit" class="button" value="'.$langs->trans("Refresh").'"></td></tr>';
|
||||
|
||||
@ -239,6 +239,8 @@ print $form->select_users($userid,'userid',1);
|
||||
print '</td></tr>';
|
||||
// Year
|
||||
print '<tr><td>'.$langs->trans("Year").'</td><td>';
|
||||
if (! in_array($year,$arrayyears)) $arrayyears[$year]=$year;
|
||||
arsort($arrayyears);
|
||||
print $form->selectarray('year',$arrayyears,$year,0);
|
||||
print '</td></tr>';
|
||||
print '<tr><td align="center" colspan="2"><input type="submit" name="submit" class="button" value="'.$langs->trans("Refresh").'"></td></tr>';
|
||||
|
||||
@ -1559,9 +1559,9 @@ class ContratLigne
|
||||
|
||||
|
||||
/**
|
||||
* Constructeur d'objets ligne de contrat
|
||||
*
|
||||
* @param DoliDB $db Database access handler
|
||||
* Constructor
|
||||
*
|
||||
* @param DoliDb $db Database handler
|
||||
*/
|
||||
function ContratLigne($db)
|
||||
{
|
||||
|
||||
@ -23,8 +23,7 @@
|
||||
|
||||
|
||||
/**
|
||||
* \class MenuSmart
|
||||
* \brief Class to manage smartphone menu smartphone (for internal users)
|
||||
* Class to manage smartphone menu smartphone (for internal users)
|
||||
*/
|
||||
class MenuSmart {
|
||||
|
||||
@ -35,8 +34,9 @@ class MenuSmart {
|
||||
|
||||
|
||||
/**
|
||||
* Constructeur
|
||||
* @param db Database handler
|
||||
* Constructor
|
||||
*
|
||||
* @param DoliDb $db Database handler
|
||||
*/
|
||||
function MenuSmart($db)
|
||||
{
|
||||
@ -46,7 +46,9 @@ class MenuSmart {
|
||||
|
||||
/**
|
||||
* Show menu
|
||||
* @param limitmenuto To limit menu to a top or left menu value
|
||||
*
|
||||
* @param string $limitmenuto To limit menu to a top or left menu value
|
||||
* @return void
|
||||
*/
|
||||
function showmenu($limitmenuto)
|
||||
{
|
||||
|
||||
@ -42,8 +42,9 @@ class MenuTop {
|
||||
|
||||
|
||||
/**
|
||||
* Constructeur
|
||||
* @param db Database access handler
|
||||
* Constructor
|
||||
*
|
||||
* @param DoliDb $db Database handler
|
||||
*/
|
||||
function MenuTop($db)
|
||||
{
|
||||
@ -52,7 +53,9 @@ class MenuTop {
|
||||
|
||||
|
||||
/**
|
||||
* Show menu
|
||||
* Show menu
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function showmenu()
|
||||
{
|
||||
@ -65,8 +68,7 @@ class MenuTop {
|
||||
|
||||
|
||||
/**
|
||||
* \class MenuLeft
|
||||
* \brief Classe permettant la gestion du menu du gauche Auguria
|
||||
* Classe permettant la gestion du menu du gauche Auguria
|
||||
*/
|
||||
class MenuLeft {
|
||||
|
||||
|
||||
@ -42,8 +42,9 @@ class MenuTop {
|
||||
|
||||
|
||||
/**
|
||||
* \brief Constructeur
|
||||
* \param db Database access handler
|
||||
* Constructor
|
||||
*
|
||||
* @param DoliDb $db Database handler
|
||||
*/
|
||||
function MenuTop($db)
|
||||
{
|
||||
@ -53,7 +54,9 @@ class MenuTop {
|
||||
|
||||
|
||||
/**
|
||||
* Show menu
|
||||
* Show menu
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function showmenu()
|
||||
{
|
||||
@ -66,8 +69,7 @@ class MenuTop {
|
||||
|
||||
|
||||
/**
|
||||
* \class MenuLeft
|
||||
* \brief Classe permettant la gestion du menu du gauche Auguria
|
||||
* Classe permettant la gestion du menu du gauche Auguria
|
||||
*/
|
||||
class MenuLeft {
|
||||
|
||||
|
||||
@ -40,8 +40,9 @@ class MenuTop {
|
||||
|
||||
|
||||
/**
|
||||
* Constructeur
|
||||
* @param db Handler d'acces base de donnee
|
||||
* Constructor
|
||||
*
|
||||
* @param DoliDb $db Database handler
|
||||
*/
|
||||
function MenuTop($db)
|
||||
{
|
||||
@ -50,7 +51,9 @@ class MenuTop {
|
||||
|
||||
|
||||
/**
|
||||
* Show menu
|
||||
* Show menu
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function showmenu()
|
||||
{
|
||||
|
||||
@ -28,8 +28,7 @@
|
||||
|
||||
|
||||
/**
|
||||
* \class MenuTop
|
||||
* \brief Class to manage top menu Eldy (for external users)
|
||||
* Class to manage top menu Eldy (for external users)
|
||||
*/
|
||||
class MenuTop {
|
||||
|
||||
@ -40,8 +39,9 @@ class MenuTop {
|
||||
|
||||
|
||||
/**
|
||||
* Constructeur
|
||||
* @param db Handler d'acces base de donnee
|
||||
* Constructor
|
||||
*
|
||||
* @param DoliDb $db Database handler
|
||||
*/
|
||||
function MenuTop($db)
|
||||
{
|
||||
@ -50,7 +50,9 @@ class MenuTop {
|
||||
|
||||
|
||||
/**
|
||||
* Show menu
|
||||
* Show menu
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function showmenu()
|
||||
{
|
||||
@ -63,8 +65,7 @@ class MenuTop {
|
||||
|
||||
|
||||
/**
|
||||
* \class MenuLeft
|
||||
* \brief Classe permettant la gestion du menu du gauche Eldy
|
||||
* Classe permettant la gestion du menu du gauche Eldy
|
||||
*/
|
||||
class MenuLeft {
|
||||
|
||||
|
||||
@ -30,18 +30,16 @@ require_once(DOL_DOCUMENT_ROOT."/core/lib/company.lib.php");
|
||||
require_once(DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php');
|
||||
|
||||
/**
|
||||
* \class pdf_edison
|
||||
* \brief Classe permettant de generer les commandes au modele Edison
|
||||
* Classe permettant de generer les commandes au modele Edison
|
||||
*/
|
||||
|
||||
class pdf_edison extends ModelePDFCommandes
|
||||
{
|
||||
var $emetteur; // Objet societe qui emet
|
||||
|
||||
/**
|
||||
* Constructeur
|
||||
* Constructor
|
||||
*
|
||||
* @param DoliDb $db Database access handler
|
||||
* @param DoliDb $db Database access handler
|
||||
*/
|
||||
function pdf_edison($db=0)
|
||||
{
|
||||
|
||||
@ -27,15 +27,15 @@ require_once(DOL_DOCUMENT_ROOT."/core/lib/company.lib.php");
|
||||
|
||||
|
||||
/**
|
||||
\class html_cerfafr
|
||||
\brief Classe permettant de generer les propales au modele Azur
|
||||
*/
|
||||
* Class to generate document for subscriptions
|
||||
*/
|
||||
class html_cerfafr extends ModeleDon
|
||||
{
|
||||
/**
|
||||
\brief Constructeur
|
||||
\param db Handler acces base de donnees
|
||||
*/
|
||||
* Constructor
|
||||
*
|
||||
* @param DoliDb $db Database handler
|
||||
*/
|
||||
function html_cerfafr($db)
|
||||
{
|
||||
global $conf,$langs;
|
||||
@ -49,9 +49,11 @@ class html_cerfafr extends ModeleDon
|
||||
}
|
||||
|
||||
|
||||
/** \brief Return if a module can be used or not
|
||||
* \return boolean true if module can be used
|
||||
*/
|
||||
/**
|
||||
* Return if a module can be used or not
|
||||
*
|
||||
* @return boolean true if module can be used
|
||||
*/
|
||||
function isEnabled()
|
||||
{
|
||||
return true;
|
||||
@ -60,9 +62,10 @@ class html_cerfafr extends ModeleDon
|
||||
|
||||
/**
|
||||
* Write the object to document file to disk
|
||||
* @param don Donation object
|
||||
* @param outputlangs Lang object for output language
|
||||
* @return int >0 if OK, <0 if KO
|
||||
*
|
||||
* @param Don $don Donation object
|
||||
* @param Translate $outputlangs Lang object for output language
|
||||
* @return int >0 if OK, <0 if KO
|
||||
*/
|
||||
function write_file($don,$outputlangs)
|
||||
{
|
||||
@ -155,10 +158,7 @@ class html_cerfafr extends ModeleDon
|
||||
}
|
||||
$this->error=$langs->trans("ErrorUnknown");
|
||||
return 0; // Erreur par defaut
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
|
||||
@ -30,8 +30,7 @@ require_once(DOL_DOCUMENT_ROOT."/compta/dons/class/don.class.php");
|
||||
|
||||
|
||||
/**
|
||||
* \class ModeleDon
|
||||
* \brief Classe mere des modeles de dons
|
||||
* Parent class of subscription templates
|
||||
*/
|
||||
abstract class ModeleDon extends CommonDocGenerator
|
||||
{
|
||||
@ -59,23 +58,26 @@ abstract class ModeleDon extends CommonDocGenerator
|
||||
|
||||
|
||||
/**
|
||||
* \class ModeleNumRefDons
|
||||
* \brief Classe mere des modeles de numerotation des references des dons
|
||||
* Parent class of donation numbering templates
|
||||
*/
|
||||
abstract class ModeleNumRefDons
|
||||
{
|
||||
var $error='';
|
||||
|
||||
/** \brief Return if a module can be used or not
|
||||
* \return boolean true if module can be used
|
||||
/**
|
||||
* Return if a module can be used or not
|
||||
*
|
||||
* @return boolean true if module can be used
|
||||
*/
|
||||
function isEnabled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/** \brief Renvoi la description par defaut du modele de num<EFBFBD>rotation
|
||||
* \return string Texte descripif
|
||||
/**
|
||||
* Renvoi la description par defaut du modele de numerotation
|
||||
*
|
||||
* @return string Texte descripif
|
||||
*/
|
||||
function info()
|
||||
{
|
||||
@ -84,8 +86,10 @@ abstract class ModeleNumRefDons
|
||||
return $langs->trans("NoDescription");
|
||||
}
|
||||
|
||||
/** \brief Renvoi un exemple de numerotation
|
||||
* \return string Example
|
||||
/**
|
||||
* Renvoi un exemple de numerotation
|
||||
*
|
||||
* @return string Example
|
||||
*/
|
||||
function getExample()
|
||||
{
|
||||
@ -94,17 +98,21 @@ abstract class ModeleNumRefDons
|
||||
return $langs->trans("NoExample");
|
||||
}
|
||||
|
||||
/** \brief Test si les numeros deja en vigueur dans la base ne provoquent pas d
|
||||
* de conflits qui empechera cette numerotation de fonctionner.
|
||||
* \return boolean false si conflit, true si ok
|
||||
/**
|
||||
* Test si les numeros deja en vigueur dans la base ne provoquent pas d
|
||||
* de conflits qui empechera cette numerotation de fonctionner.
|
||||
*
|
||||
* @return boolean false si conflit, true si ok
|
||||
*/
|
||||
function canBeActivated()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/** \brief Renvoi prochaine valeur attribuee
|
||||
* \return string Valeur
|
||||
/**
|
||||
* Renvoi prochaine valeur attribuee
|
||||
*
|
||||
* @return string Valeur
|
||||
*/
|
||||
function getNextValue()
|
||||
{
|
||||
@ -112,8 +120,10 @@ abstract class ModeleNumRefDons
|
||||
return $langs->trans("NotAvailable");
|
||||
}
|
||||
|
||||
/** \brief Renvoi version du module numerotation
|
||||
* \return string Valeur
|
||||
/**
|
||||
* Renvoi version du module numerotation
|
||||
*
|
||||
* @return string Valeur
|
||||
*/
|
||||
function getVersion()
|
||||
{
|
||||
@ -129,13 +139,14 @@ abstract class ModeleNumRefDons
|
||||
|
||||
|
||||
/**
|
||||
* \brief Cree un don sur disque en fonction du modele de DON_ADDON_PDF
|
||||
* \param db objet base de donnee
|
||||
* \param id id du don e creer
|
||||
* \param message message
|
||||
* \param modele force le modele a utiliser ('' par defaut)
|
||||
* \param outputlangs objet lang a utiliser pour traduction
|
||||
* \return int 0 si KO, 1 si OK
|
||||
* Cree un don sur disque en fonction du modele de DON_ADDON_PDF
|
||||
*
|
||||
* @param DoliDB $db Databse handler
|
||||
* @param int $id Id donation
|
||||
* @param string $message Message
|
||||
* @param string $modele Force le modele a utiliser ('' par defaut)
|
||||
* @param Translate $outputlangs Object langs
|
||||
* @return int 0 if KO, 1 if OK
|
||||
*/
|
||||
function don_create($db, $id, $message, $modele, $outputlangs)
|
||||
{
|
||||
|
||||
@ -27,8 +27,7 @@
|
||||
require_once(DOL_DOCUMENT_ROOT ."/core/modules/fichinter/modules_fichinter.php");
|
||||
|
||||
/**
|
||||
* \class mod_arctic
|
||||
* \brief Class to manage numbering of intervention cards with rule Artic.
|
||||
* Class to manage numbering of intervention cards with rule Artic.
|
||||
*/
|
||||
class mod_arctic extends ModeleNumRefFicheinter
|
||||
{
|
||||
@ -36,15 +35,20 @@ class mod_arctic extends ModeleNumRefFicheinter
|
||||
var $error = '';
|
||||
var $nom = 'Artic';
|
||||
|
||||
/** \brief Constructeur
|
||||
*/
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param DoliDb $db Database handler
|
||||
*/
|
||||
function mod_arctic()
|
||||
{
|
||||
$this->nom = "arctic";
|
||||
}
|
||||
|
||||
/** \brief Renvoi la description du modele de numerotation
|
||||
* \return string Texte descripif
|
||||
/**
|
||||
* Renvoi la description du modele de numerotation
|
||||
*
|
||||
* @return string Texte descripif
|
||||
*/
|
||||
function info()
|
||||
{
|
||||
@ -81,8 +85,10 @@ class mod_arctic extends ModeleNumRefFicheinter
|
||||
return $texte;
|
||||
}
|
||||
|
||||
/** \brief Renvoi un exemple de numerotation
|
||||
* \return string Example
|
||||
/**
|
||||
* Renvoi un exemple de numerotation
|
||||
*
|
||||
* @return string Example
|
||||
*/
|
||||
function getExample()
|
||||
{
|
||||
@ -100,11 +106,13 @@ class mod_arctic extends ModeleNumRefFicheinter
|
||||
return $numExample;
|
||||
}
|
||||
|
||||
/** \brief Renvoi prochaine valeur attribuee
|
||||
* \param objsoc Objet societe
|
||||
* \param ficheinter Object ficheinter
|
||||
* \return string Valeur
|
||||
*/
|
||||
/**
|
||||
* Renvoi prochaine valeur attribuee
|
||||
*
|
||||
* @param Societe $objsoc Objet societe
|
||||
* @param Ficheinter $object Object ficheinter
|
||||
* @return string Valeur
|
||||
*/
|
||||
function getNextValue($objsoc=0,$object='')
|
||||
{
|
||||
global $db,$conf;
|
||||
@ -126,11 +134,13 @@ class mod_arctic extends ModeleNumRefFicheinter
|
||||
}
|
||||
|
||||
|
||||
/** \brief Return next free value
|
||||
* \param objsoc Object third party
|
||||
* \param objforref Object for number to search
|
||||
* \return string Next free value
|
||||
*/
|
||||
/**
|
||||
* Return next free value
|
||||
*
|
||||
* @param Societe $objsoc Object third party
|
||||
* @param Object $objforref Object for number to search
|
||||
* @return string Next free value
|
||||
*/
|
||||
function getNumRef($objsoc,$objforref)
|
||||
{
|
||||
return $this->getNextValue($objsoc,$objforref);
|
||||
|
||||
@ -25,8 +25,7 @@
|
||||
require_once(DOL_DOCUMENT_ROOT ."/core/modules/fichinter/modules_fichinter.php");
|
||||
|
||||
/**
|
||||
* \class mod_pacific
|
||||
* \brief Class to manage numbering of intervention cards with rule Pacific.
|
||||
* Class to manage numbering of intervention cards with rule Pacific.
|
||||
*/
|
||||
class mod_pacific extends ModeleNumRefFicheinter
|
||||
{
|
||||
@ -36,8 +35,10 @@ class mod_pacific extends ModeleNumRefFicheinter
|
||||
var $nom = 'pacific';
|
||||
|
||||
|
||||
/** \brief Return description of numbering module
|
||||
* \return string Text with description
|
||||
/**
|
||||
* Return description of numbering module
|
||||
*
|
||||
* @return string Text with description
|
||||
*/
|
||||
function info()
|
||||
{
|
||||
@ -45,17 +46,21 @@ class mod_pacific extends ModeleNumRefFicheinter
|
||||
return $langs->trans("SimpleNumRefModelDesc",$this->prefix);
|
||||
}
|
||||
|
||||
/** \brief Renvoi un exemple de numerotation
|
||||
* \return string Example
|
||||
/**
|
||||
* Renvoi un exemple de numerotation
|
||||
*
|
||||
* @return string Example
|
||||
*/
|
||||
function getExample()
|
||||
{
|
||||
return $this->prefix."0501-0001";
|
||||
}
|
||||
|
||||
/** \brief 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
|
||||
/**
|
||||
* 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()
|
||||
{
|
||||
@ -89,10 +94,12 @@ class mod_pacific extends ModeleNumRefFicheinter
|
||||
}
|
||||
}
|
||||
|
||||
/** \brief Renvoi prochaine valeur attribuee
|
||||
* \param objsoc Objet societe
|
||||
* \param ficheinter Object ficheinter
|
||||
* \return string Valeur
|
||||
/**
|
||||
* Renvoi prochaine valeur attribuee
|
||||
*
|
||||
* @param objsoc Objet societe
|
||||
* @param ficheinter Object ficheinter
|
||||
* @return string Valeur
|
||||
*/
|
||||
function getNextValue($objsoc=0,$object='')
|
||||
{
|
||||
@ -121,10 +128,12 @@ class mod_pacific extends ModeleNumRefFicheinter
|
||||
return $this->prefix.$yymm."-".$num;
|
||||
}
|
||||
|
||||
/** \brief Return next free value
|
||||
* \param objsoc Object third party
|
||||
* \param objforref Object for number to search
|
||||
* \return string Next free value
|
||||
/**
|
||||
* Return next free value
|
||||
*
|
||||
* @param Societe $objsoc Object third party
|
||||
* @param Object $objforref Object for number to search
|
||||
* @return string Next free value
|
||||
*/
|
||||
function getNumRef($objsoc,$objforref)
|
||||
{
|
||||
|
||||
@ -27,8 +27,7 @@ require_once(DOL_DOCUMENT_ROOT ."/core/modules/import/modules_import.php");
|
||||
|
||||
|
||||
/**
|
||||
* \class ImportCsv
|
||||
* \brief Class to import CSV files
|
||||
* Class to import CSV files
|
||||
*/
|
||||
class ImportCsv extends ModeleImports
|
||||
{
|
||||
@ -529,6 +528,9 @@ class ImportCsv extends ModeleImports
|
||||
|
||||
/**
|
||||
* Clean a string from separator
|
||||
*
|
||||
* @param string $value Remove separator
|
||||
* @return string String without separator
|
||||
*/
|
||||
function cleansep($value)
|
||||
{
|
||||
|
||||
@ -42,7 +42,7 @@ class ModeleImports
|
||||
|
||||
|
||||
/**
|
||||
* \brief Constructeur
|
||||
* Constructor
|
||||
*/
|
||||
function ModeleImports()
|
||||
{
|
||||
|
||||
@ -27,8 +27,7 @@ require_once(DOL_DOCUMENT_ROOT ."/core/modules/project/modules_project.php");
|
||||
|
||||
|
||||
/**
|
||||
* \class mod_project_simple
|
||||
* \brief Class to manage the numbering module Simple for project references
|
||||
* Class to manage the numbering module Simple for project references
|
||||
*/
|
||||
class mod_project_simple extends ModeleNumRefProjects
|
||||
{
|
||||
@ -38,8 +37,10 @@ class mod_project_simple extends ModeleNumRefProjects
|
||||
var $nom = "Simple";
|
||||
|
||||
|
||||
/** \brief Return description of numbering module
|
||||
* \return string Text with description
|
||||
/**
|
||||
* Return description of numbering module
|
||||
*
|
||||
* @return string Text with description
|
||||
*/
|
||||
function info()
|
||||
{
|
||||
@ -48,8 +49,10 @@ class mod_project_simple extends ModeleNumRefProjects
|
||||
}
|
||||
|
||||
|
||||
/** \brief Return an example of numbering module values
|
||||
* \return string Example
|
||||
/**
|
||||
* Return an example of numbering module values
|
||||
*
|
||||
* @return string Example
|
||||
*/
|
||||
function getExample()
|
||||
{
|
||||
@ -57,9 +60,10 @@ class mod_project_simple extends ModeleNumRefProjects
|
||||
}
|
||||
|
||||
|
||||
/** \brief 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
|
||||
/** 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()
|
||||
{
|
||||
@ -92,10 +96,11 @@ class mod_project_simple extends ModeleNumRefProjects
|
||||
|
||||
|
||||
/**
|
||||
* \brief Return next value
|
||||
* \param objsoc Object third party
|
||||
* \param project Object project
|
||||
* \return string Value if OK, 0 if KO
|
||||
* Return next value
|
||||
*
|
||||
* @param Societe $objsoc Object third party
|
||||
* @param Project $project Object project
|
||||
* @return string Value if OK, 0 if KO
|
||||
*/
|
||||
function getNextValue($objsoc=0,$project='')
|
||||
{
|
||||
@ -132,10 +137,12 @@ class mod_project_simple extends ModeleNumRefProjects
|
||||
}
|
||||
|
||||
|
||||
/** \brief Return next reference not yet used as a reference
|
||||
* \param objsoc Object third party
|
||||
* \param project Object project
|
||||
* \return string Next not used reference
|
||||
/**
|
||||
* Return next reference not yet used as a reference
|
||||
*
|
||||
* @param Societe $objsoc Object third party
|
||||
* @param Project $project Object project
|
||||
* @return string Next not used reference
|
||||
*/
|
||||
function project_get_num($objsoc=0,$project='')
|
||||
{
|
||||
|
||||
@ -26,8 +26,7 @@ require_once(DOL_DOCUMENT_ROOT ."/core/modules/project/modules_project.php");
|
||||
|
||||
|
||||
/**
|
||||
* \class mod_project_universal
|
||||
* \brief Classe du modele de numerotation de reference de projet Universal
|
||||
* Classe du modele de numerotation de reference de projet Universal
|
||||
*/
|
||||
class mod_project_universal extends ModeleNumRefProjects
|
||||
{
|
||||
@ -37,8 +36,9 @@ class mod_project_universal extends ModeleNumRefProjects
|
||||
|
||||
|
||||
/**
|
||||
* \brief Renvoi la description du modele de numerotation
|
||||
* \return string Texte descripif
|
||||
* Renvoi la description du modele de numerotation
|
||||
*
|
||||
* @return string Texte descripif
|
||||
*/
|
||||
function info()
|
||||
{
|
||||
@ -77,8 +77,9 @@ class mod_project_universal extends ModeleNumRefProjects
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Renvoi un exemple de numerotation
|
||||
* \return string Example
|
||||
* Renvoi un exemple de numerotation
|
||||
*
|
||||
* @return string Example
|
||||
*/
|
||||
function getExample()
|
||||
{
|
||||
@ -97,10 +98,11 @@ class mod_project_universal extends ModeleNumRefProjects
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Return next value
|
||||
* \param objsoc Object third party
|
||||
* \param project Object project
|
||||
* \return string Value if OK, 0 if KO
|
||||
* Return next value
|
||||
*
|
||||
* @param Societe $objsoc Object third party
|
||||
* @param Project $project Object project
|
||||
* @return string Value if OK, 0 if KO
|
||||
*/
|
||||
function getNextValue($objsoc=0,$project='')
|
||||
{
|
||||
@ -124,10 +126,12 @@ class mod_project_universal extends ModeleNumRefProjects
|
||||
}
|
||||
|
||||
|
||||
/** \brief Return next reference not yet used as a reference
|
||||
* \param objsoc Object third party
|
||||
* \param project Object project
|
||||
* \return string Next not used reference
|
||||
/**
|
||||
* Return next reference not yet used as a reference
|
||||
*
|
||||
* @param Societe $objsoc Object third party
|
||||
* @param Project $project Object project
|
||||
* @return string Next not used reference
|
||||
*/
|
||||
function project_get_num($objsoc=0,$project='')
|
||||
{
|
||||
|
||||
@ -26,8 +26,7 @@ require_once(DOL_DOCUMENT_ROOT."/core/class/commondocgenerator.class.php");
|
||||
|
||||
|
||||
/**
|
||||
* \class ModelePDFProjects
|
||||
* \brief Parent class for projects models
|
||||
* Parent class for projects models
|
||||
*/
|
||||
abstract class ModelePDFProjects extends CommonDocGenerator
|
||||
{
|
||||
@ -35,8 +34,9 @@ abstract class ModelePDFProjects extends CommonDocGenerator
|
||||
|
||||
|
||||
/**
|
||||
* \brief Return list of active generation modules
|
||||
* \param $db Database handler
|
||||
* Return list of active generation modules
|
||||
*
|
||||
* @param DoliDB $db Database handler
|
||||
*/
|
||||
function liste_modeles($db)
|
||||
{
|
||||
@ -55,16 +55,16 @@ abstract class ModelePDFProjects extends CommonDocGenerator
|
||||
|
||||
|
||||
/**
|
||||
* \class ModeleNumRefProjects
|
||||
* \brief Classe mere des modeles de numerotation des references de projets
|
||||
* Classe mere des modeles de numerotation des references de projets
|
||||
*/
|
||||
abstract class ModeleNumRefProjects
|
||||
{
|
||||
var $error='';
|
||||
|
||||
/**
|
||||
* \brief Return if a module can be used or not
|
||||
* \return boolean true if module can be used
|
||||
* Return if a module can be used or not
|
||||
*
|
||||
* @return boolean true if module can be used
|
||||
*/
|
||||
function isEnabled()
|
||||
{
|
||||
@ -72,8 +72,9 @@ abstract class ModeleNumRefProjects
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Renvoi la description par defaut du modele de numerotation
|
||||
* \return string Texte descripif
|
||||
* Renvoi la description par defaut du modele de numerotation
|
||||
*
|
||||
* @return string Texte descripif
|
||||
*/
|
||||
function info()
|
||||
{
|
||||
@ -83,8 +84,9 @@ abstract class ModeleNumRefProjects
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Renvoi un exemple de numerotation
|
||||
* \return string Example
|
||||
* Renvoi un exemple de numerotation
|
||||
*
|
||||
* @return string Example
|
||||
*/
|
||||
function getExample()
|
||||
{
|
||||
@ -94,9 +96,10 @@ abstract class ModeleNumRefProjects
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief 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
|
||||
* 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()
|
||||
{
|
||||
@ -104,8 +107,9 @@ abstract class ModeleNumRefProjects
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Renvoi prochaine valeur attribuee
|
||||
* \return string Valeur
|
||||
* Renvoi prochaine valeur attribuee
|
||||
*
|
||||
* @return string Valeur
|
||||
*/
|
||||
function getNextValue()
|
||||
{
|
||||
@ -114,8 +118,9 @@ abstract class ModeleNumRefProjects
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Renvoi version du module numerotation
|
||||
* \return string Valeur
|
||||
* Renvoi version du module numerotation
|
||||
*
|
||||
* @return string Valeur
|
||||
*/
|
||||
function getVersion()
|
||||
{
|
||||
@ -131,12 +136,13 @@ abstract class ModeleNumRefProjects
|
||||
|
||||
|
||||
/**
|
||||
* Create object on disk
|
||||
* @param db objet base de donnee
|
||||
* @param object object project
|
||||
* @param model force le modele a utiliser ('' to not force)
|
||||
* @param outputlangs objet lang a utiliser pour traduction
|
||||
* @return int 0 si KO, 1 si OK
|
||||
* Create object on disk
|
||||
*
|
||||
* @param DoliDB $db objet base de donnee
|
||||
* @param Object $object object project
|
||||
* @param string $model force le modele a utiliser ('' to not force)
|
||||
* @param Translate $outputlangs objet lang a utiliser pour traduction
|
||||
* @return int 0 if KO, 1 if OK
|
||||
*/
|
||||
function project_pdf_create($db, $object, $model,$outputlangs)
|
||||
{
|
||||
|
||||
@ -31,8 +31,7 @@ require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php");
|
||||
|
||||
|
||||
/**
|
||||
* \class doc_generic_iproposal_odt
|
||||
* \brief Class to build documents using ODF templates generator
|
||||
* Class to build documents using ODF templates generator
|
||||
*/
|
||||
class doc_generic_proposal_odt extends ModelePDFPropales
|
||||
{
|
||||
|
||||
@ -27,14 +27,14 @@ require_once(DOL_DOCUMENT_ROOT."/core/lib/company.lib.php");
|
||||
|
||||
|
||||
/**
|
||||
* \class pdf_paiement
|
||||
* \brief Classe permettant de generer les rapports de paiement
|
||||
* Classe permettant de generer les rapports de paiement
|
||||
*/
|
||||
class pdf_paiement
|
||||
{
|
||||
/**
|
||||
* \brief Constructeur
|
||||
* \param db handler acces base de donnee
|
||||
* Constructor
|
||||
*
|
||||
* @param DoliDb $db Database handler
|
||||
*/
|
||||
function pdf_paiement($db)
|
||||
{
|
||||
@ -66,11 +66,12 @@ class pdf_paiement
|
||||
|
||||
|
||||
/**
|
||||
* \brief Fonction generant le rapport sur le disque
|
||||
* \param _dir repertoire
|
||||
* \param month mois du rapport
|
||||
* \param year annee du rapport
|
||||
* \param outputlangs Lang output object
|
||||
* Fonction generant la rapport sur le disque
|
||||
*
|
||||
* @param string $_dir repertoire
|
||||
* @param int $month mois du rapport
|
||||
* @param int $year annee du rapport
|
||||
* @param string $outputlangs Lang output object
|
||||
*/
|
||||
function write_file($_dir, $month, $year, $outputlangs)
|
||||
{
|
||||
@ -127,7 +128,7 @@ class pdf_paiement
|
||||
$sql.= " AND p.datep BETWEEN '".$this->db->idate(dol_get_first_day($year,$month))."' AND '".$this->db->idate(dol_get_last_day($year,$month))."'";
|
||||
$sql.= " ORDER BY p.datep ASC, pf.fk_paiement ASC";
|
||||
|
||||
dol_syslog("pdf_paiement::write_file sql=".$sql);
|
||||
dol_syslog(get_class($this)."::write_file sql=".$sql);
|
||||
$result = $this->db->query($sql);
|
||||
if ($result)
|
||||
{
|
||||
@ -263,7 +264,13 @@ class pdf_paiement
|
||||
|
||||
|
||||
/**
|
||||
* Output body
|
||||
*
|
||||
* @param PDF &$pdf PDF object
|
||||
* @param string $page Page
|
||||
* @param array $lines Array of lines
|
||||
* @param Translate $langs Object langs
|
||||
* @return void
|
||||
*/
|
||||
function Body(&$pdf, $page, $lines, $outputlangs)
|
||||
{
|
||||
|
||||
@ -3285,6 +3285,7 @@ function migrate_mode_reglement($db,$langs,$conf)
|
||||
'code' => array('VAD','TRA','LCR','FAC','PRO'),
|
||||
'tables' => array('commande_fournisseur','commande','facture_rec','facture','propal')
|
||||
);
|
||||
$count=0;
|
||||
|
||||
foreach($elements['old_id'] as $key => $old_id)
|
||||
{
|
||||
@ -3303,6 +3304,8 @@ function migrate_mode_reglement($db,$langs,$conf)
|
||||
$num = $db->num_rows($resql);
|
||||
if ($num)
|
||||
{
|
||||
$count++;
|
||||
|
||||
$db->begin();
|
||||
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."c_paiement SET ";
|
||||
@ -3344,13 +3347,12 @@ function migrate_mode_reglement($db,$langs,$conf)
|
||||
$db->rollback();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
print $langs->trans('AlreadyDone')."<br>\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($count == 0) print $langs->trans('AlreadyDone')."<br>\n";
|
||||
|
||||
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
|
||||
@ -15,4 +15,5 @@ ThisIsTransactionId=This is id of transaction: <b>%s</b>
|
||||
PAYPAL_ADD_PAYMENT_URL=Add the url of Paypal payment when you send a document by mail
|
||||
PAYPAL_IPN_MAIL_ADDRESS=E-mail address for the instant notification of payment (IPN)
|
||||
PredefinedMailContentSendOrderWithPaypalLink=You will find here the order __ORDERREF__\n\nYou can click on the secure link below to make your payment via PayPal\n\n%s\n\nSincerely\n\n
|
||||
PredefinedMailContentSendInvoiceWithPaypalLink=You will find here the invoice __FACREF__\n\nYou can click on the secure link below to make your payment via PayPal\n\n%s\n\nSincerely\n\n
|
||||
PredefinedMailContentSendInvoiceWithPaypalLink=You will find here the invoice __FACREF__\n\nYou can click on the secure link below to make your payment via PayPal\n\n%s\n\nSincerely\n\n
|
||||
YouAreCurrentlyInSandboxMode=You are currently in the "sandbox" mode
|
||||
@ -15,4 +15,5 @@ ThisIsTransactionId=Voici l'identifiant de la transaction: <b>%s</b>
|
||||
PAYPAL_ADD_PAYMENT_URL=Ajouter l'url de paiement Paypal lors de l'envoi d'un document par mail
|
||||
PAYPAL_IPN_MAIL_ADDRESS=Adresse e-mail pour les notifications instantanées de paiement (IPN)
|
||||
PredefinedMailContentSendOrderWithPaypalLink=Bonjour\nVeuillez trouver ci-joint la commande __ORDERREF__\n\nVous pouvez cliquer sur le lien sécurisé ci-dessous pour effectuer votre paiement via Paypal\n\n%s\n\nCordialement\n\n
|
||||
PredefinedMailContentSendInvoiceWithPaypalLink=Bonjour\nVeuillez trouver ci-joint la facture __FACREF__\n\nVous pouvez cliquer sur le lien sécurisé ci-dessous pour effectuer votre paiement via Paypal\n\n%s\n\nCordialement\n\n
|
||||
PredefinedMailContentSendInvoiceWithPaypalLink=Bonjour\nVeuillez trouver ci-joint la facture __FACREF__\n\nVous pouvez cliquer sur le lien sécurisé ci-dessous pour effectuer votre paiement via Paypal\n\n%s\n\nCordialement\n\n
|
||||
YouAreCurrentlyInSandboxMode=Vous êtes actuellement dans le mode "sandbox"
|
||||
@ -1,8 +1,8 @@
|
||||
<?php
|
||||
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2005-2011 Laurent Destailleur <eldy@users.sourceforge.org>
|
||||
* Copyright (C) 2011 Regis Houssin <regis@dolibarr.fr>
|
||||
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
|
||||
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2005-2011 Laurent Destailleur <eldy@users.sourceforge.org>
|
||||
* Copyright (C) 2011-2012 Regis Houssin <regis@dolibarr.fr>
|
||||
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
|
||||
*
|
||||
* 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
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2008-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2011 Regis Houssin <regis@dolibarr.fr>
|
||||
/* Copyright (C) 2008-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2011-2012 Regis Houssin <regis@dolibarr.fr>
|
||||
*
|
||||
* 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
|
||||
@ -55,6 +55,28 @@ function llxHeaderPaypal($title, $head = "")
|
||||
print '.CTableRow2 { margin: 1px; padding: 3px; font: 12px verdana,arial; background: #FFFFFF; color: #000000; -moz-border-radius-topleft:6px; -moz-border-radius-topright:6px; -moz-border-radius-bottomleft:6px; -moz-border-radius-bottomright:6px;}';
|
||||
print '</style>';
|
||||
}
|
||||
|
||||
if ($conf->use_javascript_ajax)
|
||||
{
|
||||
print '<!-- Includes for JQuery (Ajax library) -->'."\n";
|
||||
print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/plugins/jnotify/jquery.jnotify-alt.min.css" />'."\n"; // JNotify
|
||||
|
||||
// Output standard javascript links
|
||||
$ext='.js';
|
||||
if (isset($conf->global->MAIN_OPTIMIZE_SPEED) && ($conf->global->MAIN_OPTIMIZE_SPEED & 0x01)) {
|
||||
$ext='.jgz';
|
||||
} // mini='_mini', ext='.gz'
|
||||
|
||||
// JQuery. Must be before other includes
|
||||
print '<!-- Includes JS for JQuery -->'."\n";
|
||||
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/js/jquery-latest.min'.$ext.'"></script>'."\n";
|
||||
// jQuery jnotify
|
||||
if (empty($conf->global->MAIN_DISABLE_JQUERY_JNOTIFY))
|
||||
{
|
||||
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/jnotify/jquery.jnotify.min.js"></script>'."\n";
|
||||
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/core/js/jnotify.js"></script>'."\n";
|
||||
}
|
||||
}
|
||||
print "</head>\n";
|
||||
print '<body style="margin: 20px;">'."\n";
|
||||
}
|
||||
@ -207,7 +229,11 @@ function getPaypalPaymentUrl($mode,$type,$ref='',$amount='9.99',$freetag='your_f
|
||||
if ($type == 'free')
|
||||
{
|
||||
$out=DOL_MAIN_URL_ROOT.'/public/paypal/newpayment.php?amount='.($mode?'<font color="#666666">':'').$amount.($mode?'</font>':'').'&tag='.($mode?'<font color="#666666">':'').$freetag.($mode?'</font>':'');
|
||||
if (! empty($conf->global->PAYPAL_SECURITY_TOKEN)) $out.='&securekey='.$conf->global->PAYPAL_SECURITY_TOKEN;
|
||||
if (! empty($conf->global->PAYPAL_SECURITY_TOKEN))
|
||||
{
|
||||
if (empty($conf->global->PAYPAL_SECURITY_TOKEN_UNIQUE)) $out.='&securekey='.$conf->global->PAYPAL_SECURITY_TOKEN;
|
||||
else $out.='&securekey='.dol_hash($conf->global->PAYPAL_SECURITY_TOKEN, 2);
|
||||
}
|
||||
}
|
||||
if ($type == 'order')
|
||||
{
|
||||
|
||||
@ -1022,7 +1022,7 @@ class Product extends CommonObject
|
||||
if ($id) $sql.= " WHERE rowid = '".$id."'";
|
||||
else
|
||||
{
|
||||
$sql.= " WHERE p.entity IN (".getEntity($this->element, 1).")";
|
||||
$sql.= " WHERE entity IN (".getEntity($this->element, 1).")";
|
||||
if ($ref) $sql.= " AND ref = '".$this->db->escape($ref)."'";
|
||||
else if ($ref_ext) $sql.= " AND ref_ext = '".$this->db->escape($ref_ext)."'";
|
||||
}
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/* Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2006-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2009-2011 Regis Houssin <regis@dolibarr.fr>
|
||||
/* Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2006-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2009-2012 Regis Houssin <regis@dolibarr.fr>
|
||||
*
|
||||
* 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
|
||||
@ -236,6 +236,10 @@ if (GETPOST("action") == 'dopayment')
|
||||
|
||||
llxHeaderPaypal($langs->trans("PaymentForm"));
|
||||
|
||||
if (! empty($PAYPAL_API_SANDBOX))
|
||||
{
|
||||
dol_htmloutput_mesg($langs->trans('YouAreCurrentlyInSandboxMode'),'','warning');
|
||||
}
|
||||
|
||||
// Common variables
|
||||
$creditor=$mysoc->name;
|
||||
|
||||
@ -2019,7 +2019,7 @@ class Societe extends CommonObject
|
||||
// Verifie SIRET si pays FR
|
||||
if ($idprof == 2 && $soc->country_code == 'FR')
|
||||
{
|
||||
$chaine=trim($this->idprof1);
|
||||
$chaine=trim($this->idprof2);
|
||||
$chaine=preg_replace('/(\s)/','',$chaine);
|
||||
|
||||
if (dol_strlen($chaine) != 14) return -1;
|
||||
|
||||
@ -266,6 +266,24 @@ class SocieteTest extends PHPUnit_Framework_TestCase
|
||||
print __METHOD__." localobject->date_creation=".$localobject->date_creation."\n";
|
||||
$this->assertNotEquals($localobject->date_creation, '');
|
||||
|
||||
$localobject->idprof1=493861496;
|
||||
$localobject->idprof2=49386149600021;
|
||||
$result=$localobject->id_prof_check(1,$localobject);
|
||||
print __METHOD__." result=".$result."\n";
|
||||
$this->assertLessThan($result, 0);
|
||||
$result=$localobject->id_prof_check(2,$localobject);
|
||||
print __METHOD__." result=".$result."\n";
|
||||
$this->assertLessThan($result, 0);
|
||||
|
||||
$localobject->idprof1='id1ko';
|
||||
$localobject->idprof2='id2ko';
|
||||
$result=$localobject->id_prof_check(1,$localobject);
|
||||
print __METHOD__." result=".$result."\n";
|
||||
$this->assertGreaterThan($result, 0);
|
||||
$result=$localobject->id_prof_check(2,$localobject);
|
||||
print __METHOD__." result=".$result."\n";
|
||||
$this->assertGreaterThan($result, 0);
|
||||
|
||||
return $localobject->id;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user