574 lines
36 KiB
HTML
574 lines
36 KiB
HTML
<!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: preference.php File Reference</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 Page</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Data Structures</a> | <a class="qindex" href="dirs.html">Directories</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="functions.html">Data Fields</a> | <a class="qindex" href="globals.html">Globals</a> | <a class="qindex" href="pages.html">Related Pages</a></div>
|
||
<div class="nav">
|
||
<a class="el" href="dir_000000.html">include</a></div>
|
||
<h1>preference.php File Reference</h1>include file for the periode form, currency,... <a href="#_details">More...</a>
|
||
<p>
|
||
|
||
<p>
|
||
<a href="preference_8php-source.html">Go to the source code of this file.</a><table border="0" cellpadding="0" cellspacing="0">
|
||
<tr><td></td></tr>
|
||
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
|
||
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="preference_8php.html#a0">FormPeriodeMult</a> ($p_cn)</td></tr>
|
||
|
||
<tr><td class="mdescLeft"> </td><td class="mdescRight">Generate the form for the periode. <a href="#a0"></a><br></td></tr>
|
||
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="preference_8php.html#a1">FormPeriode</a> ($p_cn, $l_default=0, $p_type=<a class="el" href="constant_8php.html#a47">OPEN</a>, $p_suff="")</td></tr>
|
||
|
||
<tr><td class="mdescLeft"> </td><td class="mdescRight">Generate the form for the periode. <a href="#a1"></a><br></td></tr>
|
||
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="preference_8php.html#a2">GetPeriode</a> ($p_cn, $p_periode)</td></tr>
|
||
|
||
<tr><td class="mdescLeft"> </td><td class="mdescRight">Give the start & end date of a periode. <a href="#a2"></a><br></td></tr>
|
||
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="preference_8php.html#a3">PeriodeClosed</a> ($p_cn, $p_periode)</td></tr>
|
||
|
||
<tr><td class="mdescLeft"> </td><td class="mdescRight">get the status of a periode <a href="#a3"></a><br></td></tr>
|
||
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="preference_8php.html#a4">GetExercice</a> ($p_cn, $p_periode)</td></tr>
|
||
|
||
<tr><td class="mdescLeft"> </td><td class="mdescRight">get the exercice of a periode <a href="#a4"></a><br></td></tr>
|
||
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="preference_8php.html#a5">ShowDevise</a> ($p_cn)</td></tr>
|
||
|
||
<tr><td class="mdescLeft"> </td><td class="mdescRight">Show all the currency encoded. <a href="#a5"></a><br></td></tr>
|
||
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="preference_8php.html#a6">ShowPeriode</a> ($p_cn)</td></tr>
|
||
|
||
<tr><td class="mdescLeft"> </td><td class="mdescRight">Show all the periode and their status. <a href="#a6"></a><br></td></tr>
|
||
</table>
|
||
<hr><a name="_details"></a><h2>Detailed Description</h2>
|
||
include file for the periode form, currency,...
|
||
<p>
|
||
|
||
<p>
|
||
Definition in file <a class="el" href="preference_8php-source.html">preference.php</a>.<hr><h2>Function Documentation</h2>
|
||
<a class="anchor" name="a1"></a><!-- doxytag: member="preference.php::FormPeriode" ref="a1" args="($p_cn, $l_default=0, $p_type=OPEN, $p_suff="")" --><p>
|
||
<table class="mdTable" cellpadding="2" cellspacing="0">
|
||
<tr>
|
||
<td class="mdRow">
|
||
<table cellpadding="0" cellspacing="0" border="0">
|
||
<tr>
|
||
<td class="md" nowrap valign="top">FormPeriode </td>
|
||
<td class="md" valign="top">( </td>
|
||
<td class="md" nowrap valign="top">$ </td>
|
||
<td class="mdname" nowrap> <em>p_cn</em>, </td>
|
||
</tr>
|
||
<tr>
|
||
<td class="md" nowrap align="right"></td>
|
||
<td class="md"></td>
|
||
<td class="md" nowrap>$ </td>
|
||
<td class="mdname" nowrap> <em>l_default</em> = <code>0</code>, </td>
|
||
</tr>
|
||
<tr>
|
||
<td class="md" nowrap align="right"></td>
|
||
<td class="md"></td>
|
||
<td class="md" nowrap>$ </td>
|
||
<td class="mdname" nowrap> <em>p_type</em> = <code><a class="el" href="constant_8php.html#a47">OPEN</a></code>, </td>
|
||
</tr>
|
||
<tr>
|
||
<td class="md" nowrap align="right"></td>
|
||
<td class="md"></td>
|
||
<td class="md" nowrap>$ </td>
|
||
<td class="mdname" nowrap> <em>p_suff</em> = <code>""</code></td>
|
||
</tr>
|
||
<tr>
|
||
<td class="md"></td>
|
||
<td class="md">) </td>
|
||
<td class="md" colspan="2"></td>
|
||
</tr>
|
||
</table>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
<table cellspacing="5" cellpadding="0" border="0">
|
||
<tr>
|
||
<td>
|
||
|
||
</td>
|
||
<td>
|
||
|
||
<p>
|
||
Generate the form for the periode.
|
||
<p>
|
||
<dl compact><dt><b>Parameters:</b></dt><dd>
|
||
<table border="0" cellspacing="2" cellpadding="0">
|
||
<tr><td valign="top"></td><td valign="top"><em>$p_cn</em> </td><td>connexion </td></tr>
|
||
<tr><td valign="top"></td><td valign="top"><em>$p_default</em> </td><td>default periode </td></tr>
|
||
<tr><td valign="top"></td><td valign="top"><em>$p_type</em> </td><td>the type of the periode OPEN CLOSE NOTCENTRALIZED or ALL </td></tr>
|
||
<tr><td valign="top"></td><td valign="top"><em>$p_suff</em> </td><td>the suffix of the name</td></tr>
|
||
</table>
|
||
</dl>
|
||
<dl compact><dt><b>Returns:</b></dt><dd>string containing html code for the HTML</dd></dl>
|
||
|
||
<p>
|
||
Definition at line <a class="el" href="preference_8php-source.html#l00071">71</a> of file <a class="el" href="preference_8php-source.html">preference.php</a>.
|
||
<p>
|
||
References <a class="el" href="jrn__detail_8php-source.html#l00128">$l_line</a>, <a class="el" href="setup_8php-source.html#l00395">$Max</a>, <a class="el" href="depense_8inc_8php-source.html#l00077">$Res</a>, <a class="el" href="impress__bilan_8php-source.html#l00032">$ret</a>, <a class="el" href="bank_8inc_8php-source.html#l00169">$sql</a>, and <a class="el" href="postgres_8php-source.html#l00099">ExecSql()</a>.<div class="fragment"><pre class="fragment"><a name="l00072"></a>00072 {
|
||
<a name="l00073"></a>00073 <span class="keywordflow">switch</span> ($p_type) {
|
||
<a name="l00074"></a>00074 <span class="keywordflow">case</span> <a class="code" href="constant_8php.html#a48">CLOSED</a>:
|
||
<a name="l00075"></a>00075 $sql_closed=<span class="stringliteral">"where p_closed=true and p_central = false "</span>;
|
||
<a name="l00076"></a>00076 <span class="keywordflow">break</span>;
|
||
<a name="l00077"></a>00077 <span class="keywordflow">case</span> <a class="code" href="constant_8php.html#a47">OPEN</a>:
|
||
<a name="l00078"></a>00078 $sql_closed=<span class="stringliteral">"where p_closed=false"</span>;
|
||
<a name="l00079"></a>00079 <span class="keywordflow">break</span>;
|
||
<a name="l00080"></a>00080 <span class="keywordflow">case</span> <a class="code" href="constant_8php.html#a49">NOTCENTRALIZED</a>:
|
||
<a name="l00081"></a>00081 $sql_closed=<span class="stringliteral">"where p_closed=true and p_central = false "</span>;
|
||
<a name="l00082"></a>00082 <span class="keywordflow">break</span>;
|
||
<a name="l00083"></a>00083 <span class="keywordflow">case</span> <a class="code" href="constant_8php.html#a50">ALL</a>:
|
||
<a name="l00084"></a>00084 $sql_closed=<span class="stringliteral">""</span>;
|
||
<a name="l00085"></a>00085 <span class="keywordflow">break</span>;
|
||
<a name="l00086"></a>00086 <span class="keywordflow">default</span>:
|
||
<a name="l00087"></a>00087 error(<span class="stringliteral">"invalide p_type in 'preference.php'#__LINE__"</span>);
|
||
<a name="l00088"></a>00088 }
|
||
<a name="l00089"></a>00089 <a class="code" href="bank_8inc_8php.html#a20">$sql</a>=<span class="stringliteral">"select p_id,to_char(p_start,'DD.MM.YYYY') as p_start_string,</span>
|
||
<a name="l00090"></a>00090 <span class="stringliteral"> to_char(p_end,'DD.MM.YYYY') as p_end_string </span>
|
||
<a name="l00091"></a>00091 <span class="stringliteral"> from parm_periode </span>
|
||
<a name="l00092"></a>00092 <span class="stringliteral"> $sql_closed </span>
|
||
<a name="l00093"></a>00093 <span class="stringliteral"> order by p_start"</span>;
|
||
<a name="l00094"></a>00094
|
||
<a name="l00095"></a>00095 <a class="code" href="depense_8inc_8php.html#a4">$Res</a>=<a class="code" href="postgres_8php.html#a2">ExecSql</a>($p_cn,$sql);
|
||
<a name="l00096"></a>00096 <a class="code" href="setup_8php.html#a11">$Max</a>=pg_NumRows($Res);
|
||
<a name="l00097"></a>00097 <span class="keywordflow">if</span> ( $Max == 0 ) <span class="keywordflow">return</span> null;
|
||
<a name="l00098"></a>00098 <a class="code" href="impress__bilan_8php.html#a0">$ret</a>='<SELECT NAME=<span class="stringliteral">"periode'.$p_suff.'"</span>>';
|
||
<a name="l00099"></a>00099 <span class="keywordflow">for</span> ( $i = 0; $i < $Max;$i++) {
|
||
<a name="l00100"></a>00100 <a class="code" href="jrn__detail_8php.html#a11">$l_line</a>=pg_fetch_array($Res,$i);
|
||
<a name="l00101"></a>00101 <span class="keywordflow">if</span> ( $l_default == $l_line['p_id'] )
|
||
<a name="l00102"></a>00102 $sel=<span class="stringliteral">"SELECTED"</span>;
|
||
<a name="l00103"></a>00103 <span class="keywordflow">else</span>
|
||
<a name="l00104"></a>00104 $sel=<span class="stringliteral">""</span>;
|
||
<a name="l00105"></a>00105
|
||
<a name="l00106"></a>00106 <a class="code" href="impress__bilan_8php.html#a0">$ret</a>.=sprintf('<OPTION VALUE=<span class="stringliteral">"%s"</span> %s>%s - %s',$l_line['p_id']
|
||
<a name="l00107"></a>00107 ,$sel
|
||
<a name="l00108"></a>00108 ,$l_line['p_start_string']
|
||
<a name="l00109"></a>00109 ,$l_line['p_end_string']);
|
||
<a name="l00110"></a>00110
|
||
<a name="l00111"></a>00111 }
|
||
<a name="l00112"></a>00112 <a class="code" href="impress__bilan_8php.html#a0">$ret</a>.=<span class="stringliteral">"</SELECT>"</span>;
|
||
<a name="l00113"></a>00113 <span class="keywordflow">return</span> <a class="code" href="impress__bilan_8php.html#a0">$ret</a>;
|
||
<a name="l00114"></a>00114 }
|
||
</pre></div>
|
||
<p>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
<a class="anchor" name="a0"></a><!-- doxytag: member="preference.php::FormPeriodeMult" ref="a0" args="($p_cn)" --><p>
|
||
<table class="mdTable" cellpadding="2" cellspacing="0">
|
||
<tr>
|
||
<td class="mdRow">
|
||
<table cellpadding="0" cellspacing="0" border="0">
|
||
<tr>
|
||
<td class="md" nowrap valign="top">FormPeriodeMult </td>
|
||
<td class="md" valign="top">( </td>
|
||
<td class="md" nowrap valign="top">$ </td>
|
||
<td class="mdname1" valign="top" nowrap> <em>p_cn</em> </td>
|
||
<td class="md" valign="top"> ) </td>
|
||
<td class="md" nowrap></td>
|
||
</tr>
|
||
</table>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
<table cellspacing="5" cellpadding="0" border="0">
|
||
<tr>
|
||
<td>
|
||
|
||
</td>
|
||
<td>
|
||
|
||
<p>
|
||
Generate the form for the periode.
|
||
<p>
|
||
FormPeriodeMult<p>
|
||
<dl compact><dt><b>Parameters:</b></dt><dd>
|
||
<table border="0" cellspacing="2" cellpadding="0">
|
||
<tr><td valign="top"></td><td valign="top"><em>$p_cn</em> </td><td>connexion</td></tr>
|
||
</table>
|
||
</dl>
|
||
<dl compact><dt><b>Returns:</b></dt><dd>string containing html code for the form</dd></dl>
|
||
|
||
<p>
|
||
Definition at line <a class="el" href="preference_8php-source.html#l00037">37</a> of file <a class="el" href="preference_8php-source.html">preference.php</a>.
|
||
<p>
|
||
References <a class="el" href="jrn__detail_8php-source.html#l00128">$l_line</a>, <a class="el" href="setup_8php-source.html#l00395">$Max</a>, <a class="el" href="depense_8inc_8php-source.html#l00077">$Res</a>, <a class="el" href="impress__bilan_8php-source.html#l00032">$ret</a>, <a class="el" href="bank_8inc_8php-source.html#l00169">$sql</a>, and <a class="el" href="postgres_8php-source.html#l00099">ExecSql()</a>.
|
||
<p>
|
||
Referenced by <a class="el" href="impress__inc_8php-source.html#l00036">ViewImp()</a>.<div class="fragment"><pre class="fragment"><a name="l00038"></a>00038 {
|
||
<a name="l00039"></a>00039 <a class="code" href="bank_8inc_8php.html#a20">$sql</a>=<span class="stringliteral">"select p_id,to_char(p_start,'DD.MM.YYYY') as p_start,</span>
|
||
<a name="l00040"></a>00040 <span class="stringliteral"> to_char(p_end,'DD.MM.YYYY') as p_end </span>
|
||
<a name="l00041"></a>00041 <span class="stringliteral"> from parm_periode </span>
|
||
<a name="l00042"></a>00042 <span class="stringliteral"> order by p_exercice,p_start"</span>;
|
||
<a name="l00043"></a>00043 <a class="code" href="depense_8inc_8php.html#a4">$Res</a>=<a class="code" href="postgres_8php.html#a2">ExecSql</a>($p_cn,$sql);
|
||
<a name="l00044"></a>00044 <a class="code" href="setup_8php.html#a11">$Max</a>=pg_NumRows($Res);
|
||
<a name="l00045"></a>00045 <a class="code" href="impress__bilan_8php.html#a0">$ret</a>='<SELECT NAME=<span class="stringliteral">"periode[]"</span> SIZE=<span class="stringliteral">"12"</span> multiple>';
|
||
<a name="l00046"></a>00046 <span class="keywordflow">for</span> ( $i = 0; $i < $Max;$i++) {
|
||
<a name="l00047"></a>00047 <a class="code" href="jrn__detail_8php.html#a11">$l_line</a>=pg_fetch_array($Res,$i);
|
||
<a name="l00048"></a>00048 <a class="code" href="impress__bilan_8php.html#a0">$ret</a>.=sprintf('<OPTION VALUE=<span class="stringliteral">"%s"</span>>%s - %s',$l_line['p_id']
|
||
<a name="l00049"></a>00049 ,$l_line['p_start']
|
||
<a name="l00050"></a>00050 ,$l_line['p_end']);
|
||
<a name="l00051"></a>00051
|
||
<a name="l00052"></a>00052 }
|
||
<a name="l00053"></a>00053 <a class="code" href="impress__bilan_8php.html#a0">$ret</a>.=<span class="stringliteral">"</SELECT>"</span>;
|
||
<a name="l00054"></a>00054 <span class="keywordflow">return</span> <a class="code" href="impress__bilan_8php.html#a0">$ret</a>;
|
||
<a name="l00055"></a>00055 }
|
||
</pre></div>
|
||
<p>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
<a class="anchor" name="a4"></a><!-- doxytag: member="preference.php::GetExercice" ref="a4" args="($p_cn, $p_periode)" --><p>
|
||
<table class="mdTable" cellpadding="2" cellspacing="0">
|
||
<tr>
|
||
<td class="mdRow">
|
||
<table cellpadding="0" cellspacing="0" border="0">
|
||
<tr>
|
||
<td class="md" nowrap valign="top">GetExercice </td>
|
||
<td class="md" valign="top">( </td>
|
||
<td class="md" nowrap valign="top">$ </td>
|
||
<td class="mdname" nowrap> <em>p_cn</em>, </td>
|
||
</tr>
|
||
<tr>
|
||
<td class="md" nowrap align="right"></td>
|
||
<td class="md"></td>
|
||
<td class="md" nowrap>$ </td>
|
||
<td class="mdname" nowrap> <em>p_periode</em></td>
|
||
</tr>
|
||
<tr>
|
||
<td class="md"></td>
|
||
<td class="md">) </td>
|
||
<td class="md" colspan="2"></td>
|
||
</tr>
|
||
</table>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
<table cellspacing="5" cellpadding="0" border="0">
|
||
<tr>
|
||
<td>
|
||
|
||
</td>
|
||
<td>
|
||
|
||
<p>
|
||
get the exercice of a periode
|
||
<p>
|
||
<dl compact><dt><b>Parameters:</b></dt><dd>
|
||
<table border="0" cellspacing="2" cellpadding="0">
|
||
<tr><td valign="top"></td><td valign="top"><em>$p_cn</em> </td><td>connection </td></tr>
|
||
<tr><td valign="top"></td><td valign="top"><em>$p_periode</em> </td><td>periode</td></tr>
|
||
</table>
|
||
</dl>
|
||
<dl compact><dt><b>Returns:</b></dt><dd>Exercice of the periode</dd></dl>
|
||
|
||
<p>
|
||
Definition at line <a class="el" href="preference_8php-source.html#l00168">168</a> of file <a class="el" href="preference_8php-source.html">preference.php</a>.
|
||
<p>
|
||
References <a class="el" href="depense_8inc_8php-source.html#l00077">$Res</a>, and <a class="el" href="postgres_8php-source.html#l00099">ExecSql()</a>.<div class="fragment"><pre class="fragment"><a name="l00169"></a>00169 {
|
||
<a name="l00170"></a>00170 <a class="code" href="depense_8inc_8php.html#a4">$Res</a>=<a class="code" href="postgres_8php.html#a2">ExecSql</a>($p_cn,<span class="stringliteral">"select p_exercice from parm_periode"</span>.
|
||
<a name="l00171"></a>00171 <span class="stringliteral">" where p_id=$p_periode"</span>);
|
||
<a name="l00172"></a>00172 <span class="keywordflow">if</span> ( pg_NumRows($Res) == 0 ) <span class="keywordflow">return</span> <span class="stringliteral">""</span>;
|
||
<a name="l00173"></a>00173 $line=pg_fetch_array($Res,0);
|
||
<a name="l00174"></a>00174 <span class="keywordflow">return</span> $line['p_exercice'];
|
||
<a name="l00175"></a>00175 }
|
||
</pre></div>
|
||
<p>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
<a class="anchor" name="a2"></a><!-- doxytag: member="preference.php::GetPeriode" ref="a2" args="($p_cn, $p_periode)" --><p>
|
||
<table class="mdTable" cellpadding="2" cellspacing="0">
|
||
<tr>
|
||
<td class="mdRow">
|
||
<table cellpadding="0" cellspacing="0" border="0">
|
||
<tr>
|
||
<td class="md" nowrap valign="top">GetPeriode </td>
|
||
<td class="md" valign="top">( </td>
|
||
<td class="md" nowrap valign="top">$ </td>
|
||
<td class="mdname" nowrap> <em>p_cn</em>, </td>
|
||
</tr>
|
||
<tr>
|
||
<td class="md" nowrap align="right"></td>
|
||
<td class="md"></td>
|
||
<td class="md" nowrap>$ </td>
|
||
<td class="mdname" nowrap> <em>p_periode</em></td>
|
||
</tr>
|
||
<tr>
|
||
<td class="md"></td>
|
||
<td class="md">) </td>
|
||
<td class="md" colspan="2"></td>
|
||
</tr>
|
||
</table>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
<table cellspacing="5" cellpadding="0" border="0">
|
||
<tr>
|
||
<td>
|
||
|
||
</td>
|
||
<td>
|
||
|
||
<p>
|
||
Give the start & end date of a periode.
|
||
<p>
|
||
GetPeriode<p>
|
||
<dl compact><dt><b>Parameters:</b></dt><dd>
|
||
<table border="0" cellspacing="2" cellpadding="0">
|
||
<tr><td valign="top"></td><td valign="top"><em>p_connection</em> </td><td></td></tr>
|
||
<tr><td valign="top"></td><td valign="top"><em>p_periode</em> </td><td></td></tr>
|
||
</table>
|
||
</dl>
|
||
<dl compact><dt><b>Returns:</b></dt><dd>array containing the start date & the end date</dd></dl>
|
||
|
||
<p>
|
||
Definition at line <a class="el" href="preference_8php-source.html#l00125">125</a> of file <a class="el" href="preference_8php-source.html">preference.php</a>.
|
||
<p>
|
||
References <a class="el" href="depense_8inc_8php-source.html#l00077">$Res</a>, <a class="el" href="bank_8inc_8php-source.html#l00169">$sql</a>, and <a class="el" href="postgres_8php-source.html#l00099">ExecSql()</a>.
|
||
<p>
|
||
Referenced by <a class="el" href="user__form__ach_8php-source.html#l00044">FormAchInput()</a>, <a class="el" href="user__form__fin_8php-source.html#l00146">FormFin()</a>, <a class="el" href="user__form__ods_8php-source.html#l00045">FormODS()</a>, <a class="el" href="user__form__ven_8php-source.html#l00043">FormVenInput()</a>, <a class="el" href="jrn_8php-source.html#l00038">RecordJrn()</a>, <a class="el" href="jrn_8php-source.html#l00834">VerifData()</a>, and <a class="el" href="user__common_8php-source.html#l00654">VerifyOperationDate()</a>.<div class="fragment"><pre class="fragment"><a name="l00126"></a>00126 {
|
||
<a name="l00127"></a>00127 <a class="code" href="bank_8inc_8php.html#a20">$sql</a>=<span class="stringliteral">"select to_char(p_start,'DD.MM.YYYY') as p_start,</span>
|
||
<a name="l00128"></a>00128 <span class="stringliteral"> to_char(p_end,'DD.MM.YYYY') as p_end</span>
|
||
<a name="l00129"></a>00129 <span class="stringliteral"> from parm_periode</span>
|
||
<a name="l00130"></a>00130 <span class="stringliteral"> where p_id="</span>.$p_periode;
|
||
<a name="l00131"></a>00131 <a class="code" href="depense_8inc_8php.html#a4">$Res</a>=<a class="code" href="postgres_8php.html#a2">ExecSql</a>($p_cn,$sql);
|
||
<a name="l00132"></a>00132 <span class="keywordflow">if</span> ( pg_NumRows($Res) == 0) <span class="keywordflow">return</span> null;
|
||
<a name="l00133"></a>00133 <span class="keywordflow">return</span> pg_fetch_array($Res,0);
|
||
<a name="l00134"></a>00134
|
||
<a name="l00135"></a>00135 }
|
||
</pre></div>
|
||
<p>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
<a class="anchor" name="a3"></a><!-- doxytag: member="preference.php::PeriodeClosed" ref="a3" args="($p_cn, $p_periode)" --><p>
|
||
<table class="mdTable" cellpadding="2" cellspacing="0">
|
||
<tr>
|
||
<td class="mdRow">
|
||
<table cellpadding="0" cellspacing="0" border="0">
|
||
<tr>
|
||
<td class="md" nowrap valign="top">PeriodeClosed </td>
|
||
<td class="md" valign="top">( </td>
|
||
<td class="md" nowrap valign="top">$ </td>
|
||
<td class="mdname" nowrap> <em>p_cn</em>, </td>
|
||
</tr>
|
||
<tr>
|
||
<td class="md" nowrap align="right"></td>
|
||
<td class="md"></td>
|
||
<td class="md" nowrap>$ </td>
|
||
<td class="mdname" nowrap> <em>p_periode</em></td>
|
||
</tr>
|
||
<tr>
|
||
<td class="md"></td>
|
||
<td class="md">) </td>
|
||
<td class="md" colspan="2"></td>
|
||
</tr>
|
||
</table>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
<table cellspacing="5" cellpadding="0" border="0">
|
||
<tr>
|
||
<td>
|
||
|
||
</td>
|
||
<td>
|
||
|
||
<p>
|
||
get the status of a periode
|
||
<p>
|
||
<dl compact><dt><b>Parameters:</b></dt><dd>
|
||
<table border="0" cellspacing="2" cellpadding="0">
|
||
<tr><td valign="top"></td><td valign="top"><em>$p_cn</em> </td><td>database connex </td></tr>
|
||
<tr><td valign="top"></td><td valign="top"><em>periode</em> </td><td>id</td></tr>
|
||
</table>
|
||
</dl>
|
||
<dl compact><dt><b>Returns:</b></dt><dd>'t' if closed otherwise 'f'</dd></dl>
|
||
|
||
<p>
|
||
Definition at line <a class="el" href="preference_8php-source.html#l00146">146</a> of file <a class="el" href="preference_8php-source.html">preference.php</a>.
|
||
<p>
|
||
References <a class="el" href="jrn__detail_8php-source.html#l00128">$l_line</a>, <a class="el" href="depense_8inc_8php-source.html#l00077">$Res</a>, <a class="el" href="bank_8inc_8php-source.html#l00169">$sql</a>, and <a class="el" href="postgres_8php-source.html#l00099">ExecSql()</a>.
|
||
<p>
|
||
Referenced by <a class="el" href="jrn_8php-source.html#l00834">VerifData()</a>, and <a class="el" href="user__common_8php-source.html#l00654">VerifyOperationDate()</a>.<div class="fragment"><pre class="fragment"><a name="l00147"></a>00147 {
|
||
<a name="l00148"></a>00148 <a class="code" href="bank_8inc_8php.html#a20">$sql</a>=<span class="stringliteral">"select p_closed</span>
|
||
<a name="l00149"></a>00149 <span class="stringliteral"> from parm_periode</span>
|
||
<a name="l00150"></a>00150 <span class="stringliteral"> where p_id="</span>.$p_periode;
|
||
<a name="l00151"></a>00151 <a class="code" href="depense_8inc_8php.html#a4">$Res</a>=<a class="code" href="postgres_8php.html#a2">ExecSql</a>($p_cn,$sql);
|
||
<a name="l00152"></a>00152 <span class="keywordflow">if</span> ( pg_NumRows($Res) == 0) <span class="keywordflow">return</span> null;
|
||
<a name="l00153"></a>00153 <a class="code" href="jrn__detail_8php.html#a11">$l_line</a>=pg_fetch_array($Res,0);
|
||
<a name="l00154"></a>00154 <span class="keywordflow">return</span> <a class="code" href="jrn__detail_8php.html#a11">$l_line</a>['p_closed'];
|
||
<a name="l00155"></a>00155
|
||
<a name="l00156"></a>00156 }
|
||
</pre></div>
|
||
<p>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
<a class="anchor" name="a5"></a><!-- doxytag: member="preference.php::ShowDevise" ref="a5" args="($p_cn)" --><p>
|
||
<table class="mdTable" cellpadding="2" cellspacing="0">
|
||
<tr>
|
||
<td class="mdRow">
|
||
<table cellpadding="0" cellspacing="0" border="0">
|
||
<tr>
|
||
<td class="md" nowrap valign="top">ShowDevise </td>
|
||
<td class="md" valign="top">( </td>
|
||
<td class="md" nowrap valign="top">$ </td>
|
||
<td class="mdname1" valign="top" nowrap> <em>p_cn</em> </td>
|
||
<td class="md" valign="top"> ) </td>
|
||
<td class="md" nowrap></td>
|
||
</tr>
|
||
</table>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
<table cellspacing="5" cellpadding="0" border="0">
|
||
<tr>
|
||
<td>
|
||
|
||
</td>
|
||
<td>
|
||
|
||
<p>
|
||
Show all the currency encoded.
|
||
<p>
|
||
<dl compact><dt><b>Parameters:</b></dt><dd>
|
||
<table border="0" cellspacing="2" cellpadding="0">
|
||
<tr><td valign="top"></td><td valign="top"><em>$p_cn</em> </td><td>database connextion</td></tr>
|
||
</table>
|
||
</dl>
|
||
<dl compact><dt><b>Returns:</b></dt><dd>nothing</dd></dl>
|
||
|
||
<p>
|
||
Definition at line <a class="el" href="preference_8php-source.html#l00185">185</a> of file <a class="el" href="preference_8php-source.html">preference.php</a>.
|
||
<p>
|
||
References <a class="el" href="jrn__detail_8php-source.html#l00128">$l_line</a>, <a class="el" href="setup_8php-source.html#l00395">$Max</a>, <a class="el" href="depense_8inc_8php-source.html#l00077">$Res</a>, <a class="el" href="postgres_8php-source.html#l00099">ExecSql()</a>, and <a class="el" href="pref_8inc_8php-source.html#l00048">METHOD</a>.<div class="fragment"><pre class="fragment"><a name="l00186"></a>00186 {
|
||
<a name="l00187"></a>00187 echo <span class="stringliteral">"<h2 class=\"info\"> Devises </H2>"</span>;
|
||
<a name="l00188"></a>00188 echo '<TABLE ALIGN=<span class="stringliteral">"CENTER"</span>>';
|
||
<a name="l00189"></a>00189 echo <span class="stringliteral">"<TR>"</span>;
|
||
<a name="l00190"></a>00190 echo '<TH> CODE </TH>';
|
||
<a name="l00191"></a>00191 echo '<TH> Valeur <BR>(par <a class="code" href="classrapport.html">rapport</a> <20> l\'euro) </TH>';
|
||
<a name="l00192"></a>00192 echo <span class="stringliteral">"</TR>"</span>;
|
||
<a name="l00193"></a>00193
|
||
<a name="l00194"></a>00194 <a class="code" href="depense_8inc_8php.html#a4">$Res</a>=<a class="code" href="postgres_8php.html#a2">ExecSql</a>($p_cn,<span class="stringliteral">"select pm_id,pm_code,pm_rate from parm_money order by pm_code"</span>);
|
||
<a name="l00195"></a>00195 <a class="code" href="setup_8php.html#a11">$Max</a>=pg_NumRows($Res);
|
||
<a name="l00196"></a>00196
|
||
<a name="l00197"></a>00197 <span class="keywordflow">for</span> ($i=0;$i<$Max;$i++) {
|
||
<a name="l00198"></a>00198 <a class="code" href="jrn__detail_8php.html#a11">$l_line</a>=pg_fetch_array($Res,$i);
|
||
<a name="l00199"></a>00199 echo '<TR>';
|
||
<a name="l00200"></a>00200 echo '<TD>'.$l_line['pm_code'].'</TD>';
|
||
<a name="l00201"></a>00201 $l_rate=sprintf(<span class="stringliteral">"% 10.6f"</span>,$l_line['pm_rate']);
|
||
<a name="l00202"></a>00202 echo '<TD ALIGN=<span class="stringliteral">"RIGHT"</span>>'.$l_rate.'</TD>';
|
||
<a name="l00203"></a>00203 echo <span class="stringliteral">"<TD class=\"mtitle\"> <A class=\"mtitle\" HREF=\"parametre.php?p_mid=$l_line[pm_id]&p_action=change&p_code=$l_line[pm_code]&p_rate=$l_line[pm_rate]\">Change</A></TD>"</span>;
|
||
<a name="l00204"></a>00204 echo <span class="stringliteral">"<TD class=\"mtitle\"> <A class=\"mtitle\" HREF=\"parametre.php?p_mid=$l_line[pm_id]&p_action=delete&p_code=$l_line[pm_code]\">Efface</A></TD>"</span>;
|
||
<a name="l00205"></a>00205 echo '</TR>';
|
||
<a name="l00206"></a>00206
|
||
<a name="l00207"></a>00207 }
|
||
<a name="l00208"></a>00208 echo '<TR> <<a class="code" href="constant_8php.html#a7">FORM</a> <a class="code" href="constant_8php.html#a44">ACTION</a>=<span class="stringliteral">"parametre.php"</span> <a class="code" href="pref_8inc_8php.html#a0">METHOD</a>=<span class="stringliteral">"POST"</span>>';
|
||
<a name="l00209"></a>00209 echo '<TD> <INPUT TYPE=<span class="stringliteral">"text"</span> NAME=<span class="stringliteral">"p_devise"</span>></TD>';
|
||
<a name="l00210"></a>00210 echo '<TD> <INPUT TYPE=<span class="stringliteral">"text"</span> NAME=<span class="stringliteral">"p_rate"</span>></TD>';
|
||
<a name="l00211"></a>00211 echo '<TD> <INPUT TYPE=<span class="stringliteral">"SUBMIT"</span> NAME=<span class="stringliteral">"action"</span> Value=<span class="stringliteral">"Ajout"</span></TD>';
|
||
<a name="l00212"></a>00212 echo '</<a class="code" href="constant_8php.html#a7">FORM</a>></TR>';
|
||
<a name="l00213"></a>00213 echo '</TABLE>';
|
||
<a name="l00214"></a>00214 }
|
||
</pre></div>
|
||
<p>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
<a class="anchor" name="a6"></a><!-- doxytag: member="preference.php::ShowPeriode" ref="a6" args="($p_cn)" --><p>
|
||
<table class="mdTable" cellpadding="2" cellspacing="0">
|
||
<tr>
|
||
<td class="mdRow">
|
||
<table cellpadding="0" cellspacing="0" border="0">
|
||
<tr>
|
||
<td class="md" nowrap valign="top">ShowPeriode </td>
|
||
<td class="md" valign="top">( </td>
|
||
<td class="md" nowrap valign="top">$ </td>
|
||
<td class="mdname1" valign="top" nowrap> <em>p_cn</em> </td>
|
||
<td class="md" valign="top"> ) </td>
|
||
<td class="md" nowrap></td>
|
||
</tr>
|
||
</table>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
<table cellspacing="5" cellpadding="0" border="0">
|
||
<tr>
|
||
<td>
|
||
|
||
</td>
|
||
<td>
|
||
|
||
<p>
|
||
Show all the periode and their status.
|
||
<p>
|
||
<dl compact><dt><b>Parameters:</b></dt><dd>
|
||
<table border="0" cellspacing="2" cellpadding="0">
|
||
<tr><td valign="top"></td><td valign="top"><em>$p_cn</em> </td><td>database connection</td></tr>
|
||
</table>
|
||
</dl>
|
||
<dl compact><dt><b>Returns:</b></dt><dd>nothing</dd></dl>
|
||
|
||
<p>
|
||
Definition at line <a class="el" href="preference_8php-source.html#l00224">224</a> of file <a class="el" href="preference_8php-source.html">preference.php</a>.
|
||
<p>
|
||
References <a class="el" href="jrn__detail_8php-source.html#l00128">$l_line</a>, <a class="el" href="setup_8php-source.html#l00395">$Max</a>, <a class="el" href="depense_8inc_8php-source.html#l00077">$Res</a>, <a class="el" href="debug_8php-source.html#l00034">echo_debug()</a>, <a class="el" href="postgres_8php-source.html#l00099">ExecSql()</a>, and <a class="el" href="pref_8inc_8php-source.html#l00048">METHOD</a>.<div class="fragment"><pre class="fragment"><a name="l00225"></a>00225 {
|
||
<a name="l00226"></a>00226 <span class="comment">// echo "<h2 class=\"info\"> P<>riode </H2>";</span>
|
||
<a name="l00227"></a>00227 <a class="code" href="depense_8inc_8php.html#a4">$Res</a>=<a class="code" href="postgres_8php.html#a2">ExecSql</a>($p_cn,<span class="stringliteral">"select p_id,to_char(p_start,'DD.MM.YYYY') as date_start,to_char(p_end,'DD.MM.YYYY') as date_end,p_central,p_closed,p_exercice</span>
|
||
<a name="l00228"></a>00228 <span class="stringliteral"> from parm_periode order by p_start"</span>);
|
||
<a name="l00229"></a>00229 <a class="code" href="setup_8php.html#a11">$Max</a>=pg_NumRows($Res);
|
||
<a name="l00230"></a>00230 echo '<TABLE ALIGN=<span class="stringliteral">"CENTER"</span>>';
|
||
<a name="l00231"></a>00231 echo <span class="stringliteral">"</TR>"</span>;
|
||
<a name="l00232"></a>00232 echo '<TH> Date d<>but </TH>';
|
||
<a name="l00233"></a>00233 echo '<TH> Date fin </TH>';
|
||
<a name="l00234"></a>00234 echo '<TH> Exercice </TH>';
|
||
<a name="l00235"></a>00235 echo <span class="stringliteral">"</TR>"</span>;
|
||
<a name="l00236"></a>00236
|
||
<a name="l00237"></a>00237 <span class="keywordflow">for</span> ($i=0;$i<$Max;$i++) {
|
||
<a name="l00238"></a>00238 <a class="code" href="jrn__detail_8php.html#a11">$l_line</a>=pg_fetch_array($Res,$i);
|
||
<a name="l00239"></a>00239 echo '<TR>';
|
||
<a name="l00240"></a>00240 echo '<TD ALIGN=<span class="stringliteral">"CENTER"</span>> '.$l_line['date_start'].'</TD>';
|
||
<a name="l00241"></a>00241 echo '<TD ALIGN=<span class="stringliteral">"CENTER"</span>> '.$l_line['date_end'].'</TD>';
|
||
<a name="l00242"></a>00242 echo '<TD ALIGN=<span class="stringliteral">"CENTER"</span>> '.$l_line['p_exercice'].'</TD>';
|
||
<a name="l00243"></a>00243 <a class="code" href="debug_8php.html#a0">echo_debug</a>('preference.php',__LINE__,<span class="stringliteral">" closed : $l_line[p_closed]"</span>);
|
||
<a name="l00244"></a>00244 <span class="keywordflow">if</span> ( $l_line['p_closed'] == <span class="charliteral">'t'</span> ) {
|
||
<a name="l00245"></a>00245 $closed=(<a class="code" href="jrn__detail_8php.html#a11">$l_line</a>['p_central']==<span class="charliteral">'t'</span>)?'<TD>Centralis<EFBFBD>e</TD><span class="charliteral">':'</span><TD>Ferm<EFBFBD>e</TD>';
|
||
<a name="l00246"></a>00246 $change='<TD></TD>';
|
||
<a name="l00247"></a>00247 $remove='<TD></TD>';
|
||
<a name="l00248"></a>00248 } <span class="keywordflow">else</span> {
|
||
<a name="l00249"></a>00249 $closed='<TD <span class="keyword">class</span>=<span class="stringliteral">"mtitle"</span>>';
|
||
<a name="l00250"></a>00250 $closed.='<A <span class="keyword">class</span>=<span class="stringliteral">"mtitle"</span> HREF=<span class="stringliteral">"user_advanced.php?p_action=periode&action=closed&p_per='.$l_line['p_id'].'"</span>> Cloturer</A>';
|
||
<a name="l00251"></a>00251 $change='<TD <span class="keyword">class</span>=<span class="stringliteral">"mtitle"</span>>';
|
||
<a name="l00252"></a>00252 $change.='<A <span class="keyword">class</span>=<span class="stringliteral">"mtitle"</span> HREF=<span class="stringliteral">"user_advanced.php?p_action=periode&action=change_per&p_per='.</span>
|
||
<a name="l00253"></a>00253 <span class="stringliteral"> $l_line['p_id']."</span>&p_date_start=<span class="stringliteral">".$l_line['date_start'].</span>
|
||
<a name="l00254"></a>00254 <span class="stringliteral"> "</span>&p_date_end=<span class="stringliteral">".$l_line['date_end']."</span>&p_exercice=<span class="stringliteral">".</span>
|
||
<a name="l00255"></a>00255 <span class="stringliteral"> $l_line['p_exercice']."</span>\<span class="stringliteral">"> Changer</A>"</span>;
|
||
<a name="l00256"></a>00256 $remove='<TD <span class="keyword">class</span>=<span class="stringliteral">"mtitle"</span>>';
|
||
<a name="l00257"></a>00257 $remove.='<A <span class="keyword">class</span>=<span class="stringliteral">"mtitle"</span> HREF=<span class="stringliteral">"user_advanced.php?p_action=periode&action=delete_per&p_per='.</span>
|
||
<a name="l00258"></a>00258 <span class="stringliteral"> $l_line['p_id']."</span>\<span class="stringliteral">"> Efface</A>"</span>;
|
||
<a name="l00259"></a>00259
|
||
<a name="l00260"></a>00260 }
|
||
<a name="l00261"></a>00261 echo <span class="stringliteral">"$closed"</span>;
|
||
<a name="l00262"></a>00262 echo $change;
|
||
<a name="l00263"></a>00263
|
||
<a name="l00264"></a>00264 echo $remove;
|
||
<a name="l00265"></a>00265
|
||
<a name="l00266"></a>00266 echo '</TR>';
|
||
<a name="l00267"></a>00267
|
||
<a name="l00268"></a>00268 }
|
||
<a name="l00269"></a>00269 echo '<TR> <<a class="code" href="constant_8php.html#a7">FORM</a> <a class="code" href="constant_8php.html#a44">ACTION</a>=<span class="stringliteral">"user_advanced.php?p_action=periode"</span> <a class="code" href="pref_8inc_8php.html#a0">METHOD</a>=<span class="stringliteral">"POST"</span>>';
|
||
<a name="l00270"></a>00270 echo '<TD> <INPUT TYPE=<span class="stringliteral">"text"</span> NAME=<span class="stringliteral">"p_date_start"</span> SIZE=<span class="stringliteral">"10"</span>></TD>';
|
||
<a name="l00271"></a>00271 echo '<TD> <INPUT TYPE=<span class="stringliteral">"text"</span> NAME=<span class="stringliteral">"p_date_end"</span> SIZE=<span class="stringliteral">"10"</span>></TD>';
|
||
<a name="l00272"></a>00272 echo '<TD> <INPUT TYPE=<span class="stringliteral">"text"</span> NAME=<span class="stringliteral">"p_exercice"</span> SIZE=<span class="stringliteral">"10"</span>></TD>';
|
||
<a name="l00273"></a>00273 echo '<TD> <INPUT TYPE=<span class="stringliteral">"SUBMIT"</span> NAME=<span class="stringliteral">"add_per"</span> Value=<span class="stringliteral">"Ajout"</span></TD>';
|
||
<a name="l00274"></a>00274 echo '<TD></TD>';
|
||
<a name="l00275"></a>00275 echo '<TD></TD>';
|
||
<a name="l00276"></a>00276 echo '</<a class="code" href="constant_8php.html#a7">FORM</a>></TR>';
|
||
<a name="l00277"></a>00277
|
||
<a name="l00278"></a>00278 echo '</TABLE>';
|
||
<a name="l00279"></a>00279 }
|
||
</pre></div>
|
||
<p>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</BODY>
|
||
</HTML>
|