Ajout possibilit d'enregistrer des modles d'exports afin de ne pas les selectionner chaque fois, fonctionnalit oprationnel mais reste la fignoler !!
This commit is contained in:
parent
cf07f30cf7
commit
bf22746ebe
@ -224,7 +224,7 @@ class Export
|
||||
$this->db->begin();
|
||||
|
||||
$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."')";
|
||||
|
||||
dolibarr_syslog("Export.class.php::create sql=".$sql);
|
||||
@ -249,7 +249,7 @@ class Export
|
||||
*/
|
||||
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.= ' WHERE em.rowid = '.$id;
|
||||
|
||||
@ -263,7 +263,7 @@ class Export
|
||||
{
|
||||
$this->id = $obj->rowid;
|
||||
$this->hexa = $obj->field;
|
||||
$this->model_name = $obj->nom;
|
||||
$this->model_name = $obj->label;
|
||||
$this->datatoexport = $obj->type;
|
||||
|
||||
return 1;
|
||||
|
||||
@ -2933,7 +2933,7 @@ class Form
|
||||
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.= " WHERE type = '".$type."'";
|
||||
$sql.= " ORDER BY rowid";
|
||||
@ -2959,7 +2959,7 @@ class Form
|
||||
{
|
||||
print '<option value="'.$obj->rowid.'">';
|
||||
}
|
||||
print $obj->nom;
|
||||
print $obj->label;
|
||||
print '</option>';
|
||||
$i++;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user