This commit is contained in:
Laurent Destailleur 2012-03-17 01:13:10 +01:00
parent 02cdd86066
commit d8becd3cdb
13 changed files with 159 additions and 123 deletions

View File

@ -79,6 +79,7 @@ abstract class ModelNumRefExpedition
/**
* Return default description of numbering model
*
* @return string text description
*/
function info()
@ -90,6 +91,7 @@ abstract class ModelNumRefExpedition
/**
* Return numbering example
*
* @return string Example
*/
function getExample()
@ -101,6 +103,7 @@ abstract class ModelNumRefExpedition
/**
* Test if existing numbers make problems with numbering
*
* @return boolean false if conflit, true if ok
*/
function canBeActivated()
@ -110,6 +113,7 @@ abstract class ModelNumRefExpedition
/**
* Return next value
*
* @return string Value
*/
function getNextValue()
@ -120,6 +124,7 @@ abstract class ModelNumRefExpedition
/**
* Return numbering version module
*
* @return string Value
*/
function getVersion()
@ -136,11 +141,12 @@ abstract class ModelNumRefExpedition
/**
* Cree un bon d'expedition sur disque
* @param db objet base de donnee
* @param object object expedition
* @param modele force le modele a utiliser ('' to not force)
* @param outputlangs objet lang a utiliser pour traduction
* @return int <=0 if KO, >0 if OK
*
* @param DoliDB $db Objet base de donnee
* @param Object $object Object expedition
* @param string $modele Force le modele a utiliser ('' to not force)
* @param Translate $outputlangs Objet lang a utiliser pour traduction
* @return int <=0 if KO, >0 if OK
*/
function expedition_pdf_create($db, $object, $modele, $outputlangs)
{

View File

@ -100,12 +100,13 @@ class mod_livraison_jade extends ModeleNumRefDeliveryOrder
}
/**
* \brief Return next value
* \param objsoc Object third party
* \param delivery Object delivery
* \return string Value if OK, 0 if KO
* Return next free value
*
* @param Societe $objsoc Object thirdparty
* @param Object $object Object we need next value for
* @return string Value if KO, <0 if KO
*/
function getNextValue($objsoc=0,$delivery='')
function getNextValue($objsoc=0,$object='')
{
global $db,$conf;
@ -130,7 +131,7 @@ class mod_livraison_jade extends ModeleNumRefDeliveryOrder
return -1;
}
$date=$delivery->date_delivery;
$date=$object->date_delivery;
if (empty($date)) $date=dol_now();
$yymm = strftime("%y%m",$date);
$num = sprintf("%04s",$max+1);
@ -140,15 +141,17 @@ class mod_livraison_jade extends ModeleNumRefDeliveryOrder
}
/**
* \brief Renvoie la reference de commande suivante non utilisee
* \param objsoc Objet societe
* \param livraison Objet livraison
* \return string Texte descripif
/**
* Return next free ref
*
* @param Societe $objsoc Object thirdparty
* @param Object $object Object livraison
* @return string Texte descripif
*/
function livraison_get_num($objsoc=0,$livraison='')
function livraison_get_num($objsoc=0,$object='')
{
return $this->getNextValue($objsoc,$livraison);
return $this->getNextValue($objsoc,$object);
}
}
?>

View File

@ -146,9 +146,9 @@ class mod_livraison_saphir extends ModeleNumRefDeliveryOrder
* @param Object $livraison Objet livraison
* @return string Texte descripif
*/
function livraison_get_num($objsoc=0,$livraison='')
function livraison_get_num($objsoc=0,$object='')
{
return $this->getNextValue($objsoc,$livraison);
return $this->getNextValue($objsoc,$object);
}
}

View File

