Merge pull request #15429 from fappels/13_doc

Fix supplier barcode should be same in fetch and fetch list.
This commit is contained in:
Laurent Destailleur 2020-11-18 18:08:35 +01:00 committed by GitHub
commit 745cae3f8b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 29 additions and 9 deletions

View File

@ -182,13 +182,10 @@ class Commande extends CommonOrder
/** /**
* @var int Date expected for delivery * @var int Date expected for delivery
* @deprecated Use delivery_date instead. * @deprecated
*/ */
public $date_livraison; public $date_livraison; // deprecated; Use delivery_date instead.
/**
* @var int Date expected for delivery
*/
public $delivery_date; // Date expected of shipment (date starting shipment, not the reception that occurs some days after) public $delivery_date; // Date expected of shipment (date starting shipment, not the reception that occurs some days after)
/** /**

View File

@ -104,6 +104,29 @@ class ProductFournisseur extends Product
public $fourn_multicurrency_price; public $fourn_multicurrency_price;
public $fourn_multicurrency_unitprice; public $fourn_multicurrency_unitprice;
/**
* @deprecated
* @see $supplier_barcode
*/
public $fourn_barcode;
/**
* @var string $supplier_barcode - Supplier barcode
*/
public $supplier_barcode;
/**
* @deprecated
* @see $supplier_fk_barcode_type
*/
public $fourn_fk_barcode_type;
/**
* @var string $supplier_fk_barcode_type - Supplier barcode type
*/
public $supplier_fk_barcode_type;
/** /**
* Constructor * Constructor
* *
@ -118,8 +141,6 @@ class ProductFournisseur extends Product
$this->reputations = array('-1'=>'', 'FAVORITE'=>$langs->trans('Favorite'), 'NOTTHGOOD'=>$langs->trans('NotTheGoodQualitySupplier'), 'DONOTORDER'=>$langs->trans('DoNotOrderThisProductToThisSupplier')); $this->reputations = array('-1'=>'', 'FAVORITE'=>$langs->trans('Favorite'), 'NOTTHGOOD'=>$langs->trans('NotTheGoodQualitySupplier'), 'DONOTORDER'=>$langs->trans('DoNotOrderThisProductToThisSupplier'));
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/** /**
* Remove all prices for this couple supplier-product * Remove all prices for this couple supplier-product
@ -537,8 +558,10 @@ class ProductFournisseur extends Product
$this->fourn_multicurrency_id = $obj->fk_multicurrency; $this->fourn_multicurrency_id = $obj->fk_multicurrency;
$this->fourn_multicurrency_code = $obj->multicurrency_code; $this->fourn_multicurrency_code = $obj->multicurrency_code;
if ($conf->barcode->enabled) { if ($conf->barcode->enabled) {
$this->fourn_barcode = $obj->barcode; $this->fourn_barcode = $obj->barcode; // deprecated
$this->fourn_fk_barcode_type = $obj->fk_barcode_type; $this->fourn_fk_barcode_type = $obj->barcode; // deprecated
$this->supplier_barcode = $obj->barcode;
$this->supplier_fk_barcode_type = $obj->fk_barcode_type;
} }
if (!empty($conf->global->PRODUCT_USE_SUPPLIER_PACKAGING)) { if (!empty($conf->global->PRODUCT_USE_SUPPLIER_PACKAGING)) {