diff --git a/html/js/noalyss_script.js b/html/js/noalyss_script.js
index 8270a4a10..684f20544 100644
--- a/html/js/noalyss_script.js
+++ b/html/js/noalyss_script.js
@@ -1302,8 +1302,8 @@ function save_predf_op(obj) {
/**
*ctl_concern is the widget to update
*amount_id is either a html obj. or an amount and the field tiers if given
- * @param {type} dossier
- * @param {type} ctl_concern
+ * @param {int} dossier
+ * @param {string} ctl_concern DOM id that receive the number
* @param {float or string} amount_id Amount or DOM Id of the element containing the amount
* @param {float} ledger
* @param {type} p_id_targetDom Element (div) where to display the search result
@@ -1369,15 +1369,16 @@ function search_reconcile(dossier, ctl_concern, amount_id, ledger, p_id_target,
}
/**
- * search in a popin obj if the object form
+ * search in a popin obj if the object form,
+ * @param obj DOM of the FORM
*/
function search_operation(obj) {
try {
var dossier = id$('gDossier').value;
waiting_box();
var target = "search" + layer;
- if (document.getElementById(obj)["target"]) {
- target = id$(obj)["target"].value;
+ if (obj["target"]) {
+ target = obj["target"].value;
}
var qs = Form.serialize('search_form_ajx') + "&op=search_op";
var action = new Ajax.Request('ajax_misc.php',
diff --git a/include/ajax/ajax_search_operation.php b/include/ajax/ajax_search_operation.php
index afc86d173..6f42d7591 100644
--- a/include/ajax/ajax_search_operation.php
+++ b/include/ajax/ajax_search_operation.php
@@ -18,8 +18,23 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
// Copyright Author Dany De Bontridder danydb@aevalys.eu
-/*! \file
+/*!
+ * \file
* \brief Search module
+ * \see javascript search_reconcile
+
+\param dossier_id int in $_GET dossier id needed to connect to the right folder
+\param ctlc in $_GET string of DOM ID that receives the result when operation is selected
+\param tiers in $_GET
+\param amount_id float in $_GET amount to search
+\param target in $_GET element to update
+\param hide_operation in $_GET
+\param single_operation in $_GET
+ */
+
+/**
+ * @var $op comes from $_GET['op'] , that is the parameter from ajax to select the action (route) to perform.
+ * @var $g_user type of Noalyss_User , connected user
*/
if (!defined('ALLOWED'))
die('Appel direct ne sont pas permis');
@@ -35,6 +50,7 @@ $cn=Dossier::connect();
$base=basename($_SERVER['PHP_SELF']);
+
$inside=false;
$tiers=$http->get("tiers", "string", "");
// With the amount id, we find the amount in a html elt
@@ -83,7 +99,8 @@ if (isset($_GET['amount_min'])&&isset($_GET['amount_max'])&&($_GET['amount_max']
);
}
//-----------------------------------------------------
-// Display search result
+// Display search result, value from the search FORM
+//
//-----------------------------------------------------
if (isset($_GET['viewsearch']))
{
diff --git a/include/class/acc_ledger_search.class.php b/include/class/acc_ledger_search.class.php
index d94dd2a37..3dc0524f0 100644
--- a/include/class/acc_ledger_search.class.php
+++ b/include/class/acc_ledger_search.class.php
@@ -35,10 +35,10 @@ class Acc_Ledger_Search
protected $cn; //!< Database Connection
private $type; //!< type of ledger : FIN,ODS,VEN,ACH
- private $all; //!< Flag to indicate if all ledgers must searched (1 for yes)
- private $div; //! prefix for id of DOM id
- //! id of the ledger
- var $id ;
+ private $all; //!< Flag to indicate if all ledgers must be searched (1 for yes)
+ private $div; //!< prefix for id of DOM id
+ var $id ; //!< id of the ledger
+
/**
* @brief return a HTML string with the form for the search
* @param $p_type if the type of ledger possible values=ALL,VEN,ACH,ODS,FIN: uppercase !
@@ -49,7 +49,7 @@ class Acc_Ledger_Search
* @param $div is the div (for reconciliation)
* @param type $p_type
* @param type $p_all
- * @param type $p_div
+ * @param string $p_div name of the HTML DIV
*
* @todo the parameter $all_type_ledger is useless : ALL means all the ledgers, VEN all the ledger of sales...
*/
@@ -258,7 +258,7 @@ class Acc_Ledger_Search
}
/**
- * Build the button for managing the filter for search
+ * @brief Build the button for managing the filter for search
* @param type $p_div id prefix of the div, button, table ..
* @param $this->type if the type of ledger possible values=ALL,VEN,ACH,ODS,FIN
* @param $all_type_ledger