noalyss  Version-9
Public Member Functions | Data Fields
gestion_sold Class Reference

this object handles the table quant_sold More...

+ Inheritance diagram for gestion_sold:
+ Collaboration diagram for gestion_sold:

Public Member Functions

 get_list ()
 return an array of gestion_table, the object are retrieved thanks the qs_internal More...
 
 load ()
 
 search_by_jid ($p_jid)
 
- Public Member Functions inherited from gestion_table
 __construct ($p_cn)
 contains only the dabase connx More...
 

Data Fields

 $j_id
 
 $qs_client
 
 $qs_fiche
 
 $qs_id
 
 $qs_internal
 
 $qs_price
 
 $qs_quantite
 
 $qs_valid
 
 $qs_vat
 
 $qs_vat_code
 
 $qs_vat_sided
 
- Data Fields inherited from gestion_table
 $db
 

Detailed Description

this object handles the table quant_sold

Definition at line 32 of file gestion_sold.class.php.

Member Function Documentation

◆ get_list()

gestion_sold::get_list ( )

return an array of gestion_table, the object are retrieved thanks the qs_internal

Definition at line 48 of file gestion_sold.class.php.

49  {
50  if ($this->qs_internal=="")
51  throw new Exception(__FILE__.__LINE__." qs_internal est vide");
52  $sql="select qs_id,
53  qs_internal,
54  qs_fiche,
55  qs_quantite,
56  qs_price,
57  qs_vat,
58  tva_label,
59  tva_rate,
60  qs_vat_code,
61  qs_client,
62  j_id,
63  qs_vat_sided
64  from quant_sold left join tva_rate on (qs_vat_code=tva_id)
65  where qs_internal='".$this->qs_internal."'";
66  $ret=$this->db->exec_sql($sql);
67  // $res contains all the line
69 
70  if ( $res == FALSE || sizeof($res)==0) return null;
71  $count=0;
72 
73  foreach ($res as $row)
74  {
75  $t_gestion_sold=new gestion_sold($this->db);
76  foreach ($row as $idx=>$value)
77  $t_gestion_sold->$idx=$value;
78  $array[$count]=clone $t_gestion_sold;
79  $count++;
80  }
81  return $array;
82  }

References $array, $count, $idx, $res, $ret, $row, $sql, $value, db, and DatabaseCore\fetch_all().

+ Here is the call graph for this function:

◆ load()

gestion_sold::load ( )

Definition at line 92 of file gestion_sold.class.php.

93  {
94  $sql=" select qs_id,
95  qs_internal,
96  qs_fiche,
97  qs_quantite,
98  qs_price,
99  qs_vat,
100  qs_vat_code,
101  qs_client,
102  j_id,
103  qs_vat_sided
104  from quant_sold
105  where qs_id=$1";
106  $ret=$this->db->exec_sql($sql,array($this->qs_id));
107  // $res contains all the line
109 
110  if ( $res==FALSE || empty($res) ) return null;
111  foreach ($res[0] as $idx=>$value)
112  $this->$idx=$value;
113  }

References $idx, $res, $ret, $sql, $value, db, and DatabaseCore\fetch_all().

+ Here is the call graph for this function:

◆ search_by_jid()

gestion_sold::search_by_jid (   $p_jid)

Definition at line 83 of file gestion_sold.class.php.

84  {
85  $res=$this->db->exec_sql("select qs_id from quant_sold where j_id=".$p_jid);
86 
87  if ( Database::num_row($res) == 1)
88  $this->qs_id=Database::fetch_result($res,0,0);
89  else
90  $this->qs_id=0;
91  }

References $res, db, DatabaseCore\fetch_result(), and DatabaseCore\num_row().

+ Here is the call graph for this function:

Field Documentation

◆ $j_id

gestion_sold::$j_id

jrnx.j_id

Definition at line 43 of file gestion_sold.class.php.

◆ $qs_client

gestion_sold::$qs_client

f_id of the customer

Definition at line 41 of file gestion_sold.class.php.

◆ $qs_fiche

gestion_sold::$qs_fiche

f_id code

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

◆ $qs_id

gestion_sold::$qs_id

$qs_id primary key

Definition at line 34 of file gestion_sold.class.php.

◆ $qs_internal

gestion_sold::$qs_internal

qs_internal

Definition at line 35 of file gestion_sold.class.php.

◆ $qs_price

gestion_sold::$qs_price

price

Definition at line 38 of file gestion_sold.class.php.

◆ $qs_quantite

gestion_sold::$qs_quantite

quantity of the card

Definition at line 37 of file gestion_sold.class.php.

◆ $qs_valid

gestion_sold::$qs_valid

will not be used

Definition at line 42 of file gestion_sold.class.php.

◆ $qs_vat

gestion_sold::$qs_vat

vat_amount

Definition at line 39 of file gestion_sold.class.php.

◆ $qs_vat_code

gestion_sold::$qs_vat_code

vat_code

Definition at line 40 of file gestion_sold.class.php.

◆ $qs_vat_sided

gestion_sold::$qs_vat_sided

Definition at line 44 of file gestion_sold.class.php.


The documentation for this class was generated from the following file:
$ret
$ret
Definition: ajax_display_letter.php:51
DatabaseCore\fetch_all
static fetch_all($ret)
wrapper for the function pg_fetch_all
Definition: database_core.class.php:755
db
$SecUser db
Definition: export_security_pdf.php:118
$sql
$sql
Definition: ajax_add_concerned_card.php:100
$array
$array
Definition: ajax_add_concerned_card.php:115
DatabaseCore\fetch_result
static fetch_result($ret, $p_row=0, $p_col=0)
wrapper for the function pg_fetch_all
Definition: database_core.class.php:767
$value
$value
Definition: export_document.php:41
DatabaseCore\num_row
static num_row($ret)
wrapper for the function pg_NumRows
Definition: database_core.class.php:734
$idx
$idx
Definition: ajax_bookmark.php:79
$count
$count
Definition: modele.inc.php:251
$row
$row
Definition: ajax_anc_detail_operation.php:33
$res
$res
Definition: ajax_preference.php:49
gestion_sold
this object handles the table quant_sold
Definition: gestion_sold.class.php:32