Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
ca5bcd0fd7
3 changed files with 14 additions and 7 deletions
|
|
@ -125,13 +125,13 @@ class ExpeditionLineBatch extends CommonObject
|
|||
$sql .= ", fk_origin_stock";
|
||||
$sql .= ", fk_warehouse";
|
||||
$sql .= ") VALUES (";
|
||||
$sql .= $id_line_expdet.",";
|
||||
$sql .= " ".(!isset($this->sellby) || dol_strlen($this->sellby) == 0 ? 'NULL' : ("'".$this->db->idate($this->sellby))."'").",";
|
||||
$sql .= " ".(!isset($this->eatby) || dol_strlen($this->eatby) == 0 ? 'NULL' : ("'".$this->db->idate($this->eatby))."'").",";
|
||||
$sql .= " ".(!isset($this->batch) ? 'NULL' : ("'".$this->db->escape($this->batch)."'")).",";
|
||||
$sql .= " ".(!isset($this->qty) ? ((!isset($this->dluo_qty)) ? 'NULL' : $this->dluo_qty) : $this->qty).","; // dluo_qty deprecated, use qty
|
||||
$sql .= " ".(!isset($this->fk_origin_stock) ? 'NULL' : $this->fk_origin_stock);
|
||||
$sql .= " ".(!isset($this->fk_warehouse) ? 'NULL' : $this->fk_warehouse);
|
||||
$sql .= $id_line_expdet;
|
||||
$sql .= ", ".(!isset($this->sellby) || dol_strlen($this->sellby) == 0 ? 'NULL' : ("'".$this->db->idate($this->sellby))."'");
|
||||
$sql .= ", ".(!isset($this->eatby) || dol_strlen($this->eatby) == 0 ? 'NULL' : ("'".$this->db->idate($this->eatby))."'");
|
||||
$sql .= ", ".(!isset($this->batch) ? 'NULL' : ("'".$this->db->escape($this->batch)."'"));
|
||||
$sql .= ", ".(!isset($this->qty) ? ((!isset($this->dluo_qty)) ? 'NULL' : $this->dluo_qty) : $this->qty); // dluo_qty deprecated, use qty
|
||||
$sql .= ", ".(!isset($this->fk_origin_stock) ? 'NULL' : $this->fk_origin_stock);
|
||||
$sql .= ", ".(!isset($this->fk_warehouse) ? 'NULL' : $this->fk_warehouse);
|
||||
$sql .= ")";
|
||||
|
||||
dol_syslog(__METHOD__, LOG_DEBUG);
|
||||
|
|
|
|||
|
|
@ -61,6 +61,7 @@ class Import
|
|||
public $array_import_entities;
|
||||
public $array_import_regex;
|
||||
public $array_import_updatekeys;
|
||||
public $array_import_preselected_updatekeys;
|
||||
public $array_import_examplevalues;
|
||||
public $array_import_convertvalue;
|
||||
public $array_import_run_sql_after;
|
||||
|
|
@ -191,6 +192,8 @@ class Import
|
|||
$this->array_import_regex[$i] = (isset($module->import_regex_array[$r]) ? $module->import_regex_array[$r] : '');
|
||||
// Array of columns allowed as UPDATE options
|
||||
$this->array_import_updatekeys[$i] = (isset($module->import_updatekeys_array[$r]) ? $module->import_updatekeys_array[$r] : '');
|
||||
// Array of columns preselected as UPDATE options
|
||||
$this->array_import_preselected_updatekeys[$i] = (isset($module->import_preselected_updatekeys_array[$r]) ? $module->import_preselected_updatekeys_array[$r] : '');
|
||||
// Array of examples
|
||||
$this->array_import_examplevalues[$i] = (isset($module->import_examplevalues_array[$r]) ? $module->import_examplevalues_array[$r] : '');
|
||||
// Tableau des regles de conversion d'une valeur depuis une autre source (cle=champ, valeur=tableau des regles)
|
||||
|
|
|
|||
|
|
@ -153,6 +153,10 @@ $hookmanager->initHooks(array('imports'));
|
|||
$objimport = new Import($db);
|
||||
$objimport->load_arrays($user, ($step == 1 ? '' : $datatoimport));
|
||||
|
||||
if (empty($updatekeys) && !empty($objimport->array_import_preselected_updatekeys[0])) {
|
||||
$updatekeys = array_keys($objimport->array_import_preselected_updatekeys[0]);
|
||||
}
|
||||
|
||||
$objmodelimport = new ModeleImports();
|
||||
|
||||
$form = new Form($db);
|
||||
|
|
|
|||
Loading…
Reference in a new issue