Merge branch '3.6' of git@github.com:Dolibarr/dolibarr.git into 3.6
Conflicts: ChangeLog
This commit is contained in:
commit
e607a53ca3
@ -10,6 +10,7 @@ English Dolibarr ChangeLog
|
||||
- Fix: box of customer and propsects were not correctly disabled.
|
||||
- Fix: [ bug #1618 ] PHP Error thrown when saving a barcode
|
||||
- Fix: Civility & birthdate wasn't save into adherent module.
|
||||
- Fix: webservice Thirdparty parameter lastname for invidual creation is now lastname and not ref
|
||||
|
||||
***** ChangeLog for 3.6.1 compared to 3.6.* *****
|
||||
For users:
|
||||
|
||||
@ -743,15 +743,17 @@ class ExtraFields
|
||||
if (strpos($InfoFieldList[4], 'extra')!==false)
|
||||
{
|
||||
$sql.= ' as main, '.MAIN_DB_PREFIX .$InfoFieldList[0].'_extrafields as extra';
|
||||
$sqlwhere.= ' AND extra.fk_object=main.'.$InfoFieldList[2]. ' AND '.$InfoFieldList[4];
|
||||
$sqlwhere.= ' WHERE extra.fk_object=main.'.$InfoFieldList[2]. ' AND '.$InfoFieldList[4];
|
||||
}
|
||||
else
|
||||
{
|
||||
$sqlwhere.= ' AND '.$InfoFieldList[4];
|
||||
$sqlwhere.= ' WHERE '.$InfoFieldList[4];
|
||||
}
|
||||
}else {
|
||||
$sqlwhere.= ' WHERE 1';
|
||||
}
|
||||
if (in_array($InfoFieldList[0],array('tablewithentity'))) $sqlwhere.= ' AND entity = '.$conf->entity; // Some tables may have field, some other not. For the moment we disable it.
|
||||
$sql.=preg_replace('/^ AND /','',$sqlwhere);
|
||||
//$sql.=preg_replace('/^ AND /','',$sqlwhere);
|
||||
//print $sql;
|
||||
|
||||
dol_syslog(get_class($this).'::showInputField type=sellist sql='.$sql);
|
||||
@ -979,7 +981,10 @@ class ExtraFields
|
||||
{
|
||||
foreach ($fields_label as $field_toshow)
|
||||
{
|
||||
$translabel=$langs->trans($obj->$field_toshow);
|
||||
$translabel='';
|
||||
if (!empty($obj->$field_toshow)) {
|
||||
$translabel=$langs->trans($obj->$field_toshow);
|
||||
}
|
||||
if ($translabel!=$field_toshow) {
|
||||
$value.=dol_trunc($translabel,18).' ';
|
||||
}else {
|
||||
@ -989,7 +994,10 @@ class ExtraFields
|
||||
}
|
||||
else
|
||||
{
|
||||
$translabel=$langs->trans($obj->$InfoFieldList[1]);
|
||||
$translabel='';
|
||||
if (!empty($obj->$InfoFieldList[1])) {
|
||||
$translabel=$langs->trans($obj->$InfoFieldList[1]);
|
||||
}
|
||||
if ($translabel!=$obj->$InfoFieldList[1]) {
|
||||
$value=dol_trunc($translabel,18);
|
||||
}else {
|
||||
|
||||
@ -32,4 +32,6 @@ ResourceLinkedWithSuccess=Resource linked with success
|
||||
TitleResourceCard=Resource card
|
||||
ConfirmDeleteResource=Confirm to delete this resource
|
||||
RessourceSuccessfullyDeleted=Resource successfully deleted
|
||||
DictionaryResourceType=Type of resources
|
||||
DictionaryResourceType=Type of resources
|
||||
|
||||
SelectResource=Select resource
|
||||
|
||||
@ -32,4 +32,6 @@ ResourceLinkedWithSuccess=Ressource liée avec succès
|
||||
TitleResourceCard=Fiche ressource
|
||||
ConfirmDeleteResource=Confirmer la suppression de cette ressource?
|
||||
RessourceSuccessfullyDeleted=Ressource effacée avec succès
|
||||
DictionaryResourceType=Type de ressources
|
||||
DictionaryResourceType=Type de ressources
|
||||
|
||||
SelectResource=Sélectionner la ressource
|
||||
|
||||
@ -23,8 +23,8 @@
|
||||
*/
|
||||
|
||||
// Put here all includes required by your class file
|
||||
require_once(DOL_DOCUMENT_ROOT."/core/class/commonobject.class.php");
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT."/core/class/commonobject.class.php";
|
||||
require_once DOL_DOCUMENT_ROOT."/core/lib/functions2.lib.php";
|
||||
|
||||
/**
|
||||
* DAO Resource object
|
||||
@ -330,12 +330,12 @@ class Resource extends CommonObject
|
||||
function delete($rowid, $notrigger=0)
|
||||
{
|
||||
global $user,$langs,$conf;
|
||||
|
||||
|
||||
$error=0;
|
||||
|
||||
|
||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."resource";
|
||||
$sql.= " WHERE rowid =".$rowid;
|
||||
|
||||
|
||||
dol_syslog(get_class($this)."::delete sql=".$sql);
|
||||
if ($this->db->query($sql))
|
||||
{
|
||||
@ -355,7 +355,7 @@ class Resource extends CommonObject
|
||||
}
|
||||
// End call triggers
|
||||
}
|
||||
|
||||
|
||||
return 1;
|
||||
}
|
||||
else {
|
||||
@ -371,7 +371,7 @@ class Resource extends CommonObject
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Load resource objects into $this->lines
|
||||
*
|
||||
@ -507,9 +507,9 @@ class Resource extends CommonObject
|
||||
$line->fk_user_create = $obj->fk_user_create;
|
||||
|
||||
if($obj->resource_id && $obj->resource_type)
|
||||
$line->objresource = $this->fetchObjectByElement($obj->resource_id,$obj->resource_type);
|
||||
$line->objresource = fetchObjectByElement($obj->resource_id,$obj->resource_type);
|
||||
if($obj->element_id && $obj->element_type)
|
||||
$line->objelement = $this->fetchObjectByElement($obj->element_id,$obj->element_type);
|
||||
$line->objelement = fetchObjectByElement($obj->element_id,$obj->element_type);
|
||||
$this->lines[$i] = $line;
|
||||
|
||||
$i++;
|
||||
@ -591,7 +591,7 @@ class Resource extends CommonObject
|
||||
$line->mandatory = $obj->mandatory;
|
||||
$line->fk_user_create = $obj->fk_user_create;
|
||||
|
||||
$this->lines[$i] = $this->fetchObjectByElement($obj->resource_id,$obj->resource_type);
|
||||
$this->lines[$i] = fetchObjectByElement($obj->resource_id,$obj->resource_type);
|
||||
|
||||
$i++;
|
||||
}
|
||||
@ -814,7 +814,7 @@ class Resource extends CommonObject
|
||||
$i=0;
|
||||
foreach($resources as $nb => $resource)
|
||||
{
|
||||
$this->lines[$i] = $this->fetchObjectByElement($resource['resource_id'],$resource['resource_type']);
|
||||
$this->lines[$i] = fetchObjectByElement($resource['resource_id'],$resource['resource_type']);
|
||||
$i++;
|
||||
}
|
||||
return $i;
|
||||
|
||||
@ -460,7 +460,7 @@ function createThirdParty($authentication,$thirdparty)
|
||||
$result=$newobject->create($fuser);
|
||||
if ($newobject->particulier && $result > 0) {
|
||||
$newobject->firstname = $thirdparty['firstname'];
|
||||
$newobject->name_bis = $thirdparty['ref'];
|
||||
$newobject->name_bis = $thirdparty['lastname'];
|
||||
$result = $newobject->create_individual($fuser);
|
||||
}
|
||||
if ($result <= 0)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user