Go to the documentation of this file.00001 <?php
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030 require_once ('class_gestion_table.php');
00031
00032
00033 class gestion_sold extends gestion_table
00034 {
00035 var $qs_id;
00036 var $qs_internal;
00037 var $qs_fiche;
00038 var $qs_quantite;
00039 var $qs_price;
00040 var $qs_vat;
00041 var $qs_vat_code;
00042 var $qs_client;
00043 var $qs_valid;
00044 var $j_id;
00045
00046
00047
00048 function get_list()
00049 {
00050 if ($this->qs_internal=="")
00051 exit (__FILE__.__LINE__." qs_internal est vide");
00052 $sql="select qs_id,
00053 qs_internal,
00054 qs_fiche,
00055 qs_quantite,
00056 qs_price,
00057 qs_vat,
00058 tva_label,
00059 tva_rate,
00060 qs_vat_code,
00061 qs_client,
00062 j_id
00063 from quant_sold left join tva_rate on (qs_vat_code=tva_id)
00064 where qs_internal='".$this->qs_internal."'";
00065 $ret=$this->db->exec_sql($sql);
00066
00067 $res=Database::fetch_all($ret);
00068
00069 if ( sizeof($res)==0) return null;
00070 $count=0;
00071
00072 foreach ($res as $row)
00073 {
00074 $t_gestion_sold=new gestion_sold($this->db);
00075 foreach ($row as $idx=>$value)
00076 $t_gestion_sold->$idx=$value;
00077 $array[$count]=clone $t_gestion_sold;
00078 $count++;
00079 }
00080 return $array;
00081 }
00082 }