This commit is contained in:
Juanjo Menent 2011-07-08 09:18:54 +00:00
parent e2dd07c868
commit 711deb78c2

View File

@ -22,7 +22,7 @@
/** \file htdocs/fichinter/class/fichinter.class.php /** \file htdocs/fichinter/class/fichinter.class.php
* \ingroup ficheinter * \ingroup ficheinter
* \brief Fichier de la classe des gestion des fiches interventions * \brief Fichier de la classe des gestion des fiches interventions
* \version $Id: fichinter.class.php,v 1.19 2011/07/02 17:02:00 eldy Exp $ * \version $Id: fichinter.class.php,v 1.20 2011/07/08 09:18:54 simnandez Exp $
*/ */
require_once(DOL_DOCUMENT_ROOT ."/core/class/commonobject.class.php"); require_once(DOL_DOCUMENT_ROOT ."/core/class/commonobject.class.php");
@ -61,9 +61,9 @@ class Fichinter extends CommonObject
var $lines = array(); var $lines = array();
/** /**
* \brief Constructeur de la classe * Class constructor
* \param DB Handler acces base de donnees * @param DB Data base handler access
* \param socid Id societe * @param socid Id society
*/ */
function Fichinter($DB, $socid="") function Fichinter($DB, $socid="")
{ {
@ -83,9 +83,9 @@ class Fichinter extends CommonObject
} }
/* /**
* \brief Cree une fiche intervention en base * Create a intervention into data base
* \return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
function create() function create()
{ {
@ -168,8 +168,8 @@ class Fichinter extends CommonObject
} }
/* /**
* Met a jour une intervention * Update a intervention
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
function update($user) function update($user)
@ -201,9 +201,10 @@ class Fichinter extends CommonObject
} }
/** /**
* \brief Charge en memoire la fiche intervention * Fetch a intervention
* \param rowid Id de la fiche a charger * @param rowid Id of intervention
* \return int <0 si ko, >0 si ok * @param ref Ref of intervention
* @return int <0 if ko, >0 if ok
*/ */
function fetch($rowid,$ref='') function fetch($rowid,$ref='')
{ {
@ -261,8 +262,8 @@ class Fichinter extends CommonObject
} }
/** /**
* \brief Set status to draft * Set status to draft
* \return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
function setDraft($user) function setDraft($user)
{ {
@ -295,9 +296,10 @@ class Fichinter extends CommonObject
} }
/** /**
* \brief Valide une fiche intervention * Validate a intervention
* \param user User qui valide * @param user User that validate
* \return int <0 if KO, >0 if OK * @param outputdir
* @return int <0 if KO, >0 if OK
*/ */
function setValid($user, $outputdir) function setValid($user, $outputdir)
{ {
@ -350,7 +352,7 @@ class Fichinter extends CommonObject
} }
/** /**
* set intervetnion as billed * Set intervetnion as billed
* @return int <0 si ko, >0 si ok * @return int <0 si ko, >0 si ok
*/ */
function setBilled() function setBilled()
@ -375,9 +377,9 @@ class Fichinter extends CommonObject
/** /**
* \brief Retourne le libelle du statut * Returns the label status
* \param mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto * @param mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto
* \return string Libelle * @return string Label
*/ */
function getLibStatut($mode=0) function getLibStatut($mode=0)
{ {
@ -385,10 +387,10 @@ class Fichinter extends CommonObject
} }
/** /**
* \brief Renvoi le libelle d'un statut donne * Returns the label of a statut
* \param statut id statut * @param statut id statut
* \param mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto * @param mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto
* \return string Libelle * @return string Label
*/ */
function LibStatut($statut,$mode=0) function LibStatut($statut,$mode=0)
{ {
@ -429,9 +431,9 @@ class Fichinter extends CommonObject
} }
/** /**
* \brief Return clicable name (with picto eventually) * Return clicable name (with picto eventually)
* \param withpicto 0=Pas de picto, 1=Inclut le picto dans le lien, 2=Picto seul * @param withpicto 0=_No picto, 1=Includes the picto in the linkn, 2=Picto only
* \return string Chaine avec URL * @return string String with URL
*/ */
function getNomUrl($withpicto=0) function getNomUrl($withpicto=0)
{ {
@ -454,10 +456,10 @@ class Fichinter extends CommonObject
/** /**
* \brief Renvoie la reference de fiche intervention suivante non utilisee en fonction du module * Returns the next non used reference of intervention
* de numerotation actif defini dans FICHEINTER_ADDON * depending on the module numbering assets within FICHEINTER_ADDON
* \param soc objet societe * @param soc Object society
* \return string reference libre pour la fiche intervention * @return string Free reference for intervention
*/ */
function getNextNumRef($soc) function getNextNumRef($soc)
{ {
@ -502,8 +504,8 @@ class Fichinter extends CommonObject
} }
/** /**
* \brief Information sur l'objet fiche intervention * Information sur l'objet fiche intervention
* \param id id de la fiche d'intervention * @param id id de la fiche d'intervention
*/ */
function info($id) function info($id)
{ {
@ -551,8 +553,8 @@ class Fichinter extends CommonObject
} }
/** /**
* \brief Efface fiche intervention * Delete intervetnion
* \param user Objet du user qui efface * @param user Object user who deletes
*/ */
function delete($user) function delete($user)
{ {
@ -647,10 +649,10 @@ class Fichinter extends CommonObject
} }
/** /**
* \brief Definit une date de livraison du bon d'intervention * Defines a delivery date of intervention
* \param user Objet utilisateur qui modifie * @param user Object user who define
* \param date_creation date de livraison * @param date_delivery date of delivery
* \return int <0 si ko, >0 si ok * @return int <0 if ko, >0 if ok
*/ */
function set_date_delivery($user, $date_delivery) function set_date_delivery($user, $date_delivery)
{ {
@ -679,10 +681,10 @@ class Fichinter extends CommonObject
} }
/** /**
* \brief Definit le label de l'intervention * Define the label of the intervention
* \param user Objet utilisateur qui modifie * @param user Object user who modify
* \param description description * @param description description
* \return int <0 si ko, >0 si ok * @return int <0 if ko, >0 if ok
*/ */
function set_description($user, $description) function set_description($user, $description)
{ {
@ -711,12 +713,12 @@ class Fichinter extends CommonObject
} }
/** /**
* \brief Ajout d'une ligne d'intervention, en base * Adding a line of intervention into data base
* \param fichinterid Id de la fiche d'intervention * @param fichinterid Id of intervention
* \param desc Description de la ligne * @param desc Line description
* \param date_intervention Date de l'intervention * @param date_intervention Intervention date
* \param duration Duree de l'intervention * @param duration Intervention duration
* \return int >0 si ok, <0 si ko * @return int >0 if ok, <0 if ko
*/ */
function addline($fichinterid, $desc, $date_intervention, $duration) function addline($fichinterid, $desc, $date_intervention, $duration)
{ {
@ -752,8 +754,8 @@ class Fichinter extends CommonObject
/** /**
* \brief Initialise la fiche intervention avec valeurs fictives aleatoire * Initializes the intervention with random values
* Sert a generer une fiche intervention pour l'aperu des modeles ou demo * Used to generate a intervention for the preview or demo models
*/ */
function initAsSpecimen() function initAsSpecimen()
{ {
@ -813,9 +815,8 @@ class Fichinter extends CommonObject
} }
/** /**
* Initialise la fiche intervention avec valeurs fictives aleatoire * Load array lines
* Sert a generer une fiche intervention pour l'aperu des modeles ou demo * @return int <0 if Ko, >0 if OK
* @return int <0 OK, >0 KO
*/ */
function fetch_lines() function fetch_lines()
{ {
@ -886,8 +887,8 @@ class FichinterLigne
} }
/** /**
* \brief Recupere l'objet ligne d'intervention * Retrieve the line of intervention
* \param rowid id de la ligne * @param rowid line id
*/ */
function fetch($rowid) function fetch($rowid)
{ {
@ -920,8 +921,8 @@ class FichinterLigne
} }
/** /**
* \brief Insere l'objet ligne d'intervention en base * Insert the line into database
* \return int <0 si ko, >0 si ok * @return int <0 if ko, >0 if ok
*/ */
function insert() function insert()
{ {
@ -987,8 +988,8 @@ class FichinterLigne
/** /**
* \brief Mise a jour de l'objet ligne d'intervention en base * Update intervention into database
* \return int <0 si ko, >0 si ok * @return int <0 if ko, >0 if ok
*/ */
function update() function update()
{ {
@ -1030,8 +1031,8 @@ class FichinterLigne
} }
/** /**
* \brief Mise a jour duree total dans table llx_fichinter * Update total duration into llx_fichinter
* \return int <0 si ko, >0 si ok * @return int <0 si ko, >0 si ok
*/ */
function update_total() function update_total()
{ {
@ -1081,8 +1082,8 @@ class FichinterLigne
} }
/** /**
* \brief Supprime une ligne d'intervention * Delete a intervention line
* \return int >0 si ok, <0 si ko * @return int >0 if ok, <0 if ko
*/ */
function deleteline() function deleteline()
{ {