noalyss Version-9
Public Member Functions | Static Public Member Functions | Private Attributes
Acc_Operation_Note Class Reference
+ Collaboration diagram for Acc_Operation_Note:

Public Member Functions

 __construct (Jrn_Note_SQL $p_Jrn_Note_SQL)
 
 fromPost ()
 
 getJrnNoteSql ()
 
 getNote ()
 
 getOperation_id ()
 
 load ()
 
 print ()
 
 save ()
 
 setJrnNoteSql (Jrn_Note_SQL $jrn_note_sql)
 
 setNote ($p_note)
 
 setOperation_id ($p_jrid)
 

Static Public Member Functions

static build_jrn_id ($p_jr_id)
 
static input ($p_current)
 

Private Attributes

 $id
 
 $jrn_note_sql
 
 $note
 
 $operation_id
 jrn.jr_id More...
 

Detailed Description

Definition at line 32 of file acc_operation_note.class.php.

Constructor & Destructor Documentation

◆ __construct()

Acc_Operation_Note::__construct ( Jrn_Note_SQL  $p_Jrn_Note_SQL)

Definition at line 39 of file acc_operation_note.class.php.

40 {
41 $this->jrn_note_sql = $p_Jrn_Note_SQL;
42 $this->id=$p_Jrn_Note_SQL->n_id;
43 $this->note=$p_Jrn_Note_SQL->n_text;
44 $this->operation_id=$p_Jrn_Note_SQL->jr_id;
45 }

Member Function Documentation

◆ build_jrn_id()

static Acc_Operation_Note::build_jrn_id (   $p_jr_id)
static
Parameters
$p_jr_id
Returns
void

Definition at line 68 of file acc_operation_note.class.php.

68 {
70 $n_id=$cn->get_value("select n_id from jrn_note where jr_id=$1",[$p_jr_id]);
71 if ( $cn->count() == 0) {
72 $n_id=-1;
73 }
74
75 return new Acc_Operation_Note(new Jrn_Note_SQL($cn,$n_id));
76
77 }
static connect()

References $cn, and Dossier\connect().

Referenced by Acc_Ledger_Purchase\insert(), and Acc_Ledger_Sale\insert().

+ Here is the call graph for this function:

◆ fromPost()

Acc_Operation_Note::fromPost ( )

Definition at line 118 of file acc_operation_note.class.php.

119 {
120
121 }

◆ getJrnNoteSql()

Acc_Operation_Note::getJrnNoteSql ( )
Returns
Jrn_Note_SQL

Definition at line 50 of file acc_operation_note.class.php.

References $jrn_note_sql.

◆ getNote()

Acc_Operation_Note::getNote ( )

Definition at line 101 of file acc_operation_note.class.php.

101 {
102 return $this->note;
103 }

References $note.

◆ getOperation_id()

Acc_Operation_Note::getOperation_id ( )

Definition at line 104 of file acc_operation_note.class.php.

104 {
105 return $this->operation_id;
106 }

References $operation_id.

◆ input()

static Acc_Operation_Note::input (   $p_current)
static

Definition at line 114 of file acc_operation_note.class.php.

115 {
116 require NOALYSS_TEMPLATE.'/acc_operation_note-input.php';
117 }

Referenced by Acc_Ledger\input().

◆ load()

Acc_Operation_Note::load ( )

Definition at line 107 of file acc_operation_note.class.php.

107 :void
108 {
109 $this->jrn_note_sql->load();
110 $this->operation_id=$this->jrn_note_sql->jr_id;
111 $this->note=$this->jrn_note_sql->n_text;
112 $this->id=$this->jrn_note_sql->n_id;
113 }

◆ print()

Acc_Operation_Note::print ( )

Definition at line 122 of file acc_operation_note.class.php.

123 {
124 echo '<pre id="print_note">'.h($this->note).'</pre>';
125 }

◆ save()

Acc_Operation_Note::save ( )

Definition at line 78 of file acc_operation_note.class.php.

79 {
81 $this->jrn_note_sql->setp("jr_id",$this->operation_id);
82 $this->jrn_note_sql->setp("n_text",$this->note);
83
84 if ( empty($this->jrn_note_sql->n_text) && $this->id > -1 ) {
85 $this->jrn_note_sql->delete();
86 return $this;
87 }
88 $this->jrn_note_sql->save();
89 $this->id=$this->jrn_note_sql->n_id;
90 return $this;
91 }

References $cn, and Dossier\connect().

+ Here is the call graph for this function:

◆ setJrnNoteSql()

Acc_Operation_Note::setJrnNoteSql ( Jrn_Note_SQL  $jrn_note_sql)
Parameters
Jrn_Note_SQL$jrn_note_sql

Definition at line 58 of file acc_operation_note.class.php.

59 {
60 $this->jrn_note_sql = $jrn_note_sql;
61 return $this;
62 }

References $jrn_note_sql.

◆ setNote()

Acc_Operation_Note::setNote (   $p_note)

Definition at line 92 of file acc_operation_note.class.php.

92 {
93 $this->note=$p_note;
94
95 return $this;
96 }

◆ setOperation_id()

Acc_Operation_Note::setOperation_id (   $p_jrid)

Definition at line 97 of file acc_operation_note.class.php.

97 {
98 $this->operation_id=$p_jrid;
99 return $this;
100 }

Field Documentation

◆ $id

Acc_Operation_Note::$id
private

Definition at line 35 of file acc_operation_note.class.php.

◆ $jrn_note_sql

Acc_Operation_Note::$jrn_note_sql
private

Definition at line 37 of file acc_operation_note.class.php.

Referenced by getJrnNoteSql(), and setJrnNoteSql().

◆ $note

Acc_Operation_Note::$note
private

Definition at line 34 of file acc_operation_note.class.php.

Referenced by getNote().

◆ $operation_id

Acc_Operation_Note::$operation_id
private

jrn.jr_id

Definition at line 36 of file acc_operation_note.class.php.

Referenced by getOperation_id().


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