@ -68,16 +68,20 @@ abstract class ModeleNumRefDeliveryOrder
{
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 numerotation
* \return string Texte descripif
/**
* Renvoi la description par defaut du modele de numerotation
*
* @return string Texte descripif
*/
function info()
{
@ -86,8 +90,10 @@ abstract class ModeleNumRefDeliveryOrder
return $langs->trans("NoDescription");
}
/** \brief Renvoi un exemple de numerotation
* \return string Example
/**
* Renvoi un exemple de numerotation
*
* @return string Example
*/
function getExample()
{
@ -96,17 +102,21 @@ abstract class ModeleNumRefDeliveryOrder
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()
{
@ -114,8 +124,10 @@ abstract class ModeleNumRefDeliveryOrder
return $langs->trans("NotAvailable");
}
/** \brief Renvoi version du module numerotation
* \return string Valeur
/**
* Renvoi version du module numerotation
*
* @return string Valeur
*/
function getVersion()
{
@ -132,12 +144,13 @@ abstract class ModeleNumRefDeliveryOrder
/**
* Create object on disk
* @param db objet base de donnee
* @param object object delivery
* @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 delivery
* @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 delivery_order_pdf_create($db, $object, $model='', $outputlangs='')
{

View File

@ -34,7 +34,8 @@ include_once DOL_DOCUMENT_ROOT.'/core/modules/mailings/modules_mailings.php';
class mailing_contacts1 extends MailingTargets
{
var $name='ContactCompanies'; // Identifiant du module mailing
var $desc='Contacts des tiers (prospects, clients, fournisseurs...)'; // Libell<6C> utilis<69> si aucune traduction pour MailingModuleDescXXX ou XXX=name trouv<75>e
// This label is used if no translation is found for key MailingModuleDescXXX where XXX=name is found
var $desc='Contacts des tiers (prospects, clients, fournisseurs...)';
var $require_module=array("societe"); // Module mailing actif si modules require_module actifs
var $require_admin=0; // Module mailing actif pour user admin ou non
var $picto='contact';

View File

@ -72,6 +72,7 @@ class pdf_paiement
* @param int $month mois du rapport
* @param int $year annee du rapport
* @param string $outputlangs Lang output object
* @return int <0 if KO, >0 if OK
*/
function write_file($_dir, $month, $year, $outputlangs)
{
@ -210,7 +211,7 @@ class pdf_paiement
* Show top header of page.
*
* @param PDF &$pdf Object PDF
* @param Object $object Object to show
* @param int $page Object to show
* @param int $showaddress 0=no, 1=yes
* @param Translate $outputlangs Object lang for output
* @return void
@ -257,7 +258,7 @@ class pdf_paiement
$pdf->SetXY(162, $this->tab_top+2);
$pdf->MultiCell(40, 2, $outputlangs->transnoentities("AmountPayment"), 0, 'L');
$pdf->line(10, $this->tab_top + 10, 200, $this->tab_top + 10 );
$pdf->line(10, $this->tab_top + 10, 200, $this->tab_top + 10);
$pdf->Rect(9, $this->tab_top, 192, $this->tab_height + 10);
}
@ -266,10 +267,10 @@ 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
* @param PDF &$pdf PDF object
* @param string $page Page
* @param array $lines Array of lines
* @param Translate $outputlangs Object langs
* @return void
*/
function Body(&$pdf, $page, $lines, $outputlangs)

View File

@ -110,11 +110,13 @@ class mod_codeclient_elephant extends ModeleThirdPartyCode
}
/** Return an example of result returned by getNextValue
/**
* Return an example of result returned by getNextValue
*
* @param $langs Object langs
* @param $objsoc Object thirdparty
* @param $type Type of third party (1:customer, 2:supplier, -1:autodetect)
* @param Translate $langs Object langs
* @param societe $objsoc Object thirdparty
* @param int $type Type of third party (1:customer, 2:supplier, -1:autodetect)
* @return string Return string example
*/
function getExample($langs,$objsoc=0,$type=-1)
{
@ -196,7 +198,7 @@ class mod_codeclient_elephant extends ModeleThirdPartyCode
/**
* Check if mask/numbering use prefix
*
* @param int 0=no, 1=yes
* @return int 0 or 1
*/
function verif_prefixIsUsed()
{
@ -213,17 +215,17 @@ class mod_codeclient_elephant extends ModeleThirdPartyCode
/**
* Check validity of code according to its rules
* Check validity of code according to its rules
*
* @param $db Database handler
* @param $code Code to check/correct
* @param $soc Object third party
* @param $type 0 = customer/prospect , 1 = supplier
* @return int 0 if OK
* -1 ErrorBadCustomerCodeSyntax
* -2 ErrorCustomerCodeRequired
* -3 ErrorCustomerCodeAlreadyUsed
* -4 ErrorPrefixRequired
* @param DoliDB $db Database handler
* @param string &$code Code to check/correct
* @param Societe $soc Object third party
* @param int $type 0 = customer/prospect , 1 = supplier
* @return int 0 if OK
* -1 ErrorBadCustomerCodeSyntax
* -2 ErrorCustomerCodeRequired
* -3 ErrorCustomerCodeAlreadyUsed
* -4 ErrorPrefixRequired
*/
function verif($db, &$code, $soc, $type)
{
@ -265,10 +267,10 @@ class mod_codeclient_elephant extends ModeleThirdPartyCode
/**
* Renvoi si un code est pris ou non (par autre tiers)
*
* @param $db Handler acces base
* @param $code Code a verifier
* @param $soc Objet societe
* @return int 0 si dispo, <0 si erreur
* @param DoliDB $db Handler acces base
* @param string $code Code a verifier
* @param Societe $soc Objet societe
* @return int 0 if available, <0 if KO
*/
function verif_dispo($db, $code, $soc)
{

View File

@ -72,11 +72,12 @@ class mod_codeclient_leopard extends ModeleThirdPartyCode
}
/** Return an example of result returned by getNextValue
/**
* Return an example of result returned by getNextValue
*
* @param $langs Object langs
* @param $objsoc Object thirdparty
* @param $type Type of third party (1:customer, 2:supplier, -1:autodetect)
* @param societe $objsoc Object thirdparty
* @param int $type Type of third party (1:customer, 2:supplier, -1:autodetect)
* @return string Return next value
*/
function getNextValue($objsoc=0,$type=-1)
{
@ -86,17 +87,17 @@ class mod_codeclient_leopard extends ModeleThirdPartyCode
/**
* Check validity of code according to its rules
* Check validity of code according to its rules
*
* @param $db Database handler
* @param $code Code to check/correct
* @param $soc Object third party
* @param $type 0 = customer/prospect , 1 = supplier
* @return int 0 if OK
* -1 ErrorBadCustomerCodeSyntax
* -2 ErrorCustomerCodeRequired
* -3 ErrorCustomerCodeAlreadyUsed
* -4 ErrorPrefixRequired
* @param DoliDB $db Database handler
* @param string &$code Code to check/correct
* @param Societe $soc Object third party
* @param int $type 0 = customer/prospect , 1 = supplier
* @return int 0 if OK
* -1 ErrorBadCustomerCodeSyntax
* -2 ErrorCustomerCodeRequired
* -3 ErrorCustomerCodeAlreadyUsed
* -4 ErrorPrefixRequired
*/
function verif($db, &$code, $soc, $type)
{

View File

@ -71,11 +71,13 @@ class mod_codeclient_monkey extends ModeleThirdPartyCode
}
/** Return an example of result returned by getNextValue
/**
* Return an example of result returned by getNextValue
*
* @param $langs Object langs
* @param $objsoc Object thirdparty
* @param $type Type of third party (1:customer, 2:supplier, -1:autodetect)
* @param Translate $langs Object langs
* @param societe $objsoc Object thirdparty
* @param int $type Type of third party (1:customer, 2:supplier, -1:autodetect)
* @return string Return string example
*/
function getExample($langs,$objsoc=0,$type=-1)
{
@ -83,11 +85,12 @@ class mod_codeclient_monkey extends ModeleThirdPartyCode
}
/** Return next value
/**
* Return next value
*
* @param objsoc Object third party
* @param type Client ou fournisseur (1:client, 2:fournisseur)
* @return string Value if OK, '' if module not configured, <0 if KO
* @param Societe $objsoc Object third party
* @param int $type Client ou fournisseur (1:client, 2:fournisseur)
* @return string Value if OK, '' if module not configured, <0 if KO
*/
function getNextValue($objsoc=0,$type=-1)
{
@ -143,17 +146,17 @@ class mod_codeclient_monkey extends ModeleThirdPartyCode
/**
* Check validity of code according to its rules
* Check validity of code according to its rules
*
* @param $db Database handler
* @param $code Code to check/correct
* @param $soc Object third party
* @param $type 0 = customer/prospect , 1 = supplier
* @return int 0 if OK
* -1 ErrorBadCustomerCodeSyntax
* -2 ErrorCustomerCodeRequired
* -3 ErrorCustomerCodeAlreadyUsed
* -4 ErrorPrefixRequired
* @param DoliDB $db Database handler
* @param string &$code Code to check/correct
* @param Societe $soc Object third party
* @param int $type 0 = customer/prospect , 1 = supplier
* @return int 0 if OK
* -1 ErrorBadCustomerCodeSyntax
* -2 ErrorCustomerCodeRequired
* -3 ErrorCustomerCodeAlreadyUsed
* -4 ErrorPrefixRequired
*/
function verif($db, &$code, $soc, $type)
{
@ -205,10 +208,10 @@ class mod_codeclient_monkey extends ModeleThirdPartyCode
/**
* Renvoi si un code est pris ou non (par autre tiers)
*
* @param $db Handler acces base
* @param $code Code a verifier
* @param $soc Objet societe
* @return int 0 si dispo, <0 si erreur
* @param DoliDB $db Handler acces base
* @param string $code Code a verifier
* @param Societe $soc Objet societe
* @return int 0 if available, <0 if KO
*/
function verif_dispo($db, $code, $soc)
{
@ -243,8 +246,8 @@ class mod_codeclient_monkey extends ModeleThirdPartyCode
/**
* Renvoi si un code respecte la syntaxe
*
* @param $code Code a verifier
* * @return int 0 si OK, <0 si KO
* @param string $code Code a verifier
* * @return int 0 si OK, <0 si KO
*/
function verif_syntax($code)
{

View File

@ -51,10 +51,11 @@ class mod_codecompta_aquarium extends ModeleAccountancyCode
}
/** Return description of module
/**
* Return description of module
*
* @param Translate $langs Object langs
* @return string Description of module
* @param Translate $langs Object langs
* @return string Description of module
*/
function info($langs)
{
@ -82,11 +83,13 @@ class mod_codecompta_aquarium extends ModeleAccountancyCode
return $texte;
}
/** Return an example of result returned by getNextValue
/**
* Return an example of result returned by getNextValue
*
* @param $langs Object langs
* @param $objsoc Object thirdparty
* @param $type Type of third party (1:customer, 2:supplier, -1:autodetect)
* @param Translate $langs Object langs
* @param societe $objsoc Object thirdparty
* @param int $type Type of third party (1:customer, 2:supplier, -1:autodetect)
* @return string Return string example
*/
function getExample($langs,$objsoc=0,$type=-1)
{

View File

@ -43,10 +43,11 @@ class mod_codecompta_panicum extends ModeleAccountancyCode
}
/** Return description of module
/**
* Return description of module
*
* @param string $langs Object langs
* @return string Description of module
* @param string $langs Object langs
* @return string Description of module
*/
function info($langs)
{

View File

@ -58,7 +58,8 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
/**
* Constructor
*
* @param DoliDB $db Database handler
* @param DoliDB $db Database handler
* @param Societe $object Third party providing invoice
*/
function __construct($db,$object)
{
@ -688,11 +689,12 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
/**
* Show payments table
* @param pdf Object PDF
* @param object Object invoice
* @param posy Position y in PDF
* @param outputlangs Object langs for output
* @return int <0 if KO, >0 if OK
*
* @param PDF &$pdf Object PDF
* @param Object $object Object invoice
* @param int $posy Position y in PDF
* @param Translate $outputlangs Object langs for output
* @return int <0 if KO, >0 if OK
*/
function _tableau_versements(&$pdf, $object, $posy, $outputlangs)
{

View File

@ -107,7 +107,7 @@ class mod_commande_fournisseur_orchidee extends ModeleNumRefSuppliersOrders
* @param Object $object Object
* @return string Value if OK, 0 if KO
*/
function getNextValue($objsoc=0,$commande='')
function getNextValue($objsoc=0,$object='')
{
global $db,$conf;
@ -122,7 +122,7 @@ class mod_commande_fournisseur_orchidee extends ModeleNumRefSuppliersOrders
return 0;
}
$numFinal=get_next_value($db,$mask,'commande_fournisseur','ref','',$objsoc->code_fournisseur,$commande->date_commande);
$numFinal=get_next_value($db,$mask,'commande_fournisseur','ref','',$objsoc->code_fournisseur,$object->date_commande);
return $numFinal;
}
@ -135,9 +135,9 @@ class mod_commande_fournisseur_orchidee extends ModeleNumRefSuppliersOrders
* @param Object $object Object
* @return string Texte descripif
*/
function commande_get_num($objsoc=0,$commande='')
function commande_get_num($objsoc=0,$object='')
{
return $this->getNextValue($objsoc,$commande);
return $this->getNextValue($objsoc,$object);
}
}