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

Contains the detail of an operation Acc_Operation propery : More...

+ Inheritance diagram for Acc_Detail:
+ Collaboration diagram for Acc_Detail:

Public Member Functions

 __construct ($p_cn, $p_jrid=0)
 constructor set automatically the attributes user and periode
 
 __toString ()
 
 compute_array ()
 
 get ()
 retrieve some common data from jrn as the datum, the comment,payment limit...
 
- Public Member Functions inherited from Acc_Operation
 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
 

Data Fields

 $det
 Object with columns from JRN.
 
 $info
 $jr_id (int) JRN.JR_ID
 
 $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
 

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 ()
 

Detailed Description

Contains the detail of an operation Acc_Operation propery :

  • $det
    • jr_id PKfrom table JRN
    • jr_def_id id of the ledger (FK to - _DEF- _DEF_ID)from table JRN
    • jr_montant AMOUNT of the operationfrom table JRN
    • jr_comment COMMENT from table JRN
    • jr_date DATEfrom table JRN
    • jr_grpt_id CODE to group - X rowsfrom table JRN
    • jr_internal INTERNAL CODEfrom table JRN
    • jr_tech_date DATE OF CHANGEfrom table JRN
    • jr_tech_per FK TO PARAM_PERIODEP_IDfrom table JRN
    • jrn_ech from table JRN
    • jr_ech DATE LIMIT OF PAYMENTfrom table JRN
    • jr_rapt from table JRN
    • jr_echfrom table JRN
    • jr_validfrom table JRN
    • jr_opid from table JRN
    • jr_c_opidfrom table JRN
    • jr_pj OID OF THE DOCUMENTfrom table JRN
    • jr_pj_name NAME OF THE DOCUMENTfrom table JRN
    • jr_pj_typefrom table JRN
    • jr_pj_number RECEIPT NBfrom table JRN
    • jr_mt INTERNAL CODEfrom table JRN
    • jr_raptfrom table JRN
    • jr_date_paid DATE OF PAYMENTfrom table JRN
    • jr_optype TYPE OF OPERATION NOR = NORMAL OPE=OPENING EXT=EXTOURNEfrom table JRN
    • currency_id FK TO CURRENCYIDfrom table JRN
    • currency_rate amountfrom table JRN
    • currency_rate_ref amount in CURRENT_HISTORYCH_VALUEfrom table JRN
    • note from table JRN_NOTE
  • $jr_id JRN.JR_ID
  • $info

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

Constructor & Destructor Documentation

◆ __construct()

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

constructor set automatically the attributes user and periode

Parameters
$p_cnthe databse connection

Reimplemented from Acc_Operation.

Reimplemented in Acc_Fin, Acc_Misc, Acc_Purchase, and Acc_Sold.

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

1074 {
1075 parent::__construct($p_cn);
1076 $this->jr_id=$p_jrid;
1077 $this->det=new stdClass();
1078 }
$op jr_id

References jr_id.

Member Function Documentation

◆ __toString()

Acc_Detail::__toString ( )

Reimplemented from Acc_Operation.

Reimplemented in Acc_Fin, Acc_Misc, Acc_Purchase, and Acc_Sold.

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

1143 : string
1144 {
1145 $r= __CLASS__;
1146 $r.="this->signature ".$this->signature."\n";
1147 $r.="this->det ".print_r($this->det,true);
1148
1149 return $r;
1150
1151 }
catch(Exception $exc) if(! $g_user->can_write_action($ag_id)) $r

References $r.

◆ compute_array()

Acc_Detail::compute_array ( )

Reimplemented in Acc_Fin, Acc_Misc, Acc_Purchase, and Acc_Sold.

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

1134 {
1135 $array=array();
1136 $array['desc']=$this->det->jr_comment;
1137 $array['e_date']="";
1138 $array['e_ech']="";
1139 $array['p_jrn']=$this->det->jr_def_id;
1140 return $array;
1141
1142 }

References $array.

◆ get()

Acc_Detail::get ( )

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

Reimplemented from Acc_Operation.

Reimplemented in Acc_Fin, Acc_Misc, Acc_Purchase, and Acc_Sold.

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

1084 {
1085 $sql="SELECT jr_id
1086 , jr_def_id
1087 , jr_montant
1088 , jr_comment
1089 , jr_date
1090 , jr_grpt_id
1091 , jr_internal
1092 , jr_tech_date
1093 , jr_tech_per
1094 , jrn_ech
1095 , jr_ech
1096 , jr_rapt
1097 ,jr_ech
1098 , jr_valid
1099 , jr_opid
1100 , jr_c_opid
1101 , jr_pj
1102 , jr_pj_name
1103 , jr_pj_type,
1104 jr_pj_number
1105 , jr_mt
1106 ,jr_rapt
1107 ,jr_date_paid
1108 ,jr_optype
1109 ,currency_id
1110 ,currency_rate
1111 ,currency_rate_ref
1112 ,jr_document_xml
1113 FROM jrn where jr_id=$1";
1114 $array=$this->db->get_array($sql,array($this->jr_id));
1115 if ( count($array) == 0 ) throw new Exception('Aucune ligne trouvée');
1116 foreach ($array[0] as $key=>$val)
1117 {
1118 $this->det->$key=$val;
1119 }
1120 $sql="select n_text,n_html from jrn_note where jr_id=$1";
1121 $a=$this->db->get_row($sql,array($this->jr_id));
1122 if ( empty($a)) {
1123 $this->det->note="";
1124 $this->det->note_html=null;
1125 } else {
1126 $this->det->note=strip_tags($a['n_text']??"");
1127 $this->det->note_html=($a['n_html'] == "")?$a['n_text']:$a['n_html'];
1128 }
1129 }
$SecUser db

References $a, $array, $sql, db, and jr_id.

Field Documentation

◆ $det

Acc_Detail::$det

Object with columns from JRN.

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

◆ $info

Acc_Detail::$info

$jr_id (int) JRN.JR_ID

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

◆ $jr_id

Acc_Detail::$jr_id

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


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