Merge remote-tracking branch 'upstream/develop' into develop

# Conflicts:
#	htdocs/product/class/product.class.php
This commit is contained in:
Juanjo Menent 2018-10-15 13:40:42 +02:00
commit 194b3478f3
2 changed files with 115 additions and 113 deletions

View File

@ -4116,16 +4116,16 @@ class Facture extends CommonInvoice
$langs->load("bills"); $langs->load("bills");
if (! dol_strlen($modele)) { if (! dol_strlen($modele))
{
$modele = 'crabe'; $modele = 'crabe';
$thisTypeConfName = 'FACTURE_ADDON_PDF_'.$type; $thisTypeConfName = 'FACTURE_ADDON_PDF_'.$this->type;
if ($this->modelpdf) { if ($this->modelpdf) {
$modele = $this->modelpdf; $modele = $this->modelpdf;
}elseif (! empty($conf->global->{'FACTURE_ADDON_PDF_'.$this->type})){ } elseif (! empty($conf->global->$thisTypeConfName)) {
$modele = $conf->global->{'FACTURE_ADDON_PDF_'.$this->type} ; $modele = $conf->global->$thisTypeConfName;
}elseif (! empty($conf->global->FACTURE_ADDON_PDF)) { } elseif (! empty($conf->global->FACTURE_ADDON_PDF)) {
$modele = $conf->global->FACTURE_ADDON_PDF; $modele = $conf->global->FACTURE_ADDON_PDF;
} }
} }

View File

@ -299,7 +299,7 @@ class Product extends CommonObject
/** /**
* @deprecated * @deprecated
* @see ref_supplier * @see $ref_supplier
*/ */
public $ref_fourn; public $ref_fourn;
public $ref_supplier; public $ref_supplier;
@ -3282,7 +3282,7 @@ class Product extends CommonObject
* *
* @param int $fromId Id product source * @param int $fromId Id product source
* @param int $toId Id product target * @param int $toId Id product target
* @return nt < 0 if KO, > 0 if OK * @return int < 0 if KO, > 0 if OK
*/ */
function clone_price($fromId, $toId) function clone_price($fromId, $toId)
{ {
@ -4025,7 +4025,7 @@ class Product extends CommonObject
* 'warehouseclosed' = Load stock from closed warehouses only, * 'warehouseclosed' = Load stock from closed warehouses only,
* 'warehouseinternal' = Load stock from warehouses for internal correction/transfer only * 'warehouseinternal' = Load stock from warehouses for internal correction/transfer only
* @return int < 0 if KO, > 0 if OK * @return int < 0 if KO, > 0 if OK
* @see load_virtual_stock, getBatchInfo * @see load_virtual_stock(), loadBatchInfo()
*/ */
function load_stock($option='') function load_stock($option='')
{ {
@ -4100,7 +4100,7 @@ class Product extends CommonObject
* This function need a lot of load. If you use it on list, use a cache to execute it one for each product id. * This function need a lot of load. If you use it on list, use a cache to execute it one for each product id.
* *
* @return int < 0 if KO, > 0 if OK * @return int < 0 if KO, > 0 if OK
* @see load_stock, getBatchInfo * @see load_stock(), loadBatchInfo()
*/ */
function load_virtual_stock() function load_virtual_stock()
{ {
@ -4165,6 +4165,8 @@ class Product extends CommonObject
// Note that $action and $object may have been modified by some hooks // Note that $action and $object may have been modified by some hooks
$reshook=$hookmanager->executeHooks('loadvirtualstock', $parameters, $this, $action); $reshook=$hookmanager->executeHooks('loadvirtualstock', $parameters, $this, $action);
if ($reshook > 0) $this->stock_theorique = $hookmanager->resArray['stock_theorique']; if ($reshook > 0) $this->stock_theorique = $hookmanager->resArray['stock_theorique'];
return 1;
} }
@ -4173,7 +4175,7 @@ class Product extends CommonObject
* *
* @param string $batch Lot/serial number * @param string $batch Lot/serial number
* @return array Array with record into product_batch * @return array Array with record into product_batch
* @see load_stock, load_virtual_stock * @see load_stock(), load_virtual_stock()
*/ */
function loadBatchInfo($batch) function loadBatchInfo($batch)
{ {