Report divert bug fixing from 3.4

This commit is contained in:
fhenry 2013-05-19 18:47:14 +02:00
parent 6407139b04
commit cb182752cc
12 changed files with 30 additions and 10 deletions

View File

@ -188,8 +188,8 @@ class ActionComm extends CommonObject
$sql.= (strval($this->datep)!=''?"'".$this->db->idate($this->datep)."'":"null").",";
$sql.= (strval($this->datef)!=''?"'".$this->db->idate($this->datef)."'":"null").",";
$sql.= (isset($this->durationp) && $this->durationp >= 0 && $this->durationp != ''?"'".$this->durationp."'":"null").",";
$sql.= " '".$this->type_id."',";
$sql.= " '".$this->code."',";
$sql.= (isset($this->type_id)?$this->type_id:"null").",";
$sql.= (isset($this->code)?" '".$this->code."'":"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.= " '".$this->db->escape($this->note)."',";

View File

@ -243,6 +243,7 @@ if ($action == 'add_action')
$db->rollback();
$langs->load("errors");
$error=$langs->trans($actioncomm->error);
setEventMessage($error,'errors');
$action = 'create';
}
}
@ -251,6 +252,7 @@ if ($action == 'add_action')
$db->rollback();
$langs->load("errors");
$error=$langs->trans($actioncomm->error);
setEventMessage($error,'errors');
$action = 'create';
}
}
@ -277,6 +279,7 @@ if ($action == 'confirm_delete' && GETPOST("confirm") == 'yes')
else
{
$mesg=$actioncomm->error;
setEventMessage($mesg,'errors');
}
}
}

View File

@ -1845,7 +1845,11 @@ else
foreach($extrafields->attribute_label as $key=>$label)
{
$value=(isset($_POST["options_".$key])?$_POST["options_".$key]:$object->array_options["options_".$key]);
if ($action == 'edit_extras') {
$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')
{
print $extrafields->showSeparator($key);

View File

@ -2554,6 +2554,7 @@ class Propal extends CommonObject
$sql.= ' WHERE pt.fk_propal = '.$this->id;
$sql.= ' ORDER BY pt.rang ASC, pt.rowid';
dol_syslog(get_class($this).'::getLinesArray sql='.$sql,LOG_DEBUG);
$resql = $this->db->query($sql);
if ($resql)
{

View File

@ -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
* @return int <0 if ko, >0 if ok

View File

@ -2145,7 +2145,11 @@ else
foreach($extrafields->attribute_label as $key=>$label)
{
$value=(isset($_POST["options_".$key])?$_POST["options_".$key]:$object->array_options["options_".$key]);
if ($action == 'edit_extras') {
$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')
{
print $extrafields->showSeparator($key);

View File

@ -3291,7 +3291,11 @@ else if ($id > 0 || ! empty($ref))
foreach($extrafields->attribute_label as $key=>$label)
{
if ($action == 'edit_extras') {
$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')
{
print $extrafields->showSeparator($key);

View File

@ -3203,6 +3203,7 @@ class Facture extends CommonInvoice
$sql.= ' WHERE l.fk_facture = '.$this->id;
$sql.= ' ORDER BY l.rang ASC, l.rowid';
dol_syslog(get_class($this).'::getLinesArray sql='.$sql,LOG_DEBUG);
$resql = $this->db->query($sql);
if ($resql)
{

View File

@ -187,7 +187,7 @@ abstract class CommonObject
$sql = "INSERT INTO ".MAIN_DB_PREFIX."element_contact";
$sql.= " (element_id, fk_socpeople, datecreate, statut, fk_c_type_contact) ";
$sql.= " VALUES (".$this->id.", ".$fk_socpeople." , " ;
$sql.= $this->db->idate($datecreate);
$sql.= "'".$this->db->idate($datecreate)."'";
$sql.= ", 4, '". $id_type_contact . "' ";
$sql.= ")";
dol_syslog(get_class($this)."::add_contact sql=".$sql);
@ -2517,6 +2517,9 @@ abstract class CommonObject
if ($objecttype == 'cabinetmed_cons') {
$classpath = 'cabinetmed/class'; $module='cabinetmed'; $subelement='cabinetmedcons';
}
if ($objecttype == 'fichinter') {
$classpath = 'fichinter/class'; $module='ficheinter'; $subelement='fichinter';
}
//print "objecttype=".$objecttype." module=".$module." subelement=".$subelement;

View File

@ -445,7 +445,7 @@ class ExtraFields
if(is_array($param) && count($param) > 0)
{
$param = serialize($param);
$param = $this->db->escape(serialize($param));
}
$sql_del = "DELETE FROM ".MAIN_DB_PREFIX."extrafields";

View File

@ -49,8 +49,8 @@
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 == '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 == 'radio') { 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();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 size.val('').attr('disabled','disabled');
}

View File

@ -381,7 +381,7 @@ class PaiementFourn extends Paiement
$sql.= ' WHERE pf.fk_facturefourn = f.rowid AND fk_paiementfourn = '.$this->id;
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);
if ($resql)
{