|
noalyss
Version-6.7.2
|
this object handles the table quant_sold More...
Public Member Functions | |
| get_list () | |
| return an array of gestion_table, the object are retrieved thanks the qs_internal | |
| load () | |
| search_by_jid ($p_jid) | |
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 | |
this object handles the table quant_sold
Definition at line 33 of file class_gestion_sold.php.
return an array of gestion_table, the object are retrieved thanks the qs_internal
Definition at line 49 of file class_gestion_sold.php.
References $array, $count, $idx, $res, $ret, $row, $sql, $value, db, and Database\fetch_all().
{
if ($this->qs_internal=="")
throw new Exception(__FILE__.__LINE__." qs_internal est vide");
$sql="select qs_id,
qs_internal,
qs_fiche,
qs_quantite,
qs_price,
qs_vat,
tva_label,
tva_rate,
qs_vat_code,
qs_client,
j_id,
qs_vat_sided
from quant_sold left join tva_rate on (qs_vat_code=tva_id)
where qs_internal='".$this->qs_internal."'";
$ret=$this->db->exec_sql($sql);
// $res contains all the line
$res=Database::fetch_all($ret);
if ( sizeof($res)==0) return null;
$count=0;
foreach ($res as $row)
{
$t_gestion_sold=new gestion_sold($this->db);
foreach ($row as $idx=>$value)
$t_gestion_sold->$idx=$value;
$array[$count]=clone $t_gestion_sold;
$count++;
}
return $array;
}
Definition at line 93 of file class_gestion_sold.php.
References $idx, $res, $ret, $sql, $value, db, and Database\fetch_all().
{
$sql=" select qs_id,
qs_internal,
qs_fiche,
qs_quantite,
qs_price,
qs_vat,
qs_vat_code,
qs_client,
j_id,
qs_vat_sided
from quant_sold
where qs_id=$1";
$ret=$this->db->exec_sql($sql,array($this->qs_id));
// $res contains all the line
$res=Database::fetch_all($ret);
if ( empty($res) ) return null;
foreach ($res[0] as $idx=>$value)
$this->$idx=$value;
}
| gestion_sold::search_by_jid | ( | $ | p_jid | ) |
Definition at line 84 of file class_gestion_sold.php.
References $res, db, Database\fetch_result(), and Database\num_row().
{
$res=$this->db->exec_sql("select qs_id from quant_sold where j_id=".$p_jid);
if ( Database::num_row($res) == 1)
$this->qs_id=Database::fetch_result($res,0,0);
else
$this->qs_id=0;
}
| gestion_sold::$j_id |
jrnx.j_id
Definition at line 44 of file class_gestion_sold.php.
| gestion_sold::$qs_client |
f_id of the customer
Definition at line 42 of file class_gestion_sold.php.
| gestion_sold::$qs_fiche |
f_id code
Definition at line 37 of file class_gestion_sold.php.
| gestion_sold::$qs_id |
$qs_id primary key
Definition at line 35 of file class_gestion_sold.php.
| gestion_sold::$qs_internal |
qs_internal
Definition at line 36 of file class_gestion_sold.php.
| gestion_sold::$qs_price |
price
Definition at line 39 of file class_gestion_sold.php.
| gestion_sold::$qs_quantite |
quantity of the card
Definition at line 38 of file class_gestion_sold.php.
| gestion_sold::$qs_valid |
will not be used
Definition at line 43 of file class_gestion_sold.php.
| gestion_sold::$qs_vat |
vat_amount
Definition at line 40 of file class_gestion_sold.php.
| gestion_sold::$qs_vat_code |
vat_code
Definition at line 41 of file class_gestion_sold.php.
| gestion_sold::$qs_vat_sided |
Definition at line 45 of file class_gestion_sold.php.