Bonjour a tous,

Dans la branche develop, J'ai une question sur la méthode (html.form.class)showrefnav et son acolyte (CommonObject)load_previous_next_ref

Pour déterminer le next id et le prev id, on utilise systématiquement, dans (CommonObject)load_previous_next_ref : $this->ref (au niveau de la requete SQL < ou >) alors que dans la méthode (html.form.class)showrefnav, il y a bien un paramètre $fieldref qui n'est jamais utiliser. Voyez vous un inconvénient a ce que l'on transmette ce paramètre à (CommonObject)load_previous_next_ref pour ne plus être obliger de déclarer la propriété ref sur des objects qui n'en on pas ?
 Par exemple en remplacant dans (CommonObject)load_previous_next_ref
$sql.= " WHERE te.".$fieldid." < '".$this->db->escape($this->ref)."'";
par
$sql.= " WHERE te.".$fieldid." < '".$this->db->escape($this->$fieldref)."'";

Cordialement

-----------------------------------------------

Dear all,

In the develop branch, I've got a question/remark on method (html.form.class)showrefnav and her friend (CommonObject)load_previous_next_ref

To determine the next id and prev id, we use, in (CommonObject)load_previous_next_ref : $this->ref (in SQL query < ou >). Beside in the method (html.form.class)showrefnav, there is a parameters $fieldref that is use nowhere after. What do you think about send this parameters to (CommonObject)load_previous_next_ref to avoid to declare ref property on object that don't have one ?
for exemple by change in  (CommonObject)load_previous_next_ref
$sql.= " WHERE te.".$fieldid." < '".$this->db->escape($this->ref)."'";
by
$sql.= " WHERE te.".$fieldid." < '".$this->db->escape($this->$fieldref)."'";


Kind regards

--
Florian HENRY
[email protected]
+33 6 03 76 48 07
http://www.open-concept.pro


_______________________________________________
Dolibarr-dev mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/dolibarr-dev

Répondre à