noalyss Version-10
NOALYSS : serveur de comptabilité et ERP (2002)
Loading...
Searching...
No Matches
V_Tva_Rate_SQL Class Reference

ORM abstract of the view public.v_tva_rate. More...

+ Inheritance diagram for V_Tva_Rate_SQL:
+ Collaboration diagram for V_Tva_Rate_SQL:

Public Member Functions

 __construct (DatabaseCore $p_cn, $p_id=-1)
 
- Public Member Functions inherited from Table_Data_SQL
 __construct ($p_cn, $p_id=-1)
 
 __toString ()
 
 build_query ()
 Build the SQL select statement for querying the object and returns it.
 
 column_update ($column_expr, $value)
 update the value of a column with an expression for $value for the current record
 
 count ($p_where="", $p_array=null)
 return the number of count in the table corresponding to the where condition
 
 delete ()
 
 exist ()
 Count the number of record with the id ,.
 
 get_all_to_array ($p_key_col, $p_cond="", $p_array=NULL)
 Get all the row and use the p_key_code are the key value of array.
 
 insert ()
 
 load ()
 load a row , corresponding to the primary key
 
 seek ($cond='', $p_array=null)
 retrieve array of object thanks a condition
 
 update ()
 update the row but not the column with a default value
 
- Public Member Functions inherited from Data_SQL
 __get ($cols)
 
 __set ($cols, $p_value)
 
 collect_objects ($cond='', $p_array=null)
 return an array of objects.
 
 from_array ($p_array)
 Transform an array into object.
 
 get ($cols)
 get the value thanks the colum name and not the alias (name).
 
 get_a_virtual_col ()
 return array of virtual cols (alias calculated, formatted cols)
 
 get_cn ()
 
 get_info ()
 
 get_name ()
 
 get_object ($p_ret, $idx)
 
 get_pk_value ()
 
 get_primary_key ()
 
 get_type ()
 
 getp ($cols)
 set the value thanks the alias name instead of the colum name if not found try the column name
 
 next ($ret, $i)
 get_seek return the next object, the return of the query must have all the column of the object including the virtual columns
 
 save ()
 Insert or update : if the row already exists, update otherwise insert.
 
 set ($cols, $p_value)
 set the value thanks the colum name and not the alias (name)
 
 set_cn ($cn)
 
 set_name ($name)
 
 set_pk_value ($p_value)
 
 set_primary_key ($primary_key)
 
 set_type ($type)
 
 set_virtual_col ($col_name, $sql_expression)
 add a virtual column (formatted column, sum of 2 col, ...)
 
 setp ($cols, $p_value)
 set the value thanks the alias name instead of the colum name, if not found try the column name
 
 to_array ($prefix="")
 Turn an object (row) into an array, and the key could be prefixed with $prefix.
 
 to_row ($p_array)
 update the data member of current object with the value from the array.
 
 verify ()
 

Additional Inherited Members

- Data Fields inherited from Data_SQL
 $cn
 
 $date_format
 Type of the data.
 
 $default
 defaullt date format
 
 $name
 Database connection.
 
 $primary_key
 Array of logical and real name.
 
 $table
 
 $type
 Column name of the primary key.
 
- Protected Attributes inherited from Data_SQL
 $a_virtual_col
 

Detailed Description

ORM abstract of the view public.v_tva_rate.

Examples
tva_parameter.php.

Definition at line 33 of file v_tva_rate_sql.class.php.

Constructor & Destructor Documentation

◆ __construct()

V_Tva_Rate_SQL::__construct ( DatabaseCore $p_cn,
$p_id = -1 )

Reimplemented from Data_SQL.

Definition at line 36 of file v_tva_rate_sql.class.php.

37 {
38 $this->table="public.v_tva_rate";
39 $this->primary_key="tva_id";
40 /*
41 * List of columns
42 */
43 $this->name=array(
44 "tva_id"=>"tva_id"
45 ,'tva_code'=>"tva_code"
46 , "tva_label"=>"tva_label"
47 , "tva_rate"=>"tva_rate"
48 , "tva_comment"=>"tva_comment"
49 , "tva_purchase"=>"tva_purchase"
50 , "tva_sale"=>"tva_sale"
51 , "tva_both_side"=>"tva_both_side"
52 ,'tva_reverse_account'=>'tva_reverse_account'
53 ,'tva_payment_purchase'=>'tva_payment_purchase'
54 ,'tva_payment_sale'=>'tva_payment_sale'
55 ,'tva_peppol_code'=>'tva_peppol_code'
56 , 'vx_code'=>'vx_code'
57
58 );
59 /*
60 * Type of columns
61 */
62 $this->type=array(
63 "tva_id"=>"numeric"
64 ,'tva_code'=>'text'
65 , "tva_label"=>"text"
66 , "tva_rate"=>"numeric"
67 , "tva_comment"=>"text"
68 , "tva_purchase"=>"text"
69 , "tva_sale"=>"text"
70 , "tva_both_side"=>"numeric"
71 ,'tva_reverse_account'=>'text'
72 , 'tva_payment_purchase'=>'text'
73 , 'tva_payment_sale'=>'text'
74 ,'tva_peppol_code'=>'text'
75 , 'vx_code'=>'text'
76 );
77
78
79 $this->default=array(
80 "tva_id"=>"auto"
81 );
82
83 $this->date_format="DD.MM.YYYY";
84 parent::__construct($p_cn, $p_id);
85 }
$from_poste name
$input_from type
$all table

References $p_id, name, table, and type.


The documentation for this class was generated from the following file: