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

this class manage data from the QUANT_SOLD table More...

+ Inheritance diagram for Acc_Sold:
+ Collaboration diagram for Acc_Sold:

Public Member Functions

 __construct ($p_cn, $p_jrid=0)
 
 compute_array ()
 
 get ()
 retrieve some common data from jrn as the datum, the comment,payment limit...
 
- Public Member Functions inherited from Acc_Operation
 __construct ($p_cn)
 constructor set automatically the attributes user and periode
 
 __toString ()
 
 display_jrnx_detail ($p_table)
 display_jrnx_detail : get the data from get_jrnx_data and return a string with HTML code
 
 find_tiers ($pn_jrn_id, $pn_jrnx_id, $p_code)
 Find the tiers of an operation , thanks the SQL prepared query prep_tiers and prep_counterpart.
 
 form_clone_operation ($p_id)
 create a form to recreate the operation and returns it, it works the same as when you want to correct an operation instead of confirming
 
 get_amount ()
 return amount of the jr_id
 
 get_currency_amount ()
 retrieve amount in currency for the operation
 
 get_data ($p_grpt)
 Get data from jrnx where p_grpt=jrnx(j_grpt)
 
 get_info ()
 retrieve info from the jrn_info, create 2 new arrays obj->info->command and obj->info->other the columns are the idx
 
 get_internal ()
 Return the internal value, the property jr_id must be set before.
 
 get_jrnx_detail ()
 retrieve data from jrnx
 
 get_ledger ()
 return the jrn_def_id from jrn
 
 get_quant ()
 retrieve data from the table QUANT_*
 
 get_sum_other_tax ()
 get the sum of other tax linked to this operation
 
 insert_jrn ()
 Insert into the table Jrn, the amount is computed from jrnx thanks the group id ($p_grpt)
 
 insert_jrnx ()
 Insert into the table Jrn The needed data are :
 
 insert_related_action ($p_string)
 
 operation_update_comment ($p_text)
 add a comment to the operation (jrn.jr_text)
 
 operation_update_date_limit ($p_text)
 add a limit of payment to the operation (jrn.jr_ech)
 
 save_info ($p_info, $p_type)
 Save into jrn_info.
 
 seek_group ()
 retrieve the grpt_id from jrn for a jr_id
 
 seek_internal ($p_internal)
 search an operation thankx it internal code
 
 set_id ($p_id)
 set the operation id (jrn.jr_id)
 
 set_paid ()
 flag the operation as paid
 
 update_comment ($p_text)
 add a comment to the line (jrnx.j_text)
 
 update_receipt ()
 set the pj of a operation in jrn. the jr_id must be set
 

Additional Inherited Members

- Static Public Member Functions inherited from Acc_Operation
static select_operation_type ($p_status)
 Return a select object to choose the type of operation.
 
static test_me ()
 
- Data Fields inherited from Acc_Detail
 $det
 
 $info
 
 $jr_id
 
- Data Fields inherited from Acc_Operation
 $amount
 
 $currency_id
 
 $currency_rate
 
 $currency_rate_ref
 
 $date
 
 $date_paid
 
 $db
 
 $debit
 
 $desc
 
 $echeance
 
 $f_id
 
 $grpt
 
 $jr_id
 
 $jr_internal
 
 $jr_optype
 
 $jrn
 
 $jrn_id
 
 $jrnx_id
 
 $mt
 
 $periode
 
 $pj
 
 $poste
 
 $qcode
 < Qcode of item
 
 $signature
 
 $type
 
 $user
 

Detailed Description

this class manage data from the QUANT_SOLD table

Note
Data member are the column of the table

Definition at line 1152 of file acc_operation.class.php.

Constructor & Destructor Documentation

◆ __construct()

Acc_Sold::__construct ( $p_cn,
$p_jrid = 0 )

Reimplemented from Acc_Detail.

Definition at line 1154 of file acc_operation.class.php.

1155 {
1156 parent::__construct($p_cn,$p_jrid);
1157 $this->signature='VEN';
1158 $this->det=new stdClass();
1159 }

Member Function Documentation

◆ compute_array()

Acc_Sold::compute_array ( )

Reimplemented from Acc_Detail.

Definition at line 1192 of file acc_operation.class.php.

1193 {
1194 $this->get();
1195 $array=parent::compute_array();
1196 $nb_array=count($this->det->array);
1197 $array['nb_item']=$nb_array;
1198
1199
1200 $array["e_client"]=$this->db->get_value("select ad_value from fiche_detail where f_id=$1 and ad_id=23",
1201 array($this->det->array[0]['qs_client']));
1202
1203 for ($i=0;$i<$nb_array;$i++) {
1204 $array["e_march".$i]=$this->db->get_value("select ad_value from fiche_detail where f_id=$1 and ad_id=23",
1205 array($this->det->array[$i]['qs_fiche']));
1206
1207 $array["e_march".$i."_price"]=$this->det->array[$i]['qs_unit'];
1208 $array["e_march".$i."_label"]=$this->det->array[$i]['j_text'];
1209 $array["e_march".$i."_tva_id"]=$this->det->array[$i]['qs_vat_code'];
1210 $array["e_march".$i."_tva_amount"]=$this->det->array[$i]['qs_vat'];
1211 $array["e_quant".$i]=$this->det->array[$i]['qs_quantite'];
1212 }
1213 $array['correct']=1;
1214 return $array;
1215
1216 }
$SecUser db

References $array, $i, $nb_array, and db.

◆ get()

Acc_Sold::get ( )

retrieve some common data from jrn as the datum, the comment,payment limit...

Reimplemented from Acc_Detail.

Definition at line 1160 of file acc_operation.class.php.

1161 {
1162 parent::get();
1163 $sql="
1164 select qs_id, qs_internal
1165, jx1.j_id
1166, qs1.qs_fiche
1167, qs1.qs_quantite
1168, qs1.qs_price
1169, qs1.qs_vat
1170, qs1.qs_vat_code
1171, qs1.qs_client
1172, qs1.qs_valid
1173, jx1.j_text
1174, qs_vat_sided
1175, qs_unit
1176, jx1.j_debit
1177,oc1.oc_amount
1178,oc1.oc_vat_amount
1179,oc1.oc_price_unit
1180from quant_sold qs1
1181join jrnx jx1 using(j_id)
1182left join operation_currency oc1 using(j_id)
1183where jx1.j_grpt = $1
1184order by jx1.j_id;
1185 ";
1186 $this->det->array=$this->db->get_array($sql,array($this->det->jr_grpt_id));
1187 }

References $sql, and db.


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