This commit is contained in:
Laurent Destailleur 2012-03-16 09:34:19 +01:00
parent 245edb8596
commit 6e864bc992
4 changed files with 35 additions and 26 deletions

View File

@ -122,8 +122,9 @@ class doc_generic_order_odt extends ModelePDFCommandes
/** /**
* Define array with couple substitution key => substitution value * Define array with couple substitution key => substitution value
* *
* @param array $line * @param array $line Array of lines
* @param Translate $outputlangs Lang object to use for output * @param Translate $outputlangs Lang object to use for output
* @return array Return a substitution array
*/ */
function get_substitutionarray_lines($line,$outputlangs) function get_substitutionarray_lines($line,$outputlangs)
{ {
@ -148,8 +149,9 @@ class doc_generic_order_odt extends ModelePDFCommandes
/** /**
* Return description of a module * Return description of a module
* @param langs Lang object to use for output *
* @return string Description * @param Translate $langs Lang object to use for output
* @return string Description
*/ */
function info($langs) function info($langs)
{ {
@ -339,11 +341,14 @@ class doc_generic_order_odt extends ModelePDFCommandes
// 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->commande->dir_temp, 'PATH_TO_TMP' => $conf->commande->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

@ -61,7 +61,7 @@ class pdf_einstein extends ModelePDFCommandes
/** /**
* Constructor * Constructor
* *
* @param DoliDB $DB Database handler * @param DoliDB $db Database handler
*/ */
function __construct($db) function __construct($db)
{ {
@ -438,13 +438,13 @@ class pdf_einstein extends ModelePDFCommandes
} }
/** /**
* Affiche tableau des versement * Affiche tableau des versement
* *
* @param pdf Object PDF * @param PDF &$pdf Object PDF
* @param object Object order * @param Object $object Object order
* @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

@ -99,7 +99,7 @@ class mod_commande_marbre extends ModeleNumRefCommandes
* @param Object $object Object we need next value for * @param Object $object Object we need next value for
* @return string Value if KO, <0 if KO * @return string Value if KO, <0 if KO
*/ */
function getNextValue($objsoc,$commande) function getNextValue($objsoc,$object)
{ {
global $db,$conf; global $db,$conf;
@ -124,7 +124,7 @@ class mod_commande_marbre extends ModeleNumRefCommandes
} }
//$date=time(); //$date=time();
$date=$commande->date; $date=$object->date;
$yymm = strftime("%y%m",$date); $yymm = strftime("%y%m",$date);
$num = sprintf("%04s",$max+1); $num = sprintf("%04s",$max+1);
@ -133,10 +133,12 @@ class mod_commande_marbre extends ModeleNumRefCommandes
} }
/** \brief Return next free value /**
* \param objsoc Object third party * Return next free value
* \param objforref Object for number to search *
* \return string Next free value * @param Societe $objsoc Object third party
* @param string $objforref Object for number to search
* @return string Next free value
*/ */
function commande_get_num($objsoc,$objforref) function commande_get_num($objsoc,$objforref)
{ {

View File

@ -107,7 +107,7 @@ class mod_commande_saphir extends ModeleNumRefCommandes
* @param Object $object Object we need next value for * @param Object $object Object we need next value for
* @return string Value if KO, <0 if KO * @return string Value if KO, <0 if KO
*/ */
function getNextValue($objsoc,$commande) function getNextValue($objsoc,$object)
{ {
global $db,$conf; global $db,$conf;
@ -122,17 +122,19 @@ class mod_commande_saphir extends ModeleNumRefCommandes
return 0; return 0;
} }
$numFinal=get_next_value($db,$mask,'commande','ref','',$objsoc->code_client,$commande->date); $numFinal=get_next_value($db,$mask,'commande','ref','',$objsoc->code_client,$object->date);
return $numFinal; return $numFinal;
} }
/** \brief Return next free value /**
* \param objsoc Object third party * Return next free value
* \param objforref Object for number to search *
* \return string Next free value * @param Societe $objsoc Object third party
*/ * @param string $objforref Object for number to search
* @return string Next free value
*/
function commande_get_num($objsoc,$objforref) function commande_get_num($objsoc,$objforref)
{ {
return $this->getNextValue($objsoc,$objforref); return $this->getNextValue($objsoc,$objforref);