diff --git a/include/class/acc_ledger_search.class.php b/include/class/acc_ledger_search.class.php index bf211a5b3..60ef7d600 100644 --- a/include/class/acc_ledger_search.class.php +++ b/include/class/acc_ledger_search.class.php @@ -38,10 +38,12 @@ class Acc_Ledger_Search 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 - private $inject_col; //< inject_code (string) code into list_operation + public $inject_col; //!< inject_code (callback function ) into list_operation // to add an extra column // (see Acc_Ledger_Search::list_operation). // All the HTML code must be in inject_code, including the TD tag + // example $this->inject_col = function() {echo "} + /** * @brief return a HTML string with the form for the search @@ -108,7 +110,6 @@ class Acc_Ledger_Search * @see build_search_sql * @see display_search_form * @see list_operation - * @example search_acc_operation.php */ function search_form() { @@ -797,10 +798,34 @@ class Acc_Ledger_Search * \see display_search_form * \see search_form @note $this->inject_code (string) code into Acc_Ledger_Search::list_operation - // to add an extra column - // (see Acc_Ledger_Search::list_operation). - // All the HTML code must be in inject_code, including the TD tag - * \return HTML string + * Example of using inject_col to inject a new column + * @code + %s // %s", $param['jr_id'], $param['jr_montant']); + } elseif ($param == 'header') + { + + return '