Merge with Dev-Dany
This commit is contained in:
parent
7f79d8f7e6
commit
e8235adc49
44 changed files with 1980 additions and 2292 deletions
|
|
@ -143,7 +143,8 @@ Si cela ne marche pas ce n'est pas bon
|
|||
<sect> Comment faire de la doc
|
||||
<p>
|
||||
Sous Mandriva (anciennement mandrake), ajouter les linuxdocs-tools avec la commande
|
||||
urpmi linuxdoc-tools, pour les autres, je ne sais pas :(
|
||||
urpmi linuxdoc-tools, pour Ubuntu apt-get install linuxdoc-tools, tetex, tetex-extra
|
||||
les autres, je ne sais pas :(
|
||||
</p>
|
||||
<p>
|
||||
Une fois, les linuxdoc tools installés il peut être nécessaire
|
||||
|
|
|
|||
|
|
@ -121,6 +121,7 @@ FILE_PATTERNS = *.c \
|
|||
*.PHP3 \
|
||||
*.M \
|
||||
*.MM \
|
||||
*.js \
|
||||
*.inc.php
|
||||
RECURSIVE = YES
|
||||
EXCLUDE =
|
||||
|
|
|
|||
|
|
@ -111,7 +111,7 @@
|
|||
<body>
|
||||
|
||||
<!-- Primary Index -->
|
||||
<p><br><br>Dumped on 2006-09-05</p>
|
||||
<p><br><br>Dumped on 2006-09-26</p>
|
||||
<h1><a name="index">Index of database - account_repository</a></h1>
|
||||
<ul>
|
||||
|
||||
|
|
|
|||
|
|
@ -939,6 +939,179 @@
|
|||
</dia:object>
|
||||
|
||||
<dia:object type="UML - Class" version="0" id="O6">
|
||||
<dia:attribute name="obj_pos">
|
||||
<dia:point val="0,0"/>
|
||||
</dia:attribute>
|
||||
<dia:attribute name="obj_bb">
|
||||
<dia:rectangle val="-0.05,-0.05;16.4,6.65"/>
|
||||
</dia:attribute>
|
||||
<dia:attribute name="elem_corner">
|
||||
<dia:point val="0,0"/>
|
||||
</dia:attribute>
|
||||
<dia:attribute name="elem_width">
|
||||
<dia:real val="16.350000000000001"/>
|
||||
</dia:attribute>
|
||||
<dia:attribute name="elem_height">
|
||||
<dia:real val="6.6000000000000005"/>
|
||||
</dia:attribute>
|
||||
<dia:attribute name="name">
|
||||
<dia:string>#b#</dia:string>
|
||||
</dia:attribute>
|
||||
|
||||
<dia:attribute name="comment">
|
||||
<dia:string>##</dia:string>
|
||||
</dia:attribute>
|
||||
<dia:attribute name="abstract">
|
||||
<dia:boolean val="false"/>
|
||||
</dia:attribute>
|
||||
<dia:attribute name="suppress_attributes">
|
||||
<dia:boolean val="false"/>
|
||||
</dia:attribute>
|
||||
<dia:attribute name="suppress_operations">
|
||||
<dia:boolean val="false"/>
|
||||
</dia:attribute>
|
||||
<dia:attribute name="visible_attributes">
|
||||
<dia:boolean val="true"/>
|
||||
</dia:attribute>
|
||||
<dia:attribute name="visible_comments">
|
||||
<dia:boolean val="true"/>
|
||||
</dia:attribute>
|
||||
<dia:attribute name="wrap_operations">
|
||||
<dia:boolean val="false"/>
|
||||
</dia:attribute>
|
||||
<dia:attribute name="wrap_after_char">
|
||||
<dia:int val="40"/>
|
||||
</dia:attribute>
|
||||
<dia:attribute name="line_color">
|
||||
<dia:color val="#000000"/>
|
||||
</dia:attribute>
|
||||
<dia:attribute name="fill_color">
|
||||
<dia:color val="#ffffff"/>
|
||||
</dia:attribute>
|
||||
<dia:attribute name="text_color">
|
||||
<dia:color val="#000000"/>
|
||||
</dia:attribute>
|
||||
<dia:attribute name="normal_font">
|
||||
<dia:font family="monospace" style="0" name="Courier"/>
|
||||
</dia:attribute>
|
||||
<dia:attribute name="abstract_font">
|
||||
<dia:font family="monospace" style="88" name="Courier"/>
|
||||
</dia:attribute>
|
||||
<dia:attribute name="polymorphic_font">
|
||||
<dia:font family="monospace" style="8" name="Courier"/>
|
||||
</dia:attribute>
|
||||
<dia:attribute name="classname_font">
|
||||
<dia:font family="sans" style="80" name="Helvetica"/>
|
||||
</dia:attribute>
|
||||
<dia:attribute name="abstract_classname_font">
|
||||
<dia:font family="sans" style="88" name="Helvetica"/>
|
||||
</dia:attribute>
|
||||
<dia:attribute name="comment_font">
|
||||
<dia:font family="sans" style="8" name="Helvetica"/>
|
||||
</dia:attribute>
|
||||
<dia:attribute name="font_height">
|
||||
<dia:real val="0.80000000000000004"/>
|
||||
</dia:attribute>
|
||||
<dia:attribute name="polymorphic_font_height">
|
||||
<dia:real val="0.80000000000000004"/>
|
||||
</dia:attribute>
|
||||
<dia:attribute name="abstract_font_height">
|
||||
<dia:real val="0.80000000000000004"/>
|
||||
</dia:attribute>
|
||||
<dia:attribute name="classname_font_height">
|
||||
<dia:real val="1"/>
|
||||
</dia:attribute>
|
||||
<dia:attribute name="abstract_classname_font_height">
|
||||
<dia:real val="1"/>
|
||||
</dia:attribute>
|
||||
<dia:attribute name="comment_font_height">
|
||||
<dia:real val="1"/>
|
||||
</dia:attribute>
|
||||
<dia:attribute name="attributes">
|
||||
|
||||
<dia:composite type="umlattribute">
|
||||
<dia:attribute name="name">
|
||||
<dia:string># j_deb#</dia:string>
|
||||
</dia:attribute>
|
||||
<dia:attribute name="type">
|
||||
<dia:string>#double precision#</dia:string>
|
||||
</dia:attribute>
|
||||
<dia:attribute name="value">
|
||||
|
||||
<dia:string/>
|
||||
|
||||
</dia:attribute>
|
||||
<dia:attribute name="visibility">
|
||||
<dia:enum val="3"/>
|
||||
</dia:attribute>
|
||||
<dia:attribute name="abstract">
|
||||
<dia:boolean val="false"/>
|
||||
</dia:attribute>
|
||||
<dia:attribute name="class_scope">
|
||||
<dia:boolean val="false"/>
|
||||
</dia:attribute>
|
||||
</dia:composite>
|
||||
|
||||
<dia:composite type="umlattribute">
|
||||
<dia:attribute name="name">
|
||||
<dia:string># jr_montant#</dia:string>
|
||||
</dia:attribute>
|
||||
<dia:attribute name="type">
|
||||
<dia:string>#double precision#</dia:string>
|
||||
</dia:attribute>
|
||||
<dia:attribute name="value">
|
||||
|
||||
<dia:string/>
|
||||
|
||||
</dia:attribute>
|
||||
<dia:attribute name="visibility">
|
||||
<dia:enum val="3"/>
|
||||
</dia:attribute>
|
||||
<dia:attribute name="abstract">
|
||||
<dia:boolean val="false"/>
|
||||
</dia:attribute>
|
||||
<dia:attribute name="class_scope">
|
||||
<dia:boolean val="false"/>
|
||||
</dia:attribute>
|
||||
</dia:composite>
|
||||
|
||||
<dia:composite type="umlattribute">
|
||||
<dia:attribute name="name">
|
||||
<dia:string># jr_grpt_id#</dia:string>
|
||||
</dia:attribute>
|
||||
<dia:attribute name="type">
|
||||
<dia:string>#integer#</dia:string>
|
||||
</dia:attribute>
|
||||
<dia:attribute name="value">
|
||||
|
||||
<dia:string/>
|
||||
|
||||
</dia:attribute>
|
||||
<dia:attribute name="visibility">
|
||||
<dia:enum val="3"/>
|
||||
</dia:attribute>
|
||||
<dia:attribute name="abstract">
|
||||
<dia:boolean val="false"/>
|
||||
</dia:attribute>
|
||||
<dia:attribute name="class_scope">
|
||||
<dia:boolean val="false"/>
|
||||
</dia:attribute>
|
||||
</dia:composite>
|
||||
|
||||
</dia:attribute>
|
||||
|
||||
<dia:attribute name="visible_operations">
|
||||
<dia:boolean val="false"/>
|
||||
</dia:attribute>
|
||||
<dia:attribute name="operations"/>
|
||||
|
||||
<dia:attribute name="template">
|
||||
<dia:boolean val="false"/>
|
||||
</dia:attribute>
|
||||
<dia:attribute name="templates"/>
|
||||
</dia:object>
|
||||
|
||||
<dia:object type="UML - Class" version="0" id="O7">
|
||||
<dia:attribute name="obj_pos">
|
||||
<dia:point val="0,0"/>
|
||||
</dia:attribute>
|
||||
|
|
@ -1364,7 +1537,7 @@
|
|||
<dia:attribute name="templates"/>
|
||||
</dia:object>
|
||||
|
||||
<dia:object type="UML - Class" version="0" id="O7">
|
||||
<dia:object type="UML - Class" version="0" id="O8">
|
||||
<dia:attribute name="obj_pos">
|
||||
<dia:point val="0,0"/>
|
||||
</dia:attribute>
|
||||
|
|
@ -1629,7 +1802,7 @@
|
|||
<dia:attribute name="templates"/>
|
||||
</dia:object>
|
||||
|
||||
<dia:object type="UML - Class" version="0" id="O8">
|
||||
<dia:object type="UML - Class" version="0" id="O9">
|
||||
<dia:attribute name="obj_pos">
|
||||
<dia:point val="0,0"/>
|
||||
</dia:attribute>
|
||||
|
|
@ -1871,7 +2044,7 @@
|
|||
<dia:attribute name="templates"/>
|
||||
</dia:object>
|
||||
|
||||
<dia:object type="UML - Class" version="0" id="O9">
|
||||
<dia:object type="UML - Class" version="0" id="O10">
|
||||
<dia:attribute name="obj_pos">
|
||||
<dia:point val="0,0"/>
|
||||
</dia:attribute>
|
||||
|
|
@ -2021,7 +2194,7 @@
|
|||
<dia:attribute name="templates"/>
|
||||
</dia:object>
|
||||
|
||||
<dia:object type="UML - Class" version="0" id="O10">
|
||||
<dia:object type="UML - Class" version="0" id="O11">
|
||||
<dia:attribute name="obj_pos">
|
||||
<dia:point val="0,0"/>
|
||||
</dia:attribute>
|
||||
|
|
@ -2171,7 +2344,7 @@
|
|||
<dia:attribute name="templates"/>
|
||||
</dia:object>
|
||||
|
||||
<dia:object type="UML - Class" version="0" id="O11">
|
||||
<dia:object type="UML - Class" version="0" id="O12">
|
||||
<dia:attribute name="obj_pos">
|
||||
<dia:point val="0,0"/>
|
||||
</dia:attribute>
|
||||
|
|
@ -2321,7 +2494,7 @@
|
|||
<dia:attribute name="templates"/>
|
||||
</dia:object>
|
||||
|
||||
<dia:object type="UML - Class" version="0" id="O12">
|
||||
<dia:object type="UML - Class" version="0" id="O13">
|
||||
<dia:attribute name="obj_pos">
|
||||
<dia:point val="0,0"/>
|
||||
</dia:attribute>
|
||||
|
|
@ -2540,7 +2713,7 @@
|
|||
<dia:attribute name="templates"/>
|
||||
</dia:object>
|
||||
|
||||
<dia:object type="UML - Class" version="0" id="O13">
|
||||
<dia:object type="UML - Class" version="0" id="O14">
|
||||
<dia:attribute name="obj_pos">
|
||||
<dia:point val="0,0"/>
|
||||
</dia:attribute>
|
||||
|
|
@ -2713,7 +2886,7 @@
|
|||
<dia:attribute name="templates"/>
|
||||
</dia:object>
|
||||
|
||||
<dia:object type="UML - Class" version="0" id="O14">
|
||||
<dia:object type="UML - Class" version="0" id="O15">
|
||||
<dia:attribute name="obj_pos">
|
||||
<dia:point val="0,0"/>
|
||||
</dia:attribute>
|
||||
|
|
@ -2932,7 +3105,7 @@
|
|||
<dia:attribute name="templates"/>
|
||||
</dia:object>
|
||||
|
||||
<dia:object type="UML - Class" version="0" id="O15">
|
||||
<dia:object type="UML - Class" version="0" id="O16">
|
||||
<dia:attribute name="obj_pos">
|
||||
<dia:point val="0,0"/>
|
||||
</dia:attribute>
|
||||
|
|
@ -3082,7 +3255,7 @@
|
|||
<dia:attribute name="templates"/>
|
||||
</dia:object>
|
||||
|
||||
<dia:object type="UML - Class" version="0" id="O16">
|
||||
<dia:object type="UML - Class" version="0" id="O17">
|
||||
<dia:attribute name="obj_pos">
|
||||
<dia:point val="0,0"/>
|
||||
</dia:attribute>
|
||||
|
|
@ -3232,7 +3405,7 @@
|
|||
<dia:attribute name="templates"/>
|
||||
</dia:object>
|
||||
|
||||
<dia:object type="UML - Class" version="0" id="O17">
|
||||
<dia:object type="UML - Class" version="0" id="O18">
|
||||
<dia:attribute name="obj_pos">
|
||||
<dia:point val="0,0"/>
|
||||
</dia:attribute>
|
||||
|
|
@ -3253,7 +3426,7 @@
|
|||
</dia:attribute>
|
||||
|
||||
<dia:attribute name="comment">
|
||||
<dia:string>##</dia:string>
|
||||
<dia:string>#Table temporaire pour l'importation ... t CSV#</dia:string>
|
||||
</dia:attribute>
|
||||
<dia:attribute name="abstract">
|
||||
<dia:boolean val="false"/>
|
||||
|
|
@ -3397,7 +3570,7 @@
|
|||
<dia:string># montant#</dia:string>
|
||||
</dia:attribute>
|
||||
<dia:attribute name="type">
|
||||
<dia:string>#text#</dia:string>
|
||||
<dia:string>#numeric(20,4)#</dia:string>
|
||||
</dia:attribute>
|
||||
<dia:attribute name="value">
|
||||
|
||||
|
|
@ -3530,29 +3703,6 @@
|
|||
</dia:attribute>
|
||||
</dia:composite>
|
||||
|
||||
<dia:composite type="umlattribute">
|
||||
<dia:attribute name="name">
|
||||
<dia:string># status#</dia:string>
|
||||
</dia:attribute>
|
||||
<dia:attribute name="type">
|
||||
<dia:string>#character varying(1)#</dia:string>
|
||||
</dia:attribute>
|
||||
<dia:attribute name="value">
|
||||
|
||||
<dia:string>#'n'::character varying#</dia:string>
|
||||
|
||||
</dia:attribute>
|
||||
<dia:attribute name="visibility">
|
||||
<dia:enum val="3"/>
|
||||
</dia:attribute>
|
||||
<dia:attribute name="abstract">
|
||||
<dia:boolean val="false"/>
|
||||
</dia:attribute>
|
||||
<dia:attribute name="class_scope">
|
||||
<dia:boolean val="false"/>
|
||||
</dia:attribute>
|
||||
</dia:composite>
|
||||
|
||||
<dia:composite type="umlattribute">
|
||||
<dia:attribute name="name">
|
||||
<dia:string># bq_account#</dia:string>
|
||||
|
|
@ -3599,6 +3749,29 @@
|
|||
</dia:attribute>
|
||||
</dia:composite>
|
||||
|
||||
<dia:composite type="umlattribute">
|
||||
<dia:attribute name="name">
|
||||
<dia:string># status#</dia:string>
|
||||
</dia:attribute>
|
||||
<dia:attribute name="type">
|
||||
<dia:string>#character varying(1)#</dia:string>
|
||||
</dia:attribute>
|
||||
<dia:attribute name="value">
|
||||
|
||||
<dia:string>#'n'::character varying#</dia:string>
|
||||
|
||||
</dia:attribute>
|
||||
<dia:attribute name="visibility">
|
||||
<dia:enum val="3"/>
|
||||
</dia:attribute>
|
||||
<dia:attribute name="abstract">
|
||||
<dia:boolean val="false"/>
|
||||
</dia:attribute>
|
||||
<dia:attribute name="class_scope">
|
||||
<dia:boolean val="false"/>
|
||||
</dia:attribute>
|
||||
</dia:composite>
|
||||
|
||||
</dia:attribute>
|
||||
|
||||
<dia:attribute name="visible_operations">
|
||||
|
|
@ -3608,7 +3781,7 @@
|
|||
|
||||
<dia:composite type="umloperation">
|
||||
<dia:attribute name="name">
|
||||
<dia:string>#import_tmp_status_check#</dia:string>
|
||||
<dia:string>#chk_status#</dia:string>
|
||||
</dia:attribute>
|
||||
<dia:attribute name="visibility">
|
||||
<dia:enum val="3"/>
|
||||
|
|
@ -3622,7 +3795,7 @@
|
|||
<dia:attribute name="parameters">
|
||||
<dia:composite type="umlparameter">
|
||||
<dia:attribute name="name">
|
||||
<dia:string>#CHECK ((((((status)::text = 't ... xt)))#</dia:string>
|
||||
<dia:string>#CHECK ((((((status)::text = 'n ... xt)))#</dia:string>
|
||||
</dia:attribute>
|
||||
<dia:attribute name="type">
|
||||
<dia:string>##</dia:string>
|
||||
|
|
@ -3645,7 +3818,7 @@
|
|||
<dia:attribute name="templates"/>
|
||||
</dia:object>
|
||||
|
||||
<dia:object type="UML - Class" version="0" id="O18">
|
||||
<dia:object type="UML - Class" version="0" id="O19">
|
||||
<dia:attribute name="obj_pos">
|
||||
<dia:point val="0,0"/>
|
||||
</dia:attribute>
|
||||
|
|
@ -3818,7 +3991,7 @@
|
|||
<dia:attribute name="templates"/>
|
||||
</dia:object>
|
||||
|
||||
<dia:object type="UML - Class" version="0" id="O19">
|
||||
<dia:object type="UML - Class" version="0" id="O20">
|
||||
<dia:attribute name="obj_pos">
|
||||
<dia:point val="0,0"/>
|
||||
</dia:attribute>
|
||||
|
|
@ -3991,7 +4164,7 @@
|
|||
<dia:attribute name="templates"/>
|
||||
</dia:object>
|
||||
|
||||
<dia:object type="UML - Class" version="0" id="O20">
|
||||
<dia:object type="UML - Class" version="0" id="O21">
|
||||
<dia:attribute name="obj_pos">
|
||||
<dia:point val="0,0"/>
|
||||
</dia:attribute>
|
||||
|
|
@ -4164,7 +4337,7 @@
|
|||
<dia:attribute name="templates"/>
|
||||
</dia:object>
|
||||
|
||||
<dia:object type="UML - Class" version="0" id="O21">
|
||||
<dia:object type="UML - Class" version="0" id="O22">
|
||||
<dia:attribute name="obj_pos">
|
||||
<dia:point val="0,0"/>
|
||||
</dia:attribute>
|
||||
|
|
@ -4682,7 +4855,7 @@
|
|||
<dia:attribute name="templates"/>
|
||||
</dia:object>
|
||||
|
||||
<dia:object type="UML - Class" version="0" id="O22">
|
||||
<dia:object type="UML - Class" version="0" id="O23">
|
||||
<dia:attribute name="obj_pos">
|
||||
<dia:point val="0,0"/>
|
||||
</dia:attribute>
|
||||
|
|
@ -4947,7 +5120,7 @@
|
|||
<dia:attribute name="templates"/>
|
||||
</dia:object>
|
||||
|
||||
<dia:object type="UML - Class" version="0" id="O23">
|
||||
<dia:object type="UML - Class" version="0" id="O24">
|
||||
<dia:attribute name="obj_pos">
|
||||
<dia:point val="0,0"/>
|
||||
</dia:attribute>
|
||||
|
|
@ -5327,7 +5500,7 @@
|
|||
<dia:attribute name="templates"/>
|
||||
</dia:object>
|
||||
|
||||
<dia:object type="UML - Class" version="0" id="O24">
|
||||
<dia:object type="UML - Class" version="0" id="O25">
|
||||
<dia:attribute name="obj_pos">
|
||||
<dia:point val="0,0"/>
|
||||
</dia:attribute>
|
||||
|
|
@ -5500,7 +5673,7 @@
|
|||
<dia:attribute name="templates"/>
|
||||
</dia:object>
|
||||
|
||||
<dia:object type="UML - Class" version="0" id="O25">
|
||||
<dia:object type="UML - Class" version="0" id="O26">
|
||||
<dia:attribute name="obj_pos">
|
||||
<dia:point val="0,0"/>
|
||||
</dia:attribute>
|
||||
|
|
@ -5650,7 +5823,7 @@
|
|||
<dia:attribute name="templates"/>
|
||||
</dia:object>
|
||||
|
||||
<dia:object type="UML - Class" version="0" id="O26">
|
||||
<dia:object type="UML - Class" version="0" id="O27">
|
||||
<dia:attribute name="obj_pos">
|
||||
<dia:point val="0,0"/>
|
||||
</dia:attribute>
|
||||
|
|
@ -6099,7 +6272,7 @@
|
|||
<dia:attribute name="templates"/>
|
||||
</dia:object>
|
||||
|
||||
<dia:object type="UML - Class" version="0" id="O27">
|
||||
<dia:object type="UML - Class" version="0" id="O28">
|
||||
<dia:attribute name="obj_pos">
|
||||
<dia:point val="0,0"/>
|
||||
</dia:attribute>
|
||||
|
|
@ -6249,7 +6422,7 @@
|
|||
<dia:attribute name="templates"/>
|
||||
</dia:object>
|
||||
|
||||
<dia:object type="UML - Class" version="0" id="O28">
|
||||
<dia:object type="UML - Class" version="0" id="O29">
|
||||
<dia:attribute name="obj_pos">
|
||||
<dia:point val="0,0"/>
|
||||
</dia:attribute>
|
||||
|
|
@ -6422,7 +6595,7 @@
|
|||
<dia:attribute name="templates"/>
|
||||
</dia:object>
|
||||
|
||||
<dia:object type="UML - Class" version="0" id="O29">
|
||||
<dia:object type="UML - Class" version="0" id="O30">
|
||||
<dia:attribute name="obj_pos">
|
||||
<dia:point val="0,0"/>
|
||||
</dia:attribute>
|
||||
|
|
@ -6595,7 +6768,7 @@
|
|||
<dia:attribute name="templates"/>
|
||||
</dia:object>
|
||||
|
||||
<dia:object type="UML - Class" version="0" id="O30">
|
||||
<dia:object type="UML - Class" version="0" id="O31">
|
||||
<dia:attribute name="obj_pos">
|
||||
<dia:point val="0,0"/>
|
||||
</dia:attribute>
|
||||
|
|
@ -6831,6 +7004,37 @@
|
|||
</dia:attribute>
|
||||
<dia:attribute name="operations">
|
||||
|
||||
<dia:composite type="umloperation">
|
||||
<dia:attribute name="name">
|
||||
<dia:string>#$1#</dia:string>
|
||||
</dia:attribute>
|
||||
<dia:attribute name="visibility">
|
||||
<dia:enum val="3"/>
|
||||
</dia:attribute>
|
||||
<dia:attribute name="abstract">
|
||||
<dia:boolean val="false"/>
|
||||
</dia:attribute>
|
||||
<dia:attribute name="class_scope">
|
||||
<dia:boolean val="false"/>
|
||||
</dia:attribute>
|
||||
<dia:attribute name="parameters">
|
||||
<dia:composite type="umlparameter">
|
||||
<dia:attribute name="name">
|
||||
<dia:string>#CHECK ((p_end >= p_start))#</dia:string>
|
||||
</dia:attribute>
|
||||
<dia:attribute name="type">
|
||||
<dia:string>##</dia:string>
|
||||
</dia:attribute>
|
||||
<dia:attribute name="value">
|
||||
<dia:string/>
|
||||
</dia:attribute>
|
||||
<dia:attribute name="kind">
|
||||
<dia:enum val="0"/>
|
||||
</dia:attribute>
|
||||
</dia:composite>
|
||||
</dia:attribute>
|
||||
</dia:composite>
|
||||
|
||||
<dia:composite type="umloperation">
|
||||
<dia:attribute name="name">
|
||||
<dia:string>#parm_periode_check#</dia:string>
|
||||
|
|
@ -6870,7 +7074,7 @@
|
|||
<dia:attribute name="templates"/>
|
||||
</dia:object>
|
||||
|
||||
<dia:object type="UML - Class" version="0" id="O31">
|
||||
<dia:object type="UML - Class" version="0" id="O32">
|
||||
<dia:attribute name="obj_pos">
|
||||
<dia:point val="0,0"/>
|
||||
</dia:attribute>
|
||||
|
|
@ -7158,7 +7362,7 @@
|
|||
<dia:attribute name="templates"/>
|
||||
</dia:object>
|
||||
|
||||
<dia:object type="UML - Class" version="0" id="O32">
|
||||
<dia:object type="UML - Class" version="0" id="O33">
|
||||
<dia:attribute name="obj_pos">
|
||||
<dia:point val="0,0"/>
|
||||
</dia:attribute>
|
||||
|
|
@ -7502,7 +7706,7 @@
|
|||
<dia:attribute name="templates"/>
|
||||
</dia:object>
|
||||
|
||||
<dia:object type="UML - Class" version="0" id="O33">
|
||||
<dia:object type="UML - Class" version="0" id="O34">
|
||||
<dia:attribute name="obj_pos">
|
||||
<dia:point val="0,0"/>
|
||||
</dia:attribute>
|
||||
|
|
@ -7698,7 +7902,7 @@
|
|||
<dia:attribute name="templates"/>
|
||||
</dia:object>
|
||||
|
||||
<dia:object type="UML - Class" version="0" id="O34">
|
||||
<dia:object type="UML - Class" version="0" id="O35">
|
||||
<dia:attribute name="obj_pos">
|
||||
<dia:point val="0,0"/>
|
||||
</dia:attribute>
|
||||
|
|
@ -7917,7 +8121,7 @@
|
|||
<dia:attribute name="templates"/>
|
||||
</dia:object>
|
||||
|
||||
<dia:object type="UML - Class" version="0" id="O35">
|
||||
<dia:object type="UML - Class" version="0" id="O36">
|
||||
<dia:attribute name="obj_pos">
|
||||
<dia:point val="0,0"/>
|
||||
</dia:attribute>
|
||||
|
|
@ -8090,7 +8294,7 @@
|
|||
<dia:attribute name="templates"/>
|
||||
</dia:object>
|
||||
|
||||
<dia:object type="UML - Class" version="0" id="O36">
|
||||
<dia:object type="UML - Class" version="0" id="O37">
|
||||
<dia:attribute name="obj_pos">
|
||||
<dia:point val="0,0"/>
|
||||
</dia:attribute>
|
||||
|
|
@ -8263,7 +8467,7 @@
|
|||
<dia:attribute name="templates"/>
|
||||
</dia:object>
|
||||
|
||||
<dia:object type="UML - Class" version="0" id="O37">
|
||||
<dia:object type="UML - Class" version="0" id="O38">
|
||||
<dia:attribute name="obj_pos">
|
||||
<dia:point val="0,0"/>
|
||||
</dia:attribute>
|
||||
|
|
@ -8459,7 +8663,7 @@
|
|||
<dia:attribute name="templates"/>
|
||||
</dia:object>
|
||||
|
||||
<dia:object type="UML - Class" version="0" id="O38">
|
||||
<dia:object type="UML - Class" version="0" id="O39">
|
||||
<dia:attribute name="obj_pos">
|
||||
<dia:point val="0,0"/>
|
||||
</dia:attribute>
|
||||
|
|
@ -8586,7 +8790,7 @@
|
|||
<dia:attribute name="templates"/>
|
||||
</dia:object>
|
||||
|
||||
<dia:object type="UML - Class" version="0" id="O39">
|
||||
<dia:object type="UML - Class" version="0" id="O40">
|
||||
<dia:attribute name="obj_pos">
|
||||
<dia:point val="0,0"/>
|
||||
</dia:attribute>
|
||||
|
|
@ -8920,7 +9124,7 @@
|
|||
<dia:attribute name="templates"/>
|
||||
</dia:object>
|
||||
|
||||
<dia:object type="UML - Class" version="0" id="O40">
|
||||
<dia:object type="UML - Class" version="0" id="O41">
|
||||
<dia:attribute name="obj_pos">
|
||||
<dia:point val="0,0"/>
|
||||
</dia:attribute>
|
||||
|
|
@ -9323,7 +9527,7 @@
|
|||
<dia:attribute name="templates"/>
|
||||
</dia:object>
|
||||
|
||||
<dia:object type="UML - Class" version="0" id="O41">
|
||||
<dia:object type="UML - Class" version="0" id="O42">
|
||||
<dia:attribute name="obj_pos">
|
||||
<dia:point val="0,0"/>
|
||||
</dia:attribute>
|
||||
|
|
@ -9611,7 +9815,7 @@
|
|||
<dia:attribute name="templates"/>
|
||||
</dia:object>
|
||||
|
||||
<dia:object type="UML - Class" version="0" id="O42">
|
||||
<dia:object type="UML - Class" version="0" id="O43">
|
||||
<dia:attribute name="obj_pos">
|
||||
<dia:point val="0,0"/>
|
||||
</dia:attribute>
|
||||
|
|
@ -9830,7 +10034,7 @@
|
|||
<dia:attribute name="templates"/>
|
||||
</dia:object>
|
||||
|
||||
<dia:object type="UML - Class" version="0" id="O43">
|
||||
<dia:object type="UML - Class" version="0" id="O44">
|
||||
<dia:attribute name="obj_pos">
|
||||
<dia:point val="0,0"/>
|
||||
</dia:attribute>
|
||||
|
|
@ -10003,7 +10207,7 @@
|
|||
<dia:attribute name="templates"/>
|
||||
</dia:object>
|
||||
|
||||
<dia:object type="UML - Class" version="0" id="O44">
|
||||
<dia:object type="UML - Class" version="0" id="O45">
|
||||
<dia:attribute name="obj_pos">
|
||||
<dia:point val="0,0"/>
|
||||
</dia:attribute>
|
||||
|
|
@ -10340,7 +10544,7 @@
|
|||
|
||||
|
||||
|
||||
<dia:object type="UML - Constraint" version="0" id="O45">
|
||||
<dia:object type="UML - Constraint" version="0" id="O46">
|
||||
<dia:attribute name="obj_pos">
|
||||
<dia:point val="0,3.5"/>
|
||||
</dia:attribute>
|
||||
|
|
@ -10362,11 +10566,11 @@
|
|||
</dia:attribute>
|
||||
<dia:connections>
|
||||
<dia:connection handle="0" to="O4" connection="8"/>
|
||||
<dia:connection handle="1" to="O13" connection="9"/>
|
||||
<dia:connection handle="1" to="O14" connection="9"/>
|
||||
</dia:connections>
|
||||
</dia:object>
|
||||
|
||||
<dia:object type="UML - Constraint" version="0" id="O46">
|
||||
<dia:object type="UML - Constraint" version="0" id="O47">
|
||||
<dia:attribute name="obj_pos">
|
||||
<dia:point val="0,3.5"/>
|
||||
</dia:attribute>
|
||||
|
|
@ -10392,32 +10596,6 @@
|
|||
</dia:connections>
|
||||
</dia:object>
|
||||
|
||||
<dia:object type="UML - Constraint" version="0" id="O47">
|
||||
<dia:attribute name="obj_pos">
|
||||
<dia:point val="0,3.5"/>
|
||||
</dia:attribute>
|
||||
<dia:attribute name="obj_bb">
|
||||
<dia:rectangle val="-0.0515705,2.29861;25.1127,3.55157"/>
|
||||
</dia:attribute>
|
||||
<dia:attribute name="conn_endpoints">
|
||||
<dia:point val="0,3.5"/>
|
||||
<dia:point val="25.05,2.7"/>
|
||||
</dia:attribute>
|
||||
<dia:attribute name="constraint">
|
||||
<dia:string>##</dia:string>
|
||||
</dia:attribute>
|
||||
<dia:attribute name="text_pos">
|
||||
<dia:point val="12.525,3.1"/>
|
||||
</dia:attribute>
|
||||
<dia:attribute name="line_colour">
|
||||
<dia:color val="#000000"/>
|
||||
</dia:attribute>
|
||||
<dia:connections>
|
||||
<dia:connection handle="0" to="O5" connection="8"/>
|
||||
<dia:connection handle="1" to="O19" connection="9"/>
|
||||
</dia:connections>
|
||||
</dia:object>
|
||||
|
||||
<dia:object type="UML - Constraint" version="0" id="O48">
|
||||
<dia:attribute name="obj_pos">
|
||||
<dia:point val="0,3.5"/>
|
||||
|
|
@ -10439,8 +10617,8 @@
|
|||
<dia:color val="#000000"/>
|
||||
</dia:attribute>
|
||||
<dia:connections>
|
||||
<dia:connection handle="0" to="O6" connection="20"/>
|
||||
<dia:connection handle="1" to="O23" connection="9"/>
|
||||
<dia:connection handle="0" to="O5" connection="8"/>
|
||||
<dia:connection handle="1" to="O20" connection="9"/>
|
||||
</dia:connections>
|
||||
</dia:object>
|
||||
|
||||
|
|
@ -10465,38 +10643,12 @@
|
|||
<dia:color val="#000000"/>
|
||||
</dia:attribute>
|
||||
<dia:connections>
|
||||
<dia:connection handle="0" to="O6" connection="22"/>
|
||||
<dia:connection handle="1" to="O33" connection="9"/>
|
||||
<dia:connection handle="0" to="O7" connection="20"/>
|
||||
<dia:connection handle="1" to="O24" connection="9"/>
|
||||
</dia:connections>
|
||||
</dia:object>
|
||||
|
||||
<dia:object type="UML - Constraint" version="0" id="O50">
|
||||
<dia:attribute name="obj_pos">
|
||||
<dia:point val="0,3.5"/>
|
||||
</dia:attribute>
|
||||
<dia:attribute name="obj_bb">
|
||||
<dia:rectangle val="-0.0515705,2.29861;25.1127,3.55157"/>
|
||||
</dia:attribute>
|
||||
<dia:attribute name="conn_endpoints">
|
||||
<dia:point val="0,3.5"/>
|
||||
<dia:point val="25.05,2.7"/>
|
||||
</dia:attribute>
|
||||
<dia:attribute name="constraint">
|
||||
<dia:string>#md_type#</dia:string>
|
||||
</dia:attribute>
|
||||
<dia:attribute name="text_pos">
|
||||
<dia:point val="12.525,3.1"/>
|
||||
</dia:attribute>
|
||||
<dia:attribute name="line_colour">
|
||||
<dia:color val="#000000"/>
|
||||
</dia:attribute>
|
||||
<dia:connections>
|
||||
<dia:connection handle="0" to="O8" connection="14"/>
|
||||
<dia:connection handle="1" to="O10" connection="9"/>
|
||||
</dia:connections>
|
||||
</dia:object>
|
||||
|
||||
<dia:object type="UML - Constraint" version="0" id="O51">
|
||||
<dia:attribute name="obj_pos">
|
||||
<dia:point val="0,3.5"/>
|
||||
</dia:attribute>
|
||||
|
|
@ -10517,8 +10669,34 @@
|
|||
<dia:color val="#000000"/>
|
||||
</dia:attribute>
|
||||
<dia:connections>
|
||||
<dia:connection handle="0" to="O11" connection="10"/>
|
||||
<dia:connection handle="1" to="O12" connection="9"/>
|
||||
<dia:connection handle="0" to="O7" connection="22"/>
|
||||
<dia:connection handle="1" to="O34" connection="9"/>
|
||||
</dia:connections>
|
||||
</dia:object>
|
||||
|
||||
<dia:object type="UML - Constraint" version="0" id="O51">
|
||||
<dia:attribute name="obj_pos">
|
||||
<dia:point val="0,3.5"/>
|
||||
</dia:attribute>
|
||||
<dia:attribute name="obj_bb">
|
||||
<dia:rectangle val="-0.0515705,2.29861;25.1127,3.55157"/>
|
||||
</dia:attribute>
|
||||
<dia:attribute name="conn_endpoints">
|
||||
<dia:point val="0,3.5"/>
|
||||
<dia:point val="25.05,2.7"/>
|
||||
</dia:attribute>
|
||||
<dia:attribute name="constraint">
|
||||
<dia:string>#md_type#</dia:string>
|
||||
</dia:attribute>
|
||||
<dia:attribute name="text_pos">
|
||||
<dia:point val="12.525,3.1"/>
|
||||
</dia:attribute>
|
||||
<dia:attribute name="line_colour">
|
||||
<dia:color val="#000000"/>
|
||||
</dia:attribute>
|
||||
<dia:connections>
|
||||
<dia:connection handle="0" to="O9" connection="14"/>
|
||||
<dia:connection handle="1" to="O11" connection="9"/>
|
||||
</dia:connections>
|
||||
</dia:object>
|
||||
|
||||
|
|
@ -10543,7 +10721,7 @@
|
|||
<dia:color val="#000000"/>
|
||||
</dia:attribute>
|
||||
<dia:connections>
|
||||
<dia:connection handle="0" to="O12" connection="16"/>
|
||||
<dia:connection handle="0" to="O12" connection="10"/>
|
||||
<dia:connection handle="1" to="O13" connection="9"/>
|
||||
</dia:connections>
|
||||
</dia:object>
|
||||
|
|
@ -10569,8 +10747,8 @@
|
|||
<dia:color val="#000000"/>
|
||||
</dia:attribute>
|
||||
<dia:connections>
|
||||
<dia:connection handle="0" to="O14" connection="10"/>
|
||||
<dia:connection handle="1" to="O16" connection="9"/>
|
||||
<dia:connection handle="0" to="O13" connection="16"/>
|
||||
<dia:connection handle="1" to="O14" connection="9"/>
|
||||
</dia:connections>
|
||||
</dia:object>
|
||||
|
||||
|
|
@ -10595,8 +10773,8 @@
|
|||
<dia:color val="#000000"/>
|
||||
</dia:attribute>
|
||||
<dia:connections>
|
||||
<dia:connection handle="0" to="O19" connection="10"/>
|
||||
<dia:connection handle="1" to="O11" connection="9"/>
|
||||
<dia:connection handle="0" to="O15" connection="10"/>
|
||||
<dia:connection handle="1" to="O17" connection="9"/>
|
||||
</dia:connections>
|
||||
</dia:object>
|
||||
|
||||
|
|
@ -10621,8 +10799,8 @@
|
|||
<dia:color val="#000000"/>
|
||||
</dia:attribute>
|
||||
<dia:connections>
|
||||
<dia:connection handle="0" to="O19" connection="12"/>
|
||||
<dia:connection handle="1" to="O3" connection="9"/>
|
||||
<dia:connection handle="0" to="O20" connection="10"/>
|
||||
<dia:connection handle="1" to="O12" connection="9"/>
|
||||
</dia:connections>
|
||||
</dia:object>
|
||||
|
||||
|
|
@ -10647,8 +10825,8 @@
|
|||
<dia:color val="#000000"/>
|
||||
</dia:attribute>
|
||||
<dia:connections>
|
||||
<dia:connection handle="0" to="O20" connection="8"/>
|
||||
<dia:connection handle="1" to="O12" connection="9"/>
|
||||
<dia:connection handle="0" to="O20" connection="12"/>
|
||||
<dia:connection handle="1" to="O3" connection="9"/>
|
||||
</dia:connections>
|
||||
</dia:object>
|
||||
|
||||
|
|
@ -10673,8 +10851,8 @@
|
|||
<dia:color val="#000000"/>
|
||||
</dia:attribute>
|
||||
<dia:connections>
|
||||
<dia:connection handle="0" to="O20" connection="10"/>
|
||||
<dia:connection handle="1" to="O3" connection="9"/>
|
||||
<dia:connection handle="0" to="O21" connection="8"/>
|
||||
<dia:connection handle="1" to="O13" connection="9"/>
|
||||
</dia:connections>
|
||||
</dia:object>
|
||||
|
||||
|
|
@ -10700,7 +10878,7 @@
|
|||
</dia:attribute>
|
||||
<dia:connections>
|
||||
<dia:connection handle="0" to="O21" connection="10"/>
|
||||
<dia:connection handle="1" to="O23" connection="9"/>
|
||||
<dia:connection handle="1" to="O3" connection="9"/>
|
||||
</dia:connections>
|
||||
</dia:object>
|
||||
|
||||
|
|
@ -10725,8 +10903,8 @@
|
|||
<dia:color val="#000000"/>
|
||||
</dia:attribute>
|
||||
<dia:connections>
|
||||
<dia:connection handle="0" to="O22" connection="20"/>
|
||||
<dia:connection handle="1" to="O25" connection="9"/>
|
||||
<dia:connection handle="0" to="O22" connection="10"/>
|
||||
<dia:connection handle="1" to="O24" connection="9"/>
|
||||
</dia:connections>
|
||||
</dia:object>
|
||||
|
||||
|
|
@ -10751,8 +10929,8 @@
|
|||
<dia:color val="#000000"/>
|
||||
</dia:attribute>
|
||||
<dia:connections>
|
||||
<dia:connection handle="0" to="O23" connection="28"/>
|
||||
<dia:connection handle="1" to="O25" connection="9"/>
|
||||
<dia:connection handle="0" to="O23" connection="20"/>
|
||||
<dia:connection handle="1" to="O26" connection="9"/>
|
||||
</dia:connections>
|
||||
</dia:object>
|
||||
|
||||
|
|
@ -10777,8 +10955,8 @@
|
|||
<dia:color val="#000000"/>
|
||||
</dia:attribute>
|
||||
<dia:connections>
|
||||
<dia:connection handle="0" to="O26" connection="14"/>
|
||||
<dia:connection handle="1" to="O33" connection="9"/>
|
||||
<dia:connection handle="0" to="O24" connection="28"/>
|
||||
<dia:connection handle="1" to="O26" connection="9"/>
|
||||
</dia:connections>
|
||||
</dia:object>
|
||||
|
||||
|
|
@ -10803,8 +10981,8 @@
|
|||
<dia:color val="#000000"/>
|
||||
</dia:attribute>
|
||||
<dia:connections>
|
||||
<dia:connection handle="0" to="O26" connection="20"/>
|
||||
<dia:connection handle="1" to="O23" connection="9"/>
|
||||
<dia:connection handle="0" to="O27" connection="14"/>
|
||||
<dia:connection handle="1" to="O34" connection="9"/>
|
||||
</dia:connections>
|
||||
</dia:object>
|
||||
|
||||
|
|
@ -10829,8 +11007,8 @@
|
|||
<dia:color val="#000000"/>
|
||||
</dia:attribute>
|
||||
<dia:connections>
|
||||
<dia:connection handle="0" to="O36" connection="12"/>
|
||||
<dia:connection handle="1" to="O1" connection="9"/>
|
||||
<dia:connection handle="0" to="O27" connection="20"/>
|
||||
<dia:connection handle="1" to="O24" connection="9"/>
|
||||
</dia:connections>
|
||||
</dia:object>
|
||||
|
||||
|
|
@ -10856,7 +11034,33 @@
|
|||
</dia:attribute>
|
||||
<dia:connections>
|
||||
<dia:connection handle="0" to="O37" connection="12"/>
|
||||
<dia:connection handle="1" to="O23" connection="9"/>
|
||||
<dia:connection handle="1" to="O1" connection="9"/>
|
||||
</dia:connections>
|
||||
</dia:object>
|
||||
|
||||
<dia:object type="UML - Constraint" version="0" id="O65">
|
||||
<dia:attribute name="obj_pos">
|
||||
<dia:point val="0,3.5"/>
|
||||
</dia:attribute>
|
||||
<dia:attribute name="obj_bb">
|
||||
<dia:rectangle val="-0.0515705,2.29861;25.1127,3.55157"/>
|
||||
</dia:attribute>
|
||||
<dia:attribute name="conn_endpoints">
|
||||
<dia:point val="0,3.5"/>
|
||||
<dia:point val="25.05,2.7"/>
|
||||
</dia:attribute>
|
||||
<dia:attribute name="constraint">
|
||||
<dia:string>##</dia:string>
|
||||
</dia:attribute>
|
||||
<dia:attribute name="text_pos">
|
||||
<dia:point val="12.525,3.1"/>
|
||||
</dia:attribute>
|
||||
<dia:attribute name="line_colour">
|
||||
<dia:color val="#000000"/>
|
||||
</dia:attribute>
|
||||
<dia:connections>
|
||||
<dia:connection handle="0" to="O38" connection="12"/>
|
||||
<dia:connection handle="1" to="O24" connection="9"/>
|
||||
</dia:connections>
|
||||
</dia:object>
|
||||
|
||||
|
|
|
|||
|
|
@ -111,13 +111,13 @@
|
|||
<body>
|
||||
|
||||
<!-- Primary Index -->
|
||||
<p><br><br>Dumped on 2006-09-05</p>
|
||||
<p><br><br>Dumped on 2006-09-26</p>
|
||||
<h1><a name="index">Index of database - dossier1</a></h1>
|
||||
<ul>
|
||||
|
||||
<li><a name="public.schema">public</a></li><ul>
|
||||
<li><a href="#public.table.action">action</a></li><li><a href="#public.table.action-gestion">action_gestion</a></li><li><a href="#public.table.attr-def">attr_def</a></li><li><a href="#public.table.attr-min">attr_min</a></li><li><a href="#public.table.attr-value">attr_value</a></li><li><a href="#public.table.centralized">centralized</a></li><li><a href="#public.table.document">document</a></li><li><a href="#public.table.document-modele">document_modele</a></li><li><a href="#public.table.document-state">document_state</a></li><li><a href="#public.table.document-type">document_type</a></li><li><a href="#public.table.fiche">fiche</a></li><li><a href="#public.table.fiche-def">fiche_def</a></li><li><a href="#public.table.fiche-def-ref">fiche_def_ref</a></li><li><a href="#public.table.form">form</a></li><li><a href="#public.table.format-csv-banque">format_csv_banque</a></li><li><a href="#public.table.formdef">formdef</a></li><li><a href="#public.table.import-tmp">import_tmp</a></li><li><a href="#public.table.invoice">invoice</a></li><li><a href="#public.table.jnt-fic-att-value">jnt_fic_att_value</a></li><li><a href="#public.table.jnt-fic-attr">jnt_fic_attr</a></li><li><a href="#public.table.jrn">jrn</a></li><li><a href="#public.table.jrn-action">jrn_action</a></li><li><a href="#public.table.jrn-def">jrn_def</a></li><li><a href="#public.table.jrn-rapt">jrn_rapt</a></li><li><a href="#public.table.jrn-type">jrn_type</a></li><li><a href="#public.table.jrnx">jrnx</a></li><li><a href="#public.table.parameter">parameter</a></li><li><a href="#public.table.parm-code">parm_code</a></li><li><a href="#public.table.parm-money">parm_money</a></li><li><a href="#public.table.parm-periode">parm_periode</a></li><li><a href="#public.table.quant-sold">quant_sold</a></li><li><a href="#public.table.stock-goods">stock_goods</a></li><li><a href="#public.table.tmp-pcmn">tmp_pcmn</a></li><li><a href="#public.table.tva-rate">tva_rate</a></li><li><a href="#public.table.user-local-pref">user_local_pref</a></li><li><a href="#public.table.user-sec-act">user_sec_act</a></li><li><a href="#public.table.user-sec-jrn">user_sec_jrn</a></li><li><a href="#public.table.version">version</a></li><li><a href="#public.view.vw-client">vw_client</a></li><li><a href="#public.view.vw-fiche-attr">vw_fiche_attr</a></li><li><a href="#public.view.vw-fiche-def">vw_fiche_def</a></li><li><a href="#public.view.vw-fiche-min">vw_fiche_min</a></li><li><a href="#public.view.vw-poste-qcode">vw_poste_qcode</a></li><li><a href="#public.view.vw-supplier">vw_supplier</a></li>
|
||||
<li><a href="#public.function.account-add-p-id-public.poste-comptable-p-name-character-varying">account_add( p_id public.poste_comptable, p_name character varying )</a></li><li><a href="#public.function.account-auto-p-fd-id-integer">account_auto( p_fd_id integer )</a></li><li><a href="#public.function.account-compute-p-f-id-integer">account_compute( p_f_id integer )</a></li><li><a href="#public.function.account-insert-p-f-id-integer-p-account-public.poste-comptable">account_insert( p_f_id integer, p_account public.poste_comptable )</a></li><li><a href="#public.function.account-parent-p-account-public.poste-comptable">account_parent( p_account public.poste_comptable )</a></li><li><a href="#public.function.account-update-p-f-id-integer-p-account-public.poste-comptable">account_update( p_f_id integer, p_account public.poste_comptable )</a></li><li><a href="#public.function.attribut-insert-p-f-id-integer-p-ad-id-integer-p-value-character-varying">attribut_insert( p_f_id integer, p_ad_id integer, p_value character varying )</a></li><li><a href="#public.function.card-class-base-p-f-id-integer">card_class_base( p_f_id integer )</a></li><li><a href="#public.function.check-balance-p-grpt-integer">check_balance( p_grpt integer )</a></li><li><a href="#public.function.correct-sequence-p-sequence-text-p-col-text-p-table-text">correct_sequence( p_sequence text, p_col text, p_table text )</a></li><li><a href="#public.function.fiche-account-parent-p-f-id-integer">fiche_account_parent( p_f_id integer )</a></li><li><a href="#public.function.insert-jrnx-p-date-character-varying-p-montant-numeric-p-poste-integer-p-grpt-integer-p-jrn-def-integer-p-debit-boolean-p-tech-user-text-p-tech-per-integer-p-qcode-text">insert_jrnx( p_date character varying, p_montant numeric, p_poste integer, p_grpt integer, p_jrn_def integer, p_debit boolean, p_tech_user text, p_tech_per integer, p_qcode text )</a></li><li><a href="#public.function.insert-quant-sold-p-internal-text-p-fiche-character-varying-p-quant-integer-p-price-numeric-p-vat-numeric-p-vat-code-integer-p-client-character-varying">insert_quant_sold( p_internal text, p_fiche character varying, p_quant integer, p_price numeric, p_vat numeric, p_vat_code integer, p_client character varying )</a></li><li><a href="#public.function.insert-quick-code-nf-id-integer-tav-text-text">insert_quick_code( nf_id integer, tav_text text )</a></li><li><a href="#public.function.proc-check-balance">proc_check_balance( )</a></li><li><a href="#public.function.t-document-type-insert">t_document_type_insert( )</a></li><li><a href="#public.function.t-jrn-def-sequence">t_jrn_def_sequence( )</a></li><li><a href="#public.function.trim-cvs-quote">trim_cvs_quote( )</a></li><li><a href="#public.function.trim-space-format-csv-banque">trim_space_format_csv_banque( )</a></li><li><a href="#public.function.tva-delete-integer">tva_delete( integer )</a></li><li><a href="#public.function.tva-insert-integer-text-numeric-text-text">tva_insert( integer, text, numeric, text, text )</a></li><li><a href="#public.function.tva-modify-integer-text-numeric-text-text">tva_modify( integer, text, numeric, text, text )</a></li><li><a href="#public.function.update-quick-code-njft-id-integer-tav-text-text">update_quick_code( njft_id integer, tav_text text )</a></li>
|
||||
<li><a href="#public.table.action">action</a></li><li><a href="#public.table.action-gestion">action_gestion</a></li><li><a href="#public.table.attr-def">attr_def</a></li><li><a href="#public.table.attr-min">attr_min</a></li><li><a href="#public.table.attr-value">attr_value</a></li><li><a href="#public.table.b">b</a></li><li><a href="#public.table.centralized">centralized</a></li><li><a href="#public.table.document">document</a></li><li><a href="#public.table.document-modele">document_modele</a></li><li><a href="#public.table.document-state">document_state</a></li><li><a href="#public.table.document-type">document_type</a></li><li><a href="#public.table.fiche">fiche</a></li><li><a href="#public.table.fiche-def">fiche_def</a></li><li><a href="#public.table.fiche-def-ref">fiche_def_ref</a></li><li><a href="#public.table.form">form</a></li><li><a href="#public.table.format-csv-banque">format_csv_banque</a></li><li><a href="#public.table.formdef">formdef</a></li><li><a href="#public.table.import-tmp">import_tmp</a></li><li><a href="#public.table.invoice">invoice</a></li><li><a href="#public.table.jnt-fic-att-value">jnt_fic_att_value</a></li><li><a href="#public.table.jnt-fic-attr">jnt_fic_attr</a></li><li><a href="#public.table.jrn">jrn</a></li><li><a href="#public.table.jrn-action">jrn_action</a></li><li><a href="#public.table.jrn-def">jrn_def</a></li><li><a href="#public.table.jrn-rapt">jrn_rapt</a></li><li><a href="#public.table.jrn-type">jrn_type</a></li><li><a href="#public.table.jrnx">jrnx</a></li><li><a href="#public.table.parameter">parameter</a></li><li><a href="#public.table.parm-code">parm_code</a></li><li><a href="#public.table.parm-money">parm_money</a></li><li><a href="#public.table.parm-periode">parm_periode</a></li><li><a href="#public.table.quant-sold">quant_sold</a></li><li><a href="#public.table.stock-goods">stock_goods</a></li><li><a href="#public.table.tmp-pcmn">tmp_pcmn</a></li><li><a href="#public.table.tva-rate">tva_rate</a></li><li><a href="#public.table.user-local-pref">user_local_pref</a></li><li><a href="#public.table.user-sec-act">user_sec_act</a></li><li><a href="#public.table.user-sec-jrn">user_sec_jrn</a></li><li><a href="#public.table.version">version</a></li><li><a href="#public.view.vw-client">vw_client</a></li><li><a href="#public.view.vw-fiche-attr">vw_fiche_attr</a></li><li><a href="#public.view.vw-fiche-def">vw_fiche_def</a></li><li><a href="#public.view.vw-fiche-min">vw_fiche_min</a></li><li><a href="#public.view.vw-poste-qcode">vw_poste_qcode</a></li><li><a href="#public.view.vw-supplier">vw_supplier</a></li>
|
||||
<li><a href="#public.function.account-add-p-id-public.poste-comptable-p-name-character-varying">account_add( p_id public.poste_comptable, p_name character varying )</a></li><li><a href="#public.function.account-auto-p-fd-id-integer">account_auto( p_fd_id integer )</a></li><li><a href="#public.function.account-compute-p-f-id-integer">account_compute( p_f_id integer )</a></li><li><a href="#public.function.account-insert-p-f-id-integer-p-account-public.poste-comptable">account_insert( p_f_id integer, p_account public.poste_comptable )</a></li><li><a href="#public.function.account-parent-p-account-public.poste-comptable">account_parent( p_account public.poste_comptable )</a></li><li><a href="#public.function.account-update-p-f-id-integer-p-account-public.poste-comptable">account_update( p_f_id integer, p_account public.poste_comptable )</a></li><li><a href="#public.function.attribut-insert-p-f-id-integer-p-ad-id-integer-p-value-character-varying">attribut_insert( p_f_id integer, p_ad_id integer, p_value character varying )</a></li><li><a href="#public.function.card-class-base-p-f-id-integer">card_class_base( p_f_id integer )</a></li><li><a href="#public.function.check-balance-p-grpt-integer">check_balance( p_grpt integer )</a></li><li><a href="#public.function.correct-sequence-p-sequence-text-p-col-text-p-table-text">correct_sequence( p_sequence text, p_col text, p_table text )</a></li><li><a href="#public.function.drop-it-p-constraint-character-varying">drop_it( p_constraint character varying )</a></li><li><a href="#public.function.fiche-account-parent-p-f-id-integer">fiche_account_parent( p_f_id integer )</a></li><li><a href="#public.function.insert-jrnx-p-date-character-varying-p-montant-numeric-p-poste-integer-p-grpt-integer-p-jrn-def-integer-p-debit-boolean-p-tech-user-text-p-tech-per-integer-p-qcode-text">insert_jrnx( p_date character varying, p_montant numeric, p_poste integer, p_grpt integer, p_jrn_def integer, p_debit boolean, p_tech_user text, p_tech_per integer, p_qcode text )</a></li><li><a href="#public.function.insert-quant-sold-p-internal-text-p-fiche-character-varying-p-quant-integer-p-price-numeric-p-vat-numeric-p-vat-code-integer-p-client-character-varying">insert_quant_sold( p_internal text, p_fiche character varying, p_quant integer, p_price numeric, p_vat numeric, p_vat_code integer, p_client character varying )</a></li><li><a href="#public.function.insert-quick-code-nf-id-integer-tav-text-text">insert_quick_code( nf_id integer, tav_text text )</a></li><li><a href="#public.function.plpgsql-validator-oid">plpgsql_validator( oid )</a></li><li><a href="#public.function.proc-check-balance">proc_check_balance( )</a></li><li><a href="#public.function.t-document-type-insert">t_document_type_insert( )</a></li><li><a href="#public.function.t-jrn-def-sequence">t_jrn_def_sequence( )</a></li><li><a href="#public.function.trim-cvs-quote">trim_cvs_quote( )</a></li><li><a href="#public.function.trim-space-format-csv-banque">trim_space_format_csv_banque( )</a></li><li><a href="#public.function.tva-delete-integer">tva_delete( integer )</a></li><li><a href="#public.function.tva-insert-integer-text-numeric-text-text">tva_insert( integer, text, numeric, text, text )</a></li><li><a href="#public.function.tva-modify-integer-text-numeric-text-text">tva_modify( integer, text, numeric, text, text )</a></li><li><a href="#public.function.update-quick-code-njft-id-integer-tav-text-text">update_quick_code( njft_id integer, tav_text text )</a></li>
|
||||
</ul>
|
||||
|
||||
</ul>
|
||||
|
|
@ -668,6 +668,93 @@
|
|||
|
||||
|
||||
|
||||
<!-- Constraint List -->
|
||||
|
||||
|
||||
<!-- Foreign Key Discovery -->
|
||||
|
||||
|
||||
<!-- View Definition -->
|
||||
|
||||
|
||||
<!-- List off permissions -->
|
||||
|
||||
|
||||
<p>
|
||||
<a href="#index">Index</a> -
|
||||
<a href="#public.schema">Schema public</a>
|
||||
</p>
|
||||
|
||||
<hr>
|
||||
<h2>Table:
|
||||
<a name="public.table.b">b</a>
|
||||
</h2>
|
||||
|
||||
|
||||
|
||||
<table width="100%" cellspacing="0" cellpadding="3">
|
||||
<caption>b Structure</caption>
|
||||
<tr>
|
||||
<th>F-Key</th>
|
||||
<th>Name</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
|
||||
<tr class="tr0">
|
||||
<td>
|
||||
|
||||
</td>
|
||||
<td>j_deb</td>
|
||||
<td>double precision</td>
|
||||
<td><i>
|
||||
|
||||
|
||||
|
||||
|
||||
</i>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="tr1">
|
||||
<td>
|
||||
|
||||
</td>
|
||||
<td>jr_montant</td>
|
||||
<td>double precision</td>
|
||||
<td><i>
|
||||
|
||||
|
||||
|
||||
|
||||
</i>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="tr0">
|
||||
<td>
|
||||
|
||||
</td>
|
||||
<td>jr_grpt_id</td>
|
||||
<td>integer</td>
|
||||
<td><i>
|
||||
|
||||
|
||||
|
||||
|
||||
</i>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- Constraint List -->
|
||||
|
||||
|
||||
|
|
@ -2105,6 +2192,8 @@
|
|||
<a name="public.table.import-tmp">import_tmp</a>
|
||||
</h2>
|
||||
|
||||
<p>Table temporaire pour l'importation des banques en format CSV</p>
|
||||
|
||||
|
||||
|
||||
<table width="100%" cellspacing="0" cellpadding="3">
|
||||
|
|
@ -2125,7 +2214,7 @@
|
|||
<td><i>
|
||||
|
||||
|
||||
|
||||
NOT NULL
|
||||
|
||||
</i>
|
||||
|
||||
|
|
@ -2141,7 +2230,7 @@
|
|||
<td><i>
|
||||
|
||||
|
||||
|
||||
NOT NULL
|
||||
|
||||
</i>
|
||||
|
||||
|
|
@ -2157,7 +2246,7 @@
|
|||
<td><i>
|
||||
|
||||
|
||||
|
||||
NOT NULL
|
||||
|
||||
</i>
|
||||
|
||||
|
|
@ -2169,11 +2258,11 @@
|
|||
|
||||
</td>
|
||||
<td>montant</td>
|
||||
<td>text</td>
|
||||
<td>numeric(20,4)</td>
|
||||
<td><i>
|
||||
|
||||
|
||||
|
||||
NOT NULL
|
||||
|
||||
</i>
|
||||
|
||||
|
|
@ -2264,13 +2353,13 @@
|
|||
<td>
|
||||
|
||||
</td>
|
||||
<td>status</td>
|
||||
<td>character varying(1)</td>
|
||||
<td>bq_account</td>
|
||||
<td>integer</td>
|
||||
<td><i>
|
||||
|
||||
|
||||
NOT NULL
|
||||
DEFAULT 'n'::character varying
|
||||
|
||||
</i>
|
||||
|
||||
</td>
|
||||
|
|
@ -2280,7 +2369,7 @@
|
|||
<td>
|
||||
|
||||
</td>
|
||||
<td>bq_account</td>
|
||||
<td>jrn</td>
|
||||
<td>integer</td>
|
||||
<td><i>
|
||||
|
||||
|
|
@ -2296,15 +2385,15 @@
|
|||
<td>
|
||||
|
||||
</td>
|
||||
<td>jrn</td>
|
||||
<td>integer</td>
|
||||
<td>status</td>
|
||||
<td>character varying(1)</td>
|
||||
<td><i>
|
||||
|
||||
|
||||
NOT NULL
|
||||
|
||||
DEFAULT 'n'::character varying
|
||||
</i>
|
||||
|
||||
<br><br>Status doit être w pour en attente, t pour transfèrer ou d à effacer
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
|
@ -2325,8 +2414,8 @@
|
|||
</tr>
|
||||
|
||||
<tr class="tr0">
|
||||
<td>import_tmp_status_check</td>
|
||||
<td>CHECK ((((((status)::text = 't'::text) OR ((status)::text = 'd'::text)) OR ((status)::text = 'w'::text)) OR ((status)::text = 'n'::text)))</td>
|
||||
<td>chk_status</td>
|
||||
<td>CHECK ((((((status)::text = 'n'::text) OR ((status)::text = 'w'::text)) OR ((status)::text = 'd'::text)) OR ((status)::text = 't'::text)))</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
|
@ -4290,7 +4379,7 @@
|
|||
<td><i>
|
||||
|
||||
|
||||
|
||||
NOT NULL
|
||||
|
||||
</i>
|
||||
|
||||
|
|
@ -4362,6 +4451,11 @@
|
|||
</tr>
|
||||
|
||||
<tr class="tr0">
|
||||
<td>$1</td>
|
||||
<td>CHECK ((p_end >= p_start))</td>
|
||||
</tr>
|
||||
|
||||
<tr class="tr1">
|
||||
<td>parm_periode_check</td>
|
||||
<td>CHECK ((p_end >= p_start))</td>
|
||||
</tr>
|
||||
|
|
@ -7298,6 +7392,7 @@ end ;
|
|||
declare
|
||||
l_auto bool;
|
||||
begin
|
||||
|
||||
select fd_create_account into l_auto from fiche_def where fd_id=p_fd_id;
|
||||
if l_auto is null then
|
||||
l_auto:=false;
|
||||
|
|
@ -7441,18 +7536,25 @@ sName varchar;
|
|||
nJft_id attr_value.jft_id%type;
|
||||
begin
|
||||
|
||||
-- if p_value empty
|
||||
if length(trim(p_account)) != 0 then
|
||||
-- does the account exist ?
|
||||
select count(*) into nCount from tmp_pcmn where pcm_val=p_account;
|
||||
if nCount = 0 then
|
||||
-- retrieve name
|
||||
select av_text into sName from
|
||||
attr_value join jnt_fic_att_value using (jft_id)
|
||||
where
|
||||
ad_id=1 and f_id=p_f_id;
|
||||
-- get parent
|
||||
nParent:=fiche_account_parent(p_f_id);
|
||||
-- account doesn't exist we need to add id
|
||||
insert into tmp_pcmn(pcm_val,pcm_lib,pcm_val_parent) values (p_account,sName,nParent);
|
||||
end if;
|
||||
end if;
|
||||
-- we retrieve jft_id
|
||||
select jft_id into njft_id from jnt_fic_att_value where f_id=p_f_id and ad_id=5;
|
||||
-- we update the account
|
||||
update attr_value set av_text=p_account where jft_id=njft_id;
|
||||
|
||||
return njft_id;
|
||||
|
|
@ -7517,15 +7619,18 @@ begin
|
|||
where
|
||||
j_grpt=p_grpt
|
||||
and j_debit=false;
|
||||
|
||||
select sum (j_montant) into amount_jrnx_debit
|
||||
from jrnx
|
||||
where
|
||||
j_grpt=p_grpt
|
||||
and j_debit=true;
|
||||
|
||||
select jr_montant into amount_jrn
|
||||
from jrn
|
||||
where
|
||||
jr_grpt_id=p_grpt;
|
||||
|
||||
if ( amount_jrnx_debit != amount_jrnx_credit )
|
||||
then
|
||||
return abs(amount_jrnx_debit-amount_jrnx_credit);
|
||||
|
|
@ -7572,6 +7677,24 @@ begin
|
|||
execute 'alter sequence '||p_sequence||' restart with '||max_sequence;
|
||||
return 0;
|
||||
|
||||
end;
|
||||
</pre>
|
||||
|
||||
<hr>
|
||||
<h2>Function:
|
||||
<a href="#public.schema"><a name="public.function.drop-it-p-constraint-character-varying">drop_it( p_constraint character varying )</a>
|
||||
</h2>
|
||||
<h3>Returns: void</h3>
|
||||
<h3>Language: PLPGSQL</h3>
|
||||
|
||||
<pre>
|
||||
declare
|
||||
nCount integer;
|
||||
begin
|
||||
select count(*) into nCount from pg_constraint where conname=p_constraint;
|
||||
if nCount = 1 then
|
||||
execute 'alter table parm_periode drop constraint '||p_constraint ;
|
||||
end if;
|
||||
end;
|
||||
</pre>
|
||||
|
||||
|
|
@ -7607,9 +7730,14 @@ declare
|
|||
nCount_qcode integer;
|
||||
begin
|
||||
sCode=trim(p_qcode);
|
||||
|
||||
-- if p_qcode is empty try to find one
|
||||
if length(sCode) = 0 or p_qcode is null then
|
||||
|
||||
select count(*) into nCount_qcode
|
||||
from vw_poste_qcode where j_poste=p_poste;
|
||||
-- if we find only one q_code for a accountancy account
|
||||
-- then retrieve it
|
||||
if nCount_qcode = 1 then
|
||||
select j_qcode into sCode
|
||||
from vw_poste_qcode where j_poste=p_poste;
|
||||
|
|
@ -7644,6 +7772,7 @@ begin
|
|||
p_tech_per,
|
||||
sCode
|
||||
);
|
||||
|
||||
return;
|
||||
end;
|
||||
</pre>
|
||||
|
|
@ -7692,25 +7821,39 @@ end;
|
|||
tText := replace(tText,' ','');
|
||||
|
||||
loop
|
||||
-- take the next sequence
|
||||
select nextval('s_jnt_fic_att_value') into ns;
|
||||
if length (tText) = 0 or tText is null then
|
||||
tText := 'FID'||ns;
|
||||
end if;
|
||||
-- av_text already used ?
|
||||
select count(*) into nExist
|
||||
from jnt_fic_att_value join attr_value using (jft_id)
|
||||
where
|
||||
ad_id=23 and av_text=upper(tText);
|
||||
|
||||
if nExist = 0 then
|
||||
exit;
|
||||
end if;
|
||||
tText:='FID'||ns;
|
||||
end loop;
|
||||
-- insert into table jnt_fic_att_value
|
||||
insert into jnt_fic_att_value values (ns,nf_id,23);
|
||||
-- insert value into attr_value
|
||||
insert into attr_value values (ns,upper(tText));
|
||||
return ns;
|
||||
end;
|
||||
</pre>
|
||||
|
||||
<hr>
|
||||
<h2>Function:
|
||||
<a href="#public.schema"><a name="public.function.plpgsql-validator-oid">plpgsql_validator( oid )</a>
|
||||
</h2>
|
||||
<h3>Returns: void</h3>
|
||||
<h3>Language: C</h3>
|
||||
|
||||
<pre>plpgsql_validator</pre>
|
||||
|
||||
<hr>
|
||||
<h2>Function:
|
||||
<a href="#public.schema"><a name="public.function.proc-check-balance">proc_check_balance( )</a>
|
||||
|
|
@ -7804,6 +7947,7 @@ begin
|
|||
if ( length(modified.include_file) = 0 ) then
|
||||
modified.include_file=null;
|
||||
end if;
|
||||
|
||||
return modified;
|
||||
end;
|
||||
</pre>
|
||||
|
|
@ -7891,6 +8035,7 @@ begin
|
|||
if length(trim(p_tva_label)) = 0 then
|
||||
return 3;
|
||||
end if;
|
||||
|
||||
if length(trim(p_tva_poste)) != 0 then
|
||||
if position (',' in p_tva_poste) = 0 then return 4; end if;
|
||||
debit = split_part(p_tva_poste,',',1);
|
||||
|
|
|
|||
|
|
@ -720,6 +720,11 @@ op
|
|||
</itemize>
|
||||
Pour la création voir <ref id="avance_journal" name="avance_journal">
|
||||
|
||||
<p> Dans tous les journaux, vous avez le menu "nouvelle" et "voir" au
|
||||
minimum, "nouvelle" pour nouvelle opération et voir pour voir les
|
||||
opérations de la période en cours ou de toutes les périodes.
|
||||
|
||||
|
||||
<sect2>Grand Livre
|
||||
<p>Ce journal-ci est un peu spécial. En fait, il rassemble tous les
|
||||
journaux dans un seul, on ne peut pas y écrire directement mais on y
|
||||
|
|
|
|||
|
|
@ -148,7 +148,12 @@ if ( $Res != null ) {
|
|||
else
|
||||
$cl='class="even"';
|
||||
|
||||
echo "<TR $cl><TD VALIGN=\"TOP\"> <B>$Dossier[dos_name]</B> </TD><TD><I> $Dossier[dos_description]</I></TD></TR>";
|
||||
echo "<TR $cl><TD VALIGN=\"TOP\">
|
||||
<B>$Dossier[dos_name]</B> </TD>
|
||||
<TD><I> ".$Dossier['dos_description']."</I>
|
||||
</TD>
|
||||
</TR>";
|
||||
|
||||
$compteur++;
|
||||
|
||||
}
|
||||
|
|
@ -195,8 +200,13 @@ if ( $count == 0 ) {
|
|||
|
||||
} // action = dossier_mgt
|
||||
if ( $_GET["action"] == "modele_mgt" ) {
|
||||
$cn=DbConnect();
|
||||
|
||||
$cn=DbConnect();
|
||||
if ( isset($_GET['rm']) && isset($_GET['mod_id'])) {
|
||||
|
||||
/*! \todo add confirmation and remove the template
|
||||
*/
|
||||
}
|
||||
// IF FMOD_NAME is posted then must add a template
|
||||
if ( isset ($_POST["FMOD_NAME"]) ) {
|
||||
$mod_name=FormatString($_POST["FMOD_NAME"]);
|
||||
|
|
@ -252,6 +262,7 @@ if ( $count == 0 ) {
|
|||
echo '<table width="100%" border="1">';
|
||||
echo "<TR><TH>Nom</TH>".
|
||||
"<TH>Description</TH>".
|
||||
"<th></th>".
|
||||
"</TR>";
|
||||
|
||||
for ($i=0;$i<$count;$i++) {
|
||||
|
|
@ -259,6 +270,11 @@ if ( $count == 0 ) {
|
|||
printf('<TR>'.
|
||||
'<TD><b> %s</b> </TD>'.
|
||||
'<TD><I> %s </I></TD>'.
|
||||
'<td> '.
|
||||
'<a class="one" href="?action=modele_mgt&rm&mod_id='.$mod['mod_id'].
|
||||
'" <input type="button" name="Effacer" Value="Effacer">'.
|
||||
'</A></td>'.
|
||||
|
||||
'</TR>',
|
||||
$mod['mod_name'],
|
||||
$mod['mod_desc']);
|
||||
|
|
@ -304,6 +320,7 @@ if ( $count == 0 ) {
|
|||
</TR>
|
||||
</TABLE>
|
||||
</form>
|
||||
|
||||
<?
|
||||
|
||||
}// action = modele_mgt
|
||||
|
|
|
|||
|
|
@ -97,6 +97,7 @@ echo '</div>';
|
|||
|
||||
$cn=DbConnect($_SESSION['g_dossier']);
|
||||
$User->AccessRequest($cn,SEC_GESTION);
|
||||
echo JS_VIEW_JRN_MODIFY;
|
||||
//-----------------------------------------------------
|
||||
// p_action == pref
|
||||
//-----------------------------------------------------
|
||||
|
|
|
|||
203
html/fiche.php
203
html/fiche.php
|
|
@ -22,6 +22,8 @@
|
|||
* \brief module to manage the card (removing, listing, creating, modify attribut)
|
||||
*/
|
||||
include_once ("ac_common.php");
|
||||
require_once('class_fiche.php');
|
||||
|
||||
html_page_start($_SESSION['g_theme']);
|
||||
|
||||
if ( ! isset ( $_SESSION['g_dossier'] ) ) {
|
||||
|
|
@ -60,36 +62,120 @@ if ($read+$write == 0 ){
|
|||
/* Cannot Access */
|
||||
NoAccess();
|
||||
}
|
||||
|
||||
function ShowFicheDefInput($p_fiche_def)
|
||||
{
|
||||
$r="";
|
||||
// Save the label
|
||||
|
||||
$p_fiche_def->SaveLabel($_REQUEST['label']);
|
||||
$p_fiche_def->Get();
|
||||
$p_fiche_def->GetAttribut();
|
||||
$r.= '<H2 class="info">'.$p_fiche_def->label.'</H2>';
|
||||
|
||||
$r.= '<FORM action="fiche.php" method="POST">';
|
||||
$r.= '<INPUT TYPE="HIDDEN" NAME="fd_id" VALUE="'.$p_fiche_def->id.'">';
|
||||
|
||||
$r.= $p_fiche_def->DisplayAttribut();
|
||||
$r.= ' <INPUT TYPE="SUBMIT" Value="Ajoute cet élément" NAME="add_line">';
|
||||
$r.= "</form>";
|
||||
return $r;
|
||||
}
|
||||
// Creation of a new model of card
|
||||
// in the database
|
||||
if ( isset($_POST['add_modele']) and $write != 0) {
|
||||
// insert the model of card in database
|
||||
AddModele($cn,$HTTP_POST_VARS);
|
||||
$fiche_def=new fiche_def($cn);
|
||||
$fiche_def->Add($HTTP_POST_VARS);
|
||||
}
|
||||
$r="";
|
||||
// Add a line in the card model
|
||||
if ( isset ($_POST["add_line"]) ) {
|
||||
$r= '<DIV class="u_redcontent">';
|
||||
if ( $write ==0)
|
||||
$r.= "<h2 class=\"error\"> Pas d'accès </h2>";
|
||||
else
|
||||
{
|
||||
$fiche_def=new fiche_def($cn,$_REQUEST['fd_id']);
|
||||
// Insert Line
|
||||
$fiche_def->InsertAttribut($_REQUEST['ad_id']);
|
||||
|
||||
$r.=ShowFicheDefInput($fiche_def);
|
||||
|
||||
}
|
||||
$r.= '</DIV>';
|
||||
}
|
||||
// Change the name of the card model
|
||||
if ( isset ($_POST["change_name"] ) ) {
|
||||
$r= '<DIV class="u_redcontent">';
|
||||
if ( $write ==0)
|
||||
$r.= "<h2 class=\"error\"> Pas d'accès </h2>";
|
||||
else
|
||||
{
|
||||
$fiche_def=new fiche_def($cn,$_REQUEST['fd_id']);
|
||||
$r.=ShowFicheDefInput($fiche_def);
|
||||
}
|
||||
$r.= '</DIV>';
|
||||
}
|
||||
|
||||
ShowMenuFiche($_SESSION['g_dossier']);
|
||||
|
||||
ShowMenuFiche($_SESSION['g_dossier']);
|
||||
echo $r;
|
||||
if ( isset ( $_GET["action"]) ) {
|
||||
$action=$_GET["action"];
|
||||
// View the details of the selected cat. of cards
|
||||
if ( isset ($_GET["fiche"]) && $action=="vue" && ! isset ($_POST['add_fiche']) ) {
|
||||
if ( isset ($_GET["fiche"]) && $action=="vue"
|
||||
&& ! isset ($_POST['add_fiche'])
|
||||
&& ! isset ($_POST['update_fiche'])
|
||||
&& ! isset ($_POST['delete'])) {
|
||||
echo '<DIV class="u_redcontent">';
|
||||
ViewFiche($cn,$_GET["fiche"]);
|
||||
$fiche_def=new fiche_def($cn,$_GET['fiche']);
|
||||
$fiche_def->myList();
|
||||
|
||||
echo '</DIV>';
|
||||
|
||||
}// Display the detail of a card
|
||||
if ($action== "detail" ) {
|
||||
echo '<DIV class="u_redcontent">';
|
||||
if ( $write == 0) echo '<H2 class="info"> Vos changements ne seront pas sauvés</h2>';
|
||||
ViewFicheDetail($cn,$_GET["fiche_id"]);
|
||||
$t=false;
|
||||
if ( $write == 0)
|
||||
{
|
||||
echo '<H2 class="info"> Vos changements ne seront pas sauvés</h2>';
|
||||
$t=true;
|
||||
}
|
||||
$fiche=new fiche($cn,$_GET["fiche_id"]);
|
||||
if ( $_SESSION['g_pagesize'] != -1 ){
|
||||
// retrieve value
|
||||
// with offet &offset=15&step=15&page=2&size=15
|
||||
if ( $_SESSION['g_pagesize'] != -1) {
|
||||
$str=sprintf("&offset=%s&step=%s&page=%s&size=%s",
|
||||
$_GET['offset'],
|
||||
$_GET['step'],
|
||||
$_GET['page'],
|
||||
$_GET['size']);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
if ( $write != 0)
|
||||
echo '<form method="post" action="fiche.php?action=vue&fiche='.$_GET['fiche'].$str.'">';
|
||||
echo $fiche->Display($t);
|
||||
echo '<input type="hidden" name="f_id" value="'.$_GET['fiche_id'].'">';
|
||||
if ( $write != 0 ) {
|
||||
echo '<input type="submit" name="update_fiche" value="Mise à jour">';
|
||||
echo '<input type="submit" name="delete" value="Effacer cette fiche">';
|
||||
}
|
||||
$str="";
|
||||
|
||||
echo '<a class="mtitle" href="fiche.php?action=vue&fiche='.$fiche->fiche_def.$str.
|
||||
'"><input type="button" value="annuler"></A>';
|
||||
if ( $write != 0 ) echo '</form>';
|
||||
echo '</DIV>';
|
||||
}
|
||||
// Display the form where you can enter
|
||||
// the property of the card model
|
||||
if ($action == "add_modele" and $write !=0) {
|
||||
echo '<DIV class="u_redcontent">';
|
||||
DefModele($cn,$search);
|
||||
CreateCategory($cn,$search);
|
||||
echo '</DIV>';
|
||||
}
|
||||
// Modify a card Model
|
||||
|
|
@ -98,58 +184,61 @@ if ( isset ( $_GET["action"]) ) {
|
|||
if ( $write ==0)
|
||||
echo "<h2 class=\"error\"> Pas d'accès </h2>";
|
||||
else
|
||||
UpdateModele($cn,$_GET["fiche"],$search);
|
||||
{
|
||||
|
||||
|
||||
$fiche_def=new fiche_def($cn,$_GET['fiche']);
|
||||
$fiche_def->Get();
|
||||
$fiche_def->GetAttribut();
|
||||
echo '<H2 class="info">'.$fiche_def->label.'</H2>';
|
||||
|
||||
echo '<FORM action="fiche.php" method="POST">';
|
||||
echo '<INPUT TYPE="HIDDEN" NAME="fd_id" VALUE="'.$fiche_def->id.'">';
|
||||
|
||||
echo $fiche_def->DisplayAttribut();
|
||||
echo ' <INPUT TYPE="SUBMIT" Value="Ajoute cet élément" NAME="add_line">';
|
||||
echo "</form>";
|
||||
}
|
||||
echo '</DIV>';
|
||||
}
|
||||
// delete a card
|
||||
if ($action== "delete" ) {
|
||||
echo '<DIV class="u_redcontent">';
|
||||
if ( $write ==0)
|
||||
echo "<h2 class=\"error\"> Pas d'accès </h2>";
|
||||
else
|
||||
{
|
||||
Remove($cn,$_GET["fiche_id"]);
|
||||
|
||||
ViewFiche($cn,$_GET["f_fd_id"]);
|
||||
}
|
||||
echo "</DIV>";
|
||||
}
|
||||
}
|
||||
// Add a line in the card model
|
||||
if ( isset ($_GET["add_ligne"]) ) {
|
||||
echo '<DIV class="u_redcontent">';
|
||||
if ( $write ==0)
|
||||
echo "<h2 class=\"error\"> Pas d'accès </h2>";
|
||||
else
|
||||
{
|
||||
SaveModeleName($cn,$_GET["fd_id"],$_GET["label"]);
|
||||
InsertModeleLine($cn,$_GET["fd_id"],$_GET["ad_id"]);
|
||||
UpdateModele($cn,$_GET["fd_id"],$search);
|
||||
}
|
||||
echo '</DIV>';
|
||||
}
|
||||
// Change the name of the card model
|
||||
if ( isset ($_GET["change_name"] ) ) {
|
||||
echo '<DIV class="u_redcontent">';
|
||||
if ( $write ==0)
|
||||
echo "<h2 class=\"error\"> Pas d'accès </h2>";
|
||||
else
|
||||
{
|
||||
SaveModeleName($cn,$_GET["fd_id"],FormatString($_GET["label"]));
|
||||
UpdateModele($cn,$_GET["fd_id"],$search);
|
||||
}
|
||||
echo '</DIV>';
|
||||
}
|
||||
|
||||
// Display a blank card from the selected category
|
||||
if ( isset ($_POST["fiche"]) && isset ($_POST["add"] ) ) {
|
||||
echo '<DIV class="u_redcontent">';
|
||||
if ( $write ==0)
|
||||
echo "<h2 class=\"error\"> Pas d'accès </h2>";
|
||||
else
|
||||
EncodeFiche($cn,$_POST["fiche"]);
|
||||
{
|
||||
$url=$_SERVER['REQUEST_URI'];
|
||||
$fiche=new fiche($cn,0);
|
||||
|
||||
echo '<form method="post" action="'.$url.'&fiche='.$_POST['fiche'].'">';
|
||||
echo $fiche->blank($_POST['fiche']);
|
||||
echo '<input type="submit" name="add_fiche" value="Ajout">';
|
||||
echo '<a class="mtitle" href="'.$url.'&fiche='.$_POST['fiche'].'">'.
|
||||
'<input type="button" value="annuler"></A>';
|
||||
|
||||
|
||||
echo '</form>';
|
||||
}
|
||||
echo '</DIV>';
|
||||
}
|
||||
// delete a card
|
||||
if (isset($_POST['delete']) ) {
|
||||
echo '<DIV class="u_redcontent">';
|
||||
if ( $write ==0)
|
||||
echo "<h2 class=\"error\"> Pas d'accès </h2>";
|
||||
else
|
||||
{
|
||||
$fiche=new fiche($cn,$_POST["f_id"]);
|
||||
$fiche->remove();
|
||||
}
|
||||
$fiche_def=new fiche_def($cn,$_GET['fiche']);
|
||||
$fiche_def->myList();
|
||||
|
||||
echo "</DIV>";
|
||||
}
|
||||
|
||||
// Add the data (attribute) of the card
|
||||
if ( isset ($_POST["add_fiche"]) ) {
|
||||
echo '<DIV class="u_redcontent">';
|
||||
|
|
@ -158,8 +247,11 @@ if ( isset ($_POST["add_fiche"]) ) {
|
|||
echo "<h2 class=\"error\"> Pas d'accès </h2>";
|
||||
else
|
||||
{
|
||||
AddFiche($cn,$_POST["fiche"],$HTTP_POST_VARS);
|
||||
ViewFiche($cn,$_POST["fiche"]);
|
||||
$fiche=new fiche($cn);
|
||||
$fiche->Save($_REQUEST['fiche']);
|
||||
$fiche_def=new fiche_def($cn,$_GET['fiche']);
|
||||
$fiche_def->myList();
|
||||
|
||||
|
||||
}
|
||||
echo '</DIV>';
|
||||
|
|
@ -172,9 +264,14 @@ if ( isset ($_POST["update_fiche"]) ) {
|
|||
echo "<h2 class=\"error\"> Pas d'accès </h2>";
|
||||
else
|
||||
{
|
||||
$a=UpdateFiche($cn,$HTTP_POST_VARS);
|
||||
$fiche=new fiche($cn,$_POST['f_id']);
|
||||
$fiche->Save();
|
||||
|
||||
}
|
||||
$fd_id=GetFicheDef($cn,$_POST["f_id"]);
|
||||
$fiche_def=new fiche_def($cn,$_GET['fiche']);
|
||||
$fiche_def->myList();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ if ($User->CheckAction($cn,FICHE_READ) == 0 )
|
|||
if ( isset ($_POST['fd_id'])) {
|
||||
$fiche_def=new fiche_def($cn,$_POST['fd_id']);
|
||||
$fiche=new fiche($cn);
|
||||
$e=$fiche->GetByType($fiche_def->id);
|
||||
$e=$fiche_def->GetByType();
|
||||
$o=0;
|
||||
// Heading
|
||||
$fiche_def->GetAttribut();
|
||||
|
|
|
|||
|
|
@ -20,6 +20,9 @@
|
|||
include_once ("ac_common.php");
|
||||
include_once ("postgres.php");
|
||||
include_once ("check_priv.php");
|
||||
require_once("class_fiche.php");
|
||||
require_once("class_fiche_def.php");
|
||||
|
||||
/*! \file
|
||||
* \brief Create a new card in a popup window
|
||||
*/
|
||||
|
|
@ -58,59 +61,30 @@ foreach ($HTTP_GET_VARS as $key=>$element) {
|
|||
}
|
||||
|
||||
function new_fiche($p_cn,$p_type) {
|
||||
$ch_col="</TD><TD>";
|
||||
$ch_li='</TR><TR>';
|
||||
$fiche=new fiche($p_cn);
|
||||
$r='<FORM action="fiche_new.php" method="post">';
|
||||
$r.='<INPUT TYPE="HIDDEN" name="fiche" value="'.$p_type.'">';
|
||||
$l_sessid=(isset ($_POST["PHPSESSID"]))?$_POST["PHPSESSID"]:$_GET["PHPSESSID"];
|
||||
|
||||
$r.=JS_SHOW_TVA;
|
||||
$r.=JS_SEARCH_POSTE;
|
||||
$r.="<TABLE>";
|
||||
echo '<H2 class="info">New </H2>';
|
||||
$p_f_id="";
|
||||
echo_debug('fiche_new.php',__LINE__,"Array is null");
|
||||
// Find all the attribute of the existing cards
|
||||
// --> Get_attr_def
|
||||
$sql="select frd_id,ad_id,ad_text from fiche_def join jnt_fic_attr using (fd_id)
|
||||
join attr_def using (ad_id) where fd_id=".$p_type." order by ad_id";
|
||||
$fiche_def=new fiche_def($p_cn,$p_type);
|
||||
$fiche_def->Get();
|
||||
|
||||
$Res=ExecSql($p_cn,$sql);
|
||||
$Max=pg_NumRows($Res);
|
||||
// Put the card modele id (fiche_def.fd_id)
|
||||
$r.='<INPUT TYPE="HIDDEN" name="fd_id" value="'.$p_type.'">';
|
||||
for ($i=0;$i < $Max;$i++) {
|
||||
$l_line=pg_fetch_array($Res,$i);
|
||||
|
||||
// The number of the attribute
|
||||
$Hid=sprintf('<INPUT TYPE="HIDDEN" name="ad_id%d" value="%s">',
|
||||
$i,$l_line['ad_id']);
|
||||
|
||||
$but_search_poste="";
|
||||
// Javascript for searching the account
|
||||
if ( $l_line ['ad_id'] == ATTR_DEF_ACCOUNT ) {
|
||||
$but_search_poste='<INPUT TYPE="BUTTON" VALUE="Cherche" OnClick="SearchPoste(\''.$l_sessid.'\',\'av_text'.$i.'\')">';
|
||||
}
|
||||
// Javascript for showing the tva
|
||||
if ( $l_line ['ad_id'] == ATTR_DEF_TVA ) {
|
||||
$but_search_poste='<INPUT TYPE="BUTTON" VALUE="Montre" OnClick="ShowTva(\''.$l_sessid.'\',\'av_text'.$i.'\')">';
|
||||
}
|
||||
// content of the attribute
|
||||
$r.= sprintf('<TR><TD> %s </TD><TD><INPUT style="border:solid 1px blue;" TYPE="TEXT" NAME="av_text%d">%s %s</TD></TR>',
|
||||
$l_line['ad_text'], $i,$Hid,$but_search_poste);
|
||||
}
|
||||
$r.="</TABLE>";
|
||||
$r.= '<H2 class="info"> '.$fiche_def->label.'<br>Nouveau </H2>';
|
||||
$r.= $fiche->blank($p_type);
|
||||
$r.='<INPUT TYPE="SUBMIT" name="add_fiche" value="Mis à jour">';
|
||||
$r.= '<INPUT TYPE="HIDDEN" name="inc" value="'.$Max.'">';
|
||||
|
||||
$r.='</FORM>';
|
||||
return $r;
|
||||
}
|
||||
|
||||
if ( isset($_POST['add_fiche'])) {
|
||||
AddFiche($cn,$_POST["fiche"],$HTTP_POST_VARS);
|
||||
$fiche=new fiche($cn);
|
||||
$fiche->Save($_POST['fiche']);
|
||||
|
||||
?>
|
||||
<SCRIPT>
|
||||
|
||||
window.close();
|
||||
window.close();
|
||||
</SCRIPT>
|
||||
<?
|
||||
return;
|
||||
|
|
@ -187,8 +161,11 @@ if ( sizeof($a)>1 and !isset ($_POST['cat']))
|
|||
echo "Choix catégories fiche";
|
||||
echo '<FORM METHOD="POST" ACTION="'.$_SERVER['REQUEST_URI'].'">';
|
||||
foreach ($a as $element) {
|
||||
$fiche_def=new fiche_def($cn,$element);
|
||||
$fiche_def->Get();
|
||||
$name=$fiche_def->label;
|
||||
printf('<INPUT TYPE="RADIO" NAME="cat" value="%s">%s<br>',
|
||||
$element,GetFicheDefName($cn,$element));
|
||||
$element,$name);
|
||||
|
||||
}
|
||||
echo '<INPUT TYPE="SUBMIT" value="Choisir">';
|
||||
|
|
|
|||
|
|
@ -99,7 +99,7 @@ $e_fic_search=(isset ($_POST['fic_search']))?$_POST['fic_search']:"";
|
|||
$r.="<FORM METHOD=\"POST\" ACTION=\"".$_SERVER['REQUEST_URI']."\">";
|
||||
$r.="Recherche : ".'<INPUT TYPE="TEXT" NAME="fic_search" VALUE="'.$e_fic_search.'">';
|
||||
$r.='<INPUT TYPE="submit" name="search" value="Go">';
|
||||
//$r.="</FORM>";
|
||||
|
||||
$r.="<div>";
|
||||
echo $r;
|
||||
$r="";
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ BODY {
|
|||
<script src="scripts.js" type="text/javascript"></script>
|
||||
</head>
|
||||
<BODY onLoad="SetFocus(\'login\',0)">
|
||||
Version 2.0.7cvs
|
||||
Version dev-dany
|
||||
<div class="remark">
|
||||
<p class="gras">Il est conseillé de ne PAS utiliser Internet Explorer.
|
||||
</p><p>
|
||||
|
|
|
|||
|
|
@ -1,95 +0,0 @@
|
|||
<?
|
||||
/*
|
||||
* This file is part of PhpCompta.
|
||||
*
|
||||
* PhpCompta is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* PhpCompta is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with PhpCompta; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
// Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
|
||||
/* $Revision$ */
|
||||
/*! \file
|
||||
* \brief Show the detail of a operation in a popup windows
|
||||
*/
|
||||
|
||||
include_once ("ac_common.php");
|
||||
include_once ("poste.php");
|
||||
include_once ("user_common.php");
|
||||
html_page_start($_SESSION['g_theme']);
|
||||
if ( ! isset ( $_SESSION['g_dossier'] ) ) {
|
||||
echo "You must choose a Dossier ";
|
||||
exit -2;
|
||||
}
|
||||
include_once ("postgres.php");
|
||||
include_once("jrn.php");
|
||||
/* Admin. Dossier */
|
||||
$rep=DbConnect();
|
||||
include_once ("class_user.php");
|
||||
$User=new cl_user($rep);
|
||||
$User->Check();
|
||||
|
||||
if ( isset( $_GET['$p_jrn'] )) {
|
||||
$p_jrn=$_GE['p_jrn'];
|
||||
$_SESSION[ "p_jrn"]=$p_jrn;
|
||||
|
||||
}
|
||||
$cn=DbConnect($_SESSION['g_dossier']);
|
||||
$jrn_op=$_GET['jrn_op'];
|
||||
list ($l_array,$max_deb,$max_cred)=GetData($cn,$jrn_op);
|
||||
foreach ($l_array as $key=>$element) {
|
||||
${"e_$key"}=$element;
|
||||
echo_debug('jrn_op_detail.php',__LINE__,"jrn_op_detail.php e_$key =$element");
|
||||
}
|
||||
|
||||
echo '<div align="center"> Opération </div>';
|
||||
|
||||
echo 'Date : '.$e_op_date;
|
||||
echo '<div style="border-style:solid;border-width:1pt;">';
|
||||
echo $e_comment;
|
||||
echo '</DIV>';
|
||||
|
||||
if ( isset ($e_ech) ) {
|
||||
echo "<DIV> Echeance $e_ech </DIV>";
|
||||
}
|
||||
echo '<div style="background-color:#BFC2D5;">';
|
||||
|
||||
for ( $i = 0; $i < $max_deb;$i++) {
|
||||
$lib=GetPosteLibelle($_SESSION['g_dossier'],${"e_class_deb$i"});
|
||||
echo ${"e_class_deb$i"}." $lib "."<B>".${"e_mont_deb$i"}."</B>.<br>";
|
||||
|
||||
}
|
||||
echo "</div>";
|
||||
echo '<div style="background-color:#E8F4FF;margin-left:50px;">';
|
||||
for ( $i = 0; $i < $max_cred;$i++) {
|
||||
$lib=GetPosteLibelle($_SESSION['g_dossier'],${"e_class_cred$i"});
|
||||
|
||||
echo ${"e_class_cred$i"}." $lib "."<B>".${"e_mont_cred$i"}."</B><br>";
|
||||
}
|
||||
echo '</div>';
|
||||
|
||||
$a=GetConcerned($cn,$e_jr_id);
|
||||
|
||||
if ( $a != null ) {
|
||||
echo "operation concernée <br>";
|
||||
echo '<div style="margin-left:30px;">';
|
||||
foreach ($a as $key => $element) {
|
||||
|
||||
echo "<A class=\"detail\" HREF=\"jrn_op_detail.php?jrn_op=".GetGrpt($cn,$element)."\"> ".GetInternal($cn,$element)."</A>";
|
||||
}//for
|
||||
echo "</div>";
|
||||
}// if ( $a != null ) {
|
||||
?>
|
||||
<input type="button" onClick="window.close()" value="Fermer">
|
||||
<?
|
||||
html_page_stop();
|
||||
?>
|
||||
|
|
@ -33,6 +33,7 @@ $User->Check();
|
|||
|
||||
|
||||
html_page_start($User->theme,"onLoad='window.focus();'");
|
||||
|
||||
if ( ! isset ( $_SESSION['g_dossier'] ) ) {
|
||||
echo "You must choose a Dossier ";
|
||||
phpinfo();
|
||||
|
|
@ -68,24 +69,26 @@ if ( isset ($_GET["search"]) ) {
|
|||
echo_debug('jrn_search.php',__LINE__,"$key = $element");
|
||||
${"$key"}=$element;
|
||||
}
|
||||
|
||||
if ( strlen(trim($p_comment)) != 0 ) {
|
||||
$c_comment="";
|
||||
if ( isset ($p_comment) && strlen(trim($p_comment)) != 0 ) {
|
||||
$c_comment=" $part upper(jr_comment) like upper('%$p_comment%')";
|
||||
$part=" and ";
|
||||
}
|
||||
if ( strlen($p_montant) != 0 && (ereg ("^[0-9]*\.[0-9]*$",$p_montant) ||
|
||||
$c_montant="";
|
||||
if ( isset ($p_montant) && strlen($p_montant) != 0 && (ereg ("^[0-9]*\.[0-9]*$",$p_montant) ||
|
||||
ereg ("^[0-9]*$",$p_montant)) )
|
||||
{
|
||||
$c_montant=sprintf(" $part jr_montant %s %s",$p_montant_sel,$p_montant);
|
||||
$opt_montant.='<OPTION VALUE="'.$p_montant_sel.'" SELECTED>'.$p_montant_sel;
|
||||
$part=" and ";
|
||||
}
|
||||
if ( strlen(trim($p_date)) != 0 ) {
|
||||
if ( isset ($p_date) && strlen(trim($p_date)) != 0 ) {
|
||||
$c_date=sprintf(" $part j_date %s to_date('%s','DD.MM.YYYY')",$p_date_sel,$p_date);
|
||||
$part=" and ";
|
||||
$opt_date.='<OPTION VALUE="'.$p_date_sel.'" SELECTED>'.$p_date_sel;
|
||||
}
|
||||
if ( strlen(trim($p_internal)) != 0 ) {
|
||||
$c_internal="";
|
||||
if ( isset($p_internal) && strlen(trim($p_internal)) != 0 ) {
|
||||
$c_internal=$part." jr_internal like ('%".$p_internal."%')";
|
||||
$part=" and ";
|
||||
|
||||
|
|
|
|||
|
|
@ -19,15 +19,12 @@
|
|||
|
||||
// Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
|
||||
|
||||
/* !\file
|
||||
*/
|
||||
|
||||
/* \brief This file show a little online calculator, in the caller
|
||||
/*! \file
|
||||
* \brief This file show a little online calculator, in the caller
|
||||
* the span id result, listing, the id form calc_line and the
|
||||
* input id inp must exist see constant.php JS_CALC_LINE
|
||||
*
|
||||
*/
|
||||
|
||||
var str="";
|
||||
var val="";
|
||||
var counter=0;
|
||||
|
|
@ -115,4 +112,4 @@ function Compute()
|
|||
this.document.getElementById('inp').value="";
|
||||
this.document.getElementById('result').innerHTML=ret;
|
||||
this.document.getElementById('inp').focus();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
34
html/js/cancel_op.js
Normal file
34
html/js/cancel_op.js
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
/*
|
||||
* This file is part of PhpCompta.
|
||||
*
|
||||
* PhpCompta is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* PhpCompta is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with PhpCompta; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
/* $Revision$ */
|
||||
|
||||
// Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
|
||||
|
||||
/*! \file
|
||||
* \brief
|
||||
* open a windows to confirm and cancel an operation
|
||||
*/
|
||||
|
||||
|
||||
function cancelOperation(p_value,p_sessid,p_jrn)
|
||||
{
|
||||
var win=window.open('annulation.php?p_jrn='+p_jrn+'&jrn_op='+p_value+'&PHPSESSID='+p_sessid,'Annule','toolbar=no,width=400,height=400,scrollbars=yes,resizable=yes');
|
||||
}
|
||||
function RefreshMe() {
|
||||
window.location.reload();
|
||||
}
|
||||
81
html/js/jrn_concerned.js
Normal file
81
html/js/jrn_concerned.js
Normal file
|
|
@ -0,0 +1,81 @@
|
|||
/*
|
||||
* This file is part of PhpCompta.
|
||||
*
|
||||
* PhpCompta is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* PhpCompta is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with PhpCompta; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
/* $Revision$ */
|
||||
|
||||
// Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
|
||||
|
||||
/*! \file
|
||||
* \brief
|
||||
* open a windows for searching the concerned operation
|
||||
*/
|
||||
|
||||
/*! \brief this function search into the ledger
|
||||
* \param p_sessid PHPSESSID
|
||||
* \param p_ctl ctl name
|
||||
* \param p_montant amount to search (if 0 get it from the e_other_amount
|
||||
*/
|
||||
function SearchJrn(p_sessid,p_ctl,p_montant)
|
||||
{
|
||||
var url='jrn_search.php?p_ctl='+p_ctl+'&PHPSESSID='+p_sessid;
|
||||
|
||||
|
||||
if ( p_montant == 0 ) {
|
||||
// compute amount name replace the number
|
||||
num=p_ctl.replace("e_concerned","");
|
||||
|
||||
/* Get the amount */
|
||||
var ctl_montant_name="e_other"+num+"_amount";
|
||||
for ( i=0; i < document.forms[0].length; i++)
|
||||
{
|
||||
var e=document.forms[0].elements[i];
|
||||
if ( e.name == ctl_montant_name ) {
|
||||
p_montant=e.value;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if ( p_montant == 0 ) {
|
||||
var win=window.open(url,'Cherche','toolbar=no,width=600,height=600,scrollbars=yes');
|
||||
|
||||
} else {
|
||||
var win=window.open(url+'&search&p_montant='+p_montant+'&p_montant_sel=%3D','Cherche','toolbar=no,width=600,height=600,scrollbars=yes');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function GetIt(p_ctl,p_value) {
|
||||
self.opener.SetIt(p_value,p_ctl);
|
||||
window.close();
|
||||
}
|
||||
|
||||
|
||||
/* SetValue( p_ctl,p_value )
|
||||
/* p_ctl is the name of the control
|
||||
/* p_value is the value to set in
|
||||
*/
|
||||
function SetIt(p_value,p_ctl) {
|
||||
var f=document.getElementsByName(p_ctl);
|
||||
for (var h=0; h < f.length; h++) {
|
||||
f[h].value=p_value;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
36
html/js/modify_op.js
Normal file
36
html/js/modify_op.js
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
/*
|
||||
* This file is part of PhpCompta.
|
||||
*
|
||||
* PhpCompta is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* PhpCompta is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with PhpCompta; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
/* $Revision$ */
|
||||
|
||||
// Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
|
||||
|
||||
/*! \file
|
||||
* \brief
|
||||
* open a windows for modifying a operation
|
||||
*/
|
||||
|
||||
function modifyOperation(p_value,p_sessid,p_jrn)
|
||||
{
|
||||
var win=window.open('modify_op.php?action=update&p_jrn='+p_jrn+'&line='+p_value+'&PHPSESSID='+p_sessid,'Modifie','toolbar=no,width=500,height=400,scrollbars=yes,resizable=yes');
|
||||
}
|
||||
function RefreshMe() {
|
||||
window.location.reload();
|
||||
}
|
||||
function dropLink(p_value,p_value2,p_sessid) {
|
||||
var win=window.open('modify_op.php?action=delete&line='+p_value+'&line2='+p_value2+'&PHPSESSID='+p_sessid,'Liaison','toolbar=no,width=500,height=400,scrollbars=yes,resizable=yes');
|
||||
}
|
||||
110
html/js/search_card.js
Normal file
110
html/js/search_card.js
Normal file
|
|
@ -0,0 +1,110 @@
|
|||
/*
|
||||
* This file is part of PhpCompta.
|
||||
*
|
||||
* PhpCompta is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* PhpCompta is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with PhpCompta; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
/* $Revision$ */
|
||||
|
||||
// Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
|
||||
|
||||
/*! \file
|
||||
* \brief
|
||||
* open a windows for searching a card
|
||||
*/
|
||||
|
||||
function showfiche(p_sessid,qcode)
|
||||
{
|
||||
var a=window.open('show_fiche.php?PHPSESSID='+p_sessid+'&q='+qcode,'','toolbar=no,width=350,height=450,scrollbar=yes');
|
||||
|
||||
}
|
||||
|
||||
/* type must be cred or deb and name is
|
||||
* the control's name
|
||||
*/
|
||||
function SearchCard(p_sessid,type,name,jrn)
|
||||
{
|
||||
var a=window.open('fiche_search.php?p_jrn='+jrn+'&PHPSESSID='+p_sessid+'&type='+type+'&name='+name,'item','toolbar=no,width=350,height=450,scrollbars=yes');
|
||||
}
|
||||
function NewCard(p_sessid,type,name,jrn)
|
||||
{
|
||||
var a=window.open('fiche_new.php?p_jrn='+jrn+'&PHPSESSID='+p_sessid+'&type='+type+'&name='+name,'item','toolbar=no,width=350,height=450,scrollbars=yes');
|
||||
}
|
||||
/* SetValue( p_ctl,p_value )
|
||||
/* p_ctl is the name of the control
|
||||
/* p_value is the value to set in
|
||||
*/
|
||||
function SetValue(p_ctl,p_value)
|
||||
{
|
||||
|
||||
var f=document.getElementsByName(p_ctl);
|
||||
for (var h=0; h < f.length; h++) {
|
||||
f[h].value=p_value;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
/* Parameters
|
||||
* i = ctl _name
|
||||
* p_id = code id (fiche.f_id)
|
||||
*¨p_label = label
|
||||
* p_sell vw_fiche_attr.vw_sell
|
||||
* p_buy vw_fiche_attr.vw_buy
|
||||
* p_tva_id vw_fiche_attr.tva_id
|
||||
* p_tva_label vw_fiche_attr.tva_label
|
||||
*/
|
||||
function SetData(i,p_id,p_label,p_sell,p_buy,p_tva_id, p_tva_label)
|
||||
{
|
||||
SetValue(i,p_id);
|
||||
// for the form we use 1. and for span 2.
|
||||
//1. document.form_detail.eval(a).value=p_buy;
|
||||
//2. document.getElementById(a).innerHTML=p_sell;
|
||||
|
||||
// Compute name of label ctl
|
||||
var a=i+'_label';
|
||||
document.getElementById(a).innerHTML=p_label;
|
||||
|
||||
// Compute name of sell ctl
|
||||
var a=i+'_sell';
|
||||
// if the object exist
|
||||
var e=document.getElementsByName(a)
|
||||
if ( e.length != 0 ) {
|
||||
SetValue(a,p_sell);
|
||||
|
||||
}
|
||||
|
||||
// Compute name of buy ctl
|
||||
var a=i+'_buy';
|
||||
// if the object exist
|
||||
var e=document.getElementsByName(a)
|
||||
if ( e.length != 0 ) {
|
||||
SetValue(a,p_buy);
|
||||
}
|
||||
// Compute name of tva_id ctl
|
||||
var a=i+'_tva_id';
|
||||
// if the object exist
|
||||
var e=document.getElementsByName(a)
|
||||
if ( e.length != 0 ) {
|
||||
SetValue(a,p_tva_id);
|
||||
}
|
||||
|
||||
// Compute name of tva_label ctl
|
||||
var a=i+'_tva_label';
|
||||
// if the object exist
|
||||
if (document.getElementById(a) ) {
|
||||
document.getElementById(a).innerHTML=p_tva_label;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
63
html/js/search_poste.js
Normal file
63
html/js/search_poste.js
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
/*
|
||||
* This file is part of PhpCompta.
|
||||
*
|
||||
* PhpCompta is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* PhpCompta is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with PhpCompta; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
/* $Revision$ */
|
||||
|
||||
// Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
|
||||
|
||||
/*! \file
|
||||
* \brief
|
||||
* open a windows for searching an account (poste comptable)
|
||||
*/
|
||||
|
||||
function SearchPoste(p_sessid,p_ctl,p_jrn)
|
||||
{
|
||||
var win=window.open('poste_search.php?p_jrn='+p_jrn+'&p_ctl='+p_ctl+'&PHPSESSID='+p_sessid,'Cherche','toolbar=no,width=600,height=600,scrollbars=yes,resizable=yes');
|
||||
}
|
||||
function SearchPosteFilter(p_sessid,p_ctl,p_filter,jrn)
|
||||
{
|
||||
var win=window.open('poste_search.php?p_jrn='+jrn+'&p_ctl='+p_ctl+'&PHPSESSID='+p_sessid+'&filter='+p_filter,'Cherche','toolbar=no,width=600,height=600,scrollbars=yes,resizable=yes');
|
||||
}
|
||||
function GetIt() {
|
||||
window.close();
|
||||
}
|
||||
function SetItChild(p_ctl,p_value) {
|
||||
self.opener.SetItParent(p_ctl,p_value);
|
||||
window.close();
|
||||
}
|
||||
function SetItParent(p_ctl,p_value) {
|
||||
|
||||
var f=document.getElementsByName(p_ctl);
|
||||
for (var h=0; h < f.length; h++) {
|
||||
f[h].value=p_value;
|
||||
}
|
||||
|
||||
}
|
||||
/* SetValue( p_ctl,p_value )
|
||||
/* p_ctl is the name of the control
|
||||
/* p_value is the value to set in
|
||||
*/
|
||||
function SetValue(p_ctl,p_value)
|
||||
{
|
||||
|
||||
var f=document.getElementsByName(p_ctl);
|
||||
for (var h=0; h < f.length; h++) {
|
||||
f[h].value=p_value;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
36
html/js/update_pcmn.js
Normal file
36
html/js/update_pcmn.js
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
/*
|
||||
* This file is part of PhpCompta.
|
||||
*
|
||||
* PhpCompta is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* PhpCompta is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with PhpCompta; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
/* $Revision$ */
|
||||
|
||||
// Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
|
||||
|
||||
/*! \file
|
||||
* \brief Open a window to update the pcmn
|
||||
*
|
||||
*/
|
||||
|
||||
function PcmnUpdate(p_value,p_lib,p_parent,p_sessid)
|
||||
{
|
||||
var win=window.open('line_update.php?l='+p_value+'&n='+p_lib+'&p='+p_parent+'&PHPSESSID='+p_sessid,'Modifie','toolbar=no,width=500,height=400,scrollbars=yes,resizable=yes');
|
||||
}
|
||||
|
||||
function RefreshMe() {
|
||||
window.location.reload();
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -20,8 +20,8 @@
|
|||
/*! \file
|
||||
* \brief Logout
|
||||
*/
|
||||
include ("ac_common.php");
|
||||
include ("postgres.php");
|
||||
require_once ("ac_common.php");
|
||||
require_once ("postgres.php");
|
||||
|
||||
html_page_start("classic");
|
||||
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ if ( $action == 'update' ) {
|
|||
// p_id is jrn.jr_id
|
||||
$p_id=$_GET["line"];
|
||||
echo_debug('modify_op.php',__LINE__," action = update p_id = $p_id");
|
||||
echo JS_VIEW_JRN_DETAIL;
|
||||
|
||||
echo JS_CONCERNED_OP;
|
||||
$r ='<FORM METHOD="POST" enctype="multipart/form-data" ACTION="modify_op.php">';
|
||||
$r.=UpdateJrn($cn,$p_id);
|
||||
|
|
@ -90,7 +90,7 @@ if ( $action == 'update' ) {
|
|||
$r.="<br>";
|
||||
$r.='<input type="SUBMIT" name="update_record" value="Enregistre">';
|
||||
$r.=" ";
|
||||
$r.='<input type="button" value="Fermer" onClick="window.close();">';
|
||||
$r.='<input type="button" value="Fermer" onClick="window.close(); self.opener.RefreshMe();">';
|
||||
$r.='</FORM>';
|
||||
|
||||
// echo '<div class="redcontent">';
|
||||
|
|
|
|||
|
|
@ -64,5 +64,10 @@ if ( ereg("\.\.\/include",ini_get('include_path')) == false )
|
|||
print 'include_path : ok ('.ini_get('include_path').')<br>';
|
||||
|
||||
echo "<h2 class=\"info\"> Congratulation : Test successfull</h2>";
|
||||
|
||||
?>
|
||||
<script type="text/javascript" language="javascript" src="js/jrn_concerned.js">
|
||||
alert("Include me");
|
||||
SearchJrn('a','b');
|
||||
</script>
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@
|
|||
include_once("debug.php");
|
||||
include_once("constant.php");
|
||||
require_once('preference.php');
|
||||
require_once ("postgres.php");
|
||||
/*!
|
||||
* \brief log error into the /tmp/phpcompta_error.log it doesn't work on windows
|
||||
*
|
||||
|
|
@ -139,7 +140,7 @@ function formatDate($p_date) {
|
|||
*/
|
||||
function html_page_start($p_theme="",$p_script="",$p_script2="")
|
||||
{
|
||||
include_once ("postgres.php");
|
||||
|
||||
ini_set('magic_quotes_gpc','Off');
|
||||
|
||||
$cn=DbConnect();
|
||||
|
|
@ -419,6 +420,14 @@ function sql_filter_per($p_cn,$p_from,$p_to,$p_form='p_id',$p_field='jr_tech_per
|
|||
|
||||
return $periode;
|
||||
}
|
||||
|
||||
/* !\brief return the label of the tva_id
|
||||
* \param $p_cn database connx
|
||||
* \param $p_tva_id tva_id
|
||||
*/
|
||||
function tva_get_label($p_cn,$p_tva_id)
|
||||
{
|
||||
$a=getDbValue($p_cn,"select tva_label from tva_rate where tva_id='".$p_tva_id."'");
|
||||
return $a;
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -103,7 +103,7 @@ attr_value using (jft_id) where av_text='".$this->company."' and ad_id=".ATTR_DE
|
|||
}// if
|
||||
}//foreach
|
||||
}// if
|
||||
|
||||
$back_url=urlencode($_SERVER['REQUEST_URI']);
|
||||
if ( sizeof ($step_contact ) == 0 )
|
||||
return $r;
|
||||
echo JS_SEARCH_CARD;
|
||||
|
|
@ -129,7 +129,8 @@ attr_value using (jft_id) where av_text='".$this->company."' and ad_id=".ATTR_DE
|
|||
$r.="<TD>".$contact->strAttribut(ATTR_DEF_TEL)."</TD>";
|
||||
$r.="<TD>".$contact->strAttribut(ATTR_DEF_EMAIL)."</TD>".
|
||||
"<TD> ".$contact->strAttribut(ATTR_DEF_FAX)."</TD>".
|
||||
"<TD> ".$l_company_name. "</TD>";
|
||||
"<TD> ".$l_company_name. "</TD>".
|
||||
'<TD> <A href="?p_action=suivi_courrier&qcode_query='.$contact->strAttribut(ATTR_DEF_QUICKCODE).'&url='.$back_url.'">Courrier</A></TD>';
|
||||
|
||||
$r.="</TR>";
|
||||
|
||||
|
|
|
|||
|
|
@ -19,128 +19,16 @@
|
|||
/* $Revision$ */
|
||||
// Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
|
||||
include_once("class_attribut.php");
|
||||
require_once('class_fiche_def.php');
|
||||
require_once('class_widget.php');
|
||||
/*! \file
|
||||
* \brief define Class fiche and fiche def, those class are using
|
||||
* \brief define Class fiche, this class are using
|
||||
* class attribut
|
||||
*/
|
||||
/*!
|
||||
* \brief define Class fiche and fiche def, those class are using
|
||||
* class attribut
|
||||
*/
|
||||
class fiche_def {
|
||||
var $cn; // database connection
|
||||
var $id; // id (fiche_def.fd_id
|
||||
var $label; // fiche_def.fd_label
|
||||
var $class_base; // fiche_def.fd_class_base
|
||||
var $fiche_def; // fiche_def.frd_id = fiche_def_ref.frd_id
|
||||
var $create_account; // fd_create_account: flag
|
||||
var $all;
|
||||
var $attribut; // get from attr_xxx tables
|
||||
function fiche_def($p_cn,$p_id = 0) {
|
||||
$this->cn=$p_cn;
|
||||
$this->id=$p_id;
|
||||
}
|
||||
|
||||
/*!
|
||||
**************************************************
|
||||
* \brief Get attribut of a fiche_def
|
||||
*
|
||||
* \return string value of the attribute
|
||||
* none
|
||||
*/
|
||||
function GetAttribut() {
|
||||
$sql="select * from jnt_fic_attr ".
|
||||
" natural join attr_def where fd_id=".$this->id.
|
||||
" order by ad_id";
|
||||
|
||||
$Ret=ExecSql($this->cn,$sql);
|
||||
|
||||
if ( ($Max=pg_NumRows($Ret)) == 0 )
|
||||
return ;
|
||||
for ($i=0;$i < $Max;$i++) {
|
||||
$row=pg_fetch_array($Ret,$i);
|
||||
$t = new Attribut($row['ad_id']);
|
||||
$t->ad_text=$row['ad_text'];
|
||||
$this->attribut[$i]=$t;
|
||||
}
|
||||
return $this->attribut;
|
||||
}
|
||||
|
||||
/*!
|
||||
**************************************************
|
||||
* \brief Get attribut of the fiche_def
|
||||
*
|
||||
*/
|
||||
function Get() {
|
||||
if ( $this->id == 0 )
|
||||
return 0;
|
||||
$sql="select * from fiche_def ".
|
||||
" where fd_id=".$this->id;
|
||||
$Ret=ExecSql($this->cn,$sql);
|
||||
if ( ($Max=pg_NumRows($Ret)) == 0 )
|
||||
return ;
|
||||
$row=pg_fetch_array($Ret,0);
|
||||
$this->label=$row['fd_label'];
|
||||
$this->class_base=$row['fd_class_base'];
|
||||
$this->fiche_def=$row['frd_id'];
|
||||
$this->create_account=$row['fd_create_account'];
|
||||
}
|
||||
/*!
|
||||
**************************************************
|
||||
* \brief Get all the fiche_def
|
||||
*
|
||||
* \return an array of fiche_def object
|
||||
*/
|
||||
function GetAll() {
|
||||
$sql="select * from fiche_def ";
|
||||
|
||||
$Ret=ExecSql($this->cn,$sql);
|
||||
if ( ($Max=pg_NumRows($Ret)) == 0 )
|
||||
return ;
|
||||
|
||||
for ( $i = 0; $i < $Max;$i++) {
|
||||
$row=pg_fetch_array($Ret,$i);
|
||||
$this->all[$i]=new fiche_def($this->cn,$row['fd_id']);
|
||||
$this->all[$i]->label=$row['fd_label'];
|
||||
$this->all[$i]->class_base=$row['fd_class_base'];
|
||||
$this->all[$i]->fiche_def=$row['frd_id'];
|
||||
$this->all[$i]->create_account=$row['fd_create_account'];
|
||||
}
|
||||
}
|
||||
/*!
|
||||
**************************************************
|
||||
* \brief Check in vw_fiche_def if a fiche has
|
||||
* a attribut X
|
||||
*
|
||||
*
|
||||
* \param $p_attr attribut to check
|
||||
* \return true or false
|
||||
*/
|
||||
function HasAttribute($p_attr) {
|
||||
return (CountSql($this->cn,"select * from vw_fiche_def where ad_id=$p_attr and fd_id=".$this->id)>0)?true:false;
|
||||
|
||||
}
|
||||
/*!
|
||||
**************************************************
|
||||
* \brief Display a fiche_def object into a table
|
||||
*
|
||||
* \return HTML row
|
||||
*/
|
||||
function Display()
|
||||
{
|
||||
|
||||
$r=sprintf("<TD>%s</TD>",$this->id);
|
||||
$r.=sprintf("<TD>%s</TD>",$this->label);
|
||||
$r.=sprintf("<TD>%s</TD>",$this->class_base);
|
||||
$r.=sprintf("<TD>%s</TD>",$this->fiche_def);
|
||||
return $r;
|
||||
}
|
||||
|
||||
}
|
||||
/*!
|
||||
* \brief define Class fiche and fiche def, those class are using
|
||||
* class attribut
|
||||
*/
|
||||
|
||||
//-----------------------------------------------------
|
||||
// class fiche
|
||||
|
|
@ -251,33 +139,6 @@ class fiche {
|
|||
}
|
||||
|
||||
|
||||
/*!
|
||||
* \brief Get all the card where the fiche_def.fd_id is given in parameter
|
||||
* \param $p_fd_id = fiche_def.fd_id
|
||||
*
|
||||
* \return double array (f_id,fd_id)
|
||||
*/
|
||||
function GetByType($p_fd_id) {
|
||||
$sql="select *
|
||||
from
|
||||
fiche
|
||||
where fd_id=".$p_fd_id;
|
||||
|
||||
|
||||
$Ret=ExecSql($this->cn,$sql);
|
||||
if ( ($Max=pg_NumRows($Ret)) == 0 )
|
||||
return ;
|
||||
$all[0]=new fiche($this->cn);
|
||||
|
||||
for ($i=0;$i<$Max;$i++) {
|
||||
$row=pg_fetch_array($Ret,$i);
|
||||
$t=new fiche($this->cn,$row['f_id']);
|
||||
$t->getAttribut();
|
||||
$all[$i]=$t;
|
||||
|
||||
}
|
||||
return $all;
|
||||
}
|
||||
/*!
|
||||
**************************************************
|
||||
* \brief Return array of card from the frd family
|
||||
|
|
@ -420,8 +281,9 @@ class fiche {
|
|||
}
|
||||
elseif ( $attr->ad_id == ATTR_DEF_TVA)
|
||||
{
|
||||
$r.=JS_TVA;
|
||||
$r.=JS_SHOW_TVA;
|
||||
$w=new widget("js_tva");
|
||||
|
||||
}
|
||||
elseif ( $attr->ad_id == ATTR_DEF_COMPANY )
|
||||
{
|
||||
|
|
@ -653,12 +515,23 @@ class fiche {
|
|||
$sql=" select jft_id from jnt_fic_att_value where ad_id=$id and f_id=$this->id";
|
||||
$Ret=ExecSql($this->cn,$sql);
|
||||
if ( pg_NumRows($Ret) != 1 ) {
|
||||
echo_error ("class_fiche ".__LINE__." INVALID ID !!! ");
|
||||
return;
|
||||
}
|
||||
$tmp=pg_fetch_array($Ret,0);
|
||||
$jft_id=$tmp['jft_id'];
|
||||
|
||||
// we need to insert this new attribut
|
||||
echo_debug ("class_fiche ".__LINE__." adding id !!! ");
|
||||
$jft_id=NextSequence($this->cn,'s_jnt_fic_att_value');
|
||||
|
||||
$sql2=sprintf("insert into jnt_fic_att_value(jft_id,ad_id,f_id) values (%s,%s,%s)",
|
||||
$jft_id,$id,$this->id);
|
||||
|
||||
$ret2=ExecSql($this->cn,$sql2);
|
||||
// insert a null value for this attribut
|
||||
$sql3=sprintf("insert into attr_value(jft_id,av_text) values (%s,null)",
|
||||
$jft_id);
|
||||
$ret3=ExecSql($this->cn,$sql3);
|
||||
} else
|
||||
{
|
||||
$tmp=pg_fetch_array($Ret,0);
|
||||
$jft_id=$tmp['jft_id'];
|
||||
}
|
||||
// Special traitement
|
||||
// quickcode
|
||||
if ( $id == ATTR_DEF_QUICKCODE)
|
||||
|
|
@ -739,20 +612,41 @@ class fiche {
|
|||
{
|
||||
if ( $this->id==0 ) return;
|
||||
// verify if that card has not been used is a ledger
|
||||
$sql="select fiche_used(".$this->id.") as result";
|
||||
$Res=ExecSql($this->cn,$sql);
|
||||
// if the card has its own account in PCMN
|
||||
// Get the fiche_def.fd_id from fiche.f_id
|
||||
$this->Get();
|
||||
$fiche_def=new fiche_def($this->cn,$this->fiche_def);
|
||||
$fiche_def->Get();
|
||||
|
||||
if ( $fiche_def->create_account=='t' ) {
|
||||
// Retrieve the 'poste comptable'
|
||||
$class=$this->strAttribut(ATTR_DEF_ACCOUNT);
|
||||
|
||||
// if class is not NULL and if we use it before, we can't remove it
|
||||
if (FormatString($class) != null &&
|
||||
CountSql($this->cn,"select * from jrnx where j_poste=$class") != 0 ) {
|
||||
echo "<SCRIPT> alert('Impossible ce poste est utilisé dans un journal'); </SCRIPT>";
|
||||
return;
|
||||
} else {
|
||||
// Remove in PCMN
|
||||
if ( trim(strlen($class)) != 0 and isNumber($class) == 1)
|
||||
ExecSql($this->cn,"delete from tmp_pcmn where pcm_val=".$class);
|
||||
}
|
||||
|
||||
}
|
||||
// Remove from attr_value
|
||||
$Res=ExecSql($this->cn,"delete from attr_value
|
||||
where jft_id in (select jft_id
|
||||
from jnt_fic_att_value
|
||||
natural join fiche where f_id=".$this->id.")");
|
||||
// Remove from jnt_fic_att_value
|
||||
$Res=ExecSql($this->cn,"delete from jnt_fic_att_value where f_id=".$this->id);
|
||||
|
||||
// fetch the result
|
||||
list($result)=pg_fetch_row($Res,0);
|
||||
|
||||
if ( $result == 0 )
|
||||
{
|
||||
$sql="select fiche_delete (".$this->id.")";
|
||||
$Res=ExecSql($this->cn,$sql);
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
// Remove from fiche
|
||||
$Res=ExecSql($this->cn,"delete from fiche where f_id=".$this->id);
|
||||
}
|
||||
|
||||
|
||||
/*!\brief return the name of a card
|
||||
*/
|
||||
function getName()
|
||||
|
|
@ -781,5 +675,7 @@ class fiche {
|
|||
{
|
||||
return fiche::GetByDef($this->fiche_def_ref,$p_offset,$p_search);
|
||||
}
|
||||
/*!\brief list all the cards from
|
||||
*/
|
||||
}
|
||||
?>
|
||||
|
|
@ -18,125 +18,418 @@
|
|||
*/
|
||||
/* $Revision$ */
|
||||
// Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
|
||||
include_once("class_attribut.php");
|
||||
require_once('class_fiche_def_ref.php');
|
||||
require_once('class_fiche.php');
|
||||
require_once('user_common.php');
|
||||
|
||||
/*! \file
|
||||
* \brief fiche_def_ref, a fiche is owned by fiche_def which is owned by
|
||||
* fiche_def_ref
|
||||
* \brief define Class fiche and fiche def, those class are using
|
||||
* class attribut
|
||||
*/
|
||||
/*!
|
||||
* \brief fiche_def_ref, a fiche is owned by fiche_def which is owned by
|
||||
* fiche_def_ref
|
||||
/*!
|
||||
* \brief define Class fiche and fiche def, those class are using
|
||||
* class attribut
|
||||
*/
|
||||
class fiche_def {
|
||||
var $cn; // database connection
|
||||
var $id; // id (fiche_def.fd_id
|
||||
var $label; // fiche_def.fd_label
|
||||
var $class_base; // fiche_def.fd_class_base
|
||||
var $fiche_def; // fiche_def.frd_id = fiche_def_ref.frd_id
|
||||
var $create_account; // fd_create_account: flag
|
||||
var $all;
|
||||
var $attribut; // get from attr_xxx tables
|
||||
function fiche_def($p_cn,$p_id = 0) {
|
||||
$this->cn=$p_cn;
|
||||
$this->id=$p_id;
|
||||
}
|
||||
|
||||
class fiche_def_ref
|
||||
{
|
||||
var $frd_id; /*! \enum $frd_id fiche_def_ref.frd_id */
|
||||
var $frd_text; /*! \enum $frd_text fiche_def_ref.frd_tex */
|
||||
var $frd_class_base; /*! \enum fiche_def_ref.frd_class_base */
|
||||
var $attribut; /*! \enum array which containing list of attr */
|
||||
/* it is used with dynamic variables */
|
||||
|
||||
function fiche_def_ref($p_cn,$p_frd_id=-1)
|
||||
{
|
||||
$this->db=$p_cn;
|
||||
$this->frd_id=$p_frd_id;
|
||||
$this->attribut=array('frd_id','frd_text','frd_class_base');
|
||||
}
|
||||
/*!
|
||||
/*!
|
||||
**************************************************
|
||||
* \brief Load all the fiche_def_ref data and
|
||||
* return an array of fiche_def_ref objects
|
||||
* \brief Get attribut of a fiche_def
|
||||
*
|
||||
* \return array
|
||||
* \return string value of the attribute
|
||||
* none
|
||||
*/
|
||||
function LoadAll()
|
||||
{
|
||||
$sql="select * from fiche_def_ref order by frd_id";
|
||||
$Res=ExecSql($this->db,$sql);
|
||||
$all=pg_fetch_all($Res);
|
||||
if ( $Res == false ) return array();
|
||||
$idx=0;
|
||||
$array=array();
|
||||
foreach ($all as $row)
|
||||
{
|
||||
$o=new fiche_def_ref($this->db);
|
||||
function GetAttribut() {
|
||||
$sql="select * from jnt_fic_attr ".
|
||||
" natural join attr_def where fd_id=".$this->id.
|
||||
" order by ad_id";
|
||||
|
||||
foreach ( $this->attribut as $value)
|
||||
{
|
||||
$o->$value=$row[$value];
|
||||
}
|
||||
$array[$idx]=$o;
|
||||
$idx++;
|
||||
}
|
||||
return $array;
|
||||
$Ret=ExecSql($this->cn,$sql);
|
||||
|
||||
if ( ($Max=pg_NumRows($Ret)) == 0 )
|
||||
return ;
|
||||
for ($i=0;$i < $Max;$i++) {
|
||||
$row=pg_fetch_array($Ret,$i);
|
||||
$t = new Attribut($row['ad_id']);
|
||||
$t->ad_text=$row['ad_text'];
|
||||
$this->attribut[$i]=$t;
|
||||
}
|
||||
/*!
|
||||
return $this->attribut;
|
||||
}
|
||||
|
||||
/*!
|
||||
**************************************************
|
||||
* \brief Display data between <TD> tag
|
||||
* \brief Get attribut of the fiche_def
|
||||
*
|
||||
* \return string
|
||||
*/
|
||||
function Display()
|
||||
function Get() {
|
||||
if ( $this->id == 0 )
|
||||
return 0;
|
||||
$sql="select * from fiche_def ".
|
||||
" where fd_id=".$this->id;
|
||||
$Ret=ExecSql($this->cn,$sql);
|
||||
if ( ($Max=pg_NumRows($Ret)) == 0 )
|
||||
return ;
|
||||
$row=pg_fetch_array($Ret,0);
|
||||
$this->label=$row['fd_label'];
|
||||
$this->class_base=$row['fd_class_base'];
|
||||
$this->fiche_def=$row['frd_id'];
|
||||
$this->create_account=$row['fd_create_account'];
|
||||
}
|
||||
/*!
|
||||
**************************************************
|
||||
* \brief Get all the fiche_def
|
||||
*
|
||||
* \return an array of fiche_def object
|
||||
*/
|
||||
function GetAll() {
|
||||
$sql="select * from fiche_def ";
|
||||
|
||||
$Ret=ExecSql($this->cn,$sql);
|
||||
if ( ($Max=pg_NumRows($Ret)) == 0 )
|
||||
return ;
|
||||
|
||||
for ( $i = 0; $i < $Max;$i++) {
|
||||
$row=pg_fetch_array($Ret,$i);
|
||||
$this->all[$i]=new fiche_def($this->cn,$row['fd_id']);
|
||||
$this->all[$i]->label=$row['fd_label'];
|
||||
$this->all[$i]->class_base=$row['fd_class_base'];
|
||||
$this->all[$i]->fiche_def=$row['frd_id'];
|
||||
$this->all[$i]->create_account=$row['fd_create_account'];
|
||||
}
|
||||
}
|
||||
/*!
|
||||
**************************************************
|
||||
* \brief Check in vw_fiche_def if a fiche has
|
||||
* a attribut X
|
||||
*
|
||||
*
|
||||
* \param $p_attr attribut to check
|
||||
* \return true or false
|
||||
*/
|
||||
function HasAttribute($p_attr) {
|
||||
return (CountSql($this->cn,"select * from vw_fiche_def where ad_id=$p_attr and fd_id=".$this->id)>0)?true:false;
|
||||
|
||||
}
|
||||
/*!
|
||||
**************************************************
|
||||
* \brief Display a fiche_def object into a table
|
||||
*
|
||||
* \return HTML row
|
||||
*/
|
||||
function Display()
|
||||
{
|
||||
|
||||
$r=sprintf("<TD>%s</TD>",$this->id);
|
||||
$r.=sprintf("<TD>%s</TD>",$this->label);
|
||||
$r.=sprintf("<TD>%s</TD>",$this->class_base);
|
||||
$r.=sprintf("<TD>%s</TD>",$this->fiche_def);
|
||||
return $r;
|
||||
}
|
||||
/*!\brief Add a fiche thanks the element from the array
|
||||
* table : insert into fiche_def
|
||||
* insert into attr_def
|
||||
*
|
||||
* \param $array array
|
||||
* index FICHE_REF
|
||||
* nom_mod
|
||||
* class_base
|
||||
*/
|
||||
function Add($array)
|
||||
{
|
||||
echo_debug('class_fiche',__LINE__,"Add Modele");
|
||||
|
||||
// Show what we receive for debug purpose only
|
||||
//
|
||||
|
||||
foreach ( $array as $key=>$element ) {
|
||||
echo_debug('class_fiche',__LINE__,"p_$key $element");
|
||||
${"p_$key"}=$element;
|
||||
}
|
||||
// Format correctly the name of the cat. of card
|
||||
$p_nom_mod=FormatString($p_nom_mod);
|
||||
echo_debug('class_fiche',__LINE__,"Adding $p_nom_mod");
|
||||
// Format the p_class_base
|
||||
// must be an integer
|
||||
if ( isNumber($p_class_base) == 0 && FormatString($p_class_base) != null ) {
|
||||
echo_error ('p_class_base is NOT a number');
|
||||
}
|
||||
// Name can't be empty
|
||||
if ( strlen(trim($p_nom_mod)) == 0 )
|
||||
return;
|
||||
|
||||
// $p_FICHE_REF cannot be null !!! (== fiche_def_ref.frd_id
|
||||
if (! isset ($p_FICHE_REF) or strlen($p_FICHE_REF) == 0 ) {
|
||||
echo_error ("AddModele : fiche_ref MUST NOT be null or empty");
|
||||
return;
|
||||
}
|
||||
$fiche_Def_ref=new fiche_def_ref($this->cn,$p_FICHE_REF);
|
||||
$fiche_Def_ref->Get();
|
||||
// build the sql request for fiche_def
|
||||
// and insert into fiche_def
|
||||
// if p_class_base is null get the default class base from
|
||||
// fiche_def_ref
|
||||
if ( FormatString($p_class_base) == null )
|
||||
{ // p_class is null
|
||||
// So we take the default one
|
||||
$p_class_base=$fiche_Def_ref->frd_class_base;
|
||||
}
|
||||
|
||||
// Set the value of fiche_def.fd_create_account
|
||||
// automatic creation for 'poste comptable'
|
||||
if ( isset($p_create))
|
||||
$p_create='true';
|
||||
else
|
||||
$p_create='false';
|
||||
|
||||
// Class is valid ?
|
||||
if ( FormatString($p_class_base) != null) {
|
||||
|
||||
// p_class is a valid number
|
||||
$sql=sprintf("insert into fiche_def(fd_label,fd_class_base,frd_id,fd_create_account)
|
||||
values ('%s',%s,%d,'%s')",
|
||||
$p_nom_mod,$p_class_base,$p_FICHE_REF,$p_create);
|
||||
$Res=ExecSql($this->cn,$sql);
|
||||
|
||||
// p_class must be added to tmp_pcmn
|
||||
$sql=sprintf("select account_add(%d,'%s')",
|
||||
$p_class_base,$p_nom_mod);
|
||||
|
||||
$Res=ExecSql($this->cn,$sql);
|
||||
|
||||
// Get the fd_id
|
||||
$fd_id=GetSequence($this->cn,'s_fdef');
|
||||
|
||||
// Add the class_base if needed
|
||||
|
||||
if ( $p_create=='true' ) {
|
||||
$sql=sprintf("insert into jnt_fic_attr(fd_id,ad_id)
|
||||
values (%d,%d)",$fd_id,ATTR_DEF_ACCOUNT);
|
||||
$Res=ExecSql($this->cn,$sql);
|
||||
}
|
||||
} else {
|
||||
//There is no class base not even as default
|
||||
$sql=sprintf("insert into fiche_def(fd_label,frd_id,fd_create_account) values ('%s',%d,'%s')",
|
||||
$p_nom_mod,$p_FICHE_REF,$p_create);
|
||||
|
||||
$Res=ExecSql($this->cn,$sql);
|
||||
|
||||
// Get the fd_id
|
||||
$fd_id=GetSequence($this->cn,'s_fdef');
|
||||
|
||||
}
|
||||
|
||||
// Get the default attr_def from attr_min
|
||||
$def_attr=Get_attr_min($this->cn,$p_FICHE_REF);
|
||||
|
||||
//if defaut attr not null
|
||||
// build the sql insert for the table attr_def
|
||||
if (sizeof($def_attr) != 0 ) {
|
||||
// insert all the mandatory fields into jnt_fiche_attr
|
||||
foreach ( $def_attr as $i=>$v) {
|
||||
$sql=sprintf("insert into jnt_fic_Attr(fd_id,ad_id)
|
||||
values (%d,%s)",
|
||||
$fd_id,$v['ad_id']);
|
||||
ExecSql($this->cn,$sql);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}//--------------end function Add ----------------------------
|
||||
/*!
|
||||
* \brief Get all the card where the fiche_def.fd_id is given in parameter
|
||||
* \param $step = 0 we don't use the offset, page_size,...
|
||||
* $step = 1 we use the jnr_bar_nav
|
||||
*
|
||||
* \return double array (f_id,fd_id)
|
||||
*/
|
||||
function GetByType($step=0) {
|
||||
$sql="select *
|
||||
from
|
||||
fiche
|
||||
where fd_id=".$this->id;
|
||||
|
||||
// we use jrn_navigation_bar
|
||||
if ($step == 1 && $_SESSION['g_pagesize'] != -1 )
|
||||
{
|
||||
$offset=(isset($_GET['offset']))?$_GET['offset']:0;
|
||||
$step=$_SESSION['g_pagesize'];
|
||||
$sql.=" offset $offset limit $step";
|
||||
}
|
||||
|
||||
$Ret=ExecSql($this->cn,$sql);
|
||||
if ( ($Max=pg_NumRows($Ret)) == 0 )
|
||||
return ;
|
||||
$all[0]=new fiche($this->cn);
|
||||
|
||||
for ($i=0;$i<$Max;$i++) {
|
||||
$row=pg_fetch_array($Ret,$i);
|
||||
$t=new fiche($this->cn,$row['f_id']);
|
||||
$t->getAttribut();
|
||||
$all[$i]=$t;
|
||||
|
||||
}
|
||||
return $all;
|
||||
}
|
||||
|
||||
/*!\brief list the card of a fd_id
|
||||
*/
|
||||
function myList()
|
||||
{
|
||||
$r="";
|
||||
foreach ( $this->attribut as $value)
|
||||
{
|
||||
$r.="<TD>".$this->$value.'</TD>';
|
||||
$this->Get();
|
||||
echo '<H2 class="info">'.$this->label.'</H2>';
|
||||
|
||||
$step=$_SESSION['g_pagesize'];
|
||||
$sql_limit="";
|
||||
$sql_offset="";
|
||||
|
||||
if ( $step != -1 ) {
|
||||
|
||||
$page=(isset($_GET['page']))?$_GET['page']:1;
|
||||
$offset=(isset($_GET['offset']))?$_GET['offset']:0;
|
||||
$max_line=CountSql($this->cn,"select f_id,av_text from
|
||||
fiche join jnt_fic_att_value using (f_id)
|
||||
join attr_value using (jft_id)
|
||||
where fd_id='".$this->id."' and ad_id=".ATTR_DEF_NAME." order by f_id");
|
||||
$sql_limit=" limit ".$step;
|
||||
$sql_offset=" offset ".$offset;
|
||||
$bar=jrn_navigation_bar($offset,$max_line,$step,$page);
|
||||
}
|
||||
|
||||
// Get all name the cards of the select category
|
||||
// 1 for attr_def.ad_id is always the name
|
||||
$Res=ExecSql($this->cn,"select f_id,vw_name,quick_code from ".
|
||||
" vw_fiche_attr ".
|
||||
" where fd_id='".$this->id.
|
||||
"' order by f_id $sql_offset $sql_limit ");
|
||||
$Max=pg_NumRows($Res);
|
||||
echo $bar;
|
||||
$str="";
|
||||
// save the url
|
||||
// with offet &offset=15&step=15&page=2&size=15
|
||||
if ( $_SESSION['g_pagesize'] != -1) {
|
||||
$str=sprintf("&offset=%s&step=%s&page=%s&size=%s",
|
||||
$offset,
|
||||
$step,
|
||||
$page,
|
||||
$max_line);
|
||||
}
|
||||
|
||||
|
||||
|
||||
echo '<table>';
|
||||
for ( $i = 0; $i < $Max; $i++) {
|
||||
$l_line=pg_fetch_array($Res,$i);
|
||||
if ( $i%2 == 0)
|
||||
echo '<TR class="odd">';
|
||||
else
|
||||
echo '<TR class="even">';
|
||||
|
||||
$span_mod='<TD><A href="fiche.php?action=detail&fiche_id='.$l_line['f_id'].$str.'&fiche='.$_GET['fiche'].'">'.$l_line['quick_code'].'</A></TD>';
|
||||
|
||||
echo $span_mod.'<TD>'.$l_line['vw_name']."</TD>";
|
||||
echo '</tr>';
|
||||
}
|
||||
echo '</table>';
|
||||
echo '<FORM METHOD="POST" action="fiche.php?action=vue'.$str.'">';
|
||||
echo '<INPUT TYPE="HIDDEN" name="fiche" value="'.$this->id.'">';
|
||||
echo '<INPUT TYPE="SUBMIT" name="add" Value="Ajout fiche">';
|
||||
echo '</FORM>';
|
||||
echo $bar;
|
||||
|
||||
}
|
||||
/*!\brief Display all the attribut of the fiche_def
|
||||
*
|
||||
*/
|
||||
function DisplayAttribut()
|
||||
{
|
||||
echo_debug("class_fiche_def",__LINE__,"DisplayAttribut");
|
||||
if ( $this->id == 0 )
|
||||
return ;
|
||||
$MaxLine=sizeof($this->attribut);
|
||||
echo_debug("class_fiche_def",__LINE__,"MaxLine = ".$MaxLine);
|
||||
$r="<TABLE>";
|
||||
// Display each attribute
|
||||
for ($i=0;$i<$MaxLine;$i++) {
|
||||
$r.='<TR><td>';
|
||||
// Can change the name
|
||||
if ( $this->attribut[$i]->ad_id == ATTR_DEF_NAME ) {
|
||||
$a=sprintf('Label</TD><TD><INPUT TYPE="TEXT" NAME="label" VALUE="%s">',
|
||||
$this->label);
|
||||
$r.=$a;
|
||||
$r.='</td><TD><input type="submit" NAME="change_name" value="Change Nom">';
|
||||
} else {
|
||||
// The attr.
|
||||
$a=sprintf('%s ', $this->attribut[$i]->ad_text);
|
||||
$r.=$a;
|
||||
}
|
||||
$r.= '</td></tr>';
|
||||
}
|
||||
|
||||
// Show the possible attribute which are not already attribute of the model
|
||||
// of card
|
||||
$Res=ExecSql($this->cn,"select ad_id,ad_text from attr_def
|
||||
where
|
||||
ad_id not in (select ad_id from fiche_def natural join jnt_fic_attr
|
||||
where fd_id=".$this->id.")");
|
||||
$M=pg_NumRows($Res);
|
||||
|
||||
// Show the unused attribute
|
||||
$r.='<TR> <TD>';
|
||||
$r.= '<SELECT NAME="ad_id">';
|
||||
for ($i=0;$i<$M;$i++) { $l=pg_fetch_array($Res,$i);
|
||||
$a=sprintf('<OPTION VALUE="%s"> %s',
|
||||
$l['ad_id'],$l['ad_text']);
|
||||
$r.=$a;
|
||||
}
|
||||
$r.='</SELECT>';
|
||||
|
||||
$r.="</TABLE>";
|
||||
return $r;
|
||||
}
|
||||
/*!
|
||||
**************************************************
|
||||
* \brief Input Data between <td> tag
|
||||
*
|
||||
* parm :
|
||||
* - none
|
||||
* gen :
|
||||
* -
|
||||
* \return string
|
||||
*/
|
||||
function Input()
|
||||
/*!\brief Save the label of the fiche_def
|
||||
* \param $p_label label
|
||||
*/
|
||||
function SaveLabel($p_label)
|
||||
{
|
||||
$r="";
|
||||
$h=new widget('hidden');
|
||||
$r.='<li>Id :'.$h->IOValue('frd_id',$this->frd_id).$this->frd_id."</li>";
|
||||
$w=new widget("text");
|
||||
$r.='<li>Commentaire :'.$w->IOValue('frd_text',$this->frd_text)."</li>";
|
||||
$t=new widget('text');
|
||||
$r.='<li>Poste de base:'.$t->IOValue('frd_class_base',$this->frd_class_base)."</li>";
|
||||
|
||||
return $r;
|
||||
if ( $this->id == 0 ) return;
|
||||
$p_label=FormatString($p_label);
|
||||
if (strlen(trim ($p_label)) == 0 ) {
|
||||
echo_debug('class_fiche_def',__LINE__,'Name empty');
|
||||
return;
|
||||
}
|
||||
$sql=sprintf("update fiche_def set fd_label='%s' ".
|
||||
"where fd_id=%d",
|
||||
$p_label,$this->id);
|
||||
$Res=ExecSql($this->cn,$sql);
|
||||
|
||||
}
|
||||
/*!
|
||||
**************************************************
|
||||
* \brief Store data into the database: update the
|
||||
* record
|
||||
*
|
||||
* -
|
||||
* \return none
|
||||
*/
|
||||
function Save()
|
||||
/*!\brief insert a new attribut for this fiche_def
|
||||
* \param $p_ad_id id of the attribut
|
||||
*/
|
||||
function InsertAttribut($p_ad_id)
|
||||
{
|
||||
$sql="update fiche_def_ref set frd_text='".
|
||||
$this->frd_text."' , frd_class_base='".$this->frd_class_base."'".
|
||||
" where frd_id=".$this->frd_id;
|
||||
$Res=ExecSql($this->db,$sql);
|
||||
}
|
||||
/*!
|
||||
**************************************************
|
||||
* \brief Get the data with the p_code and complete
|
||||
* the current object
|
||||
*
|
||||
* \return none
|
||||
*/
|
||||
function Get()
|
||||
{
|
||||
$sql="select * from fiche_def_ref ".
|
||||
" where frd_id=".$this->frd_id;
|
||||
$Res=ExecSql($this->db,$sql);
|
||||
if ( pg_NumRows($Res) == 0 ) return null;
|
||||
$r=pg_fetch_array($Res,0);
|
||||
$this->frd_text=$r['frd_text'];
|
||||
$this->frd_class_base=$r['frd_class_base'];
|
||||
if ( $this->id == 0 ) return;
|
||||
// Insert a new attribute for the model
|
||||
// it means insert a row in jnt_fic_attr
|
||||
$sql=sprintf("insert into jnt_fic_attr (fd_id,ad_id) values (%d,%d)",
|
||||
$this->id,$p_ad_id);
|
||||
$Res=ExecSql($this->cn,$sql);
|
||||
// update all the existing card
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
143
include/class_fiche_def_ref.php
Normal file
143
include/class_fiche_def_ref.php
Normal file
|
|
@ -0,0 +1,143 @@
|
|||
<?
|
||||
/*
|
||||
* This file is part of PhpCompta.
|
||||
*
|
||||
* PhpCompta is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* PhpCompta is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with PhpCompta; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
/* $Revision$ */
|
||||
// Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
|
||||
/*! \file
|
||||
* \brief fiche_def_ref, a fiche is owned by fiche_def which is owned by
|
||||
* fiche_def_ref
|
||||
*/
|
||||
/*!
|
||||
* \brief fiche_def_ref, a fiche is owned by fiche_def which is owned by
|
||||
* fiche_def_ref
|
||||
*/
|
||||
|
||||
class fiche_def_ref
|
||||
{
|
||||
var $frd_id; /*! \enum $frd_id fiche_def_ref.frd_id */
|
||||
var $frd_text; /*! \enum $frd_text fiche_def_ref.frd_tex */
|
||||
var $frd_class_base; /*! \enum fiche_def_ref.frd_class_base */
|
||||
var $attribut; /*! \enum array which containing list of attr */
|
||||
/* it is used with dynamic variables */
|
||||
|
||||
function fiche_def_ref($p_cn,$p_frd_id=-1)
|
||||
{
|
||||
$this->db=$p_cn;
|
||||
$this->frd_id=$p_frd_id;
|
||||
$this->attribut=array('frd_id','frd_text','frd_class_base');
|
||||
}
|
||||
/*!
|
||||
**************************************************
|
||||
* \brief Load all the fiche_def_ref data and
|
||||
* return an array of fiche_def_ref objects
|
||||
*
|
||||
* \return array
|
||||
*/
|
||||
function LoadAll()
|
||||
{
|
||||
$sql="select * from fiche_def_ref order by frd_id";
|
||||
$Res=ExecSql($this->db,$sql);
|
||||
$all=pg_fetch_all($Res);
|
||||
if ( $Res == false ) return array();
|
||||
$idx=0;
|
||||
$array=array();
|
||||
foreach ($all as $row)
|
||||
{
|
||||
$o=new fiche_def_ref($this->db);
|
||||
|
||||
foreach ( $this->attribut as $value)
|
||||
{
|
||||
$o->$value=$row[$value];
|
||||
}
|
||||
$array[$idx]=$o;
|
||||
$idx++;
|
||||
}
|
||||
return $array;
|
||||
}
|
||||
/*!
|
||||
**************************************************
|
||||
* \brief Display data between <TD> tag
|
||||
*
|
||||
* \return string
|
||||
*/
|
||||
function Display()
|
||||
{
|
||||
$r="";
|
||||
foreach ( $this->attribut as $value)
|
||||
{
|
||||
$r.="<TD>".$this->$value.'</TD>';
|
||||
}
|
||||
return $r;
|
||||
}
|
||||
/*!
|
||||
**************************************************
|
||||
* \brief Input Data between <td> tag
|
||||
*
|
||||
* parm :
|
||||
* - none
|
||||
* gen :
|
||||
* -
|
||||
* \return string
|
||||
*/
|
||||
function Input()
|
||||
{
|
||||
$r="";
|
||||
$h=new widget('hidden');
|
||||
$r.='<li>Id :'.$h->IOValue('frd_id',$this->frd_id).$this->frd_id."</li>";
|
||||
$w=new widget("text");
|
||||
$r.='<li>Commentaire :'.$w->IOValue('frd_text',$this->frd_text)."</li>";
|
||||
$t=new widget('text');
|
||||
$r.='<li>Poste de base:'.$t->IOValue('frd_class_base',$this->frd_class_base)."</li>";
|
||||
|
||||
return $r;
|
||||
}
|
||||
/*!
|
||||
**************************************************
|
||||
* \brief Store data into the database: update the
|
||||
* record
|
||||
*
|
||||
* -
|
||||
* \return none
|
||||
*/
|
||||
function Save()
|
||||
{
|
||||
$sql="update fiche_def_ref set frd_text='".
|
||||
$this->frd_text."' , frd_class_base='".$this->frd_class_base."'".
|
||||
" where frd_id=".$this->frd_id;
|
||||
$Res=ExecSql($this->db,$sql);
|
||||
}
|
||||
/*!
|
||||
**************************************************
|
||||
* \brief Get the data with the p_code and complete
|
||||
* the current object
|
||||
*
|
||||
* \return none
|
||||
*/
|
||||
function Get()
|
||||
{
|
||||
$sql="select * from fiche_def_ref ".
|
||||
" where frd_id=".$this->frd_id;
|
||||
$Res=ExecSql($this->db,$sql);
|
||||
if ( pg_NumRows($Res) == 0 ) return null;
|
||||
$r=pg_fetch_array($Res,0);
|
||||
$this->frd_text=$r['frd_text'];
|
||||
$this->frd_class_base=$r['frd_class_base'];
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
|
|
@ -48,7 +48,8 @@
|
|||
* - JS_SEARCH_ONLY like JS_SEARCH but without adding a quickcode
|
||||
* - SPAN
|
||||
* - JS_TVA open a popup window for the VAT
|
||||
* - JS_CONCERNED open a popup window for search a operation
|
||||
* - JS_CONCERNED open a popup window for search a operation, if extra == 0 then
|
||||
* get the amount thx javascript
|
||||
*
|
||||
* For JS_SEARCH_POST,JS_SEARCH or JS_SEARCH_ONLY
|
||||
* - $extra contains 'cred', 'deb', 'all' or a list of fiche_def_ref (frd_id)
|
||||
|
|
@ -493,7 +494,7 @@ class widget {
|
|||
// input type == js_tva
|
||||
if ( strtolower($this->type)=="js_tva") {
|
||||
$id=sprintf("<span id=%s></span>",$this->label);
|
||||
$r=sprintf('%s<TD> <INPUT TYPE="Text" style="border:solid 1px blue;" '.
|
||||
$r=sprintf('%s<TD>Tva</TD><TD> <INPUT TYPE="Text" style="border:solid 1px blue;" '.
|
||||
' NAME="%s" VALUE="%s" SIZE="3" onChange="ChangeTVA(\'%s\',\'%s\');">',
|
||||
$id,
|
||||
$this->name,
|
||||
|
|
@ -510,24 +511,28 @@ class widget {
|
|||
|
||||
// input type == js_concerned => button search for the concerned operations
|
||||
if ( strtolower($this->type)=="js_concerned") {
|
||||
$td="";$etd="";
|
||||
if ( $this->table == 1 ) { $td='<td>'; $etd='</td>';}
|
||||
|
||||
if ( $this->readonly == false) {
|
||||
$l_sessid=$_REQUEST['PHPSESSID'];
|
||||
$r=sprintf('<TD>
|
||||
<INPUT TYPE="button" onClick=SearchJrn(\'%s\',\'%s\') value="Search">
|
||||
%s</TD><TD>
|
||||
|
||||
<INPUT TYPE="Text" style="border:solid 1px blue;" NAME="%s" VALUE="%s" SIZE="8">
|
||||
</TD>',
|
||||
$l_sessid,
|
||||
$this->name,
|
||||
$this->label,
|
||||
$r=sprintf("$td
|
||||
<INPUT TYPE=\"button\" onClick=SearchJrn('%s','%s',%s) value=\"Search\">
|
||||
%s $etd $td
|
||||
<INPUT TYPE=\"Text\" style=\"border:solid 1px blue;\" NAME=\"%s\" VALUE=\"%s\" SIZE=\"8\">
|
||||
$etd",
|
||||
$l_sessid,
|
||||
$this->name,
|
||||
$this->extra,
|
||||
$this->label,
|
||||
$this->name,
|
||||
$this->value
|
||||
);
|
||||
} else {
|
||||
$r=sprintf("<TD><span>%s</span>",$this->value);
|
||||
$r.=sprintf('<input type="hidden" name="%s" value="%s"></TD>', $this->name,$this->value);
|
||||
}
|
||||
} else {
|
||||
$r=sprintf("$td<span>%s <b>%s</b></span>",$this->label,$this->value);
|
||||
$r.=sprintf('<input type="hidden" name="%s" value="%s">'.$etd, $this->name,$this->value);
|
||||
}
|
||||
|
||||
return $r;
|
||||
}// end js_concerned
|
||||
|
|
|
|||
|
|
@ -22,13 +22,13 @@
|
|||
* \brief Contains all the variable + the javascript
|
||||
* and some parameter
|
||||
*/
|
||||
|
||||
$_ENV['TMP']="/tmp";
|
||||
define ("phpcompta_password","dany");
|
||||
define ("phpcompta_psql_port","5432");
|
||||
define ("domaine","");
|
||||
$_ENV['tmp']='tmp';
|
||||
|
||||
define ("DEBUG","false");
|
||||
define ("DEBUG","true");
|
||||
|
||||
// securite correspond a la table
|
||||
// action
|
||||
|
|
@ -137,215 +137,28 @@ define ("ATTR_DEF_DEPENSE_NON_DEDUCTIBLE",20);
|
|||
define ("ATTR_DEF_TVA_NON_DEDUCTIBLE",21);
|
||||
define ("ATTR_DEF_TVA_NON_DEDUCTIBLE_RECUP",22);
|
||||
define ("ATTR_DEF_QUICKCODE",23);
|
||||
define ("JS_SEARCH_POSTE","<SCRIPT language=\"javascript\">function SearchPoste(p_sessid,p_ctl,p_jrn)
|
||||
{
|
||||
var win=window.open('poste_search.php?p_jrn='+p_jrn+'&p_ctl='+p_ctl+'&PHPSESSID='+p_sessid,'Cherche','toolbar=no,width=600,height=600,scrollbars=yes,resizable=yes');
|
||||
}
|
||||
function SearchPosteFilter(p_sessid,p_ctl,p_filter,jrn)
|
||||
{
|
||||
var win=window.open('poste_search.php?p_jrn='+jrn+'&p_ctl='+p_ctl+'&PHPSESSID='+p_sessid+'&filter='+p_filter,'Cherche','toolbar=no,width=600,height=600,scrollbars=yes,resizable=yes');
|
||||
}
|
||||
function GetIt() {
|
||||
window.close();
|
||||
}
|
||||
function SetItChild(p_ctl,p_value) {
|
||||
self.opener.SetItParent(p_ctl,p_value);
|
||||
window.close();
|
||||
}
|
||||
function SetItParent(p_ctl,p_value) {
|
||||
define ("JS_SEARCH_POSTE",
|
||||
"<SCRIPT language=\"javascript\" src=\"js/search_poste.js\"> </SCRIPT>");
|
||||
|
||||
var f=document.getElementsByName(p_ctl);
|
||||
for (var h=0; h < f.length; h++) {
|
||||
f[h].value=p_value;
|
||||
}
|
||||
|
||||
}
|
||||
/* SetValue( p_ctl,p_value )
|
||||
/* p_ctl is the name of the control
|
||||
/* p_value is the value to set in
|
||||
*/
|
||||
function SetValue(p_ctl,p_value)
|
||||
{
|
||||
define ("JS_VIEW_JRN_CANCEL",
|
||||
"<script language=\"javascript\" src=\"js/cancel_op.js\"> </script>");
|
||||
|
||||
var f=document.getElementsByName(p_ctl);
|
||||
for (var h=0; h < f.length; h++) {
|
||||
f[h].value=p_value;
|
||||
}
|
||||
|
||||
define ("JS_VIEW_JRN_MODIFY",
|
||||
"<script language=\"javascript\" src=\"js/modify_op.js\"> </script>");
|
||||
|
||||
}
|
||||
</SCRIPT>"
|
||||
);
|
||||
define ("JS_SHOW_TVA","<SCRIPT language=\"javascript\">
|
||||
function ShowTva(p_sessid,ctl)
|
||||
{
|
||||
var win=window.open('show_tva.php?ctl='+ctl+'&PHPSESSID='+p_sessid,'Montre','scrollbar,toolbar=no,width=300,height=300,resizable=yes');
|
||||
}
|
||||
function GetIt(ctl,tva_id) {
|
||||
self.opener.SetValue(ctl,tva_id)
|
||||
window.close();
|
||||
}
|
||||
|
||||
</SCRIPT>"
|
||||
);
|
||||
|
||||
define ("JS_VIEW_JRN_DETAIL","<script language=\"javascript\">function viewDetail(p_value,p_sessid)
|
||||
{
|
||||
var win=window.open('jrn_op_detail.php?jrn_op='+p_value+'&PHPSESSID='+p_sessid,'Cherche','toolbar=no,width=400,height=400,scrollbars=yes,resizable=yes');
|
||||
}
|
||||
|
||||
</script>");
|
||||
define ("JS_VIEW_JRN_CANCEL","<script language=\"javascript\" >function cancelOperation(p_value,p_sessid,p_jrn)
|
||||
{
|
||||
var win=window.open('annulation.php?p_jrn='+p_jrn+'&jrn_op='+p_value+'&PHPSESSID='+p_sessid,'Annule','toolbar=no,width=400,height=400,scrollbars=yes,resizable=yes');
|
||||
}
|
||||
function RefreshMe() {
|
||||
window.location.reload();
|
||||
}
|
||||
</script>");
|
||||
define ("JS_VIEW_JRN_MODIFY","<script language=\"javascript\">function modifyOperation(p_value,p_sessid,p_jrn)
|
||||
{
|
||||
var win=window.open('modify_op.php?action=update&p_jrn='+p_jrn+'&line='+p_value+'&PHPSESSID='+p_sessid,'Modifie','toolbar=no,width=500,height=400,scrollbars=yes,resizable=yes');
|
||||
}
|
||||
function RefreshMe() {
|
||||
window.location.reload();
|
||||
}
|
||||
function dropLink(p_value,p_value2,p_sessid) {
|
||||
var win=window.open('modify_op.php?action=delete&line='+p_value+'&line2='+p_value2+'&PHPSESSID='+p_sessid,'Liaison','toolbar=no,width=500,height=400,scrollbars=yes,resizable=yes');
|
||||
}
|
||||
|
||||
|
||||
</script>");
|
||||
define ("JS_UPDATE_PCMN","<script language=\"javascript\">function PcmnUpdate(p_value,p_lib,p_parent,p_sessid)
|
||||
{
|
||||
var win=window.open('line_update.php?l='+p_value+'&n='+p_lib+'&p='+p_parent+'&PHPSESSID='+p_sessid,'Modifie','toolbar=no,width=500,height=400,scrollbars=yes,resizable=yes');
|
||||
}
|
||||
function RefreshMe() {
|
||||
window.location.reload();
|
||||
}
|
||||
|
||||
|
||||
</script>");
|
||||
define ("JS_UPDATE_PCMN",
|
||||
"<script language=\"javascript\" src=\"js/update_pcmn.js\"> </script>");
|
||||
|
||||
define ("JS_SEARCH_CARD","
|
||||
<script language=\"javascript\">
|
||||
function showfiche(p_sessid,qcode)
|
||||
{
|
||||
var a=window.open('show_fiche.php?PHPSESSID='+p_sessid+'&q='+qcode,'','toolbar=no,width=350,height=450,scrollbar=yes');
|
||||
|
||||
}
|
||||
|
||||
/* type must be cred or deb and name is
|
||||
* the control's name
|
||||
*/
|
||||
function SearchCard(p_sessid,type,name,jrn)
|
||||
{
|
||||
var a=window.open('fiche_search.php?p_jrn='+jrn+'&PHPSESSID='+p_sessid+'&type='+type+'&name='+name,'item','toolbar=no,width=350,height=450,scrollbars=yes');
|
||||
}
|
||||
function NewCard(p_sessid,type,name,jrn)
|
||||
{
|
||||
var a=window.open('fiche_new.php?p_jrn='+jrn+'&PHPSESSID='+p_sessid+'&type='+type+'&name='+name,'item','toolbar=no,width=350,height=450,scrollbars=yes');
|
||||
}
|
||||
/* SetValue( p_ctl,p_value )
|
||||
/* p_ctl is the name of the control
|
||||
/* p_value is the value to set in
|
||||
*/
|
||||
function SetValue(p_ctl,p_value)
|
||||
{
|
||||
|
||||
var f=document.getElementsByName(p_ctl);
|
||||
for (var h=0; h < f.length; h++) {
|
||||
f[h].value=p_value;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
/* Parameters
|
||||
* i = ctl _name
|
||||
* p_id = code id (fiche.f_id)
|
||||
*¨p_label = label
|
||||
* p_sell vw_fiche_attr.vw_sell
|
||||
* p_buy vw_fiche_attr.vw_buy
|
||||
* p_tva_id vw_fiche_attr.tva_id
|
||||
* p_tva_label vw_fiche_attr.tva_label
|
||||
*/
|
||||
function SetData(i,p_id,p_label,p_sell,p_buy,p_tva_id, p_tva_label)
|
||||
{
|
||||
SetValue(i,p_id);
|
||||
// for the form we use 1. and for span 2.
|
||||
//1. document.form_detail.eval(a).value=p_buy;
|
||||
//2. document.getElementById(a).innerHTML=p_sell;
|
||||
|
||||
// Compute name of label ctl
|
||||
var a=i+'_label';
|
||||
document.getElementById(a).innerHTML=p_label;
|
||||
|
||||
// Compute name of sell ctl
|
||||
var a=i+'_sell';
|
||||
// if the object exist
|
||||
var e=document.getElementsByName(a)
|
||||
if ( e.length != 0 ) {
|
||||
SetValue(a,p_sell);
|
||||
|
||||
}
|
||||
|
||||
// Compute name of buy ctl
|
||||
var a=i+'_buy';
|
||||
// if the object exist
|
||||
var e=document.getElementsByName(a)
|
||||
if ( e.length != 0 ) {
|
||||
SetValue(a,p_buy);
|
||||
}
|
||||
// Compute name of tva_id ctl
|
||||
var a=i+'_tva_id';
|
||||
// if the object exist
|
||||
var e=document.getElementsByName(a)
|
||||
if ( e.length != 0 ) {
|
||||
SetValue(a,p_tva_id);
|
||||
}
|
||||
|
||||
// Compute name of tva_label ctl
|
||||
var a=i+'_tva_label';
|
||||
// if the object exist
|
||||
if (document.getElementById(a) ) {
|
||||
document.getElementById(a).innerHTML=p_tva_label;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
<script language=\"javascript\" src=\"js/search_card.js\"></script>
|
||||
|
||||
|
||||
");
|
||||
// concerned operation
|
||||
define ("JS_CONCERNED_OP","
|
||||
<script language=\"javascript\">
|
||||
|
||||
function SearchJrn(p_sessid,p_ctl)
|
||||
{
|
||||
var win=window.open('jrn_search.php?p_ctl='+p_ctl+'&PHPSESSID='+p_sessid,'Cherche','toolbar=no,width=600,height=600,scrollbars=yes');
|
||||
}
|
||||
function GetIt(p_ctl,p_value) {
|
||||
self.opener.SetIt(p_value,p_ctl);
|
||||
window.close();
|
||||
}
|
||||
/* SetValue( p_ctl,p_value )
|
||||
/* p_ctl is the name of the control
|
||||
/* p_value is the value to set in
|
||||
*/
|
||||
function SetIt(p_value,p_ctl) {
|
||||
|
||||
var f=document.getElementsByName(p_ctl);
|
||||
for (var h=0; h < f.length; h++) {
|
||||
f[h].value=p_value;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
");
|
||||
define ("JS_CONCERNED_OP",'
|
||||
<script type="text/javascript" language="javascript" src="js/jrn_concerned.js">
|
||||
</script>');
|
||||
// One line calculator
|
||||
define ("JS_CALC_LINE",'
|
||||
<div style="border:outset black 3px; position:float; float:right;background-color:white;font-family:sans-serif;font-size:9pt;">
|
||||
|
|
@ -363,6 +176,16 @@ define ("JS_CALC_LINE",'
|
|||
</div>
|
||||
'
|
||||
);
|
||||
define ("JS_SHOW_TVA","<SCRIPT language=\"javascript\">
|
||||
function ShowTva(p_sessid,ctl)
|
||||
{
|
||||
var win=window.open('show_tva.php?ctl='+ctl+'&PHPSESSID='+p_sessid,'Montre','scrollbar,toolbar=no,width=300,height=300,resizable=yes');
|
||||
}
|
||||
function GetIt(ctl,tva_id) {
|
||||
self.opener.SetValue(ctl,tva_id)
|
||||
window.close();
|
||||
}
|
||||
</script>");
|
||||
|
||||
define ("JS_TVA","<script language=\"javascript\">
|
||||
|
||||
|
|
@ -380,6 +203,10 @@ function ChangeTVA(p_ctl,p_value) {
|
|||
define ("SQL_LIST_ALL_INVOICE","");
|
||||
|
||||
define ("SQL_LIST_UNPAID_INVOICE"," where (jr_rapt is null or jr_rapt = '') and jr_valid = true ");
|
||||
define ("SQL_LIST_UNPAID_INVOICE_DATE_LIMIT" ," where (jr_rapt is null or jr_rapt = '')
|
||||
and to_date(to_char(jr_ech,'DD.MM.YYYY'),'DD.MM.YYYY') < to_date(to_char(now(),'DD.MM.YYYY'),'DD.MM.YYYY') and jr_valid = true" );
|
||||
|
||||
|
||||
define ("SQL_LIST_UNPAID_INVOICE_DATE_LIMIT" ,"
|
||||
where (jr_rapt is null or jr_rapt = '')
|
||||
and to_date(to_char(jr_ech,'DD.MM.YYYY'),'DD.MM.YYYY') < to_date(to_char(now(),'DD.MM.YYYY'),'DD.MM.YYYY')
|
||||
and jr_valid = true" );
|
||||
?>
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -64,10 +64,12 @@ Commit($p_cn);
|
|||
*
|
||||
*/
|
||||
function UpdateCSV($p_cn){
|
||||
$code=$_POST['code'];
|
||||
$count=$_POST['count'];
|
||||
$poste=$_POST['poste'.$count];
|
||||
$sql = "update import_tmp set poste_comptable='".$poste."' ,status='w' where code='".$code."'";
|
||||
$code=FormatString($_POST['code']);
|
||||
$count=FormatString($_POST['count']);
|
||||
$poste=FormatString($_POST['poste'.$count]);
|
||||
$concern=FormatString($_POST['e_concerned'.$count]);
|
||||
$sql = "update import_tmp set poste_comptable='$poste' ,status='w',".
|
||||
"jr_rapt='$concern' where code='$code'";
|
||||
$Res=ExecSql($p_cn,$sql);
|
||||
}
|
||||
|
||||
|
|
@ -93,8 +95,19 @@ function ShowBox($p_val,$counter,$p_cn,$p_form='form'){
|
|||
if ( $p_form == 'remove' )
|
||||
$w->readonly=true;
|
||||
|
||||
// widget concerned
|
||||
$wConcerned=new widget('js_concerned');
|
||||
$wConcerned->extra=abs($p_val['montant']);
|
||||
$wConcerned->label='op. concernée';
|
||||
$wConcerned->table=0;
|
||||
$s=new widget('span');
|
||||
|
||||
|
||||
// if in readonly retrieve the conc. ope
|
||||
if ( $p_form== 'remove') {
|
||||
$wConcerned->readonly=true;
|
||||
$wConcerned->value=$p_val['jr_rapt'];
|
||||
}
|
||||
|
||||
if ( isset($p_val['poste_comptable']))
|
||||
{
|
||||
$w->value=$p_val['poste_comptable'];
|
||||
|
|
@ -108,8 +121,11 @@ function ShowBox($p_val,$counter,$p_cn,$p_form='form'){
|
|||
echo '<table border="1" width="500">';
|
||||
echo '<tr><td width="200">'.$p_val['code'].'</td><td width="200">'.$p_val['date_exec'].'</td><td width="100">'.$p_val['montant'].' EUR</td><tr/>';
|
||||
echo "<tr><td> Journal : ".GetJrnName($p_cn,$p_val['jrn'])."</TD><TD>poste comptable Destination : ".$p_val['bq_account']."</td><tr>";
|
||||
echo '<tr><td height="50" colspan="3">'.$p_val['detail'].'</td><tr/>';
|
||||
echo '<tr><td>'.$w->IOValue().' '.$s->IOValue('poste'.$counter.'_label').'</td>';
|
||||
echo '<tr colspan="3"><td height="50" colspan="3">'.$p_val['detail'].'</td></tr>';
|
||||
echo '<tr><td colspan="3"> '.$wConcerned->IOValue("e_concerned".$counter).'</td></tr>';
|
||||
echo '<tr><td>'.$w->IOValue().' '.$s->IOValue('poste'.$counter.'_label').
|
||||
"</TD>";
|
||||
|
||||
echo "<td>n° compte : ".$p_val['num_compte']."</td>";
|
||||
if ( $p_form == 'form') {
|
||||
echo '<td><input type="submit" value="Modifier">';
|
||||
|
|
@ -143,6 +159,7 @@ function VerifImport($p_cn){
|
|||
$i=1;
|
||||
// include javascript for popup
|
||||
echo JS_SEARCH_CARD;
|
||||
echo JS_CONCERNED_OP;
|
||||
while($val = pg_fetch_array($Res)){
|
||||
echo '<form METHOD="POST" action="import.php?action=verif">';
|
||||
ShowBox($val,$i,$p_cn,'form');
|
||||
|
|
@ -172,7 +189,7 @@ function ConfirmTransfert($p_cn,$periode){
|
|||
$end = "to_date('".$val['p_end']."','DD-MM-YYYY')";
|
||||
|
||||
$sql = "select code,to_char(date_exec,'DD.MM.YYYY') as date_exec, ".
|
||||
" montant,num_compte,poste_comptable,bq_account,jrn,detail ".
|
||||
" montant,num_compte,poste_comptable,bq_account,jrn,detail,jr_rapt ".
|
||||
" from import_tmp where
|
||||
status = 'w' AND date_exec BETWEEN ".$start." and ".$end;
|
||||
|
||||
|
|
@ -207,12 +224,14 @@ function ConfirmTransfert($p_cn,$periode){
|
|||
*/
|
||||
|
||||
function TransferCSV($p_cn, $periode){
|
||||
//on obtient la période courante
|
||||
//on obtient la période courante
|
||||
$User=new cl_user($p_cn);
|
||||
$periode = $User->GetPeriode();
|
||||
|
||||
// on trouve les dates frontières de cette période
|
||||
$sql = "select to_char(p_start,'DD-MM-YYYY') as p_start,to_char(p_end,'DD-MM-YYYY') as p_end".
|
||||
" from parm_periode where p_id = '".$periode."'";
|
||||
|
||||
$Res=ExecSql($p_cn,$sql);
|
||||
$val = pg_fetch_array($Res);
|
||||
if ( $val == false )
|
||||
|
|
@ -222,16 +241,16 @@ function TransferCSV($p_cn, $periode){
|
|||
"</script>";
|
||||
exit();
|
||||
}
|
||||
|
||||
$start ="to_date('".$val['p_start']."','DD-MM-YYYY')";
|
||||
$end = "to_date('".$val['p_end']."','DD-MM-YYYY')";
|
||||
// var_dump($val);
|
||||
|
||||
$sql = "select code,to_char(date_exec,'DD.MM.YYYY') as date_exec, ".
|
||||
" montant,num_compte,poste_comptable,bq_account,jrn,detail ".
|
||||
" montant,num_compte,poste_comptable,bq_account,jrn,detail,jr_rapt ".
|
||||
" from import_tmp where ".
|
||||
" status= 'w' AND date_exec BETWEEN ".$start." and ".$end;
|
||||
$Res=ExecSql($p_cn,$sql);
|
||||
//echo "boucle: ".sizeof($Res)."<br/>";
|
||||
//while($val = pg_fetch_array($Res)){
|
||||
|
||||
$Max=pg_NumRows($Res);
|
||||
echo $Max." opérations à transférer.<br/>";
|
||||
StartSql($p_cn);
|
||||
|
|
@ -239,9 +258,15 @@ function TransferCSV($p_cn, $periode){
|
|||
for ($i = 0;$i < $Max;$i++) {
|
||||
$val=pg_fetch_array($Res,$i);
|
||||
|
||||
$code=$val['code']; $date_exec=$val['date_exec']; $montant=$val['montant']; $num_compte=$val['num_compte'];
|
||||
$poste_comptable=$val['poste_comptable'];$bq_account=$val['bq_account'];
|
||||
$jrn=$val['jrn']; $detail=$val['detail'];
|
||||
$code=$val['code'];
|
||||
$date_exec=$val['date_exec'];
|
||||
$montant=$val['montant'];
|
||||
$num_compte=$val['num_compte'];
|
||||
$poste_comptable=$val['poste_comptable'];
|
||||
$bq_account=$val['bq_account'];
|
||||
$jrn=$val['jrn'];
|
||||
$detail=$val['detail'];
|
||||
$jr_rapt=$val['jr_rapt'];
|
||||
|
||||
// Retrieve the account thx the quick code
|
||||
$f=new fiche($p_cn);
|
||||
|
|
@ -283,9 +308,12 @@ function TransferCSV($p_cn, $periode){
|
|||
$num_compte=str_replace('"','',$num_compte);
|
||||
$code=str_replace('\"','',$code);
|
||||
|
||||
$r=InsertJrn($p_cn,$date_exec,NULL,$jrn,$detail.$num_compte." ".$code,$montant,$seq,$periode);
|
||||
if ( $r == false ) { Rollback($p_cn); exit(" Error 'import_inc.php' __LINE__");}
|
||||
$jr_id=InsertJrn($p_cn,$date_exec,NULL,$jrn,$detail.$num_compte." ".$code,$montant,$seq,$periode);
|
||||
if ( $jr_id == false ) { Rollback($p_cn); exit(" Error 'import_inc.php' __LINE__");}
|
||||
|
||||
if ( isNumber($jr_rapt) == 1)
|
||||
InsertRapt($p_cn,$jr_id,$jr_rapt);
|
||||
|
||||
SetInternalCode($p_cn,$seq,$jrn);
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -79,9 +79,7 @@ if ( isset ($_REQUEST['fd_id'])) {
|
|||
}
|
||||
|
||||
$fiche=new fiche($cn);
|
||||
$e=$fiche->GetByType($fiche_def->id);
|
||||
$l=var_export($e,true);
|
||||
echo_debug('impress_fiche.php',__LINE__,$l);
|
||||
|
||||
$old=-1;
|
||||
echo "<TABLE class=\"result\">";
|
||||
echo "<TR>";
|
||||
|
|
@ -99,6 +97,10 @@ if ( isset ($_REQUEST['fd_id'])) {
|
|||
}
|
||||
|
||||
echo "<TR></TR>";
|
||||
$e=$fiche_def->GetByType($fiche_def->id);
|
||||
$l=var_export($e,true);
|
||||
echo_debug('impress_fiche.php',__LINE__,$l);
|
||||
|
||||
if ( count($e) != 0 ) {
|
||||
foreach ($e as $detail) {
|
||||
echo "<TR>";
|
||||
|
|
|
|||
|
|
@ -25,14 +25,12 @@
|
|||
/*!
|
||||
* \brief Record an entry in the selected journal
|
||||
*
|
||||
* parm :
|
||||
* - p_dossier dossier id
|
||||
* - p_user user id
|
||||
* - p_jrn selected journal
|
||||
* gen :
|
||||
* - none
|
||||
* return:
|
||||
* - none
|
||||
* \param p_dossier dossier id
|
||||
* \param p_user user id
|
||||
* \param p_jrn selected journal
|
||||
*
|
||||
* \return none
|
||||
*
|
||||
*
|
||||
*/
|
||||
function RecordJrn($p_dossier,$p_user,$p_jrn,$p_MaxDeb,$p_MaxCred,$p_array = null,$p_update=0)
|
||||
|
|
@ -223,7 +221,7 @@ if ( $p_update == 0 ) echo "<TR><TD> <INPUT TYPE=\"SUBMIT\" VALUE=\"+ de line\"
|
|||
$sessid=$_POST["PHPSESSID"];
|
||||
}
|
||||
|
||||
$search='<INPUT TYPE="BUTTON" VALUE="Cherche" OnClick="SearchJrn(\''.$sessid."','rapt')\">";
|
||||
$search='<INPUT TYPE="BUTTON" VALUE="Cherche" OnClick="SearchJrn(\''.$sessid."','rapt','$e_sum_cred')\">";
|
||||
echo_debug('jrn.php',__LINE__,"search $search");
|
||||
// To avoid problem with unknown variable
|
||||
if ( ! isset ($e_rapt) ) {
|
||||
|
|
@ -375,8 +373,10 @@ if ( $p_update == 0 ) echo "<TR><TD> <INPUT TYPE=\"SUBMIT\" VALUE=\"+ de line\"
|
|||
|
||||
$r.= '<div style="margin-left:30px;">';
|
||||
foreach ($a as $key => $element) {
|
||||
$r.=sprintf ('%s <INPUT TYPE="BUTTON" VALUE="Détail" onClick="viewDetail(\'%s\',\'%s\')">',
|
||||
GetInternal($p_cn,$element),GetGrpt($p_cn,$element),$sessid);
|
||||
$r.=sprintf ('%s <INPUT TYPE="BUTTON" VALUE="Détail" onClick="modifyOperation(\'%s\',\'%s\')">',
|
||||
GetInternal($p_cn,$element),
|
||||
$element,
|
||||
$sessid);
|
||||
$r.=sprintf('<INPUT TYPE="button" value="Efface" onClick="dropLink(\'%s\',\'%s\',\'%s\')"><BR>',
|
||||
$content['jr_id'],$element,$sessid);
|
||||
}//for
|
||||
|
|
@ -390,7 +390,7 @@ if ( $p_update == 0 ) echo "<TR><TD> <INPUT TYPE=\"SUBMIT\" VALUE=\"+ de line\"
|
|||
$sessid=$_POST["PHPSESSID"];
|
||||
}
|
||||
|
||||
$search='<INPUT TYPE="BUTTON" VALUE="Cherche" OnClick="SearchJrn(\''.$sessid."','rapt')\">";
|
||||
$search='<INPUT TYPE="BUTTON" VALUE="Cherche" OnClick="SearchJrn(\''.$sessid."','rapt','".$content['jr_montant']."')\">";
|
||||
|
||||
$r.= '<H2 class="info">rapprochement </H2>
|
||||
<INPUT TYPE="TEXT" name="rapt" value="">'.$search;
|
||||
|
|
@ -582,7 +582,7 @@ function GetJrnProp($p_dossier,$p_jrn,$is_connected=0)
|
|||
*/
|
||||
function ViewJrn($p_dossier,$p_user,$p_jrn,$p_url,$p_array=null) {
|
||||
echo_debug('jrn.php',__LINE__,"function ViewJrn($p_dossier,$p_user,$p_jrn,$p_array=null) ");
|
||||
echo JS_VIEW_JRN_DETAIL;
|
||||
|
||||
$db=sprintf("dossier%d",$p_dossier);
|
||||
$l_prop=GetJrnProp($p_dossier,$p_jrn);
|
||||
echo "<H2 class=\"info\">".$l_prop['jrn_def_name']."( ".$l_prop['jrn_def_code'].")"."</H2>";
|
||||
|
|
@ -658,8 +658,8 @@ function ViewJrn($p_dossier,$p_user,$p_jrn,$p_url,$p_array=null) {
|
|||
}
|
||||
|
||||
list($z_type,$z_num,$num_op)=split("-",$l_line['jr_internal']);
|
||||
printf ('<INPUT TYPE="BUTTON" VALUE="%s" onClick="viewDetail(\'%s\',\'%s\')">',
|
||||
$num_op,$l_line['j_grpt'],$sessid);
|
||||
printf ('<INPUT TYPE="BUTTON" VALUE="%s" onClick="modifyOperation(\'%s\',\'%s\')">',
|
||||
$num_op,$sessid,$l_line['jr_id']);
|
||||
// echo $num_op;
|
||||
echo "</TD>";
|
||||
|
||||
|
|
|
|||
|
|
@ -178,7 +178,7 @@ $sql="select sg_code,
|
|||
}
|
||||
}// if ( $a_name
|
||||
// Add java script for detail
|
||||
$r.=JS_VIEW_JRN_DETAIL;
|
||||
|
||||
|
||||
$r.='<H2 class="info">'.$p_sg_code." Noms : ".$name.'</H2>';
|
||||
|
||||
|
|
|
|||
|
|
@ -62,11 +62,12 @@ function GetTvaRate($p_cn,$p_tva_id) {
|
|||
* \param $a_quantity array
|
||||
* \param $a_price array
|
||||
* \param $ap_vat Array of tva id
|
||||
* \param $a_amount_tva for the expense, if the tva amount is given
|
||||
* \param $all = false if we reduce VAT
|
||||
* \return: array
|
||||
* a[tva_id] = amount vat
|
||||
*/
|
||||
function ComputeTotalVat($p_cn, $a_fiche,$a_quant,$a_price,$ap_vat,$all=false ) {
|
||||
function ComputeTotalVat($p_cn, $a_fiche,$a_quant,$a_price,$ap_vat,$a_vat_amount=null,$all=false ) {
|
||||
echo_debug('user_common.php',__LINE__,"ComputeTotalVat $a_fiche $a_quant $a_price");
|
||||
foreach ( $a_fiche as $t=>$el) {
|
||||
echo_debug('user_common.php',__LINE__,"t $t e $el");
|
||||
|
|
@ -78,7 +79,7 @@ echo_debug('user_common.php',__LINE__,"ComputeTotalVat $a_fiche $a_quant $a_pric
|
|||
echo_debug ('user_common.php',__LINE__,"idx $idx element $element");
|
||||
// if the card id is null or empty
|
||||
if ( strlen(trim($element))==0) continue;
|
||||
|
||||
|
||||
// Get the tva_id
|
||||
if ( $ap_vat != null and
|
||||
isNumber($ap_vat[$idx])== 1 and $ap_vat[$idx] != -1 )
|
||||
|
|
@ -98,53 +99,70 @@ echo_debug('user_common.php',__LINE__,"ComputeTotalVat $a_fiche $a_quant $a_pric
|
|||
$a_vat=GetTvaRate($p_cn,$tva_id);
|
||||
|
||||
// Get the attribut price of the card(fiche)
|
||||
if ( $a_vat != null and $a_vat['tva_id'] != "" )
|
||||
{
|
||||
$flag=true;
|
||||
$a=$a_vat['tva_id'];
|
||||
// Compute vat for this item
|
||||
$vat_amount=round($a_price[$idx]*$a_vat['tva_rate']*$a_quant[$idx],2);
|
||||
if ( $a_vat != null and $a_vat['tva_id'] != "" )
|
||||
{
|
||||
$flag=true;
|
||||
$a=$a_vat['tva_id'];
|
||||
// Compute vat for this item
|
||||
$vat_amount=round($a_price[$idx]*$a_vat['tva_rate']*$a_quant[$idx],2);
|
||||
|
||||
// if a vat amount is given
|
||||
if ( $a_vat_amount != null &&
|
||||
$a_vat_amount[$idx] != 0 )
|
||||
$vat_amount= $a_vat_amount[$idx] ;
|
||||
|
||||
// only the deductible vat
|
||||
if ( $all == false )
|
||||
{
|
||||
//variable containing the nd part
|
||||
// used when a card has both special rule for vat
|
||||
$nd1=0;
|
||||
// if a part is not deductible then reduce vat_amount
|
||||
$nd=GetFicheAttribut($p_cn,$a_fiche[$idx],ATTR_DEF_TVA_NON_DEDUCTIBLE);
|
||||
if ( $nd != null && strlen(trim($nd)) != 0 && $nd != 0 )
|
||||
{
|
||||
$nd_amount=round($a_price[$idx]*$a_vat['tva_rate']*$a_quant[$idx]*$nd,2);
|
||||
// problem with round
|
||||
$vat_amount=$vat_amount-$nd_amount;
|
||||
echo_debug('user_common.php',__LINE__,
|
||||
"A - TVA Attr fiche [$nd] nd amount [ $nd_amount ]".
|
||||
"vat amount [ $vat_amount]");
|
||||
$flag=false;
|
||||
// save nd into nd1
|
||||
$nd1=$nd;
|
||||
}
|
||||
// if a part is not deductible then reduce vat_amount
|
||||
$nd=GetFicheAttribut($p_cn,$a_fiche[$idx],ATTR_DEF_TVA_NON_DEDUCTIBLE_RECUP);
|
||||
if ( $nd != null && strlen(trim($nd)) != 0 && $nd != 0 )
|
||||
{
|
||||
$nd_amount2=round($a_price[$idx]*$a_vat['tva_rate']*$a_quant[$idx]*$nd,2);
|
||||
|
||||
$vat_amount=$vat_amount-$nd_amount2;
|
||||
// when using both vat, their sum cannot exceed 1, if = 1 then vat = 0
|
||||
if ( ($nd+$nd1) == 1)
|
||||
$vat_amount=0;
|
||||
echo_debug('user_common.php',__LINE__,
|
||||
"B - TVA Attr fiche [$nd] nd amount [ $nd_amount2 ]".
|
||||
"vat amount [ $vat_amount]");
|
||||
|
||||
$flag=false;
|
||||
}
|
||||
}
|
||||
|
||||
$r[$a]=isset ( $r[$a] )?$r[$a]+$vat_amount:$vat_amount;
|
||||
}
|
||||
// only the deductible vat
|
||||
if ( $all == false )
|
||||
{
|
||||
//variable containing the nd part
|
||||
// used when a card has both special rule for vat
|
||||
$nd1=0;
|
||||
// if a part is not deductible then reduce vat_amount
|
||||
$nd=GetFicheAttribut($p_cn,$a_fiche[$idx],ATTR_DEF_TVA_NON_DEDUCTIBLE);
|
||||
if ( $nd != null && strlen(trim($nd)) != 0 && $nd != 0 )
|
||||
{
|
||||
// if tva amount is given we do not compute it
|
||||
if ( $a_vat_amount != null &&
|
||||
$a_vat_amount[$idx] != 0 )
|
||||
$nd_amount=round($a_price[$idx]*$a_quant[$idx]*$nd,2)+$a_vat_amount[$idx];
|
||||
else
|
||||
$nd_amount=round($a_price[$idx]*$a_vat['tva_rate']*$a_quant[$idx]*$nd,2);
|
||||
|
||||
|
||||
// problem with round
|
||||
$vat_amount=$vat_amount-$nd_amount;
|
||||
echo_debug('user_common.php',__LINE__,
|
||||
"A - TVA Attr fiche [$nd] nd amount [ $nd_amount ]".
|
||||
"vat amount [ $vat_amount]");
|
||||
$flag=false;
|
||||
// save nd into nd1
|
||||
$nd1=$nd;
|
||||
}
|
||||
// if a part is not deductible then reduce vat_amount
|
||||
$nd=GetFicheAttribut($p_cn,$a_fiche[$idx],ATTR_DEF_TVA_NON_DEDUCTIBLE_RECUP);
|
||||
if ( $nd != null && strlen(trim($nd)) != 0 && $nd != 0 )
|
||||
{
|
||||
// if tva amount is given we do not compute it
|
||||
if ( $a_vat_amount != null &&
|
||||
$a_vat_amount[$idx] != 0 )
|
||||
$nd_amount2=round($a_price[$idx]*$a_quant[$idx]*$nd,2)+$a_vat_amount[$idx];
|
||||
else
|
||||
$nd_amount2=round($a_price[$idx]*$a_vat['tva_rate']*$a_quant[$idx]*$nd,2);
|
||||
|
||||
$vat_amount=$vat_amount-$nd_amount2;
|
||||
// when using both vat, their sum cannot exceed 1, if = 1 then vat = 0
|
||||
if ( ($nd+$nd1) == 1)
|
||||
$vat_amount=0;
|
||||
echo_debug('user_common.php',__LINE__,
|
||||
"B - TVA Attr fiche [$nd] nd amount [ $nd_amount2 ]".
|
||||
"vat amount [ $vat_amount]");
|
||||
|
||||
$flag=false;
|
||||
}
|
||||
}
|
||||
|
||||
$r[$a]=isset ( $r[$a] )?$r[$a]+$vat_amount:$vat_amount;
|
||||
}
|
||||
|
||||
}
|
||||
echo_debug('user_common.php',__LINE__," return ".var_export($r,true));
|
||||
|
|
@ -455,7 +473,7 @@ function ListJrn($p_cn,$p_jrn,$p_where="",$p_array=null,$p_value=0,$p_paid=0)
|
|||
//this function returns a tree structure.
|
||||
|
||||
$r="";
|
||||
$r.=JS_VIEW_JRN_DETAIL;
|
||||
|
||||
$r.=JS_VIEW_JRN_CANCEL;
|
||||
$r.=JS_VIEW_JRN_MODIFY;
|
||||
|
||||
|
|
@ -551,7 +569,7 @@ function ListJrn($p_cn,$p_jrn,$p_where="",$p_array=null,$p_value=0,$p_paid=0)
|
|||
|
||||
foreach ($a as $key => $element)
|
||||
{
|
||||
$r.= "<A class=\"detail\" HREF=\"javascript:viewDetail('".GetGrpt($p_cn,$element)."','$l_sessid')\" > ".GetInternal($p_cn,$element)."</A>";
|
||||
$r.= "<A class=\"detail\" HREF=\"javascript:modifyOperation('".$element."','".$l_sessid."')\" > ".GetInternal($p_cn,$element)."</A>";
|
||||
}//for
|
||||
}// if ( $a != null ) {
|
||||
$r.="</TD>";
|
||||
|
|
@ -886,6 +904,10 @@ function jrn_navigation_bar($p_offset,$p_line,$p_size=0,$p_page=1)
|
|||
}// if
|
||||
}//foreach
|
||||
}// if
|
||||
|
||||
// action to clean
|
||||
$url=str_replace('&p_action=delete','',$url);
|
||||
|
||||
// compute max of page
|
||||
$nb_page=($p_line-($p_line%$p_size))/$p_size;
|
||||
echo_debug('user_common',__LINE__,"nb_page = $nb_page");
|
||||
|
|
|
|||
|
|
@ -34,6 +34,18 @@ require_once("class_parm_code.php");
|
|||
*
|
||||
*
|
||||
*\param $p_array which can be empty (normally = $_POST)
|
||||
* containing :
|
||||
* <ul>
|
||||
* <li> e_client (quickcode),
|
||||
* <li> e_marchX quickcode,
|
||||
* <li> e_march_sellX,
|
||||
* <li> e_march0_tva_id,
|
||||
* <li> e_quant0,nb_item,
|
||||
* <li> jrn_type,
|
||||
* <li> e_date,
|
||||
* <li> e_ech,
|
||||
* <li> e_comm
|
||||
* </ul>
|
||||
*\param $p_jrn the ledger
|
||||
*\param $p_periode = periode
|
||||
*\param $pview_only if we cannot change it (no right or centralized op)
|
||||
|
|
@ -62,7 +74,6 @@ echo_debug('user_form_ach.php',__LINE__,"Enter FormAchInput($p_cn,$p_jrn,$p_peri
|
|||
$r.=JS_SHOW_TVA;
|
||||
$r.=JS_TVA;
|
||||
// Compute href
|
||||
// $href=basename($_SERVER['PHP_SELF']);
|
||||
$href=basename($_SERVER['PHP_SELF']);
|
||||
switch ($href)
|
||||
{
|
||||
|
|
@ -154,6 +165,7 @@ echo_debug('user_form_ach.php',__LINE__,"Enter FormAchInput($p_cn,$p_jrn,$p_peri
|
|||
$r.="<th>Dénomination</th>";
|
||||
$r.="<th>prix</th>";
|
||||
$r.="<th>tva</th>";
|
||||
$r.="<th>Montant TVA</th>";
|
||||
$r.="<th>quantité</th>";
|
||||
$r.='</TR>';
|
||||
// For each article
|
||||
|
|
@ -166,13 +178,13 @@ echo_debug('user_form_ach.php',__LINE__,"Enter FormAchInput($p_cn,$p_jrn,$p_peri
|
|||
$march=(isset(${"e_march$i"}))?${"e_march$i"}:"";
|
||||
$march_sell=(isset(${"e_march".$i."_sell"}))?${"e_march".$i."_sell"}:"";
|
||||
$march_tva_id=(isset(${"e_march$i"."_tva_id"}))?${"e_march$i"."_tva_id"}:"";
|
||||
|
||||
$march_tva_amount=(isset(${"e_march$i"."_tva_amount"}))?${"e_march$i"."_tva_amount"}:"0";
|
||||
$march_tva_label="";
|
||||
$march_label="";
|
||||
|
||||
// If $march has a value
|
||||
if ( isFicheOfJrn($p_cn,$p_jrn,$march,'deb') == 0 ) {
|
||||
$msg="Fiche inexistante !!! ";
|
||||
if ( strlen(trim($march)) != 0 && isFicheOfJrn($p_cn,$p_jrn,$march,'deb') == 0 ) {
|
||||
$msg="user_form_achat@".__LINE__."Fiche inexistante !!! ";
|
||||
echo_error($msg); echo_error($msg);
|
||||
$march="";
|
||||
} else {
|
||||
|
|
@ -205,6 +217,7 @@ echo_debug('user_form_ach.php',__LINE__,"Enter FormAchInput($p_cn,$p_jrn,$p_peri
|
|||
$Price=new widget("text");
|
||||
$Price->SetReadOnly($pview_only);
|
||||
$Price->table=1;
|
||||
$Price->size=9;
|
||||
$r.=$Price->IOValue("e_march".$i."_sell",$march_sell);
|
||||
// vat label
|
||||
$select_tva=make_array($p_cn,"select tva_id,tva_label from tva_rate order by tva_id",1);
|
||||
|
|
@ -212,12 +225,19 @@ echo_debug('user_form_ach.php',__LINE__,"Enter FormAchInput($p_cn,$p_jrn,$p_peri
|
|||
$Tva->table=1;
|
||||
$Tva->selected=$march_tva_id;
|
||||
$r.=$Tva->IOValue("e_march$i"."_tva_id",$select_tva);
|
||||
// tva_amount
|
||||
$Tva_amount=new widget("text");
|
||||
$Tva_amount->SetReadOnly($pview_only);
|
||||
$Tva_amount->table=1;
|
||||
$Tva_amount->size=9;
|
||||
$r.=$Tva_amount->IOValue("e_march".$i."_tva_amount",$march_tva_amount);
|
||||
|
||||
// quantity
|
||||
$quant=(isset(${"e_quant$i"}))?${"e_quant$i"}:"1";
|
||||
$Quantity=new widget("text");
|
||||
$Quantity->SetReadOnly($pview_only);
|
||||
$Quantity->table=1;
|
||||
$Quantity->size=9;
|
||||
$r.=$Quantity->IOValue("e_quant".$i,$quant);
|
||||
$r.='</TR>';
|
||||
}
|
||||
|
|
@ -295,6 +315,13 @@ function form_verify_input($p_cn,$p_jrn,$p_periode,$p_array,$p_number)
|
|||
|
||||
}
|
||||
}
|
||||
// if tva_amount is not a number than reset to 0
|
||||
if ( strlen(trim(${"e_march".$o."_tva_amount"})) !=0 &&
|
||||
isNumber (${"e_march".$o."_tva_amount"}) == 0)
|
||||
{
|
||||
${"e_march".$o."_tva_amount"}=0;
|
||||
}
|
||||
// if amount is not empty and is not a number
|
||||
if ( strlen(trim(${"e_march".$o."_sell"})) !=0 && isNumber(${"e_march".$o."_sell"}) == 0 )
|
||||
{
|
||||
echo_debug('user_form_ach.php',__LINE__,"Prix invalide ".${"e_march$o"});
|
||||
|
|
@ -355,7 +382,7 @@ function form_verify_input($p_cn,$p_jrn,$p_periode,$p_array,$p_number)
|
|||
// Check
|
||||
if ( isFicheOfJrn($p_cn,$p_jrn,${"e_march$i"},'deb') == 0 ) {
|
||||
$msg="Fiche inexistante !!! ";
|
||||
echo_error($msg); echo_error($msg);
|
||||
echo_error(__FILE__.__LINE__.$msg);
|
||||
echo "<SCRIPT>alert('$msg');</SCRIPT>";
|
||||
return null;
|
||||
}
|
||||
|
|
@ -509,8 +536,9 @@ function FormAchView ($p_cn,$p_jrn,$p_periode,$p_array,$p_submit,$p_number,$p_pi
|
|||
} else {
|
||||
$fiche_price=${"e_march$i"."_sell"};
|
||||
}
|
||||
|
||||
|
||||
// get TVA Amount
|
||||
$tva_amount=${"e_march".$i."_tva_amount"};
|
||||
|
||||
// VAT
|
||||
$vat=(isNumber(${"e_march$i"."_tva_id"})==0 || ${"e_march$i"."_tva_id"}==-1 )?getFicheAttribut($p_cn,${"e_march$i"},ATTR_DEF_TVA):${"e_march$i"."_tva_id"};
|
||||
|
||||
|
|
@ -533,11 +561,21 @@ function FormAchView ($p_cn,$p_jrn,$p_periode,$p_array,$p_submit,$p_number,$p_pi
|
|||
// Sum of invoice
|
||||
$sum_march+=$fiche_sum;
|
||||
// vat of the card
|
||||
$fiche_amount_vat=$fiche_price*$fiche_quant*$vat_rate;
|
||||
// value card + vat
|
||||
$fiche_with_vat=$fiche_price*$fiche_quant*(1+$vat_rate);
|
||||
if ( $tva_amount == 0)
|
||||
{
|
||||
$fiche_amount_vat=$fiche_price*$fiche_quant*$vat_rate;
|
||||
// value card + vat
|
||||
$fiche_with_vat=$fiche_price*$fiche_quant*(1+$vat_rate);
|
||||
}
|
||||
else
|
||||
{
|
||||
$fiche_amount_vat=$tva_amount;
|
||||
// value card + vat
|
||||
$fiche_with_vat=$fiche_price*$fiche_quant+$tva_amount;
|
||||
}
|
||||
// Sum of invoice vat
|
||||
$sum_with_vat+=$fiche_with_vat;
|
||||
|
||||
// Show the data
|
||||
$r.='<TR>';
|
||||
$r.='<TD>'.$fiche_name.'</TD>';
|
||||
|
|
@ -577,7 +615,6 @@ function FormAchView ($p_cn,$p_jrn,$p_periode,$p_array,$p_submit,$p_number,$p_pi
|
|||
exit (-1);
|
||||
}
|
||||
|
||||
// $r.='<FORM METHOD="POST" enctype="multipart/form-data" ACTION="user_jrn.php?action=new&p_jrn='.$p_jrn.'">';
|
||||
$r.='<FORM METHOD="POST" enctype="multipart/form-data" ACTION="'.$href.'">';
|
||||
// check for upload piece
|
||||
// Set correctly the REQUEST param for jrn_type
|
||||
|
|
@ -652,6 +689,8 @@ function RecordSell($p_cn,$p_array,$p_user,$p_jrn)
|
|||
$a_quant[$i]=${"e_quant$i"};
|
||||
$a_price[$i]=0;
|
||||
$a_vat_good[$i]=${"e_march$i"."_tva_id"};
|
||||
$a_vat_amount[$i]=${"e_march".$i."_tva_amount"};
|
||||
|
||||
// check wether the price is set or no
|
||||
if ( isNumber(${"e_march$i"."_sell"}) == 0 ) {
|
||||
if ( $a_good[$i] !="" ) {
|
||||
|
|
@ -672,7 +711,7 @@ function RecordSell($p_cn,$p_array,$p_user,$p_jrn)
|
|||
|
||||
// Compute vat with ded
|
||||
echo_debug('user_form_achat.php',__LINE__,"Call ComputeTotalVat");
|
||||
$a_vat=ComputeTotalVat($p_cn,$a_good,$a_quant,$a_price,$a_vat_good,false);
|
||||
$a_vat=ComputeTotalVat($p_cn,$a_good,$a_quant,$a_price,$a_vat_good,$a_vat_amount,false);
|
||||
|
||||
StartSql($p_cn);
|
||||
|
||||
|
|
@ -710,7 +749,7 @@ function RecordSell($p_cn,$p_array,$p_user,$p_jrn)
|
|||
if ( $non_dedu != null && strlen(trim($non_dedu)) != 0)
|
||||
{
|
||||
$lvat=ComputeVat($p_cn, $a_good[$i],$a_quant[$i],$a_price[$i],
|
||||
$a_vat_good[$i] );
|
||||
$a_vat_good[$i],$a_vat_amount[$i] );
|
||||
$ded_vat=($lvat != null )?$lvat*$non_dedu:0;
|
||||
$ded_vat=round($ded_vat,2);
|
||||
$sum_tva_nd+=$ded_vat;
|
||||
|
|
@ -730,7 +769,7 @@ function RecordSell($p_cn,$p_array,$p_user,$p_jrn)
|
|||
if ( $non_dedu != null && strlen(trim($non_dedu)) != 0 )
|
||||
{
|
||||
$lvat=ComputeVat($p_cn, $a_good[$i],$a_quant[$i],$a_price[$i],
|
||||
$a_vat_good[$i] );
|
||||
$a_vat_good[$i],$a_vat_amount[$i] );
|
||||
$ded_vat=($lvat != null )?$lvat*$non_dedu:0;
|
||||
|
||||
$sum_tva_nd+=round($ded_vat,2);
|
||||
|
|
@ -762,19 +801,17 @@ function RecordSell($p_cn,$p_array,$p_user,$p_jrn)
|
|||
// Insert Vat
|
||||
$sum_tva=0.0;
|
||||
if ( $a_vat != null ) // no vat
|
||||
|
||||
{
|
||||
|
||||
echo_debug('user_form_ach',__LINE__,'a_vat = '.var_export($a_vat,true));
|
||||
foreach ($a_vat as $tva_id => $tva_amount )
|
||||
foreach ($a_vat as $tva_id => $e_tva_amount )
|
||||
{
|
||||
echo_debug('user_form_ach',__LINE__," tva_amount = $tva_amount tva_id=$tva_id");
|
||||
echo_debug('user_form_ach',__LINE__," tva_amount = $e_tva_amount tva_id=$tva_id");
|
||||
$poste=GetTvaPoste($p_cn,$tva_id,'d');
|
||||
if ($tva_amount == 0 ) continue;
|
||||
echo_debug('user_form_ach',__LINE__,"InsertJrnx($p_cn,'d',$p_user->id,$p_jrn,$poste,$e_date,round($tva_amount,2),$seq,$periode);");
|
||||
$r=InsertJrnx($p_cn,'d',$p_user->id,$p_jrn,$poste,$e_date,round($tva_amount,2),$seq,$periode);
|
||||
if ($e_tva_amount == 0 ) continue;
|
||||
echo_debug('user_form_ach',__LINE__,"InsertJrnx($p_cn,'d',$p_user->id,$p_jrn,$poste,$e_date,round($e_tva_amount,2),$seq,$periode);");
|
||||
$r=InsertJrnx($p_cn,'d',$p_user->id,$p_jrn,$poste,$e_date,round($e_tva_amount,2),$seq,$periode);
|
||||
if ( $r == false ) { Rollback($p_cn); exit(" Error 'user_form_ach.php' __LINE__");}
|
||||
$sum_tva+=round($tva_amount,2);
|
||||
$sum_tva+=round($e_tva_amount,2);
|
||||
}
|
||||
}
|
||||
echo_debug('user_form_ach.php',__LINE__,"echeance = $e_ech");
|
||||
|
|
|
|||
|
|
@ -277,6 +277,8 @@ function FormFin($p_cn,$p_jrn,$p_periode,$p_submit,$p_array=null,$pview_only=tru
|
|||
${"e_concerned".$i}=(isset(${"e_concerned".$i}))?${"e_concerned".$i}:"";
|
||||
$wConcerned=new widget("js_concerned");
|
||||
$wConcerned->SetReadOnly($pview_only);
|
||||
$wConcerned->extra=0;
|
||||
$wConcerned->table=1;
|
||||
$r.=$wConcerned->IOValue("e_concerned".$i,${"e_concerned".$i});
|
||||
$r.='</TR>';
|
||||
// if not recorded the new amount must be recalculate
|
||||
|
|
|
|||
|
|
@ -202,6 +202,7 @@ function FormVenInput($p_cn,$p_jrn,$p_periode,$p_array=null,$pview_only=true,$p_
|
|||
$Price=new widget("text");
|
||||
$Price->SetReadOnly($pview_only);
|
||||
$Price->table=1;
|
||||
$Price->size=9;
|
||||
$r.=$Price->IOValue("e_march".$i."_sell",$march_sell);
|
||||
// vat label
|
||||
//--
|
||||
|
|
@ -217,6 +218,7 @@ function FormVenInput($p_cn,$p_jrn,$p_periode,$p_array=null,$pview_only=true,$p_
|
|||
$Quantity=new widget("text");
|
||||
$Quantity->SetReadOnly($pview_only);
|
||||
$Quantity->table=1;
|
||||
$Quantity->size=9;
|
||||
//$r.=InputType("","TEXT","e_quant".$i,$quant,$pview_only);
|
||||
$r.=$Quantity->IOValue("e_quant".$i,$quant);
|
||||
$r.='</TR>';
|
||||
|
|
@ -344,7 +346,7 @@ for ($o = 0;$o < $p_number; $o++) {
|
|||
// Check
|
||||
if ( isFicheOfJrn($p_cn,$p_jrn,${"e_march$i"},'cred') == 0 ) {
|
||||
$msg="Fiche inexistante !!! ";
|
||||
echo_error($msg); echo_error($msg);
|
||||
echo_error(__FILE__.__LINE__.$msg);
|
||||
echo "<SCRIPT>alert('$msg');</SCRIPT>";
|
||||
return null;
|
||||
}
|
||||
|
|
@ -363,7 +365,6 @@ for ($o = 0;$o < $p_number; $o++) {
|
|||
cmpDate($e_date,$l_date_end)>0 )
|
||||
{
|
||||
$msg="Not in the active periode please change your preference";
|
||||
echo_error($msg); echo_error($msg);
|
||||
echo "<SCRIPT>alert('$msg');</SCRIPT>";
|
||||
return null;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -537,13 +537,16 @@ function ShowMenuFiche($p_dossier)
|
|||
$Max=pg_NumRows($Res);
|
||||
for ( $i=0; $i < $Max;$i++) {
|
||||
$l_line=pg_fetch_array($Res,$i);
|
||||
printf('<TR><TD class="cell">%s</TD><TD class="mshort"><A class="mtitle" HREF="fiche.php?action=vue&fiche=%d">Voir</A>
|
||||
printf('<TR><TD class="cell">
|
||||
<A class="mtitle" HREF="fiche.php?action=modifier&fiche=%d">%s</A></TD>
|
||||
<TD class="mshort">
|
||||
<A class="mtitle" HREF="fiche.php?action=vue&fiche=%d">Liste</A>
|
||||
</TD>
|
||||
<TD class="mshort"><A class="mtitle" HREF="fiche.php?action=modifier&fiche=%d">Modifier</A></TD>
|
||||
</TR>',
|
||||
$l_line['fd_label'],
|
||||
$l_line['fd_id'],
|
||||
$l_line['fd_id']);
|
||||
$l_line['fd_label'],
|
||||
$l_line['fd_id']
|
||||
);
|
||||
}
|
||||
echo "</TABLE>";
|
||||
echo '</div>';
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ if ( $action == 'update' ) {
|
|||
// p_id is jrn.jr_id
|
||||
$p_id=$_GET["line"];
|
||||
echo_debug('user_update.php',__LINE__," action = update p_id = $p_id");
|
||||
echo JS_VIEW_JRN_DETAIL;
|
||||
|
||||
echo JS_CONCERNED_OP;
|
||||
$r ='<FORM METHOD="POST" ACTION="user_jrn.php">';
|
||||
$r.=UpdateJrn($cn,$p_id);
|
||||
|
|
|
|||
|
|
@ -0,0 +1,2 @@
|
|||
alter table import_tmp add jr_rapt text;
|
||||
create unique index fd_id_ad_id_x on jnt_fic_attr( fd_id,ad_id);
|
||||
Loading…
Add table
Add a link
Reference in a new issue