Qual: Uniformize all document generation into function write_file

Doxygen
This commit is contained in:
Laurent Destailleur
2010-11-11 01:09:41 +00:00
parent e50c375a8f
commit d018d4be8b
13 changed files with 39 additions and 31 deletions

View File

@@ -54,7 +54,7 @@ $result = restrictedArea($user, 'agenda', $socid, '', 'myactions');
if ($_GET["action"] == 'builddoc')
{
$cat = new CommActionRapport($db, $_GET["month"], $_GET["year"]);
$result=$cat->generate($_GET["id"]);
$result=$cat->write_file(GETPOST("id"));
if ($result < 0)
{
$mesg=$cat->error;

View File

@@ -70,7 +70,14 @@ class CommActionRapport
$this->subject=$langs->trans("ActionsReport").' '.$this->year."-".$this->month;
}
function generate($socid = 0, $catid = 0, $outputlangs='')
/**
* Write the object to document file to disk
* @param socid
* @param catid
* @param outputlangs Lang object for output language
* @return int 1=OK, 0=KO
*/
function write_file($socid = 0, $catid = 0, $outputlangs='')
{
global $user,$conf,$langs;

View File

@@ -77,11 +77,11 @@ class BordereauChequeBlochet extends ModeleChequeReceipts
}
/**
* \brief Fonction generant le rapport sur le disque
* \param _dir Directory
* \param number Number
* \param outputlangs Lang output object
* \return int 1=ok, 0=ko
* Fonction generant le rapport sur le disque
* @param _dir Directory
* @param number Number
* @param outputlangs Lang output object
* @return int 1=ok, 0=ko
*/
function write_file($_dir, $number, $outputlangs)
{

View File

@@ -61,9 +61,10 @@ class html_cerfafr extends ModeleDon
/**
\brief Fonction generant le recu sur le disque
\param id Id du recu a generer
\return int >0 si ok, <0 si ko
* 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
*/
function write_file($don,$outputlangs)
{

View File

@@ -68,7 +68,7 @@ Class pdf_expedition_merou extends ModelePdfExpedition
/**
* \brief Fonction generant le document sur le disque
* \param obj Objet expedition a generer (ou id si ancienne methode)
* \param object Objet expedition a generer (ou id si ancienne methode)
* \param outputlangs Lang output object
* \return int 1=ok, 0=ko
*/

View File

@@ -210,7 +210,7 @@ Class pdf_expedition_rouget extends ModelePdfExpedition
/**
* \brief Fonction generant le document sur le disque
* \param obj Objet expedition a generer (ou id si ancienne methode)
* \param object Objet expedition a generer (ou id si ancienne methode)
* \param outputlangs Lang output object
* \return int 1=ok, 0=ko
*/

View File

@@ -103,7 +103,7 @@ class pdf_crabe extends ModelePDFFactures
/**
* Write the invoice to disk
* Write the object to document file to disk
* @param object Object invoice to build (or id if old method)
* @param outputlangs Lang object for output language
* @return int 1=OK, 0=KO

View File

@@ -74,10 +74,10 @@ class pdf_sirocco extends ModelePDFDeliveryOrder
/**
* \brief Fonction generant le bon de livraison sur le disque
* \param delivery Object livraison a generer
* \param outputlangs Lang output object
* \return int 1 if OK, <=0 if KO
* Fonction generant le bon de livraison sur le disque
* @param object Object livraison a generer
* @param outputlangs Lang output object
* @return int 1 if OK, <=0 if KO
*/
function write_file($object,$outputlangs)
{

View File

@@ -95,10 +95,10 @@ class pdf_typhon extends ModelePDFDeliveryOrder
/**
* \brief Fonction generant le bon de livraison sur le disque
* \param delivery Object livraison a generer
* \param outputlangs Lang output object
* \return int 1 if OK, <=0 if KO
* Fonction generant le bon de livraison sur le disque
* @param object Object livraison a generer
* @param outputlangs Lang output object
* @return int 1 if OK, <=0 if KO
*/
function write_file($object,$outputlangs)
{

View File

@@ -85,7 +85,7 @@ class pdf_baleine extends ModelePDFProjects
/**
* \brief Fonction generant le projet sur le disque
* \param delivery Object project a generer
* \param object Object project a generer
* \param outputlangs Lang output object
* \return int 1 if OK, <=0 if KO
*/

View File

@@ -77,7 +77,7 @@ class pdf_propale_jaune extends ModelePDFPropales
/**
* \brief Fonction generant la propale sur le disque
* \param propale Objet propal
* \param object Objet propal
* \param outputlangs Lang object for output language
* \return int 1=ok, 0=ko
*/

View File

@@ -92,7 +92,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
/**
* Write the invoice to disk
* Write the invoice as a document onto disk
* @param object Object invoice to build (or id if old method)
* @param outputlangs Lang object for output language
* @return int 1=OK, 0=KO

View File

@@ -92,10 +92,10 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
/**
* \brief Fonction generant la commande sur le disque
* \param id Id de la commande a generer
* \param outputlangs Lang output object
* \return int 1=ok, 0=ko
* Write the order as a document onto disk
* @param object Object invoice to build (or id if old method)
* @param outputlangs Lang object for output language
* @return int 1=OK, 0=KO
*/
function write_file($object,$outputlangs='')
{