This commit is contained in:
Laurent Destailleur 2012-03-17 00:22:48 +01:00
parent 4806f2ad54
commit 3f11e51fbb
7 changed files with 73 additions and 48 deletions

View File

@ -189,7 +189,8 @@ else
Header('Location: index.php'); Header('Location: index.php');
} }
$db->close();
llxFooter(); llxFooter();
$db->close();
?> ?>

View File

@ -132,8 +132,9 @@ class doc_generic_invoice_odt extends ModelePDFFactures
/** /**
* Define array with couple substitution key => substitution value * Define array with couple substitution key => substitution value
* *
* @param $line * @param array $line Array of lines
* @param $outputlangs Lang object to use for output * @param Translate $outputlangs Lang object to use for output
* @return array Return substitution array
*/ */
function get_substitutionarray_lines($line,$outputlangs) function get_substitutionarray_lines($line,$outputlangs)
{ {
@ -159,8 +160,8 @@ class doc_generic_invoice_odt extends ModelePDFFactures
/** /**
* Return description of a module * Return description of a module
* *
* @param langs Lang object to use for output * @param Translate $langs Lang object to use for output
* @return string Description * @return string Description
*/ */
function info($langs) function info($langs)
{ {
@ -350,11 +351,14 @@ class doc_generic_invoice_odt extends ModelePDFFactures
// Open and load template // Open and load template
require_once(ODTPHP_PATH.'odf.php'); require_once(ODTPHP_PATH.'odf.php');
$odfHandler = new odf($srctemplatepath, array( $odfHandler = new odf(
$srctemplatepath,
array(
'PATH_TO_TMP' => $conf->facture->dir_temp, 'PATH_TO_TMP' => $conf->facture->dir_temp,
'ZIP_PROXY' => 'PclZipProxy', // PhpZipProxy or PclZipProxy. Got "bad compression method" error when using PhpZipProxy. 'ZIP_PROXY' => 'PclZipProxy', // PhpZipProxy or PclZipProxy. Got "bad compression method" error when using PhpZipProxy.
'DELIMITER_LEFT' => '{', 'DELIMITER_LEFT' => '{',
'DELIMITER_RIGHT' => '}') 'DELIMITER_RIGHT' => '}'
)
); );
// After construction $odfHandler->contentXml contains content and // After construction $odfHandler->contentXml contains content and
// [!-- BEGIN row.lines --]*[!-- END row.lines --] has been replaced by // [!-- BEGIN row.lines --]*[!-- END row.lines --] has been replaced by

View File

@ -446,11 +446,11 @@ class pdf_crabe extends ModelePDFFactures
/** /**
* Show payments table * Show payments table
* *
* @param pdf Object PDF * @param PDF &$pdf Object PDF
* @param object Object invoice * @param Object $object Object invoice
* @param posy Position y in PDF * @param int $posy Position y in PDF
* @param outputlangs Object langs for output * @param Translate $outputlangs Object langs for output
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
function _tableau_versements(&$pdf, $object, $posy, $outputlangs) function _tableau_versements(&$pdf, $object, $posy, $outputlangs)
{ {

View File

@ -332,12 +332,13 @@ class pdf_oursin extends ModelePDFFactures
/** /**
* \brief Affiche tableau des versement * Show payments table
* \param pdf Objet PDF *
* \param fac Objet facture * @param PDF &$pdf Object PDF
* \param posy Position y in PDF * @param Object $object Object invoice
* \param outputlangs Object langs for output * @param int $posy Position y in PDF
* \return int <0 if KO, >0 if OK * @param Translate $outputlangs Object langs for output
* @return int <0 if KO, >0 if OK
*/ */
function _tableau_versements(&$pdf, $object, $posy, $outputlangs) function _tableau_versements(&$pdf, $object, $posy, $outputlangs)
{ {

View File

@ -107,11 +107,13 @@ class mod_facture_mercure extends ModeleNumRefFactures
return $numExample; return $numExample;
} }
/** Return next value /**
* @param objsoc Object third party * Return next value
* @param facture Object invoice *
* @param mode 'next' for next value or 'last' for last value * @param objsoc Object third party
* @return string Value if OK, 0 if KO * @param facture Object invoice
* @param mode 'next' for next value or 'last' for last value
* @return string Value if OK, 0 if KO
*/ */
function getNextValue($objsoc,$facture,$mode='next') function getNextValue($objsoc,$facture,$mode='next')
{ {
@ -140,11 +142,13 @@ class mod_facture_mercure extends ModeleNumRefFactures
} }
/** Return next free value /**
* @param objsoc Object third party * Return next free value
* @param objforref Object for number to search *
* @param mode 'next' for next value or 'last' for last value * @param Societe $objsoc Object third party
* @return string Next free value * @param string $objforref Object for number to search
* @param string $mode 'next' for next value or 'last' for last value
* @return string Next free value
*/ */
function getNumRef($objsoc,$objforref,$mode='next') function getNumRef($objsoc,$objforref,$mode='next')
{ {

View File

@ -115,6 +115,7 @@ class mod_facture_terre extends ModeleNumRefFactures
} }
/** Return next value not used or last value used /** Return next value not used or last value used
*
* @param objsoc Object third party * @param objsoc Object third party
* @param facture Object invoice * @param facture Object invoice
* @param mode 'next' for next value or 'last' for last value * @param mode 'next' for next value or 'last' for last value
@ -181,11 +182,13 @@ class mod_facture_terre extends ModeleNumRefFactures
else dol_print_error('','Bad parameter for getNextValue'); else dol_print_error('','Bad parameter for getNextValue');
} }
/** Return next free value /**
* @param objsoc Object third party * Return next free value
* @param objforref Object for number to search *
* @param mode 'next' for next value or 'last' for last value * @param Societe $objsoc Object third party
* @return string Next free value * @param string $objforref Object for number to search
* @param string $mode 'next' for next value or 'last' for last value
* @return string Next free value
*/ */
function getNumRef($objsoc,$objforref,$mode='next') function getNumRef($objsoc,$objforref,$mode='next')
{ {

View File

@ -68,16 +68,20 @@ abstract class ModeleNumRefFactures
{ {
var $error=''; var $error='';
/** 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() function isEnabled()
{ {
return true; return true;
} }
/** 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() function info()
{ {
@ -86,8 +90,10 @@ abstract class ModeleNumRefFactures
return $langs->trans("NoDescription"); return $langs->trans("NoDescription");
} }
/** Renvoi un exemple de numerotation /**
* @return string Example * Renvoi un exemple de numerotation
*
* @return string Example
*/ */
function getExample() function getExample()
{ {
@ -96,19 +102,23 @@ abstract class ModeleNumRefFactures
return $langs->trans("NoExample"); return $langs->trans("NoExample");
} }
/** Test si les numeros deja en vigueur dans la base ne provoquent pas /**
* de conflits qui empecheraient cette numerotation de fonctionner. * Test si les numeros deja en vigueur dans la base ne provoquent pas
* @return boolean false si conflit, true si ok * de conflits qui empecheraient cette numerotation de fonctionner.
*
* @return boolean false si conflit, true si ok
*/ */
function canBeActivated() function canBeActivated()
{ {
return true; return true;
} }
/** Renvoi prochaine valeur attribuee /**
* @param objsoc Objet societe * Renvoi prochaine valeur attribuee
* @param facture Objet facture *
* @return string Valeur * @param objsoc Objet societe
* @param facture Objet facture
* @return string Valeur
*/ */
function getNextValue($objsoc,$facture) function getNextValue($objsoc,$facture)
{ {
@ -116,8 +126,10 @@ abstract class ModeleNumRefFactures
return $langs->trans("NotAvailable"); return $langs->trans("NotAvailable");
} }
/** Renvoi version du modele de numerotation /**
* @return string Valeur * Renvoi version du modele de numerotation
*
* @return string Valeur
*/ */
function getVersion() function getVersion()
{ {