altocompta/doc/developper/html/classDocument__modele.html

474 lines
22 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: Document_modele Class 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&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>
<h1>Document_modele Class Reference</h1><!-- doxytag: class="Document_modele" -->Class for the document template.
<a href="#_details">More...</a>
<p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classDocument__modele.html#a0">Document_modele</a> ($p_cn, $p_id=-1)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classDocument__modele.html#a1">myList</a> ()</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">: show all the stored document_modele. return a string containing all the data separate by TD &amp; TR tag <a href="#a1"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classDocument__modele.html#a2">Save</a> ()</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">: Save a document_modele in the database, if the document_modele doesn't exist yet it will be first created (-&gt; insert into document_modele) in that case the name and the type must be set set before calling Save, the name will be modified with FormatString <a href="#a2"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classDocument__modele.html#a3">Delete</a> ()</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Remove a template. <a href="#a3"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classDocument__modele.html#a4">Get</a> ($p_id, $p_internal)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Parse and remplace the tag in the invoice By the value found in quant_sold. <a href="#a4"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classDocument__modele.html#a5">form</a> ($p_action)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">show the form for loading a template <a href="#a5"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Data Fields</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classDocument__modele.html#o0">$cn</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classDocument__modele.html#o1">$md_id</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classDocument__modele.html#o2">$md_name</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classDocument__modele.html#o3">$md_type</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classDocument__modele.html#o4">$md_lob</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classDocument__modele.html#o5">$md_sequence</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classDocument__modele.html#o6">$sequence</a></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
Class for the document template.
<p>
<p>
Definition at line <a class="el" href="class__document__modele_8php-source.html#l00028">28</a> of file <a class="el" href="class__document__modele_8php-source.html">class_document_modele.php</a>.<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" name="a0"></a><!-- doxytag: member="Document_modele::Document_modele" ref="a0" args="($p_cn, $p_id=-1)" --><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">Document_modele::Document_modele </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">$&nbsp;</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>$&nbsp;</td>
<td class="mdname" nowrap> <em>p_id</em> = <code>-1</code></td>
</tr>
<tr>
<td class="md"></td>
<td class="md">)&nbsp;</td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
<p>
Definition at line <a class="el" href="class__document__modele_8php-source.html#l00037">37</a> of file <a class="el" href="class__document__modele_8php-source.html">class_document_modele.php</a>.
<p>
References <a class="el" href="user__update_8php-source.html#l00032">$p_id</a>, and <a class="el" href="document__modele_8inc_8php-source.html#l00045">md_id</a>. </td>
</tr>
</table>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="a3"></a><!-- doxytag: member="Document_modele::Delete" ref="a3" args="()" --><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">Document_modele::Delete </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top">&nbsp;)&nbsp;</td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Remove a template.
<p>
<dl compact><dt><b>Returns:</b></dt><dd>nothing</dd></dl>
<p>
Definition at line <a class="el" href="class__document__modele_8php-source.html#l00178">178</a> of file <a class="el" href="class__document__modele_8php-source.html">class_document_modele.php</a>.
<p>
References <a class="el" href="user__action__ach_8php-source.html#l00052">$r</a>, <a class="el" href="pref_8inc_8php-source.html#l00056">$res</a>, <a class="el" href="facture_8inc_8php-source.html#l00082">$sql</a>, <a class="el" href="postgres_8php-source.html#l00263">Commit()</a>, <a class="el" href="postgres_8php-source.html#l00099">ExecSql()</a>, and <a class="el" href="postgres_8php-source.html#l00257">StartSql()</a>. </td>
</tr>
</table>
<a class="anchor" name="a5"></a><!-- doxytag: member="Document_modele::form" ref="a5" args="($p_action)" --><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">Document_modele::form </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">$&nbsp;</td>
<td class="mdname1" valign="top" nowrap> <em>p_action</em> </td>
<td class="md" valign="top">&nbsp;)&nbsp;</td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
show the form for loading a template
<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_action</em>&nbsp;</td><td>for the field action = destination url </td></tr>
<tr><td valign="top"></td><td valign="top"><em>\param</em>&nbsp;</td><td></td></tr>
</table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>string containing the forms</dd></dl>
<p>
Definition at line <a class="el" href="class__document__modele_8php-source.html#l00251">251</a> of file <a class="el" href="class__document__modele_8php-source.html">class_document_modele.php</a>.
<p>
References <a class="el" href="poste_8inc_8php-source.html#l00069">$h</a>, <a class="el" href="user__action__ach_8php-source.html#l00052">$r</a>, <a class="el" href="bilan_8php-source.html#l00058">$start</a>, <a class="el" href="impress__rapport_8php-source.html#l00058">$t</a>, <a class="el" href="balance_8php-source.html#l00067">$w</a>, and <a class="el" href="ac__common_8php-source.html#l00281">make_array()</a>.
<p>
Referenced by <a class="el" href="class__document__modele_8php-source.html#l00049">myList()</a>. </td>
</tr>
</table>
<a class="anchor" name="a4"></a><!-- doxytag: member="Document_modele::Get" ref="a4" args="($p_id, $p_internal)" --><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">Document_modele::Get </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">$&nbsp;</td>
<td class="mdname" nowrap> <em>p_id</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>$&nbsp;</td>
<td class="mdname" nowrap> <em>p_internal</em></td>
</tr>
<tr>
<td class="md"></td>
<td class="md">)&nbsp;</td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Parse and remplace the tag in the invoice By the value found in quant_sold.
<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_id</em>&nbsp;</td><td>is the id of the invoice </td></tr>
<tr><td valign="top"></td><td valign="top"><em>p_internal</em>&nbsp;</td><td>reference (quant_sold qs_internal)</td></tr>
</table>
</dl>
<p>
Definition at line <a class="el" href="class__document__modele_8php-source.html#l00203">203</a> of file <a class="el" href="class__document__modele_8php-source.html">class_document_modele.php</a>.
<p>
References <a class="el" href="show__document__modele_8php-source.html#l00060">$file</a>, <a class="el" href="class__operation_8php-source.html#l00087">$ret</a>, <a class="el" href="cbc__be_8inc_8php-source.html#l00028">$row</a>, <a class="el" href="show__document__modele_8php-source.html#l00050">$tmp</a>, <a class="el" href="postgres_8php-source.html#l00263">Commit()</a>, <a class="el" href="postgres_8php-source.html#l00099">ExecSql()</a>, and <a class="el" href="postgres_8php-source.html#l00257">StartSql()</a>. </td>
</tr>
</table>
<a class="anchor" name="a1"></a><!-- doxytag: member="Document_modele::myList" ref="a1" args="()" --><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">Document_modele::myList </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top">&nbsp;)&nbsp;</td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
: show all the stored document_modele. return a string containing all the data separate by TD &amp; TR tag
<p>
<dl compact><dt><b>Returns:</b></dt><dd>table in HTML Code</dd></dl>
<p>
Definition at line <a class="el" href="class__document__modele_8php-source.html#l00049">49</a> of file <a class="el" href="class__document__modele_8php-source.html">class_document_modele.php</a>.
<p>
References <a class="el" href="balance_8php-source.html#l00108">$a</a>, <a class="el" href="class__operation_8php-source.html#l00086">$all</a>, <a class="el" href="balance_8php-source.html#l00082">$c</a>, <a class="el" href="user__action__ach_8php-source.html#l00052">$r</a>, <a class="el" href="eub__be_8inc_8php-source.html#l00074">$Res</a>, <a class="el" href="cbc__be_8inc_8php-source.html#l00028">$row</a>, <a class="el" href="facture_8inc_8php-source.html#l00082">$sql</a>, <a class="el" href="postgres_8php-source.html#l00099">ExecSql()</a>, <a class="el" href="class__document__modele_8php-source.html#l00251">form()</a>, <a class="el" href="document__modele_8inc_8php-source.html#l00045">md_id</a>, and <a class="el" href="document__modele_8inc_8php-source.html#l00044">md_name</a>. </td>
</tr>
</table>
<a class="anchor" name="a2"></a><!-- doxytag: member="Document_modele::Save" ref="a2" args="()" --><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">Document_modele::Save </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top">&nbsp;)&nbsp;</td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
: Save a document_modele in the database, if the document_modele doesn't exist yet it will be first created (-&gt; insert into document_modele) in that case the name and the type must be set set before calling Save, the name will be modified with FormatString
<p>
Save<p>
parm :<ul>
<li>none gen :</li><li>none return:</li></ul>
<p>
none
<p>
Definition at line <a class="el" href="class__document__modele_8php-source.html#l00103">103</a> of file <a class="el" href="class__document__modele_8php-source.html">class_document_modele.php</a>.
<p>
References <a class="el" href="modify__op_8php-source.html#l00123">$old_oid</a>, <a class="el" href="user__action__ach_8php-source.html#l00052">$r</a>, <a class="el" href="class__operation_8php-source.html#l00087">$ret</a>, <a class="el" href="line__update_8php-source.html#l00070">$Ret</a>, <a class="el" href="facture_8inc_8php-source.html#l00082">$sql</a>, <a class="el" href="postgres_8php-source.html#l00263">Commit()</a>, <a class="el" href="debug_8php-source.html#l00034">echo_debug()</a>, <a class="el" href="ac__common_8php-source.html#l00036">echo_error()</a>, <a class="el" href="postgres_8php-source.html#l00099">ExecSql()</a>, <a class="el" href="balance_8php-source.html#l00033">exit</a>, <a class="el" href="ac__common_8php-source.html#l00207">FormatString()</a>, <a class="el" href="ac__common_8php-source.html#l00076">isNumber()</a>, <a class="el" href="document__modele_8inc_8php-source.html#l00045">md_id</a>, <a class="el" href="client_8inc_8php-source.html#l00116">name</a>, <a class="el" href="postgres_8php-source.html#l00251">NextSequence()</a>, <a class="el" href="postgres_8php-source.html#l00266">Rollback()</a>, <a class="el" href="document__modele_8inc_8php-source.html#l00047">start</a>, and <a class="el" href="postgres_8php-source.html#l00257">StartSql()</a>. </td>
</tr>
</table>
<hr><h2>Field Documentation</h2>
<a class="anchor" name="o0"></a><!-- doxytag: member="Document_modele::$cn" ref="o0" args="" --><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">Document_modele::$cn </td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
database connection
<p>
Definition at line <a class="el" href="class__document__modele_8php-source.html#l00029">29</a> of file <a class="el" href="class__document__modele_8php-source.html">class_document_modele.php</a>. </td>
</tr>
</table>
<a class="anchor" name="o1"></a><!-- doxytag: member="Document_modele::$md_id" ref="o1" args="" --><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">Document_modele::$<a class="el" href="facture_8inc_8php.html#a19">md_id</a> </td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
pk
<p>
Definition at line <a class="el" href="class__document__modele_8php-source.html#l00030">30</a> of file <a class="el" href="class__document__modele_8php-source.html">class_document_modele.php</a>. </td>
</tr>
</table>
<a class="anchor" name="o4"></a><!-- doxytag: member="Document_modele::$md_lob" ref="o4" args="" --><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">Document_modele::$md_lob </td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
<a class="el" href="classDocument.html">Document</a> file
<p>
Definition at line <a class="el" href="class__document__modele_8php-source.html#l00033">33</a> of file <a class="el" href="class__document__modele_8php-source.html">class_document_modele.php</a>. </td>
</tr>
</table>
<a class="anchor" name="o2"></a><!-- doxytag: member="Document_modele::$md_name" ref="o2" args="" --><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">Document_modele::$<a class="el" href="document__modele_8inc_8php.html#a2">md_name</a> </td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
template's name
<p>
Definition at line <a class="el" href="class__document__modele_8php-source.html#l00031">31</a> of file <a class="el" href="class__document__modele_8php-source.html">class_document_modele.php</a>. </td>
</tr>
</table>
<a class="anchor" name="o5"></a><!-- doxytag: member="Document_modele::$md_sequence" ref="o5" args="" --><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">Document_modele::$md_sequence </td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
sequence name (autogenerate)
<p>
Definition at line <a class="el" href="class__document__modele_8php-source.html#l00034">34</a> of file <a class="el" href="class__document__modele_8php-source.html">class_document_modele.php</a>. </td>
</tr>
</table>
<a class="anchor" name="o3"></a><!-- doxytag: member="Document_modele::$md_type" ref="o3" args="" --><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">Document_modele::$<a class="el" href="document__modele_8inc_8php.html#a4">md_type</a> </td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
template's type (letter, invoice, order...)
<p>
Definition at line <a class="el" href="class__document__modele_8php-source.html#l00032">32</a> of file <a class="el" href="class__document__modele_8php-source.html">class_document_modele.php</a>. </td>
</tr>
</table>
<a class="anchor" name="o6"></a><!-- doxytag: member="Document_modele::$sequence" ref="o6" args="" --><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">Document_modele::$sequence </td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
sequence number used by the create sequence start with
<p>
Definition at line <a class="el" href="class__document__modele_8php-source.html#l00035">35</a> of file <a class="el" href="class__document__modele_8php-source.html">class_document_modele.php</a>. </td>
</tr>
</table>
<hr>The documentation for this class was generated from the following file:<ul>
<li>/home/dany/developpement/phpcompta-dev/phpcompta/include/<a class="el" href="class__document__modele_8php-source.html">class_document_modele.php</a></ul>
<hr size="1"><address style="align: right;"><small>Generated on Fri Jun 23 00:12:48 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>