Ajout possibilité d'enregistrer des modèles d'exports afin de ne pas les selectionner à chaque fois, fonctionnalité opérationnel mais reste à la fignoler !!
This commit is contained in:
parent
cf07f30cf7
commit
bf22746ebe
@ -224,7 +224,7 @@ class Export
|
|||||||
$this->db->begin();
|
$this->db->begin();
|
||||||
|
|
||||||
$sql = 'INSERT INTO '.MAIN_DB_PREFIX.'export_model (';
|
$sql = 'INSERT INTO '.MAIN_DB_PREFIX.'export_model (';
|
||||||
$sql.= 'nom, type, field)';
|
$sql.= 'label, type, field)';
|
||||||
$sql.= " VALUES ('".$this->model_name."', '".$this->datatoexport."', '".$this->hexa."')";
|
$sql.= " VALUES ('".$this->model_name."', '".$this->datatoexport."', '".$this->hexa."')";
|
||||||
|
|
||||||
dolibarr_syslog("Export.class.php::create sql=".$sql);
|
dolibarr_syslog("Export.class.php::create sql=".$sql);
|
||||||
@ -249,7 +249,7 @@ class Export
|
|||||||
*/
|
*/
|
||||||
function fetch($id)
|
function fetch($id)
|
||||||
{
|
{
|
||||||
$sql = 'SELECT em.rowid, em.field, em.nom, em.type';
|
$sql = 'SELECT em.rowid, em.field, em.label, em.type';
|
||||||
$sql.= ' FROM '.MAIN_DB_PREFIX.'export_model as em';
|
$sql.= ' FROM '.MAIN_DB_PREFIX.'export_model as em';
|
||||||
$sql.= ' WHERE em.rowid = '.$id;
|
$sql.= ' WHERE em.rowid = '.$id;
|
||||||
|
|
||||||
@ -263,7 +263,7 @@ class Export
|
|||||||
{
|
{
|
||||||
$this->id = $obj->rowid;
|
$this->id = $obj->rowid;
|
||||||
$this->hexa = $obj->field;
|
$this->hexa = $obj->field;
|
||||||
$this->model_name = $obj->nom;
|
$this->model_name = $obj->label;
|
||||||
$this->datatoexport = $obj->type;
|
$this->datatoexport = $obj->type;
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
|
|||||||
@ -2933,7 +2933,7 @@ class Form
|
|||||||
function select_export_model($selected='',$htmlname='exportmodelid',$type='',$useempty=0)
|
function select_export_model($selected='',$htmlname='exportmodelid',$type='',$useempty=0)
|
||||||
{
|
{
|
||||||
|
|
||||||
$sql = "SELECT rowid, nom";
|
$sql = "SELECT rowid, label";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."export_model";
|
$sql.= " FROM ".MAIN_DB_PREFIX."export_model";
|
||||||
$sql.= " WHERE type = '".$type."'";
|
$sql.= " WHERE type = '".$type."'";
|
||||||
$sql.= " ORDER BY rowid";
|
$sql.= " ORDER BY rowid";
|
||||||
@ -2959,7 +2959,7 @@ class Form
|
|||||||
{
|
{
|
||||||
print '<option value="'.$obj->rowid.'">';
|
print '<option value="'.$obj->rowid.'">';
|
||||||
}
|
}
|
||||||
print $obj->nom;
|
print $obj->label;
|
||||||
print '</option>';
|
print '</option>';
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user