Main Page | Namespace List | Class Hierarchy | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

constant.php

Go to the documentation of this file.
00001 <?
00002 /*
00003  *   This file is part of PhpCompta.
00004  *
00005  *   PhpCompta is free software; you can redistribute it and/or modify
00006  *   it under the terms of the GNU General Public License as published by
00007  *   the Free Software Foundation; either version 2 of the License, or
00008  *   (at your option) any later version.
00009  *
00010  *   PhpCompta is distributed in the hope that it will be useful,
00011  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  *   GNU General Public License for more details.
00014  *
00015  *   You should have received a copy of the GNU General Public License
00016  *   along with PhpCompta; if not, write to the Free Software
00017  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00018 */
00019 // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
00020 // $Revision$
00026 define ("phpcompta_password","dany");
00027 define ("domaine","");
00028 
00029 define ("DEBUG","true");
00030 
00031 // securite correspond a la table 
00032 // action
00033 // access aux journaux
00034 define ("ENCJRN",1);
00035 // création facture
00036 define("FACT",2);
00037 // lecture aux fiche
00038 define ("FICHE_READ",3);
00039 // Impression
00040 define ("IMP",4);
00041 //formulaire
00042 define("FORM",5);
00043 // Modif du Plan Comptable
00044 define ("MPCMN",6);
00045 // Gestion des journaux
00046 define ("GJRN",7);
00047 // Gestion des paramètres globaux
00048 define ("PARM",8);
00049 // Gestion de la sécurité
00050 define ("SECU",9);
00051 // gestion devise
00052 define ("DEVISE",18);
00053 // gestion Période
00054 define ("PERIODE",19);
00055 // Voir la balance des compte
00056 define ("BALANCE",20);
00057 // Access à la centralisation
00058 define ("CENTRALIZE",10);
00059 define ("VEN",11);
00060 define ("BQE",12);
00061 define ("ODS",13);
00062 
00063 define ("FICHE_WRITE",15);
00064 define ("STOCK_WRITE",16);
00065 define ("STOCK_READ",17);
00066 define ("EXP_IMP_ECR",21);
00067 define ("IMP_BQE",22);
00068 // Erreur
00069 define ("NOERROR",0);
00070 define ("BADPARM",1);
00071 define ("BADDATE",2);
00072 define ("NOTPERIODE",3);
00073 define ("PERIODCLOSED",4);
00074 define ("INVALID_ECH",5);
00075 define ("RAPPT_ALREADY_USED",6);
00076 define ("RAPPT_NOT_EXIST",7);
00077 define ("DIFF_AMOUNT",8);
00078 define ("RAPPT_NOMATCH_AMOUNT",9);
00079 define ("NO_PERIOD_SELECTED",10);
00080 define ("NO_POST_SELECTED",11);
00081 define ("LAST",1);
00082 define ("FIRST",0);
00083 define ("ERROR",12);
00084 
00085 //\enum ACTION  defines document_type for action
00086 define('ACTION','1,5,6,7,8');
00087 
00088 //valeurs standardd
00089 define ("YES",1);
00090 define ("NO",0);
00091 define ("OPEN",1);
00092 define ("CLOSED",0);
00093 define ("NOTCENTRALIZED",3);
00094 define ("ALL",4);
00095 
00096 // Pour les ShowMenuComptaLeft
00097 define ("MENU_FACT",1);
00098 define ("MENU_FICHE",2);
00099 define ("MENU_PARAM",3);
00100 
00101 // for the fiche_inc.GetSqlFiche function
00102 define ("ALL_FICHE_DEF_REF", 1000);
00103 
00104 // fixed value for attr_def data
00105 define ("ATTR_DEF_ACCOUNT",5);
00106 define ("ATTR_DEF_NAME",1);
00107 define ("ATTR_DEF_PRIX_ACHAT",7);
00108 define ("ATTR_DEF_PRIX_VENTE",6);
00109 define ("ATTR_DEF_TVA",2);
00110 define ("ATTR_DEF_NUMTVA",13);
00111 define ("ATTR_DEF_ADRESS",14);
00112 define ("ATTR_DEF_CP",15);
00113 define ("ATTR_DEF_PAYS",16);
00114 define ("ATTR_DEF_STOCK",19);
00115 define ("ATTR_DEF_TEL",17);
00116 define ("ATTR_DEF_EMAIL",18);
00117 define ("ATTR_DEF_COMPANY",25);
00118 define ("ATTR_DEF_FAX",26);
00119 
00120 
00121 define ("FICHE_TYPE_CLIENT",9);
00122 define ("FICHE_TYPE_VENTE",1);
00123 define ("FICHE_TYPE_FOURNISSEUR",8);
00124 define ("FICHE_TYPE_FIN",4);
00125 define ("FICHE_TYPE_CONTACT",16);
00126 define ("FICHE_TYPE_ADM_TAX",14);
00127 define ("ATTR_DEF_DEPENSE_NON_DEDUCTIBLE",20);
00128 define ("ATTR_DEF_TVA_NON_DEDUCTIBLE",21);
00129 define ("ATTR_DEF_TVA_NON_DEDUCTIBLE_RECUP",22);
00130 define ("ATTR_DEF_QUICKCODE",23);
00131 define ("JS_SEARCH_POSTE","<SCRIPT language=\"javascript\">function SearchPoste(p_sessid,p_ctl,p_jrn)
00132      {
00133        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');
00134     } 
00135 function SearchPosteFilter(p_sessid,p_ctl,p_filter,jrn)
00136      {
00137        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');
00138     } 
00139          function GetIt() {
00140            window.close();      
00141         } 
00142 function SetItChild(p_ctl,p_value) {
00143         self.opener.SetItParent(p_ctl,p_value);
00144         window.close();
00145 }
00146 function SetItParent(p_ctl,p_value) {
00147 
00148         var f=document.getElementsByName(p_ctl);
00149         for (var h=0; h < f.length; h++) {
00150                 f[h].value=p_value;
00151                 }
00152         
00153 }
00154 /* SetValue( p_ctl,p_value )
00155 /* p_ctl is the name of the control
00156 /* p_value is the value to set in
00157 */
00158 function SetValue(p_ctl,p_value) 
00159 {
00160 
00161         var f=document.getElementsByName(p_ctl);
00162         for (var h=0; h < f.length; h++) {
00163                 f[h].value=p_value;
00164                 }
00165         
00166 
00167 }
00168         </SCRIPT>"
00169 );
00170 define ("JS_SHOW_TVA","<SCRIPT language=\"javascript\">
00171 function ShowTva(p_sessid,ctl)
00172      {
00173        var win=window.open('show_tva.php?ctl='+ctl+'&PHPSESSID='+p_sessid,'Montre','scrollbar,toolbar=no,width=300,height=300,resizable=yes');
00174     } 
00175  function GetIt(ctl,tva_id) {
00176    self.opener.SetValue(ctl,tva_id)
00177    window.close();      
00178 } 
00179 
00180         </SCRIPT>"
00181 );
00182 
00183 define ("JS_VIEW_JRN_DETAIL","<script language=\"javascript\">function viewDetail(p_value,p_sessid)
00184                 {
00185                         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');
00186                 }
00187 
00188         </script>");
00189 define ("JS_VIEW_JRN_CANCEL","<script  language=\"javascript\" >function cancelOperation(p_value,p_sessid,p_jrn)
00190                 {
00191                         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');
00192                 }
00193 function RefreshMe() {
00194 window.location.reload();
00195 }
00196         </script>");
00197 define ("JS_VIEW_JRN_MODIFY","<script  language=\"javascript\">function modifyOperation(p_value,p_sessid,p_jrn)
00198                 {
00199                         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');
00200                 }
00201 function RefreshMe() {
00202 window.location.reload();
00203 }
00204         function dropLink(p_value,p_value2,p_sessid) {
00205         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');
00206                 }
00207 
00208         
00209         </script>");
00210 define ("JS_UPDATE_PCMN","<script  language=\"javascript\">function PcmnUpdate(p_value,p_lib,p_parent,p_sessid)
00211                 {
00212                         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');
00213                 }
00214 function RefreshMe() {
00215         window.location.reload();
00216         }
00217         
00218         
00219         </script>");
00220 
00221 define ("JS_SEARCH_CARD","
00222 <script  language=\"javascript\">
00223 function showfiche(p_sessid,qcode)
00224 {
00225   var a=window.open('show_fiche.php?PHPSESSID='+p_sessid+'&q='+qcode,'','toolbar=no,width=350,height=450,scrollbar=yes');
00226   
00227 }
00228 
00229 /* type must be cred or deb and name is
00230  * the control's name
00231 */
00232 function SearchCard(p_sessid,type,name,jrn)
00233 {
00234    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');
00235 }
00236         function NewCard(p_sessid,type,name,jrn)
00237 {
00238    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');
00239 }
00240 /* SetValue( p_ctl,p_value )
00241 /* p_ctl is the name of the control
00242 /* p_value is the value to set in
00243 */
00244 function SetValue(p_ctl,p_value) 
00245 {
00246 
00247         var f=document.getElementsByName(p_ctl);
00248         for (var h=0; h < f.length; h++) {
00249                 f[h].value=p_value;
00250                 }
00251         
00252 
00253 }
00254 /* Parameters 
00255  * i = ctl _name
00256  * p_id = code id (fiche.f_id)
00257  *¨p_label = label
00258  * p_sell vw_fiche_attr.vw_sell
00259  * p_buy vw_fiche_attr.vw_buy
00260  * p_tva_id vw_fiche_attr.tva_id
00261  * p_tva_label vw_fiche_attr.tva_label
00262  */
00263   function SetData(i,p_id,p_label,p_sell,p_buy,p_tva_id, p_tva_label)
00264 {
00265         SetValue(i,p_id);
00266         // for the form we use 1. and for span 2.    
00267         //1. document.form_detail.eval(a).value=p_buy;
00268         //2. document.getElementById(a).innerHTML=p_sell;
00269 
00270         // Compute name of label ctl
00271         var a=i+'_label';
00272         document.getElementById(a).innerHTML=p_label;
00273         
00274         // Compute name of  sell  ctl 
00275         var a=i+'_sell';
00276         // if the object exist
00277         var e=document.getElementsByName(a)  
00278           if ( e.length != 0 ) {
00279             SetValue(a,p_sell);
00280 
00281         }
00282 
00283         // Compute name of  buy  ctl 
00284         var a=i+'_buy';
00285         // if the object exist
00286         var e=document.getElementsByName(a)  
00287         if ( e.length != 0 ) {
00288           SetValue(a,p_buy);
00289         }
00290         // Compute name of  tva_id  ctl 
00291         var a=i+'_tva_id';
00292         // if the object exist
00293         var e=document.getElementsByName(a)  
00294         if ( e.length != 0 ) {
00295           SetValue(a,p_tva_id);
00296         }
00297 
00298         // Compute name of  tva_label ctl 
00299         var a=i+'_tva_label';
00300         // if the object exist
00301         if (document.getElementById(a) ) {
00302           document.getElementById(a).innerHTML=p_tva_label;
00303         }
00304 }
00305 
00306 
00307 </script>
00308 
00309 
00310 ");
00311 // concerned operation
00312 define ("JS_CONCERNED_OP","
00313 <script  language=\"javascript\">
00314 
00315 function SearchJrn(p_sessid,p_ctl)
00316 {
00317         var win=window.open('jrn_search.php?p_ctl='+p_ctl+'&PHPSESSID='+p_sessid,'Cherche','toolbar=no,width=600,height=600,scrollbars=yes');
00318 }
00319 function GetIt(p_ctl,p_value) {
00320   self.opener.SetIt(p_value,p_ctl);
00321         window.close(); 
00322 }
00323 /* SetValue( p_ctl,p_value )
00324 /* p_ctl is the name of the control
00325 /* p_value is the value to set in
00326 */
00327 function SetIt(p_value,p_ctl) {
00328         
00329         var f=document.getElementsByName(p_ctl);
00330         for (var h=0; h < f.length; h++) {
00331                 f[h].value=p_value;
00332                 }
00333         
00334 
00335 }
00336 
00337 
00338 </script>
00339 ");
00340 // One line calculator
00341 define ("JS_CALC_LINE","
00342 
00343 <form name=\"calc_line\" onSubmit=\"cal()\">
00344 <input type=\"text\" size=\"20\" name=\"calculator\" onBlur=\"cal()\">
00345 Answer:<span id=\"name\"></span>
00346 <br>
00347 
00348 <!-- <input type=\"button\" name=\"B1\" value=\"Calculate\" > -->
00349 
00350 <input type=\"reset\" name=\"B2\" value=\"Reset\"><br>
00351 
00352 
00353 </form>
00354 <SCRIPT  language=\"javascript\">
00355 
00356 function cal()
00357 {
00358   document.getElementById(\"name\").innerHTML=
00359   eval(document.calc_line.calculator.value)
00360 }
00361 </script>
00362 
00363 
00364 
00365 "
00366 );
00367 
00368 define ("JS_TVA","<script  language=\"javascript\">
00369 
00370 function ChangeTVA(p_ctl,p_value) {
00371         if (document.getElementById(p_ctl) ) {
00372           var f=document.getElementsByName(p_value);
00373           for ( var i=0; i < f.length ; i++) {
00374                   document.getElementById(p_ctl).innerHTML=f[i].value;
00375         }
00376         }
00377 }
00378 
00379 </script>");
00380 // Sql string
00381 define ("SQL_LIST_ALL_INVOICE","");
00382 
00383 define ("SQL_LIST_UNPAID_INVOICE"," where (jr_rapt is null or jr_rapt = '') and jr_valid = true "); 
00384 define ("SQL_LIST_UNPAID_INVOICE_DATE_LIMIT" ," where (jr_rapt is null or jr_rapt = '') 
00385                        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" );
00386 ?>

Generated on Tue Jun 27 01:39:28 2006 for phpcompta by  doxygen 1.4.4