noalyss  Version-6.7.2
Public Member Functions | Data Fields
Pre_operation_detail Class Reference

mother of the pre_op_XXX, it contains only one data : an object Pre_Operation. The child class contains an array of Pre_Operation object More...

Inheritance diagram for Pre_operation_detail:
Pre_op_ach Pre_Op_Advanced Pre_op_fin Pre_op_ods Pre_op_ven

Public Member Functions

 __construct ($p_cn, $p_id=0)
 count ()
 count the number of pred operation for a ledger
 form_get ($p_url)
 show a form to use pre_op
 get ($p_param)
 get_operation ()
 get_post ()
 set ($p_param, $value)
 show_button ($p_url)
 show the button for selecting a predefined operation

Data Fields

 $operation

Detailed Description

mother of the pre_op_XXX, it contains only one data : an object Pre_Operation. The child class contains an array of Pre_Operation object

Definition at line 232 of file class_pre_operation.php.


Constructor & Destructor Documentation

Pre_operation_detail::__construct ( p_cn,
p_id = 0 
)

Reimplemented in Pre_op_ach, Pre_op_ods, and Pre_op_ven.

Definition at line 235 of file class_pre_operation.php.

References db.

Referenced by Pre_Op_Advanced\Pre_Op_Advanced().

    {
        $this->db=$p_cn;
        $this->operation=new Pre_operation($this->db);
        $this->valid=array('ledger'=>'jrn_def_id','ledger_type'=>'jrn_type','direct'=>'od_direct');
                $this->jrn_def_id=-1;
    }

Member Function Documentation

count the number of pred operation for a ledger

Definition at line 260 of file class_pre_operation.php.

References $a, and db.

Referenced by show_button().

    {
        $a=$this->db->count_sql("select od_id,od_name from op_predef ".
                                " where jrn_def_id=".$this->jrn_def_id.
                                " and od_direct ='".$this->od_direct."'".
                                " order by od_name");
        return $a;
    }

show a form to use pre_op

Definition at line 246 of file class_pre_operation.php.

References $hid, $p_url, $r, HtmlInput\button_action(), show_button(), and HtmlInput\title_box().

    {
        $r=HtmlInput::button_action("Modèle d'opérations", ' $(\'modele_op_div\').style.display=\'block\';$(\'lk_modele_op_tab\').focus();');
        $r.='<div id="modele_op_div" class="noprint">';
        $r.=HtmlInput::title_box("Modèle d'opérations ", 'modele_op_div', 'hide');
        $hid=new IHidden();
        $r.=$hid->input("action","use_opd");
        $r.=$hid->input("jrn_type",$this->get("ledger_type"));
        $r.= $this->show_button($p_url);
        $r.='</div>';
        return $r;

    }
Pre_operation_detail::get ( p_param)

Definition at line 314 of file class_pre_operation.php.

References echo, and exit.

    {

        if ( ! isset ($this->valid[$p_param] ) )
        {
            echo(" le parametre $p_param n'existe pas ".__FILE__.':'.__LINE__);
            exit();
        }
        $attr=$this->valid[$p_param];
        return $this->$attr;
    }

Definition at line 295 of file class_pre_operation.php.

References $value, db, and sql_string().

    {
                if ( $this->jrn_def_id=='') return array();
        $value=$this->db->make_array("select od_id,od_name from op_predef ".
                                     " where jrn_def_id=".sql_string($this->jrn_def_id).
                                     " and od_direct ='".sql_string($this->od_direct)."'".
                                     " order by od_name",1);
        return $value;
    }

Reimplemented in Pre_op_ach, Pre_op_fin, Pre_op_ods, Pre_op_ven, and Pre_Op_Advanced.

Definition at line 326 of file class_pre_operation.php.

    {
        $this->operation->get_post();
    }
Pre_operation_detail::set ( p_param,
value 
)

Definition at line 304 of file class_pre_operation.php.

References $value, echo, and exit.

    {
        if ( ! isset ($this->valid[$p_param] ) )
        {
            echo(" le parametre $p_param n'existe pas ".__FILE__.':'.__LINE__);
            exit();
        }
        $attr=$this->valid[$p_param];
        $this->$attr=$value;
    }

show the button for selecting a predefined operation

Definition at line 269 of file class_pre_operation.php.

References $p_url, $r, $value, count(), and db.

Referenced by form_get().

    {
        
        
        $value=$this->db->get_array("select od_id,od_name,od_description from op_predef ".
                                     " where jrn_def_id=$1".
                                     " and od_direct =$2".
                                     " order by od_name",array($this->jrn_def_id,$this->od_direct ));
        
        if ( $this->jrn_def_id=='') $value=array();
        
        $r="";
        $r.='<h2>Choississez un modèle</h2>';
        $r.='Filtrer '.HtmlInput::filter_table('modele_op_tab', '0', '0');
        $r.='<table style="width:100%" id="modele_op_tab">';
        for ($i=0;$i<count($value);$i++) {
            $r.='<tr class="'.(($i%2==0)?"even":"odd").'">';
            $r.='<td style="font-weight:bold;vertical-align:top;text-decoration:underline">';
            $r.=sprintf('<a href="%s&pre_def=%s" onclick="waiting_box()">%s</a> ',$p_url,$value[$i]['od_id'],$value[$i]['od_name']);
            $r.='</td>';
            $r.='<td>'.h($value[$i]['od_description']).'</td>';
            $r.='</tr>';
        }
        $r.='</table>';
        return $r;
    }

Field Documentation

Pre_operation_detail::$operation

Definition at line 234 of file class_pre_operation.php.


The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Enumerations