altocompta/doc/developper/html/user__form__fin_8php-source.html

396 lines
43 KiB
HTML
Raw Blame History

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>phpcompta: /home/dany/developpement/phpcompta-dev/phpcompta/include/user_form_fin.php Source File</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.4.4 -->
<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="annotated.html">Data&nbsp;Structures</a> | <a class="qindex" href="dirs.html">Directories</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Data&nbsp;Fields</a> | <a class="qindex" href="globals.html">Globals</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>
<div class="nav">
<a class="el" href="dir_000000.html">developpement</a>&nbsp;&raquo&nbsp;<a class="el" href="dir_000001.html">phpcompta-dev</a>&nbsp;&raquo&nbsp;<a class="el" href="dir_000002.html">phpcompta</a>&nbsp;&raquo&nbsp;<a class="el" href="dir_000006.html">include</a></div>
<h1>user_form_fin.php</h1><a href="user__form__fin_8php.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 &lt;?
<a name="l00002"></a>00002 <span class="comment">/*</span>
<a name="l00003"></a>00003 <span class="comment"> * This file is part of PhpCompta.</span>
<a name="l00004"></a>00004 <span class="comment"> *</span>
<a name="l00005"></a>00005 <span class="comment"> * PhpCompta is free software; you can redistribute it and/or modify</span>
<a name="l00006"></a>00006 <span class="comment"> * it under the terms of the GNU General Public License as published by</span>
<a name="l00007"></a>00007 <span class="comment"> * the Free Software Foundation; either version 2 of the License, or</span>
<a name="l00008"></a>00008 <span class="comment"> * (at your option) any later version.</span>
<a name="l00009"></a>00009 <span class="comment"> *</span>
<a name="l00010"></a>00010 <span class="comment"> * PhpCompta is distributed in the hope that it will be useful,</span>
<a name="l00011"></a>00011 <span class="comment"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
<a name="l00012"></a>00012 <span class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</span>
<a name="l00013"></a>00013 <span class="comment"> * GNU General Public License for more details.</span>
<a name="l00014"></a>00014 <span class="comment"> *</span>
<a name="l00015"></a>00015 <span class="comment"> * You should have received a copy of the GNU General Public License</span>
<a name="l00016"></a>00016 <span class="comment"> * along with PhpCompta; if not, write to the Free Software</span>
<a name="l00017"></a>00017 <span class="comment"> * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA</span>
<a name="l00018"></a>00018 <span class="comment">*/</span>
<a name="l00019"></a>00019 <span class="comment">/* $Revision$ */</span>
<a name="l00020"></a>00020 <span class="comment">// Copyright Author Dany De Bontridder ddebontridder@yahoo.fr</span>
<a name="l00021"></a>00021 require_once(<span class="stringliteral">"class_widget.php"</span>);
<a name="l00022"></a>00022 require_once(<span class="stringliteral">"constant.php"</span>);
<a name="l00023"></a>00023 require_once(<span class="stringliteral">"preference.php"</span>);
<a name="l00024"></a>00024 require_once(<span class="stringliteral">"fiche_inc.php"</span>);
<a name="l00025"></a>00025 require_once(<span class="stringliteral">"user_common.php"</span>);
<a name="l00042"></a><a class="code" href="user__form__fin_8php.html#a0">00042</a> function <a class="code" href="user__form__ach_8php.html#a1">form_verify_input</a>($p_cn,$p_jrn,$p_periode,$p_array,$p_number)
<a name="l00043"></a>00043 {
<a name="l00044"></a>00044 foreach ($p_array as $<a class="code" href="action_8inc_8php.html#a12">name</a>=&gt;$content) {
<a name="l00045"></a>00045 ${<span class="stringliteral">"$name"</span>}=$content;
<a name="l00046"></a>00046 }
<a name="l00047"></a>00047 <span class="comment">// Verify the date</span>
<a name="l00048"></a>00048 <span class="keywordflow">if</span> ( <a class="code" href="ac__common_8php.html#a3">isDate</a>($e_date) == null ) {
<a name="l00049"></a>00049 <a class="code" href="ac__common_8php.html#a0">echo_error</a>(<span class="stringliteral">"Invalid date $e_date"</span>);
<a name="l00050"></a>00050 <a class="code" href="debug_8php.html#a0">echo_debug</a>('user_form_fin.php',__LINE__,<span class="stringliteral">"Invalid date $e_date"</span>);
<a name="l00051"></a>00051 echo <span class="stringliteral">"&lt;SCRIPT&gt; alert('INVALID DATE $e_date !!!!');&lt;/SCRIPT&gt;"</span>;
<a name="l00052"></a>00052 <span class="keywordflow">return</span> null;
<a name="l00053"></a>00053 }
<a name="l00054"></a>00054
<a name="l00055"></a>00055
<a name="l00056"></a>00056 <span class="comment">// Check if the fiche is in the jrn</span>
<a name="l00057"></a>00057 <span class="keywordflow">if</span> (<a class="code" href="fiche__inc_8php.html#a30">IsFicheOfJrn</a>($p_cn , $p_jrn, $e_bank_account,'deb') == 0 )
<a name="l00058"></a>00058 {
<a name="l00059"></a>00059 <a class="code" href="pref_8inc_8php.html#a4">$msg</a>=<span class="stringliteral">"Mauvais compte en banque"</span>;
<a name="l00060"></a>00060 <a class="code" href="ac__common_8php.html#a0">echo_error</a>($msg);<a class="code" href="debug_8php.html#a0">echo_debug</a>('user_form_fin.php',__LINE__,$msg);
<a name="l00061"></a>00061 echo <span class="stringliteral">"&lt;SCRIPT&gt;alert('$msg');&lt;/SCRIPT&gt;"</span>;
<a name="l00062"></a>00062 <span class="keywordflow">return</span> null;
<a name="l00063"></a>00063 }
<a name="l00064"></a>00064
<a name="l00065"></a>00065 <span class="comment">// check if all e_march are in fiche</span>
<a name="l00066"></a>00066 <span class="keywordflow">for</span> ($i=0;$i&lt;$p_number;$i++) {
<a name="l00067"></a>00067 <span class="keywordflow">if</span> ( trim(${<span class="stringliteral">"e_other$i"</span>}) == <span class="stringliteral">""</span> ) {
<a name="l00068"></a>00068 <span class="comment">// nothing to do</span>
<a name="l00069"></a>00069 <span class="keywordflow">continue</span>;
<a name="l00070"></a>00070 }
<a name="l00071"></a>00071 <span class="comment">// Check amount</span>
<a name="l00072"></a>00072 <span class="keywordflow">if</span> ( <a class="code" href="ac__common_8php.html#a2">isNumber</a>(${<span class="stringliteral">"e_other"</span>.$i.<span class="stringliteral">"_amount"</span>}) == 0) {
<a name="l00073"></a>00073 <a class="code" href="pref_8inc_8php.html#a4">$msg</a>=<span class="stringliteral">"Montant invalide !!! "</span>;
<a name="l00074"></a>00074 <a class="code" href="ac__common_8php.html#a0">echo_error</a>($msg); <a class="code" href="debug_8php.html#a0">echo_debug</a>('user_form_fin.php',__LINE__,$msg);
<a name="l00075"></a>00075 echo <span class="stringliteral">"&lt;SCRIPT&gt;alert('$msg');&lt;/SCRIPT&gt;"</span>;
<a name="l00076"></a>00076 <span class="keywordflow">return</span> null;
<a name="l00077"></a>00077 }
<a name="l00078"></a>00078 <span class="comment">// Check </span>
<a name="l00079"></a>00079 <span class="keywordflow">if</span> ( isFicheOfJrn($p_cn,$p_jrn,${<span class="stringliteral">"e_other$i"</span>},'cred') == 0 ) {
<a name="l00080"></a>00080 <a class="code" href="pref_8inc_8php.html#a4">$msg</a>=<span class="stringliteral">"Fiche inexistante !!! "</span>;
<a name="l00081"></a>00081 <a class="code" href="ac__common_8php.html#a0">echo_error</a>($msg);<a class="code" href="debug_8php.html#a0">echo_debug</a>('user_form_fin.php',__LINE__,$msg);
<a name="l00082"></a>00082 echo <span class="stringliteral">"&lt;SCRIPT&gt;alert('$msg');&lt;/SCRIPT&gt;"</span>;
<a name="l00083"></a>00083 <span class="keywordflow">return</span> null;
<a name="l00084"></a>00084 }
<a name="l00085"></a>00085 <span class="comment">// check if the ATTR_DEF_ACCOUNT is set</span>
<a name="l00086"></a>00086 <a class="code" href="send__poste__pdf_8php.html#a2">$poste</a>=GetFicheAttribut($p_cn,${<span class="stringliteral">"e_other$i"</span>},<a class="code" href="constant_8php.html#a50">ATTR_DEF_ACCOUNT</a>);
<a name="l00087"></a>00087 <span class="keywordflow">if</span> ( $<a class="code" href="classposte.html">poste</a> == null )
<a name="l00088"></a>00088 {
<a name="l00089"></a>00089 <a class="code" href="pref_8inc_8php.html#a4">$msg</a>=<span class="stringliteral">"La fiche "</span>.${<span class="stringliteral">"e_other$i"</span>}.<span class="stringliteral">" n\'a pas de poste comptable"</span>;
<a name="l00090"></a>00090 <a class="code" href="ac__common_8php.html#a0">echo_error</a>($msg); <a class="code" href="debug_8php.html#a0">echo_debug</a>('user_form_fin.php',__LINE__,$msg);
<a name="l00091"></a>00091 echo <span class="stringliteral">"&lt;SCRIPT&gt;alert('$msg');&lt;/SCRIPT&gt;"</span>;
<a name="l00092"></a>00092 <span class="keywordflow">return</span> null;
<a name="l00093"></a>00093
<a name="l00094"></a>00094 }
<a name="l00095"></a>00095 <span class="keywordflow">if</span> ( strlen(trim($<a class="code" href="classposte.html">poste</a>))==0 )
<a name="l00096"></a>00096 {
<a name="l00097"></a>00097 <a class="code" href="pref_8inc_8php.html#a4">$msg</a>=<span class="stringliteral">"La fiche "</span>.${<span class="stringliteral">"e_other$i"</span>}.<span class="stringliteral">" n\'a pas de poste comptable"</span>;
<a name="l00098"></a>00098 <a class="code" href="ac__common_8php.html#a0">echo_error</a>($msg); <a class="code" href="debug_8php.html#a0">echo_debug</a>('user_form_fin.php',__LINE__,$msg);
<a name="l00099"></a>00099 echo <span class="stringliteral">"&lt;SCRIPT&gt;alert('$msg');&lt;/SCRIPT&gt;"</span>;
<a name="l00100"></a>00100 }
<a name="l00101"></a>00101
<a name="l00102"></a>00102 }
<a name="l00103"></a>00103 <span class="comment">// Verify the userperiode</span>
<a name="l00104"></a>00104
<a name="l00105"></a>00105 <span class="comment">// p_periode contient la periode par default</span>
<a name="l00106"></a>00106 list ($l_date_start,$l_date_end)=<a class="code" href="preference_8php.html#a2">GetPeriode</a>($p_cn,$p_periode);
<a name="l00107"></a>00107
<a name="l00108"></a>00108 <span class="comment">// Date dans la periode active</span>
<a name="l00109"></a>00109 <a class="code" href="debug_8php.html#a0">echo_debug</a> ('user_form_fin',__LINE__,<span class="stringliteral">"date start periode $l_date_start date fin periode $l_date_end date demande $e_date"</span>);
<a name="l00110"></a>00110 <span class="keywordflow">if</span> ( <a class="code" href="ac__common_8php.html#a1">cmpDate</a>($e_date,$l_date_start)&lt;0 ||
<a name="l00111"></a>00111 <a class="code" href="ac__common_8php.html#a1">cmpDate</a>($e_date,$l_date_end)&gt;0 )
<a name="l00112"></a>00112 {
<a name="l00113"></a>00113 <a class="code" href="pref_8inc_8php.html#a4">$msg</a>=<span class="stringliteral">"Not in the active periode please change your preference"</span>;
<a name="l00114"></a>00114 <a class="code" href="ac__common_8php.html#a0">echo_error</a>($msg); <a class="code" href="ac__common_8php.html#a0">echo_error</a>($msg);
<a name="l00115"></a>00115 echo <span class="stringliteral">"&lt;SCRIPT&gt;alert('$msg');&lt;/SCRIPT&gt;"</span>;
<a name="l00116"></a>00116 <span class="keywordflow">return</span> null;
<a name="l00117"></a>00117 }
<a name="l00118"></a>00118 <span class="comment">// Periode ferm<72> </span>
<a name="l00119"></a>00119 <span class="keywordflow">if</span> ( <a class="code" href="preference_8php.html#a3">PeriodeClosed</a> ($p_cn,$p_periode)==<span class="charliteral">'t'</span> )
<a name="l00120"></a>00120 {
<a name="l00121"></a>00121 <a class="code" href="pref_8inc_8php.html#a4">$msg</a>=<span class="stringliteral">"This periode is closed please change your preference"</span>;
<a name="l00122"></a>00122 <a class="code" href="ac__common_8php.html#a0">echo_error</a>($msg); <a class="code" href="ac__common_8php.html#a0">echo_error</a>($msg);
<a name="l00123"></a>00123 echo <span class="stringliteral">"&lt;SCRIPT&gt;alert('$msg');&lt;/SCRIPT&gt;"</span>;
<a name="l00124"></a>00124 <span class="keywordflow">return</span> null;
<a name="l00125"></a>00125 }
<a name="l00126"></a>00126 <span class="keywordflow">return</span> <span class="keyword">true</span>;
<a name="l00127"></a>00127 }
<a name="l00128"></a>00128
<a name="l00129"></a>00129
<a name="l00146"></a><a class="code" href="user__form__fin_8php.html#a1">00146</a> function <a class="code" href="user__form__fin_8php.html#a1">FormFin</a>($p_cn,$p_jrn,$p_periode,$p_submit,$p_array=null,$pview_only=<span class="keyword">true</span>,$p_item=4,$p_save=<span class="keyword">false</span>)
<a name="l00147"></a>00147 {
<a name="l00148"></a>00148 include_once(<span class="stringliteral">"poste.php"</span>);
<a name="l00149"></a>00149 <span class="keywordflow">if</span> ( $p_array != null ) {
<a name="l00150"></a>00150 <span class="comment">// array contains old value</span>
<a name="l00151"></a>00151 foreach ( $p_array as $a=&gt;$v) {
<a name="l00152"></a>00152 ${<span class="stringliteral">"$a"</span>}=$v;
<a name="l00153"></a>00153 }
<a name="l00154"></a>00154 }
<a name="l00155"></a>00155 <span class="comment">// The date</span>
<a name="l00156"></a>00156 list ($l_date_start,$l_date_end)=<a class="code" href="preference_8php.html#a2">GetPeriode</a>($p_cn,$p_periode);
<a name="l00157"></a>00157 <a class="code" href="setup_8php.html#a4">$flag</a>=(isset($e_date))?1:0;
<a name="l00158"></a>00158 $e_date=( ! isset($e_date) ) ? substr($l_date_start,2,8):$e_date;
<a name="l00159"></a>00159
<a name="l00160"></a>00160 <span class="comment">// Comment</span>
<a name="l00161"></a>00161 $e_comment=(isset($e_comment))?$e_comment:<span class="stringliteral">""</span>;
<a name="l00162"></a>00162
<a name="l00163"></a>00163 <a class="code" href="user__action__ach_8php.html#a2">$r</a>=<span class="stringliteral">""</span>;
<a name="l00164"></a>00164 <span class="keywordflow">if</span> ( $pview_only == <span class="keyword">false</span>) {
<a name="l00165"></a>00165 <a class="code" href="user__action__ach_8php.html#a2">$r</a>.=<a class="code" href="constant_8php.html#a80">JS_SEARCH_CARD</a>;
<a name="l00166"></a>00166 <a class="code" href="user__action__ach_8php.html#a2">$r</a>.=<a class="code" href="constant_8php.html#a81">JS_CONCERNED_OP</a>;
<a name="l00167"></a>00167 }
<a name="l00168"></a>00168 <span class="comment">// Compute href</span>
<a name="l00169"></a>00169 $href=$_SERVER['SCRIPT_NAME'];
<a name="l00170"></a>00170 <span class="keywordflow">switch</span> ($href)
<a name="l00171"></a>00171 {
<a name="l00172"></a>00172 <span class="comment">// user_jrn.php module "Comptable"</span>
<a name="l00173"></a>00173 <span class="keywordflow">case</span> '/user_jrn.php':
<a name="l00174"></a>00174 $href=<span class="stringliteral">"user_jrn.php?action=new&amp;p_jrn=$p_jrn"</span>;
<a name="l00175"></a>00175 <span class="keywordflow">break</span>;
<a name="l00176"></a>00176 <span class="comment">// commercial.php module "Gestion"</span>
<a name="l00177"></a>00177 <span class="keywordflow">case</span> '/commercial.php':
<a name="l00178"></a>00178 $href=<span class="stringliteral">"commercial.php?p_action=bank&amp;p_jrn=$p_jrn"</span>;
<a name="l00179"></a>00179 <span class="keywordflow">break</span>;
<a name="l00180"></a>00180 <span class="keywordflow">default</span>:
<a name="l00181"></a>00181 <a class="code" href="ac__common_8php.html#a0">echo_error</a>('user_form_fin.php',__LINE__,'Erreur invalid request uri');
<a name="l00182"></a>00182 <a class="code" href="balance_8php.html#a0">exit</a> (-1);
<a name="l00183"></a>00183 }
<a name="l00184"></a>00184
<a name="l00185"></a>00185 <a class="code" href="user__action__ach_8php.html#a2">$r</a>.=<span class="stringliteral">"&lt;FORM NAME=\"form_detail\" enctype=\"multipart/form-data\" ACTION=\"$href\" METHOD=\"POST\"&gt;"</span>;
<a name="l00186"></a>00186 <a class="code" href="user__action__ach_8php.html#a2">$r</a>.='&lt;TABLE&gt;';
<a name="l00187"></a>00187 $Date=<span class="keyword">new</span> <a class="code" href="classwidget.html">widget</a>(<span class="stringliteral">"text"</span>);
<a name="l00188"></a>00188 $Date-&gt;SetReadOnly($pview_only);
<a name="l00189"></a>00189 $Date-&gt;table=1;
<a name="l00190"></a>00190 <a class="code" href="user__action__ach_8php.html#a2">$r</a>.=<span class="stringliteral">"&lt;tr&gt;"</span>;
<a name="l00191"></a>00191 <a class="code" href="user__action__ach_8php.html#a2">$r</a>.=$Date-&gt;IOValue(<span class="stringliteral">"e_date"</span>,$e_date,<span class="stringliteral">"Date"</span>);
<a name="l00192"></a>00192 <a class="code" href="user__action__ach_8php.html#a2">$r</a>.=<span class="stringliteral">"&lt;/tr&gt;"</span>;
<a name="l00193"></a>00193
<a name="l00194"></a>00194
<a name="l00195"></a>00195 include_once(<span class="stringliteral">"fiche_inc.php"</span>);
<a name="l00196"></a>00196 <a class="code" href="user__action__ach_8php.html#a2">$r</a>.='&lt;INPUT TYPE=<span class="stringliteral">"HIDDEN"</span> <a class="code" href="action_8inc_8php.html#a12">name</a>=<span class="stringliteral">"nb_item"</span> <a class="code" href="action_8inc_8php.html#a13">value</a>=<span class="stringliteral">"'.$p_item.'"</span>&gt;';
<a name="l00197"></a>00197
<a name="l00198"></a>00198 <span class="comment">// bank_account operation</span>
<a name="l00199"></a>00199 <span class="comment">// Save old value and set a new one</span>
<a name="l00200"></a>00200 $e_bank_account=( isset ($e_bank_account) )?$e_bank_account:<span class="stringliteral">""</span>;
<a name="l00201"></a>00201 $e_bank_account_label=<span class="stringliteral">""</span>;
<a name="l00202"></a>00202
<a name="l00203"></a>00203 <span class="comment">// retrieve e_bank_account_label</span>
<a name="l00204"></a>00204 <span class="keywordflow">if</span> ( $e_bank_account != <span class="stringliteral">""</span> ) {
<a name="l00205"></a>00205 $a_client=GetFicheAttribut($p_cn,$e_bank_account);
<a name="l00206"></a>00206 <span class="keywordflow">if</span> ( $a_client != null)
<a name="l00207"></a>00207 $e_bank_account_label=$a_client['vw_name'].<span class="stringliteral">" adresse "</span>.$a_client['vw_addr'].<span class="stringliteral">" "</span>.$a_client['vw_cp'];
<a name="l00208"></a>00208 }
<a name="l00209"></a>00209 <span class="comment">// search widget</span>
<a name="l00210"></a>00210 <a class="code" href="action_8inc_8php.html#a14">$W1</a>=<span class="keyword">new</span> <a class="code" href="classwidget.html">widget</a>(<span class="stringliteral">"js_search"</span>);
<a name="l00211"></a>00211 <a class="code" href="action_8inc_8php.html#a14">$W1</a>-&gt;readonly=$pview_only;
<a name="l00212"></a>00212 <a class="code" href="action_8inc_8php.html#a14">$W1</a>-&gt;label=<span class="stringliteral">"Banque"</span>;
<a name="l00213"></a>00213 <a class="code" href="action_8inc_8php.html#a14">$W1</a>-&gt;name=<span class="stringliteral">"e_bank_account"</span>;
<a name="l00214"></a>00214 <a class="code" href="action_8inc_8php.html#a14">$W1</a>-&gt;value=$e_bank_account;
<a name="l00215"></a>00215 <a class="code" href="action_8inc_8php.html#a14">$W1</a>-&gt;extra=<a class="code" href="constant_8php.html#a67">FICHE_TYPE_FIN</a>; <span class="comment">// credits</span>
<a name="l00216"></a>00216 <a class="code" href="action_8inc_8php.html#a14">$W1</a>-&gt;extra2=<a class="code" href="modify__op_8php.html#a2">$p_jrn</a>;
<a name="l00217"></a>00217 <a class="code" href="user__action__ach_8php.html#a2">$r</a>.=<span class="stringliteral">"&lt;TR&gt;"</span>.$W1-&gt;IOValue().<span class="stringliteral">"&lt;/TD&gt;"</span>;
<a name="l00218"></a>00218
<a name="l00219"></a>00219 <a class="code" href="user__action__ach_8php.html#a2">$r</a>.=<span class="stringliteral">"&lt;/TABLE&gt;"</span>;
<a name="l00220"></a>00220
<a name="l00221"></a>00221 $Span=<span class="keyword">new</span> <a class="code" href="classwidget.html">widget</a> (<span class="stringliteral">"span"</span>);
<a name="l00222"></a>00222 $Span-&gt;SetReadOnly($pview_only);
<a name="l00223"></a>00223 <a class="code" href="user__action__ach_8php.html#a2">$r</a>.=<span class="stringliteral">"&lt;TD&gt;"</span>.$Span-&gt;IOValue(<span class="stringliteral">"e_bank_account_label"</span>,$e_bank_account_label).<span class="stringliteral">"&lt;/TD&gt;"</span>;
<a name="l00224"></a>00224
<a name="l00225"></a>00225
<a name="l00226"></a>00226 <span class="comment">// ComputeBanqueSaldo</span>
<a name="l00227"></a>00227 <span class="comment">// </span>
<a name="l00228"></a>00228 <span class="keywordflow">if</span> ( $pview_only == <span class="keyword">true</span> ) {
<a name="l00229"></a>00229 <a class="code" href="impress__fiche_8php.html#a13">$solde</a>=<a class="code" href="poste_8php.html#a3">GetSolde</a>($p_cn,GetFicheAttribut($p_cn,$e_bank_account,<a class="code" href="constant_8php.html#a50">ATTR_DEF_ACCOUNT</a>));
<a name="l00230"></a>00230 <a class="code" href="user__action__ach_8php.html#a2">$r</a>.=<span class="stringliteral">" &lt;b&gt; Solde = "</span>.$solde.<span class="stringliteral">" &lt;/b&gt;"</span>;
<a name="l00231"></a>00231 $new_solde=<a class="code" href="impress__fiche_8php.html#a13">$solde</a>;
<a name="l00232"></a>00232 }
<a name="l00233"></a>00233
<a name="l00234"></a>00234 <span class="comment">// Start the div for item to move money</span>
<a name="l00235"></a>00235 <a class="code" href="user__action__ach_8php.html#a2">$r</a>.=<span class="stringliteral">"&lt;DIV&gt;"</span>;
<a name="l00236"></a>00236 <a class="code" href="user__action__ach_8php.html#a2">$r</a>.='&lt;H2 <span class="keyword">class</span>=<span class="stringliteral">"info"</span>&gt;Actions&lt;/H2&gt;';
<a name="l00237"></a>00237 <a class="code" href="user__action__ach_8php.html#a2">$r</a>.='&lt;TABLE&gt;';
<a name="l00238"></a>00238 <a class="code" href="user__action__ach_8php.html#a2">$r</a>.=<span class="stringliteral">"&lt;TR&gt;"</span>;
<a name="l00239"></a>00239 <a class="code" href="user__action__ach_8php.html#a2">$r</a>.=<span class="stringliteral">"&lt;th&gt;&lt;/TH&gt;"</span>;
<a name="l00240"></a>00240 <a class="code" href="user__action__ach_8php.html#a2">$r</a>.=<span class="stringliteral">"&lt;th&gt;code&lt;/TH&gt;"</span>;
<a name="l00241"></a>00241 <a class="code" href="user__action__ach_8php.html#a2">$r</a>.=<span class="stringliteral">"&lt;th&gt;D&amp;eacute;nomination&lt;/TH&gt;"</span>;
<a name="l00242"></a>00242 <a class="code" href="user__action__ach_8php.html#a2">$r</a>.=<span class="stringliteral">"&lt;th&gt;Description&lt;/TH&gt;"</span>;
<a name="l00243"></a>00243 <a class="code" href="user__action__ach_8php.html#a2">$r</a>.=<span class="stringliteral">"&lt;th&gt;Montant&lt;/TH&gt;"</span>;
<a name="l00244"></a>00244 <a class="code" href="user__action__ach_8php.html#a2">$r</a>.='&lt;th colspan=<span class="stringliteral">"2"</span>&gt; Op. Concern&amp;eacute;&lt;/th&gt;';
<a name="l00245"></a>00245 <a class="code" href="user__action__ach_8php.html#a2">$r</a>.=<span class="stringliteral">"&lt;/TR&gt;"</span>;
<a name="l00246"></a>00246 <span class="comment">// Parse each " tiers" </span>
<a name="l00247"></a>00247 <span class="keywordflow">for</span> ($i=0; $i &lt; $p_item; $i++) {
<a name="l00248"></a>00248 $tiers=(isset(${<span class="stringliteral">"e_other"</span>.$i}))?${<span class="stringliteral">"e_other"</span>.$i}:<span class="stringliteral">""</span>;
<a name="l00249"></a>00249 <a class="code" href="action_8inc_8php.html#a19">$tiers_label</a>=<span class="stringliteral">""</span>;
<a name="l00250"></a>00250 $tiers_amount=(isset(${<span class="stringliteral">"e_other$i"</span>.<span class="stringliteral">"_amount"</span>}))?${<span class="stringliteral">"e_other$i"</span>.<span class="stringliteral">"_amount"</span>}:0;
<a name="l00251"></a>00251
<a name="l00252"></a>00252 $tiers_comment=(isset (${<span class="stringliteral">"e_other$i"</span>.<span class="stringliteral">"_comment"</span>}))?${<span class="stringliteral">"e_other$i"</span>.<span class="stringliteral">"_comment"</span>}:<span class="stringliteral">""</span>;
<a name="l00253"></a>00253 <span class="comment">// If $tiers has a value</span>
<a name="l00254"></a>00254 <span class="keywordflow">if</span> ( $tiers != <span class="stringliteral">""</span> )
<a name="l00255"></a>00255 {
<a name="l00256"></a>00256 <span class="comment">// retrieve the tva label and name</span>
<a name="l00257"></a>00257 $a_fiche=GetFicheAttribut($p_cn, $tiers);
<a name="l00258"></a>00258 <span class="keywordflow">if</span> ( $a_fiche != null ) {
<a name="l00259"></a>00259 <a class="code" href="action_8inc_8php.html#a19">$tiers_label</a>=$a_fiche['vw_name'];
<a name="l00260"></a>00260 }
<a name="l00261"></a>00261 }
<a name="l00262"></a>00262 ${<span class="stringliteral">"e_other$i"</span>.<span class="stringliteral">"_amount"</span>}=(isset (${<span class="stringliteral">"e_other$i"</span>.<span class="stringliteral">"_amount"</span>}))?${<span class="stringliteral">"e_other$i"</span>.<span class="stringliteral">"_amount"</span>}:0;
<a name="l00263"></a>00263
<a name="l00264"></a>00264 <a class="code" href="action_8inc_8php.html#a14">$W1</a>=<span class="keyword">new</span> <a class="code" href="classwidget.html">widget</a>(<span class="stringliteral">"js_search"</span>);
<a name="l00265"></a>00265 <a class="code" href="action_8inc_8php.html#a14">$W1</a>-&gt;label=<span class="stringliteral">""</span>;
<a name="l00266"></a>00266 <a class="code" href="action_8inc_8php.html#a14">$W1</a>-&gt;name=<span class="stringliteral">"e_other"</span>.$i;
<a name="l00267"></a>00267 <a class="code" href="action_8inc_8php.html#a14">$W1</a>-&gt;value=$tiers;
<a name="l00268"></a>00268 <a class="code" href="action_8inc_8php.html#a14">$W1</a>-&gt;extra='cred'; <span class="comment">// credits</span>
<a name="l00269"></a>00269 <a class="code" href="action_8inc_8php.html#a14">$W1</a>-&gt;extra2=<a class="code" href="modify__op_8php.html#a2">$p_jrn</a>;
<a name="l00270"></a>00270 <a class="code" href="action_8inc_8php.html#a14">$W1</a>-&gt;readonly=$pview_only;
<a name="l00271"></a>00271 <a class="code" href="user__action__ach_8php.html#a2">$r</a>.=<span class="stringliteral">"&lt;TR&gt;"</span>.$W1-&gt;IOValue().<span class="stringliteral">"&lt;/TD&gt;"</span>;
<a name="l00272"></a>00272 <span class="comment">// label</span>
<a name="l00273"></a>00273 $other=<span class="keyword">new</span> <a class="code" href="classwidget.html">widget</a>(<span class="stringliteral">"span"</span>);
<a name="l00274"></a>00274 <a class="code" href="user__action__ach_8php.html#a2">$r</a>.=<span class="stringliteral">"&lt;TD&gt;"</span>;
<a name="l00275"></a>00275 <a class="code" href="user__action__ach_8php.html#a2">$r</a>.=$other-&gt;IOValue(<span class="stringliteral">"e_other$i"</span>.<span class="stringliteral">"_label"</span>, $tiers_label);
<a name="l00276"></a>00276 <span class="comment">// Comment</span>
<a name="l00277"></a>00277 $wComment=<span class="keyword">new</span> <a class="code" href="classwidget.html">widget</a>(<span class="stringliteral">"text"</span>);
<a name="l00278"></a>00278 $wComment-&gt;table=1;
<a name="l00279"></a>00279 $wComment-&gt;SetReadOnly($pview_only);
<a name="l00280"></a>00280 <a class="code" href="user__action__ach_8php.html#a2">$r</a>.=$wComment-&gt;IOValue(<span class="stringliteral">"e_other$i"</span>.<span class="stringliteral">"_comment"</span>,$tiers_comment);
<a name="l00281"></a>00281 <span class="comment">// amount</span>
<a name="l00282"></a>00282 $wAmount=<span class="keyword">new</span> <a class="code" href="classwidget.html">widget</a>(<span class="stringliteral">"text"</span>);
<a name="l00283"></a>00283 $wAmount-&gt;table=1;
<a name="l00284"></a>00284 $wAmount-&gt;size=7;
<a name="l00285"></a>00285 $wAmount-&gt;SetReadOnly($pview_only);
<a name="l00286"></a>00286 <a class="code" href="user__action__ach_8php.html#a2">$r</a>.=$wAmount-&gt;IOValue(<span class="stringliteral">"e_other$i"</span>.<span class="stringliteral">"_amount"</span>,$tiers_amount);
<a name="l00287"></a>00287 <span class="comment">// concerned</span>
<a name="l00288"></a>00288 ${<span class="stringliteral">"e_concerned"</span>.$i}=(isset(${<span class="stringliteral">"e_concerned"</span>.$i}))?${<span class="stringliteral">"e_concerned"</span>.$i}:<span class="stringliteral">""</span>;
<a name="l00289"></a>00289 $wConcerned=<span class="keyword">new</span> <a class="code" href="classwidget.html">widget</a>(<span class="stringliteral">"js_concerned"</span>);
<a name="l00290"></a>00290 $wConcerned-&gt;SetReadOnly($pview_only);
<a name="l00291"></a>00291 <a class="code" href="user__action__ach_8php.html#a2">$r</a>.=$wConcerned-&gt;IOValue(<span class="stringliteral">"e_concerned"</span>.$i,${<span class="stringliteral">"e_concerned"</span>.$i});
<a name="l00292"></a>00292 <a class="code" href="user__action__ach_8php.html#a2">$r</a>.='&lt;/TR&gt;';
<a name="l00293"></a>00293 <span class="comment">// if not recorded the new amount must be recalculate</span>
<a name="l00294"></a>00294 <span class="comment">// if recorded the old amount is recalculated</span>
<a name="l00295"></a>00295 <span class="keywordflow">if</span> ( $pview_only == <span class="keyword">true</span>)
<a name="l00296"></a>00296 $new_solde=($p_save==<span class="keyword">false</span>)?$new_solde+$tiers_amount:$new_solde-$tiers_amount;
<a name="l00297"></a>00297 }
<a name="l00298"></a>00298
<a name="l00299"></a>00299 <a class="code" href="user__action__ach_8php.html#a2">$r</a>.=<span class="stringliteral">"&lt;/TABLE&gt;"</span>;
<a name="l00300"></a>00300
<a name="l00301"></a>00301 <span class="keywordflow">if</span> ( $pview_only==<span class="keyword">true</span> &amp;&amp; $p_save==<span class="keyword">false</span>) {
<a name="l00302"></a>00302 <span class="comment">// check for upload piece</span>
<a name="l00303"></a>00303 <a class="code" href="show__document__modele_8php.html#a6">$file</a>=<span class="keyword">new</span> <a class="code" href="classwidget.html">widget</a>(<span class="stringliteral">"file"</span>);
<a name="l00304"></a>00304 <a class="code" href="show__document__modele_8php.html#a6">$file</a>-&gt;table=1;
<a name="l00305"></a>00305 <a class="code" href="user__action__ach_8php.html#a2">$r</a>.=<span class="stringliteral">"&lt;hr&gt;"</span>;
<a name="l00306"></a>00306 <a class="code" href="user__action__ach_8php.html#a2">$r</a>.= <span class="stringliteral">"&lt;table&gt;"</span>;
<a name="l00307"></a>00307 <a class="code" href="user__action__ach_8php.html#a2">$r</a>.=<span class="stringliteral">"&lt;TR&gt;"</span>.$file-&gt;IOValue(<span class="stringliteral">"pj"</span>,<span class="stringliteral">""</span>,<span class="stringliteral">"Pi&amp;egrave;ce justificative"</span>).<span class="stringliteral">"&lt;/TR&gt;"</span>;
<a name="l00308"></a>00308 <a class="code" href="user__action__ach_8php.html#a2">$r</a>.=<span class="stringliteral">"&lt;/table&gt;"</span>;
<a name="l00309"></a>00309 <a class="code" href="user__action__ach_8php.html#a2">$r</a>.=<span class="stringliteral">"&lt;hr&gt;"</span>;
<a name="l00310"></a>00310 }
<a name="l00311"></a>00311 <span class="comment">// Set correctly the REQUEST param for jrn_type </span>
<a name="l00312"></a>00312 <a class="code" href="poste_8inc_8php.html#a8">$h</a>=<span class="keyword">new</span> <a class="code" href="classwidget.html">widget</a>('hidden');
<a name="l00313"></a>00313 <a class="code" href="poste_8inc_8php.html#a8">$h</a>-&gt;name='jrn_type';
<a name="l00314"></a>00314 <a class="code" href="poste_8inc_8php.html#a8">$h</a>-&gt;value='FIN';
<a name="l00315"></a>00315 <a class="code" href="user__action__ach_8php.html#a2">$r</a>.=<a class="code" href="poste_8inc_8php.html#a8">$h</a>-&gt;IOValue();
<a name="l00316"></a>00316
<a name="l00317"></a>00317 <a class="code" href="user__action__ach_8php.html#a2">$r</a>.=$p_submit;
<a name="l00318"></a>00318 <a class="code" href="user__action__ach_8php.html#a2">$r</a>.=<span class="stringliteral">"&lt;/DIV&gt;"</span>;
<a name="l00319"></a>00319 <a class="code" href="user__action__ach_8php.html#a2">$r</a>.=<span class="stringliteral">"&lt;/FORM&gt;"</span>;
<a name="l00320"></a>00320
<a name="l00321"></a>00321 <span class="comment">// if view_only is true</span>
<a name="l00322"></a>00322 <span class="comment">//Put the new saldo here (old saldo - operation)</span>
<a name="l00323"></a>00323 <span class="keywordflow">if</span> ( $pview_only==<span class="keyword">true</span>) {
<a name="l00324"></a>00324 <span class="comment">// if not recorded the new amount must be recalculate</span>
<a name="l00325"></a>00325 <span class="keywordflow">if</span> ( $p_save == <span class="keyword">false</span>) {
<a name="l00326"></a>00326 <a class="code" href="user__action__ach_8php.html#a2">$r</a>.=<span class="stringliteral">" &lt;b&gt; Ancien Solde = "</span>.$solde.<span class="stringliteral">" &lt;/b&gt;&lt;br&gt;"</span>;
<a name="l00327"></a>00327 <a class="code" href="user__action__ach_8php.html#a2">$r</a>.=<span class="stringliteral">" &lt;b&gt; Nouveau Solde = "</span>.$new_solde.<span class="stringliteral">" &lt;/b&gt;&lt;br&gt;"</span>;
<a name="l00328"></a>00328 }
<a name="l00329"></a>00329 <span class="comment">// if recorded the old amount is recalculated</span>
<a name="l00330"></a>00330 <span class="keywordflow">if</span> ($p_save == <span class="keyword">true</span> ) {
<a name="l00331"></a>00331 <a class="code" href="user__action__ach_8php.html#a2">$r</a>.=<span class="stringliteral">" &lt;b&gt; Ancien Solde = "</span>.$new_solde.<span class="stringliteral">" &lt;/b&gt;&lt;br&gt;"</span>;
<a name="l00332"></a>00332 <a class="code" href="user__action__ach_8php.html#a2">$r</a>.=<span class="stringliteral">" &lt;b&gt; Nouveau Solde = "</span>.$solde.<span class="stringliteral">" &lt;/b&gt;&lt;br&gt;"</span>;
<a name="l00333"></a>00333 }
<a name="l00334"></a>00334 }
<a name="l00335"></a>00335
<a name="l00336"></a>00336 <span class="keywordflow">return</span> <a class="code" href="user__action__ach_8php.html#a2">$r</a>;
<a name="l00337"></a>00337
<a name="l00338"></a>00338
<a name="l00339"></a>00339 }
<a name="l00340"></a>00340
<a name="l00358"></a><a class="code" href="user__form__fin_8php.html#a2">00358</a> function <a class="code" href="user__form__fin_8php.html#a2">RecordFin</a>($p_cn,$p_array,$p_user,$p_jrn) {
<a name="l00359"></a>00359 <a class="code" href="debug_8php.html#a0">echo_debug</a>('user_form_fin.php',__LINE__,<span class="stringliteral">"RecordFin"</span>);
<a name="l00360"></a>00360 foreach ( $p_array as $v =&gt; $e)
<a name="l00361"></a>00361 {
<a name="l00362"></a>00362 ${<span class="stringliteral">"$v"</span>}=<a class="code" href="impress__fiche_8php.html#a10">$e</a>;
<a name="l00363"></a>00363 }
<a name="l00364"></a>00364 <span class="comment">// Get the default period</span>
<a name="l00365"></a>00365 $periode=$p_user-&gt;GetPeriode();
<a name="l00366"></a>00366
<a name="l00367"></a>00367 <span class="comment">// Debit = banque</span>
<a name="l00368"></a>00368 $poste_bq=GetFicheAttribut($p_cn,$e_bank_account,<a class="code" href="constant_8php.html#a50">ATTR_DEF_ACCOUNT</a>);
<a name="l00369"></a>00369 <a class="code" href="postgres_8php.html#a14">StartSql</a>($p_cn);
<a name="l00370"></a>00370 $amount=0.0;
<a name="l00371"></a>00371 <span class="comment">// Credit = goods </span>
<a name="l00372"></a>00372 <span class="keywordflow">for</span> ( $i = 0; $i &lt; $nb_item;$i++) {
<a name="l00373"></a>00373 <span class="comment">// if tiers is set and amount != 0 insert it into the database </span>
<a name="l00374"></a>00374 <span class="comment">// and quit the loop ?</span>
<a name="l00375"></a>00375 <span class="keywordflow">if</span> ( ${<span class="stringliteral">"e_other$i"</span>.<span class="stringliteral">"_amount"</span>} == 0 ) <span class="keywordflow">continue</span>;
<a name="l00376"></a>00376 <a class="code" href="send__poste__pdf_8php.html#a2">$poste</a>=GetFicheAttribut($p_cn,${<span class="stringliteral">"e_other$i"</span>},<a class="code" href="constant_8php.html#a50">ATTR_DEF_ACCOUNT</a>);
<a name="l00377"></a>00377
<a name="l00378"></a>00378 $amount+=${<span class="stringliteral">"e_other$i"</span>.<span class="stringliteral">"_amount"</span>};
<a name="l00379"></a>00379 <span class="comment">// Record a line for the bank</span>
<a name="l00380"></a>00380 <span class="comment">// Compute the j_grpt</span>
<a name="l00381"></a>00381 <a class="code" href="annulation_8php.html#a4">$seq</a>=<a class="code" href="postgres_8php.html#a13">NextSequence</a>($p_cn,'s_grpt');
<a name="l00382"></a>00382
<a name="l00383"></a>00383 <span class="keywordflow">if</span> ( <a class="code" href="user__common_8php.html#a4">InsertJrnx</a>($p_cn,<span class="charliteral">'d'</span>,$p_user-&gt;id,$p_jrn,$poste_bq,$e_date,round(${<span class="stringliteral">"e_other$i"</span>.<span class="stringliteral">"_amount"</span>},2),$seq,$periode) == <span class="keyword">false</span> ) {
<a name="l00384"></a>00384 $Rollback($p_cn);<a class="code" href="balance_8php.html#a0">exit</a>(<span class="stringliteral">"error 'user_form_fin.php' __LINE__"</span>);
<a name="l00385"></a>00385 }
<a name="l00386"></a>00386
<a name="l00387"></a>00387
<a name="l00388"></a>00388 <span class="comment">// Record a line for the other account</span>
<a name="l00389"></a>00389 <span class="keywordflow">if</span> ( ($j_id=<a class="code" href="user__common_8php.html#a4">InsertJrnx</a>($p_cn,<span class="charliteral">'c'</span>,$p_user-&gt;id,$p_jrn,$<a class="code" href="classposte.html">poste</a>,$e_date,round(${<span class="stringliteral">"e_other$i"</span>.<span class="stringliteral">"_amount"</span>},2),$seq,$periode)) == <span class="keyword">false</span> )
<a name="l00390"></a>00390 { $Rollback($p_cn);<a class="code" href="balance_8php.html#a0">exit</a>(<span class="stringliteral">"error 'user_form_fin.php' __LINE__"</span>);}
<a name="l00391"></a>00391
<a name="l00392"></a>00392 <a class="code" href="debug_8php.html#a0">echo_debug</a>('user_form_fin.php',__LINE__,<span class="stringliteral">" $j_id=InsertJrnx($p_cn,'d',$p_user,$p_jrn,$poste,$e_date,"</span>.${<span class="stringliteral">"e_other$i"</span>}.<span class="stringliteral">"_amount"</span>.<span class="stringliteral">",$seq,$periode);"</span>);
<a name="l00393"></a>00393
<a name="l00394"></a>00394 <span class="keywordflow">if</span> ( ($jr_id=<a class="code" href="user__common_8php.html#a5">InsertJrn</a>($p_cn,$e_date,'',$p_jrn,<a class="code" href="ac__common_8php.html#a9">FormatString</a>(${<span class="stringliteral">"e_other$i"</span>.<span class="stringliteral">"_comment"</span>}),
<a name="l00395"></a>00395 round(${<span class="stringliteral">"e_other$i"</span>.<span class="stringliteral">"_amount"</span>},2),$seq,$periode))==<span class="keyword">false</span>) {
<a name="l00396"></a>00396 $<a class="code" href="postgres_8php.html#a17">Rollback</a>($p_cn);<a class="code" href="balance_8php.html#a0">exit</a>(<span class="stringliteral">"error 'user_form_fin.php' __LINE__"</span>);}
<a name="l00397"></a>00397
<a name="l00398"></a>00398 <span class="keywordflow">if</span> ( <a class="code" href="ac__common_8php.html#a2">isNumber</a>(${<span class="stringliteral">"e_concerned"</span>.$i}) == 1 ) {
<a name="l00399"></a>00399
<a name="l00400"></a>00400 <a class="code" href="user__common_8php.html#a10">InsertRapt</a>($p_cn,$jr_id,${<span class="stringliteral">"e_concerned$i"</span>});
<a name="l00401"></a>00401 }
<a name="l00402"></a>00402
<a name="l00403"></a>00403
<a name="l00404"></a>00404 <span class="comment">// Set Internal code and Comment</span>
<a name="l00405"></a>00405 $internal_code=<a class="code" href="jrn_8php.html#a14">SetInternalCode</a>($p_cn,$seq,$p_jrn);
<a name="l00406"></a>00406 $comment=$internal_code.<span class="stringliteral">" compte : "</span>.GetFicheName($p_cn,$e_bank_account);
<a name="l00407"></a>00407 <span class="keywordflow">if</span> ( <a class="code" href="ac__common_8php.html#a9">FormatString</a>(${<span class="stringliteral">"e_other$i"</span>.<span class="stringliteral">"_comment"</span>}) == null ) {
<a name="l00408"></a>00408 <span class="comment">// Update comment if comment is blank</span>
<a name="l00409"></a>00409 $Res=<a class="code" href="postgres_8php.html#a2">ExecSql</a>($p_cn,<span class="stringliteral">"update jrn set jr_comment='"</span>.$comment.<span class="stringliteral">"' where jr_grpt_id="</span>.$seq);
<a name="l00410"></a>00410 }
<a name="l00411"></a>00411 <span class="keywordflow">if</span> ( $i == 0 )
<a name="l00412"></a>00412 {
<a name="l00413"></a>00413 <span class="comment">// first record we upload the files and</span>
<a name="l00414"></a>00414 <span class="comment">// keep variable to update other row of jrn</span>
<a name="l00415"></a>00415 <span class="keywordflow">if</span> ( isset ($_FILES))
<a name="l00416"></a>00416 $oid=<a class="code" href="postgres_8php.html#a24">save_upload_document</a>($p_cn,$seq);
<a name="l00417"></a>00417
<a name="l00418"></a>00418 } <span class="keywordflow">else</span> {
<a name="l00419"></a>00419 <span class="keywordflow">if</span> ( <span class="keyword">sizeof</span>($_FILES) != 0 )
<a name="l00420"></a>00420 {
<a name="l00421"></a>00421 <a class="code" href="postgres_8php.html#a2">ExecSql</a>($p_cn,<span class="stringliteral">"update jrn set jr_pj="</span>.$oid.<span class="stringliteral">", jr_pj_name='"</span>.$_FILES['pj']['<a class="code" href="action_8inc_8php.html#a12">name</a>'].<span class="stringliteral">"', "</span>.
<a name="l00422"></a>00422 <span class="stringliteral">"jr_pj_type='"</span>.$_FILES['pj']['type'].<span class="stringliteral">"' where jr_grpt_id=$seq"</span>);
<a name="l00423"></a>00423 }
<a name="l00424"></a>00424 }
<a name="l00425"></a>00425
<a name="l00426"></a>00426 } <span class="comment">// for nbitem</span>
<a name="l00427"></a>00427
<a name="l00428"></a>00428 <a class="code" href="postgres_8php.html#a16">Commit</a>($p_cn);
<a name="l00429"></a>00429 <span class="keywordflow">return</span> $internal_code;
<a name="l00430"></a>00430 }
<a name="l00431"></a>00431 ?&gt;
</pre></div><hr size="1"><address style="align: right;"><small>Generated on Tue Jun 27 01:39:28 2006 for phpcompta by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
</html>