* * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /*** * @file * @brief class Acc_Plan_MTabme * @see Acc_Plan_MTabme * */ require_once NOALYSS_INCLUDE.'/database/acc_plan_sql.class.php'; require_once NOALYSS_INCLUDE.'/lib/manage_table_sql.class.php'; /** * @brief this instance extends Manage_Table_SQL and aims to manage * the Table tmp_pcmn thanks a web interface (add , delete, display...) * * @see Acc_Plan_SQL */ class Acc_Plan_MTable extends Manage_Table_SQL { function __construct(Acc_Plan_SQL $p_table) { $this->table = $p_table; parent::__construct($p_table); //-------------------------------------------------------------- //Set the table header //-------------------------------------------------------------- $this->set_col_label("pcm_val", _("Poste Comptable")); $this->set_col_label("pcm_type", _("Type")); $this->set_col_label("pcm_lib", _("Libellé")); $this->set_col_label("parent_accounting", _("Dépend")); $this->set_col_label("fiche_qcode", _("Fiche")); $this->set_col_label("pcm_direct_use", _("Utilisation directe")); //-------------------------------------------------------------- $this->set_property_visible("id", FALSE); $this->set_property_updatable("fiche_qcode", FALSE); $this->set_col_type("pcm_type", "select", [ ["label"=>_("Actif"),"value"=>"ACT"], ["label"=>_("Actif inversé"),"value"=>"ACTINV"], ["label"=>_("Passif"),"value"=>"PAS"], ["label"=>_("Passif Inversé"),"value"=>"PASINV"], ["label"=>_("Charge"),"value"=>"CHA"], ["label"=>_("Charge inversé"),"value"=>"CHAINV"], ["label"=>_("Produit"),"value"=>"PRO"], ["label"=>_("Produit inversé"),"value"=>"PROINV"], ["label"=>_("Contexte"),"value"=>"CON"] ]); $this->set_col_type("pcm_direct_use", "select",array(["label"=>_("Oui"),"value"=>"Y"],["label"=>"Non","value"=>"N"])); $this->a_order=["pcm_val","pcm_lib","parent_accounting","pcm_direct_use","pcm_type","fiche_qcode"]; $this->set_icon_mod("first"); } /** * Display a row * @param type $p_row array of value key column=>value */ function display_row($p_row) { printf('