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

This commit is contained in:
Laurent Destailleur 2020-11-18 18:13:18 +01:00
commit 450861df7a
3 changed files with 31 additions and 10 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)) {

View File

@ -207,7 +207,8 @@ if ($action == 'valid' && $user->rights->facture->creer)
dol_htmloutput_errors($langs->trans("InvoiceIsAlreadyValidated", "TakePos"), null, 1); dol_htmloutput_errors($langs->trans("InvoiceIsAlreadyValidated", "TakePos"), null, 1);
} }
} elseif (count($invoice->lines) == 0) { } elseif (count($invoice->lines) == 0) {
dol_syslog("Sale without lines"); $error++;
dol_syslog('Sale without lines');
dol_htmloutput_errors($langs->trans("NoLinesToBill", "TakePos"), null, 1); dol_htmloutput_errors($langs->trans("NoLinesToBill", "TakePos"), null, 1);
} elseif (!empty($conf->stock->enabled) && $conf->global->$constantforkey != "1") { } elseif (!empty($conf->stock->enabled) && $conf->global->$constantforkey != "1") {
$savconst = $conf->global->STOCK_CALCULATE_ON_BILL; $savconst = $conf->global->STOCK_CALCULATE_ON_BILL;