noalyss Version-9
Public Member Functions
Acc_Purchase Class Reference

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

+ Inheritance diagram for Acc_Purchase:
+ Collaboration diagram for Acc_Purchase:

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_PURCHASE table

Note
Data member are the column of the table

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

Constructor & Destructor Documentation

◆ __construct()

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

Reimplemented from Acc_Detail.

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

1133 {
1134 parent::__construct($p_cn,$p_jrid);
1135 $this->signature='ACH';
1136 }

Member Function Documentation

◆ compute_array()

Acc_Purchase::compute_array ( )

Reimplemented from Acc_Detail.

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

1152 {
1153 $this->get();
1154 $array=parent::compute_array();
1155 $nb_array=count($this->det->array);
1156 $array['nb_item']=$nb_array;
1157
1158
1159 $array["e_client"]=$this->db->get_value("select ad_value from fiche_detail where f_id=$1 and ad_id=23",
1160 array($this->det->array[0]['qp_supplier']));
1161
1162 for ($i=0;$i<$nb_array;$i++) {
1163 $array["e_march".$i]=$this->db->get_value("select ad_value from fiche_detail where f_id=$1 and ad_id=23",
1164 array($this->det->array[$i]['qp_fiche']));
1165
1166 $array["e_march".$i."_price"]=$this->det->array[$i]['qp_unit'];
1167 $array["e_march".$i."_label"]=$this->det->array[$i]['j_text'];
1168 $array["e_march".$i."_tva_id"]=$this->det->array[$i]['qp_vat_code'];
1169 $array["e_march".$i."_tva_amount"]=$this->det->array[$i]['qp_vat'];
1170 $array["e_quant".$i]=$this->det->array[$i]['qp_quantite'];
1171 }
1172 $array['correct']=1;
1173 return $array;
1174
1175 }
$SecUser db

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

◆ get()

Acc_Purchase::get ( )

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

Reimplemented from Acc_Detail.

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

1139 {
1140 parent::get();
1141 $sql="SELECT qp_id, qp_internal, j_id, qp_fiche, qp_quantite, qp_price, qp_vat,
1142 qp_vat_code, qp_nd_amount, qp_nd_tva, qp_nd_tva_recup, qp_supplier,
1143 qp_valid, qp_dep_priv,j_text,qp_vat_sided,qp_unit , j_debit
1144 FROM quant_purchase join jrnx using(j_id) where j_grpt=$1 order by j_id";
1145 $this->det->array=$this->db->get_array($sql,array($this->det->jr_grpt_id));
1146 }

References $sql, and db.


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