Report divert bug fixing from 3.4
This commit is contained in:
parent
6407139b04
commit
cb182752cc
@ -188,8 +188,8 @@ class ActionComm extends CommonObject
|
|||||||
$sql.= (strval($this->datep)!=''?"'".$this->db->idate($this->datep)."'":"null").",";
|
$sql.= (strval($this->datep)!=''?"'".$this->db->idate($this->datep)."'":"null").",";
|
||||||
$sql.= (strval($this->datef)!=''?"'".$this->db->idate($this->datef)."'":"null").",";
|
$sql.= (strval($this->datef)!=''?"'".$this->db->idate($this->datef)."'":"null").",";
|
||||||
$sql.= (isset($this->durationp) && $this->durationp >= 0 && $this->durationp != ''?"'".$this->durationp."'":"null").",";
|
$sql.= (isset($this->durationp) && $this->durationp >= 0 && $this->durationp != ''?"'".$this->durationp."'":"null").",";
|
||||||
$sql.= " '".$this->type_id."',";
|
$sql.= (isset($this->type_id)?$this->type_id:"null").",";
|
||||||
$sql.= " '".$this->code."',";
|
$sql.= (isset($this->code)?" '".$this->code."'":"null").",";
|
||||||
$sql.= (isset($this->societe->id) && $this->societe->id > 0?" '".$this->societe->id."'":"null").",";
|
$sql.= (isset($this->societe->id) && $this->societe->id > 0?" '".$this->societe->id."'":"null").",";
|
||||||
$sql.= (isset($this->fk_project) && $this->fk_project > 0?" '".$this->fk_project."'":"null").",";
|
$sql.= (isset($this->fk_project) && $this->fk_project > 0?" '".$this->fk_project."'":"null").",";
|
||||||
$sql.= " '".$this->db->escape($this->note)."',";
|
$sql.= " '".$this->db->escape($this->note)."',";
|
||||||
|
|||||||
@ -243,6 +243,7 @@ if ($action == 'add_action')
|
|||||||
$db->rollback();
|
$db->rollback();
|
||||||
$langs->load("errors");
|
$langs->load("errors");
|
||||||
$error=$langs->trans($actioncomm->error);
|
$error=$langs->trans($actioncomm->error);
|
||||||
|
setEventMessage($error,'errors');
|
||||||
$action = 'create';
|
$action = 'create';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -251,6 +252,7 @@ if ($action == 'add_action')
|
|||||||
$db->rollback();
|
$db->rollback();
|
||||||
$langs->load("errors");
|
$langs->load("errors");
|
||||||
$error=$langs->trans($actioncomm->error);
|
$error=$langs->trans($actioncomm->error);
|
||||||
|
setEventMessage($error,'errors');
|
||||||
$action = 'create';
|
$action = 'create';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -277,6 +279,7 @@ if ($action == 'confirm_delete' && GETPOST("confirm") == 'yes')
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
$mesg=$actioncomm->error;
|
$mesg=$actioncomm->error;
|
||||||
|
setEventMessage($mesg,'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1845,7 +1845,11 @@ else
|
|||||||
|
|
||||||
foreach($extrafields->attribute_label as $key=>$label)
|
foreach($extrafields->attribute_label as $key=>$label)
|
||||||
{
|
{
|
||||||
|
if ($action == 'edit_extras') {
|
||||||
$value=(isset($_POST["options_".$key])?$_POST["options_".$key]:$object->array_options["options_".$key]);
|
$value=(isset($_POST["options_".$key])?$_POST["options_".$key]:$object->array_options["options_".$key]);
|
||||||
|
} else {
|
||||||
|
$value=$object->array_options["options_".$key];
|
||||||
|
}
|
||||||
if ($extrafields->attribute_type[$key] == 'separate')
|
if ($extrafields->attribute_type[$key] == 'separate')
|
||||||
{
|
{
|
||||||
print $extrafields->showSeparator($key);
|
print $extrafields->showSeparator($key);
|
||||||
|
|||||||
@ -2554,6 +2554,7 @@ class Propal extends CommonObject
|
|||||||
$sql.= ' WHERE pt.fk_propal = '.$this->id;
|
$sql.= ' WHERE pt.fk_propal = '.$this->id;
|
||||||
$sql.= ' ORDER BY pt.rang ASC, pt.rowid';
|
$sql.= ' ORDER BY pt.rang ASC, pt.rowid';
|
||||||
|
|
||||||
|
dol_syslog(get_class($this).'::getLinesArray sql='.$sql,LOG_DEBUG);
|
||||||
$resql = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -2834,7 +2834,7 @@ class Commande extends CommonOrder
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Update value of extrafields on the proposal
|
* Update value of extrafields on order
|
||||||
*
|
*
|
||||||
* @param User $user Object user that modify
|
* @param User $user Object user that modify
|
||||||
* @return int <0 if ko, >0 if ok
|
* @return int <0 if ko, >0 if ok
|
||||||
|
|||||||
@ -2145,7 +2145,11 @@ else
|
|||||||
|
|
||||||
foreach($extrafields->attribute_label as $key=>$label)
|
foreach($extrafields->attribute_label as $key=>$label)
|
||||||
{
|
{
|
||||||
|
if ($action == 'edit_extras') {
|
||||||
$value=(isset($_POST["options_".$key])?$_POST["options_".$key]:$object->array_options["options_".$key]);
|
$value=(isset($_POST["options_".$key])?$_POST["options_".$key]:$object->array_options["options_".$key]);
|
||||||
|
} else {
|
||||||
|
$value=$object->array_options["options_".$key];
|
||||||
|
}
|
||||||
if ($extrafields->attribute_type[$key] == 'separate')
|
if ($extrafields->attribute_type[$key] == 'separate')
|
||||||
{
|
{
|
||||||
print $extrafields->showSeparator($key);
|
print $extrafields->showSeparator($key);
|
||||||
|
|||||||
@ -3291,7 +3291,11 @@ else if ($id > 0 || ! empty($ref))
|
|||||||
|
|
||||||
foreach($extrafields->attribute_label as $key=>$label)
|
foreach($extrafields->attribute_label as $key=>$label)
|
||||||
{
|
{
|
||||||
|
if ($action == 'edit_extras') {
|
||||||
$value=(isset($_POST["options_".$key])?$_POST["options_".$key]:$object->array_options["options_".$key]);
|
$value=(isset($_POST["options_".$key])?$_POST["options_".$key]:$object->array_options["options_".$key]);
|
||||||
|
} else {
|
||||||
|
$value=$object->array_options["options_".$key];
|
||||||
|
}
|
||||||
if ($extrafields->attribute_type[$key] == 'separate')
|
if ($extrafields->attribute_type[$key] == 'separate')
|
||||||
{
|
{
|
||||||
print $extrafields->showSeparator($key);
|
print $extrafields->showSeparator($key);
|
||||||
|
|||||||
@ -3203,6 +3203,7 @@ class Facture extends CommonInvoice
|
|||||||
$sql.= ' WHERE l.fk_facture = '.$this->id;
|
$sql.= ' WHERE l.fk_facture = '.$this->id;
|
||||||
$sql.= ' ORDER BY l.rang ASC, l.rowid';
|
$sql.= ' ORDER BY l.rang ASC, l.rowid';
|
||||||
|
|
||||||
|
dol_syslog(get_class($this).'::getLinesArray sql='.$sql,LOG_DEBUG);
|
||||||
$resql = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -187,7 +187,7 @@ abstract class CommonObject
|
|||||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."element_contact";
|
$sql = "INSERT INTO ".MAIN_DB_PREFIX."element_contact";
|
||||||
$sql.= " (element_id, fk_socpeople, datecreate, statut, fk_c_type_contact) ";
|
$sql.= " (element_id, fk_socpeople, datecreate, statut, fk_c_type_contact) ";
|
||||||
$sql.= " VALUES (".$this->id.", ".$fk_socpeople." , " ;
|
$sql.= " VALUES (".$this->id.", ".$fk_socpeople." , " ;
|
||||||
$sql.= $this->db->idate($datecreate);
|
$sql.= "'".$this->db->idate($datecreate)."'";
|
||||||
$sql.= ", 4, '". $id_type_contact . "' ";
|
$sql.= ", 4, '". $id_type_contact . "' ";
|
||||||
$sql.= ")";
|
$sql.= ")";
|
||||||
dol_syslog(get_class($this)."::add_contact sql=".$sql);
|
dol_syslog(get_class($this)."::add_contact sql=".$sql);
|
||||||
@ -2517,6 +2517,9 @@ abstract class CommonObject
|
|||||||
if ($objecttype == 'cabinetmed_cons') {
|
if ($objecttype == 'cabinetmed_cons') {
|
||||||
$classpath = 'cabinetmed/class'; $module='cabinetmed'; $subelement='cabinetmedcons';
|
$classpath = 'cabinetmed/class'; $module='cabinetmed'; $subelement='cabinetmedcons';
|
||||||
}
|
}
|
||||||
|
if ($objecttype == 'fichinter') {
|
||||||
|
$classpath = 'fichinter/class'; $module='ficheinter'; $subelement='fichinter';
|
||||||
|
}
|
||||||
|
|
||||||
//print "objecttype=".$objecttype." module=".$module." subelement=".$subelement;
|
//print "objecttype=".$objecttype." module=".$module." subelement=".$subelement;
|
||||||
|
|
||||||
|
|||||||
@ -445,7 +445,7 @@ class ExtraFields
|
|||||||
|
|
||||||
if(is_array($param) && count($param) > 0)
|
if(is_array($param) && count($param) > 0)
|
||||||
{
|
{
|
||||||
$param = serialize($param);
|
$param = $this->db->escape(serialize($param));
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql_del = "DELETE FROM ".MAIN_DB_PREFIX."extrafields";
|
$sql_del = "DELETE FROM ".MAIN_DB_PREFIX."extrafields";
|
||||||
|
|||||||
@ -49,8 +49,8 @@
|
|||||||
else if (type == 'price') { size.val('').attr('disabled','disabled'); unique.attr('disabled','disabled'); jQuery("#value_choice").hide();}
|
else if (type == 'price') { size.val('').attr('disabled','disabled'); unique.attr('disabled','disabled'); jQuery("#value_choice").hide();}
|
||||||
else if (type == 'select') { size.val('').attr('disabled','disabled'); unique.attr('disabled','disabled'); jQuery("#value_choice").show();jQuery("#helpselect").show();jQuery("#helpsellist").hide();}
|
else if (type == 'select') { size.val('').attr('disabled','disabled'); unique.attr('disabled','disabled'); jQuery("#value_choice").show();jQuery("#helpselect").show();jQuery("#helpsellist").hide();}
|
||||||
else if (type == 'sellist') { size.val('').attr('disabled','disabled'); unique.attr('disabled','disabled'); jQuery("#value_choice").show();jQuery("#helpselect").hide();jQuery("#helpsellist").show();}
|
else if (type == 'sellist') { size.val('').attr('disabled','disabled'); unique.attr('disabled','disabled'); jQuery("#value_choice").show();jQuery("#helpselect").hide();jQuery("#helpsellist").show();}
|
||||||
else if (type == 'checkbox') { size.val('').attr('disabled','disabled'); unique.attr('disabled','disabled'); jQuery("#value_choice").show();}
|
else if (type == 'checkbox') { size.val('').attr('disabled','disabled'); unique.attr('disabled','disabled'); jQuery("#value_choice").show();jQuery("#helpselect").show();jQuery("#helpsellist").hide();}
|
||||||
else if (type == 'radio') { size.val('').attr('disabled','disabled'); unique.attr('disabled','disabled'); jQuery("#value_choice").show();}
|
else if (type == 'radio') { size.val('').attr('disabled','disabled'); unique.attr('disabled','disabled'); jQuery("#value_choice").show();jQuery("#helpselect").show();jQuery("#helpsellist").hide();}
|
||||||
else if (type == 'separate') { size.val('').attr('disabled','disabled'); unique.attr('disabled','disabled'); required.val('').attr('disabled','disabled'); default_value.val('').attr('disabled','disabled'); jQuery("#value_choice").hide();}
|
else if (type == 'separate') { size.val('').attr('disabled','disabled'); unique.attr('disabled','disabled'); required.val('').attr('disabled','disabled'); default_value.val('').attr('disabled','disabled'); jQuery("#value_choice").hide();}
|
||||||
else size.val('').attr('disabled','disabled');
|
else size.val('').attr('disabled','disabled');
|
||||||
}
|
}
|
||||||
|
|||||||
@ -381,7 +381,7 @@ class PaiementFourn extends Paiement
|
|||||||
$sql.= ' WHERE pf.fk_facturefourn = f.rowid AND fk_paiementfourn = '.$this->id;
|
$sql.= ' WHERE pf.fk_facturefourn = f.rowid AND fk_paiementfourn = '.$this->id;
|
||||||
if ($filter) $sql.= ' AND '.$filter;
|
if ($filter) $sql.= ' AND '.$filter;
|
||||||
|
|
||||||
dol_syslog(get_class($this).'::getBillsArray sql='.$sql);
|
dol_syslog(get_class($this).'::getBillsArray sql='.$sql,LOG_DEBUG);
|
||||||
$resql = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user