Skip to content

Commit

Permalink
Merge branch 'develop' of git+ssh://git@github.com/Dolibarr/dolibarr.…
Browse files Browse the repository at this point in the history
…git into develop
  • Loading branch information
hregis committed Mar 16, 2012
2 parents dae2044 + 6ae4292 commit ae54a22
Show file tree
Hide file tree
Showing 8 changed files with 53 additions and 43 deletions.
17 changes: 11 additions & 6 deletions htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php
Expand Up @@ -122,8 +122,9 @@ function get_substitutionarray_object($object,$outputlangs)
/**
* Define array with couple substitution key => substitution value
*
* @param array $line
* @param Translate $outputlangs Lang object to use for output
* @param array $line Array of lines
* @param Translate $outputlangs Lang object to use for output
* @return array Return a substitution array
*/
function get_substitutionarray_lines($line,$outputlangs)
{
Expand All @@ -148,8 +149,9 @@ function get_substitutionarray_lines($line,$outputlangs)

/**
* 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)
{
Expand Down Expand Up @@ -339,11 +341,14 @@ function write_file($object,$outputlangs,$srctemplatepath)

// Open and load template
require_once(ODTPHP_PATH.'odf.php');
$odfHandler = new odf($srctemplatepath, array(
$odfHandler = new odf(
$srctemplatepath,
array(
'PATH_TO_TMP' => $conf->commande->dir_temp,
'ZIP_PROXY' => 'PclZipProxy', // PhpZipProxy or PclZipProxy. Got "bad compression method" error when using PhpZipProxy.
'DELIMITER_LEFT' => '{',
'DELIMITER_RIGHT' => '}')
'DELIMITER_RIGHT' => '}'
)
);
// After construction $odfHandler->contentXml contains content and
// [!-- BEGIN row.lines --]*[!-- END row.lines --] has been replaced by
Expand Down
14 changes: 7 additions & 7 deletions htdocs/core/modules/commande/doc/pdf_einstein.modules.php
Expand Up @@ -61,7 +61,7 @@ class pdf_einstein extends ModelePDFCommandes
/**
* Constructor
*
* @param DoliDB $DB Database handler
* @param DoliDB $db Database handler
*/
function __construct($db)
{
Expand Down Expand Up @@ -438,13 +438,13 @@ function write_file($object,$outputlangs,$srctemplatepath='',$hidedetails=0,$hid
}

/**
* Affiche tableau des versement
* Affiche tableau des versement
*
* @param pdf Object PDF
* @param object Object order
* @param posy Position y in PDF
* @param outputlangs Object langs for output
* @return int <0 if KO, >0 if OK
* @param PDF &$pdf Object PDF
* @param Object $object Object order
* @param int $posy Position y in PDF
* @param Translate $outputlangs Object langs for output
* @return int <0 if KO, >0 if OK
*/
function _tableau_versements(&$pdf, $object, $posy, $outputlangs)
{
Expand Down
14 changes: 8 additions & 6 deletions htdocs/core/modules/commande/mod_commande_marbre.php
Expand Up @@ -99,7 +99,7 @@ function canBeActivated()
* @param Object $object Object we need next value for
* @return string Value if KO, <0 if KO
*/
function getNextValue($objsoc,$commande)
function getNextValue($objsoc,$object)
{
global $db,$conf;

Expand All @@ -124,7 +124,7 @@ function getNextValue($objsoc,$commande)
}

//$date=time();
$date=$commande->date;
$date=$object->date;
$yymm = strftime("%y%m",$date);
$num = sprintf("%04s",$max+1);

Expand All @@ -133,10 +133,12 @@ function getNextValue($objsoc,$commande)
}


/** \brief Return next free value
* \param objsoc Object third party
* \param objforref Object for number to search
* \return string Next free value
/**
* Return 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)
{
Expand Down
16 changes: 9 additions & 7 deletions htdocs/core/modules/commande/mod_commande_saphir.php
Expand Up @@ -107,7 +107,7 @@ function getExample()
* @param Object $object Object we need next value for
* @return string Value if KO, <0 if KO
*/
function getNextValue($objsoc,$commande)
function getNextValue($objsoc,$object)
{
global $db,$conf;

Expand All @@ -122,17 +122,19 @@ function getNextValue($objsoc,$commande)
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;
}


/** \brief Return next free value
* \param objsoc Object third party
* \param objforref Object for number to search
* \return string Next free value
*/
/**
* Return 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)
{
return $this->getNextValue($objsoc,$objforref);
Expand Down
14 changes: 7 additions & 7 deletions htdocs/core/modules/contract/mod_contract_magre.php
Expand Up @@ -93,9 +93,9 @@ function getExample()
/**
* Return next value
*
* @param objsoc third party object
* @param contract contract object
* @return string Value if OK, 0 if KO
* @param Societe $objsoc third party object
* @param Object $contract contract object
* @return string Value if OK, 0 if KO
*/
function getNextValue($objsoc,$contract)
{
Expand All @@ -117,11 +117,11 @@ function getNextValue($objsoc,$contract)
}

/**
* Return next free value
* Return next value
*
* @param objsoc Object third party
* @param objforref Object for number to search
* @return string Next free value
* @param Societe $objsoc third party object
* @param Object $objforref contract object
* @return string Value if OK, 0 if KO
*/
function contract_get_num($objsoc,$objforref)
{
Expand Down
14 changes: 7 additions & 7 deletions htdocs/core/modules/contract/mod_contract_serpis.php
Expand Up @@ -93,9 +93,9 @@ function canBeActivated()
/**
* Return next value
*
* @param objsoc third party object
* @param contract contract object
* @return string Value if OK, 0 if KO
* @param Societe $objsoc third party object
* @param Object $contract contract object
* @return string Value if OK, 0 if KO
*/
function getNextValue($objsoc,$contract)
{
Expand Down Expand Up @@ -130,11 +130,11 @@ function getNextValue($objsoc,$contract)


/**
* Return next free value
* Return next value
*
* @param objsoc Object third party
* @param objforref Object for number to search
* @return string Next free value
* @param Societe $objsoc third party object
* @param Object $objforref contract object
* @return string Value if OK, 0 if KO
*/
function contract_get_num($objsoc,$objforref)
{
Expand Down
4 changes: 2 additions & 2 deletions htdocs/install/mysql/data/llx_20_c_departements.sql
Expand Up @@ -5,7 +5,7 @@
-- Copyright (C) 2004 Guillaume Delecourt <guillaume.delecourt@opensides.be>
-- Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
-- 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
-- it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -423,7 +423,7 @@ INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, nc

-- 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 ('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 ('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);
Expand Down
3 changes: 2 additions & 1 deletion htdocs/install/mysql/migration/3.1.0-3.2.0.sql
Expand Up @@ -433,4 +433,5 @@ ALTER TABLE llx_product_fournisseur_price DROP INDEX idx_product_fournisseur_pri
--We keep column for the moment because we must not loose data if migrate process fails (upgrade2) to allow a second chance fix. We will delete it at next version.
--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;


UPDATE llx_c_departements SET ncc='JUJUY', nom = 'Jujuy' WHERE code_departement='2302' and fk_region='2301';

0 comments on commit ae54a22

Please sign in to comment.