Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
8ca7e6744e
@ -124,7 +124,7 @@ class box_services_contracts extends ModeleBoxes
|
||||
$contractlinestatic->label = $objp->label;
|
||||
$contractlinestatic->description = $objp->description;
|
||||
$contractlinestatic->type = $objp->type;
|
||||
$contractlinestatic->product_id = $objp->product_id;
|
||||
$contractlinestatic->fk_product = $objp->product_id;
|
||||
$contractlinestatic->product_ref = $objp->product_ref;
|
||||
$contractlinestatic->product_type = $objp->product_type;
|
||||
$contractlinestatic->statut = $objp->contractline_status;
|
||||
|
||||
@ -1942,7 +1942,7 @@ class ExtraFields
|
||||
* Return HTML string to print separator extrafield
|
||||
*
|
||||
* @param string $key Key of attribute
|
||||
* @param string $object Object
|
||||
* @param object $object Object
|
||||
* @param int $colspan Value of colspan to use (it must includes the first column with title)
|
||||
* @param string $display_type "card" for form display, "line" for document line display (extrafields on propal line, order line, etc...)
|
||||
* @param string $mode Show output ('view') or input ('create' or 'edit') for extrafield
|
||||
|
||||
@ -3679,7 +3679,11 @@ class Form
|
||||
$sql .= " AND p.tobuy = 1";
|
||||
$sql .= " AND s.fournisseur = 1";
|
||||
$sql .= " AND p.rowid = ".((int) $productid);
|
||||
$sql .= " ORDER BY s.nom, pfp.ref_fourn DESC";
|
||||
if (empty($conf->global->PRODUCT_BEST_SUPPLIER_PRICE_PRESELECTED)) {
|
||||
$sql .= " ORDER BY s.nom, pfp.ref_fourn DESC";
|
||||
} else {
|
||||
$sql .= " ORDER BY pfp.unitprice ASC";
|
||||
}
|
||||
|
||||
dol_syslog(get_class($this)."::select_product_fourn_price", LOG_DEBUG);
|
||||
$result = $this->db->query($sql);
|
||||
@ -3701,7 +3705,7 @@ class Form
|
||||
|
||||
$opt = '<option value="'.$objp->idprodfournprice.'"';
|
||||
//if there is only one supplier, preselect it
|
||||
if ($num == 1 || ($selected_supplier > 0 && $objp->fk_soc == $selected_supplier)) {
|
||||
if ($num == 1 || ($selected_supplier > 0 && $objp->fk_soc == $selected_supplier) || ($i == 0 && !empty($conf->global->PRODUCT_BEST_SUPPLIER_PRICE_PRESELECTED))) {
|
||||
$opt .= ' selected';
|
||||
}
|
||||
$opt .= '>'.$objp->name.' - '.$objp->ref_fourn.' - ';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user