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

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. More...
 
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
 
 $grpt
 
 $jr_id
 
 $jr_internal
 
 $jr_optype
 
 $jrn
 
 $jrn_id
 
 $periode
 
 $poste
 
 $qcode
 < Qcode of item More...
 
 $signature
 
 $user
 

Detailed Description

this class manage data from the QUANT_SOLD table

Note
Data member are the column of the table

Definition at line 1075 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 1077 of file acc_operation.class.php.

1078 {
1079 parent::__construct($p_cn,$p_jrid);
1080 $this->signature='VEN';
1081 $this->det=new stdClass();
1082 }

Member Function Documentation

◆ compute_array()

Acc_Sold::compute_array ( )

Reimplemented from Acc_Detail.

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

1096 {
1097 $this->get();
1098 $array=parent::compute_array();
1099 $nb_array=count($this->det->array);
1100 $array['nb_item']=$nb_array;
1101
1102
1103 $array["e_client"]=$this->db->get_value("select ad_value from fiche_detail where f_id=$1 and ad_id=23",
1104 array($this->det->array[0]['qs_client']));
1105
1106 for ($i=0;$i<$nb_array;$i++) {
1107 $array["e_march".$i]=$this->db->get_value("select ad_value from fiche_detail where f_id=$1 and ad_id=23",
1108 array($this->det->array[$i]['qs_fiche']));
1109
1110 $array["e_march".$i."_price"]=$this->det->array[$i]['qs_unit'];
1111 $array["e_march".$i."_label"]=$this->det->array[$i]['j_text'];
1112 $array["e_march".$i."_tva_id"]=$this->det->array[$i]['qs_vat_code'];
1113 $array["e_march".$i."_tva_amount"]=$this->det->array[$i]['qs_vat'];
1114 $array["e_quant".$i]=$this->det->array[$i]['qs_quantite'];
1115 }
1116 $array['correct']=1;
1117 return $array;
1118
1119 }
$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 1083 of file acc_operation.class.php.

1084 {
1085 parent::get();
1086 $sql="SELECT qs_id, qs_internal, qs_fiche, qs_quantite, qs_price, qs_vat,
1087 qs_vat_code, qs_client, qs_valid, j_id,j_text,qs_vat_sided , qs_unit , j_debit
1088 FROM quant_sold join jrnx using(j_id) where j_grpt=$1 order by j_id";
1089 $this->det->array=$this->db->get_array($sql,array($this->det->jr_grpt_id));
1090 }

References $sql, and db.


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