Acc_Ledger_Search : Inject column

This commit is contained in:
sparkyx 2025-12-06 17:57:54 +01:00
parent 61fc4856e2
commit 55b1a11f6a

View file

@ -38,7 +38,11 @@ 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 into list_operation to add an extra column
private $inject_col; //< inject_code (string) code 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
/**
* @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 !
@ -792,7 +796,10 @@ class Acc_Ledger_Search
* \see build_search_sql
* \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
*/
public function list_operation($sql, $offset, $p_paid=0)
@ -1042,7 +1049,14 @@ class Acc_Ledger_Search
}
else
$r.="<TD></TD>";
//< inject_code (string) code 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
if ( $this->inject_col != null)
{
$r.=$this->inject_col;
}
// end row
$r.="</tr>";
}