Merge branch 'develop' of git+ssh://git@github.com/Dolibarr/dolibarr.git into develop

This commit is contained in:
Regis Houssin 2012-03-16 09:39:45 +01:00
commit ae54a229fb
8 changed files with 53 additions and 43 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,7 +149,8 @@ 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 *
* @param Translate $langs Lang object to use for output
* @return string Description * @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)
{ {
@ -440,10 +440,10 @@ 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,16 +122,18 @@ 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)
{ {

View File

@ -93,8 +93,8 @@ class mod_contract_magre extends ModelNumRefContracts
/** /**
* Return next value * Return next value
* *
* @param objsoc third party object * @param Societe $objsoc third party object
* @param contract contract object * @param Object $contract contract object
* @return string Value if OK, 0 if KO * @return string Value if OK, 0 if KO
*/ */
function getNextValue($objsoc,$contract) function getNextValue($objsoc,$contract)
@ -117,11 +117,11 @@ class mod_contract_magre extends ModelNumRefContracts
} }
/** /**
* Return next free value * Return next value
* *
* @param objsoc Object third party * @param Societe $objsoc third party object
* @param objforref Object for number to search * @param Object $objforref contract object
* @return string Next free value * @return string Value if OK, 0 if KO
*/ */
function contract_get_num($objsoc,$objforref) function contract_get_num($objsoc,$objforref)
{ {

View File

@ -93,8 +93,8 @@ class mod_contract_serpis extends ModelNumRefContracts
/** /**
* Return next value * Return next value
* *
* @param objsoc third party object * @param Societe $objsoc third party object
* @param contract contract object * @param Object $contract contract object
* @return string Value if OK, 0 if KO * @return string Value if OK, 0 if KO
*/ */
function getNextValue($objsoc,$contract) function getNextValue($objsoc,$contract)
@ -130,11 +130,11 @@ class mod_contract_serpis extends ModelNumRefContracts
/** /**
* Return next free value * Return next value
* *
* @param objsoc Object third party * @param Societe $objsoc third party object
* @param objforref Object for number to search * @param Object $objforref contract object
* @return string Next free value * @return string Value if OK, 0 if KO
*/ */
function contract_get_num($objsoc,$objforref) function contract_get_num($objsoc,$objforref)
{ {

View File

@ -5,7 +5,7 @@
-- Copyright (C) 2004 Guillaume Delecourt <guillaume.delecourt@opensides.be> -- Copyright (C) 2004 Guillaume Delecourt <guillaume.delecourt@opensides.be>
-- Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr> -- Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
-- Copyright (C) 2007 Patrick Raguin <patrick.raguin@gmail.com> -- Copyright (C) 2007 Patrick Raguin <patrick.raguin@gmail.com>
-- Copyright (C) 2010-2011 Juanjo Menent <jmenent@2byte.es> -- Copyright (C) 2010-2012 Juanjo Menent <jmenent@2byte.es>
-- --
-- This program is free software; you can redistribute it and/or modify -- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by -- it under the terms of the GNU General Public License as published by
@ -423,7 +423,7 @@ INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, nc
-- Provinces Argentina (id country=23) -- Provinces Argentina (id country=23)
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('2301', 2301, '', 0, 'CATAMARCA', 'Catamarca', 1); INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('2301', 2301, '', 0, 'CATAMARCA', 'Catamarca', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('2302', 2301, '', 0, 'YUJUY', 'Yujuy', 1); INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('2302', 2301, '', 0, 'JUJUY', 'Jujuy', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('2303', 2301, '', 0, 'TUCAMAN', 'Tucamán', 1); INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('2303', 2301, '', 0, 'TUCAMAN', 'Tucamán', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('2304', 2301, '', 0, 'SANTIAGO DEL ESTERO', 'Santiago del Estero', 1); INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('2304', 2301, '', 0, 'SANTIAGO DEL ESTERO', 'Santiago del Estero', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('2305', 2301, '', 0, 'SALTA', 'Salta', 1); INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('2305', 2301, '', 0, 'SALTA', 'Salta', 1);

View File

@ -434,3 +434,4 @@ ALTER TABLE llx_product_fournisseur_price DROP INDEX idx_product_fournisseur_pri
--ALTER TABLE llx_product_fournisseur_price DROP COLUMN fk_product_fournisseur; --ALTER TABLE llx_product_fournisseur_price DROP COLUMN fk_product_fournisseur;
ALTER TABLE llx_product_fournisseur_price ADD COLUMN tva_tx double(6,3) NOT NULL DEFAULT 0 AFTER unitprice; ALTER TABLE llx_product_fournisseur_price ADD COLUMN tva_tx double(6,3) NOT NULL DEFAULT 0 AFTER unitprice;
UPDATE llx_c_departements SET ncc='JUJUY', nom = 'Jujuy' WHERE code_departement='2302' and fk_region='2301';