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

This commit is contained in:
Laurent Destailleur 2016-04-29 20:35:50 +02:00
commit 04f4a99684
5 changed files with 18 additions and 12 deletions

View File

@ -4560,7 +4560,7 @@ abstract class CommonObject
$productFournisseur = new ProductFournisseur($this->db);
if (($result = $productFournisseur->find_min_price_product_fournisseur($fk_product)) > 0)
{
$buyPrice = $productFournisseur->fourn_price;
$buyPrice = $productFournisseur->fourn_unitprice;
}
else if ($result < 0)
{

View File

@ -805,6 +805,7 @@ class FormOther
$select_week .= '<option value="'.$key.'">';
}
$select_week .= $val;
$select_week .= '</option>';
}
$select_week .= '</select>';
return $select_week;
@ -844,6 +845,7 @@ class FormOther
$select_month .= '<option value="'.$key.'">';
}
$select_month .= $val;
$select_month .= '</option>';
}
$select_month .= '</select>';
return $select_month;

View File

@ -291,14 +291,15 @@ function ajax_multiautocompleter($htmlname, $fields, $url, $option='', $minLengt
needtotrigger="#" + fields[i];
}
}
}
if (needtotrigger != "") // To force select2 to refresh visible content
{
// We introduce a delay so hand is back to js and all other js change can be done before the trigger that may execute a submit is done
// This is required for example when changing zip with autocomplete that change the country
jQuery(needtotrigger).delay(500).queue(function() {
jQuery(needtotrigger).trigger("change");
});
if (needtotrigger != "") // To force select2 to refresh visible content
{
// We introduce a delay so hand is back to js and all other js change can be done before the trigger that may execute a submit is done
// This is required for example when changing zip with autocomplete that change the country
jQuery(needtotrigger).delay(500).queue(function() {
jQuery(this).trigger("change");
});
}
}
}
});

View File

@ -3721,7 +3721,7 @@ class Product extends CommonObject
}
}
if ($size==1 || $size='small')
if ($size==1 || $size=='small')
{
if ($nbbyrow > 0)
{

View File

@ -832,7 +832,10 @@ class Societe extends CommonObject
$sql .= ",prefix_comm = ".(! empty($this->prefix_comm)?"'".$this->db->escape($this->prefix_comm)."'":"null");
$sql .= ",fk_effectif = ".(! empty($this->effectif_id)?"'".$this->db->escape($this->effectif_id)."'":"null");
$sql .= ",fk_stcomm='".$this->stcomm_id."'";
if (isset($this->stcomm_id))
{
$sql .= ",fk_stcomm='".$this->stcomm_id."'";
}
$sql .= ",fk_typent = ".(! empty($this->typent_id)?"'".$this->db->escape($this->typent_id)."'":"0");
$sql .= ",fk_forme_juridique = ".(! empty($this->forme_juridique_code)?"'".$this->db->escape($this->forme_juridique_code)."'":"null");
@ -848,7 +851,7 @@ class Societe extends CommonObject
$sql .= ",barcode = ".(! empty($this->barcode)?"'".$this->db->escape($this->barcode)."'":"null");
$sql .= ",default_lang = ".(! empty($this->default_lang)?"'".$this->db->escape($this->default_lang)."'":"null");
$sql .= ",logo = ".(! empty($this->logo)?"'".$this->db->escape($this->logo)."'":"null");
$sql .= ",outstanding_limit= '".($this->outstanding_limit!=''?$this->outstanding_limit:'null')."'";
$sql .= ",outstanding_limit= ".($this->outstanding_limit!=''?$this->outstanding_limit:'null');
$sql .= ",fk_prospectlevel='".$this->fk_prospectlevel."'";
$sql .= ",webservices_url = ".(! empty($this->webservices_url)?"'".$this->db->escape($this->webservices_url)."'":"null");