Merge remote-tracking branch 'origin/3.7' into develop

Conflicts:
	htdocs/admin/tools/eaccelerator.php
	htdocs/fourn/class/fournisseur.commande.class.php
	htdocs/fourn/commande/dispatch.php
This commit is contained in:
Laurent Destailleur
2015-02-19 00:01:26 +01:00
123 changed files with 534 additions and 427 deletions

View File

@@ -158,7 +158,6 @@ class Commande extends CommonOrder
}
$obj = new $classname();
$numref = "";
$numref = $obj->getNextValue($soc,$this);
if ($numref != "")
@@ -1078,19 +1077,19 @@ class Commande extends CommonOrder
* Add an order line into database (linked to product/service or not)
*
* @param string $desc Description of line
* @param double $pu_ht Unit price (without tax)
* @param double $qty Quantite
* @param double $txtva Taux de tva force, sinon -1
* @param double $txlocaltax1 Local tax 1 rate
* @param double $txlocaltax2 Local tax 2 rate
* @param float $pu_ht Unit price (without tax)
* @param float $qty Quantite
* @param float $txtva Taux de tva force, sinon -1
* @param float $txlocaltax1 Local tax 1 rate
* @param float $txlocaltax2 Local tax 2 rate
* @param int $fk_product Id du produit/service predefini
* @param double $remise_percent Pourcentage de remise de la ligne
* @param float $remise_percent Pourcentage de remise de la ligne
* @param int $info_bits Bits de type de lignes
* @param int $fk_remise_except Id remise
* @param string $price_base_type HT or TTC
* @param double $pu_ttc Prix unitaire TTC
* @param timestamp $date_start Start date of the line - Added by Matelli (See http://matelli.fr/showcases/patchs-dolibarr/add-dates-in-order-lines.html)
* @param timestamp $date_end End date of the line - Added by Matelli (See http://matelli.fr/showcases/patchs-dolibarr/add-dates-in-order-lines.html)
* @param float $pu_ttc Prix unitaire TTC
* @param int $date_start Start date of the line - Added by Matelli (See http://matelli.fr/showcases/patchs-dolibarr/add-dates-in-order-lines.html)
* @param int $date_end End date of the line - Added by Matelli (See http://matelli.fr/showcases/patchs-dolibarr/add-dates-in-order-lines.html)
* @param int $type Type of line (0=product, 1=service)
* @param int $rang Position of line
* @param int $special_code Special code (also used by externals modules!)
@@ -1284,16 +1283,16 @@ class Commande extends CommonOrder
* $this->client must be loaded
*
* @param int $idproduct Product Id
* @param double $qty Quantity
* @param double $remise_percent Product discount relative
* @param timestamp $date_start Start date of the line - Added by Matelli (See http://matelli.fr/showcases/patchs-dolibarr/add-dates-in-order-lines.html)
* @param timestamp $date_end End date of the line - Added by Matelli (See http://matelli.fr/showcases/patchs-dolibarr/add-dates-in-order-lines.html)
* @param float $qty Quantity
* @param float $remise_percent Product discount relative
* @param int $date_start Start date of the line - Added by Matelli (See http://matelli.fr/showcases/patchs-dolibarr/add-dates-in-order-lines.html)
* @param int $date_end End date of the line - Added by Matelli (See http://matelli.fr/showcases/patchs-dolibarr/add-dates-in-order-lines.html)
* @return void
*
* TODO Remplacer les appels a cette fonction par generation objet Ligne
* insere dans tableau $this->products
*/
function add_product($idproduct, $qty, $remise_percent=0, $date_start='', $date_end='')
function add_product($idproduct, $qty, $remise_percent=0.0, $date_start='', $date_end='')
{
global $conf, $mysoc;
@@ -1691,7 +1690,6 @@ class Commande extends CommonOrder
*/
function loadExpeditions($filtre_statut=-1)
{
$num=0;
$this->expeditions = array();
$sql = 'SELECT cd.rowid, cd.fk_product,';
@@ -1960,7 +1958,7 @@ class Commande extends CommonOrder
* Set the order date
*
* @param User $user Object user making change
* @param timestamp $date Date
* @param int $date Date
* @return int <0 if KO, >0 if OK
*/
function set_date($user, $date)
@@ -1994,7 +1992,7 @@ class Commande extends CommonOrder
* Set the planned delivery date
*
* @param User $user Objet utilisateur qui modifie
* @param timestamp $date_livraison Date de livraison
* @param int $date_livraison Date de livraison
* @return int <0 si ko, >0 si ok
*/
function set_date_livraison($user, $date_livraison)
@@ -2323,16 +2321,16 @@ class Commande extends CommonOrder
*
* @param int $rowid Id of line to update
* @param string $desc Description de la ligne
* @param double $pu Prix unitaire
* @param double $qty Quantity
* @param double $remise_percent Pourcentage de remise de la ligne
* @param double $txtva Taux TVA
* @param double $txlocaltax1 Local tax 1 rate
* @param double $txlocaltax2 Local tax 2 rate
* @param float $pu Prix unitaire
* @param float $qty Quantity
* @param float $remise_percent Pourcentage de remise de la ligne
* @param float $txtva Taux TVA
* @param float $txlocaltax1 Local tax 1 rate
* @param float $txlocaltax2 Local tax 2 rate
* @param string $price_base_type HT or TTC
* @param int $info_bits Miscellaneous informations on line
* @param timestamp $date_start Start date of the line
* @param timestamp $date_end End date of the line
* @param int $date_start Start date of the line
* @param int $date_end End date of the line
* @param int $type Type of line (0=product, 1=service)
* @param int $fk_parent_line Id of parent line (0 in most cases, used by modules adding sublevels into lines).
* @param int $skip_update_total Keep fields total_xxx to 0 (used for special lines by some modules)
@@ -2343,7 +2341,7 @@ class Commande extends CommonOrder
* @param array $array_option extrafields array
* @return int < 0 if KO, > 0 if OK
*/
function updateline($rowid, $desc, $pu, $qty, $remise_percent, $txtva, $txlocaltax1=0,$txlocaltax2=0, $price_base_type='HT', $info_bits=0, $date_start='', $date_end='', $type=0, $fk_parent_line=0, $skip_update_total=0, $fk_fournprice=null, $pa_ht=0, $label='', $special_code=0, $array_option=0)
function updateline($rowid, $desc, $pu, $qty, $remise_percent, $txtva, $txlocaltax1=0.0,$txlocaltax2=0.0, $price_base_type='HT', $info_bits=0, $date_start='', $date_end='', $type=0, $fk_parent_line=0, $skip_update_total=0, $fk_fournprice=null, $pa_ht=0, $label='', $special_code=0, $array_option=0)
{
global $conf, $mysoc;
@@ -2577,6 +2575,8 @@ class Commande extends CommonOrder
*/
function update_extrafields($user)
{
global $hookmanager, $conf;
$action='create';
// Actions on extra fields (by external module or standard code)
@@ -3187,7 +3187,7 @@ class Commande extends CommonOrder
*/
public function generateDocument($modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0)
{
global $conf,$user,$langs,$hookmanager;
global $conf,$langs;
$langs->load("orders");